Add fast-forward/rewind commands, to help with testing.

This was SVN commit r8803.
This commit is contained in:
Ykkrosh
2010-12-06 19:58:06 +00:00
parent c2f4f56ad6
commit 8ddef2fee0
8 changed files with 128 additions and 27 deletions
+12
View File
@@ -386,6 +386,16 @@ void DumpSimState(void* UNUSED(cbdata))
g_Game->GetSimulation2()->DumpDebugState(file);
}
void EnableTimeWarpRecording(void* UNUSED(cbdata), unsigned int numTurns)
{
g_Game->GetTurnManager()->EnableTimeWarpRecording(numTurns);
}
void RewindTimeWarp(void* UNUSED(cbdata))
{
g_Game->GetTurnManager()->RewindTimeWarp();
}
} // namespace
void GuiScriptingInit(ScriptInterface& scriptInterface)
@@ -438,4 +448,6 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
scriptInterface.RegisterFunction<void, &DebugWarn>("DebugWarn");
scriptInterface.RegisterFunction<void, &ForceGC>("ForceGC");
scriptInterface.RegisterFunction<void, &DumpSimState>("DumpSimState");
scriptInterface.RegisterFunction<void, unsigned int, &EnableTimeWarpRecording>("EnableTimeWarpRecording");
scriptInterface.RegisterFunction<void, &RewindTimeWarp>("RewindTimeWarp");
}