diff UI/UIBooks.cpp @ 1463:b330df6a2183

Слияние
author Ritor1
date Sun, 11 Aug 2013 12:09:33 +0600
parents bfe342ae0c1f
children c4ab816fcc5e
line wrap: on
line diff
--- a/UI/UIBooks.cpp	Sun Aug 11 12:09:09 2013 +0600
+++ b/UI/UIBooks.cpp	Sun Aug 11 12:09:33 2013 +0600
@@ -3,9 +3,7 @@
 #endif
 
 #include <assert.h>
-
 #include "..\MM7.h"
-
 #include "UIBooks.h"
 #include "..\Render.h"
 #include "..\GUIWindow.h"
@@ -13,15 +11,8 @@
 #include "..\AudioPlayer.h"
 #include "..\LOD.h"
 #include "..\Allocator.h"
-
-
 #include "..\mm7_data.h"
 
-
-
-
-
-
 //----- (00413CC6) --------------------------------------------------------
 void BookUI_Draw(WindowType book)
 {
@@ -39,29 +30,19 @@
   }
 }
 
-
-
-
-
-
-
 //----- (0041192C) --------------------------------------------------------
 void InitializeBookTextures()
 {
-
   pAudioPlayer->StopChannels(-1, -1);
-
   ++pIcons_LOD->uTexturePacksCount;
   if ( !pIcons_LOD->uNumPrevLoadedFiles )
     pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
-
   pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
   pSpellBookPagesTextr_9 = pIcons_LOD->LoadTexturePtr("book", TEXTURE_16BIT_PALETTE);
   pTexture_pagemask = pIcons_LOD->LoadTexturePtr("pagemask", TEXTURE_16BIT_PALETTE);
   pSpellBookCloseBtnTextr = pIcons_LOD->LoadTexturePtr("ib-m5-u", TEXTURE_16BIT_PALETTE);
   pSpellBookClickCloseBtnTextr = pIcons_LOD->LoadTexturePtr("ib-m5-d", TEXTURE_16BIT_PALETTE);
   pSBQuickSpellBtnTextr   = pIcons_LOD->LoadTexturePtr("ib-m6-u",TEXTURE_16BIT_PALETTE);
-  //v0 = 1;
 
   static const char *texNames[9] = // 004E24EC
   {
@@ -70,28 +51,23 @@
   };
 
   pSBClickQuickSpellBtnTextr = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE);
-  for (uint i = 0; i < 9; ++i)
+  for ( uint i = 0; i < 9; ++i )
   {
     pSpellBookPagesTextr[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE);
-
-    sprintf(pTmpBuf.data(), "tab%da", i+1);
+    sprintf(pTmpBuf.data(), "tab%da", i + 1);
     pTextures_tabs[i][0] = pIcons_LOD->LoadTexturePtr(pTmpBuf.data(), TEXTURE_16BIT_PALETTE);
-    sprintf(pTmpBuf.data(), "tab%db", i+1);
+    sprintf(pTmpBuf.data(), "tab%db", i + 1);
     pTextures_tabs[i][1] = pIcons_LOD->LoadTexturePtr(pTmpBuf.data(), TEXTURE_16BIT_PALETTE);
   }
 }
 
-
-
 //----- (00411AAA) --------------------------------------------------------
 void InitializeBookFonts()
 {
   pAudioPlayer->StopChannels(-1, -1);
-
   ++pIcons_LOD->uTexturePacksCount;
   if ( !pIcons_LOD->uNumPrevLoadedFiles )
     pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
-
   pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
   pTexture_mapbordr = pIcons_LOD->LoadTexturePtr("mapbordr", TEXTURE_16BIT_PALETTE);
   pBookFont = LoadFont("book.fnt", "FONTPAL", NULL);
@@ -100,14 +76,10 @@
   pSpellFont = LoadFont("spell.fnt", "FONTPAL", NULL);
 }
 
-
-
-
 //----- (0041140B) --------------------------------------------------------
 void OnCloseSpellBookPage()
 {
   GUIButton *pNextButton; // esi@4
-
   for ( uint i = 1; i <= 11; i++ )
   {
     SBPageCSpellsTextureList[i]->Release();
@@ -135,7 +107,7 @@
   pTexture_pagemask->Release();
   pSpellBookCloseBtnTextr->Release();
   pSBQuickSpellBtnTextr->Release();
-  for (uint i = 0; i < 9; ++i)
+  for ( uint i = 0; i < 9; ++i )
   {
     pSpellBookPagesTextr[i]->Release();
     pTextures_tabs[i][0]->Release();
@@ -144,11 +116,3 @@
   pAudioPlayer->PlaySound(SOUND_CloseBook, 0, 0, -1, 0, 0, 0, 0);
   pIcons_LOD->RemoveTexturesPackFromTextureList();
 }
-
-
-
-
-
-
-
-