Changeset View
Changeset View
Standalone View
Standalone View
source/ps/scripting/JSInterface_Main.cpp
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
std::wstring JSI_Main::GetMatchID(ScriptInterface::CmptPrivate* UNUSED(pCmptPrivate)) | std::wstring JSI_Main::GetMatchID(ScriptInterface::CmptPrivate* UNUSED(pCmptPrivate)) | ||||
{ | { | ||||
return ps_generate_guid().FromUTF8(); | return ps_generate_guid().FromUTF8(); | ||||
} | } | ||||
JS::Value JSI_Main::LoadMapSettings(ScriptInterface::CmptPrivate* pCmptPrivate, const VfsPath& pathname) | JS::Value JSI_Main::LoadMapSettings(ScriptInterface::CmptPrivate* pCmptPrivate, const VfsPath& pathname) | ||||
{ | { | ||||
ScriptInterface::Request rq(pCmptPrivate); | ScriptRequest rq(pCmptPrivate->pScriptInterface); | ||||
CMapSummaryReader reader; | CMapSummaryReader reader; | ||||
if (reader.LoadMap(pathname) != PSRETURN_OK) | if (reader.LoadMap(pathname) != PSRETURN_OK) | ||||
return JS::UndefinedValue(); | return JS::UndefinedValue(); | ||||
JS::RootedValue settings(rq.cx); | JS::RootedValue settings(rq.cx); | ||||
reader.GetMapSettings(*(pCmptPrivate->pScriptInterface), &settings); | reader.GetMapSettings(*(pCmptPrivate->pScriptInterface), &settings); | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator