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

Function SaveMonster

Source/loadsave.cpp:1193–1283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1191}
1192
1193void SaveMonster(int i)
1194{
1195 MonsterStruct *pMonster = &monster[i];
1196
1197 CopyInt(&pMonster->_mMTidx, tbuff);
1198 CopyInt(&pMonster->_mmode, tbuff);
1199 CopyChar(&pMonster->_mgoal, tbuff);
1200 tbuff += 3; // Alignment
1201 CopyInt(&pMonster->_mgoalvar1, tbuff);
1202 CopyInt(&pMonster->_mgoalvar2, tbuff);
1203 CopyInt(&pMonster->_mgoalvar3, tbuff);
1204 CopyInt(&pMonster->field_18, tbuff);
1205 CopyChar(&pMonster->_pathcount, tbuff);
1206 tbuff += 3; // Alignment
1207 CopyInt(&pMonster->_mx, tbuff);
1208 CopyInt(&pMonster->_my, tbuff);
1209 CopyInt(&pMonster->_mfutx, tbuff);
1210 CopyInt(&pMonster->_mfuty, tbuff);
1211 CopyInt(&pMonster->_moldx, tbuff);
1212 CopyInt(&pMonster->_moldy, tbuff);
1213 CopyInt(&pMonster->_mxoff, tbuff);
1214 CopyInt(&pMonster->_myoff, tbuff);
1215 CopyInt(&pMonster->_mxvel, tbuff);
1216 CopyInt(&pMonster->_myvel, tbuff);
1217 CopyInt(&pMonster->_mdir, tbuff);
1218 CopyInt(&pMonster->_menemy, tbuff);
1219 CopyChar(&pMonster->_menemyx, tbuff);
1220 CopyChar(&pMonster->_menemyy, tbuff);
1221 CopyShort(&pMonster->falign_52, tbuff);
1222
1223 tbuff += 4; // Skip pointer _mAnimData
1224 CopyInt(&pMonster->_mAnimDelay, tbuff);
1225 CopyInt(&pMonster->_mAnimCnt, tbuff);
1226 CopyInt(&pMonster->_mAnimLen, tbuff);
1227 CopyInt(&pMonster->_mAnimFrame, tbuff);
1228 CopyInt(&pMonster->_meflag, tbuff);
1229 CopyInt(&pMonster->_mDelFlag, tbuff);
1230 CopyInt(&pMonster->_mVar1, tbuff);
1231 CopyInt(&pMonster->_mVar2, tbuff);
1232 CopyInt(&pMonster->_mVar3, tbuff);
1233 CopyInt(&pMonster->_mVar4, tbuff);
1234 CopyInt(&pMonster->_mVar5, tbuff);
1235 CopyInt(&pMonster->_mVar6, tbuff);
1236 CopyInt(&pMonster->_mVar7, tbuff);
1237 CopyInt(&pMonster->_mVar8, tbuff);
1238 CopyInt(&pMonster->_mmaxhp, tbuff);
1239 CopyInt(&pMonster->_mhitpoints, tbuff);
1240
1241 CopyChar(&pMonster->_mAi, tbuff);
1242 CopyChar(&pMonster->_mint, tbuff);
1243 CopyShort(&pMonster->falign_9A, tbuff);
1244 CopyInt(&pMonster->_mFlags, tbuff);
1245 CopyChar(&pMonster->_msquelch, tbuff);
1246 tbuff += 3; // Alignment
1247 CopyInt(&pMonster->falign_A4, tbuff);
1248 CopyInt(&pMonster->_lastx, tbuff);
1249 CopyInt(&pMonster->_lasty, tbuff);
1250 CopyInt(&pMonster->_mRndSeed, tbuff);

Callers 2

SaveGameFunction · 0.85
SaveLevelFunction · 0.85

Calls 3

CopyIntFunction · 0.85
CopyCharFunction · 0.85
CopyShortFunction · 0.85

Tested by

no test coverage detected