Mercurial > mm7
changeset 135:9b0d651821f1
Party creation screen: sorcerer class icon fixed
author | Nomad |
---|---|
date | Mon, 11 Feb 2013 20:23:55 +0200 |
parents | 3ee983b8082b |
children | 541f3df0aa55 |
files | GUIWindow.cpp Party.cpp Player.cpp Player.h Texture.cpp Texture.h mm7_1.cpp mm7_2.cpp mm7_4.cpp mm7_5.cpp mm7_6.cpp |
diffstat | 11 files changed, 194 insertions(+), 188 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIWindow.cpp Mon Feb 11 19:42:28 2013 +0200 +++ b/GUIWindow.cpp Mon Feb 11 20:23:55 2013 +0200 @@ -220,7 +220,7 @@ pRenderer->DrawTextureTransparent(uFrameX + 24, uFrameY + 24, v13); v16 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); sprintf(pTmpBuf, "\xC%05d", v16); - sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]); + sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]); strcat(pTmpBuf, pTmpBuf2); strcat(pTmpBuf, "\xC" "00000\n"); v20 = UI_GetHealthManaStringColor(pPlayer->sHealth, pPlayer->GetMaxHealth());
--- a/Party.cpp Mon Feb 11 19:42:28 2013 +0200 +++ b/Party.cpp Mon Feb 11 20:23:55 2013 +0200 @@ -280,7 +280,7 @@ { Party *pParty; // esi@1 signed __int16 v3; // ax@1 - int pResMagicBase; // ecx@1 + //int pResMagicBase; // ecx@1 Player *pCharacter; // esi@3 signed int uSpellBookPageCount; // edx@5 int pMagicSkills; // eax@5 @@ -317,10 +317,10 @@ pParty->pPlayers[0].uAccuracy = 13; pParty->pPlayers[0].uSpeed = 14; pParty->pPlayers[0].uLuck = 7; - pParty->pPlayers[0].pActiveSkills[9] = 1; // leather - pParty->pPlayers[0].pActiveSkills[33] = 1; // armsmaster - pParty->pPlayers[0].pActiveSkills[5] = 1; // bow - pParty->pPlayers[0].pActiveSkills[1] = 1; // sword + pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather + pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_ARMSMASTER] = 1; // armsmaster + pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_BOW] = 1; // bow + pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_SWORD] = 1; // sword pParty->pPlayers[1].field_1928 = 3; pParty->pPlayers[1].uFace = 3; pParty->pPlayers[1].field_1924 = 3; @@ -333,10 +333,10 @@ pParty->pPlayers[1].uAccuracy = 13; pParty->pPlayers[1].uSpeed = 13; pParty->pPlayers[1].uLuck = 13; - pParty->pPlayers[1].pActiveSkills[9] = 1; // leather - pParty->pPlayers[1].pActiveSkills[34] = 1; // stealing - pParty->pPlayers[1].pActiveSkills[2] = 1; // dagger - pParty->pPlayers[1].pActiveSkills[29] = 1; // disarm trap + pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather + pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_STEALING] = 1; // stealing + pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_DAGGER] = 1; // dagger + pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_TRAP_DISARM] = 1; // disarm trap pParty->pPlayers[2].field_1928 = 14; pParty->pPlayers[2].uFace = 14; pParty->pPlayers[2].field_1924 = 14; @@ -349,15 +349,15 @@ pParty->pPlayers[2].uAccuracy = 7; pParty->pPlayers[2].uSpeed = 13; pParty->pPlayers[2].uLuck = 7; - pParty->pPlayers[2].pActiveSkills[35] = 1; // alchemy - pParty->pPlayers[2].pActiveSkills[9] = 1; // leather - pParty->pPlayers[2].pActiveSkills[18] = 1; // body - pParty->pPlayers[2].pActiveSkills[6] = 1; // mace + pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_ALCHEMY] = 1; // alchemy + pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather + pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_BODY] = 1; // body + pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_MACE] = 1; // mace strcpy(pParty->pPlayers[3].pName, pGlobalTXT_LocalizationStrings[507]); // Alexis v3 = 10; pParty->pPlayers[3].field_1928 = 10; pParty->pPlayers[3].uFace = 10; - pResMagicBase = (int)&pParty->pPlayers[0].sResMagicBase; + //pResMagicBase = (int)&pParty->pPlayers[0].sResMagicBase; pParty->pPlayers[3].uEndurance = 13; pParty->pPlayers[3].uAccuracy = 13; pParty->pPlayers[3].uSpeed = 13; @@ -367,17 +367,17 @@ pParty->pPlayers[3].uIntelligence = 30; pParty->pPlayers[3].uWillpower = 9; pParty->pPlayers[3].uLuck = 7; - pParty->pPlayers[3].pActiveSkills[9] = 1; // leather - pParty->pPlayers[3].pActiveSkills[13] = 1; // air - pParty->pPlayers[3].pActiveSkills[12] = 1; // fire - pParty->pPlayers[3].pActiveSkills[0] = 1; // staff - pCharacter = &pParty->pPlayers[0]; + pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather + pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_AIR] = 1; // air + pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_FIRE] = 1; // fire + pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_STAFF] = 1; // staff //uNumPlayers = 4; //while ( 1 ) for (uNumPlayers = 0; uNumPlayers < 4; uNumPlayers++) { - if ( !pCharacter->uClass ) - *(short *)pResMagicBase = v3; //player[i].pResMagicBase + pCharacter = &pParty->pPlayers[uNumPlayers]; + if (pCharacter->classType == PLAYER_CLASS_KNIGHT) + pCharacter->sResMagicBase = v3; //player[i].pResMagicBase uSpellBookPageCount = 0; //pMagicSkills = pPlayers[uNumPlayers].pActiveSkills[12];// Skills //while ( !*(short *)pMagicSkills ) //player[i].skillFire @@ -521,11 +521,11 @@ } pCharacter->sHealth = pCharacter->GetMaxHealth(); pCharacter->sMana = pCharacter->GetMaxMana(); - pCharacter++; + //pCharacter++; //uNumPlayers--; //if (!uNumPlayers) //break; - pResMagicBase = (int)pCharacter; + //pResMagicBase = (int)pCharacter; v3 = 10; } } @@ -567,10 +567,10 @@ for (uint i = 0; i < 4; ++i) ::pPlayers[i + 1] = &pPlayers[i]; - pPlayers[0].Reset(0); - pPlayers[1].Reset(4); - pPlayers[2].Reset(24); - pPlayers[3].Reset(32); + pPlayers[0].Reset(PLAYER_CLASS_KNIGHT); + pPlayers[1].Reset(PLAYER_CLASS_THEIF); + pPlayers[2].Reset(PLAYER_CLASS_CLERIC); + pPlayers[3].Reset(PLAYER_CLASS_SORCERER); pPlayers[0].uFace = 17; pPlayers[0].field_1924 = 17; pPlayers[0].uVoiceID = 17; @@ -1051,7 +1051,7 @@ v2->uTimeToRecovery = 0; v2->sHealth = v2->GetMaxHealth(); v5 = v2->GetMaxMana(); - v6 = v2->uClass == 35; + v6 = v2->classType == PLAYER_CLASS_LICH; v2->sMana = v5; if ( v6 ) {
--- a/Player.cpp Mon Feb 11 19:42:28 2013 +0200 +++ b/Player.cpp Mon Feb 11 20:23:55 2013 +0200 @@ -752,7 +752,7 @@ int v8; // [sp-4h] [bp-Ch]@3 v3 = this; - if ( this->uClass == uClass ) + if ( this->classType == uClass ) { LABEL_84: result = 1; @@ -1300,7 +1300,8 @@ result = 1; break; case 0x11u: - if ( v3->uClass == 35 || v3->pConditions[16] || v3->pConditions[17] || !v3->pConditions[14] ) + if ( v3->classType == PLAYER_CLASS_LICH || v3->Eradicated() || + v3->Zombie() || !v3->Dead()) goto LABEL_76; memset(v3, 0, 0xA0u); v3->sHealth = v3->GetMaxHealth(); @@ -3276,7 +3277,7 @@ v4 = 0; LABEL_17: v18 = type; - if ( v3->uClass == 35 && v4 >= 200 ) + if ( v3->classType == PLAYER_CLASS_LICH && v4 >= 200 ) return 0; if ( v4 ) { @@ -4276,9 +4277,9 @@ int v6; // esi@1 v3 = _48EA1B_get_static_effect(GetActualEndurance()); - v4 = pBaseHealthPerLevelByClass[uClass] * (GetActualLevel() + v3); + v4 = pBaseHealthPerLevelByClass[classType] * (GetActualLevel() + v3); v6 = uFullHealthBonus - + pBaseHealthByClass[uClass / 4] + + pBaseHealthByClass[classType / 4] + GetSkillBonus(CHARACTER_ATTRIBUTE_HEALTH) + GetItemsBonus(CHARACTER_ATTRIBUTE_HEALTH, 0) + v4; if (v6 <= 0) @@ -4299,7 +4300,7 @@ int v9; // esi@6 int result; // eax@7 - switch (uClass) + switch (classType) { case 5u: case 6u: @@ -4341,10 +4342,10 @@ v6 = GetActualIntelligence(); v3 = _48EA1B_get_static_effect(v6) + v5; LABEL_6: - v7 = pBaseManaPerLevelByClass[uClass] * (GetActualLevel() + v3); + v7 = pBaseManaPerLevelByClass[classType] * (GetActualLevel() + v3); v8 = GetItemsBonus(CHARACTER_ATTRIBUTE_MANA, 0) + v7; v9 = uFullManaBonus - + pBaseManaByClass[uClass / 4] + + pBaseManaByClass[classType / 4] + GetSkillBonus(CHARACTER_ATTRIBUTE_MANA) + v8; if ( v9 < 1 ) @@ -4480,7 +4481,7 @@ v5 = 0; LABEL_20: v7 = GetItemsBonus(a2, 0) + v3; - if ( v2->uClass != 35 || (result = 200, v7 + *(&v2->sResFireBase + v5) <= 200) ) + if ( v2->classType != PLAYER_CLASS_LICH || (result = 200, v7 + *(&v2->sResFireBase + v5) <= 200) ) result = v7 + *(&v2->sResFireBase + v5); return result; } @@ -4554,7 +4555,7 @@ LABEL_28: v7 = GetItemsBonus(a2, 0); result = v10 + GetMagicalBonus(a2) + v7 + v9 + *(&v3->sResFireBonus + v2) + *(&v3->sResFireBase + v2); - if ( v3->uClass == 35 ) + if ( v3->classType == PLAYER_CLASS_LICH ) { if ( result > 200 ) result = 200; @@ -5741,7 +5742,7 @@ } if ( CheckHiredNPCSpeciality(v5) ) v2 += 4; - if ( v9->uClass == 31 && sub_476387() ) + if ( v9->classType == PLAYER_CLASS_31 && sub_476387() ) v2 += 3; LABEL_86: if ( uSkillType <= PLAYER_SKILL_DARK ) @@ -6016,13 +6017,13 @@ LABEL_12: if ( a2 == CHARACTER_ATTRIBUTE_HEALTH ) { - v60 = pBaseHealthPerLevelByClass[v2->uClass]; + v60 = pBaseHealthPerLevelByClass[v2->classType]; v61 = v2->GetBodybuilding(); return v60 * v61; } if ( a2 == CHARACTER_ATTRIBUTE_MANA ) { - v60 = pBaseManaPerLevelByClass[v2->uClass]; + v60 = pBaseManaPerLevelByClass[v2->classType]; v61 = v2->GetMediatation(); return v60 * v61; } @@ -6491,12 +6492,12 @@ } //----- (0049024A) -------------------------------------------------------- -void Player::Reset(unsigned __int8 classID) +void Player::Reset(PLAYER_CLASS_TYPE cls) { sLevelModifier = 0; sAgeModifier = 0; - uClass = classID; + classType = cls; uLuckBonus = 0; uSpeedBonus = 0; uAccuracyBonus = 0; @@ -6513,7 +6514,7 @@ for (uint i = 0; i < 37; ++i) { - if (pSkillAvailabilityPerClass[uClass / 4][i] != 2) + if (pSkillAvailabilityPerClass[classType / 4][i] != 2) continue; pActiveSkills[i] = 1; @@ -6556,7 +6557,7 @@ pActiveSkill = this->pActiveSkills; do { - if ( *pActiveSkill && pSkillAvailabilityPerClass[uClass / 4][result] == 2 ) + if ( *pActiveSkill && pSkillAvailabilityPerClass[classType / 4][result] == 2 ) { if ( v7 == order ) return result; @@ -6576,7 +6577,7 @@ pActiveSkill = this->pActiveSkills; do { - if ( *pActiveSkill && pSkillAvailabilityPerClass[uClass / 4][result] == 1 ) + if ( *pActiveSkill && pSkillAvailabilityPerClass[classType / 4][result] == 1 ) { if ( v5 == order - 2 ) return result; @@ -6593,7 +6594,7 @@ { result = (PLAYER_SKILL_TYPE)0; v3 = 0; - v4 = (char *)pSkillAvailabilityPerClass[uClass / 4]; + v4 = (char *)pSkillAvailabilityPerClass[classType / 4]; do { if ( *v4 == 1 ) @@ -7973,7 +7974,7 @@ v7 = (CHARACTER_RACE)this->uSex; goto _cmp_against_arg2; case VAR_Class: - v7 = (CHARACTER_RACE)this->uClass; + v7 = (CHARACTER_RACE)this->classType; goto _cmp_against_arg2; case VAR_Race: v7 = GetRace(); @@ -8453,7 +8454,7 @@ this->uSex = (PLAYER_SEX)a3; goto LABEL_124; case VAR_Class: - this->uClass = a3; + this->classType = (PLAYER_CLASS_TYPE)a3; if ( (char)a3 != 35 ) goto LABEL_124; v8 = 0; @@ -8863,7 +8864,7 @@ Dst->uSex = (PLAYER_SEX)val; goto _play_anim_and_exit; case VAR_Class: - Dst->uClass = val; + Dst->classType = (PLAYER_CLASS_TYPE)val; goto _play_anim_and_exit; case VAR_CurrentHP: v8 = &Dst->sHealth;
--- a/Player.h Mon Feb 11 19:42:28 2013 +0200 +++ b/Player.h Mon Feb 11 20:23:55 2013 +0200 @@ -60,25 +60,25 @@ /* 328 */ enum PLAYER_SKILL_TYPE { - PLAYER_SKILL_STAFF = 0x0, - PLAYER_SKILL_SWORD = 0x1, - PLAYER_SKILL_DAGGER = 0x2, - PLAYER_SKILL_AXE = 0x3, - PLAYER_SKILL_SPEAR = 0x4, - PLAYER_SKILL_BOW = 0x5, - PLAYER_SKILL_MACE = 0x6, - PLAYER_SKILL_BLASTER = 0x7, - PLAYER_SKILL_SHIELD = 0x8, - PLAYER_SKILL_LEATHER = 0x9, - PLAYER_SKILL_CHAIN = 0xA, - PLAYER_SKILL_PLATE = 0xB, - PLAYER_SKILL_FIRE = 0xC, - PLAYER_SKILL_AIR = 0xD, - PLAYER_SKILL_WATER = 0xE, - PLAYER_SKILL_EARTH = 0xF, - PLAYER_SKILL_SPIRIT = 0x10, + PLAYER_SKILL_STAFF = 0, + PLAYER_SKILL_SWORD = 1, + PLAYER_SKILL_DAGGER = 2, + PLAYER_SKILL_AXE = 3, + PLAYER_SKILL_SPEAR = 4, + PLAYER_SKILL_BOW = 5, + PLAYER_SKILL_MACE = 6, + PLAYER_SKILL_BLASTER = 7, + PLAYER_SKILL_SHIELD = 8, + PLAYER_SKILL_LEATHER = 9, + PLAYER_SKILL_CHAIN = 10, + PLAYER_SKILL_PLATE = 11, + PLAYER_SKILL_FIRE = 12, + PLAYER_SKILL_AIR = 13, + PLAYER_SKILL_WATER = 14, + PLAYER_SKILL_EARTH = 15, + PLAYER_SKILL_SPIRIT = 16, PLAYER_SKILL_MIND = 0x11, - PLAYER_SKILL_BODY = 0x12, + PLAYER_SKILL_BODY = 18, PLAYER_SKILL_LIGHT = 0x13, PLAYER_SKILL_DARK = 0x14, PLAYER_SKILL_ITEM_ID = 0x15, @@ -89,31 +89,32 @@ PLAYER_SKILL_PERCEPTION = 0x1A, PLAYER_SKILL_DIPLOMACY = 0x1B, PLAYER_SKILL_TIEVERY = 0x1C, - PLAYER_SKILL_TRAP_DISARM = 0x1D, + PLAYER_SKILL_TRAP_DISARM = 29, PLAYER_SKILL_DODGE = 0x1E, PLAYER_SKILL_UNARMED = 0x1F, PLAYER_SKILL_MONSTER_ID = 0x20, - PLAYER_SKILL_ARMSMASTER = 0x21, - PLAYER_SKILL_STEALING = 0x22, - PLAYER_SKILL_ALCHEMY = 0x23, + PLAYER_SKILL_ARMSMASTER = 33, + PLAYER_SKILL_STEALING = 34, + PLAYER_SKILL_ALCHEMY = 35, PLAYER_SKILL_LEARNING = 0x24, }; /* 329 */ -enum PLAYER_CLASS_TYPE +enum PLAYER_CLASS_TYPE: unsigned __int8 { - PLAYER_CLASS_KNIGHT = 0x0, - PLAYER_CLASS_THEIF = 0x4, + PLAYER_CLASS_KNIGHT = 0, + PLAYER_CLASS_THEIF = 4, PLAYER_CLASS_BOUNTY_HUNTER = 0x7, PLAYER_CLASS_MONK = 0x8, PLAYER_CLASS_PALADIN = 0xC, PLAYER_CLASS_SHOOTER = 0x10, PLAYER_CLASS_RANGER = 0x14, - PLAYER_CLASS_CLERIC = 0x18, + PLAYER_CLASS_CLERIC = 24, PLAYER_CLASS_PRIEST_OF_MOON = 0x1B, - PLAYER_CLASS_DRUID = 0x1C, - PLAYER_CLASS_SORCERER = 0x20, - PLAYER_CLASS_LICH = 0x23, + PLAYER_CLASS_DRUID = 28, + PLAYER_CLASS_31 = 31, + PLAYER_CLASS_SORCERER = 32, + PLAYER_CLASS_LICH = 35, }; @@ -365,7 +366,7 @@ int GetSexByVoice(); void SetInitialStats(); int SetSexByVoice(); - void Reset(unsigned __int8 uClass); + void Reset(PLAYER_CLASS_TYPE classType); enum PLAYER_SKILL_TYPE GetSkillIdxByOrder(signed int order); void DecreaseAttribute(int eAttribute); int IncreaseAttribute(int eAttribute); @@ -418,6 +419,7 @@ inline bool Dead() {return pConditions[Condition::Condition_Dead] != 0;} inline bool Eradicated() {return pConditions[Condition::Condition_Eradicated] != 0;} + inline bool Zombie() {return pConditions[Condition::Condition_Zombie] != 0;} @@ -425,7 +427,7 @@ unsigned __int64 uExperience; char pName[16]; PLAYER_SEX uSex; - unsigned __int8 uClass; + PLAYER_CLASS_TYPE classType; unsigned __int8 uFace; char field_BB; unsigned __int16 uMight;
--- a/Texture.cpp Mon Feb 11 19:42:28 2013 +0200 +++ b/Texture.cpp Mon Feb 11 20:23:55 2013 +0200 @@ -107,7 +107,7 @@ unsigned int uTextureID_BUTTYES2; unsigned int uTextureID_x_ok_u; Texture *pPlayerPortraits[22]; -Texture *pTexture_IC_KNIGHT[8]; +Texture *pTexture_IC_KNIGHT[9]; Texture *pTexture_MAKESKY; Texture *pTexture_MAKETOP; Texture *pTextures_arrowr[20];
--- a/Texture.h Mon Feb 11 19:42:28 2013 +0200 +++ b/Texture.h Mon Feb 11 20:23:55 2013 +0200 @@ -209,7 +209,7 @@ extern unsigned int uTextureID_BUTTYES2; extern unsigned int uTextureID_x_ok_u; extern Texture *pPlayerPortraits[22]; -extern Texture *pTexture_IC_KNIGHT[8]; +extern Texture *pTexture_IC_KNIGHT[]; extern Texture *pTexture_MAKESKY; extern Texture *pTexture_MAKETOP; extern Texture *pTextures_arrowr[20];
--- a/mm7_1.cpp Mon Feb 11 19:42:28 2013 +0200 +++ b/mm7_1.cpp Mon Feb 11 20:23:55 2013 +0200 @@ -638,11 +638,10 @@ v3 = pIcons_LOD->LoadTexture("fr_award", TEXTURE_16BIT_PALETTE); pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? (int)&pIcons_LOD->pTextures[v3] : 0)); sprintf(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[23], v2);// TODO check args - sprintf( - Source, + sprintf(Source, pGlobalTXT_LocalizationStrings[429], &pParty->pPlayers[v1-1].pName,//&stru_AA1058[3].pSounds[6972 * v1 + 40720], - pClassNames[pParty->pPlayers[v1-1].uClass]);//&pClassNames[stru_AA1058[3].pSounds[6972 * v1 + 40737]]); + pClassNames[pParty->pPlayers[v1-1].classType]);//&pClassNames[stru_AA1058[3].pSounds[6972 * v1 + 40737]]); strcat(pTmpBuf, Source); strcat(pTmpBuf, "\xC" "00000"); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0); @@ -1080,7 +1079,7 @@ v6 = v45 + 47; if ( v43 == v0 ) pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v45 + 47, v0, pGlobalTXT_LocalizationStrings[41], 60, v0);//Êëàññ - pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v6, v0, pClassNames[pPlayer->uClass], 84, v0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v6, v0, pClassNames[pPlayer->classType], 84, v0); v7 = v45 + v6; if ( v43 == v0 ) pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v7, v0, pGlobalTXT_LocalizationStrings[107], 60, v0);//Çäîð. @@ -3725,7 +3724,7 @@ if ( v0 > &pParty->pPlayers[3] ) break; } - if(v0->uClass == 31) + if(v0->classType == PLAYER_CLASS_31) ++uRestUI_FoodRequiredToRest; } if ( CheckHiredNPCSpeciality(0x1Du) )
--- a/mm7_2.cpp Mon Feb 11 19:42:28 2013 +0200 +++ b/mm7_2.cpp Mon Feb 11 20:23:55 2013 +0200 @@ -671,7 +671,7 @@ do { v12 = v8->GetControl(v10)->uControlParam - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[v85->uClass][v12] && !v85->pActiveSkills[v12] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[v85->classType][v12] && !v85->pActiveSkills[v12] ) { v13 = pFontArrus->CalcTextHeight(pSkillNames[v12], &v79, 0, 0); v89 += v13; @@ -698,7 +698,7 @@ v15 = v8->GetControl(v89); v16 = v15; v17 = v15->uControlParam - 36; - if ( !byte_4ED970_skill_learn_ability_by_class_table[v85->uClass][v17] || v85->pActiveSkills[v17] ) + if ( !byte_4ED970_skill_learn_ability_by_class_table[v85->classType][v17] || v85->pActiveSkills[v17] ) { v16->uW = 0; v16->uHeight = 0; @@ -732,7 +732,7 @@ } } v26 = pTmpBuf; - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v85->pName, pClassNames[v85->uClass]); + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v85->pName, pClassNames[v85->classType]); strcat(pTmpBuf, "\n \n"); strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); goto LABEL_97; @@ -1206,7 +1206,7 @@ do { v35 = v30->GetControl(v33)->uControlParam - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[_this->uClass][v35] && !_this->pActiveSkills[v35] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[_this->classType][v35] && !_this->pActiveSkills[v35] ) { v36 = pFontArrus->CalcTextHeight(pSkillNames[v35], &v101, 0, 0); v106.y += v36; @@ -1218,7 +1218,7 @@ if ( !v109 ) { LABEL_105: - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->uClass]); + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->classType]); strcat(pTmpBuf, "\n \n"); strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); v7 = pTmpBuf; @@ -1247,7 +1247,7 @@ v38 = v30->GetControl(v106.y); v39 = v38; v40 = v38->uControlParam - 36; - if ( !byte_4ED970_skill_learn_ability_by_class_table[_this->uClass][v40] || _this->pActiveSkills[v40] ) + if ( !byte_4ED970_skill_learn_ability_by_class_table[_this->classType][v40] || _this->pActiveSkills[v40] ) { v39->uW = 0; v39->uHeight = 0; @@ -1946,7 +1946,7 @@ do { v8 = v2->GetControl(v6)->uControlParam - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[_this->uClass][v8] && !_this->pActiveSkills[v8] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[_this->classType][v8] && !_this->pActiveSkills[v8] ) { v9 = pFontArrus->CalcTextHeight(pSkillNames[v8], &v104, 0, 0); v112 += v9; @@ -1974,7 +1974,7 @@ v11 = v2->GetControl(v112); v12 = v11; v13 = v11->uControlParam - 36; - if ( !byte_4ED970_skill_learn_ability_by_class_table[_this->uClass][v13] || _this->pActiveSkills[v13] ) + if ( !byte_4ED970_skill_learn_ability_by_class_table[_this->classType][v13] || _this->pActiveSkills[v13] ) { v12->uW = 0; v12->uHeight = 0; @@ -2007,7 +2007,7 @@ return result; } } - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->uClass]); + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->classType]); strcat(pTmpBuf, "\n \n"); strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); v21 = pTmpBuf; @@ -2540,7 +2540,7 @@ do { v41 = v37->GetControl(v39)->uControlParam - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[v0->uClass][v41] && !v0->pActiveSkills[v41] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[v0->classType][v41] && !v0->pActiveSkills[v41] ) { v42 = pFontArrus->CalcTextHeight(pSkillNames[v41], &v144, 0, 0); v152 += v42; @@ -2567,7 +2567,7 @@ v44 = v37->GetControl(v152); v45 = v44; v46 = v44->uControlParam - 36; - if ( !byte_4ED970_skill_learn_ability_by_class_table[v0->uClass][v46] || v0->pActiveSkills[v46] ) + if ( !byte_4ED970_skill_learn_ability_by_class_table[v0->classType][v46] || v0->pActiveSkills[v46] ) { v45->uW = 0; v45->uHeight = 0; @@ -2600,7 +2600,7 @@ return; } } - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v0->pName, pClassNames[v0->uClass]); + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v0->pName, pClassNames[v0->classType]); strcat(pTmpBuf, "\n \n"); strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); v11 = 0; @@ -4543,7 +4543,7 @@ v44 = v43 * (100 - v0->GetMerchant()) / 100; if ( v44 < v43 / 3 ) v44 = v43 / 3; - if ( byte_4ED970_skill_learn_ability_by_class_table[v0->uClass][v42] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[v0->classType][v42] ) { pSkill = &v0->pActiveSkills[v42]; if ( !*pSkill ) @@ -5144,7 +5144,7 @@ //for ( i = (int)pParty->pPlayers[0].pName; ; v3 = (char *)i ) for ( i = pParty->pPlayers; ; v3 = i ) { - v4 = pClassNames[v3->uClass]; + v4 = pClassNames[v3->classType]; v5 = v3->GetBaseLevel(); sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[129], i->pName, v5, v4); pWindow.DrawTitleText(
--- a/mm7_4.cpp Mon Feb 11 19:42:28 2013 +0200 +++ b/mm7_4.cpp Mon Feb 11 20:23:55 2013 +0200 @@ -3567,9 +3567,9 @@ v45 = 0; v48 = 0; v46 = 0; - if ( v44 && v21->uClass == 31 ) + if ( v44 && v21->classType == PLAYER_CLASS_31 ) v50 = 1; - if ( v21->uClass == 35 ) + if ( v21->classType == PLAYER_CLASS_LICH ) v48 = 1; v22 = (ITEM_EQUIP_TYPE)0; while ( 1 ) @@ -5312,7 +5312,7 @@ char *v15; // ST14_4@24 size_t v16; // eax@28 int v17; // eax@33 - enum CHARACTER_RACE uNumRace; // eax@35 + //enum CHARACTER_RACE uNumRace; // eax@35 int v19; // eax@36 int v20; // eax@37 int uNumMight; // eax@44 @@ -5342,7 +5342,7 @@ int v51; // eax@49 char *v52; // edi@52 char v53; // al@52 - int uClassType; // edi@53 + PLAYER_CLASS_TYPE uClassType; // edi@53 int v55; // ST0C_4@53 int v57; // eax@53 int v61; // ecx@55 @@ -5382,8 +5382,8 @@ int uX; // [sp+160h] [bp-10h]@18 unsigned int v133; // [sp+164h] [bp-Ch]@25 int pOrder; // [sp+168h] [bp-8h]@14 - char *Str; // [sp+16Ch] [bp-4h]@18 - Player *pPlayer; + //char *Str; // [sp+16Ch] [bp-4h]@18 + //Player *pPlayer; const char *pSkillName; uColor1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xD1, 0xBB, 0x61); @@ -5466,11 +5466,15 @@ //pPlayer = pParty->pPlayers; v119 = 6 * v6 + 169; //do - for ( pPlayer = pParty->pPlayers; (signed int)pPlayer->pName < (signed int)&pParty->pPickedItem.uNumCharges; pPlayer++) - { - Str = pPlayer->pName; - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pOrder + 73, 100, 0, pClassNames[(unsigned __int8)pPlayer->uClass], 0, 0, 0); - pRenderer->DrawTextureTransparent(pOrder + 77, 50, pTexture_IC_KNIGHT[pPlayer->uClass/4]); + + //for ( pPlayer = pParty->pPlayers; (signed int)pPlayer->pName < (signed int)&pParty->pPickedItem.uNumCharges; pPlayer++) + for (int i = 0; i < 4; ++i) + { + auto player = pParty->pPlayers + i; + + //Str = pPlayer->pName; + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pOrder + 73, 100, 0, pClassNames[player->classType], 0, 0, 0); + pRenderer->DrawTextureTransparent(pOrder + 77, 50, pTexture_IC_KNIGHT[player->classType / 4]); v11 = pGUIWindow_CurrentMenu->field_40; if ( v11 && (v12 = pGUIWindow_CurrentMenu->ptr_1C, v12 == v124) ) { @@ -5483,7 +5487,7 @@ if ( v14 == 1 ) { pGUIWindow_CurrentMenu->field_40 = 0; - pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 124, 0, Str, 130, 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 124, 0, player->pName, 130, 0); SetCurrentMenuID(MENU_7); } } @@ -5505,9 +5509,9 @@ while ( v133 < v16 ); } if ( v120 && v126 != v120 ) - strcpy(Str, (const char *)pKeyActionMap->pPressedKeysBuffer); - pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, Str, 130, 0); - *((short *)pPlayer->pName + 3323) = 1; // + strcpy(player->pName, (const char *)pKeyActionMap->pPressedKeysBuffer); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, player->pName, 130, 0); + *(short *)&player->field_1988[27] = 1; // } } else @@ -5518,10 +5522,9 @@ } else { - pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, pPlayer->pName, 130, 0); - } - uNumRace = pPlayer->GetRace(); - switch (uNumRace) + pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, player->pName, 130, 0); + } + switch (player->GetRace()) { case 0: uRaceName = pGlobalTXT_LocalizationStrings[99]; break; // "Human" case 1: uRaceName = pGlobalTXT_LocalizationStrings[103]; break; // "Dwarf" @@ -5532,50 +5535,50 @@ pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder + 72, v128 + 12, 0, pTmpBuf, 130, 0); pTextCenter = pFontCreate->AlignText_Center(0x96, pText); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + uX - 24, 291, uColor1, pText, 0, 0, 0); - uNumMight = pPlayer->GetActualMight(); + uNumMight = player->GetActualMight(); sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[144], v129, uNumMight);// "Might" - LOWORD(v24) = pPlayer->GetStatColor(0); + LOWORD(v24) = player->GetStatColor(0); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 169, v24, pTmpBuf, 0, 0, 0); - v25 = pPlayer->GetActualIntelligence(); + v25 = player->GetActualIntelligence(); sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[116], v129, v25);// "Intellect" - LOWORD(v26) = pPlayer->GetStatColor(1); + LOWORD(v26) = player->GetStatColor(1); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v128 + 169, v26, pTmpBuf, 0, 0, 0); - v27 = pPlayer->GetActualWillpower(); + v27 = player->GetActualWillpower(); sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[163], v129, v27);// "Personality" - LOWORD(v28) = pPlayer->GetStatColor(2); + LOWORD(v28) = player->GetStatColor(2); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 2 * v128 + 169, v28, pTmpBuf, 0, 0, 0); - v29 = pPlayer->GetActualEndurance(); + v29 = player->GetActualEndurance(); sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[75], v129, v29);// "Endurance" - LOWORD(v30) = pPlayer->GetStatColor(3); + LOWORD(v30) = player->GetStatColor(3); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, uY, v30, pTmpBuf, 0, 0, 0); - v31 = pPlayer->GetActualAccuracy(); + v31 = player->GetActualAccuracy(); sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[1], v129, v31);// "Accuracy" - LOWORD(v32) = pPlayer->GetStatColor(4); + LOWORD(v32) = player->GetStatColor(4); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 4 * v128 + 169, v32, pTmpBuf, 0, 0, 0); - v33 = pPlayer->GetActualSpeed(); + v33 = player->GetActualSpeed(); sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[211], v129, v33);// "Speed" - LOWORD(v34) = pPlayer->GetStatColor(5); + LOWORD(v34) = player->GetStatColor(5); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v122, v34, pTmpBuf, 0, 0, 0); - v35 = pPlayer->GetActualLuck(); + v35 = player->GetActualLuck(); sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[136], v129, v35);// "Luck" - LOWORD(v36) = pPlayer->GetStatColor(6u); + LOWORD(v36) = player->GetStatColor(6u); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v119, v36, pTmpBuf, 0, 0, 0); - v37 = pPlayer->GetSkillIdxByOrder(0); + v37 = player->GetSkillIdxByOrder(0); pTextCenter = pFontCreate->AlignText_Center(0x96u, pSkillNames[v37]); sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v37]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, uColorWhite, pTmpBuf, 0, 0, 0); - v39 = pPlayer->GetSkillIdxByOrder(1); + v39 = player->GetSkillIdxByOrder(1); pTextCenter = pFontCreate->AlignText_Center(0x96u, pSkillNames[v39]); sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v39]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, v128 + 311, uColorWhite, pTmpBuf, 0, 0, 0); - v41 = pPlayer->GetSkillIdxByOrder(2); + v41 = player->GetSkillIdxByOrder(2); pTextCenter = pFontCreate->AlignText_Center(150u, pSkillNames[v41]); sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v41]); v45 = uColorGreen; if ( (signed int)v41 >= 37 ) v45 = uColorTeal; pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 2 * v128 + 311, v45, pTmpBuf, 0, 0, 0); - v46 = pPlayer->GetSkillIdxByOrder(3); + v46 = player->GetSkillIdxByOrder(3); pTextCenter = pFontCreate->AlignText_Center(150u, pSkillNames[v46]); sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v46]); v50 = uColorGreen; @@ -5588,6 +5591,7 @@ v129 -= 158; uX += 158; } + //while ( (signed int)pPlayer->pName < (signed int)&pParty->pPickedItem.uNumCharges ); strcpy(pText, pGlobalTXT_LocalizationStrings[41]);// "Class" v51 = strlen(pText) - 1; @@ -5605,7 +5609,7 @@ v51 = pOrder; } } - uClassType = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].uClass; + uClassType = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].classType; pTextCenter = pFontCreate->AlignText_Center(193u, pText); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 324, 395, uColor1, pText, 0, 0, 0); v57 = uColorTeal; @@ -5630,7 +5634,7 @@ pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[24]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, 417, v71, pClassNames[24], 0, 0, 0); v75 = uColorTeal; - if ( uClassType != 28 ) + if ( uClassType != PLAYER_CLASS_DRUID) v75 = uColorWhite; pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[28]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, uColorGreen, v75, pClassNames[28], 0, 0, 0); @@ -5744,18 +5748,18 @@ uPlayerCreationUI_SkySliderPos = 0; uPlayerCreationUI_SelectedCharacter = 0; v0 = LOBYTE(pFontCreate->uFontHeight) - 2; - pTexture_IC_KNIGHT[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_KNIGHT", TEXTURE_16BIT_PALETTE)]; - pTexture_IC_KNIGHT[1] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_THIEF", TEXTURE_16BIT_PALETTE)]; - pTexture_IC_KNIGHT[2] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_MONK", TEXTURE_16BIT_PALETTE)]; - pTexture_IC_KNIGHT[3] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_PALAD", TEXTURE_16BIT_PALETTE)]; - pTexture_IC_KNIGHT[4] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_ARCH", TEXTURE_16BIT_PALETTE)]; - pTexture_IC_KNIGHT[5] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_RANGER", TEXTURE_16BIT_PALETTE)]; - pTexture_IC_KNIGHT[6] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_CLER", TEXTURE_16BIT_PALETTE)]; - pTexture_IC_KNIGHT[7] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_DRUID", TEXTURE_16BIT_PALETTE)]; - pTexture_IC_KNIGHT[8] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_SORC", TEXTURE_16BIT_PALETTE)]; - pTexture_MAKETOP = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("MAKETOP", TEXTURE_16BIT_PALETTE)]; + pTexture_IC_KNIGHT[0] = pIcons_LOD->LoadTexturePtr("IC_KNIGHT", TEXTURE_16BIT_PALETTE); + pTexture_IC_KNIGHT[1] = pIcons_LOD->LoadTexturePtr("IC_THIEF", TEXTURE_16BIT_PALETTE); + pTexture_IC_KNIGHT[2] = pIcons_LOD->LoadTexturePtr("IC_MONK", TEXTURE_16BIT_PALETTE); + pTexture_IC_KNIGHT[3] = pIcons_LOD->LoadTexturePtr("IC_PALAD", TEXTURE_16BIT_PALETTE); + pTexture_IC_KNIGHT[4] = pIcons_LOD->LoadTexturePtr("IC_ARCH", TEXTURE_16BIT_PALETTE); + pTexture_IC_KNIGHT[5] = pIcons_LOD->LoadTexturePtr("IC_RANGER", TEXTURE_16BIT_PALETTE); + pTexture_IC_KNIGHT[6] = pIcons_LOD->LoadTexturePtr("IC_CLER", TEXTURE_16BIT_PALETTE); + pTexture_IC_KNIGHT[7] = pIcons_LOD->LoadTexturePtr("IC_DRUID", TEXTURE_16BIT_PALETTE); + pTexture_IC_KNIGHT[8] = pIcons_LOD->LoadTexturePtr("IC_SORC", TEXTURE_16BIT_PALETTE); + pTexture_MAKETOP = pIcons_LOD->LoadTexturePtr("MAKETOP", TEXTURE_16BIT_PALETTE); + pTexture_MAKESKY = pIcons_LOD->LoadTexturePtr("MAKESKY", TEXTURE_16BIT_PALETTE); uX = 0; - pTexture_MAKESKY = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("MAKESKY", TEXTURE_16BIT_PALETTE)]; do // load PlayerPortraits texture { sprintf(pTmpBuf, "%s01", pPlayerPortraitsNames[uX]); @@ -5860,9 +5864,9 @@ } while ( uControlParamd < 9 ); pPlayerCreationUI_BtnOK = pGUIWindow_CurrentMenu->CreateButton(580, 431, 51, 39, 1, 0, 0x42, 0, 0xD, "", - (Texture *)(uTextureID_BUTTMAKE != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTMAKE] : 0), 0); + (Texture *)(uTextureID_BUTTMAKE != -1 ? &pIcons_LOD->pTextures[uTextureID_BUTTMAKE] : 0), 0); pPlayerCreationUI_BtnReset = pGUIWindow_CurrentMenu->CreateButton(527, 431, 51, 39, 1, 0, 0x43, 0, 0x43, "", - (Texture *)(uTextureID_BUTTMAKE2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTMAKE2] : 0), 0); + (Texture *)(uTextureID_BUTTMAKE2 != -1 ? &pIcons_LOD->pTextures[uTextureID_BUTTMAKE2] : 0), 0); pPlayerCreationUI_BtnMinus = pGUIWindow_CurrentMenu->CreateButton(523, 393, 20, 35, 1, 0, 0x3F, 0, 0x2D, "", pTexture_buttminu, 0); pPlayerCreationUI_BtnPlus = pGUIWindow_CurrentMenu->CreateButton(613, 393, 20, 35, 1, 0, 0x3E, 1, 0x2B, "", pTexture_buttplus, 0); pFontCChar = LoadFont("cchar.fnt", "FONTPAL", 0); @@ -6023,7 +6027,7 @@ for ( pPlayer = &pParty->pPlayers[0]; pPlayer < &pParty->pPlayers[4]; pPlayer++) { //v11 = pPlayer; - if ( !pPlayer->uClass ) + if (pPlayer->classType == PLAYER_CLASS_KNIGHT) pPlayer->sResMagicBase = 10; //*((short *)v10 + 400) = 0; pPlayer->pPlayerBuffs[22].uExpireTime = 0; @@ -9411,7 +9415,7 @@ v9 = 0; while ( 1 ) { - if ( v12->uClass == 35 ) + if ( v12->classType == PLAYER_CLASS_LICH ) { v10 = 0; v6 = pParty->pPlayers;//[0].pInventoryItems[0].field_1A; @@ -9809,7 +9813,7 @@ dword_F8B1B4 = 2000; dword_F8B1B0 = 2; } - v5 = v1->uClass; + v5 = v1->classType; v33 = v5; v6 = byte_4ED970_skill_learn_ability_by_class_table[v5][v3]; *(int *)a1 = v1->pActiveSkills[v3]; @@ -11658,7 +11662,7 @@ v66 = 1000 * v3; if ( (signed __int64)__PAIR__(v6, LODWORD(v0->uExperience)) >= v66 ) { - v8 = v0->uClass % 4 + 1; + v8 = v0->classType % 4 + 1; if ( v8 == 4 ) v8 = 3; v9 = (double)(signed int)i; @@ -11699,7 +11703,7 @@ do { v17 = v13->GetControl(v15)->uControlParam - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[v0->uClass][v17] && !v0->pActiveSkills[v17] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[v0->classType][v17] && !v0->pActiveSkills[v17] ) { v18 = pFontArrus->CalcTextHeight(pSkillNames[v17], &v65, 0, 0); i += v18; @@ -11727,7 +11731,7 @@ v20 = v13->GetControl(i); v21 = v20; v22 = v20->uControlParam - 36; - if ( !byte_4ED970_skill_learn_ability_by_class_table[v0->uClass][v22] || v0->pActiveSkills[v22] ) + if ( !byte_4ED970_skill_learn_ability_by_class_table[v0->classType][v22] || v0->pActiveSkills[v22] ) { v21->uW = 0; v21->uHeight = 0; @@ -11760,7 +11764,7 @@ else { LABEL_76: - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v0->pName, pClassNames[v0->uClass]);// + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v0->pName, pClassNames[v0->classType]);// // "Seek knowledge elsewhere %s the %s" strcat(pTmpBuf, "\n \n"); strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);// "I can offer you nothing further." @@ -12170,7 +12174,7 @@ do { v36 = v31->GetControl(v34)->uControlParam - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[_this->uClass][v36] && !_this->pActiveSkills[v36] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[_this->classType][v36] && !_this->pActiveSkills[v36] ) { v37 = pFontArrus->CalcTextHeight(pSkillNames[v36], &v112, 0, 0); v118 += v37; @@ -12182,7 +12186,7 @@ if ( !v122 ) { LABEL_140: - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->uClass]);// + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->classType]);// // "Seek knowledge elsewhere %s the %s" strcat(pTmpBuf, "\n \n"); strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);// "I can offer you nothing further." @@ -12212,7 +12216,7 @@ v39 = v31->GetControl(v118); v40 = v39; v41 = v39->uControlParam - 36; - if ( !byte_4ED970_skill_learn_ability_by_class_table[_this->uClass][v41] || _this->pActiveSkills[v41] ) + if ( !byte_4ED970_skill_learn_ability_by_class_table[_this->classType][v41] || _this->pActiveSkills[v41] ) { v40->uW = 0; v40->uHeight = 0; @@ -13223,7 +13227,7 @@ if ( !v61 ) { LABEL_64: - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v58->pName, pClassNames[v58->uClass]); + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v58->pName, pClassNames[v58->classType]); strcat(pTmpBuf, "\n \n"); strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); v18 = pTmpBuf; @@ -13415,7 +13419,7 @@ do { v9 = v4->GetControl(v62)->uControlParam - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[v1->uClass][v9] && !v1->pActiveSkills[v9] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[v1->classType][v9] && !v1->pActiveSkills[v9] ) { v10 = pFontArrus->CalcTextHeight(pSkillNames[v9], &v57, 0, 0); v66 = (DDM_DLV_Header *)((char *)v66 + v10); @@ -13445,7 +13449,7 @@ v14 = v12->GetControl(v62); v15 = v14; v16 = v14->uControlParam - 36; - if ( !byte_4ED970_skill_learn_ability_by_class_table[v1->uClass][v16] || v1->pActiveSkills[v16] ) + if ( !byte_4ED970_skill_learn_ability_by_class_table[v1->classType][v16] || v1->pActiveSkills[v16] ) { v15->uW = 0; v15->uHeight = 0; @@ -13479,7 +13483,7 @@ else { LABEL_78: - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->uClass]); + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->classType]); strcat(pTmpBuf, "\n \n"); strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); v22 = WORD2(v59); @@ -13915,7 +13919,7 @@ do { v11 = v8->GetControl(v35)->uControlParam - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[v1->uClass / 3][v11] && !v1->pActiveSkills[v11] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[v1->classType / 3][v11] && !v1->pActiveSkills[v11] ) { v12 = pFontArrus->CalcTextHeight(pSkillNames[v11], &v28, 0, 0); v33 += v12; @@ -13928,7 +13932,7 @@ if ( !v34 ) { LABEL_40: - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->uClass]); + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->classType]); strcat(pTmpBuf, "\n \n"); strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); v22 = v31; @@ -13950,7 +13954,7 @@ { v14 = v8->GetControl(v35); v15 = v14->uControlParam - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[v1->uClass / 3][v15] ) + if ( byte_4ED970_skill_learn_ability_by_class_table[v1->classType / 3][v15] ) { v16 = 0; if ( !v1->pActiveSkills[v15] )
--- a/mm7_5.cpp Mon Feb 11 19:42:28 2013 +0200 +++ b/mm7_5.cpp Mon Feb 11 20:23:55 2013 +0200 @@ -3498,7 +3498,7 @@ goto _sprintex_2args_draw_status_and_continue; case UIMSG_ShowStatus_Player: pPlayer5 = pPlayers[uMessageParam]; - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[429], pPlayer5->pName, pClassNames[pPlayer5->uClass]);// "%s the %s" + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[429], pPlayer5->pName, pClassNames[pPlayer5->classType]);// "%s the %s" strcat(pTmpBuf, ": "); v107 = pPlayer5->GetMajorConditionIdx(); strcat(pTmpBuf, aCharacterConditionNames[v107]); @@ -4149,7 +4149,7 @@ } if ( pUIMessageType == UIMSG_PlayerCreationSelectClass ) { - (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(uNum); + pPlayer[uPlayerCreationUI_SelectedCharacter].Reset((PLAYER_CLASS_TYPE)uNum); pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); continue; } @@ -16438,7 +16438,7 @@ break; case 118: // Character info pStr = pParty->pPlayers[pButton->uControlParam].pName; - pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->uControlParam].uClass]; + pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->uControlParam].classType]; break; } if ( pControlID > 68 && pControlID <= 75 ) //Sellected skills info @@ -16896,19 +16896,19 @@ if ( (v8 & 0x3F) == (v7 & 0x3F) ) { strcpy(a2, "%s\n\n"); - v24 = sub_417AD4(pPlayer->uClass, v2, 1); + v24 = sub_417AD4(pPlayer->classType, v2, 1); sprintf(Source, format_4E2DC8, v24); strcat(a2, Source); strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v25 = sub_417AD4(pPlayer->uClass, v36, 2); + v25 = sub_417AD4(pPlayer->classType, v36, 2); sprintf(Source, format_4E2DC8, v25); strcat(a2, Source); strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v26 = sub_417AD4(pPlayer->uClass, v36, 3); + v26 = sub_417AD4(pPlayer->classType, v36, 3); sprintf(Source, format_4E2DC8, v26); strcat(a2, Source); strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v27 = pPlayer->uClass; + v27 = pPlayer->classType; v28 = v36; v29 = sub_417AD4(v27, v36, 4); sprintf(Source, format_4E2DC8, v29); @@ -16940,20 +16940,20 @@ else { strcpy(a2, "%s\n\n"); - v9 = sub_417AD4(pPlayer->uClass, v2, 1); + v9 = sub_417AD4(pPlayer->classType, v2, 1); sprintf(Source, format_4E2DC8, v9); strcat(a2, Source); strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v10 = sub_417AD4(pPlayer->uClass, v36, 2); + v10 = sub_417AD4(pPlayer->classType, v36, 2); sprintf(Source, format_4E2DC8, v10); strcat(a2, Source); strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v11 = sub_417AD4(pPlayer->uClass, v36, 3); + v11 = sub_417AD4(pPlayer->classType, v36, 3); sprintf(Source, format_4E2DC8, v11); strcat(a2, Source); strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); v12 = v36; - v13 = sub_417AD4(pPlayer->uClass, v36, 4); + v13 = sub_417AD4(pPlayer->classType, v36, 4); sprintf(Source, format_4E2DC8, v13); strcat(a2, Source); strcat(a2, "%s\t%03d:\t%03d%s\t000\n\n"); @@ -17250,7 +17250,7 @@ v24 = pGlobalTXT_LocalizationStrings[207]; goto LABEL_47; case 26: - _y = (Player *)(4 * pPlayers[uActiveCharacter]->uClass); + _y = (Player *)(4 * pPlayers[uActiveCharacter]->classType); v6 = *(char **)((char *)_y->pConditions + (int)pClassNames); v7 = *(char **)((char *)_y->pConditions + (int)pClassDescriptions); LABEL_46: @@ -17411,7 +17411,7 @@ pRenderer->DrawTextureIndexed(8, 8, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0)); v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); sprintf(pTmpBuf, format_4E2DC8, v3); - sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]);//^Pi[%s] %s + sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]);//^Pi[%s] %s strcat(pTmpBuf, pTmpBuf2); if ( pPlayer->uSkillPoints ) v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); @@ -17611,7 +17611,7 @@ v103 = v102; v104 = UI_GetHealthManaStringColor(v135, v102); sprintf(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v103); - if ( pPlayer->uClass == 35 && v137 == 200 ) + if ( pPlayer->classType == PLAYER_CLASS_LICH && v137 == 200 ) { v105 = pGlobalTXT_LocalizationStrings[625]; v106 = UI_GetHealthManaStringColor(v135, 200); @@ -17628,7 +17628,7 @@ v108 = v107; v109 = UI_GetHealthManaStringColor(v136, v107); sprintf(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v108); - if ( pPlayer->uClass == 35 && v138 == 200 ) + if ( pPlayer->classType == PLAYER_CLASS_LICH && v138 == 200 ) { v110 = pGlobalTXT_LocalizationStrings[625]; v111 = UI_GetHealthManaStringColor(v136, 200);
--- a/mm7_6.cpp Mon Feb 11 19:42:28 2013 +0200 +++ b/mm7_6.cpp Mon Feb 11 20:23:55 2013 +0200 @@ -1655,7 +1655,7 @@ while ( 1 ) { v14 = 0; - if ( v27 != -1 && v27 == pPlayers[v13 + 1]->uClass ) + if ( v27 != -1 && v27 == pPlayers[v13 + 1]->classType ) v14 = v4; if ( v25 != -1 && v25 == pPlayers[v13 + 1]->uSex ) v14 = v4;