Mercurial > mm7
comparison Player.cpp @ 297:ada52edca264
m
author | Ritor1 |
---|---|
date | Tue, 19 Feb 2013 09:13:51 +0600 |
parents | 0a37a56e9f02 |
children | 055cea8660e5 |
comparison
equal
deleted
inserted
replaced
275:250e49fef6f6 | 297:ada52edca264 |
---|---|
6831 v1->_health_related = 0; | 6831 v1->_health_related = 0; |
6832 v1->uFullHealthBonus = 0; | 6832 v1->uFullHealthBonus = 0; |
6833 } | 6833 } |
6834 | 6834 |
6835 //----- (004907E7) -------------------------------------------------------- | 6835 //----- (004907E7) -------------------------------------------------------- |
6836 __int16 Player::GetStatColor(unsigned int uStat) | 6836 unsigned int Player::GetStatColor(int uStat) |
6837 { | 6837 { |
6838 Player *v2; // edi@1 | 6838 //Player *v2; // edi@1 |
6839 __int16 uWhite; // si@1 | 6839 unsigned int uWhite; // si@1 |
6840 // int uStartingHP; // eax@1 | 6840 // int uStartingHP; // eax@1 |
6841 int v5; // edx@1 | 6841 //int v5; // edx@1 |
6842 // unsigned __int8 v6; // zf@1 | 6842 // unsigned __int8 v6; // zf@1 |
6843 // char v7; // sf@1 | 6843 // char v7; // sf@1 |
6844 unsigned __int8 v8; // of@1 | 6844 int v8; // of@1 |
6845 __int16 result; // ax@2 | 6845 //__int16 result; // ax@2 |
6846 __int16 uGreen; // [sp+8h] [bp-8h]@1 | 6846 unsigned int uGreen; // [sp+8h] [bp-8h]@1 |
6847 __int16 uRed; // [sp+Ch] [bp-4h]@1 | 6847 unsigned int uRed; // [sp+Ch] [bp-4h]@1 |
6848 | 6848 int attribute_value; |
6849 v2 = this; | 6849 |
6850 //v2 = this; | |
6850 uRed = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0); | 6851 uRed = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0); |
6851 uGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); | 6852 uGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); |
6852 uWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 6853 uWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
6853 v8 = stru_4ED7B0.race[GetRace()].attr[uStat].uBaseValue; | 6854 v8 = stru_4ED7B0.race[GetRace()].attr[uStat].uBaseValue; |
6854 | 6855 |
6855 int attribute_value = 0; | |
6856 switch (uStat) | 6856 switch (uStat) |
6857 { | 6857 { |
6858 case 0: attribute_value = uMight; break; | 6858 case 0: attribute_value = uMight; break; |
6859 case 1: attribute_value = uIntelligence; break; | 6859 case 1: attribute_value = uIntelligence; break; |
6860 case 2: attribute_value = uWillpower; break; | 6860 case 2: attribute_value = uWillpower; break; |
6862 case 4: attribute_value = uSpeed; break; | 6862 case 4: attribute_value = uSpeed; break; |
6863 case 5: attribute_value = uAccuracy; break; | 6863 case 5: attribute_value = uAccuracy; break; |
6864 case 6: attribute_value = uLuck; break; | 6864 case 6: attribute_value = uLuck; break; |
6865 }; | 6865 }; |
6866 | 6866 |
6867 v5 = attribute_value; | 6867 if ( attribute_value == v8 ) |
6868 if ( v5 >= v8 ) | 6868 return uWhite; |
6869 { | 6869 else if ( attribute_value > v8 ) |
6870 result = uGreen; | 6870 return uGreen; |
6871 if ( v5 == v8 ) | |
6872 result = uWhite; | |
6873 } | |
6874 else | 6871 else |
6875 { | 6872 return uRed; |
6876 result = uRed; | |
6877 } | |
6878 return result; | |
6879 } | 6873 } |
6880 | 6874 |
6881 //----- (004908A8) -------------------------------------------------------- | 6875 //----- (004908A8) -------------------------------------------------------- |
6882 bool Player::DiscardConditionIfLastsLongerThan(unsigned int uCondition, unsigned __int64 uTime) | 6876 bool Player::DiscardConditionIfLastsLongerThan(unsigned int uCondition, unsigned __int64 uTime) |
6883 { | 6877 { |