Changeset View
Changeset View
Standalone View
Standalone View
source/ps/scripting/JSInterface_Game.cpp
Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | |||||
void RewindTimeWarp() | void RewindTimeWarp() | ||||
{ | { | ||||
g_Game->GetTurnManager()->RewindTimeWarp(); | g_Game->GetTurnManager()->RewindTimeWarp(); | ||||
} | } | ||||
void DumpTerrainMipmap() | void DumpTerrainMipmap() | ||||
{ | { | ||||
VfsPath filename(L"screenshots/terrainmipmap.png"); | VfsPath filename(L"screenshots/terrainmipmap.png"); | ||||
g_Game->GetWorld()->GetTerrain()->GetHeightMipmap().DumpToDisk(filename); | g_Game->GetWorld()->GetTerrain().GetHeightMipmap().DumpToDisk(filename); | ||||
OsPath realPath; | OsPath realPath; | ||||
g_VFS->GetRealPath(filename, realPath); | g_VFS->GetRealPath(filename, realPath); | ||||
LOGMESSAGERENDER("Terrain mipmap written to '%s'", realPath.string8()); | LOGMESSAGERENDER("Terrain mipmap written to '%s'", realPath.string8()); | ||||
} | } | ||||
void RegisterScriptFunctions(const ScriptRequest& rq) | void RegisterScriptFunctions(const ScriptRequest& rq) | ||||
{ | { | ||||
ScriptFunction::Register<&IsGameStarted>(rq, "IsGameStarted"); | ScriptFunction::Register<&IsGameStarted>(rq, "IsGameStarted"); | ||||
Show All 17 Lines |
Wildfire Games · Phabricator