diff mm7_1.cpp @ 945:0d96349d8c87

Restoring inlined methods
author Nomad
date Wed, 01 May 2013 14:09:49 +0200
parents 9be9afdbeac3
children 5a2dbb00c399
line wrap: on
line diff
--- a/mm7_1.cpp	Wed May 01 13:54:46 2013 +0200
+++ b/mm7_1.cpp	Wed May 01 14:09:49 2013 +0200
@@ -694,9 +694,8 @@
   v2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell_InInventory, v1, 0);
   pCharacterScreen_ExitBtn = v2->CreateButton(394, 318, 75, 33, 1, 0, UIMSG_A8, 0, 0,
                  pGlobalTXT_LocalizationStrings[79], // Close
-                 (Texture *)(papredoll_dbrds[2] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[2]] : 0),
-                 papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0,
-                 0);
+                 pIcons_LOD->GetTexture(papredoll_dbrds[2]),
+                 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0);
   v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0);
   pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0);
   v2->CreateButton(61u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0);
@@ -727,7 +726,7 @@
   v0 = pIcons_LOD->LoadTexture(
          pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName,
          TEXTURE_16BIT_PALETTE);
-  v1 = (Texture *)(v0 != -1 ? (int)&pIcons_LOD->pTextures[v0] : 0);
+  v1 = pIcons_LOD->GetTexture(v0);
   v11 = areWeLoadingTexture;
   if ( uActiveCharacter
     && (v2 = pPlayers[uActiveCharacter]->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID)) != 0 )