annotate UI/Books/UISpellBook.cpp @ 1338:9749edd941c6

shading terrain
author Ritor1
date Fri, 05 Jul 2013 17:37:12 +0600
parents 16036e3e2642
children eb02a65e5c82 8557d021a31b
rev   line source
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
1 #ifdef _MSC_VER
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
2 #define _CRT_SECURE_NO_WARNINGS
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
3 #endif
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
4
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
5 #include <assert.h>
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
6
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
7 #include "..\..\MM7.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
8 #include "..\..\Render.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
9 #include "..\..\Mouse.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
10 #include "..\UIBooks.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
11 #include "..\..\GUIWindow.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
12 #include "..\..\GUIFont.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
13 #include "..\..\Party.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
14 #include "..\..\AudioPlayer.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
15 #include "..\..\LOD.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
16 #include "..\..\Allocator.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
17 #include "..\..\Viewport.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
18 #include "..\..\texts.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
19 //
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
20 #include "..\..\mm7_data.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
22
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
23 std::array<char *, 9> spellbook_texture_filename_suffices = {{"f", "a", "w", "e", "s", "m", "b", "l", "d"}}; // weak
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
24
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
25 //----- (00411300) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
26 void LoadSpellbook(unsigned int spell_school)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
27 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
28 //unsigned int v1; // esi@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
29 Player *pPlayer; // ecx@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
30 char v3; // al@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
31 //int v4; // edi@5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
32 //Texture *result; // eax@6
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
33 //unsigned char *v6; // edi@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
34 //unsigned int v7; // eax@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
35 //unsigned __int8 v8; // sf@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
36 //unsigned __int8 v9; // of@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
37 char pContainer[20]; // [sp+Ch] [bp-1Ch]@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
38 //Texture *v11; // [sp+20h] [bp-8h]@5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
39 //int v12; // [sp+24h] [bp-4h]@5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
40
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
41 byte_506550 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
42 //v1 = uID;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
43 pPlayer = pPlayers[uActiveCharacter];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
44 v3 = pPlayer->uQuickSpell;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
45 if ( v3 && (unsigned __int8)v3 / 11 == spell_school )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
46 quick_spell_at_page = (unsigned __int8)v3 - 11 * spell_school;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
47 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
48 quick_spell_at_page = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
49
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
50 for (uint i = 1; i < 12; ++i)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
51 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
52 if (pPlayer->spellbook.pChapters[spell_school].bIsSpellAvailable[i - 1])
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
53 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
54 sprintf(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
55 dword_506408[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
56
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
57 sprintf(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
58 dword_5063D8[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
59 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
60 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
61 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
62
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
63
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
64
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
65 //----- (00411597) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
66 void OnCloseSpellBook()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
67 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
68 pAllocator->FreeChunk(pSpellFont);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
69 pSpellFont = nullptr;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
70 pAllocator->FreeChunk(pBookFont);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
71 pBookFont = nullptr;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
72 pAllocator->FreeChunk(pBook2Font);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
73 pBook2Font = nullptr;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
74 pAllocator->FreeChunk(pAutonoteFont);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
75 pAutonoteFont = nullptr;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
76 pTexture_mapbordr->Release();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
77 pAudioPlayer->PlaySound(SOUND_CloseBook, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
78 pIcons_LOD->_4114F2();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
79 dword_506364 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
80 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
81
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
82
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
83
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
84 //----- (00412AF9) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
85 static void BookUI_Spellbook_DrawCurrentSchoolBackground()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
86 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
87 int v0; // ecx@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
88
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
89 v0 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
90 if ( uActiveCharacter )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
91 v0 = pParty->pPlayers[uActiveCharacter - 1].lastOpenedSpellbookPage;//*((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
92 pRenderer->DrawTextureIndexed(8, 8, pSpellBookPagesTextr[v0]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
93 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C2u, pTexture_50643C);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
94 pRenderer->DrawTextureIndexed(0x231u, 0x1C2u, pTexture_506448);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
95 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
96
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
97
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
98
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
99
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
100
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
101 //----- (00412B58) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
102 void DrawSpellBookContent(Player *player)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
103 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
104 //Player *v0; // ebx@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
105 int v1; // ebp@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
106 //unsigned int v2; // eax@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
107 Texture *v3; // edi@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
108 int v4; // esi@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
109 Texture *v5; // eax@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
110 Texture *v6; // edx@5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
111 int v7; // eax@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
112 int v8; // eax@11
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
113 POINT *v9; // esi@13
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
114 int v10; // eax@13
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
115 Texture *v11; // edx@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
116 int v12; // eax@15
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
117 signed int v13; // ecx@18
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
118 unsigned int v14; // esi@18
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
119 unsigned int v15; // edi@18
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
120 Texture *pPageTexture; // eax@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
121 unsigned int v17; // [sp-Ch] [bp-2Ch]@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
122 unsigned int v18; // [sp-Ch] [bp-2Ch]@15
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
123 unsigned int v19; // [sp-8h] [bp-28h]@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
124 unsigned int v20; // [sp-8h] [bp-28h]@15
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
125 Texture *v21; // [sp-4h] [bp-24h]@15
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
126 signed int v22; // [sp-4h] [bp-24h]@22
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
127 Texture *v23; // [sp+10h] [bp-10h]@5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
128 POINT a2; // [sp+18h] [bp-8h]@13
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
129 POINT v24;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
130 int v25;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
131
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
132 static unsigned int texture_tab_coord1[9][2]=
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
133 {{406, 9}, {406, 46}, {406, 84}, {406,121}, {407,158}, {405, 196}, {405, 234}, {405, 272}, {405,309} };
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
134
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
135 static unsigned int texture_tab_coord0[9][2]=
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
136 {{415, 10}, {415, 46}, {415, 83}, {415,121}, {415,158}, {416, 196}, {416, 234}, {416, 271}, {416,307} };
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
137
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
138 BookUI_Spellbook_DrawCurrentSchoolBackground();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
139
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
140 //v0 = pPlayers[uActiveCharacter];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
141 v1 = 11 * player->lastOpenedSpellbookPage;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
142 //v2 = pIcons_LOD->FindTextureByName("Pending");
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
143 v3 = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending"));
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
144 pRenderer->ClearZBuffer(0, 479);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
145 v4 = 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
146 if ( __OFSUB__(v1, v1 + 11) ^ 1 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
147 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
148 do
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
149 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
150 if ( *(&player->_guilds_member_bits[v1 + 63] + v4) )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
151 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
152 v5 = (Texture *)dword_506408[v4];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
153 if ( v5 != v3 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
154 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
155 if ( quick_spell_at_page == v4 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
156 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
157 v6 = dword_5063D8[v4];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
158 v23 = dword_5063D8[v4];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
159 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
160 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
161 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
162 v23 = dword_506408[v4];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
163 v6 = v5;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
164 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
165 if ( v6->pLevelOfDetail0_prolly_alpha_mask )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
166 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
167 v7 = player->lastOpenedSpellbookPage;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
168 // v7 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v4]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
169 v19 = pViewport->uViewportTL_Y + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
170 v17 = pViewport->uViewportTL_X + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
171 if ( BYTE1(v6->pBits) & 2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
172 pRenderer->DrawTextureTransparent(v17, v19, v6);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
173 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
174 pRenderer->DrawTextureIndexed(v17, v19, v6);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
175 pRenderer->DrawMaskToZBuffer(pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
176 pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos, v23, v4);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
177 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
178 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
179 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
180 ++v4;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
181 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
182 while ( v4 - 1 < 11 );
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
183 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
184
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
185 v9 = pMouse->GetCursorPos(&a2);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
186 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
187 if ( v10 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
188 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
189 v11 = dword_5063D8[v10];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
190 if ( v11->pLevelOfDetail0_prolly_alpha_mask )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
191 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
192 v21 = dword_5063D8[v10];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
193 v12 = player->lastOpenedSpellbookPage;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
194 // v12 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v10]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
195 v20 = pViewport->uViewportTL_Y + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Ypos;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
196 v18 = pViewport->uViewportTL_X + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Xpos;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
197 if ( BYTE1(v11->pBits) & 2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
198 pRenderer->DrawTextureTransparent(v18, v20, v21);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
199 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
200 pRenderer->DrawTextureIndexed(v18, v20, v21);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
201 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
202 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
203 v13 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
204 a2.x = (LONG)&player->pActiveSkills[12];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
205 v14 = (unsigned int)&player->pActiveSkills[12];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
206 v15 = (unsigned int)&player->pActiveSkills[12];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
207 v25 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
208 do
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
209 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
210 if ( *(short *)a2.x )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
211 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
212 if ( player->lastOpenedSpellbookPage == v13 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
213 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
214 pPageTexture = pTextures_tabs[v13][1];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
215 v14=texture_tab_coord1[v13][0];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
216 v15=texture_tab_coord1[v13][1];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
217 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
218 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
219 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
220 pPageTexture = pTextures_tabs[v13][0];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
221 v14=texture_tab_coord0[v13][0];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
222 v15=texture_tab_coord0[v13][1];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
223 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
224 pRenderer->DrawTextureTransparent(v14, v15, pPageTexture);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
225 v13 = v25;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
226 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
227 a2.x += 2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
228 ++v13;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
229 v25 = v13;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
230 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
231 while ( v13 < 9 );
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
232 }