Mercurial > mm7
diff UI/UiGame.cpp @ 1458:934074e7fcc1
ModalWindow
__thiscall and __cdecl removed
Some random renames & refactors
author | Nomad |
---|---|
date | Wed, 21 Aug 2013 14:26:36 +0200 |
parents | 110eac219e5a |
children | 2ca62c9e7b3c |
line wrap: on
line diff
--- a/UI/UiGame.cpp Wed Aug 14 00:40:51 2013 +0400 +++ b/UI/UiGame.cpp Wed Aug 21 14:26:36 2013 +0200 @@ -1458,7 +1458,7 @@ //----- (00420EFF) -------------------------------------------------------- -void __cdecl GameUI_WritePointedObjectStatusString() +void GameUI_WritePointedObjectStatusString() { int v1; // ebx@6 GUIWindow *pWindow; // edi@7 @@ -2767,7 +2767,7 @@ } //----- (00441498) -------------------------------------------------------- -void __cdecl GameUI_DrawTorchlightAndWizardEye() +void GameUI_DrawTorchlightAndWizardEye() { if (pCurrentScreen == SCREEN_GAME || pCurrentScreen == SCREEN_MENU @@ -2930,46 +2930,36 @@ } //----- (00417939) -------------------------------------------------------- -signed int __thiscall GetConditionDrawColor(unsigned int uConditionIdx) +int GetConditionDrawColor(unsigned int uConditionIdx) { - unsigned int v1; // ebx@1 - signed int v2; // edi@1 - unsigned int v3; // esi@1 - unsigned int v4; // eax@1 - unsigned int v6; // [sp+Ch] [bp-4h]@1 - - v1 = uConditionIdx; - v2 = 65535; - v3 = TargetColor(0xE1u, 0xCDu, 0x23u); - v6 = TargetColor(0xFFu, 0x23u, 0); - v4 = TargetColor(0, 0xFFu, 0); - switch ( v1 ) + switch (uConditionIdx) { - case 0u: - case 1u: - case 3u: - case 4u: - case 5u: - case 6u: - case 7u: - v2 = v4; - break; - case 2u: - case 8u: - case 9u: - case 0xCu: - case 0xDu: - v2 = v3; - break; - case 0xAu: - case 0xBu: - case 0xEu: - case 0xFu: - case 0x10u: - v2 = v6; - break; - default: - return v2; + case Condition_Zombie: + case Condition_Good: + return ui_character_condition_normal_color; + + case Condition_Cursed: + case Condition_Weak: + case Condition_Fear: + case Condition_Drunk: + case Condition_Insane: + case Condition_Poison1: + case Condition_Disease1: + return ui_character_condition_light_color; + + case Condition_Sleep: + case Condition_Poison2: + case Condition_Disease2: + case Condition_Paralyzed: + case Condition_Unconcious: + return ui_character_condition_moderate_color; + + case Condition_Poison3: + case Condition_Disease3: + case Condition_Dead: + case Condition_Pertified: + case Condition_Eradicated: + return ui_character_condition_severe_color; } - return v2; + assert(false && "Invalid condition"); }