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

Function RespawnItem

Source/items.cpp:2386–2415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2384}
2385
2386void RespawnItem(int i, BOOL FlipFlag)
2387{
2388 int it;
2389
2390 it = ItemCAnimTbl[item[i]._iCurs];
2391 item[i]._iAnimData = itemanims[it];
2392 item[i]._iAnimLen = ItemAnimLs[it];
2393 item[i]._iAnimWidth = 96;
2394 item[i]._iAnimWidth2 = 16;
2395 item[i]._iPostDraw = FALSE;
2396 item[i]._iRequest = FALSE;
2397 if (FlipFlag) {
2398 item[i]._iAnimFrame = 1;
2399 item[i]._iAnimFlag = TRUE;
2400 item[i]._iSelFlag = 0;
2401 } else {
2402 item[i]._iAnimFrame = item[i]._iAnimLen;
2403 item[i]._iAnimFlag = FALSE;
2404 item[i]._iSelFlag = 1;
2405 }
2406
2407 if (item[i]._iCurs == ICURS_MAGIC_ROCK) {
2408 item[i]._iSelFlag = 1;
2409 PlaySfxLoc(ItemDropSnds[it], item[i]._ix, item[i]._iy);
2410 }
2411 if (item[i]._iCurs == ICURS_TAVERN_SIGN)
2412 item[i]._iSelFlag = 1;
2413 if (item[i]._iCurs == ICURS_ANVIL_OF_FURY)
2414 item[i]._iSelFlag = 1;
2415}
2416
2417void DeleteItem(int ii, int i)
2418{

Callers 5

DeltaLoadLevelFunction · 0.85
AutoGetItemFunction · 0.85
InvPutItemFunction · 0.85
SyncPutItemFunction · 0.85
RespawnDeadItemFunction · 0.85

Calls 1

PlaySfxLocFunction · 0.85

Tested by

no test coverage detected