diff GUIWindow.cpp @ 84:b39bdc150e90

Some inventory stuff
author Nomad
date Mon, 29 Oct 2012 01:36:20 +0200
parents 2d5d13376e91
children 062e8a8e09bc
line wrap: on
line diff
--- a/GUIWindow.cpp	Mon Oct 29 00:49:33 2012 +0200
+++ b/GUIWindow.cpp	Mon Oct 29 01:36:20 2012 +0200
@@ -1096,8 +1096,8 @@
 //----- (0041192C) --------------------------------------------------------
 void __cdecl InitializeBookTextures()
 {
-  signed int v0; // ebp@3
-  Texture **v1; // ebx@3
+  //signed int v0; // ebp@3
+  //Texture **v1; // ebx@3
 
   pAudioPlayer->StopChannels(-1, -1);
   ++pIcons_LOD->uTexturePacksCount;
@@ -1109,21 +1109,24 @@
   pTexture_506448   = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-u", TEXTURE_16BIT_PALETTE)];
   ptr_506440        = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-d", TEXTURE_16BIT_PALETTE)];
   pTexture_50643C   = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m6-u",TEXTURE_16BIT_PALETTE)];
-  v0 = 1;
-  v1 = (Texture **)&pTextures_tabs[0][0].pName[4];
-  pTexture_506444 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m6-d",TEXTURE_16BIT_PALETTE)];
-  do
+  //v0 = 1;
+
+  static const char *texNames[9] =
   {
-    *(&pTexture_pagemask + v0) = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(
-                                                         (const char *)pLloydsBeacons_SomeYs[v0 + 4],
-                                                         TEXTURE_16BIT_PALETTE)];
-    sprintf(pTmpBuf, "tab%da", v0);
-    *(v1 - 1) = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)];
-    sprintf(pTmpBuf, "tab%db", v0++);
-    *v1 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)];
-    v1 += 2;
+    "SBFB00", "SBAB00", "SBWB00", "SBEB00",
+    "SBSB00", "SBMB00", "SBBB00", "SBLB00",
+  };
+
+  pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE);
+  for (uint i = 0; i < 8; ++i)
+  {
+    pTextures_5064A0[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE);
+
+    sprintf(pTmpBuf, "tab%da", i);
+    pTextures_tabs[i][0] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE);
+    sprintf(pTmpBuf, "tab%db", i);
+    pTextures_tabs[i][1] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE);
   }
-  while ( (signed int)v1 <= (signed int)&unk_506494 );
 }
 
 //----- (00411AAA) --------------------------------------------------------
@@ -1184,6 +1187,8 @@
   int a2; // [sp+10h] [bp-8h]@1
   int v7; // [sp+14h] [bp-4h]@1
 
+  __debugbreak();
+
   v1 = pPlayers[uActiveCharacter];
   v2 = this;
   LoadSpellbook(v1->pNumSpellBookPage);