Mercurial > mm7
comparison UI/Books/UISpellBook.cpp @ 1398:8557d021a31b
m
author | Ritor1 |
---|---|
date | Thu, 18 Jul 2013 09:40:05 +0600 |
parents | 16036e3e2642 |
children | 9b091098c88c |
comparison
equal
deleted
inserted
replaced
1381:729635c2bb40 | 1398:8557d021a31b |
---|---|
103 { | 103 { |
104 //Player *v0; // ebx@1 | 104 //Player *v0; // ebx@1 |
105 int v1; // ebp@1 | 105 int v1; // ebp@1 |
106 //unsigned int v2; // eax@1 | 106 //unsigned int v2; // eax@1 |
107 Texture *v3; // edi@1 | 107 Texture *v3; // edi@1 |
108 int v4; // esi@1 | 108 //int v4; // esi@1 |
109 Texture *v5; // eax@3 | 109 Texture *v5; // eax@3 |
110 Texture *v6; // edx@5 | 110 Texture *v6; // edx@5 |
111 int v7; // eax@8 | 111 //int v7; // eax@8 |
112 int v8; // eax@11 | 112 int v8; // eax@11 |
113 POINT *v9; // esi@13 | 113 POINT *v9; // esi@13 |
114 int v10; // eax@13 | 114 int v10; // eax@13 |
115 Texture *v11; // edx@14 | 115 Texture *v11; // edx@14 |
116 int v12; // eax@15 | 116 int v12; // eax@15 |
117 signed int v13; // ecx@18 | 117 signed int v13; // ecx@18 |
118 unsigned int v14; // esi@18 | 118 unsigned int v14; // esi@18 |
119 unsigned int v15; // edi@18 | 119 unsigned int v15; // edi@18 |
120 Texture *pPageTexture; // eax@21 | 120 Texture *pPageTexture; // eax@21 |
121 unsigned int v17; // [sp-Ch] [bp-2Ch]@8 | 121 unsigned int pX_pos; // [sp-Ch] [bp-2Ch]@8 |
122 unsigned int v18; // [sp-Ch] [bp-2Ch]@15 | 122 unsigned int v18; // [sp-Ch] [bp-2Ch]@15 |
123 unsigned int v19; // [sp-8h] [bp-28h]@8 | 123 unsigned int pY_pos; // [sp-8h] [bp-28h]@8 |
124 unsigned int v20; // [sp-8h] [bp-28h]@15 | 124 unsigned int v20; // [sp-8h] [bp-28h]@15 |
125 Texture *v21; // [sp-4h] [bp-24h]@15 | 125 Texture *v21; // [sp-4h] [bp-24h]@15 |
126 signed int v22; // [sp-4h] [bp-24h]@22 | 126 signed int v22; // [sp-4h] [bp-24h]@22 |
127 Texture *v23; // [sp+10h] [bp-10h]@5 | 127 Texture *v23; // [sp+10h] [bp-10h]@5 |
128 POINT a2; // [sp+18h] [bp-8h]@13 | 128 POINT a2; // [sp+18h] [bp-8h]@13 |
135 static unsigned int texture_tab_coord0[9][2]= | 135 static unsigned int texture_tab_coord0[9][2]= |
136 {{415, 10}, {415, 46}, {415, 83}, {415,121}, {415,158}, {416, 196}, {416, 234}, {416, 271}, {416,307} }; | 136 {{415, 10}, {415, 46}, {415, 83}, {415,121}, {415,158}, {416, 196}, {416, 234}, {416, 271}, {416,307} }; |
137 | 137 |
138 BookUI_Spellbook_DrawCurrentSchoolBackground(); | 138 BookUI_Spellbook_DrawCurrentSchoolBackground(); |
139 | 139 |
140 //v0 = pPlayers[uActiveCharacter]; | |
141 v1 = 11 * player->lastOpenedSpellbookPage; | 140 v1 = 11 * player->lastOpenedSpellbookPage; |
142 //v2 = pIcons_LOD->FindTextureByName("Pending"); | |
143 v3 = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending")); | 141 v3 = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending")); |
144 pRenderer->ClearZBuffer(0, 479); | 142 pRenderer->ClearZBuffer(0, 479); |
145 v4 = 1; | |
146 if ( __OFSUB__(v1, v1 + 11) ^ 1 ) | 143 if ( __OFSUB__(v1, v1 + 11) ^ 1 ) |
147 { | 144 { |
148 do | 145 for ( uint i = 1; i - 1 < 11; ++i ) |
149 { | 146 { |
150 if ( *(&player->_guilds_member_bits[v1 + 63] + v4) ) | 147 if ( *(&player->_guilds_member_bits[v1 + 63] + i) ) |
151 { | 148 { |
152 v5 = (Texture *)dword_506408[v4]; | 149 v5 = (Texture *)dword_506408[i]; |
153 if ( v5 != v3 ) | 150 if ( v5 != v3 ) |
154 { | 151 { |
155 if ( quick_spell_at_page == v4 ) | 152 if ( quick_spell_at_page == i ) |
156 { | 153 { |
157 v6 = dword_5063D8[v4]; | 154 v6 = dword_5063D8[i]; |
158 v23 = dword_5063D8[v4]; | 155 v23 = dword_5063D8[i]; |
159 } | 156 } |
160 else | 157 else |
161 { | 158 { |
162 v23 = dword_506408[v4]; | 159 v23 = dword_506408[i]; |
163 v6 = v5; | 160 v6 = v5; |
164 } | 161 } |
165 if ( v6->pLevelOfDetail0_prolly_alpha_mask ) | 162 if ( v6->pLevelOfDetail0_prolly_alpha_mask ) |
166 { | 163 { |
167 v7 = player->lastOpenedSpellbookPage; | 164 pY_pos = pViewport->uViewportTL_Y + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Ypos; |
168 // v7 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v4]); | 165 pX_pos = pViewport->uViewportTL_X + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Xpos; |
169 v19 = pViewport->uViewportTL_Y + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos; | |
170 v17 = pViewport->uViewportTL_X + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos; | |
171 if ( BYTE1(v6->pBits) & 2 ) | 166 if ( BYTE1(v6->pBits) & 2 ) |
172 pRenderer->DrawTextureTransparent(v17, v19, v6); | 167 pRenderer->DrawTextureTransparent(pX_pos, pY_pos, v6); |
173 else | 168 else |
174 pRenderer->DrawTextureIndexed(v17, v19, v6); | 169 pRenderer->DrawTextureIndexed(pX_pos, pY_pos, v6); |
175 pRenderer->DrawMaskToZBuffer(pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos, | 170 pRenderer->DrawMaskToZBuffer(pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Xpos, |
176 pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos, v23, v4); | 171 pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Ypos, v23, i); |
177 } | 172 } |
178 } | 173 } |
179 } | 174 } |
180 ++v4; | 175 } |
181 } | |
182 while ( v4 - 1 < 11 ); | |
183 } | 176 } |
184 | 177 |
185 v9 = pMouse->GetCursorPos(&a2); | 178 v9 = pMouse->GetCursorPos(&a2); |
186 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF; | 179 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF; |
187 if ( v10 ) | 180 if ( v10 ) |
188 { | 181 { |
189 v11 = dword_5063D8[v10]; | 182 v11 = dword_5063D8[v10]; |
190 if ( v11->pLevelOfDetail0_prolly_alpha_mask ) | 183 if ( v11->pLevelOfDetail0_prolly_alpha_mask ) |
191 { | 184 { |
192 v21 = dword_5063D8[v10]; | 185 v21 = dword_5063D8[v10]; |
193 v12 = player->lastOpenedSpellbookPage; | 186 v12 = player->lastOpenedSpellbookPage; |
194 // v12 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v10]); | |
195 v20 = pViewport->uViewportTL_Y + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Ypos; | 187 v20 = pViewport->uViewportTL_Y + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Ypos; |
196 v18 = pViewport->uViewportTL_X + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Xpos; | 188 v18 = pViewport->uViewportTL_X + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Xpos; |
197 if ( BYTE1(v11->pBits) & 2 ) | 189 if ( BYTE1(v11->pBits) & 2 ) |
198 pRenderer->DrawTextureTransparent(v18, v20, v21); | 190 pRenderer->DrawTextureTransparent(v18, v20, v21); |
199 else | 191 else |