Mercurial > mm7
comparison Player.cpp @ 331:72de4ad353c6
Слияние
author | Ritor1 |
---|---|
date | Tue, 19 Feb 2013 22:37:58 +0600 |
parents | 2503214e5258 b0db84628733 |
children | 405d0c4dd1b3 |
comparison
equal
deleted
inserted
replaced
330:2503214e5258 | 331:72de4ad353c6 |
---|---|
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 pBaseValue; // 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 pBaseValue = 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 == pBaseValue ) | 6845 if ( attribute_value == pBaseAttrValue ) |
6846 return uWhite; | 6846 return uWhite; |
6847 else if ( attribute_value > pBaseValue ) | 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 |