diff UI/Books/UIMapBook.cpp @ 1453:dfc9484ed94c

GetDayPart and Journal_Draw
author Ritor1
date Thu, 08 Aug 2013 16:34:19 +0600
parents 8b4f4c723edd
children 934074e7fcc1
line wrap: on
line diff
--- a/UI/Books/UIMapBook.cpp	Tue Aug 06 09:26:17 2013 +0600
+++ b/UI/Books/UIMapBook.cpp	Thu Aug 08 16:34:19 2013 +0600
@@ -108,13 +108,13 @@
   pWindow.DrawTitleText(pBook2Font, 0, 22, 0, pTmpBuf.data(), 3);
   if ( bRecallingBeacon )
   {
-    pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6b__zoom_on);
-    v19 = pTex_tab_an_6a__zoom_off;
+    pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_on);
+    v19 = pTex_book_button1_off;
   }
   else
   {
-    pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6a__zoom_off);
-    v19 = pTex_tab_an_6b__zoom_on;
+    pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_off);
+    v19 = pTex_book_button1_on;
   }
   pRenderer->DrawTextureTransparent(pBtn_Book_2->uX, pBtn_Book_2->uY, v19);
   uNumMaxBeacons = 1;
@@ -192,90 +192,40 @@
 void BookUI_Map_Draw()
 {
   unsigned int map_id; // eax@35
-  Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3
   char party_coord[120]; // [sp+Ch] [bp-CCh]@37
   GUIWindow map_window; // [sp+84h] [bp-54h]@35
-  unsigned int textrX, textrY;
 
   pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12);
-  if ( BtnUp_flag || viewparams->field_2C / 128 >= 12 )
-  {
-    buttnTxtr = pTex_tab_an_6a__zoom_off;
-    textrY = pViewport->uViewportTL_Y + 2;
-    textrX = pViewport->uViewportTL_X + 408;
-  }
+  if ( BtnUp_flag || viewparams->field_2C / 128 >= 12 )//Button 1
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 2, pTex_book_button1_off);
   else
-  {
-    buttnTxtr = pTex_tab_an_6b__zoom_on;
-    textrY = pViewport->uViewportTL_Y + 1;
-    textrX = pViewport->uViewportTL_X + 398;
-  }
-  pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( BtnDown_flag || viewparams->field_2C / 128 <= 3 )
-  {
-    buttnTxtr = pTex_tab_an_7a__zoot_off;
-    textrY = pViewport->uViewportTL_Y + 38;
-    textrX = pViewport->uViewportTL_X + 408;
-  }
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_book_button1_on);
+
+  if ( BtnDown_flag || viewparams->field_2C / 128 <= 3 )//Button 2
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 38, pTex_book_button2_off);
   else
-  {
-    buttnTxtr = pTex_tab_an_7b__zoot_on;
-    textrY = pViewport->uViewportTL_Y + 38;
-    textrX = pViewport->uViewportTL_X + 398;
-  }
-  pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( Book_PageBtn3_flag )
-  {
-    buttnTxtr = pTexture_506390;
-    textrY = pViewport->uViewportTL_Y + 113;
-    textrX = pViewport->uViewportTL_X + 408;
-  }
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_book_button2_on);
+
+  if ( Book_PageBtn3_flag )//Button 3
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 113, pTex_book_button3_off);
   else
-  {
-    buttnTxtr = pTexture_506394;
-    textrY = pViewport->uViewportTL_Y + 113;
-    textrX = pViewport->uViewportTL_X + 398;
-  }
-  pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( Book_PageBtn4_flag )
-  {
-    buttnTxtr = pTexture_506388;
-    textrY = pViewport->uViewportTL_X + 150;
-    textrX = pViewport->uViewportTL_Y + 408;
-  }
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTex_book_button3_on);
+
+  if ( Book_PageBtn4_flag )//Button 4
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 150, pTex_book_button4_off);
   else
-  {
-    buttnTxtr = pTexture_50638C;
-    textrY = pViewport->uViewportTL_X + 150;
-    textrX = pViewport->uViewportTL_Y + 399;
-  }
-  pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( Book_PageBtn5_flag )
-  {
-    buttnTxtr = pTexture_506380;
-    textrY = pViewport->uViewportTL_Y + 188;
-    textrX = pViewport->uViewportTL_X + 408;
-  }
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTex_book_button4_on);
+
+  if ( Book_PageBtn5_flag )//Button 5
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 188, pTex_book_button5_off);
   else
-  {
-    buttnTxtr = pTexture_506384;
-    textrY = pViewport->uViewportTL_Y + 188;
-    textrX = pViewport->uViewportTL_X + 397;
-  }
-  pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( Book_PageBtn6_flag )
-  {
-    buttnTxtr = pTexture_506378;
-    textrY = pViewport->uViewportTL_Y + 226;
-    textrX = pViewport->uViewportTL_X + 408;
-  }
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTex_book_button5_on);
+
+  if ( Book_PageBtn6_flag )//Button 6
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 226, pTex_book_button6_off);
   else
-  {
-    buttnTxtr = pTexture_50637C;
-    textrY = pViewport->uViewportTL_Y + 226;
-    textrX = pViewport->uViewportTL_X + 397;
-  }
-  pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
+    pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTex_book_button6_on);
+
   if ( BtnDown_flag )
     viewparams->CenterOnParty2();
   if ( BtnUp_flag )