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

Function ProcessItems

Source/items.cpp:3607–3632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3605}
3606
3607void ProcessItems()
3608{
3609 for (int i = 0; i < ActiveItemCount; i++) {
3610 int ii = ActiveItems[i];
3611 auto &item = Items[ii];
3612 if (!item._iAnimFlag)
3613 continue;
3614 item.AnimInfo.processAnimation();
3615 if (item._iCurs == ICURS_MAGIC_ROCK) {
3616 if (item._iSelFlag == 1 && item.AnimInfo.currentFrame == 10)
3617 item.AnimInfo.currentFrame = 0;
3618 if (item._iSelFlag == 2 && item.AnimInfo.currentFrame == 20)
3619 item.AnimInfo.currentFrame = 10;
3620 } else {
3621 if (item.AnimInfo.currentFrame == (item.AnimInfo.numberOfFrames - 1) / 2)
3622 PlaySfxLoc(ItemDropSnds[ItemCAnimTbl[item._iCurs]], item.position);
3623
3624 if (item.AnimInfo.isLastFrame()) {
3625 item.AnimInfo.currentFrame = item.AnimInfo.numberOfFrames - 1;
3626 item._iAnimFlag = false;
3627 item._iSelFlag = 1;
3628 }
3629 }
3630 }
3631 ItemDoppel();
3632}
3633
3634void FreeItemGFX()
3635{

Callers 1

GameLogicFunction · 0.85

Calls 4

ItemDoppelFunction · 0.85
processAnimationMethod · 0.80
isLastFrameMethod · 0.80
PlaySfxLocFunction · 0.70

Tested by

no test coverage detected