Mercurial > mm7
diff Player.cpp @ 1393:28f87f5234a1
More hardcoded UI colors moved to varibables.
author | Nomad |
---|---|
date | Thu, 18 Jul 2013 16:11:57 +0200 |
parents | 60d4885eb107 |
children | 7cc3b01a92ac |
line wrap: on
line diff
--- a/Player.cpp Thu Jul 18 14:43:06 2013 +0200 +++ b/Player.cpp Thu Jul 18 16:11:57 2013 +0200 @@ -5753,17 +5753,9 @@ //----- (004907E7) -------------------------------------------------------- unsigned int Player::GetStatColor(int uStat) { - __int16 uWhite; // si@1 int attribute_value; // edx@1 - unsigned __int8 pBaseAttrValue; // of@1 - __int16 uGreen; // [sp+8h] [bp-8h]@1 - __int16 uRed; // [sp+Ch] [bp-4h]@1 - - uRed = TargetColor(255, 35, 0); - uGreen = TargetColor(0, 255, 0); - uWhite = TargetColor(255, 255, 255); - pBaseAttrValue = StatTable[GetRace()][uStat].uBaseValue; - + + int base_attribute_value = StatTable[GetRace()][uStat].uBaseValue; switch (uStat) { case 0: attribute_value = uMight; break; @@ -5775,12 +5767,12 @@ case 6: attribute_value = uLuck; break; }; - if ( attribute_value == pBaseAttrValue ) - return uWhite; - else if ( attribute_value > pBaseAttrValue ) - return uGreen; + if (attribute_value == base_attribute_value) + return ui_character_stat_default_color; + else if (attribute_value > base_attribute_value) + return ui_character_stat_buffed_color; else - return uRed; + return ui_character_stat_debuffed_color; } //----- (004908A8) -------------------------------------------------------- @@ -5788,7 +5780,7 @@ { if ( pConditions[uCondition] && (uTime < pConditions[uCondition]) ) { - pConditions[uCondition]=0i64; + pConditions[uCondition] = 0i64; return true; } else