MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Load

Method Load

src/script/script_instance.cpp:732–747  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

730}
731
732/* static */ ScriptInstance::ScriptData *ScriptInstance::Load(int version)
733{
734 if (version == -1) {
735 LoadEmpty();
736 return nullptr;
737 }
738
739 SlObject(nullptr, _script_byte);
740 /* Check if there was anything saved at all. */
741 if (_script_sl_byte == 0) return nullptr;
742
743 ScriptData *data = new ScriptData();
744 data->push_back((SQInteger)version);
745 LoadObjects(data);
746 return data;
747}
748
749void ScriptInstance::LoadOnStack(ScriptData *data)
750{

Callers

nothing calls this directly

Calls 2

SlObjectFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected