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

Function SetupItem

Source/items.cpp:1792–1813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1790}
1791
1792void SetupItem(int i)
1793{
1794 int it;
1795
1796 it = ItemCAnimTbl[item[i]._iCurs];
1797 item[i]._iAnimData = itemanims[it];
1798 item[i]._iAnimLen = ItemAnimLs[it];
1799 item[i]._iAnimWidth = 96;
1800 item[i]._iAnimWidth2 = 16;
1801 item[i]._iIdentified = FALSE;
1802 item[i]._iPostDraw = FALSE;
1803
1804 if (!plr[myplr].pLvlLoad) {
1805 item[i]._iAnimFrame = 1;
1806 item[i]._iAnimFlag = TRUE;
1807 item[i]._iSelFlag = 0;
1808 } else {
1809 item[i]._iAnimFrame = item[i]._iAnimLen;
1810 item[i]._iAnimFlag = FALSE;
1811 item[i]._iSelFlag = 1;
1812 }
1813}
1814
1815int RndItem(int m)
1816{

Callers 7

AddInitItemsFunction · 0.85
SpawnUniqueFunction · 0.85
SetupAllItemsFunction · 0.85
CreateItemFunction · 0.85
SetupAllUsefulFunction · 0.85
SpawnQuestItemFunction · 0.85
SpawnRockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected