Mercurial > mm7
diff Chest.cpp @ 1709:8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
author | Grumpy7 |
---|---|
date | Tue, 24 Sep 2013 07:29:55 +0200 |
parents | 4da5644df18f |
children | 35c1e4ff6ba7 |
line wrap: on
line diff
--- a/Chest.cpp Mon Sep 23 07:07:06 2013 +0200 +++ b/Chest.cpp Tue Sep 24 07:29:55 2013 +0200 @@ -265,7 +265,7 @@ { item_texture_id = pIcons_LOD->LoadTexture( //pItemsTable->pItems[*(int *)((char *)&pOtherOverlayList->pOverlays[49].field_4 + 36 * v6 + v3 * 5324)].pIconName, - pItemsTable->pItems[pChests[uChestID].igChestItems[chest_item_index - 1].uItemID].pIconName, TEXTURE_16BIT_PALETTE); + pChests[uChestID].igChestItems[chest_item_index - 1].GetIconName(), TEXTURE_16BIT_PALETTE); item_texture = pIcons_LOD->GetTexture(item_texture_id); itemPixelWidth = item_texture->uTextureWidth; itemPixelHeght = item_texture->uTextureHeight; @@ -430,7 +430,7 @@ pPlayers[uActiveCharacter]->PlaySound(SPEECH_NoRoom, 0); return 0; } - v7 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v4->uItemID].pIconName, TEXTURE_16BIT_PALETTE); + v7 = pIcons_LOD->LoadTexture(v4->GetIconName(), TEXTURE_16BIT_PALETTE); HIWORD(v8) = 0; v9 = pIcons_LOD->GetTexture(v7); v10 = v9->uTextureWidth; @@ -751,7 +751,7 @@ v3 = &pChests[v20].igChestItems[a1]; //v17 = pChestWidthsByType[*(short *)((char *)v2 + (int)pChests)]; v17 = pChestWidthsByType[pChests[v20].uChestBitmapID]; - v4 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v3->uItemID].pIconName, TEXTURE_16BIT_PALETTE); + v4 = pIcons_LOD->LoadTexture(v3->GetIconName(), TEXTURE_16BIT_PALETTE); v5 = pIcons_LOD->GetTexture(v4); v6 = v5->uTextureWidth; if ( v6 < 14 ) @@ -833,7 +833,7 @@ else v3 = -1; v4 = pChests[chest_id].pInventoryIndices[v3] - 1; - if ( pItemsTable->pItems[pChests[chest_id].igChestItems[v4].uItemID].uEquipType == EQUIP_GOLD ) + if ( pChests[chest_id].igChestItems[v4].GetItemEquipType() == EQUIP_GOLD ) { party_finds_gold(pChests[chest_id].igChestItems[v4].uSpecEnchantmentType, 0); viewparams->bRedrawGameUI = 1;