comparison stru6.cpp @ 491:e01730a207c3

Spell animations on portraits drawn when casting
author Nomad
date Wed, 27 Feb 2013 23:28:03 +0200
parents a3939d5067c4
children 90fdb47bfcba 6fa3ff8ef729
comparison
equal deleted inserted replaced
490:cc4b7981c1bb 491:e01730a207c3
1329 //v4 = &array_0[uPlayerID]; 1329 //v4 = &array_0[uPlayerID];
1330 //v4[32].uSpellIconID_ = 0; pPlayerBuffs[]::field_4 1330 //v4[32].uSpellIconID_ = 0; pPlayerBuffs[]::field_4
1331 //v4[32].uSpellID = uSpellID; pPlayerBuffs[]::bRender 1331 //v4[32].uSpellID = uSpellID; pPlayerBuffs[]::bRender
1332 1332
1333 v4 = &pPlayerBuffs[uPlayerID]; 1333 v4 = &pPlayerBuffs[uPlayerID];
1334 v4->field_4 = 0; 1334 v4->uSpellAnimTimeElapsed = 0;
1335 v4->bRender = uSpellID != 0; 1335 v4->bRender = uSpellID != 0;
1336 1336
1337 switch (uSpellID) 1337 switch (uSpellID)
1338 { 1338 {
1339 case SPELL_153: 1339 case SPELL_153:
1592 } 1592 }
1593 1593
1594 //----- (004A902A) -------------------------------------------------------- 1594 //----- (004A902A) --------------------------------------------------------
1595 void stru6::DrawPlayerBuffAnims() 1595 void stru6::DrawPlayerBuffAnims()
1596 { 1596 {
1597 __int16 *v1; // edi@1 1597 for (uint i = 0; i < 4; ++i)
1598 char *v2; // esi@1 1598 {
1599 unsigned int v3; // eax@3 1599 auto buff = pPlayerBuffs + i;
1600 unsigned __int8 v4; // zf@3 1600 if (!buff->bRender)
1601 char v5; // sf@3 1601 continue;
1602 unsigned __int8 v6; // of@3 1602
1603 IconFrame *v7; // eax@4 1603 buff->uSpellAnimTimeElapsed += pEventTimer->uTimeElapsed;
1604 1604 if (buff->uSpellAnimTimeElapsed >= buff->uSpellAnimTime)
1605 uint _it = 0;
1606 v1 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing;
1607 v2 = (char *)&this->pPlayerBuffs[0].uSpellIconID;
1608 do
1609 {
1610 if ( *((short *)v2 - 2) )
1611 { 1605 {
1612 v3 = pEventTimer->uTimeElapsed + *(int *)v2; 1606 buff->bRender = false;
1613 v6 = __OFSUB__(v3, *((int *)v2 + 1)); 1607 continue;
1614 v4 = v3 == *((int *)v2 + 1);
1615 v5 = ((v3 - *((int *)v2 + 1)) & 0x80000000u) != 0;
1616 *(int *)v2 = v3;
1617 if ( (unsigned __int8)(v5 ^ v6) | v4 )
1618 {
1619 v7 = pIconsFrameTable->GetFrame(*((int *)v2 + 2), v3);
1620 pRenderer->DrawTextureTransparent(*v1, 0x181u, &pIcons_LOD->pTextures[v7->uTextureID]);
1621 pOtherOverlayList->bRedraw = true;
1622 }
1623 else
1624 {
1625 *((short *)v2 - 2) = 0;
1626 }
1627 } 1608 }
1628 v2 += 16; 1609
1629 ++v1; 1610 auto icon = pIconsFrameTable->GetFrame(buff->uSpellIconID, buff->uSpellAnimTimeElapsed);
1630 } 1611 pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i], 385, pIcons_LOD->GetTexture(icon->uTextureID));
1631 //while ( (signed int)v1 < (signed int)pBaseHealthByClass ); 1612
1632 while (++_it != 4); 1613 pOtherOverlayList->bRedraw = true;
1614 }
1633 } 1615 }
1634 1616
1635 //----- (004A90A0) -------------------------------------------------------- 1617 //----- (004A90A0) --------------------------------------------------------
1636 void stru6::LoadAnimations() 1618 void stru6::LoadAnimations()
1637 { 1619 {