diff GUIWindow.cpp @ 357:b07cf89108d5

Spell positions in book
author Gloval
date Thu, 21 Feb 2013 14:26:00 +0400
parents ee4aa06b6d51
children 2bc1c8d68f41
line wrap: on
line diff
--- a/GUIWindow.cpp	Thu Feb 21 10:07:51 2013 +0600
+++ b/GUIWindow.cpp	Thu Feb 21 14:26:00 2013 +0400
@@ -986,9 +986,9 @@
     if (!chapter->bIsSpellAvailable[i])
       continue;
 
-      v4 = 2 * (12 * pPlayer->lastOpenedSpellbookPage + pSpellbookSpellIndices[pPlayer->lastOpenedSpellbookPage][i + 1]);
-      CreateButton(pViewport->uViewportX + dword_4E20D0[v4],
-                   pViewport->uViewportY + dword_4E20D0[v4 + 1],
+      v4 = (12 * pPlayer->lastOpenedSpellbookPage + pSpellbookSpellIndices[pPlayer->lastOpenedSpellbookPage][i + 1]);
+      CreateButton(pViewport->uViewportX +  pIconPos[v4].Xpos,
+                   pViewport->uViewportY + pIconPos[v4].Ypos,  //dword_4E20D0
                    dword_506408[i + 1]->uTextureWidth,
                    dword_506408[i + 1]->uTextureHeight,
                    1, 79, 0x56u, i, 0, "", 0);