comparison Player.cpp @ 299:b0db84628733

paperdoll array
author Ritor1
date Tue, 19 Feb 2013 17:11:57 +0600
parents 055cea8660e5
children 4c2cdda88562 2a09e1d6fc8f b7f0c5abca42 72de4ad353c6
comparison
equal deleted inserted replaced
298:055cea8660e5 299:b0db84628733
6816 v1->_health_related = 0; 6816 v1->_health_related = 0;
6817 v1->uFullHealthBonus = 0; 6817 v1->uFullHealthBonus = 0;
6818 } 6818 }
6819 6819
6820 //----- (004907E7) -------------------------------------------------------- 6820 //----- (004907E7) --------------------------------------------------------
6821 __int16 Player::GetStatColor(unsigned int uStat) 6821 unsigned int Player::GetStatColor(int uStat)
6822 { 6822 {
6823 __int16 uWhite; // si@1 6823 __int16 uWhite; // si@1
6824 int attribute_value; // edx@1 6824 int attribute_value; // edx@1
6825 unsigned __int8 v8; // of@1 6825 unsigned __int8 pBaseAttrValue; // of@1
6826 __int16 uGreen; // [sp+8h] [bp-8h]@1 6826 __int16 uGreen; // [sp+8h] [bp-8h]@1
6827 __int16 uRed; // [sp+Ch] [bp-4h]@1 6827 __int16 uRed; // [sp+Ch] [bp-4h]@1
6828 6828
6829 uRed = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0); 6829 uRed = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0);
6830 uGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); 6830 uGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
6831 uWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 6831 uWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
6832 v8 = StatTable[GetRace()][uStat].uBaseValue; 6832 pBaseAttrValue = StatTable[GetRace()][uStat].uBaseValue;
6833 6833
6834 switch (uStat) 6834 switch (uStat)
6835 { 6835 {
6836 case 0: attribute_value = uMight; break; 6836 case 0: attribute_value = uMight; break;
6837 case 1: attribute_value = uIntelligence; break; 6837 case 1: attribute_value = uIntelligence; break;
6840 case 4: attribute_value = uAccuracy; break; 6840 case 4: attribute_value = uAccuracy; break;
6841 case 5: attribute_value = uSpeed; break; 6841 case 5: attribute_value = uSpeed; break;
6842 case 6: attribute_value = uLuck; break; 6842 case 6: attribute_value = uLuck; break;
6843 }; 6843 };
6844 6844
6845 if ( attribute_value == v8 ) 6845 if ( attribute_value == pBaseAttrValue )
6846 return uWhite; 6846 return uWhite;
6847 else if ( attribute_value > v8 ) 6847 else if ( attribute_value > pBaseAttrValue )
6848 return uGreen; 6848 return uGreen;
6849 else 6849 else
6850 return uRed; 6850 return uRed;
6851 } 6851 }
6852 6852