Mercurial > mm7
diff UI/Books/UISpellBook.cpp @ 1463:b330df6a2183
Слияние
author | Ritor1 |
---|---|
date | Sun, 11 Aug 2013 12:09:33 +0600 |
parents | bfe342ae0c1f |
children | ff2118028c71 |
line wrap: on
line diff
--- a/UI/Books/UISpellBook.cpp Sun Aug 11 12:09:09 2013 +0600 +++ b/UI/Books/UISpellBook.cpp Sun Aug 11 12:09:33 2013 +0600 @@ -3,7 +3,6 @@ #endif #include <assert.h> - #include "..\..\MM7.h" #include "..\..\Render.h" #include "..\..\Mouse.h" @@ -16,10 +15,8 @@ #include "..\..\Allocator.h" #include "..\..\Viewport.h" #include "..\..\texts.h" -// #include "..\..\mm7_data.h" - std::array<char *, 9> spellbook_texture_filename_suffices = {{"f", "a", "w", "e", "s", "m", "b", "l", "d"}}; // weak //----- (00411300) -------------------------------------------------------- @@ -46,36 +43,30 @@ } } - - //----- (00411597) -------------------------------------------------------- void OnCloseBook() - { - pAllocator->FreeChunk(pSpellFont); - pSpellFont = nullptr; - pAllocator->FreeChunk(pBookFont); - pBookFont = nullptr; - pAllocator->FreeChunk(pBook2Font); - pBook2Font = nullptr; - pAllocator->FreeChunk(pAutonoteFont); - pAutonoteFont = nullptr; - pTexture_mapbordr->Release(); - pAudioPlayer->PlaySound(SOUND_CloseBook, 0, 0, -1, 0, 0, 0, 0); - pIcons_LOD->RemoveTexturesPackFromTextureList(); - dword_506364 = 0; - } - - +{ + pAllocator->FreeChunk(pSpellFont); + pSpellFont = nullptr; + pAllocator->FreeChunk(pBookFont); + pBookFont = nullptr; + pAllocator->FreeChunk(pBook2Font); + pBook2Font = nullptr; + pAllocator->FreeChunk(pAutonoteFont); + pAutonoteFont = nullptr; + pTexture_mapbordr->Release(); + pAudioPlayer->PlaySound(SOUND_CloseBook, 0, 0, -1, 0, 0, 0, 0); + pIcons_LOD->RemoveTexturesPackFromTextureList(); + dword_506364 = 0; +} //----- (00412AF9) -------------------------------------------------------- static void BookUI_Spellbook_DrawCurrentSchoolBackground() { - int v0; // ecx@1 - - v0 = 0; + int pTexID = 0; if ( uActiveCharacter ) - v0 = pParty->pPlayers[uActiveCharacter - 1].lastOpenedSpellbookPage;//*((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2); - pRenderer->DrawTextureIndexed(8, 8, pSpellBookPagesTextr[v0]); + pTexID = pParty->pPlayers[uActiveCharacter - 1].lastOpenedSpellbookPage; + pRenderer->DrawTextureIndexed(8, 8, pSpellBookPagesTextr[pTexID]); pRenderer->DrawTextureIndexed(476, 450, pSBQuickSpellBtnTextr); pRenderer->DrawTextureIndexed(561, 450, pSpellBookCloseBtnTextr); }