diff options
author | Paul Gilbert | 2011-12-11 17:46:58 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-12-11 17:46:58 +1100 |
commit | 518d4cd429924f145626401c194f42fd76783c03 (patch) | |
tree | 5c70f00195fdd25dfbdab5e264ba1dc32b53c9d3 /engines | |
parent | d315521c67df814e88c28cbb2914f1b075349fa0 (diff) | |
download | scummvm-rg350-518d4cd429924f145626401c194f42fd76783c03.tar.gz scummvm-rg350-518d4cd429924f145626401c194f42fd76783c03.tar.bz2 scummvm-rg350-518d4cd429924f145626401c194f42fd76783c03.zip |
TSAGE: Changed the Player characterIndex int field to be a proper enum
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/core.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/core.h | 3 | ||||
-rw-r--r-- | engines/tsage/globals.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_dialogs.cpp | 6 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.cpp | 6 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes2.cpp | 2 |
6 files changed, 12 insertions, 9 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 88121c4d16..9d7c8abf0a 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -2989,7 +2989,7 @@ Player::Player(): SceneObject() { _field8C = 0; // Return to Ringworld specific fields - _characterIndex = 0; + _characterIndex = R2_NONE; for (int i = 0; i < MAX_CHARACTERS; ++i) { _characterScene[i] = 0; diff --git a/engines/tsage/core.h b/engines/tsage/core.h index d55352319f..cbd3d9f77c 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -621,6 +621,7 @@ public: }; #define MAX_CHARACTERS 4 +enum R2RCharacter { R2_NONE = 0, R2_QUINN = 1, R2_SEEKER = 2, R2_MIRANDA = 3 }; class Player : public SceneObject { public: @@ -630,7 +631,7 @@ public: bool _enabled; // Return to Ringworld specific fields - int _characterIndex; + R2RCharacter _characterIndex; int _characterScene[MAX_CHARACTERS]; int _oldCharacterScene[MAX_CHARACTERS]; Common::Point _characterPos[MAX_CHARACTERS]; diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index 7f6f71ceae..9f137f4b92 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -400,7 +400,7 @@ void Ringworld2Globals::reset() { _stripManager_lookupList[11] = 1; // Reset fields stored in the player class - _player._characterIndex = 1; + _player._characterIndex = R2_QUINN; _player._characterScene[1] = 100; _player._characterScene[2] = 300; _player._characterScene[3] = 300; diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp index 54a15f3d98..ddb4eae9c4 100644 --- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp +++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp @@ -218,11 +218,11 @@ void CharacterDialog::show() { // Figure out the new selected character if (btn == &dlg->_btnQuinn) - R2_GLOBALS._player._characterIndex = 1; + R2_GLOBALS._player._characterIndex = R2_QUINN; else if (btn == &dlg->_btnSeeker) - R2_GLOBALS._player._characterIndex = 2; + R2_GLOBALS._player._characterIndex = R2_SEEKER; else if (btn == &dlg->_btnMiranda) - R2_GLOBALS._player._characterIndex = 3; + R2_GLOBALS._player._characterIndex = R2_MIRANDA; // Remove the dialog dlg->remove(); diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index 5ca178596f..88dfe11298 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -1539,6 +1539,8 @@ bool Scene300::Miranda::startAction(CursorType action, Event &event) { scene->_field412 = 211; else scene->_field412 = 438; + + scene->_stripManager.start3(scene->_field412, scene, R2_GLOBALS._stripManager_lookupList); } return true; @@ -1594,7 +1596,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene == -1) { R2_GLOBALS._sceneManager._previousScene = 1000; - R2_GLOBALS._player._characterIndex = 1; + R2_GLOBALS._player._characterIndex = R2_QUINN; } _stripManager.setColors(60, 255); @@ -2002,7 +2004,7 @@ void Scene300::signal() { break; case 20: - R2_GLOBALS._player._characterIndex = 1; + R2_GLOBALS._player._characterIndex = R2_QUINN; R2_GLOBALS._sceneManager.changeScene(1500); break; diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp index c83d605d45..4d8f7aa9d8 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp @@ -1393,7 +1393,7 @@ void Scene2425::postInit(SceneObjectList *OwnerList) { loadScene(2425); SceneExt::postInit(); if (R2_GLOBALS._sceneManager._previousScene == -1) { - R2_GLOBALS._player._characterIndex = 2; + R2_GLOBALS._player._characterIndex = R2_SEEKER; R2_GLOBALS._sceneManager._previousScene = 2000; } |