pushes a record's data onto the Lua stack
| 1228 | |
| 1229 | // pushes a record's data onto the Lua stack |
| 1230 | void 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 |
| 1250 | void LuaSaveData::SaveRecordPartial(struct lua_State* L, unsigned int key, int idx) |
no test coverage detected