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

Function ProcessItems

Source/items.cpp:2444–2470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2442}
2443
2444void ProcessItems()
2445{
2446 int i, ii;
2447
2448 for (i = 0; i < numitems; i++) {
2449 ii = itemactive[i];
2450 if (item[ii]._iAnimFlag) {
2451 item[ii]._iAnimFrame++;
2452 if (item[ii]._iCurs == ICURS_MAGIC_ROCK) {
2453 if (item[ii]._iSelFlag == 1 && item[ii]._iAnimFrame == 11)
2454 item[ii]._iAnimFrame = 1;
2455 if (item[ii]._iSelFlag == 2 && item[ii]._iAnimFrame == 21)
2456 item[ii]._iAnimFrame = 11;
2457 } else {
2458 if (item[ii]._iAnimFrame == item[ii]._iAnimLen >> 1)
2459 PlaySfxLoc(ItemDropSnds[ItemCAnimTbl[item[ii]._iCurs]], item[ii]._ix, item[ii]._iy);
2460
2461 if (item[ii]._iAnimFrame >= item[ii]._iAnimLen) {
2462 item[ii]._iAnimFrame = item[ii]._iAnimLen;
2463 item[ii]._iAnimFlag = FALSE;
2464 item[ii]._iSelFlag = 1;
2465 }
2466 }
2467 }
2468 }
2469 ItemDoppel();
2470}
2471
2472void FreeItemGFX()
2473{

Callers 1

game_logicFunction · 0.85

Calls 2

PlaySfxLocFunction · 0.85
ItemDoppelFunction · 0.85

Tested by

no test coverage detected