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

Function BinaryToLuaStack

src/lua-engine.cpp:1186–1199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1184}
1185
1186void BinaryToLuaStack(lua_State* L, const unsigned char* data, unsigned int size, unsigned int itemsToLoad)
1187{
1188 unsigned char major = *data++;
1189 unsigned char minor = *data++;
1190 size -= 2;
1191 if(luaBinaryMajorVersion != major || luaBinaryMinorVersion != minor)
1192 return;
1193
1194 while(size > 0 && itemsToLoad > 0)
1195 {
1196 BinaryToLuaStackConverter(L, data, size);
1197 itemsToLoad--;
1198 }
1199}
1200
1201// saves Lua stack into a record and pops it
1202void LuaSaveData::SaveRecord(lua_State* L, unsigned int key)

Callers 1

LoadRecordMethod · 0.85

Calls 1

Tested by

no test coverage detected