Mercurial > mm7
diff UI/Books/UISpellBook.cpp @ 1400:9b091098c88c
m
author | Ritor1 |
---|---|
date | Fri, 19 Jul 2013 12:50:29 +0600 |
parents | 8557d021a31b |
children | 3161094869e0 |
line wrap: on
line diff
--- a/UI/Books/UISpellBook.cpp Thu Jul 18 09:40:14 2013 +0600 +++ b/UI/Books/UISpellBook.cpp Fri Jul 19 12:50:29 2013 +0600 @@ -101,20 +101,11 @@ //----- (00412B58) -------------------------------------------------------- void DrawSpellBookContent(Player *player) { - //Player *v0; // ebx@1 - int v1; // ebp@1 - //unsigned int v2; // eax@1 - Texture *v3; // edi@1 - //int v4; // esi@1 - Texture *v5; // eax@3 + Texture *PendingTexture; // edi@1 + Texture *SpellTexture; // eax@3 Texture *v6; // edx@5 - //int v7; // eax@8 int v8; // eax@11 - POINT *v9; // esi@13 int v10; // eax@13 - Texture *v11; // edx@14 - int v12; // eax@15 - signed int v13; // ecx@18 unsigned int v14; // esi@18 unsigned int v15; // edi@18 Texture *pPageTexture; // eax@21 @@ -122,12 +113,10 @@ unsigned int v18; // [sp-Ch] [bp-2Ch]@15 unsigned int pY_pos; // [sp-8h] [bp-28h]@8 unsigned int v20; // [sp-8h] [bp-28h]@15 - Texture *v21; // [sp-4h] [bp-24h]@15 signed int v22; // [sp-4h] [bp-24h]@22 Texture *v23; // [sp+10h] [bp-10h]@5 POINT a2; // [sp+18h] [bp-8h]@13 POINT v24; - int v25; static unsigned int texture_tab_coord1[9][2]= {{406, 9}, {406, 46}, {406, 84}, {406,121}, {407,158}, {405, 196}, {405, 234}, {405, 272}, {405,309} }; @@ -137,17 +126,16 @@ BookUI_Spellbook_DrawCurrentSchoolBackground(); - v1 = 11 * player->lastOpenedSpellbookPage; - v3 = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending")); + PendingTexture = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending")); pRenderer->ClearZBuffer(0, 479); - if ( __OFSUB__(v1, v1 + 11) ^ 1 ) + if ( (11 * player->lastOpenedSpellbookPage) || ((11 * player->lastOpenedSpellbookPage) + 11) )//??? maybe structure need fix { for ( uint i = 1; i - 1 < 11; ++i ) { - if ( *(&player->_guilds_member_bits[v1 + 63] + i) ) + if ( *(&player->_guilds_member_bits[(11 * player->lastOpenedSpellbookPage) + 63] + i) ) { - v5 = (Texture *)dword_506408[i]; - if ( v5 != v3 ) + SpellTexture = (Texture *)dword_506408[i]; + if ( SpellTexture != PendingTexture ) { if ( quick_spell_at_page == i ) { @@ -157,7 +145,7 @@ else { v23 = dword_506408[i]; - v6 = v5; + v6 = SpellTexture; } if ( v6->pLevelOfDetail0_prolly_alpha_mask ) { @@ -175,50 +163,41 @@ } } - v9 = pMouse->GetCursorPos(&a2); - v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF; + v10 = pRenderer->pActiveZBuffer[pMouse->GetCursorPos(&a2)->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF; if ( v10 ) { - v11 = dword_5063D8[v10]; - if ( v11->pLevelOfDetail0_prolly_alpha_mask ) + if ( dword_5063D8[v10]->pLevelOfDetail0_prolly_alpha_mask ) { - v21 = dword_5063D8[v10]; - v12 = player->lastOpenedSpellbookPage; - v20 = pViewport->uViewportTL_Y + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Ypos; - v18 = pViewport->uViewportTL_X + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Xpos; - if ( BYTE1(v11->pBits) & 2 ) - pRenderer->DrawTextureTransparent(v18, v20, v21); + v20 = pViewport->uViewportTL_Y + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][v10]].Ypos; + v18 = pViewport->uViewportTL_X + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][v10]].Xpos; + if ( BYTE1(dword_5063D8[v10]->pBits) & 2 ) + pRenderer->DrawTextureTransparent(v18, v20, dword_5063D8[v10]); else - pRenderer->DrawTextureIndexed(v18, v20, v21); + pRenderer->DrawTextureIndexed(v18, v20, dword_5063D8[v10]); } } - v13 = 0; + a2.x = (LONG)&player->pActiveSkills[12]; v14 = (unsigned int)&player->pActiveSkills[12]; v15 = (unsigned int)&player->pActiveSkills[12]; - v25 = 0; - do + for ( uint i = 0; i < 9; i++ ) { if ( *(short *)a2.x ) { - if ( player->lastOpenedSpellbookPage == v13 ) + if ( player->lastOpenedSpellbookPage == i ) { - pPageTexture = pTextures_tabs[v13][1]; - v14=texture_tab_coord1[v13][0]; - v15=texture_tab_coord1[v13][1]; + pPageTexture = pTextures_tabs[i][1]; + v14=texture_tab_coord1[i][0]; + v15=texture_tab_coord1[i][1]; } else { - pPageTexture = pTextures_tabs[v13][0]; - v14=texture_tab_coord0[v13][0]; - v15=texture_tab_coord0[v13][1]; + pPageTexture = pTextures_tabs[i][0]; + v14=texture_tab_coord0[i][0]; + v15=texture_tab_coord0[i][1]; } pRenderer->DrawTextureTransparent(v14, v15, pPageTexture); - v13 = v25; } a2.x += 2; - ++v13; - v25 = v13; } - while ( v13 < 9 ); } \ No newline at end of file