Added a debug subcommand to enable a hotspot's position to be changed
svn-id: r36095
This commit is contained in:
parent
f9d0d2a44a
commit
6ef26264f4
1 changed files with 9 additions and 1 deletions
|
@ -291,7 +291,7 @@ bool Debugger::cmd_hotspot(int argc, const char **argv) {
|
|||
Hotspot *h;
|
||||
|
||||
if (argc < 2) {
|
||||
DebugPrintf("hotspot <hotspot_id> ['paths' | 'schedule' | 'actions' | 'activate' | 'deactivate']\n");
|
||||
DebugPrintf("hotspot <hotspot_id> ['paths' | 'schedule' | 'actions' | 'activate' | 'deactivate' | 'setpos']\n");
|
||||
return true;
|
||||
}
|
||||
hs = res.getHotspot(strToInt(argv[1]));
|
||||
|
@ -372,6 +372,14 @@ bool Debugger::cmd_hotspot(int argc, const char **argv) {
|
|||
pData.upFrame, pData.downFrame, pData.leftFrame, pData.rightFrame);
|
||||
DebugPrintf("Current frame = %d of %d\n", h->frameNumber(), h->numFrames());
|
||||
}
|
||||
else if (strcmp(argv[2], "setpos") == 0) {
|
||||
// Set the hotspot position
|
||||
if (argc >= 5)
|
||||
h->setPosition(strToInt(argv[3]), strToInt(argv[4]));
|
||||
if (argc >= 6)
|
||||
h->setRoomNumber(strToInt(argv[5]));
|
||||
DebugPrintf("Done.\n");
|
||||
}
|
||||
}
|
||||
|
||||
DebugPrintf("\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue