diff options
author | Strangerke | 2013-12-02 07:20:53 +0100 |
---|---|---|
committer | Strangerke | 2013-12-02 07:21:27 +0100 |
commit | 001cf8ed509a93675b384fb406d21b05a7abef37 (patch) | |
tree | b1d9240a479bba82e39148a68c1a2658b569a166 /engines/tsage | |
parent | 627716ab1ae493316da5a36f3dddc8ca72959b39 (diff) | |
download | scummvm-rg350-001cf8ed509a93675b384fb406d21b05a7abef37.tar.gz scummvm-rg350-001cf8ed509a93675b384fb406d21b05a7abef37.tar.bz2 scummvm-rg350-001cf8ed509a93675b384fb406d21b05a7abef37.zip |
TSAGE: R2R - Move variable from scene 1337 to r2_globals, add command to debugger
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/debugger.cpp | 48 | ||||
-rw-r--r-- | engines/tsage/debugger.h | 2 | ||||
-rw-r--r-- | engines/tsage/globals.cpp | 4 | ||||
-rw-r--r-- | engines/tsage/globals.h | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 10 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.h | 1 |
6 files changed, 47 insertions, 19 deletions
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp index c7da5f5d30..e81e5cddb3 100644 --- a/engines/tsage/debugger.cpp +++ b/engines/tsage/debugger.cpp @@ -30,18 +30,19 @@ namespace TsAGE { Debugger::Debugger() : GUI::Debugger() { - DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); - DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_Scene)); - DCmd_Register("walk_regions", WRAP_METHOD(Debugger, Cmd_WalkRegions)); - DCmd_Register("priority_regions", WRAP_METHOD(Debugger, Cmd_PriorityRegions)); - DCmd_Register("scene_regions", WRAP_METHOD(Debugger, Cmd_SceneRegions)); - DCmd_Register("setflag", WRAP_METHOD(Debugger, Cmd_SetFlag)); - DCmd_Register("getflag", WRAP_METHOD(Debugger, Cmd_GetFlag)); - DCmd_Register("clearflag", WRAP_METHOD(Debugger, Cmd_ClearFlag)); - DCmd_Register("listobjects", WRAP_METHOD(Debugger, Cmd_ListObjects)); - DCmd_Register("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject)); - DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots)); - DCmd_Register("sound", WRAP_METHOD(Debugger, Cmd_Sound)); + DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); + DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_Scene)); + DCmd_Register("walk_regions", WRAP_METHOD(Debugger, Cmd_WalkRegions)); + DCmd_Register("priority_regions", WRAP_METHOD(Debugger, Cmd_PriorityRegions)); + DCmd_Register("scene_regions", WRAP_METHOD(Debugger, Cmd_SceneRegions)); + DCmd_Register("setflag", WRAP_METHOD(Debugger, Cmd_SetFlag)); + DCmd_Register("getflag", WRAP_METHOD(Debugger, Cmd_GetFlag)); + DCmd_Register("clearflag", WRAP_METHOD(Debugger, Cmd_ClearFlag)); + DCmd_Register("listobjects", WRAP_METHOD(Debugger, Cmd_ListObjects)); + DCmd_Register("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject)); + DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots)); + DCmd_Register("sound", WRAP_METHOD(Debugger, Cmd_Sound)); + DCmd_Register("setdebug", WRAP_METHOD(Debugger, Cmd_SetDebug)); } static int strToInt(const char *s) { @@ -340,6 +341,14 @@ bool Debugger::Cmd_Sound(int argc, const char **argv) { return false; } +/** + * Activate internal debugger, when available + */ +bool Debugger::Cmd_SetDebug(int argc, const char **argv) { + DebugPrintf("Not available in this game\n"); + return true; +} + /* * This command lists the objects available, and their ID */ @@ -707,4 +716,19 @@ bool Ringworld2Debugger::Cmd_MoveObject(int argc, const char **argv) { return true; } + +/** + * Activate internal debugger, when available + */ +bool Ringworld2Debugger::Cmd_SetDebug(int argc, const char **argv) { + if (argc != 1) { + DebugPrintf("Usage: %s\n", argv[0]); + return true; + } + + // Set the internal debugger flag(s?) to true + // _debugCardGame is reset by scene1337::subPostInit() + R2_GLOBALS._debugCardGame = true; + return true; +} } // End of namespace TsAGE diff --git a/engines/tsage/debugger.h b/engines/tsage/debugger.h index bf826a3f77..c9b7e75039 100644 --- a/engines/tsage/debugger.h +++ b/engines/tsage/debugger.h @@ -45,6 +45,7 @@ protected: bool Cmd_Sound(int argc, const char **argv); virtual bool Cmd_ListObjects(int argc, const char **argv) = 0; virtual bool Cmd_MoveObject(int argc, const char **argv) = 0; + virtual bool Cmd_SetDebug(int argc, const char **argv); }; class DemoDebugger : public Debugger { @@ -69,6 +70,7 @@ class Ringworld2Debugger : public Debugger { protected: virtual bool Cmd_ListObjects(int argc, const char **argv); virtual bool Cmd_MoveObject(int argc, const char **argv); + virtual bool Cmd_SetDebug(int argc, const char **argv); }; } // End of namespace TsAGE diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index 388f6f7686..0f271649b3 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -457,6 +457,8 @@ Ringworld2Globals::Ringworld2Globals() { _foodCount = 0; _rimLocation = 0; _rimTransportLocation = 0; + + _debugCardGame = false; } Ringworld2Globals::~Ringworld2Globals() { @@ -583,6 +585,8 @@ void Ringworld2Globals::reset() { _player._characterScene[R2_QUINN] = 100; _player._characterScene[R2_SEEKER] = 300; _player._characterScene[R2_MIRANDA] = 300; + + _debugCardGame = false; } void Ringworld2Globals::synchronize(Serializer &s) { diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 92c3d2e24b..f5543af345 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -292,6 +292,7 @@ public: byte _stripManager_lookupList[12]; byte _scene1550JunkLocations[508]; Common::Point _balloonPosition; + bool _debugCardGame; // moved from scene 1337 so it can be easily set in the debugger ScannerDialog *_scannerDialog; diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index 44bd864b02..d174d6fa4d 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -2247,7 +2247,6 @@ Scene1337::Scene1337() { _field4242 = 0; _field4244 = false; _field4246 = false; - _field4248 = 0; _field424A = 0; _instructionsDisplayedFl = 0; _instructionsWaitCount = 0; @@ -3398,7 +3397,7 @@ void Scene1337::Action4::signal() { scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.fixPriority(170); } - if ((scene->_field4248 == 1) || (scene->_currentPlayerNumb == 2)) + if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2)) scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]); scene->_animatedCard._card.hide(); @@ -3433,7 +3432,7 @@ void Scene1337::Action4::signal() { scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.fixPriority(170); } - if ((scene->_field4248 == 1) || (scene->_currentPlayerNumb == 2)) + if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2)) scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]); scene->_animatedCard._card.hide(); @@ -3468,7 +3467,7 @@ void Scene1337::Action4::signal() { scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.fixPriority(170); } - if ((scene->_field4248 == 1) || (scene->_currentPlayerNumb == 2)) + if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2)) scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]); scene->_animatedCard._card.hide(); @@ -3503,7 +3502,7 @@ void Scene1337::Action4::signal() { scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.fixPriority(170); } - if ((scene->_field4248 == 1) || (scene->_currentPlayerNumb == 2)) + if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2)) scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]); scene->_animatedCard._card.hide(); @@ -5529,7 +5528,6 @@ void Scene1337::subPostInit() { _field4244 = true; _field4246 = false; - _field4248 = 0; _field424A = -1; _background1.setup2(9531, 1, 1, 249, 168, 155, 0); diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h index 0d4cf5986d..45ed746bac 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.h +++ b/engines/tsage/ringworld2/ringworld2_scenes1.h @@ -312,7 +312,6 @@ public: int _field4242; bool _field4244; bool _field4246; - int _field4248; int _field424A; int _instructionsDisplayedFl; int _instructionsWaitCount; |