diff options
author | Strangerke | 2013-11-26 07:59:12 +0100 |
---|---|---|
committer | Strangerke | 2013-11-26 08:18:45 +0100 |
commit | c211cede06224a2d7fab1f94ce94f723a3022ebb (patch) | |
tree | d422c44b0539c39498b434562d16c0bbc496fc0c /engines/tsage | |
parent | af510118e89406683eba1acaba19c56dd4d5437d (diff) | |
download | scummvm-rg350-c211cede06224a2d7fab1f94ce94f723a3022ebb.tar.gz scummvm-rg350-c211cede06224a2d7fab1f94ce94f723a3022ebb.tar.bz2 scummvm-rg350-c211cede06224a2d7fab1f94ce94f723a3022ebb.zip |
TSAGE: BF - Remove some useless variables, some renaming
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.cpp | 11 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.h | 14 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes3.cpp | 16 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes7.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/core.cpp | 6 | ||||
-rw-r--r-- | engines/tsage/saveload.h | 2 |
6 files changed, 27 insertions, 24 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index b8af8dd808..be5fb4c7b7 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -648,8 +648,6 @@ void FocusObject::postInit(SceneObjectList *OwnerList) { _lookLineNum = 43; _talkLineNum = 44; _useLineNum = -1; - _v90 = 0; - _v92 = 1; SceneExt *scene = (SceneExt *)BF_GLOBALS._sceneManager._scene; scene->_focusObject = this; @@ -658,8 +656,11 @@ void FocusObject::postInit(SceneObjectList *OwnerList) { void FocusObject::synchronize(Serializer &s) { NamedObject::synchronize(s); - s.syncAsSint16LE(_v90); - s.syncAsSint16LE(_v92); + if (s.getVersion() < 12) { + int useless = 0; + s.syncAsSint16LE(useless); + s.syncAsSint16LE(useless); + } } void FocusObject::remove() { @@ -765,8 +766,6 @@ void SceneExt::dispatch() { void SceneExt::loadScene(int sceneNum) { Scene::loadScene(sceneNum); - _v51C34.top = 0; - _v51C34.bottom = 300; BF_GLOBALS._sceneHandler->_delayTicks = 1; } diff --git a/engines/tsage/blue_force/blueforce_logic.h b/engines/tsage/blue_force/blueforce_logic.h index d7ea4e2546..c6c6dc6315 100644 --- a/engines/tsage/blue_force/blueforce_logic.h +++ b/engines/tsage/blue_force/blueforce_logic.h @@ -139,14 +139,17 @@ public: class NamedObject2: public NamedObject { public: - int _v1, _v2; + int _talkCount; - NamedObject2() { _v1 = _v2 = 0; } + NamedObject2() { _talkCount = 0; } virtual Common::String getClassName() { return "NamedObject2"; } virtual void synchronize(Serializer &s) { NamedObject::synchronize(s); - s.syncAsSint16LE(_v1); - s.syncAsSint16LE(_v2); + if (s.getVersion() < 11) { + int useless = 0; + s.syncAsSint16LE(useless); + } + s.syncAsSint16LE(_talkCount); } }; @@ -177,7 +180,6 @@ public: class FocusObject: public NamedObject { public: - int _v90, _v92; GfxSurface _img; FocusObject(); @@ -202,8 +204,6 @@ public: EventHandler *_focusObject; Visage _cursorVisage; - - Rect _v51C34; public: SceneExt(); diff --git a/engines/tsage/blue_force/blueforce_scenes3.cpp b/engines/tsage/blue_force/blueforce_scenes3.cpp index a5cc17a3df..49c3013ad5 100644 --- a/engines/tsage/blue_force/blueforce_scenes3.cpp +++ b/engines/tsage/blue_force/blueforce_scenes3.cpp @@ -4651,10 +4651,10 @@ bool Scene370::Green::startAction(CursorType action, Event &event) { switch (action) { case CURSOR_LOOK: - SceneItem::display2(370, (_v2 < 3) ? 10 : 0); + SceneItem::display2(370, (_talkCount < 3) ? 10 : 0); return true; case CURSOR_USE: - if (_v2 != 3) + if (_talkCount != 3) SceneItem::display2(370, 1); else if (BF_INVENTORY.getObjectScene(INV_HANDCUFFS) == 1) SceneItem::display2(370, 26); @@ -4670,14 +4670,14 @@ bool Scene370::Green::startAction(CursorType action, Event &event) { return true; case CURSOR_TALK: BF_GLOBALS._player.disableControl(); - switch (_v2) { + switch (_talkCount) { case 0: - ++_v2; + ++_talkCount; scene->_sceneMode = 3706; scene->setAction(&scene->_sequenceManager, scene, 3706, NULL); break; case 1: - ++_v2; + ++_talkCount; scene->_sceneMode = 3707; scene->_object5.postInit(); @@ -4689,7 +4689,7 @@ bool Scene370::Green::startAction(CursorType action, Event &event) { scene->setAction(&scene->_sequenceManager, scene, 3707, &scene->_harrison, &scene->_object5, NULL); break; case 2: - ++_v2; + ++_talkCount; scene->_sceneMode = 3708; scene->setAction(&scene->_sequenceManager, scene, 3708, this, &scene->_laura, &scene->_harrison, &scene->_object5, &scene->_greensGun, NULL); @@ -4715,7 +4715,7 @@ bool Scene370::Green::startAction(CursorType action, Event &event) { } return true; case INV_HANDCUFFS: - if (_v2 != 3) + if (_talkCount != 3) SceneItem::display2(370, 2); else { T2_GLOBALS._uiElements.addScore(50); @@ -4752,7 +4752,7 @@ bool Scene370::Harrison::startAction(CursorType action, Event &event) { SceneItem::display2(370, 8); return true; case CURSOR_TALK: - if (scene->_green._v2 != 3) { + if (scene->_green._talkCount != 3) { scene->_sceneMode = 3; scene->_stripManager.start(3714, scene); } else if ((BF_INVENTORY.getObjectScene(INV_GREENS_KNIFE) == 1) || diff --git a/engines/tsage/blue_force/blueforce_scenes7.cpp b/engines/tsage/blue_force/blueforce_scenes7.cpp index 4cdd2f3f15..2f52c4df95 100644 --- a/engines/tsage/blue_force/blueforce_scenes7.cpp +++ b/engines/tsage/blue_force/blueforce_scenes7.cpp @@ -148,7 +148,7 @@ void Scene710::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._sound1.fadeSound(14); _soundExt1.fadeSound(48); - _v51C34.set(40, 0, 280, 240); + BF_GLOBALS._player.postInit(); BF_GLOBALS._player.hide(); BF_GLOBALS._player._moveDiff = Common::Point(4, 2); diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 6c47cac1ef..88f2c85ffd 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1545,7 +1545,11 @@ void ScenePalette::synchronize(Serializer &s) { s.syncAsSint32LE(_colors.foreground); s.syncAsSint32LE(_colors.background); - s.syncAsSint32LE(_field412); + if (s.getVersion() < 12) { + int useless = 0; + s.syncAsSint16LE(useless); + } + s.syncAsByte(_redColor); s.syncAsByte(_greenColor); s.syncAsByte(_blueColor); diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h index 0d0457981f..32da6ee7f4 100644 --- a/engines/tsage/saveload.h +++ b/engines/tsage/saveload.h @@ -33,7 +33,7 @@ namespace TsAGE { typedef void (*SaveNotifierFn)(bool postFlag); -#define TSAGE_SAVEGAME_VERSION 11 +#define TSAGE_SAVEGAME_VERSION 12 class SavedObject; |