comparison Player.cpp @ 1033:3a5c8df8381d

* UI cleans and moves * Deleted many junk global variables.
author Nomad
date Tue, 21 May 2013 23:44:51 +0200
parents 67e33708d815
children aa848c90181f
comparison
equal deleted inserted replaced
1031:f93d17337113 1033:3a5c8df8381d
7685 7685
7686 7686
7687 7687
7688 //----- (00449BB4) -------------------------------------------------------- 7688 //----- (00449BB4) --------------------------------------------------------
7689 bool Player::CompareVariable( enum VariableType VarNum, signed int pValue ) 7689 bool Player::CompareVariable( enum VariableType VarNum, signed int pValue )
7690 { 7690 {
7691 Player *v3; // esi@1 7691 Player *v3; // esi@1
7692 signed int v4; // edi@1 7692 signed int v4; // edi@1
7693 unsigned int v5; // eax@8 7693 unsigned int v5; // eax@8
7694 int v6; // eax@9 7694 int v6; // eax@9
7695 enum CHARACTER_RACE v7; // eax@11 7695 enum CHARACTER_RACE v7; // eax@11
7820 LOBYTE(v6) = CheckHiredNPCSpeciality(pValue); 7820 LOBYTE(v6) = CheckHiredNPCSpeciality(pValue);
7821 return v6; 7821 return v6;
7822 case VAR_NPCs2: 7822 case VAR_NPCs2:
7823 return pNPCStats->pNewNPCData[pValue].Hired(); 7823 return pNPCStats->pNewNPCData[pValue].Hired();
7824 case VAR_MonthEquals|VAR_CurrentSP: 7824 case VAR_MonthEquals|VAR_CurrentSP:
7825 test_bit_value = 0x80u >> ((signed __int16)a1 - 1) % 8; 7825 test_bit_value = 0x80u >> ((signed __int16)pValue - 1) % 8;
7826 our_bit_value = this->field_1A50[((signed __int16)a1 - 1)/8]; 7826 our_bit_value = this->field_1A50[((signed __int16)pValue - 1)/8];
7827 if ( !((unsigned __int8)test_bit_value & our_bit_value) ) 7827 if ( !((unsigned __int8)test_bit_value & our_bit_value) )
7828 return v4 >= pValue; 7828 return v4 >= pValue;
7829 v4 = pValue; 7829 v4 = pValue;
7830 return v4 >= pValue; 7830 return v4 >= pValue;
7831 case VAR_ItemEquipped: 7831 case VAR_ItemEquipped:
7882 } 7882 }
7883 return true; 7883 return true;
7884 } 7884 }
7885 if ( VarNum == VAR_AutoNotes ) 7885 if ( VarNum == VAR_AutoNotes )
7886 { 7886 {
7887 test_bit_value = 0x80u >> ((signed __int16)(a1 - 1) - 1) % 8; 7887 test_bit_value = 0x80u >> ((signed __int16)(pValue - 1) - 1) % 8;
7888 our_bit_value = pParty->_autonote_bits[((signed __int16)(a1 - 1) - 1) /8]; 7888 our_bit_value = pParty->_autonote_bits[((signed __int16)(pValue - 1) - 1) /8];
7889 if ( !((unsigned __int8)test_bit_value & our_bit_value) ) 7889 if ( !((unsigned __int8)test_bit_value & our_bit_value) )
7890 return false; 7890 return false;
7891 return true; 7891 return true;
7892 } 7892 }
7893 if ( VarNum <= VAR_BaseLuck ) 7893 if ( VarNum <= VAR_BaseLuck )
7952 return v4 >= pValue; 7952 return v4 >= pValue;
7953 case VAR_Age: 7953 case VAR_Age:
7954 v12 = GetActualAge(); 7954 v12 = GetActualAge();
7955 goto _j_cmp_against_arg; 7955 goto _j_cmp_against_arg;
7956 case VAR_Award: 7956 case VAR_Award:
7957 test_bit_value = 0x80u >> ((signed __int16)a1 - 1) % 8; 7957 test_bit_value = 0x80u >> ((signed __int16)pValue - 1) % 8;
7958 our_bit_value = this->_guilds_member_bits[((signed __int16)a1 - 1) /8]; 7958 our_bit_value = this->_guilds_member_bits[((signed __int16)pValue - 1) /8];
7959 if ( !((unsigned __int8)test_bit_value & our_bit_value) ) 7959 if ( !((unsigned __int8)test_bit_value & our_bit_value) )
7960 return true; 7960 return true;
7961 return false; 7961 return false;
7962 case VAR_Experience: 7962 case VAR_Experience:
7963 v4 = LODWORD(this->uExperience); 7963 v4 = LODWORD(this->uExperience);