Mercurial > mm7
comparison UI/Books/UISpellBook.cpp @ 1401:3161094869e0
Слияние
author | Ritor1 |
---|---|
date | Fri, 19 Jul 2013 12:50:44 +0600 |
parents | 9b091098c88c eb02a65e5c82 |
children | a519a6a412d0 |
comparison
equal
deleted
inserted
replaced
1400:9b091098c88c | 1401:3161094869e0 |
---|---|
99 | 99 |
100 | 100 |
101 //----- (00412B58) -------------------------------------------------------- | 101 //----- (00412B58) -------------------------------------------------------- |
102 void DrawSpellBookContent(Player *player) | 102 void DrawSpellBookContent(Player *player) |
103 { | 103 { |
104 Texture *PendingTexture; // edi@1 | 104 //Player *v0; // ebx@1 |
105 Texture *SpellTexture; // eax@3 | 105 int v1; // ebp@1 |
106 //unsigned int v2; // eax@1 | |
107 Texture *v3; // edi@1 | |
108 int v4; // esi@1 | |
109 Texture *v5; // eax@3 | |
106 Texture *v6; // edx@5 | 110 Texture *v6; // edx@5 |
111 int v7; // eax@8 | |
107 int v8; // eax@11 | 112 int v8; // eax@11 |
113 //POINT *v9; // esi@13 | |
108 int v10; // eax@13 | 114 int v10; // eax@13 |
115 Texture *v11; // edx@14 | |
116 int v12; // eax@15 | |
117 signed int v13; // ecx@18 | |
109 unsigned int v14; // esi@18 | 118 unsigned int v14; // esi@18 |
110 unsigned int v15; // edi@18 | 119 unsigned int v15; // edi@18 |
111 Texture *pPageTexture; // eax@21 | 120 Texture *pPageTexture; // eax@21 |
112 unsigned int pX_pos; // [sp-Ch] [bp-2Ch]@8 | 121 unsigned int v17; // [sp-Ch] [bp-2Ch]@8 |
113 unsigned int v18; // [sp-Ch] [bp-2Ch]@15 | 122 unsigned int v18; // [sp-Ch] [bp-2Ch]@15 |
114 unsigned int pY_pos; // [sp-8h] [bp-28h]@8 | 123 unsigned int v19; // [sp-8h] [bp-28h]@8 |
115 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 | |
116 signed int v22; // [sp-4h] [bp-24h]@22 | 126 signed int v22; // [sp-4h] [bp-24h]@22 |
117 Texture *v23; // [sp+10h] [bp-10h]@5 | 127 Texture *v23; // [sp+10h] [bp-10h]@5 |
118 POINT a2; // [sp+18h] [bp-8h]@13 | 128 POINT a2; // [sp+18h] [bp-8h]@13 |
119 POINT v24; | 129 //POINT v24; |
130 int v25; | |
120 | 131 |
121 static unsigned int texture_tab_coord1[9][2]= | 132 static unsigned int texture_tab_coord1[9][2]= |
122 {{406, 9}, {406, 46}, {406, 84}, {406,121}, {407,158}, {405, 196}, {405, 234}, {405, 272}, {405,309} }; | 133 {{406, 9}, {406, 46}, {406, 84}, {406,121}, {407,158}, {405, 196}, {405, 234}, {405, 272}, {405,309} }; |
123 | 134 |
124 static unsigned int texture_tab_coord0[9][2]= | 135 static unsigned int texture_tab_coord0[9][2]= |
125 {{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} }; |
126 | 137 |
127 BookUI_Spellbook_DrawCurrentSchoolBackground(); | 138 BookUI_Spellbook_DrawCurrentSchoolBackground(); |
128 | 139 |
129 PendingTexture = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending")); | 140 //v0 = pPlayers[uActiveCharacter]; |
141 v1 = 11 * player->lastOpenedSpellbookPage; | |
142 //v2 = pIcons_LOD->FindTextureByName("Pending"); | |
143 v3 = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending")); | |
130 pRenderer->ClearZBuffer(0, 479); | 144 pRenderer->ClearZBuffer(0, 479); |
131 if ( (11 * player->lastOpenedSpellbookPage) || ((11 * player->lastOpenedSpellbookPage) + 11) )//??? maybe structure need fix | 145 v4 = 1; |
146 //if ( __OFSUB__(v1, v1 + 11) ^ 1 ) | |
132 { | 147 { |
133 for ( uint i = 1; i - 1 < 11; ++i ) | 148 do |
134 { | 149 { |
135 if ( *(&player->_guilds_member_bits[(11 * player->lastOpenedSpellbookPage) + 63] + i) ) | 150 if (player->_guilds_member_bits[v1 + v4 + 63] ) |
136 { | 151 { |
137 SpellTexture = (Texture *)dword_506408[i]; | 152 v5 = (Texture *)dword_506408[v4]; |
138 if ( SpellTexture != PendingTexture ) | 153 if ( v5 != v3 ) |
139 { | 154 { |
140 if ( quick_spell_at_page == i ) | 155 if ( quick_spell_at_page == v4 ) |
141 { | 156 { |
142 v6 = dword_5063D8[i]; | 157 v6 = dword_5063D8[v4]; |
143 v23 = dword_5063D8[i]; | 158 v23 = dword_5063D8[v4]; |
144 } | 159 } |
145 else | 160 else |
146 { | 161 { |
147 v23 = dword_506408[i]; | 162 v23 = dword_506408[v4]; |
148 v6 = SpellTexture; | 163 v6 = v5; |
149 } | 164 } |
150 if ( v6->pLevelOfDetail0_prolly_alpha_mask ) | 165 if ( v6->pLevelOfDetail0_prolly_alpha_mask ) |
151 { | 166 { |
152 pY_pos = pViewport->uViewportTL_Y + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Ypos; | 167 v7 = player->lastOpenedSpellbookPage; |
153 pX_pos = pViewport->uViewportTL_X + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Xpos; | 168 // v7 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v4]); |
169 v19 = pViewport->uViewportTL_Y + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos; | |
170 v17 = pViewport->uViewportTL_X + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos; | |
154 if ( BYTE1(v6->pBits) & 2 ) | 171 if ( BYTE1(v6->pBits) & 2 ) |
155 pRenderer->DrawTextureTransparent(pX_pos, pY_pos, v6); | 172 pRenderer->DrawTextureTransparent(v17, v19, v6); |
156 else | 173 else |
157 pRenderer->DrawTextureIndexed(pX_pos, pY_pos, v6); | 174 pRenderer->DrawTextureIndexed(v17, v19, v6); |
158 pRenderer->DrawMaskToZBuffer(pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Xpos, | 175 pRenderer->DrawMaskToZBuffer(pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos, |
159 pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Ypos, v23, i); | 176 pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos, v23, v4); |
160 } | 177 } |
161 } | 178 } |
162 } | 179 } |
163 } | 180 ++v4; |
181 } | |
182 while ( v4 - 1 < 11 ); | |
164 } | 183 } |
165 | 184 |
166 v10 = pRenderer->pActiveZBuffer[pMouse->GetCursorPos(&a2)->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF; | 185 /*v9 = */pMouse->GetCursorPos(&a2); |
186 v10 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF; | |
167 if ( v10 ) | 187 if ( v10 ) |
168 { | 188 { |
169 if ( dword_5063D8[v10]->pLevelOfDetail0_prolly_alpha_mask ) | 189 v11 = dword_5063D8[v10]; |
170 { | 190 if ( v11->pLevelOfDetail0_prolly_alpha_mask ) |
171 v20 = pViewport->uViewportTL_Y + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][v10]].Ypos; | 191 { |
172 v18 = pViewport->uViewportTL_X + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][v10]].Xpos; | 192 v21 = dword_5063D8[v10]; |
173 if ( BYTE1(dword_5063D8[v10]->pBits) & 2 ) | 193 v12 = player->lastOpenedSpellbookPage; |
174 pRenderer->DrawTextureTransparent(v18, v20, dword_5063D8[v10]); | 194 // v12 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v10]); |
195 v20 = pViewport->uViewportTL_Y + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Ypos; | |
196 v18 = pViewport->uViewportTL_X + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Xpos; | |
197 if ( BYTE1(v11->pBits) & 2 ) | |
198 pRenderer->DrawTextureTransparent(v18, v20, v21); | |
175 else | 199 else |
176 pRenderer->DrawTextureIndexed(v18, v20, dword_5063D8[v10]); | 200 pRenderer->DrawTextureIndexed(v18, v20, v21); |
177 } | 201 } |
178 } | 202 } |
179 | 203 v13 = 0; |
180 a2.x = (LONG)&player->pActiveSkills[12]; | 204 a2.x = (LONG)&player->pActiveSkills[12]; |
181 v14 = (unsigned int)&player->pActiveSkills[12]; | 205 v14 = (unsigned int)&player->pActiveSkills[12]; |
182 v15 = (unsigned int)&player->pActiveSkills[12]; | 206 v15 = (unsigned int)&player->pActiveSkills[12]; |
183 for ( uint i = 0; i < 9; i++ ) | 207 v25 = 0; |
208 do | |
184 { | 209 { |
185 if ( *(short *)a2.x ) | 210 if ( *(short *)a2.x ) |
186 { | 211 { |
187 if ( player->lastOpenedSpellbookPage == i ) | 212 if ( player->lastOpenedSpellbookPage == v13 ) |
188 { | 213 { |
189 pPageTexture = pTextures_tabs[i][1]; | 214 pPageTexture = pTextures_tabs[v13][1]; |
190 v14=texture_tab_coord1[i][0]; | 215 v14=texture_tab_coord1[v13][0]; |
191 v15=texture_tab_coord1[i][1]; | 216 v15=texture_tab_coord1[v13][1]; |
192 } | 217 } |
193 else | 218 else |
194 { | 219 { |
195 pPageTexture = pTextures_tabs[i][0]; | 220 pPageTexture = pTextures_tabs[v13][0]; |
196 v14=texture_tab_coord0[i][0]; | 221 v14=texture_tab_coord0[v13][0]; |
197 v15=texture_tab_coord0[i][1]; | 222 v15=texture_tab_coord0[v13][1]; |
198 } | 223 } |
199 pRenderer->DrawTextureTransparent(v14, v15, pPageTexture); | 224 pRenderer->DrawTextureTransparent(v14, v15, pPageTexture); |
225 v13 = v25; | |
200 } | 226 } |
201 a2.x += 2; | 227 a2.x += 2; |
228 ++v13; | |
229 v25 = v13; | |
202 } | 230 } |
231 while ( v13 < 9 ); | |
203 } | 232 } |