diff UIBooks.cpp @ 990:087a9af8e0ec

MessageParam
author Ritor1
date Mon, 13 May 2013 18:03:55 +0600
parents a6ef7125f6e4
children 5876a9cafa3e
line wrap: on
line diff
--- a/UIBooks.cpp	Mon May 13 09:39:58 2013 +0600
+++ b/UIBooks.cpp	Mon May 13 18:03:55 2013 +0600
@@ -396,7 +396,7 @@
   GUIWindow a1; // [sp+8h] [bp-54h]@10
 
   pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_11);
-  if ( dword_506548 || !dword_506528 )
+  if ( BtnUp_flag || !dword_506528 )
   {
     v13 = pTex_tab_an_6a__zoom_off;
     v11 = pViewport->uViewportTL_Y + 2;
@@ -409,7 +409,7 @@
     v0 = pViewport->uViewportTL_X + 398;
   }
   pRenderer->DrawTextureTransparent(v0, v11, v13);
-  if ( dword_506544 || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
+  if ( BtnDown_flag || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
   {
     v14 = pTex_tab_an_7a__zoot_off;
     v12 = pViewport->uViewportTL_Y + 38;
@@ -443,14 +443,14 @@
   a1.uFrameZ = 407;
   a1.uFrameHeight = v4 * 264 / v4;
   a1.uFrameW = a1.uFrameHeight + 69;
-  if ( dword_506544 && dword_506528 + num_achieved_awards < num_achieved_awards_2 )
+  if ( BtnDown_flag && dword_506528 + num_achieved_awards < num_achieved_awards_2 )
   {
     pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
     v5 = dword_50651C++;
     dword_506528 += num_achieved_awards;
     byte_506130[v5] = num_achieved_awards;
   }
-  if ( dword_506548 && dword_50651C )
+  if ( BtnUp_flag && dword_50651C )
   {
     pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
     --dword_50651C;
@@ -461,9 +461,9 @@
     dword_506528 = 0;
     dword_50651C = 0;
   }
-  dword_506544 = 0;
+  BtnDown_flag = 0;
   v6 = achieved_awards[dword_506528];
-  dword_506548 = 0;
+  BtnUp_flag = 0;
   num_achieved_awards = 0;
   //v7 = *pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
   v7 = (int)pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
@@ -502,7 +502,7 @@
   GUIWindow a1; // [sp+Ch] [bp-54h]@9
 
   pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_CurrentBook);
-  if ( dword_506548 || !dword_506528 )
+  if ( BtnUp_flag || !dword_506528 )
   {
     v10 = pTex_tab_an_6a__zoom_off;
     v8 = pViewport->uViewportTL_Y + 2;
@@ -515,7 +515,7 @@
     v0 = pViewport->uViewportTL_X + 398;
   }
   pRenderer->DrawTextureTransparent(v0, v8, v10);
-  if ( dword_506544 || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
+  if ( BtnDown_flag || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
   {
     v11 = pTex_tab_an_7a__zoot_off;
     v9 = pViewport->uViewportTL_Y + 38;
@@ -541,14 +541,14 @@
   a1.uFrameHeight = 264;
   a1.uFrameZ = 407;
   a1.uFrameW = 333;
-  if ( dword_506544 && dword_506528 + num_achieved_awards < num_achieved_awards_2 )
+  if ( BtnDown_flag && dword_506528 + num_achieved_awards < num_achieved_awards_2 )
   {
     pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
     v2 = dword_50651C++;
     dword_506528 += num_achieved_awards;
     byte_506130[v2] = num_achieved_awards;
   }
-  if ( dword_506548 && dword_50651C )
+  if ( BtnUp_flag && dword_50651C )
   {
     pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
     --dword_50651C;
@@ -560,8 +560,8 @@
     dword_50651C = 0;
     dword_506528 = 0;
   }
-  dword_506544 = 0;
-  dword_506548 = 0;
+  BtnDown_flag = 0;
+  BtnUp_flag = 0;
   num_achieved_awards = 0;
   while ( v3 < num_achieved_awards_2 )
   {
@@ -620,7 +620,7 @@
 
   v31 = 0;
   pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_AutonotesBook);
-  if ( dword_506548 || !dword_506528 )
+  if ( BtnUp_flag || !dword_506528 )
   {
     v24 = pTex_tab_an_6a__zoom_off;
     v17 = pViewport->uViewportTL_Y + 2;
@@ -633,7 +633,7 @@
     v0 = pViewport->uViewportTL_X + 398;
   }
   pRenderer->DrawTextureTransparent(v0, v17, v24);
-  if ( dword_506544 || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
+  if ( BtnDown_flag || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
   {
     v25 = pTex_tab_an_7a__zoot_off;
     v18 = pViewport->uViewportTL_Y + 38;
@@ -646,7 +646,7 @@
     v1 = pViewport->uViewportTL_X + 398;
   }
   pRenderer->DrawTextureTransparent(v1, v18, v25);
-  if ( !dword_506540 )
+  if ( !Book_PageBtn3_flag )//Potions_page_flag
   {
     if (_506568_autonote_type != AUTONOTE_POTION_RECEPIE)
     {
@@ -672,7 +672,7 @@
   _506568_autonote_type = AUTONOTE_POTION_RECEPIE;
   pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394);
 LABEL_16:
-  if ( dword_50653C )
+  if ( Book_PageBtn4_flag )//Fontains_page_flag
   {
     if ( _506568_autonote_type != v2 )
     {
@@ -696,7 +696,7 @@
   v3 = pViewport->uViewportTL_X + 399;
 LABEL_22:
   pRenderer->DrawTextureTransparent(v3, v19, v26);
-  if ( dword_506538 )
+  if ( Book_PageBtn5_flag )//Autonotes_Obelisks_page_flag
   {
     if ( _506568_autonote_type != AUTONOTE_OBELISK)
     {
@@ -720,7 +720,7 @@
   v4 = pViewport->uViewportTL_X + 397;
 LABEL_28:
   pRenderer->DrawTextureTransparent(v4, v20, v27);
-  if ( dword_506534 )
+  if ( Book_PageBtn6_flag )//Autonotes_Seer_page_flag
   {
     if ( _506568_autonote_type != AUTONOTE_SEER)
     {
@@ -744,7 +744,7 @@
   v5 = pViewport->uViewportTL_X + 397;
 LABEL_34:
   pRenderer->DrawTextureTransparent(v5, v21, v28);
-  if ( dword_506530 )
+  if ( Autonotes_Misc_page_flag )
   {
     if ( _506568_autonote_type != AUTONOTE_MISC)
     {
@@ -768,7 +768,7 @@
   v6 = pViewport->uViewportTL_X + 397;
 LABEL_40:
   pRenderer->DrawTextureTransparent(v6, v22, v29);
-  if ( dword_50652C )
+  if ( Autonotes_Instructors_page_flag )
   {
     if ( _506568_autonote_type != AUTONOTE_TEACHER)
     {
@@ -835,7 +835,7 @@
   }
   else
   {
-    if ( dword_506544 )
+    if ( BtnDown_flag )
     {
       v10 = num_achieved_awards + dword_506528;
       if ( num_achieved_awards + dword_506528 < num_achieved_awards_2 )
@@ -846,7 +846,7 @@
         pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
       }
     }
-    if ( dword_506548 && dword_50651C )
+    if ( BtnUp_flag && dword_50651C )
     {
       --dword_50651C;
       dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
@@ -859,15 +859,15 @@
     }
   }
   v12 = dword_506528;
-  dword_50652C = 0;
-  dword_506544 = 0;
-  dword_506548 = 0;
+  Autonotes_Instructors_page_flag = 0;
+  BtnDown_flag = 0;
+  BtnUp_flag = 0;
   num_achieved_awards = 0;
-  dword_506530 = 0;
-  dword_506534 = 0;
-  dword_506538 = 0;
-  dword_50653C = 0;
-  dword_506540 = 0;
+  Autonotes_Misc_page_flag = 0;
+  Book_PageBtn6_flag = 0;//Autonotes_Seer_page_flag
+  Book_PageBtn5_flag = 0;//Autonotes_Obelisks_page_flag
+  Book_PageBtn4_flag = 0;//Fontains_page_flag
+  Book_PageBtn3_flag = 0;//Potions_page_flag
   while ( v12 < num_achieved_awards_2 )
   {
     v13 = achieved_awards[v12];
@@ -899,7 +899,7 @@
   unsigned int textrX, textrY;
 
   pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12);
-  if ( dword_506548 || viewparams->field_2C / 128 >= 12 )
+  if ( BtnUp_flag || viewparams->field_2C / 128 >= 12 )
   {
     buttnTxtr = pTex_tab_an_6a__zoom_off;
     textrY = pViewport->uViewportTL_Y + 2;
@@ -912,7 +912,7 @@
     textrX = pViewport->uViewportTL_X + 398;
   }
   pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( dword_506544 || viewparams->field_2C / 128 <= 3 )
+  if ( BtnDown_flag || viewparams->field_2C / 128 <= 3 )
   {
     buttnTxtr = pTex_tab_an_7a__zoot_off;
     textrY = pViewport->uViewportTL_Y + 38;
@@ -925,7 +925,7 @@
     textrX = pViewport->uViewportTL_X + 398;
   }
   pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( dword_506540 )
+  if ( Book_PageBtn3_flag )
   {
     buttnTxtr = pTexture_506390;
     textrY = pViewport->uViewportTL_Y + 113;
@@ -938,7 +938,7 @@
     textrX = pViewport->uViewportTL_X + 398;
   }
   pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( dword_50653C )
+  if ( Book_PageBtn4_flag )
   {
     buttnTxtr = pTexture_506388;
     textrY = pViewport->uViewportTL_X + 150;
@@ -951,7 +951,7 @@
     textrX = pViewport->uViewportTL_Y + 399;
   }
   pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( dword_506538 )
+  if ( Book_PageBtn5_flag )
   {
     buttnTxtr = pTexture_506380;
     textrY = pViewport->uViewportTL_Y + 188;
@@ -964,7 +964,7 @@
     textrX = pViewport->uViewportTL_X + 397;
   }
   pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( dword_506534 )
+  if ( Book_PageBtn6_flag )
   {
     buttnTxtr = pTexture_506378;
     textrY = pViewport->uViewportTL_Y + 226;
@@ -977,27 +977,27 @@
     textrX = pViewport->uViewportTL_X + 397;
   }
   pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
-  if ( dword_506544 )
+  if ( BtnDown_flag )
     viewparams->CenterOnParty2();
-  if ( dword_506548 )
+  if ( BtnUp_flag )
     viewparams->CenterOnParty();
-  if ( dword_506540 )
+  if ( Book_PageBtn3_flag )
     viewparams->_443219();
-  if ( dword_50653C )
+  if ( Book_PageBtn4_flag )
     viewparams->_443231();
-  if ( dword_506538 )
+  if ( Book_PageBtn5_flag )
     viewparams->_44323D();
-  if ( dword_506534 )
+  if ( Book_PageBtn6_flag )
     viewparams->_443225();
 
-  if ( dword_506548 | dword_506544 | dword_506540 | dword_50653C | dword_506538 | dword_506534 )
+  if ( BtnUp_flag | BtnDown_flag | Book_PageBtn3_flag | Book_PageBtn4_flag | Book_PageBtn5_flag | Book_PageBtn6_flag )
     pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
-  dword_506548 = 0;
-  dword_506544 = 0;
-  dword_506534 = 0;
-  dword_506538 = 0;
-  dword_50653C = 0;
-  dword_506540 = 0;
+  BtnUp_flag = 0;
+  BtnDown_flag = 0;
+  Book_PageBtn6_flag = 0;
+  Book_PageBtn5_flag = 0;
+  Book_PageBtn4_flag = 0;
+  Book_PageBtn3_flag = 0;
   DrawBook_Map_sub(97, 49, 361, 313, 0);
   pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr);
   map_window.uFrameWidth = game_viewport_width;