mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
M4: Added console command to set boonsville time for triggering events
This commit is contained in:
parent
41d87f2178
commit
f36f388791
@ -29,6 +29,7 @@ namespace Burger {
|
||||
Console::Console() : M4::Console() {
|
||||
registerCmd("global", WRAP_METHOD(Console, cmdGlobal));
|
||||
registerCmd("test", WRAP_METHOD(Console, cmdTest));
|
||||
registerCmd("time", WRAP_METHOD(Console, cmdTime));
|
||||
}
|
||||
|
||||
bool Console::cmdGlobal(int argc, const char **argv) {
|
||||
@ -58,5 +59,17 @@ bool Console::cmdTest(int argc, const char **argv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::cmdTime(int argc, const char **argv) {
|
||||
if (argc == 2) {
|
||||
int newTime = atol(argv[1]);
|
||||
_G(flags).set_boonsville_time(newTime - 1);
|
||||
return false;
|
||||
|
||||
} else {
|
||||
debugPrintf("Current time is %d\n", _G(flags)[kBoonsvilleTime]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Burger
|
||||
} // End of namespace M4
|
||||
|
@ -32,6 +32,7 @@ class Console : public M4::Console {
|
||||
private:
|
||||
bool cmdTest(int argc, const char **argv);
|
||||
bool cmdGlobal(int argc, const char **argv);
|
||||
bool cmdTime(int argc, const char **argv);
|
||||
|
||||
public:
|
||||
Console();
|
||||
|
Loading…
x
Reference in New Issue
Block a user