aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2011-08-28 22:53:20 +1000
committerPaul Gilbert2011-08-28 22:53:20 +1000
commit722a9459fe65c6d129cdaf2bbe38b41195cc844f (patch)
tree096bce78864c2c37ca790a21402591c667e68c26 /engines
parent2798c65d756e82db8eb4a58ca3db526215557333 (diff)
downloadscummvm-rg350-722a9459fe65c6d129cdaf2bbe38b41195cc844f.tar.gz
scummvm-rg350-722a9459fe65c6d129cdaf2bbe38b41195cc844f.tar.bz2
scummvm-rg350-722a9459fe65c6d129cdaf2bbe38b41195cc844f.zip
TSAGE: Added lots of original source names from debugger, further work on first game scene
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/blue_force/blueforce_logic.cpp13
-rw-r--r--engines/tsage/blue_force/blueforce_scenes0.cpp36
-rw-r--r--engines/tsage/blue_force/blueforce_scenes1.cpp4
-rw-r--r--engines/tsage/blue_force/blueforce_scenes3.cpp29
-rw-r--r--engines/tsage/blue_force/blueforce_ui.cpp26
-rw-r--r--engines/tsage/blue_force/blueforce_ui.h3
-rw-r--r--engines/tsage/core.cpp39
-rw-r--r--engines/tsage/globals.cpp17
-rw-r--r--engines/tsage/globals.h63
9 files changed, 156 insertions, 74 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index 60bbddbabc..9c7d66aadf 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -422,7 +422,7 @@ SceneExt::SceneExt(): Scene() {
void SceneExt::postInit(SceneObjectList *OwnerList) {
Scene::postInit(OwnerList);
- if (BF_GLOBALS._v4CEA2) {
+ if (BF_GLOBALS._dayNumber) {
// Blank out the bottom portion of the screen
BF_GLOBALS._interfaceY = BF_INTERFACE_Y;
@@ -441,7 +441,7 @@ void SceneExt::dispatch() {
_timerList.dispatch();
if (_field37A) {
- if ((--_field37A == 0) && BF_GLOBALS._v4CEA2) {
+ if ((--_field37A == 0) && BF_GLOBALS._dayNumber) {
if (BF_GLOBALS._v4E238 && (BF_GLOBALS._v4CF9E == 1)) {
warning("sub_1B052");
}
@@ -494,8 +494,11 @@ void SceneHandlerExt::postInit(SceneObjectList *OwnerList) {
SceneHandler::postInit(OwnerList);
// Load the low end palette data
- GLOBALS._scenePalette.loadPalette(2);
- GLOBALS._scenePalette.refresh();
+ BF_GLOBALS._scenePalette.loadPalette(2);
+ BF_GLOBALS._scenePalette.refresh();
+
+ // Setup the user interface
+ BF_GLOBALS._uiElements.setup(Common::Point(0, BF_INTERFACE_Y - 2));
}
void SceneHandlerExt::process(Event &event) {
@@ -548,8 +551,8 @@ void VisualSpeaker::proc12(Action *action) {
}
void VisualSpeaker::setText(const Common::String &msg) {
- BF_GLOBALS._events.waitForPress();
_objectList.draw();
+ BF_GLOBALS._sceneObjects->draw();
_sceneText._color1 = _color1;
_sceneText._color2 = _color2;
diff --git a/engines/tsage/blue_force/blueforce_scenes0.cpp b/engines/tsage/blue_force/blueforce_scenes0.cpp
index f1b714ec6c..f33312494a 100644
--- a/engines/tsage/blue_force/blueforce_scenes0.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes0.cpp
@@ -263,29 +263,31 @@ void Scene50::Tooltip::highlight(bool btnDown) {
update();
if (btnDown) {
- if ((BF_GLOBALS._bikiniHutState == 14) && BF_GLOBALS.getFlag(98))
+ if ((BF_GLOBALS._bookmark == bCalledToDrunkStop) && BF_GLOBALS.getFlag(beenToJRDay2))
scene->_sceneNumber = 600;
- else if (BF_GLOBALS._bikiniHutState == 5)
+ else if (BF_GLOBALS._bookmark == bBookedGreen)
scene->_sceneNumber = 410;
else {
- BF_GLOBALS._v4CEF4 = _newSceneNumber;
+ BF_GLOBALS._driveToScene = _newSceneNumber;
- switch (BF_GLOBALS._v4CEF2) {
+ switch (BF_GLOBALS._driveFromScene) {
case 330:
case 340:
case 342:
BF_GLOBALS._player.disableControl();
- if (_locationId != BF_GLOBALS._mapLocationId) {
+ BF_GLOBALS._mapLocationId = _locationId;
+
+ if (BF_GLOBALS._driveToScene == 330) {
scene->_sceneNumber = 330;
} else {
- scene->_sceneNumber = (BF_GLOBALS._v4CEA2 != 1) || (BF_GLOBALS._bikiniHutState < 1) ||
- (BF_GLOBALS._bikiniHutState >= 2) ? 342 : 340;
+ scene->_sceneNumber = (BF_GLOBALS._dayNumber != 1) || (BF_GLOBALS._bookmark < bStartOfGame) ||
+ (BF_GLOBALS._bookmark >= bCalledToDomesticViolence) ? 342 : 340;
}
break;
case 410:
case 551:
- if (BF_GLOBALS.getFlag((BF_GLOBALS._v4CEF2 == 410) ? 41 : 40)) {
+ if (BF_GLOBALS.getFlag((BF_GLOBALS._driveFromScene == 410) ? fSearchedTruck : didDrunk)) {
BF_GLOBALS._mapLocationId = _locationId;
BF_GLOBALS._player.disableControl();
scene->_sceneNumber = _newSceneNumber;
@@ -298,7 +300,7 @@ void Scene50::Tooltip::highlight(bool btnDown) {
case 300:
if (_locationId == 1) {
- BF_GLOBALS._v4CEF4 = 300;
+ BF_GLOBALS._driveToScene = 300;
_newSceneNumber = 300;
}
// Deliberate fall through to default
@@ -354,7 +356,7 @@ void Scene50::postInit(SceneObjectList *OwnerList) {
_location5.set(Rect(383, 57, 402, 70), 380, CITY_HALL_JAIL, 32);
_location7.set(Rect(128, 32, 143, 42), 800, JAMISON_RYAN, 128);
_location9.set(Rect(349, 125, 359, 132),
- (BF_GLOBALS._bikiniHutState == 13) || (BF_GLOBALS._bikiniHutState == 14) ? 551 : 550,
+ (BF_GLOBALS._bookmark == bInspectionDone) || (BF_GLOBALS._bookmark == bCalledToDrunkStop) ? 551 : 550,
BIKINI_HUT, 16);
_item.setBounds(Rect(0, 0, SCREEN_WIDTH * 2, SCREEN_HEIGHT));
@@ -424,7 +426,7 @@ void Scene50::remove() {
void Scene50::signal() {
if (_sceneMode == 1) {
// Destination selected
- if ((BF_GLOBALS._v4CEF2 == 551) && (_sceneNumber != BF_GLOBALS._v4CEF2)) {
+ if ((BF_GLOBALS._driveFromScene == 551) && (_sceneNumber != BF_GLOBALS._driveFromScene)) {
BF_GLOBALS.setFlag(109);
BF_GLOBALS.setFlag(115);
BF_GLOBALS.setFlag(121);
@@ -432,20 +434,20 @@ void Scene50::signal() {
BF_GLOBALS.setFlag(133);
}
- if ((BF_GLOBALS._v4CEF2 == 410) && (_sceneNumber != BF_GLOBALS._v4CEF2)) {
+ if ((BF_GLOBALS._driveFromScene == 410) && (_sceneNumber != BF_GLOBALS._driveFromScene)) {
BF_GLOBALS.setFlag(125);
}
- if ((BF_GLOBALS._v4CEF2 == 340) && (_sceneNumber != BF_GLOBALS._v4CEF2)) {
+ if ((BF_GLOBALS._driveFromScene == 340) && (_sceneNumber != BF_GLOBALS._driveFromScene)) {
BF_GLOBALS.setFlag(123);
}
- if ((BF_GLOBALS._v4CEF2 == 380) && (_sceneNumber != BF_GLOBALS._v4CEF2)) {
- if (BF_GLOBALS._bikiniHutState >= 4)
+ if ((BF_GLOBALS._driveFromScene == 380) && (_sceneNumber != BF_GLOBALS._driveFromScene)) {
+ if (BF_GLOBALS._bookmark >= bLauraToParamedics)
BF_GLOBALS.setFlag(129);
- if (BF_GLOBALS._bikiniHutState >= 6)
+ if (BF_GLOBALS._bookmark >= bStoppedFrankie)
BF_GLOBALS.setFlag(131);
- if (BF_GLOBALS._bikiniHutState == 3) {
+ if (BF_GLOBALS._bookmark == bArrestedGreen) {
BF_GLOBALS._v4CEA8 = 19;
_sceneNumber = 666;
}
diff --git a/engines/tsage/blue_force/blueforce_scenes1.cpp b/engines/tsage/blue_force/blueforce_scenes1.cpp
index 650b63c24b..7cccb0d284 100644
--- a/engines/tsage/blue_force/blueforce_scenes1.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes1.cpp
@@ -176,7 +176,7 @@ void Scene100::postInit(SceneObjectList *OwnerList) {
_globals->_player.disableControl();
_index = 109;
- if (BF_GLOBALS._v4CEA2 < 6) {
+ if (BF_GLOBALS._dayNumber < 6) {
// Title
loadScene(100);
BF_GLOBALS._sound1.play(2);
@@ -191,7 +191,7 @@ void Scene100::postInit(SceneObjectList *OwnerList) {
void Scene100::signal() {
++_sceneMode;
- if (BF_GLOBALS._v4CEA2 < 6) {
+ if (BF_GLOBALS._dayNumber < 6) {
BF_GLOBALS._scenePalette.clearListeners();
BF_GLOBALS._scenePalette.loadPalette(100);
BF_GLOBALS._sceneManager.changeScene(_index);
diff --git a/engines/tsage/blue_force/blueforce_scenes3.cpp b/engines/tsage/blue_force/blueforce_scenes3.cpp
index e49037abf9..42c5c5dcde 100644
--- a/engines/tsage/blue_force/blueforce_scenes3.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes3.cpp
@@ -48,7 +48,7 @@ void Scene300::Object::startMover(CursorType action) {
void Scene300::Object17::startMover(CursorType action) {
if ((action != CURSOR_USE) || !BF_GLOBALS.getFlag(3)) {
NamedObject::startMover(action);
- } else if ((BF_GLOBALS._v4CEA2 != 2) || (BF_GLOBALS._bikiniHutState >= 12)) {
+ } else if ((BF_GLOBALS._dayNumber != 2) || (BF_GLOBALS._bookmark >= bEndDayOne)) {
Scene300 *scene = (Scene300 *)BF_GLOBALS._sceneManager._scene;
setAction(&scene->_action4);
} else {
@@ -249,10 +249,12 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
BF_GLOBALS._player._moveDiff = Common::Point(3, 1);
BF_GLOBALS._player.disableControl();
+ _object8.postInit();
+ _object8.setVisage(301);
_object8.setStrip(2);
_object8.setPosition(Common::Point(300, 77));
- if ((BF_GLOBALS._v4CEA2 != 2) || (BF_GLOBALS._bikiniHutState < 12)) {
+ if ((BF_GLOBALS._dayNumber != 2) || (BF_GLOBALS._bookmark < bEndDayOne)) {
_object17.postInit();
_object17.setVisage(301);
_object17.setStrip(1);
@@ -280,13 +282,14 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
//***DEBUG***
BF_GLOBALS.setFlag(2);
-BF_GLOBALS._sceneManager._previousScene = 190;
+BF_GLOBALS._sceneManager._previousScene = 315; // 190;
BF_GLOBALS._player.setVisage(190);
+BF_GLOBALS._player.setStrip(1);
switch (BF_GLOBALS._sceneManager._previousScene) {
case 50:
case 60:
- BF_GLOBALS.clearFlag(2);
+ BF_GLOBALS.clearFlag(onBike);
if (BF_GLOBALS.getFlag(3)) {
BF_GLOBALS._player.disableControl();
_sceneMode = 318;
@@ -304,7 +307,7 @@ BF_GLOBALS._player.setVisage(190);
BF_GLOBALS._player.setPosition(Common::Point(175, 50));
ADD_PLAYER_MOVER_THIS(BF_GLOBALS._player, 123, 71);
- if ((BF_GLOBALS._v4CEA2 == 2) && (BF_GLOBALS._bikiniHutState < 12))
+ if ((BF_GLOBALS._dayNumber == 2) && (BF_GLOBALS._bookmark < bEndDayOne))
setup();
} else if (!BF_GLOBALS.getFlag(3)) {
BF_GLOBALS._player.disableControl();
@@ -318,8 +321,8 @@ BF_GLOBALS._player.setVisage(190);
break;
case 315:
BF_GLOBALS._player.setPosition(Common::Point(305, 66));
- if ((BF_GLOBALS._v4CEA2 != 2) || (BF_GLOBALS._bikiniHutState >= 12)) {
- BF_GLOBALS._player.setVisage(BF_GLOBALS.getFlag(3) ? 1304 : 303);
+ if ((BF_GLOBALS._dayNumber != 2) || (BF_GLOBALS._bookmark >= bEndDayOne)) {
+ BF_GLOBALS._player.setVisage(BF_GLOBALS.getFlag(onDuty) ? 1304 : 303);
BF_GLOBALS._player.disableControl();
_sceneMode = 0;
setAction(&_sequenceManager1, this, 306, &BF_GLOBALS._player, &_object8, NULL);
@@ -344,10 +347,10 @@ void Scene300::signal() {
switch (_sceneMode) {
case 300:
BF_GLOBALS._sound1.fadeSound(33);
- BF_GLOBALS.clearFlag(2);
+ BF_GLOBALS.clearFlag(onBike);
_sceneMode = 0;
- if ((BF_GLOBALS._v4CEA2 != 1) || (BF_GLOBALS._bikiniHutState != 0)) {
+ if ((BF_GLOBALS._dayNumber != 1) || (BF_GLOBALS._bookmark != bNone)) {
signal();
} else {
_stripManager.start(3005, this);
@@ -373,7 +376,7 @@ void Scene300::signal() {
setAction(&_sequenceManager1, this, 303, &_object13, &_object1, NULL);
break;
case 305:
- if ((BF_GLOBALS._v4CEA2 == 4) || (BF_GLOBALS._v4CEA2 == 5)) {
+ if ((BF_GLOBALS._dayNumber == 4) || (BF_GLOBALS._dayNumber == 5)) {
_sceneMode = 0;
setAction(&_action3);
} else {
@@ -407,7 +410,7 @@ void Scene300::signal() {
BF_GLOBALS._sceneManager.changeScene(60);
break;
case 318:
- BF_GLOBALS.clearFlag(2);
+ BF_GLOBALS.clearFlag(onBike);
_sceneMode = 0;
signal();
break;
@@ -442,7 +445,7 @@ void Scene300::signal() {
_object13.setAction(&_sequenceManager2, NULL, 313, &_object13, &_object17, NULL);
_object14.setAction(&_sequenceManager3, this, 314, &_object14, &_object18, NULL);
- BF_GLOBALS._bikiniHutState = 12;
+ BF_GLOBALS._bookmark = bEndDayOne;
BF_GLOBALS._sound1.changeSound(33);
break;
case 2307:
@@ -504,6 +507,8 @@ void Scene300::signal() {
}
void Scene300::process(Event &event) {
+ SceneExt::process(event);
+
if ((BF_GLOBALS._player._field8E != 0) && !_eventHandler && (event.mousePos.y < (BF_INTERFACE_Y - 1))) {
Visage visage;
diff --git a/engines/tsage/blue_force/blueforce_ui.cpp b/engines/tsage/blue_force/blueforce_ui.cpp
index e27c744486..b455541dd4 100644
--- a/engines/tsage/blue_force/blueforce_ui.cpp
+++ b/engines/tsage/blue_force/blueforce_ui.cpp
@@ -83,13 +83,13 @@ void UIQuestion::setEnabled(bool flag) {
void UIScore::postInit(SceneObjectList *OwnerList) {
int xp = 266;
- _digit3.setup(1, 6, 1, 266, 180, 255);
+ _digit3.setup(1, 6, 1, xp, 180, 255);
xp += 7;
- _digit2.setup(1, 6, 1, 266, 180, 255);
+ _digit2.setup(1, 6, 1, xp, 180, 255);
xp += 7;
- _digit1.setup(1, 6, 1, 266, 180, 255);
+ _digit1.setup(1, 6, 1, xp, 180, 255);
xp += 7;
- _digit0.setup(1, 6, 1, 266, 180, 255);
+ _digit0.setup(1, 6, 1, xp, 180, 255);
}
void UIScore::draw() {
@@ -169,6 +169,11 @@ void UICollection::hide() {
_visible = false;
}
+void UICollection::show() {
+ _visible = true;
+ draw();
+}
+
void UICollection::erase() {
if (_clearScreen) {
Rect tempRect(0, BF_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT);
@@ -216,7 +221,7 @@ void UIElements::setup(const Common::Point &pt) {
_slotStart = 0;
_itemList.clear();
_scoreValue = 0;
- _field820 = 1;
+ _active = true;
UICollection::setup(pt);
hide();
@@ -224,6 +229,7 @@ void UIElements::setup(const Common::Point &pt) {
add(&_object1);
// Set up the inventory slots
+ int xp = 0;
for (int idx = 0; idx < 4; ++idx) {
UIElement *item = NULL;
switch (idx) {
@@ -241,14 +247,16 @@ void UIElements::setup(const Common::Point &pt) {
break;
}
- item->setup(9, 1, idx, idx * 63 + 2, 4, 255);
+ xp = idx * 63 + 2;
+ item->setup(9, 1, idx, xp, 4, 255);
add(item);
}
// Setup bottom-right hand buttons
- int xp = 62;
+ xp += 62;
_question.setup(1, 4, 7, xp, 16, 255);
_question.setEnabled(false);
+ add(&_question);
xp += 21;
_scrollLeft.setup(1, 4, 1, xp, 16, 255);
@@ -275,7 +283,7 @@ void UIElements::add(UIElement *obj) {
assert(_objList.size() < 12);
_objList.push_back(obj);
- obj->setPosition(Common::Point(_bounds.left + obj->_bounds.left, _bounds.top + obj->_bounds.top));
+ obj->setPosition(Common::Point(_bounds.left + obj->_position.x, _bounds.top + obj->_position.y));
GfxSurface s = obj->getFrame();
s.draw(obj->_position);
}
@@ -326,7 +334,7 @@ void UIElements::updateInventory() {
}
}
- if (_field820)
+ if (_active)
draw();
}
diff --git a/engines/tsage/blue_force/blueforce_ui.h b/engines/tsage/blue_force/blueforce_ui.h
index 15e7a760d9..809701f83e 100644
--- a/engines/tsage/blue_force/blueforce_ui.h
+++ b/engines/tsage/blue_force/blueforce_ui.h
@@ -102,6 +102,7 @@ public:
UICollection();
void setup(const Common::Point &pt);
void hide();
+ void show();
void resetClear();
void draw();
};
@@ -119,7 +120,7 @@ public:
UIInventoryScroll _scrollLeft, _scrollRight;
ASound _sound;
int _itemCount, _slotStart, _scoreValue;
- bool _field820;
+ bool _active;
Common::Array<int> _itemList;
virtual void postInit(SceneObjectList *OwnerList = NULL) { error("Wrong init() called"); }
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 3a489e0024..38fd668fac 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1786,6 +1786,8 @@ SceneObject::SceneObject() : SceneHotspot() {
_frameChange = 0;
_visage = 0;
+ _strip = 0;
+ _frame = 0;
}
SceneObject::SceneObject(const SceneObject &so) : SceneHotspot() {
@@ -2305,10 +2307,6 @@ void SceneObject::removeObject() {
_globals->_sceneItems.remove(this);
_globals->_sceneObjects->remove(this);
- if (_visage) {
- _visage = 0;
- }
-
if (_objectWrapper) {
_objectWrapper->remove();
_objectWrapper = NULL;
@@ -2710,8 +2708,8 @@ void SceneText::synchronize(Serializer &s) {
/*--------------------------------------------------------------------------*/
Visage::Visage() {
- _resNum = 0;
- _rlbNum = 0;
+ _resNum = -1;
+ _rlbNum = -1;
_data = NULL;
}
@@ -2738,7 +2736,27 @@ void Visage::setVisage(int resNum, int rlbNum) {
_resNum = resNum;
_rlbNum = rlbNum;
DEALLOCATE(_data);
- _data = _resourceManager->getResource(RES_VISAGE, resNum, rlbNum);
+
+ if (_vm->getGameID() == GType_Ringworld) {
+ // In Ringworld, we immediately get the data
+ _data = _resourceManager->getResource(RES_VISAGE, resNum, rlbNum);
+ } else {
+ // Blue Force has an extra indirection via a visage index file
+ byte *indexData = _resourceManager->getResource(RES_VISAGE, resNum, 9999);
+ if (rlbNum == 0)
+ rlbNum = 1;
+
+ // Get the flags/rlbNum to use
+ uint32 flags = READ_LE_UINT32(indexData + (rlbNum - 1) * 4 + 2);
+
+ if (flags & 0xC0000000) {
+ // TODO: See whether rest of flags dword is needed
+ rlbNum = (int)(flags & 0xff);
+ }
+
+ _data = _resourceManager->getResource(RES_VISAGE, resNum, rlbNum);
+ }
+
assert(_data);
}
}
@@ -2787,6 +2805,10 @@ void Player::disableControl() {
_canWalk = false;
_uiEnabled = false;
_globals->_events.setCursor(CURSOR_NONE);
+ _field8E = 0;
+
+ if ((_vm->getGameID() == GType_BlueForce) && BF_GLOBALS._uiElements._active)
+ BF_GLOBALS._uiElements.hide();
}
void Player::enableControl() {
@@ -2805,6 +2827,9 @@ void Player::enableControl() {
_globals->_events.setCursor(CURSOR_WALK);
break;
}
+
+ if ((_vm->getGameID() == GType_BlueForce) && BF_GLOBALS._uiElements._active)
+ BF_GLOBALS._uiElements.show();
}
void Player::process(Event &event) {
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 52bd42fc5c..f8b42ec604 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -186,18 +186,17 @@ namespace BlueForce {
BlueForceGlobals::BlueForceGlobals(): Globals() {
_interfaceY = 0;
_v51C44 = 1;
- _v4CEA2 = 0;
+ _dayNumber = 1;
_v4CEA4 = 0;
_v4CEA8 = 0;
- _v4CEF2 = 0;
- _v4CEF4 = 0;
+ _driveFromScene = 0;
+ _driveToScene = 0;
_v4CF9E = 0;
_v4E238 = 0;
_v501FC = 0;
_v51C42 = 0;
- _bikiniHutState = 0;
+ _bookmark = bNone;
_mapLocationId = 1;
- Common::set_to(_globalFlags, _globalFlags + 12, 0);
}
void BlueForceGlobals::synchronize(Serializer &s) {
@@ -205,14 +204,6 @@ void BlueForceGlobals::synchronize(Serializer &s) {
error("Sync variables");
}
-bool BlueForceGlobals::getFlag(int v) {
- return _globalFlags[v / 8] & (1 << (v % 8));
-}
-
-void BlueForceGlobals::setFlag(int v) {
- _globalFlags[v / 8] |= 1 << (v % 8);
-}
-
} // end of namespace BlueForce
} // end of namespace TsAGE
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index f5d4aaa16f..c5324c38cd 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -111,31 +111,78 @@ namespace BlueForce {
using namespace TsAGE;
+enum Bookmark {
+ bNone,
+ bStartOfGame, bCalledToDomesticViolence, bArrestedGreen, bLauraToParamedics,
+ bBookedGreen, bStoppedFrankie, bBookedFrankie, bBookedFrankieEvidence,
+ bEndOfWorkDayOne, bTalkedToGrannyAboutSkipsCard, bLyleStoppedBy, bEndDayOne,
+ bInspectionDone, bCalledToDrunkStop, bArrestedDrunk, bEndDayTwo,
+ bFlashBackOne, bFlashBackTwo, bFlashBackThree, bDroppedOffLyle, bEndDayThree,
+ bDoneWithIsland, bDoneAtLyles, bEndDayFour, bInvestigateBoat, bFinishedWGreen,
+ bAmbushed, bAmbushOver, bEndOfGame
+};
+
+enum Flag {
+ JAKE_FILE_COPIED, gunClean, onBike, onDuty, fShowedIdToKate, fLateToMarina,
+ fCalledBackup, fWithLyle, gunDrawn, fBackupArrived340, fBriefedBackup,
+ fGotAllSkip340, fToldToLeave340, fBackupIn350, fNetInBoat, fForbesWaiting,
+ fWithCarter, fTalkedToTony, fMugOnKate, takenWeasel, gotTrailer450,
+ showEugeneNapkin, showRapEugene, fMgrCallsWeasel, fCarterMetLyle,
+ fGunLoaded, fLoadedSpare, showEugeneID, fRandomShot350, examinedFile810,
+ shownLyleCrate1, shownLyleRapsheet, shownLyleDisk, shownLylePO,
+ fCanDrawGun, fGotAutoWeapon, fGotBulletsFromDash, fShotSuttersDesk,
+ greenTaken, fLateToDrunkStop, didDrunk, fSearchedTruck, seenFolder,
+ showMugAround, frankInJail, fTalkedCarterDay3, fDecryptedBluePrints,
+ fTalkedToDrunkInCar, fToldLyleOfSchedule, fTalkedShooterNoBkup,
+ fTalkedDriverNoBkup, fDriverOutOfTruck, readGreenRights, readFrankRights,
+ talkedToHarrisAboutDrunk, unlockBoat, fShootGoon, fBlowUpGoon,
+ fTalkedToBarry, fTalkedToLarry, fLeftTraceIn920, fLeftTraceIn900,
+ fBackupAt340, fShotNicoIn910, fGotPointsForTktBook, fGotPointsForMCard,
+ fShowedBluePrint, fGotPointsForPunch, fGotPointsForBox, fGotPointsForBank,
+ fGotPointsForCombo, fGotPointsForCoin, fGotPointsForCPU, fGotPointsForBoots,
+ fGotPointsForCrate, fGotPointsForBlackCord, fGotPointsForGeneratorPlug,
+ fGotPointsForFuseBoxPlug, fGotPointsForStartGenerator, fGotPointsForLightsOn,
+ fGotPointsForOpeningDoor, fGotPointsForClosingDoor, fGotPointsForLightsOff,
+ fGotPointsForGeneratorOff, fGotPointsForCordOnForklift, fGotPointsForCuffingNico,
+ fGotPointsForCuffingDA, fGotPointsForSearchingNico, fGotPointsForSearchingDA,
+ fLeftTraceIn910, fBookedGreenEvidence, fGotPointsForCleaningGun,
+ fGotPointsForMemo, fGotPointsForFBI, fTookTrailerAmmo, fAlertedGreen355,
+ fGotGreen355fTalkedToGrannyDay3, shownFax, beenToJRDay2, shownLyleCrate1Day1,
+ fLyleOnIsland, iWasAmbushed, fGangInCar, fArrivedAtGangStop, ticketVW,
+ f1015Marina, fCan1015Marina, f1015Frankie, fCan1015Frankie, f1015Drunk,
+ fCan1015Drunk, f1027Marina, fCan1027Marina, f1027Frankie, fCan1027Frankie,
+ f1027Drunk, fCan1027Drunk, f1035Marina, fCan1035Marina, f1035Frankie,
+ fCan1035Frankie, f1035Drunk, fCan1035Drunk, f1097Marina, fCan1097Marina,
+ f1097Frankie, fCan1097Frankie, f1097Drunk, fCan1097Drunk, f1098Marina,
+ fCan1098Marina, f1098Frankie, fCan1098Frankie, f1098Drunk, fCan1098Drunk,
+ fCuffedFrankie, fGotPointsForTrapDog, fGotPointsForUnlockGate,
+ fGotPointsForUnlockWarehouse, fGotPointsForLockWarehouse, fGotPointsForLockGate,
+ fGotPointsForFreeDog, fGotPointsForWhistleDog, fGivenNapkin, fCan1004Marina,
+ fCan1004Drunk, fHasLeftDrunk, fHasDrivenFromDrunk, fCrateOpen, fSawGuns,
+ hookPoints
+};
+
class BlueForceGlobals: public Globals {
public:
ASoundExt _sound1, _sound2, _sound3;
UIElements _uiElements;
- int _v4CEA2;
+ int _dayNumber;
int _v4CEA4;
int _v4CEA8;
- int _v4CEF2;
- int _v4CEF4;
+ int _driveFromScene;
+ int _driveToScene;
int _v4CF9E;
int _v4E238;
int _v501FC;
int _v51C42;
int _v51C44;
int _interfaceY;
- int _bikiniHutState;
+ Bookmark _bookmark;
int _mapLocationId;
- uint8 _globalFlags[12];
BlueForceGlobals();
virtual Common::String getClassName() { return "BFGlobals"; }
virtual void synchronize(Serializer &s);
-
- void setFlag(int v);
- bool getFlag(int v);
};
} // End of namespace BlueForce