MCPcopy Create free account
hub / github.com/diasurgical/devilution / SaveObject

Function SaveObject

Source/loadsave.cpp:1336–1373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1334}
1335
1336void SaveObject(int i)
1337{
1338 ObjectStruct *pObject = &object[i];
1339
1340 CopyInt(&pObject->_otype, tbuff);
1341 CopyInt(&pObject->_ox, tbuff);
1342 CopyInt(&pObject->_oy, tbuff);
1343 CopyInt(&pObject->_oLight, tbuff);
1344 CopyInt(&pObject->_oAnimFlag, tbuff);
1345 tbuff += 4; // Skip pointer _oAnimData
1346 CopyInt(&pObject->_oAnimDelay, tbuff);
1347 CopyInt(&pObject->_oAnimCnt, tbuff);
1348 CopyInt(&pObject->_oAnimLen, tbuff);
1349 CopyInt(&pObject->_oAnimFrame, tbuff);
1350 CopyInt(&pObject->_oAnimWidth, tbuff);
1351 CopyInt(&pObject->_oAnimWidth2, tbuff);
1352 CopyInt(&pObject->_oDelFlag, tbuff);
1353 CopyChar(&pObject->_oBreak, tbuff);
1354 tbuff += 3; // Alignment
1355 CopyInt(&pObject->_oSolidFlag, tbuff);
1356 CopyInt(&pObject->_oMissFlag, tbuff);
1357
1358 CopyChar(&pObject->_oSelFlag, tbuff);
1359 tbuff += 3; // Alignment
1360 CopyInt(&pObject->_oPreFlag, tbuff);
1361 CopyInt(&pObject->_oTrapFlag, tbuff);
1362 CopyInt(&pObject->_oDoorFlag, tbuff);
1363 CopyInt(&pObject->_olid, tbuff);
1364 CopyInt(&pObject->_oRndSeed, tbuff);
1365 CopyInt(&pObject->_oVar1, tbuff);
1366 CopyInt(&pObject->_oVar2, tbuff);
1367 CopyInt(&pObject->_oVar3, tbuff);
1368 CopyInt(&pObject->_oVar4, tbuff);
1369 CopyInt(&pObject->_oVar5, tbuff);
1370 CopyInt(&pObject->_oVar6, tbuff);
1371 CopyInt(&pObject->_oVar7, tbuff);
1372 CopyInt(&pObject->_oVar8, tbuff);
1373}
1374
1375void SaveItem(ItemStruct *pItem)
1376{

Callers 2

SaveGameFunction · 0.85
SaveLevelFunction · 0.85

Calls 2

CopyIntFunction · 0.85
CopyCharFunction · 0.85

Tested by

no test coverage detected