MCPcopy Create free account
hub / github.com/TASEmulators/fceux / LoadRecord

Method LoadRecord

src/lua-engine.cpp:1230–1247  ·  view source on GitHub ↗

pushes a record's data onto the Lua stack

Source from the content-addressed store, hash-verified

1228
1229// pushes a record's data onto the Lua stack
1230void LuaSaveData::LoadRecord(struct lua_State* L, unsigned int key, unsigned int itemsToLoad) const
1231{
1232 if(!L)
1233 return;
1234
1235 Record* cur = recordList;
1236 while(cur)
1237 {
1238 if(cur->key == key)
1239 {
1240// s_dbg_dataStart = cur->data;
1241// s_dbg_dataSize = cur->size;
1242 BinaryToLuaStack(L, cur->data, cur->size, itemsToLoad);
1243 return;
1244 }
1245 cur = cur->next;
1246 }
1247}
1248
1249// saves part of the Lua stack (at the given index) into a record and does NOT pop anything
1250void LuaSaveData::SaveRecordPartial(struct lua_State* L, unsigned int key, int idx)

Callers 2

savestate_loadscriptdataFunction · 0.80

Calls 1

BinaryToLuaStackFunction · 0.85

Tested by

no test coverage detected