Mercurial > mm7
changeset 1398:8557d021a31b
m
author | Ritor1 |
---|---|
date | Thu, 18 Jul 2013 09:40:05 +0600 |
parents | 729635c2bb40 |
children | 91ff22cc755b |
files | UI/Books/UISpellBook.cpp mm7_3.cpp |
diffstat | 2 files changed, 25 insertions(+), 57 deletions(-) [+] |
line wrap: on
line diff
--- a/UI/Books/UISpellBook.cpp Tue Jul 16 14:26:13 2013 +0600 +++ b/UI/Books/UISpellBook.cpp Thu Jul 18 09:40:05 2013 +0600 @@ -105,10 +105,10 @@ int v1; // ebp@1 //unsigned int v2; // eax@1 Texture *v3; // edi@1 - int v4; // esi@1 + //int v4; // esi@1 Texture *v5; // eax@3 Texture *v6; // edx@5 - int v7; // eax@8 + //int v7; // eax@8 int v8; // eax@11 POINT *v9; // esi@13 int v10; // eax@13 @@ -118,9 +118,9 @@ unsigned int v14; // esi@18 unsigned int v15; // edi@18 Texture *pPageTexture; // eax@21 - unsigned int v17; // [sp-Ch] [bp-2Ch]@8 + unsigned int pX_pos; // [sp-Ch] [bp-2Ch]@8 unsigned int v18; // [sp-Ch] [bp-2Ch]@15 - unsigned int v19; // [sp-8h] [bp-28h]@8 + 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 @@ -137,49 +137,42 @@ BookUI_Spellbook_DrawCurrentSchoolBackground(); - //v0 = pPlayers[uActiveCharacter]; v1 = 11 * player->lastOpenedSpellbookPage; - //v2 = pIcons_LOD->FindTextureByName("Pending"); v3 = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending")); pRenderer->ClearZBuffer(0, 479); - v4 = 1; if ( __OFSUB__(v1, v1 + 11) ^ 1 ) { - do + for ( uint i = 1; i - 1 < 11; ++i ) { - if ( *(&player->_guilds_member_bits[v1 + 63] + v4) ) + if ( *(&player->_guilds_member_bits[v1 + 63] + i) ) { - v5 = (Texture *)dword_506408[v4]; + v5 = (Texture *)dword_506408[i]; if ( v5 != v3 ) { - if ( quick_spell_at_page == v4 ) + if ( quick_spell_at_page == i ) { - v6 = dword_5063D8[v4]; - v23 = dword_5063D8[v4]; + v6 = dword_5063D8[i]; + v23 = dword_5063D8[i]; } else { - v23 = dword_506408[v4]; + v23 = dword_506408[i]; v6 = v5; } if ( v6->pLevelOfDetail0_prolly_alpha_mask ) { - v7 = player->lastOpenedSpellbookPage; - // v7 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v4]); - v19 = pViewport->uViewportTL_Y + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos; - v17 = pViewport->uViewportTL_X + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos; + pY_pos = pViewport->uViewportTL_Y + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Ypos; + pX_pos = pViewport->uViewportTL_X + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Xpos; if ( BYTE1(v6->pBits) & 2 ) - pRenderer->DrawTextureTransparent(v17, v19, v6); + pRenderer->DrawTextureTransparent(pX_pos, pY_pos, v6); else - pRenderer->DrawTextureIndexed(v17, v19, v6); - pRenderer->DrawMaskToZBuffer(pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos, - pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos, v23, v4); + pRenderer->DrawTextureIndexed(pX_pos, pY_pos, v6); + pRenderer->DrawMaskToZBuffer(pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Xpos, + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Ypos, v23, i); } } } - ++v4; } - while ( v4 - 1 < 11 ); } v9 = pMouse->GetCursorPos(&a2); @@ -190,8 +183,7 @@ if ( v11->pLevelOfDetail0_prolly_alpha_mask ) { v21 = dword_5063D8[v10]; - v12 = player->lastOpenedSpellbookPage; - // v12 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][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 )
--- a/mm7_3.cpp Tue Jul 16 14:26:13 2013 +0600 +++ b/mm7_3.cpp Thu Jul 18 09:40:05 2013 +0600 @@ -3040,24 +3040,14 @@ if ( !v107 && !(BYTE1(pOutdoor->pBModels[pParty->floor_face_pid >> 9].pFaces[(pParty->floor_face_pid >> 3) & 0x3F].uAttributes) & 0x20) ) { - - v90 = -1; - v89 = 1; - v88 = 804; - v87 = 64; - pAudioPlayer->PlaySound((SoundID)v87, v88, v89, v90, 0, 0, 0, 0); + pAudioPlayer->PlaySound((SoundID)64, 804, 1, -1, 0, 0, 0, 0); } else { - v90 = -1; - v89 = 1; - v88 = 804; - v86 = 1; - //LABEL_255: v63 = WorldPosToGridCellZ(pParty->vPosition.y) - 1; v64 = WorldPosToGridCellX(pParty->vPosition.x); - v87 = pOutdoor->GetSoundIdByPosition(v64, v63, v86); - pAudioPlayer->PlaySound((SoundID)v87, v88, v89, v90, 0, 0, 0, 0); + v87 = pOutdoor->GetSoundIdByPosition(v64, v63, 1); + pAudioPlayer->PlaySound((SoundID)v87, 804, 1, -1, 0, 0, 0, 0); } } else @@ -3067,29 +3057,16 @@ if ( v107 || BYTE1(pOutdoor->pBModels[pParty->floor_face_pid >> 9].pFaces[(pParty->floor_face_pid >> 3) & 0x3F].uAttributes) & 0x20 ) { - - v90 = -1; - v89 = 1; - v88 = 804; - v86 = 0; v63 = WorldPosToGridCellZ(pParty->vPosition.y) - 1; v64 = WorldPosToGridCellX(pParty->vPosition.x); - v87 = pOutdoor->GetSoundIdByPosition(v64, v63, v86); - pAudioPlayer->PlaySound((SoundID)v87, v88, v89, v90, 0, 0, 0, 0); + v87 = pOutdoor->GetSoundIdByPosition(v64, v63, 0); + pAudioPlayer->PlaySound((SoundID)v87, 804, 1, -1, 0, 0, 0, 0); } else - { - v90 = -1; - v89 = 1; - v88 = 804; - v87 = 103; - //LABEL_257: - pAudioPlayer->PlaySound((SoundID)v87, v88, v89, v90, 0, 0, 0, 0); - } + pAudioPlayer->PlaySound((SoundID)103, 804, 1, -1, 0, 0, 0, 0); } else { - //LABEL_344: pAudioPlayer->_4AA258(804); pParty->walk_sound_timer = 64; } @@ -3152,8 +3129,7 @@ do { v110 = (*v74)->GetMaxHealth(); - (*v74)->ReceiveDamage( - (signed int)((pParty->uFallStartY - v70) * (unsigned __int64)(signed __int64)((double)v110 * 0.1)) / 256, + (*v74)->ReceiveDamage((signed int)((pParty->uFallStartY - v70) * (unsigned __int64)(signed __int64)((double)v110 * 0.1)) / 256, DMGT_PHISYCAL); v75 = (*v74)->GetActualEndurance(); v110 = 20 - (*v74)->GetParameterBonus(v75);