comparison mm7_2.cpp @ 983:1462a5f12b65

Character Skills tab drawing fixed.
author Nomad
date Sat, 11 May 2013 17:00:43 +0200
parents 08fd1436ef35
children 9e132060ada3
comparison
equal deleted inserted replaced
982:08fd1436ef35 983:1462a5f12b65
5438 pHostileTXT_Raw = NULL; 5438 pHostileTXT_Raw = NULL;
5439 } 5439 }
5440 } 5440 }
5441 5441
5442 //----- (00458244) -------------------------------------------------------- 5442 //----- (00458244) --------------------------------------------------------
5443 unsigned int __fastcall SkillToMastery(unsigned __int16 a1) 5443 unsigned int SkillToMastery(unsigned int value)
5444 { 5444 {
5445 unsigned int result; // eax@1 5445 switch (value & 0x1C0)
5446 5446 {
5447 result = 1; // Normal 5447 case 0x100: return 4; // Grandmaster
5448 if ( HIBYTE(a1) & 1 ) 5448 case 0x80: return 3; // Master
5449 { 5449 case 0x40: return 2; // Expert
5450 result = 4; // Grandmaster 5450 case 0x00: return 1; // Normal
5451 } 5451 default:
5452 else 5452 assert(false);
5453 { 5453 }
5454 if ( (a1 & 0x80u) == 0 )
5455 {
5456 if ( a1 & 0x40 )
5457 result = 2; // Expert
5458 }
5459 else
5460 {
5461 result = 3; // Master
5462 }
5463 }
5464 return result;
5465 } 5454 }
5466 5455
5467 //----- (0045828B) -------------------------------------------------------- 5456 //----- (0045828B) --------------------------------------------------------
5468 unsigned int __fastcall GetSpellColor(signed int a1) 5457 unsigned int __fastcall GetSpellColor(signed int a1)
5469 { 5458 {