comparison mm7_5.cpp @ 57:8af333180755

Слияние
author Ritor1
date Mon, 21 Jan 2013 20:22:10 +0600
parents 7082a3f95e7c 9b4f8fe32a6e
children 6c2cefdaea3e
comparison
equal deleted inserted replaced
56:7082a3f95e7c 57:8af333180755
544 dword_6BE138 = v10; 544 dword_6BE138 = v10;
545 } 545 }
546 else 546 else
547 { 547 {
548 pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu); 548 pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu);
549 if ( strcmp((const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pGlobalTXT_LocalizationStrings[72]) )// "Empty" 549 if ( strcmp((const char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], pGlobalTXT_LocalizationStrings[72]) )// "Empty"
550 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot); 550 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader[uLoadGameUI_SelectedSlot]);
551 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); 551 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer);
552 } 552 }
553 continue; 553 continue;
554 case UIMSG_LoadGame: 554 case UIMSG_LoadGame:
555 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] ) 555 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] )
5649 int v38; // edi@77 5649 int v38; // edi@77
5650 int v39; // esi@77 5650 int v39; // esi@77
5651 int v40; // eax@77 5651 int v40; // eax@77
5652 int v41; // eax@77 5652 int v41; // eax@77
5653 int v42; // eax@78 5653 int v42; // eax@78
5654 char *v43; // eax@81 5654 Player *v43; // eax@81
5655 Actor *v44; // esi@82 5655 Actor *v44; // esi@82
5656 char *v45; // edi@84 5656 Player *v45; // edi@84
5657 unsigned __int16 v46; // ax@84 5657 unsigned __int16 v46; // ax@84
5658 int v47; // ebx@105 5658 int v47; // ebx@105
5659 int v48; // eax@107 5659 int v48; // eax@107
5660 unsigned __int16 v49; // ax@116 5660 unsigned __int16 v49; // ax@116
5661 int v50; // ebx@123 5661 int v50; // ebx@123
5898 if ( !v42 ) 5898 if ( !v42 )
5899 { 5899 {
5900 v44 = &pActors[v39]; 5900 v44 = &pActors[v39];
5901 if ( a4 == -1 ) 5901 if ( a4 == -1 )
5902 a4 = stru_50C198.which_player_would_attack(v44); 5902 a4 = stru_50C198.which_player_would_attack(v44);
5903 v45 = (char *)&pParty->pPlayers[a4]; 5903 v45 = &pParty->pPlayers[a4];
5904 v77 = Actor::_43B3E0_CalcDamage(v44, v74); 5904 v77 = Actor::_43B3E0_CalcDamage(v44, v74);
5905 v46 = v37->uItemType; 5905 v46 = v37->uItemType;
5906 if ( v37->uItemType == 545 ) 5906 if ( v37->uItemType == 545 )
5907 { 5907 {
5908 LOBYTE(v51) = ((Player *)v45)->GetActualSkillLevel(PLAYER_SKILL_UNARMED); 5908 LOBYTE(v51) = v45->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
5909 v52 = v51; 5909 v52 = v51;
5910 if ( (signed int)SkillToMastery(v51) >= 4 && rand() % 100 < (v52 & 0x3F) ) 5910 if ( (signed int)SkillToMastery(v51) >= 4 && rand() % 100 < (v52 & 0x3F) )
5911 { 5911 {
5912 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[637], v45 + 168); 5912 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[637], v45->pName);
5913 ShowStatusBarString(pTmpBuf, 2u); 5913 ShowStatusBarString(pTmpBuf, 2u);
5914 ((Player *)v45)->PlaySound(6, 0); 5914 v45->PlaySound(6, 0);
5915 return; 5915 return;
5916 } 5916 }
5917 } 5917 }
5918 else 5918 else
5919 { 5919 {
5927 && v46 != 520 5927 && v46 != 520
5928 && v46 != 535 5928 && v46 != 535
5929 && v46 != 540 ) 5929 && v46 != 540 )
5930 goto LABEL_115; 5930 goto LABEL_115;
5931 } 5931 }
5932 if ( !stru_50C198.ActorHitOrMiss(v44, (Player *)v45) ) 5932 if ( !stru_50C198.ActorHitOrMiss(v44, v45) )
5933 return; 5933 return;
5934 if ( *((_QWORD *)v45 + 782) > 0i64 ) 5934 if ( (signed __int64)v45->pPlayerBuffs[13].uExpireTime > 0 )
5935 v77 >>= 1; 5935 v77 >>= 1;
5936 if ( ((Player *)v45)->HasEnchantedItemEquipped(36) ) 5936 if ( v45->HasEnchantedItemEquipped(36) )
5937 v77 >>= 1; 5937 v77 >>= 1;
5938 if ( ((Player *)v45)->HasEnchantedItemEquipped(69) ) 5938 if ( v45->HasEnchantedItemEquipped(69) )
5939 v77 >>= 1; 5939 v77 >>= 1;
5940 if ( ((Player *)v45)->HasItemEquipped(EQUIP_ARMOUR) 5940 if ( v45->HasItemEquipped(EQUIP_ARMOUR)
5941 && *(int *)&v45[36 * *((int *)v45 + 1621) + 496] == 504 ) 5941 && *(_DWORD *)&v45->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v45->pEquipment.uBody + 5] == 504 )
5942 v77 >>= 1; 5942 v77 >>= 1;
5943 v75 = 0; 5943 v75 = 0;
5944 v47 = (int)(v45 + 6472); 5944 v47 = (int)&v45->pEquipment;
5945 do 5945 do
5946 { 5946 {
5947 if ( ((Player *)v45)->HasItemEquipped((ITEM_EQUIP_TYPE)v75) ) 5947 if ( v45->HasItemEquipped((ITEM_EQUIP_TYPE)v75) )
5948 { 5948 {
5949 v48 = *(int *)&v45[36 * *(int *)v47 + 496]; 5949 v48 = *(int *)&v45[36 * *(int *)v47 + 496];
5950 if ( v48 == 520 ) 5950 if ( v48 == 520 )
5951 v77 >>= 1; 5951 v77 >>= 1;
5952 if ( v48 == 531 ) 5952 if ( v48 == 531 )
5953 v77 >>= 1; 5953 v77 >>= 1;
5954 if ( ((Player *)v45)->GetEquippedItemEquipType(v75) == 4 && SkillToMastery(*((short *)v45 + 140)) == 4 ) 5954 if ( v45->GetEquippedItemEquipType(v75) == 4 && SkillToMastery(v45->pActiveSkills[8]) == 4 )
5955 v77 >>= 1; 5955 v77 >>= 1;
5956 } 5956 }
5957 ++v75; 5957 ++v75;
5958 v47 += 4; 5958 v47 += 4;
5959 } 5959 }
5988 else 5988 else
5989 v50 = 4; 5989 v50 = 4;
5990 LABEL_133: 5990 LABEL_133:
5991 if ( !(dword_6BE368_debug_settings_2 & 0x10) ) 5991 if ( !(dword_6BE368_debug_settings_2 & 0x10) )
5992 { 5992 {
5993 v54 = ((Player *)v45)->ReceiveDamage(v77, v50); 5993 v54 = v45->ReceiveDamage(v77, v50);
5994 if ( *((int *)v45 + 1553) >= 0 ) 5994 if ( SHIDWORD(v45->pPlayerBuffs[10].uExpireTime) >= 0 )
5995 { 5995 {
5996 if ( *((int *)v45 + 1553) > 0 || *((int *)v45 + 1552) ) 5996 if ( SHIDWORD(v45->pPlayerBuffs[10].uExpireTime) > 0 || LODWORD(v45->pPlayerBuffs[10].uExpireTime) )
5997 { 5997 {
5998 v55 = v44->uAIState; 5998 v55 = v44->uAIState;
5999 if ( v55 != 5 ) 5999 if ( v55 != 5 )
6000 { 6000 {
6001 if ( v55 != 4 ) 6001 if ( v55 != 4 )
6038 if ( v44->pMonsterInfo.uExp ) 6038 if ( v44->pMonsterInfo.uExp )
6039 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v44->pMonsterInfo.uID].uExp); 6039 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v44->pMonsterInfo.uID].uExp);
6040 v64 = 51; 6040 v64 = 51;
6041 if ( rand() % 100 < 20 ) 6041 if ( rand() % 100 < 20 )
6042 v64 = ((signed int)v44->pMonsterInfo.uHP >= 100) + 1; 6042 v64 = ((signed int)v44->pMonsterInfo.uHP >= 100) + 1;
6043 ((Player *)v45)->PlaySound(v64, 0); 6043 v45->PlaySound(v64, 0);
6044 } 6044 }
6045 } 6045 }
6046 } 6046 }
6047 } 6047 }
6048 } 6048 }
6050 } 6050 }
6051 if ( !v74 6051 if ( !v74
6052 && !(dword_6BE368_debug_settings_2 & 0x10) 6052 && !(dword_6BE368_debug_settings_2 & 0x10)
6053 && v44->pMonsterInfo.uSpecialAttack 6053 && v44->pMonsterInfo.uSpecialAttack
6054 && rand() % 100 < v44->pMonsterInfo.uLevel * v44->pMonsterInfo.uSpecialAttackType ) 6054 && rand() % 100 < v44->pMonsterInfo.uLevel * v44->pMonsterInfo.uSpecialAttackType )
6055 ((Player *)v45)->_48DCF6(v44->pMonsterInfo.uSpecialAttack, v44); 6055 v45->_48DCF6(v44->pMonsterInfo.uSpecialAttack, v44);
6056 if ( !pParty->bTurnBasedModeOn ) 6056 if ( !pParty->bTurnBasedModeOn )
6057 { 6057 {
6058 v65 = ((Player *)v45)->GetActualEndurance(); 6058 v65 = v45->GetActualEndurance();
6059 v66 = (double)(20 - ((Player *)v45)->_48EA1B_get_static_effect(v65)) 6059 v66 = (double)(20 - v45->_48EA1B_get_static_effect(v65))
6060 * flt_6BE3A4_debug_recmod1 6060 * flt_6BE3A4_debug_recmod1
6061 * 2.133333333333333; 6061 * 2.133333333333333;
6062 ((Player *)v45)->SetRecoveryTime((signed __int64)v66); 6062 v45->SetRecoveryTime((signed __int64)v66);
6063 } 6063 }
6064 return; 6064 return;
6065 } 6065 }
6066 v53 = v44->pMonsterInfo.uSpell2ID; 6066 v53 = v44->pMonsterInfo.uSpell2ID;
6067 } 6067 }
6071 if ( v42 != 1 ) 6071 if ( v42 != 1 )
6072 return; 6072 return;
6073 LABEL_80: 6073 LABEL_80:
6074 if ( a4 != -1 ) 6074 if ( a4 != -1 )
6075 { 6075 {
6076 v43 = (char *)&pParty->pPlayers[a4]; 6076 v43 = &pParty->pPlayers[a4];
6077 LABEL_168: 6077 LABEL_168:
6078 a4b = (Player *)v43; 6078 a4b = v43;
6079 if ( v38 != 4 || v37->field_48 != 100 ) 6079 if ( v38 != 4 || v37->field_48 != 100 )
6080 { 6080 {
6081 v70 = ((Player *)v43)->GetMaxHealth(); 6081 v70 = v43->GetMaxHealth();
6082 v68 = _43AFE3_calc_spell_damage(v37->field_48, v37->field_4C, v37->field_50, v70); 6082 v68 = _43AFE3_calc_spell_damage(v37->field_48, v37->field_4C, v37->field_50, v70);
6083 v69 = LOBYTE(pSpellStats->pInfos[v37->field_48].uSchool); 6083 v69 = LOBYTE(pSpellStats->pInfos[v37->field_48].uSchool);
6084 } 6084 }
6085 else 6085 else
6086 { 6086 {
6108 ++a4a; 6108 ++a4a;
6109 } 6109 }
6110 while ( a4a <= 4 ); 6110 while ( a4a <= 4 );
6111 if ( v74 ) 6111 if ( v74 )
6112 { 6112 {
6113 v43 = &stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552]; 6113 v43 = &pParty->pPlayers[*(&v72+rand()%v74)-1];//&stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552];
6114 goto LABEL_168; 6114 goto LABEL_168;
6115 } 6115 }
6116 } 6116 }
6117 6117
6118 6118
16444 pWindow.uFrameY += 12; 16444 pWindow.uFrameY += 12;
16445 pWindow.uFrameHeight -= 12; 16445 pWindow.uFrameHeight -= 12;
16446 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1; 16446 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1;
16447 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1; 16447 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1;
16448 pColor = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFF, 0xFF, 0x9B); 16448 pColor = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFF, 0xFF, 0x9B);
16449 sprintf(pTmpBuf, pStr, pColor, format_4E2D80);//sprintfex - sprintfex(pTmpBuf, format_4E2D80, v25, pStr) 16449 sprintf(pTmpBuf, format_4E2D80, pColor, pStr);
16450 pWindow.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3); 16450 pWindow.DrawText(pFontCreate, 0, 0, 0, pTmpBuf, 3, 0, 0); //DrawTitleText
16451 pWindow.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, pHint, 0, 0, 0); 16451 pWindow.DrawText(pFontSmallnum, 1, pFontLucida->uFontHeight, 0, pHint, 0, 0, 0);
16452 } 16452 }
16453 LABEL_132: 16453 LABEL_132:
16454 dword_507BF0_is_there_popup_onscreen = 1; 16454 dword_507BF0_is_there_popup_onscreen = 1;
16455 viewparams->bRedrawGameUI = 1; 16455 viewparams->bRedrawGameUI = 1;
16456 } 16456 }
17376 int v135; // [sp+18h] [bp-8h]@27 17376 int v135; // [sp+18h] [bp-8h]@27
17377 int v136; // [sp+18h] [bp-8h]@33 17377 int v136; // [sp+18h] [bp-8h]@33
17378 int v137; // [sp+1Ch] [bp-4h]@27 17378 int v137; // [sp+1Ch] [bp-4h]@27
17379 int v138; // [sp+1Ch] [bp-4h]@33 17379 int v138; // [sp+1Ch] [bp-4h]@33
17380 17380
17381 pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * uPlayerID + 40552]; 17381 pPlayer = &pParty->pPlayers[uPlayerID-1];//(Player *)&stru_AA1058[3].pSounds[6972 * uPlayerID + 40552];
17382 v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE); 17382 v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE);
17383 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0)); 17383 pRenderer->DrawTextureIndexed(8, 8, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0));
17384 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 17384 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
17385 sprintf(pTmpBuf, format_4E2DC8, v3); 17385 sprintf(pTmpBuf, format_4E2DC8, v3);
17386 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]); 17386 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]);//^Pi[%s] %s
17387 strcat(pTmpBuf, pTmpBuf2); 17387 strcat(pTmpBuf, pTmpBuf2);
17388 if ( pPlayer->uSkillPoints ) 17388 if ( pPlayer->uSkillPoints )
17389 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); 17389 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
17390 else 17390 else
17391 v4 = 0xFFFFu; 17391 v4 = 0xFFFFu;
17392 sprintf(pTmpBuf2, "\xC" "00000\xD" "180%s: \xC%05d%d\xC" "00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints); 17392 sprintf(pTmpBuf2, "\xC" "00000\xD" "180%s: \xC%05d%d\xC" "00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints);//Skill points
17393 strcat(pTmpBuf, pTmpBuf2); 17393 strcat(pTmpBuf, pTmpBuf2);
17394 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0); 17394 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0);
17395 v5 = pPlayer->GetBaseStrength(); 17395 v5 = pPlayer->GetBaseStrength();
17396 v6 = pPlayer->GetActualMight(); 17396 v6 = pPlayer->GetActualMight();
17397 v7 = pPlayer->GetBaseStrength(); 17397 v7 = pPlayer->GetBaseStrength();
17398 v8 = pPlayer->GetActualMight(); 17398 v8 = pPlayer->GetActualMight();
17399 v9 = UI_GetHealthManaStringColor(v8, v7); 17399 v9 = UI_GetHealthManaStringColor(v8, v7);
17400 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[144], v9, v6, v5); 17400 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], v9, v6, v5);//Might
17401 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0); 17401 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0);
17402 v10 = LOBYTE(pFontArrus->uFontHeight) + 51; 17402 v10 = LOBYTE(pFontArrus->uFontHeight) + 51;
17403 v11 = pPlayer->GetBaseIntelligence(); 17403 v11 = pPlayer->GetBaseIntelligence();
17404 v12 = pPlayer->GetActualIntelligence(); 17404 v12 = pPlayer->GetActualIntelligence();
17405 v13 = pPlayer->GetBaseIntelligence(); 17405 v13 = pPlayer->GetBaseIntelligence();
17406 v14 = pPlayer->GetActualIntelligence(); 17406 v14 = pPlayer->GetActualIntelligence();
17407 v15 = UI_GetHealthManaStringColor(v14, v13); 17407 v15 = UI_GetHealthManaStringColor(v14, v13);
17408 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[116], v15, v12, v11); 17408 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], v15, v12, v11);//Intellect
17409 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0); 17409 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
17410 v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2; 17410 v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2;
17411 v17 = pPlayer->GetBaseWillpower(); 17411 v17 = pPlayer->GetBaseWillpower();
17412 v18 = pPlayer->GetActualWillpower(); 17412 v18 = pPlayer->GetActualWillpower();
17413 v19 = pPlayer->GetBaseWillpower(); 17413 v19 = pPlayer->GetBaseWillpower();
17414 v20 = pPlayer->GetActualWillpower(); 17414 v20 = pPlayer->GetActualWillpower();
17415 v21 = UI_GetHealthManaStringColor(v20, v19); 17415 v21 = UI_GetHealthManaStringColor(v20, v19);
17416 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[163], v21, v18, v17); 17416 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], v21, v18, v17);//
17417 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0); 17417 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0);
17418 v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2; 17418 v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2;
17419 v23 = pPlayer->GetBaseEndurance(); 17419 v23 = pPlayer->GetBaseEndurance();
17420 v24 = pPlayer->GetActualEndurance(); 17420 v24 = pPlayer->GetActualEndurance();
17421 v25 = pPlayer->GetBaseEndurance(); 17421 v25 = pPlayer->GetBaseEndurance();
17422 v26 = pPlayer->GetActualEndurance(); 17422 v26 = pPlayer->GetActualEndurance();
17423 v27 = UI_GetHealthManaStringColor(v26, v25); 17423 v27 = UI_GetHealthManaStringColor(v26, v25);
17424 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[75], v27, v24, v23); 17424 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], v27, v24, v23);//
17425 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0); 17425 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0);
17426 v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2; 17426 v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2;
17427 v29 = pPlayer->GetBaseAccuracy(); 17427 v29 = pPlayer->GetBaseAccuracy();
17428 v30 = pPlayer->GetActualAccuracy(); 17428 v30 = pPlayer->GetActualAccuracy();
17429 v31 = pPlayer->GetBaseAccuracy(); 17429 v31 = pPlayer->GetBaseAccuracy();
17430 v32 = pPlayer->GetActualAccuracy(); 17430 v32 = pPlayer->GetActualAccuracy();
17431 v33 = UI_GetHealthManaStringColor(v32, v31); 17431 v33 = UI_GetHealthManaStringColor(v32, v31);
17432 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[1], v33, v30, v29); 17432 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], v33, v30, v29);
17433 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0); 17433 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0);
17434 v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2; 17434 v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2;
17435 v35 = pPlayer->GetBaseSpeed(); 17435 v35 = pPlayer->GetBaseSpeed();
17436 v36 = pPlayer->GetActualSpeed(); 17436 v36 = pPlayer->GetActualSpeed();
17437 v37 = pPlayer->GetBaseSpeed(); 17437 v37 = pPlayer->GetBaseSpeed();
17438 v38 = pPlayer->GetActualSpeed(); 17438 v38 = pPlayer->GetActualSpeed();
17439 v39 = UI_GetHealthManaStringColor(v38, v37); 17439 v39 = UI_GetHealthManaStringColor(v38, v37);
17440 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[211], v39, v36, v35); 17440 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], v39, v36, v35);
17441 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0); 17441 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0);
17442 v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2; 17442 v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2;
17443 v41 = pPlayer->GetBaseLuck(); 17443 v41 = pPlayer->GetBaseLuck();
17444 v42 = pPlayer->GetActualLuck(); 17444 v42 = pPlayer->GetActualLuck();
17445 v43 = pPlayer->GetBaseLuck(); 17445 v43 = pPlayer->GetBaseLuck();
17446 v44 = pPlayer->GetActualLuck(); 17446 v44 = pPlayer->GetActualLuck();
17447 v45 = UI_GetHealthManaStringColor(v44, v43); 17447 v45 = UI_GetHealthManaStringColor(v44, v43);
17448 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[136], v45, v42, v41); 17448 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], v45, v42, v41);
17449 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0); 17449 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0);
17450 a2 = "%s"; 17450 a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n";
17451 v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5; 17451 v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
17452 if ( pPlayer->GetMaxHealth() >= 1000 ) 17452 if ( pPlayer->GetMaxHealth() >= 1000 )
17453 a2 = (const char *)&unk_4E2EB8; 17453 a2 = "%s\f%05u\r388%d\f00000 / %d\n";
17454 v47 = pPlayer->GetMaxHealth(); 17454 v47 = pPlayer->GetMaxHealth();
17455 v48 = pPlayer->sHealth; 17455 v48 = pPlayer->sHealth;
17456 v49 = pPlayer->GetMaxHealth(); 17456 v49 = pPlayer->GetMaxHealth();
17457 v50 = UI_GetHealthManaStringColor(pPlayer->sHealth, v49); 17457 v50 = UI_GetHealthManaStringColor(pPlayer->sHealth, v49);
17458 sprintf(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47); 17458 sprintf(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47);
17459 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0); 17459 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0);
17460 a2a = "%s"; 17460 a2a = "%s\f%05u\r424%d\f00000 /\t185%d\n";
17461 uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2; 17461 uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2;
17462 if ( pPlayer->GetMaxMana() >= 1000 ) 17462 if ( pPlayer->GetMaxMana() >= 1000 )
17463 a2a = (const char *)&unk_4E2EB8; 17463 a2a = "%s\f%05u\r388%d\f00000 / %d\n";
17464 v51 = pPlayer->GetMaxMana(); 17464 v51 = pPlayer->GetMaxMana();
17465 v52 = pPlayer->sMana; 17465 v52 = pPlayer->sMana;
17466 v53 = pPlayer->GetMaxMana(); 17466 v53 = pPlayer->GetMaxMana();
17467 v54 = UI_GetHealthManaStringColor(pPlayer->sMana, v53); 17467 v54 = UI_GetHealthManaStringColor(pPlayer->sMana, v53);
17468 sprintf(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, v52, v51); 17468 sprintf(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, v52, v51);
17471 v56 = pPlayer->GetBaseAC(); 17471 v56 = pPlayer->GetBaseAC();
17472 v57 = pPlayer->GetActualAC(); 17472 v57 = pPlayer->GetActualAC();
17473 v58 = pPlayer->GetBaseAC(); 17473 v58 = pPlayer->GetBaseAC();
17474 v59 = pPlayer->GetActualAC(); 17474 v59 = pPlayer->GetActualAC();
17475 v60 = UI_GetHealthManaStringColor(v59, v58); 17475 v60 = UI_GetHealthManaStringColor(v59, v58);
17476 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[12], v60, v57, v56); 17476 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], v60, v57, v56);
17477 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0); 17477 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0);
17478 v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2; 17478 v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
17479 v62 = pPlayer->GetMajorConditionIdx(); 17479 v62 = pPlayer->GetMajorConditionIdx();
17480 v63 = aCharacterConditionNames[v62]; 17480 v63 = aCharacterConditionNames[v62];
17481 v64 = GetConditionDrawColor(v62); 17481 v64 = GetConditionDrawColor(v62);
17482 sprintf(pTmpBuf, "%s: ", pGlobalTXT_LocalizationStrings[47], v64, v63); 17482 sprintf(pTmpBuf, "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], v64, v63);
17483 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v61, 0, pTmpBuf, 226, 0); 17483 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v61, 0, pTmpBuf, 226, 0);
17484 v65 = LOBYTE(pFontArrus->uFontHeight) + v61 - 1; 17484 v65 = LOBYTE(pFontArrus->uFontHeight) + v61 - 1;
17485 v66 = pPlayer->uQuickSpell; 17485 v66 = pPlayer->uQuickSpell;
17486 if ( v66 ) 17486 if ( v66 )
17487 v67 = pSpellStats->pInfos[v66].pShortName; 17487 v67 = pSpellStats->pInfos[v66].pShortName;
17492 v68 = pPlayer->GetBaseAge(); 17492 v68 = pPlayer->GetBaseAge();
17493 v69 = pPlayer->GetActualAge(); 17493 v69 = pPlayer->GetActualAge();
17494 v70 = pPlayer->GetBaseAge(); 17494 v70 = pPlayer->GetBaseAge();
17495 v71 = pPlayer->GetActualAge(); 17495 v71 = pPlayer->GetActualAge();
17496 v72 = UI_GetHealthManaStringColor(v71, v70); 17496 v72 = UI_GetHealthManaStringColor(v71, v70);
17497 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[5], v72, v69, v68); 17497 sprintf(pTmpBuf, "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5], v72, v69, v68);
17498 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0); 17498 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0);
17499 a2b = "%s"; 17499 a2b = "%s\f%05u\t100%d\f00000 / %d\n";
17500 uYa = LOBYTE(pFontArrus->uFontHeight) + 48; 17500 uYa = LOBYTE(pFontArrus->uFontHeight) + 48;
17501 if ( pPlayer->GetBaseLevel() > 99 ) 17501 if ( pPlayer->GetBaseLevel() > 99 )
17502 a2b = format_4E2E68; 17502 a2b = format_4E2E68;
17503 v73 = pPlayer->GetBaseLevel(); 17503 v73 = pPlayer->GetBaseLevel();
17504 v74 = pPlayer->GetActualLevel(); 17504 v74 = pPlayer->GetActualLevel();
17513 else 17513 else
17514 v78 = pGlobalTXT_LocalizationStrings[17]; 17514 v78 = pGlobalTXT_LocalizationStrings[17];
17515 v79 = LODWORD(pPlayer->uExperience); 17515 v79 = LODWORD(pPlayer->uExperience);
17516 v80 = v78; 17516 v80 = v78;
17517 v81 = pPlayer->GetExperienceDisplayColor(); 17517 v81 = pPlayer->GetExperienceDisplayColor();
17518 sprintf(pTmpBuf, "%s\r180", v80, v81, v79); 17518 sprintf(pTmpBuf, "%s\r180\f%05d%lu\f00000\n\n", v80, v81, v79);
17519 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYb, 0, pTmpBuf, 0, 0, 0); 17519 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYb, 0, pTmpBuf, 0, 0, 0);
17520 v82 = uYb + 2 * LOBYTE(pFontArrus->uFontHeight); 17520 v82 = uYb + 2 * LOBYTE(pFontArrus->uFontHeight);
17521 v83 = pPlayer->GetActualAttack(0); 17521 v83 = pPlayer->GetActualAttack(0);
17522 sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83); 17522 sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83);
17523 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v82, 0, pTmpBuf, 0, 0, 0); 17523 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v82, 0, pTmpBuf, 0, 0, 0);
17803 unsigned int v9; // esi@25 17803 unsigned int v9; // esi@25
17804 int v10; // eax@27 17804 int v10; // eax@27
17805 int a2; // [sp+10h] [bp-14h]@1 17805 int a2; // [sp+10h] [bp-14h]@1
17806 int v12; // [sp+14h] [bp-10h]@8 17806 int v12; // [sp+14h] [bp-10h]@8
17807 int v13; // [sp+14h] [bp-10h]@19 17807 int v13; // [sp+14h] [bp-10h]@19
17808 unsigned int *v14; // [sp+18h] [bp-Ch]@8 17808 int *v14; // [sp+18h] [bp-Ch]@8
17809 unsigned int *v15; // [sp+18h] [bp-Ch]@14 17809 int *v15; // [sp+18h] [bp-Ch]@14
17810 unsigned int *v16; // [sp+18h] [bp-Ch]@19 17810 int *v16; // [sp+18h] [bp-Ch]@19
17811 unsigned int *v17; // [sp+18h] [bp-Ch]@25 17811 int *v17; // [sp+18h] [bp-Ch]@25
17812 unsigned short *v18; // [sp+1Ch] [bp-8h]@8 17812 Player *v18; // [sp+1Ch] [bp-8h]@8
17813 int a5; // [sp+20h] [bp-4h]@8 17813 int a5; // [sp+20h] [bp-4h]@8
17814 17814
17815 a2 = 0; 17815 a2 = 0;
17816 if ( dword_507CC0 ) 17816 if ( dword_507CC0 )
17817 sub_4196A0(); 17817 sub_4196A0();
17832 v0 = uActiveCharacter; 17832 v0 = uActiveCharacter;
17833 } 17833 }
17834 } 17834 }
17835 v12 = 0; 17835 v12 = 0;
17836 a5 = pGUIWindow_CurrentMenu->uNumControls; 17836 a5 = pGUIWindow_CurrentMenu->uNumControls;
17837 v18 = &pParty->pPlayers[v0-1].pActiveSkills[0]; //&stru_AA1058[3].pSounds[6972 * v0 + 40552]; 17837 v18 = &pParty->pPlayers[v0-1]; //&stru_AA1058[3].pSounds[6972 * v0 + 40552];
17838 v2 = pFontLucida; 17838 v2 = pFontLucida;
17839 v14 = (unsigned int *)dword_4E2A2C; 17839 v14 = dword_4E2A2C;
17840 v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13; 17840 v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
17841 do 17841 do
17842 { 17842 {
17843 if ( v18[*v14 + 132] & 0x3F )//crash 17843 if ( v18->pActiveSkills[*v14] & 0x3F )//crash
17844 { 17844 {
17845 v4 = LOBYTE(v2->uFontHeight); 17845 v4 = LOBYTE(v2->uFontHeight);
17846 v3 = v3 + v4 - 3; 17846 v3 = v3 + v4 - 3;
17847 ++a2; 17847 ++a2;
17848 ++v12; 17848 ++v12;
17849 pGUIWindow_CurrentMenu->CreateButton(0x18u, v3, 0xCCu, v4 - 3, 3, *v14 | 0x8000, 0x79u, *v14, 0, "", 0, 0); 17849 pGUIWindow_CurrentMenu->CreateButton(0x18u, v3, 0xCCu, v4 - 3, 3, *v14 | 0x8000, 0x79u, *v14, 0, "", 0, 0);
17850 v2 = pFontLucida; 17850 v2 = pFontLucida;
17851 } 17851 }
17852 ++v14; 17852 ++v14;
17853 } 17853 }
17854 while ( (signed int)v14 < (signed int)dword_4E2A50 ); 17854 while ( v14 <= &dword_4E2A2C[8] );
17855 if ( !v12 ) 17855 if ( !v12 )
17856 v3 = v3 + LOBYTE(v2->uFontHeight) - 3; 17856 v3 = v3 + LOBYTE(v2->uFontHeight) - 3;
17857 v15 = (unsigned int *)_4E2A80_skills; 17857 v15 = _4E2A80_skills;
17858 v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6; 17858 v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
17859 do 17859 do
17860 { 17860 {
17861 if ( v18[ *v15 + 132] & 0x3F && a2 < 15 ) 17861 if ( v18->pActiveSkills[*v15] & 0x3F && a2 < 15 )
17862 { 17862 {
17863 v6 = LOBYTE(v2->uFontHeight); 17863 v6 = LOBYTE(v2->uFontHeight);
17864 v5 = v5 + v6 - 3; 17864 v5 = v5 + v6 - 3;
17865 ++a2; 17865 ++a2;
17866 pGUIWindow_CurrentMenu->CreateButton(0x18u, v5, 0xCCu, v6 - 3, 3, *v15 | 0x8000, 0x79u, *v15, 0, "", 0, 0); 17866 pGUIWindow_CurrentMenu->CreateButton(0x18u, v5, 0xCCu, v6 - 3, 3, *v15 | 0x8000, 0x79u, *v15, 0, "", 0, 0);
17867 v2 = pFontLucida; 17867 v2 = pFontLucida;
17868 } 17868 }
17869 ++v15; 17869 ++v15;
17870 } 17870 }
17871 while ( (signed int)v15 <= (signed int)_4E2A80_skills[8] ); 17871 while ( v15 <= &_4E2A80_skills[8] );
17872 v13 = 0; 17872 v13 = 0;
17873 v16 = (unsigned int *)dword_4E2A18; 17873 v16 = pArmorSkills;
17874 v7 = 2 * LOBYTE(v2->uFontHeight) + 13; 17874 v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
17875 do 17875 do
17876 { 17876 {
17877 if ( v18[ *v16 + 132] & 0x3F ) 17877 if ( v18->pActiveSkills[*v16] & 0x3F )
17878 { 17878 {
17879 v8 = LOBYTE(v2->uFontHeight); 17879 v8 = LOBYTE(v2->uFontHeight);
17880 v7 = v7 + v8 - 3; 17880 v7 = v7 + v8 - 3;
17881 ++a2; 17881 ++a2;
17882 ++v13; 17882 ++v13;
17883 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v7, 0xCCu, v8 - 3, 3, *v16 | 0x8000, 0x79u, *v16, 0, "", 0, 0); 17883 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v7, 0xCCu, v8 - 3, 3, *v16 | 0x8000, 0x79u, *v16, 0, "", 0, 0);
17884 v2 = pFontLucida; 17884 v2 = pFontLucida;
17885 } 17885 }
17886 ++v16; 17886 ++v16;
17887 } 17887 }
17888 while ( (signed int)v16 < (signed int)dword_4E2A2C ); 17888 while ( v16 <= &pArmorSkills[4] );
17889 if ( !v13 ) 17889 if ( !v13 )
17890 v7 = v7 + LOBYTE(v2->uFontHeight) - 3; 17890 v7 = v7 + LOBYTE(v2->uFontHeight) - 3;
17891 v17 = (unsigned int *)dword_4E2A50; 17891 v17 = dword_4E2A50;
17892 v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6; 17892 v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
17893 do 17893 do
17894 { 17894 {
17895 if ( v18[ *v17 + 132] & 0x3F ) 17895 if ( v18->pActiveSkills[*v17] & 0x3F )
17896 { 17896 {
17897 v10 = LOBYTE(v2->uFontHeight); 17897 v10 = LOBYTE(v2->uFontHeight);
17898 v9 = v9 + v10 - 3; 17898 v9 = v9 + v10 - 3;
17899 ++a2; 17899 ++a2;
17900 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v9, 0xCCu, v10 - 3, 3, *v17 | 0x8000, 0x79u, *v17, 0, "", 0, 0); 17900 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v9, 0xCCu, v10 - 3, 3, *v17 | 0x8000, 0x79u, *v17, 0, "", 0, 0);
17901 v2 = pFontLucida; 17901 v2 = pFontLucida;
17902 } 17902 }
17903 ++v17; 17903 ++v17;
17904 } 17904 }
17905 while ( (signed int)v17 < (signed int)_4E2A80_skills ); 17905 while ( v17 <= &dword_4E2A50[11] );
17906 if ( a2 ) 17906 if ( a2 )
17907 pGUIWindow_CurrentMenu->_41D08F(a2, 1, 0, a5); 17907 pGUIWindow_CurrentMenu->_41D08F(a2, 1, 0, a5);
17908 } 17908 }