diff options
author | Paul Gilbert | 2011-03-17 22:49:14 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-03-17 22:49:14 +1100 |
commit | 26e9cbccfe08d314f900292221f48fff53120daf (patch) | |
tree | 6b23a49a2418f7127dd6ec5b252869acf662592c /engines | |
parent | 3148f9264cf92fefcabecbd83505af39b8ec77dc (diff) | |
download | scummvm-rg350-26e9cbccfe08d314f900292221f48fff53120daf.tar.gz scummvm-rg350-26e9cbccfe08d314f900292221f48fff53120daf.tar.bz2 scummvm-rg350-26e9cbccfe08d314f900292221f48fff53120daf.zip |
TSAGE: Changed walk_regions debugger command to work in scrolling screens
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/debugger.cpp | 12 | ||||
-rw-r--r-- | engines/tsage/debugger.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp index ff3f6e3031..52a1a5f877 100644 --- a/engines/tsage/debugger.cpp +++ b/engines/tsage/debugger.cpp @@ -36,6 +36,7 @@ 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("item", WRAP_METHOD(Debugger, Cmd_Item)); } static int strToInt(const char *s) { @@ -93,7 +94,8 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) { LineSliceSet sliceSet = wr.getLineSlices(yp); for (uint idx = 0; idx < sliceSet.items.size(); ++idx) - destSurface.hLine(sliceSet.items[idx].xs, yp, sliceSet.items[idx].xe, colour); + destSurface.hLine(sliceSet.items[idx].xs - _globals->_sceneOffset.x, yp, + sliceSet.items[idx].xe - _globals->_sceneOffset.x, colour); } } @@ -106,4 +108,12 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) { return false; } +/** + * Give a specified item to the player + */ +bool Debugger::Cmd_Item(int argc, const char **argv) { + _globals->_inventory._infoDisk._sceneNumber = 1; + return true; +} + } // End of namespace tSage diff --git a/engines/tsage/debugger.h b/engines/tsage/debugger.h index 94f4babc62..ffd7c3263a 100644 --- a/engines/tsage/debugger.h +++ b/engines/tsage/debugger.h @@ -39,6 +39,7 @@ public: protected: bool Cmd_Scene(int argc, const char **argv); bool Cmd_WalkRegions(int argc, const char **argv); + bool Cmd_Item(int argc, const char **argv); }; } // End of namespace tSage |