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

Function GetSuperItemSpace

Source/items.cpp:1053–1074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1051}
1052
1053void GetSuperItemSpace(int x, int y, char inum)
1054{
1055 int xx, yy;
1056 int i, j, k;
1057
1058 if (!GetItemSpace(x, y, inum)) {
1059 for (k = 2; k < 50; k++) {
1060 for (j = -k; j <= k; j++) {
1061 yy = y + j;
1062 for (i = -k; i <= k; i++) {
1063 xx = i + x;
1064 if (ItemSpaceOk(xx, yy)) {
1065 item[inum]._ix = xx;
1066 item[inum]._iy = yy;
1067 dItem[xx][yy] = inum + 1;
1068 return;
1069 }
1070 }
1071 }
1072 }
1073 }
1074}
1075
1076void GetSuperItemLoc(int x, int y, int *xx, int *yy)
1077{

Callers 9

SpawnUniqueFunction · 0.85
SpawnItemFunction · 0.85
CreateItemFunction · 0.85
CreateRndItemFunction · 0.85
CreateRndUsefulFunction · 0.85
CreateTypeItemFunction · 0.85
CreateSpellBookFunction · 0.85
CreateMagicArmorFunction · 0.85
CreateMagicWeaponFunction · 0.85

Calls 2

GetItemSpaceFunction · 0.85
ItemSpaceOkFunction · 0.85

Tested by

no test coverage detected