Mercurial > mm7
diff stru6.cpp @ 493:59649750a054
Merge
author | Gloval |
---|---|
date | Thu, 28 Feb 2013 01:39:18 +0400 |
parents | e01730a207c3 |
children | 90fdb47bfcba 6fa3ff8ef729 |
line wrap: on
line diff
--- a/stru6.cpp Thu Feb 28 01:38:46 2013 +0400 +++ b/stru6.cpp Thu Feb 28 01:39:18 2013 +0400 @@ -1331,17 +1331,17 @@ //v4[32].uSpellID = uSpellID; pPlayerBuffs[]::bRender v4 = &pPlayerBuffs[uPlayerID]; - v4->field_4 = 0; + v4->uSpellAnimTimeElapsed = 0; v4->bRender = uSpellID != 0; switch (uSpellID) { - case 153: + case SPELL_153: __debugbreak(); // spell id == 153 wtf v6 = "zapp"; break; - case 150: + case SPELL_150: __debugbreak(); // spell id == 150 wtf case SPELL_AIR_FEATHER_FALL: case SPELL_SPIRIT_DETECT_LIFE: @@ -1349,7 +1349,7 @@ v6 = "spboost1"; break; - case 151: + case SPELL_151: __debugbreak(); // spell id == 151 wtf case SPELL_AIR_INVISIBILITY: case SPELL_WATER_WATER_WALK: @@ -1357,7 +1357,7 @@ v6 = "spboost2"; break; - case 152: + case SPELL_152: __debugbreak(); // spell id == 152 wtf case SPELL_LIGHT_HOUR_OF_POWER: case SPELL_LIGHT_DAY_OF_THE_GODS: @@ -1594,42 +1594,24 @@ //----- (004A902A) -------------------------------------------------------- void stru6::DrawPlayerBuffAnims() { - __int16 *v1; // edi@1 - char *v2; // esi@1 - unsigned int v3; // eax@3 - unsigned __int8 v4; // zf@3 - char v5; // sf@3 - unsigned __int8 v6; // of@3 - IconFrame *v7; // eax@4 + for (uint i = 0; i < 4; ++i) + { + auto buff = pPlayerBuffs + i; + if (!buff->bRender) + continue; - uint _it = 0; - v1 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing; - v2 = (char *)&this->pPlayerBuffs[0].uSpellIconID; - do - { - if ( *((short *)v2 - 2) ) + buff->uSpellAnimTimeElapsed += pEventTimer->uTimeElapsed; + if (buff->uSpellAnimTimeElapsed >= buff->uSpellAnimTime) { - v3 = pEventTimer->uTimeElapsed + *(int *)v2; - v6 = __OFSUB__(v3, *((int *)v2 + 1)); - v4 = v3 == *((int *)v2 + 1); - v5 = ((v3 - *((int *)v2 + 1)) & 0x80000000u) != 0; - *(int *)v2 = v3; - if ( (unsigned __int8)(v5 ^ v6) | v4 ) - { - v7 = pIconsFrameTable->GetFrame(*((int *)v2 + 2), v3); - pRenderer->DrawTextureTransparent(*v1, 0x181u, &pIcons_LOD->pTextures[v7->uTextureID]); - pOtherOverlayList->bRedraw = true; - } - else - { - *((short *)v2 - 2) = 0; - } + buff->bRender = false; + continue; } - v2 += 16; - ++v1; + + auto icon = pIconsFrameTable->GetFrame(buff->uSpellIconID, buff->uSpellAnimTimeElapsed); + pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i], 385, pIcons_LOD->GetTexture(icon->uTextureID)); + + pOtherOverlayList->bRedraw = true; } - //while ( (signed int)v1 < (signed int)pBaseHealthByClass ); - while (++_it != 4); } //----- (004A90A0) --------------------------------------------------------