Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/MapReader.cpp
Show First 20 Lines • Show All 366 Lines • ▼ Show 20 Lines | PSRETURN CMapSummaryReader::LoadMap(const VfsPath& pathname) | ||||
return PSRETURN_OK; | return PSRETURN_OK; | ||||
} | } | ||||
void CMapSummaryReader::GetMapSettings(const ScriptInterface& scriptInterface, JS::MutableHandleValue ret) | void CMapSummaryReader::GetMapSettings(const ScriptInterface& scriptInterface, JS::MutableHandleValue ret) | ||||
{ | { | ||||
JSContext* cx = scriptInterface.GetContext(); | JSContext* cx = scriptInterface.GetContext(); | ||||
JSAutoRequest rq(cx); | JSAutoRequest rq(cx); | ||||
scriptInterface.CreateObject(ret); | ScriptInterface::CreateObject(cx, ret); | ||||
if (m_ScriptSettings.empty()) | if (m_ScriptSettings.empty()) | ||||
return; | return; | ||||
JS::RootedValue scriptSettingsVal(cx); | JS::RootedValue scriptSettingsVal(cx); | ||||
scriptInterface.ParseJSON(m_ScriptSettings, &scriptSettingsVal); | scriptInterface.ParseJSON(m_ScriptSettings, &scriptSettingsVal); | ||||
scriptInterface.SetProperty(ret, "settings", scriptSettingsVal, false); | scriptInterface.SetProperty(ret, "settings", scriptSettingsVal, false); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,177 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator