aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/debugger.cpp
diff options
context:
space:
mode:
authorThanasis Antoniou2019-05-25 18:21:03 +0300
committerThanasis Antoniou2019-05-26 17:17:05 +0300
commit93768c33073129237109a056d219623ae9f6d712 (patch)
tree1a1f21ae5243663a9a81b331459f1a874b1632e7 /engines/bladerunner/debugger.cpp
parent4dda6324b83a1fcd7c0dd67053dd62d9883e9ba0 (diff)
downloadscummvm-rg350-93768c33073129237109a056d219623ae9f6d712.tar.gz
scummvm-rg350-93768c33073129237109a056d219623ae9f6d712.tar.bz2
scummvm-rg350-93768c33073129237109a056d219623ae9f6d712.zip
BLADERUNNER: Item spin command in Debugger
Diffstat (limited to 'engines/bladerunner/debugger.cpp')
-rw-r--r--engines/bladerunner/debugger.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index b19dd54d99..9cfb5d7eb1 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -38,6 +38,7 @@
#include "bladerunner/scene.h"
#include "bladerunner/scene_objects.h"
#include "bladerunner/items.h"
+#include "bladerunner/item_pickup.h"
#include "bladerunner/screen_effects.h"
#include "bladerunner/settings.h"
#include "bladerunner/set.h"
@@ -1601,6 +1602,15 @@ bool Debugger::cmdItem(int argc, const char **argv) {
debugPrintf("No item was found with the specified id: %d in the scene\n", itemId);
return true;
}
+ } else if (modeName == "spin" && argc == 3) {
+ int itemAnimationId = atoi(argv[2]);
+ if (itemAnimationId >=0 && itemAnimationId <= 996) {
+ _vm->_itemPickup->setup(itemAnimationId, 320, 240);
+ return false; // close the debugger
+ } else {
+ debugPrintf("Valid value range for item animation Ids is [0, 996]\n");
+ return true;
+ }
} else {
invalidSyntax = true;
}
@@ -1617,6 +1627,7 @@ bool Debugger::cmdItem(int argc, const char **argv) {
debugPrintf("Usage 3: %s flags <id> <isVisible> <isTarget>\n", argv[0]);
debugPrintf("Usage 4: %s bounds <id> <posX> <posY> <posZ> <facing> <height> <width>\n", argv[0]);
debugPrintf("Usage 5: %s remove <id>\n", argv[0]);
+ debugPrintf("Usage 6: %s spin <animationId>\n", argv[0]);
}
return true;
}