Mercurial > might-and-magic-trilogy
comparison Player.cpp @ 85:1265125099c7
22.10.12
author | Ritor1 |
---|---|
date | Mon, 22 Oct 2012 09:18:21 +0600 |
parents | 93bf1d5f6a6d |
children | 7071e4688db6 |
comparison
equal
deleted
inserted
replaced
40:001b45e84aaa | 85:1265125099c7 |
---|---|
6877 | 6877 |
6878 //----- (004907E7) -------------------------------------------------------- | 6878 //----- (004907E7) -------------------------------------------------------- |
6879 __int16 Player::GetStatColor(unsigned int uStat) | 6879 __int16 Player::GetStatColor(unsigned int uStat) |
6880 { | 6880 { |
6881 Player *v2; // edi@1 | 6881 Player *v2; // edi@1 |
6882 __int16 v3; // si@1 | 6882 __int16 uWhite; // si@1 |
6883 int v4; // eax@1 | 6883 // int uStartingHP; // eax@1 |
6884 int v5; // edx@1 | 6884 int v5; // edx@1 |
6885 unsigned __int8 v6; // zf@1 | 6885 // unsigned __int8 v6; // zf@1 |
6886 char v7; // sf@1 | 6886 // char v7; // sf@1 |
6887 unsigned __int8 v8; // of@1 | 6887 unsigned __int8 v8; // of@1 |
6888 __int16 result; // ax@2 | 6888 __int16 result; // ax@2 |
6889 __int16 v10; // [sp+8h] [bp-8h]@1 | 6889 __int16 uGreen; // [sp+8h] [bp-8h]@1 |
6890 __int16 v11; // [sp+Ch] [bp-4h]@1 | 6890 __int16 uRed; // [sp+Ch] [bp-4h]@1 |
6891 | 6891 |
6892 v2 = this; | 6892 v2 = this; |
6893 v11 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0); | 6893 uRed = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0); |
6894 v10 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); | 6894 uGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); |
6895 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 6895 uWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
6896 v4 = stru_4ED7B0.race[0].attr[uStat + 7 * GetRace()].uBaseValue; | 6896 v8 = stru_4ED7B0.race[GetRace()].attr[uStat].uBaseValue; |
6897 v8 = __OFSUB__(v5, v4); | 6897 |
6898 v6 = v5 == v4; | 6898 int attribute_value = 0; |
6899 v7 = v5 - v4 < 0; | 6899 switch (uStat) |
6900 if ( v5 >= v4 ) | 6900 { |
6901 { | 6901 case 0: attribute_value = uMight; break; |
6902 result = v10; | 6902 case 1: attribute_value = uIntelligence; break; |
6903 if ( (unsigned __int8)(v7 ^ v8) | v6 ) | 6903 case 2: attribute_value = uWillpower; break; |
6904 result = v3; | 6904 case 3: attribute_value = uEndurance; break; |
6905 case 4: attribute_value = uSpeed; break; | |
6906 case 5: attribute_value = uAccuracy; break; | |
6907 case 6: attribute_value = uLuck; break; | |
6908 }; | |
6909 | |
6910 v5 = attribute_value; | |
6911 if ( v5 >= v8 ) | |
6912 { | |
6913 result = uGreen; | |
6914 if ( v5 == v8 ) | |
6915 result = uWhite; | |
6905 } | 6916 } |
6906 else | 6917 else |
6907 { | 6918 { |
6908 result = v11; | 6919 result = uRed; |
6909 } | 6920 } |
6910 return result; | 6921 return result; |
6911 } | 6922 } |
6912 | 6923 |
6913 //----- (004908A8) -------------------------------------------------------- | 6924 //----- (004908A8) -------------------------------------------------------- |