Mercurial > mm7
diff mm7_5.cpp @ 722:70c5a87a1307
Слияние
author | Ritor1 |
---|---|
date | Wed, 20 Mar 2013 17:49:15 +0600 |
parents | 05f7a11f4f20 d6236f6a9882 |
children | 737d7fec67f0 |
line wrap: on
line diff
--- a/mm7_5.cpp Wed Mar 20 17:48:51 2013 +0600 +++ b/mm7_5.cpp Wed Mar 20 17:49:15 2013 +0600 @@ -59,7 +59,7 @@ -static char static_sub_417BB5_out_string[1200]; // static to a file, not sub actually + @@ -6222,340 +6222,6 @@ } } -//----- (0043BCA7) -------------------------------------------------------- -void CharacterUI_LoadPaperdollTextures() -{ - int v0; // edi@7 - enum CHARACTER_RACE pRace; // ebx@7 - signed int pSex; // eax@7 - int v3; // ebx@10 - Player *pPlayer; // edi@12 - unsigned __int8 v5; // cl@12 - int v6; // edi@16 - unsigned int v7; // eax@16 - Player *pPlayer2; // ebx@16 - char *v9; // ebx@16 - char v10; // al@16 - signed int v11; // edi@21 - Player *pPlayer3; // ebx@23 - //Player *pPlayer4; // edi@29 - //int v14; // ebp@29 - //stru331 *v15; // edi@65 - //signed int v16; // ebx@66 - //unsigned int v17; // eax@67 - //unsigned int *v18; // ecx@67 - //unsigned int *v19; // ebx@68 - //int v20; // edi@73 - int v21; // ebp@73 - unsigned int v22; // eax@76 - int v23; // ecx@76 - unsigned int v24; // eax@78 - int v25; // ecx@78 - int v26; // ebx@79 - unsigned int v27; // eax@80 - int v28; // ecx@80 - //int result; // eax@83 - int v30; // [sp+10h] [bp-28h]@5 - //signed int v31; // [sp+10h] [bp-28h]@68 - signed int v32; // [sp+10h] [bp-28h]@75 - signed int v33; // [sp+10h] [bp-28h]@77 - int v34; // [sp+10h] [bp-28h]@79 - //char *v35; // [sp+14h] [bp-24h]@65 - int v36; // [sp+14h] [bp-24h]@75 - int v37; // [sp+14h] [bp-24h]@77 - signed int v38; // [sp+14h] [bp-24h]@79 - //unsigned int *v39; // [sp+18h] [bp-20h]@66 - int *v40; // [sp+18h] [bp-20h]@73 - //unsigned int *v41; // [sp+1Ch] [bp-1Ch]@73 - int v42; // [sp+20h] [bp-18h]@6 - int v43; // [sp+20h] [bp-18h]@73 - char pContainer[128]; // [sp+24h] [bp-14h]@12 - - uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE); - //if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 ) - uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE); - uTextureID_507B04 = uTextureID_right_panel; - v30 = 0; - uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE); - uTextureID_5118C8 = uExitCancelTextureId; - do - { - v42 = v30 + 1; - if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(v30 + 1) ) - { - v0 = v30; - pRace = pPlayers[v30 + 1]->GetRace(); - pSex = pPlayers[v30 + 1]->GetSexByVoice(); - if ( pRace && pRace != 1 && pRace != 2 )//race == 3 - v3 = (pSex != 0) + 3; - else - v3 = (pSex != 0) + 1; - wsprintfA(pContainer, "pc23v%dBod", v3); - papredoll_dbods[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Body texture - wsprintfA(pContainer, "pc23v%dlad", v3); - papredoll_dlads[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand - wsprintfA(pContainer, "pc23v%dlau", v3); - papredoll_dlaus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand2 - wsprintfA(pContainer, "pc23v%drh", v3); - papredoll_drhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Right Hand - wsprintfA(pContainer, "pc23v%dlh", v3); - papredoll_dlhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Fist - wsprintfA(pContainer, "pc23v%dlhu", v3); - papredoll_dlhus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); // Left Fist 2 - pPlayer = pPlayers[v0 + 1]; - v5 = pPlayer->uFace; - if ( v5 == 12 || v5 == 13 ) - papredoll_dbrds[(char)v5] = 0; - papredoll_flying_feet[pPlayer->uFace] = 0; - IsPlayerWearingWatersuit[v30 + 1] = 1; - } - else - { - v6 = v30; - papredoll_dbods[v30] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE); - papredoll_dlads[v30] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE); - papredoll_dlaus[v30] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE); - papredoll_drhs[v30] = pIcons_LOD->LoadTexture(drh_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE); - papredoll_dlhs[v30] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE); - v7 = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE); - pPlayer2 = pPlayers[v30 + 1]; - papredoll_dlhus[v30] = v7; - v9 = (char *)&pPlayer2->uFace; - v10 = *v9; - if ( *v9 == 12 || v10 == 13 ) - { - wsprintfA(pContainer, "pc%02dbrd", v10 + 1); - v9 = (char *)&pPlayers[v6 + 1]->uFace; - papredoll_dbrds[*v9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - } - wsprintfA(pContainer, "item281pc%02d", *v9 + 1); - papredoll_flying_feet[pPlayers[v6 + 1]->uFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - IsPlayerWearingWatersuit[v30 + 1] = 0; - } - ++v30; - } - while ( v42 < 4 ); - uTextureID_ar_up_up = pIcons_LOD->LoadTexture("ar_up_up", TEXTURE_16BIT_PALETTE); - uTextureID_ar_up_dn = pIcons_LOD->LoadTexture("ar_up_dn", TEXTURE_16BIT_PALETTE); - uTextureID_ar_dn_up = pIcons_LOD->LoadTexture("ar_dn_up", TEXTURE_16BIT_PALETTE); - uTextureID_ar_dn_dn = pIcons_LOD->LoadTexture("ar_dn_dn", TEXTURE_16BIT_PALETTE); - papredoll_dbrds[9] = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE); - papredoll_dbrds[7] = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE); - papredoll_dbrds[5] = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE); - papredoll_dbrds[3] = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE); - papredoll_dbrds[1] = pIcons_LOD->LoadTexture("ib-cd5-d", TEXTURE_16BIT_PALETTE); - v11 = 0; - do - { - byte_5111C0[v11] = 0; - if ( pParty->pPickedItem.uItemID != v11 + 66 ) - { - pPlayer3 = pParty->pPlayers; - while ( !sub_43EE15_player_has_item(v11 + 66, pPlayer3, 0) ) - { - ++pPlayer3; - if ( (signed int)pPlayer3 >= (signed int)pParty->pHirelings ) - goto LABEL_28; - } - } - byte_5111C0[v11] = 1; -LABEL_28: - ++v11; - } - while ( v11 < 54 ); - - memset(byte_5111F6, 0, 16); - for (uint i = 0; i < 4; ++i) - { - auto player = pParty->pPlayers + i; - - if (sub_43EE15_player_has_item(ITEM_ARTICACT_GOVERNONS_ARMOR, player, 1)) byte_5111F6[0] = 1; - if (sub_43EE15_player_has_item(ITEM_ARTIFACT_YORUBA, player, 1)) byte_5111F6[1] = 1; - if (sub_43EE15_player_has_item(ITEM_RELIC_HARECS_LEATHER, player, 1)) byte_5111F6[2] = 1; - if (sub_43EE15_player_has_item(ITEM_ARTIFACT_LEAGUE_BOOTS, player, 1)) byte_5111F6[3] = 1; - if (sub_43EE15_player_has_item(ITEM_RELIC_TALEDONS_HELM, player, 1)) byte_5111F6[4] = 1; - if (sub_43EE15_player_has_item(ITEM_RELIC_SCHOLARS_CAP, player, 1)) byte_5111F6[5] = 1; - if (sub_43EE15_player_has_item(ITEM_RELIC_PHYNAXIAN_CROWN, player, 1)) byte_5111F6[6] = 1; - if (sub_43EE15_player_has_item(ITEM_ARTIFACT_MINDS_EYE, player, 1)) byte_5111F6[7] = 1; - if (sub_43EE15_player_has_item(ITEM_RARE_SHADOWS_MASK, player, 1)) byte_5111F6[8] = 1; - if (sub_43EE15_player_has_item(ITEM_RILIC_TITANS_BELT, player, 1)) byte_5111F6[9] = 1; - if (sub_43EE15_player_has_item(ITEM_ARTIFAT_HEROS_BELT, player, 1)) byte_5111F6[10] = 1; - if (sub_43EE15_player_has_item(ITEM_RELIC_TWILIGHT, player, 1)) byte_5111F6[11] = 1; - if (sub_43EE15_player_has_item(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, player, 1)) byte_5111F6[12] = 1; - if (sub_43EE15_player_has_item(ITEM_RARE_SUN_CLOAK, player, 1)) byte_5111F6[13] = 1; - if (sub_43EE15_player_has_item(ITEM_RARE_MOON_CLOAK, player, 1)) byte_5111F6[14] = 1; - if (sub_43EE15_player_has_item(ITEM_RARE_VAMPIRES_CAPE, player, 1)) byte_5111F6[15] = 1; - if (sub_43EE15_player_has_item(ITEM_ELVEN_CHAINMAIL, player, 1)) byte_5111F6[16] = 1; - } - - //v14 = 1; - //v15 = &stru_511698.field_2C; - //v35 = (char *)&stru_511718.field_18; - for (uint i = 0; i < 2; ++i) - { - //v16 = 0; - //v39 = (unsigned int *)(v35 - 24); - for (uint j = 0; j < 5; ++j) - { - _43C91D_FormItemTextureFilename(pContainer, j + 100, i + 1, 0); - //v17 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - //++v16; - //v18 = v39; - //++v39; - //*v18 = v17; - stru_511718[i].texids[j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - } - //while ( v16 < 5 ); - - //*(int *)v35 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 535, i + 1, 0); - stru_511718[i].texid2 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - - //v31 = 0; - //v19 = (unsigned int *)((char *)v15 - 44); - for (uint j = 0; j < 11; ++j) - { - _43C91D_FormItemTextureFilename(pContainer, j + 89, i + 1, 0); - //*v19 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - //++v19; - stru_511698[i].texids[j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - } - //while ( v31 < 11 ); - - _43C91D_FormItemTextureFilename(pContainer, 521, i + 1, 0); - stru_511698[i].texid1 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 522, i + 1, 0); - stru_511698[i].texid2 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 523, i + 1, 0); - stru_511698[i].texid3 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 532, i + 1, 0); - stru_511698[i].texid4 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 544, i + 1, 0); - stru_511698[i].texid5 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - if ( _43ED6F_check_party_races(true) ) - papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); - //v35 += 28; - //++v14; - //++v15; - } - //while ( v14 - 1 < 2 ); - - v43 = 0; - //v20 = 1; - v40 = &dword_511638[0][5]; - v21 = (int)paperdoll_array_511290[0][13]; - //v41 = (unsigned int *)&stru_511718.texid1; - for (uint i = 0; i < 4; ++i) - { - if ( sub_43EDB9_get_some_race_sex_relation_2(i) ) - { - _43C91D_FormItemTextureFilename(pContainer, 524, i + 1, 0); - v32 = 66; - stru_511718[i].texid1 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - v36 = v21 - 152; - do - { - _43C91D_FormItemTextureFilename(pContainer, v32, i + 1, 0); - *(int *)(v36 - 4) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, v32, i + 1, 1); - *(int *)v36 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, v32, i + 1, 2); - v22 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - v23 = v36; - v36 += 12; - ++v32; - *(int *)(v23 + 4) = v22; - } - while ( v32 - 66 < 13 ); - _43C91D_FormItemTextureFilename(pContainer, 516, i + 1, 0); - *(int *)v21 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 516, i + 1, 1); - *(int *)(v21 + 4) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 516, i + 1, 2); - *(int *)(v21 + 8) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 505, i + 1, 0); - *(int *)(v21 + 12) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 505, i + 1, 1); - *(int *)(v21 + 16) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 505, i + 1, 2); - *(int *)(v21 + 20) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 504, i + 1, 0); - *(int *)(v21 + 24) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 504, i + 1, 1); - *(int *)(v21 + 28) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 504, i + 1, 2); - *(int *)(v21 + 32) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 533, i + 1, 0); - *(int *)(v21 + 36) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 533, i + 1, 1); - *(int *)(v21 + 40) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 533, i + 1, 2); - *(int *)(v21 + 44) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - v33 = 0; - v37 = (int)(v40 - 5); - do - { - _43C91D_FormItemTextureFilename(pContainer, v33 + 115, i + 1, 0); - v24 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - ++v33; - v25 = v37; - v37 += 4; - *(int *)v25 = v24; - } - while ( v33 < 5 ); - _43C91D_FormItemTextureFilename(pContainer, 512, i + 1, 0); - v26 = v43; - v38 = 105; - v34 = v43; - *v40 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - do - { - _43C91D_FormItemTextureFilename(pContainer, v38, i + 1, 0); - *(int *)((char *)paperdoll_array_511828 + v34) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, v38, i + 1, 1); - v27 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - v28 = v34; - v34 += 4; - ++v38; - *(int *)((char *)dword_511788 + v28) = v27; - } - while ( v38 - 105 < 5 ); - _43C91D_FormItemTextureFilename(pContainer, 525, i + 1, 0); - *(int *)((char *)&paperdoll_array_511828[0][5] + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 530, i + 1, 0); - *(int *)((char *)&paperdoll_array_511828[0][6] + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 547, i + 1, 0); - *(int *)((char *)&paperdoll_array_511828[0][7] + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 548, i + 1, 0); - *(int *)((char *)&paperdoll_array_511828[0][8] + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 550, i + 1, 0); - *(int *)((char *)&paperdoll_array_511828[0][9] + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 525, i + 1, 1); - *(int *)((char *)&dword_51179C + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 530, i + 1, 1); - *(int *)((char *)&dword_5117A0 + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 547, i + 1, 1); - *(int *)((char *)&dword_5117A4 + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 548, i + 1, 1); - *(int *)((char *)&dword_5117A8 + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - _43C91D_FormItemTextureFilename(pContainer, 550, i + 1, 1); - *(int *)((char *)&dword_5117AC + v43) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - } - else - { - v26 = v43; - } - //v41 += 7; - v40 += 6; - v21 += 204; - //++v20; - //result = v20 - 1; - v43 = v26 + 40; - } - //while ( v20 - 1 < 4 ); - //return result; -} - //----- (0043C91D) -------------------------------------------------------- @@ -6761,2217 +6427,7 @@ return result; } -//----- (0043CC7C) -------------------------------------------------------- -void __fastcall CharacterUI_DrawPaperdoll(unsigned int uPlayerID) -{ - //Player **ppPlayer; // esi@1 - Player *pPlayer; // ebx@1 - //enum CHARACTER_RACE pRace; // edi@1 - signed int pSex; // eax@1 - //int v5; // edi@4 - unsigned int v6; // ecx@9 - int v7; // ecx@10 - unsigned int v8; // eax@14 - int v9; // eax@15 - int v10; // edx@15 - int v11; // ecx@15 - int v12; // eax@15 - unsigned int v13; // edi@15 - unsigned int v14; // ebx@18 - int v15; // ecx@18 - Texture *v16; // ebp@27 - double v17; // st7@29 - int v18; // edi@30 - char *v19; // eax@30 - Texture *v20; // edi@31 - unsigned int v21; // eax@37 - int v22; // edi@38 - int v23; // eax@38 - int v24; // ebx@38 - int v25; // eax@38 - LODFile_IconsBitmaps *v26; // ecx@42 - Texture *v27; // edi@51 - double v28; // st7@51 - char v29; // zf@54 - char *v30; // eax@54 - unsigned int v31; // eax@59 - int v32; // edx@60 - int v33; // eax@65 - int v34; // eax@74 - int v35; // ebx@74 - unsigned int v36; // ecx@74 - int v37; // eax@74 - LODFile_IconsBitmaps *v38; // ecx@78 - Texture *v39; // edi@85 - double v40; // st7@87 - int v41; // edi@88 - Texture *v42; // edi@89 - unsigned int v43; // eax@93 - int v44; // edx@94 - int v45; // eax@98 - int v46; // eax@106 - int v47; // ecx@106 - int v48; // ebx@106 - int v49; // eax@106 - LODFile_IconsBitmaps *v50; // ecx@110 - Texture *v51; // edi@117 - double v52; // st7@119 - int v53; // edi@120 - Texture *v54; // edi@121 - char *v55; // eax@122 - unsigned int v56; // eax@127 - int v57; // edi@128 - int v58; // ecx@128 - int v59; // ebx@129 - int v60; // ecx@132 - int v61; // eax@134 - int v62; // ecx@136 - Texture *v63; // edi@145 - double v64; // st7@147 - int v65; // edi@148 - char *v66; // eax@148 - Texture *v67; // edi@149 - //Player *v68; // ebx@155 - unsigned int v69; // edx@155 - int v70; // edx@156 - unsigned int v71; // eax@160 - int v72; // edi@161 - int v73; // edx@163 - int v74; // ecx@168 - unsigned int v75; // ebx@170 - int v76; // ecx@172 - Texture *v77; // edi@181 - double v78; // st7@183 - int v79; // edi@184 - char *v80; // eax@184 - Texture *v81; // edi@185 - unsigned int v82; // eax@192 - int v83; // eax@193 - int v84; // eax@197 - int v85; // eax@197 - int v86; // ecx@197 - int v87; // eax@197 - int v88; // eax@198 - int v89; // eax@199 - int v90; // edi@201 - int v91; // edi@213 - int v92; // ebx@213 - int v93; // edi@214 - int v94; // ebx@214 - int v95; // eax@214 - char *v96; // edi@226 - double v97; // st7@228 - int v98; // edi@229 - char *v99; // eax@229 - Render *v100; // ecx@229 - Texture *v101; // edi@230 - int v102; // edi@236 - int v103; // eax@237 - int v104; // ecx@237 - int v105; // edx@237 - int v106; // edx@238 - int v107; // edx@239 - int v108; // edx@240 - int v109; // edi@250 - char *v110; // edx@250 - unsigned int v111; // eax@259 - int v112; // eax@260 - int v113; // eax@260 - int v114; // eax@265 - int v115; // eax@274 - int v116; // ebx@274 - unsigned int v117; // edi@274 - double v118; // st7@286 - int v119; // edi@287 - char *v120; // eax@287 - Texture *v121; // edi@288 - unsigned int v122; // edi@295 - int v123; // ebx@297 - int v124; // edi@298 - int v125; // ecx@303 - int v126; // eax@312 - unsigned int v127; // ebx@314 - int v128; // ecx@316 - Texture *v129; // edi@325 - double v130; // st7@327 - int v131; // edi@328 - char *v132; // eax@328 - Texture *v133; // edi@329 - unsigned int v134; // eax@335 - int v135; // eax@336 - int v136; // edx@336 - int v137; // eax@336 - unsigned int v138; // ebx@339 - int v139; // ecx@339 - Texture *v140; // edi@348 - double v141; // st7@350 - int v142; // edi@351 - char *v143; // eax@351 - Texture *v144; // edi@352 - unsigned int v145; // eax@358 - int v146; // eax@359 - int v147; // ecx@359 - int v148; // eax@359 - int v149; // edx@359 - int v150; // ebx@362 - int v151; // ecx@363 - int v152; // ecx@364 - unsigned int v153; // eax@370 - unsigned int v154; // edi@370 - int v155; // eax@370 - LODFile_IconsBitmaps *v156; // ecx@374 - Texture *v157; // ebp@381 - double v158; // st7@383 - Texture *v159; // edi@385 - char *v160; // eax@386 - unsigned int v161; // eax@393 - int v162; // eax@394 - unsigned int v163; // [sp-Ch] [bp-58h]@230 - unsigned int v164; // [sp-Ch] [bp-58h]@233 - signed int v165; // [sp-Ch] [bp-58h]@235 - char *v166; // [sp-8h] [bp-54h]@16 - const char *v167; // [sp-8h] [bp-54h]@23 - const char *v168; // [sp-8h] [bp-54h]@43 - const char *v169; // [sp-8h] [bp-54h]@79 - const char *v170; // [sp-8h] [bp-54h]@111 - const char *v171; // [sp-8h] [bp-54h]@141 - const char *v172; // [sp-8h] [bp-54h]@177 - const char *v173; // [sp-8h] [bp-54h]@222 - int v174; // [sp-8h] [bp-54h]@228 - unsigned int v175; // [sp-8h] [bp-54h]@230 - unsigned int v176; // [sp-8h] [bp-54h]@233 - signed int v177; // [sp-8h] [bp-54h]@235 - const char *v178; // [sp-8h] [bp-54h]@242 - const char *v179; // [sp-8h] [bp-54h]@280 - const char *v180; // [sp-8h] [bp-54h]@321 - char *v181; // [sp-8h] [bp-54h]@337 - const char *v182; // [sp-8h] [bp-54h]@344 - const char *v183; // [sp-8h] [bp-54h]@375 - signed int v184; // [sp-4h] [bp-50h]@66 - signed int v185; // [sp-4h] [bp-50h]@99 - signed int v186; // [sp-4h] [bp-50h]@202 - int v187; // [sp-4h] [bp-50h]@228 - Texture *v188; // [sp-4h] [bp-50h]@230 - Texture *v189; // [sp-4h] [bp-50h]@233 - Texture *v190; // [sp-4h] [bp-50h]@235 - signed int v191; // [sp-4h] [bp-50h]@266 - signed int v192; // [sp-4h] [bp-50h]@304 - unsigned int a3; // [sp+10h] [bp-3Ch]@7 - int a3a; // [sp+10h] [bp-3Ch]@15 - int a3b; // [sp+10h] [bp-3Ch]@38 - unsigned int a3c; // [sp+10h] [bp-3Ch]@74 - unsigned int a3d; // [sp+10h] [bp-3Ch]@106 - int a3e; // [sp+10h] [bp-3Ch]@129 - int a3f; // [sp+10h] [bp-3Ch]@168 - unsigned int a3g; // [sp+10h] [bp-3Ch]@216 - unsigned int a3h; // [sp+10h] [bp-3Ch]@274 - int a3i; // [sp+10h] [bp-3Ch]@312 - int a3j; // [sp+10h] [bp-3Ch]@336 - int a3k; // [sp+10h] [bp-3Ch]@362 - signed int a2; // [sp+14h] [bp-38h]@7 - unsigned int a2a; // [sp+14h] [bp-38h]@15 - Texture *a2b; // [sp+14h] [bp-38h]@49 - int a2c; // [sp+14h] [bp-38h]@74 - int a2d; // [sp+14h] [bp-38h]@106 - int a2e; // [sp+14h] [bp-38h]@129 - int a2f; // [sp+14h] [bp-38h]@168 - int a2g; // [sp+14h] [bp-38h]@214 - int a2h; // [sp+14h] [bp-38h]@274 - Texture *a2i; // [sp+14h] [bp-38h]@284 - int a2j; // [sp+14h] [bp-38h]@312 - int a2k; // [sp+14h] [bp-38h]@336 - //Player *v217; // [sp+18h] [bp-34h]@1 - int v218; // [sp+1Ch] [bp-30h]@15 - int v219; // [sp+1Ch] [bp-30h]@60 - int v220; // [sp+1Ch] [bp-30h]@94 - int v221; // [sp+1Ch] [bp-30h]@128 - int v222; // [sp+1Ch] [bp-30h]@161 - int v223; // [sp+1Ch] [bp-30h]@213 - char v224; // [sp+1Ch] [bp-30h]@237 - int v225; // [sp+1Ch] [bp-30h]@260 - int v226; // [sp+1Ch] [bp-30h]@298 - int v227; // [sp+1Ch] [bp-30h]@336 - int v228; // [sp+1Ch] [bp-30h]@359 - int v229; // [sp+20h] [bp-2Ch]@15 - int v230; // [sp+20h] [bp-2Ch]@38 - int v231; // [sp+20h] [bp-2Ch]@60 - int v232; // [sp+20h] [bp-2Ch]@94 - int v233; // [sp+20h] [bp-2Ch]@128 - int v234; // [sp+20h] [bp-2Ch]@161 - int v235; // [sp+20h] [bp-2Ch]@197 - int v236; // [sp+20h] [bp-2Ch]@260 - int v237; // [sp+20h] [bp-2Ch]@298 - int v238; // [sp+20h] [bp-2Ch]@336 - int pBodyComplection; // [sp+24h] [bp-28h]@6 - int v240; // [sp+28h] [bp-24h]@7 - unsigned int v241; // [sp+2Ch] [bp-20h]@38 - int v242; // [sp+2Ch] [bp-20h]@197 - unsigned int v243; // [sp+2Ch] [bp-20h]@370 - int v244; // [sp+34h] [bp-18h]@6 - signed int v245; // [sp+34h] [bp-18h]@361 - unsigned int uPlayerID_; // [sp+38h] [bp-14h]@1 - int uPlayerID_a; // [sp+38h] [bp-14h]@9 - signed int IsDwarf; // [sp+40h] [bp-Ch]@4 - int v249; // [sp+40h] [bp-Ch]@358 - //signed int v250; // [sp+44h] [bp-8h]@1 - - pPlayer = pPlayers[uPlayerID]; - uPlayerID_ = uPlayerID; - pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE); - pSex = pPlayer->GetSexByVoice(); - if ( pPlayer->GetRace() && pPlayer->GetRace() != 1 && pPlayer->GetRace() != 2 ) - { - IsDwarf = 1; - pBodyComplection = (pSex != 0) + 2; - } - else - { - IsDwarf = 0; - pBodyComplection = pSex != 0; - } - v244 = pPlayer->uFace; - pRenderer->ResetClip(); - pRenderer->DrawTextureIndexed(0x1D3u, 0, (Texture *)(uTextureID_BACKDOLL != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BACKDOLL] : 0));// - if ( !IsPlayerWearingWatersuit[uPlayerID_] ) - { - v21 = pPlayer->pEquipment.uBow; // - if ( !v21 ) - goto LABEL_59; - v230 = pPlayer->pEquipment.uBow; - v22 = (int)&pPlayer->pInventoryItems[v21-1]; - v23 = *(int *)v22; - v24 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[v23].uEquipX; - a3b = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[v23].uEquipY; - v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE); - v25 = *(int *)(v22 + 20); - if ( !(*(int *)(v22 + 20) & 0xF0) ) - { - if ( v25 & 2 ) - { - v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0); - pRenderer->DrawTransparentRedShade(v24, a3b, v27); - } - else - { - v29 = (v25 & 1) == 0; - v30 = (char *)&pIcons_LOD->pTextures[v241]; - if ( v29 ) - { - v27 = (Texture *)(v241 != -1 ? (int)v30 : 0); - pRenderer->DrawTransparentGreenShade(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0)); - } - else - { - v27 = (Texture *)(v241 != -1 ? (int)v30 : 0); - pRenderer->DrawTextureTransparent(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0)); - } - } -LABEL_57: - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(v24, a3b, v27, v230); -LABEL_59: - v31 = pPlayer->pEquipment.uCloak;// - if ( !v31 ) - goto LABEL_93; - v231 = pPlayer->pEquipment.uCloak; - v32 = (int)&pPlayer->pInventoryItems[v31-1]; - v219 = v32; - if ( *(int *)v32 != 525 ) - { - switch ( *(int *)v32 ) - { - case 0x212: - v184 = 6; - break; - case 0x223: - v184 = 7; - break; - case 0x224: - v184 = 8; - break; - default: - if ( *(int *)v32 != 550 ) - { - v33 = *(int *)v32 - 105; -LABEL_72: - if ( v33 < 0 || v33 >= 10 ) - goto LABEL_93; -LABEL_74: - v34 = v33 + 10 * pBodyComplection; - v35 = paperdoll_array_511828[0][v34];//Texture_Cloak - a2c = pPaperdoll_BodyX + paperdoll_Cloak[0][v34][0]; - v36 = pPaperdoll_BodyY + paperdoll_Cloak[0][v34][1]; - v37 = *(int *)(v32 + 20); - a3c = v36; - if ( !(v37 & 0xF0) ) - { - v41 = v35 + 1; - if ( v37 & 2 ) - { - v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0); - pRenderer->DrawTransparentRedShade(a2c, v36, v42); - } - else - { - v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0); - pRenderer->DrawTextureTransparent(a2c, v36, v42); - } - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2c, a3c, v42, v231); -LABEL_93: - v240 = 4 * uPlayerID_ - 4; - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, - (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0)); - v43 = pPlayer->pEquipment.uBody;// - if ( !v43 ) - goto LABEL_127; - v232 = pPlayer->pEquipment.uBody; - v44 = (int)&pPlayer->pInventoryItems[v43-1]; - v220 = v44; - if ( *(int *)v44 != 504 ) - { - if ( *(int *)v44 == 505 ) - { - v185 = 14; - } - else - { - if ( *(int *)v44 == 516 ) - { - v185 = 13; - } - else - { - if ( *(int *)v44 != 533 ) - { - v45 = *(int *)v44 - 66; -LABEL_104: - if ( v45 < 0 || v45 >= 17 ) - goto LABEL_127; -LABEL_106: - v46 = 17 * pBodyComplection + v45; - a2d = pPaperdoll_BodyX + paperdoll_Armor[0][v46][0]; - v47 = pPaperdoll_BodyY + paperdoll_Armor[0][v46][1]; - v48 = paperdoll_array_511290[0][v46][0];//Texture_Armor - v49 = *(int *)(v44 + 20); - a3d = v47; - if ( !(v49 & 0xF0) ) - { - v53 = v48 + 1; - if ( v49 & 2 ) - { - v54 = (Texture *)(v53 != 0 ? (int)&pIcons_LOD->pTextures[v48] : 0); - pRenderer->DrawTransparentRedShade(a2d, v47, v54); - } - else - { - v29 = (v49 & 1) == 0; - v55 = (char *)&pIcons_LOD->pTextures[v48]; - if ( v29 ) - { - v54 = (Texture *)(v53 != 0 ? (int)v55 : 0); - pRenderer->DrawTransparentGreenShade(a2d, v47, v54); - } - else - { - v54 = (Texture *)(v53 != 0 ? (int)v55 : 0); - pRenderer->DrawTextureTransparent(a2d, v47, v54); - } - } - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2d, a3d, v54, v232); -LABEL_127: - v56 = pPlayer->pEquipment.field_20; - if ( !v56 ) - goto LABEL_155; - v233 = pPlayer->pEquipment.field_20; - v57 = (int)&pPlayer->pInventoryItems[v56-1]; - v221 = v57; - v58 = *(int *)v57; - if ( *(int *)v57 == 529 ) - { - a3e = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][5][1]; - a2e = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][5][0]; - v59 = papredoll_flying_feet[v244]; - } - else - { - if ( v58 == 512 ) - { - a3e = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][6][1]; - a2e = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][6][0]; - v59 = dword_511638[pBodyComplection][5]; - } - else - { - v60 = v58 - 115; - if ( v60 < 0 || v60 >= 5 ) - { - a2e = 0; - a3e = 0; - v59 = dword_511638[pBodyComplection][0]; - } - else - { - v61 = v60 + 7 * pBodyComplection; - a3e = pPaperdoll_BodyY + paperdoll_Boot[0][v61][1]; - a2e = pPaperdoll_BodyX + paperdoll_Boot[0][v61][0]; - v59 = dword_511638[0][v60 + 6 * pBodyComplection]; - } - } - } - v62 = *(int *)(v57 + 20); - if ( !(*(int *)(v57 + 20) & 0xF0) ) - { - v65 = v59 + 1; - v66 = (char *)&pIcons_LOD->pTextures[v59]; - if ( v62 & 2 ) - { - v67 = (Texture *)(v65 != 0 ? (int)v66 : 0); - pRenderer->DrawTransparentRedShade(a2e, a3e, v67); - } - else - { - if ( v62 & 1 ) - { - v67 = (Texture *)(v65 != 0 ? (int)v66 : 0); - pRenderer->DrawTextureTransparent(a2e, a3e, v67); - } - else - { - v67 = (Texture *)(v65 != 0 ? (int)v66 : 0); - pRenderer->DrawTransparentGreenShade(a2e, a3e, v67); - } - } - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2e, a3e, v67, v233); -LABEL_155: - v69 = pPlayer->pEquipment.uMainHand; - uPlayerID_a = 2 * pBodyComplection; - if ( !v69 || (v70 = *(int *)&pPlayer->pInventoryItems[v69-1], pItemsTable->pItems[v70].uEquipType != 1) - && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayer->pEquipment.uOffHand) ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], - pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], - (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0)); - v71 = pPlayer->pEquipment.uBelt; - if ( v71 ) - { - v234 = pPlayer->pEquipment.uBelt; - v72 = (int)&pPlayer->pInventoryItems[v71-1]; - v222 = v72; - if ( *(int *)v72 == 524 ) - { - v73 = 5; - } - else - { - if ( *(int *)v72 == 535 ) - { - v73 = 6; - goto LABEL_168; - } - v73 = *(int *)v72 - 100; - } - if ( v73 >= 0 && v73 < 7 ) - { -LABEL_168: - v74 = 7 * pBodyComplection + v73; - a2f = pPaperdoll_BodyX + paperdoll_Belt[0][v74][0]; - a3f = pPaperdoll_BodyY + paperdoll_Belt[0][v74][1]; - if ( IsDwarf != 1 || v73 == 5 ) - v75 = stru_511718[pBodyComplection].texids[v73]; - else - v75 = stru_511718[pBodyComplection - 2].texids[v73]; - v76 = *(int *)&pPlayer->field_1F5[36 * v71 + 15]; - if ( !(*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) ) - { - v79 = v75 + 1; - v80 = (char *)&pIcons_LOD->pTextures[v75]; - if ( v76 & 2 ) - { - v81 = (Texture *)(v79 != 0 ? (int)v80 : 0); - pRenderer->DrawTransparentRedShade(a2f, a3f, v81); - } - else - { - if ( v76 & 1 ) - { - v81 = (Texture *)(v79 != 0 ? (int)v80 : 0); - pRenderer->DrawTextureTransparent(a2f, a3f, v81); - } - else - { - v81 = (Texture *)(v79 != 0 ? (int)v80 : 0); - pRenderer->DrawTransparentGreenShade(a2f, a3f, v81); - } - } - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2f, a3f, v81, v234); - goto LABEL_192; - } - if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) != 16 ) - { - if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) == 32 ) - { - v172 = "sp28a"; - v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v222 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v78 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); - goto LABEL_192; - } - if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) == 64 ) - { - v172 = "sp30a"; - v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v222 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v78 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); - goto LABEL_192; - } - if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) == 128 ) - { - v172 = "sp91a"; - v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v222 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v78 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); - goto LABEL_192; - } - } - v172 = "sptext01"; - v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v222 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v78 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); - goto LABEL_192; - } - } -LABEL_192: - v82 = pPlayer->pEquipment.uMainHand; - if ( v82 ) - { - v83 = *(int *)&pPlayer->pInventoryItems[v82-1]; - if ( pItemsTable->pItems[v83].uEquipType == 1 - || pItemsTable->pItems[v83].uSkillType == 4 && !pPlayer->pEquipment.uOffHand ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[0][uPlayerID_a], - pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[0][uPlayerID_a + 1], - (Texture *)(*(unsigned int *)((char *)papredoll_dlaus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlaus + v240)] : 0)); - } - v84 = pPlayer->pEquipment.uBody; - v235 = v84; - v85 = (int)((char *)pPlayer + 36 * v84); - v242 = v85; - v86 = *(int *)(v85 + 496); - v87 = *(int *)(v85 + 496) - 504; - if ( v87 ) - { - v88 = v87 - 1; - if ( v88 ) - { - v89 = v88 - 11; - if ( v89 ) - { - if ( v89 != 17 ) - { - v90 = v86 - 66; -LABEL_207: - if ( v90 < 0 || v90 > 17 ) - { -LABEL_259: - v111 = pPlayer->pEquipment.uCloak; - if ( !v111 ) - goto LABEL_293; - v236 = pPlayer->pEquipment.uCloak; - v112 = (int)&pPlayer->pInventoryItems[v111-1]; - v225 = v112; - v113 = *(int *)v112; - if ( v113 != 525 ) - { - switch ( v113 ) - { - case 530: - v191 = 6; - break; - case 547: - v191 = 7; - break; - case 548: - v191 = 8; - break; - default: - if ( v113 != 550 ) - { - v114 = v113 - 105; -LABEL_272: - if ( v114 < 0 || v114 >= 10 ) - goto LABEL_293; -LABEL_274: - v115 = v114 + 10 * pBodyComplection; - v116 = dword_511788[v115]; - v115 *= 8; - v117 = pPaperdoll_BodyX + *(int *)((char *)&dword_4E56B0 + v115); - a2h = pPaperdoll_BodyX + *(int *)((char *)&dword_4E56B0 + v115); - a3h = pPaperdoll_BodyY + *(int *)((char *)&dword_4E56B4 + v115); - if ( v116 == pIcons_LOD->FindTextureByName("pending") ) - { -LABEL_292: -LABEL_293: - if ( v244 == 12 || v244 == 13 ) - { - v122 = papredoll_dbrds[v244]; - if ( v122 != pIcons_LOD->FindTextureByName("Pending") ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * v244 - 24], - pPaperdoll_BodyY + pPaperdoll_Beards[2 * v244 - 23], - (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0)); - } - v123 = pPlayer->pEquipment.uHelm; - if ( !v123 ) - goto LABEL_335; - v237 = v123; - v124 = (int)&pPlayer->pInventoryItems[v123-1]; - v226 = v124; - if ( *(int *)v124 != 521 ) - { - switch ( *(int *)v124 ) - { - case 0x20A: - v192 = 12; - break; - case 0x20B: - v192 = 13; - break; - case 0x214: - v192 = 14; - break; - default: - if ( *(int *)v124 != 544 ) - { - v125 = *(int *)v124 - 89; - if ( v125 < 0 || v125 >= 16 ) - goto LABEL_335; - goto LABEL_312; - } - v192 = 15; - break; - } - v125 = v192; -LABEL_312: - v126 = 2 * (v125 + 16 * pBodyComplection); - a2j = pPaperdoll_BodyX + dword_4E58D0[v126]; - a3i = pPaperdoll_BodyY + dword_4E58D4[v126]; - if ( IsDwarf != 1 || *(int *)v124 != 92 ) - v127 = stru_511698[0].texids[v125 + 16 * pSex]; - else - v127 = papredoll_dbrds[11]; - v128 = *(int *)(v124 + 20); - if ( *(int *)(v124 + 20) & 0xF0 ) - { - if ( (*(int *)(v124 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v124 + 20) & 0xF0) == 32 ) - { - v180 = "sp28a"; - v129 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v180, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v226 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v130 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2j, a3i, (Texture *)(v127 != -1 ? (int)&pIcons_LOD->pTextures[v127] : 0), - v129, (signed __int64)v130, 0, 255); - goto LABEL_335; - } - if ( (*(int *)(v124 + 20) & 0xF0) == 64 ) - { - v180 = "sp30a"; - v129 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v180, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v226 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v130 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2j, a3i, (Texture *)(v127 != -1 ? (int)&pIcons_LOD->pTextures[v127] : 0), - v129, (signed __int64)v130, 0, 255); - goto LABEL_335; - } - if ( (*(int *)(v124 + 20) & 0xF0) == 128 ) - { - v180 = "sp91a"; - v129 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v180, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v226 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v130 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2j, a3i, (Texture *)(v127 != -1 ? (int)&pIcons_LOD->pTextures[v127] : 0), - v129, (signed __int64)v130, 0, 255); - goto LABEL_335; - } - } - v180 = "sptext01"; - v129 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v180, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v226 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v130 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2j, a3i, (Texture *)(v127 != -1 ? (int)&pIcons_LOD->pTextures[v127] : 0), - v129, (signed __int64)v130, 0, 255); - goto LABEL_335; - } - v131 = v127 + 1; - v132 = (char *)&pIcons_LOD->pTextures[v127]; - if ( v128 & 2 ) - { - v133 = (Texture *)(v131 != 0 ? (int)v132 : 0); - pRenderer->DrawTransparentRedShade(a2j, a3i, v133); - } - else - { - if ( v128 & 1 ) - { - v133 = (Texture *)(v131 != 0 ? (int)v132 : 0); - pRenderer->DrawTextureTransparent(a2j, a3i, v133); - } - else - { - v133 = (Texture *)(v131 != 0 ? (int)v132 : 0); - pRenderer->DrawTransparentGreenShade(a2j, a3i, v133); - } - } - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2j, a3i, v133, v237); -LABEL_335: - v134 = pPlayer->pEquipment.uMainHand; - if ( !v134 ) - goto LABEL_358; - v238 = pPlayer->pEquipment.uMainHand; - v135 = (int)&pPlayer->pInventoryItems[v134-1]; - v227 = v135; - v136 = *(int *)v135; - v137 = *(int *)v135; - a2k = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[v137].uEquipX; - a3j = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[v137].uEquipY; - if ( v136 == 64 ) - v181 = "item64v1"; - else - v181 = pItemsTable->pItems[v137].pIconName; - v138 = pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE); - v139 = *(int *)(v227 + 20); - if ( !(*(int *)(v227 + 20) & 0xF0) ) - { - v142 = v138 + 1; - v143 = (char *)&pIcons_LOD->pTextures[v138]; - if ( v139 & 2 ) - { - v144 = (Texture *)(v142 != 0 ? (int)v143 : 0); - pRenderer->DrawTransparentRedShade(a2k, a3j, v144); - } - else - { - if ( v139 & 1 ) - { - v144 = (Texture *)(v142 != 0 ? (int)v143 : 0); - pRenderer->DrawTextureTransparent(a2k, a3j, v144); - } - else - { - v144 = (Texture *)(v142 != 0 ? (int)v143 : 0); - pRenderer->DrawTransparentGreenShade(a2k, a3j, v144); - } - } - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2k, a3j, v144, v238); -LABEL_358: - v145 = pPlayer->pEquipment.uOffHand; - v249 = pPlayer->pEquipment.uOffHand; - if ( !v145 ) - goto LABEL_393; - v146 = (int)&pPlayer->pInventoryItems[v145-1]; - v228 = v146; - v147 = *(int *)v146; - v148 = *(int *)v146; - v149 = pItemsTable->pItems[v148].uSkillType; - if ( v149 != 2 && v149 != 1 ) - { - v245 = 0; - v150 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[v148].uEquipX; - a3k = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[v148].uEquipY; - goto LABEL_370; - } - v151 = v147 - 400; - v245 = 1; - if ( v151 ) - { - v152 = v151 - 3; - if ( v152 ) - { - if ( v152 != 12 ) - { - v150 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[v148].uEquipX; - a3k = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[v148].uEquipY; - goto LABEL_370; - } - v150 = 595; - a3k = 33; -LABEL_370: - v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v148].pIconName, TEXTURE_16BIT_PALETTE); - v154 = v153; - v243 = v153; - v155 = *(int *)(v228 + 20); - if ( !(*(int *)(v228 + 20) & 0xF0) ) - { - if ( v155 & 2 ) - { - v159 = (Texture *)(v243 != -1 ? (int)&pIcons_LOD->pTextures[v243] : 0); - pRenderer->DrawTransparentRedShade(v150, a3k, v159); - } - else - { - v29 = (v155 & 1) == 0; - v160 = (char *)&pIcons_LOD->pTextures[v243]; - if ( v29 ) - { - v159 = (Texture *)(v243 != -1 ? (int)v160 : 0); - pRenderer->DrawTransparentGreenShade(v150, a3k, (Texture *)(v243 != -1 ? (int)v160 : 0)); - } - else - { - v159 = (Texture *)(v243 != -1 ? (int)v160 : 0); - pRenderer->DrawTextureTransparent(v150, a3k, (Texture *)(v243 != -1 ? (int)v160 : 0)); - } - } - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(v150, a3k, v159, v249); - if ( v245 ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[uPlayerID_a], - pPaperdoll_BodyY + pPaperdollLeftEmptyHand[uPlayerID_a + 1], - (Texture *)(*(unsigned int *)((char *)papredoll_dlhs - + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhs + v240)] : 0)); - goto LABEL_393; - } - if ( (*(int *)(v228 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v228 + 20) & 0xF0) == 32 ) - { - v183 = "sp28a"; - } - else - { - if ( (*(int *)(v228 + 20) & 0xF0) != 64 ) - { - v156 = pIcons_LOD; - if ( (*(int *)(v228 + 20) & 0xF0) == 128 ) - { - v183 = "sp91a"; - v157 = &pIcons_LOD->pTextures[v156->LoadTexture(v183, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v228 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v158 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v150, a3k, (Texture *)(v154 != -1 ? (int)&pIcons_LOD->pTextures[v154] : 0), - v157, (signed __int64)v158, 0, 255); - if ( v245 ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[uPlayerID_a], - pPaperdoll_BodyY + pPaperdollLeftEmptyHand[uPlayerID_a + 1], - (Texture *)(*(unsigned int *)((char *)papredoll_dlhs - + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhs + v240)] : 0)); - goto LABEL_393; - } - v183 = "sptext01"; - v157 = &pIcons_LOD->pTextures[v156->LoadTexture(v183, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v228 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v158 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v150, a3k, (Texture *)(v154 != -1 ? (int)&pIcons_LOD->pTextures[v154] : 0), - v157, (signed __int64)v158, 0, 255); - if ( v245 ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[uPlayerID_a], - pPaperdoll_BodyY + pPaperdollLeftEmptyHand[uPlayerID_a + 1], - (Texture *)(*(unsigned int *)((char *)papredoll_dlhs - + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhs + v240)] : 0)); - goto LABEL_393; - } - v183 = "sp30a"; - } - v156 = pIcons_LOD; - v157 = &pIcons_LOD->pTextures[v156->LoadTexture(v183, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v228 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v158 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v150, a3k, (Texture *)(v154 != -1 ? (int)&pIcons_LOD->pTextures[v154] : 0), - v157, (signed __int64)v158, 0, 255); - if ( v245 ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[uPlayerID_a], - pPaperdoll_BodyY + pPaperdollLeftEmptyHand[uPlayerID_a + 1], - (Texture *)(*(unsigned int *)((char *)papredoll_dlhs - + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhs + v240)] : 0)); - goto LABEL_393; - } - v156 = pIcons_LOD; - v183 = "sptext01"; - v157 = &pIcons_LOD->pTextures[v156->LoadTexture(v183, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v228 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v158 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v150, a3k, (Texture *)(v154 != -1 ? (int)&pIcons_LOD->pTextures[v154] : 0), - v157, (signed __int64)v158, 0, 255); - if ( v245 ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[uPlayerID_a], - pPaperdoll_BodyY + pPaperdollLeftEmptyHand[uPlayerID_a + 1], - (Texture *)(*(unsigned int *)((char *)papredoll_dlhs - + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhs + v240)] : 0)); - goto LABEL_393; - } - a3k = 28; - } - else - { - a3k = 86; - } - v150 = 596; - goto LABEL_370; - } - if ( (*(int *)(v227 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v227 + 20) & 0xF0) == 32 ) - { - v182 = "sp28a"; - v140 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v182, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v227 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v141 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2k, a3j, (Texture *)(v138 != -1 ? (int)&pIcons_LOD->pTextures[v138] : 0), - v140, (signed __int64)v141, 0, 255); - goto LABEL_358; - } - if ( (*(int *)(v227 + 20) & 0xF0) == 64 ) - { - v182 = "sp30a"; - v140 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v182, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v227 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v141 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2k, a3j, (Texture *)(v138 != -1 ? (int)&pIcons_LOD->pTextures[v138] : 0), - v140, (signed __int64)v141, 0, 255); - goto LABEL_358; - } - if ( (*(int *)(v227 + 20) & 0xF0) == 128 ) - { - v182 = "sp91a"; - v140 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v182, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v227 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v141 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2k, a3j, (Texture *)(v138 != -1 ? (int)&pIcons_LOD->pTextures[v138] : 0), - v140, (signed __int64)v141, 0, 255); - goto LABEL_358; - } - } - v182 = "sptext01"; - v140 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v182, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v227 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v141 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2k, a3j, (Texture *)(v138 != -1 ? (int)&pIcons_LOD->pTextures[v138] : 0), - v140, (signed __int64)v141, 0, 255); - goto LABEL_358; - } - v125 = 11; - if ( v125 < 0 || v125 >= 16 ) - goto LABEL_335; - goto LABEL_312; - } - if ( !(*(int *)(v225 + 20) & 0xF0) ) - { - v119 = v116 + 1; - v120 = (char *)&pIcons_LOD->pTextures[v116]; - if ( *(int *)(v225 + 20) & 2 ) - { - v121 = (Texture *)(v119 != 0 ? (int)v120 : 0); - pRenderer->DrawTransparentRedShade(a2h, a3h, v121); - } - else - { - v121 = (Texture *)(v119 != 0 ? (int)v120 : 0); - pRenderer->DrawTextureTransparent(a2h, a3h, v121); - } - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2h, a3h, v121, v236); - goto LABEL_292; - } - if ( (*(int *)(v225 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v225 + 20) & 0xF0) == 32 ) - { - v179 = "sp28a"; - a2i = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v179, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v225 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v118 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v117, a3h, (Texture *)(v116 != -1 ? (int)&pIcons_LOD->pTextures[v116] : 0), - a2i, (signed __int64)v118, 0, 255); - goto LABEL_292; - } - if ( (*(int *)(v225 + 20) & 0xF0) == 64 ) - { - v179 = "sp30a"; - a2i = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v179, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v225 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v118 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v117, a3h, (Texture *)(v116 != -1 ? (int)&pIcons_LOD->pTextures[v116] : 0), - a2i, (signed __int64)v118, 0, 255); - goto LABEL_292; - } - if ( (*(int *)(v225 + 20) & 0xF0) == 128 ) - { - v179 = "sp91a"; - a2i = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v179, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v225 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v118 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v117, a3h, (Texture *)(v116 != -1 ? (int)&pIcons_LOD->pTextures[v116] : 0), - a2i, (signed __int64)v118, 0, 255); - goto LABEL_292; - } - } - v179 = "sptext01"; - a2i = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v179, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v225 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v118 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v117, a3h, (Texture *)(v116 != -1 ? (int)&pIcons_LOD->pTextures[v116] : 0), - a2i, (signed __int64)v118, 0, 255); - goto LABEL_292; - } - v191 = 9; - break; - } - v114 = v191; - goto LABEL_274; - } - v114 = 5; - goto LABEL_272; - } -LABEL_209: - if ( pPlayer->pEquipment.uMainHand - && (pPlayer->GetEquippedItemEquipType(1u) == 1 - || pPlayer->GetEquippedItemSkillType(EQUIP_TWO_HANDED) == 4 - && !pPlayer->pEquipment.uOffHand) ) - { - v91 = 17 * pBodyComplection + v90; - v92 = v91; - v223 = paperdoll_array_511290[0][v91][2]; - if ( v223 == pIcons_LOD->FindTextureByName("pending") ) - { - v93 = 2 * v91; - v94 = paperdoll_array_511290[0][v92][1]; - a2g = pPaperdoll_BodyX + paperdoll_shoulder[0][0][v93]; - v95 = paperdoll_shoulder[0][0][v93 + 1]; - } - else - { - v94 = v223; - a2g = pPaperdoll_BodyX + dword_4E5270[2 * v91]; - v95 = dword_4E5270[2 * v91 + 1]; - } - a3g = pPaperdoll_BodyY + v95; - if ( v94 == pIcons_LOD->FindTextureByName("pending") ) - goto LABEL_259; - if ( *(int *)(v242 + 516) & 0xF0 ) - { - if ( (*(int *)(v242 + 516) & 0xF0) != 16 ) - { - if ( (*(int *)(v242 + 516) & 0xF0) == 32 ) - { - v173 = "sp28a"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v242 + 516) &= 0xFu; - ptr_50C9A4 = 0; - } - v187 = 255; - v174 = 0; - v97 = (double)GetTickCount(); - pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), - (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); - goto LABEL_259; - } - if ( (*(int *)(v242 + 516) & 0xF0) == 64 ) - { - v173 = "sp30a"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v242 + 516) &= 0xFu; - ptr_50C9A4 = 0; - } - v187 = 255; - v174 = 0; - v97 = (double)GetTickCount(); - pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), - (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); - goto LABEL_259; - } - if ( (*(int *)(v242 + 516) & 0xF0) == 128 ) - { - v173 = "sp91a"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v242 + 516) &= 0xFu; - ptr_50C9A4 = 0; - } - v187 = 255; - v174 = 0; - v97 = (double)GetTickCount(); - pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), - (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); - goto LABEL_259; - } - } - v173 = "sptext01"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v242 + 516) &= 0xFu; - ptr_50C9A4 = 0; - } - v187 = 255; - v174 = 0; - v97 = (double)GetTickCount(); - pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), - (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); - goto LABEL_259; - } - v98 = v94 + 1; - v99 = (char *)&pIcons_LOD->pTextures[v94]; - v100 = pRenderer; - if ( *(int *)(v242 + 516) & 2 ) - { - v101 = (Texture *)(v98 != 0 ? (int)v99 : 0); - v188 = v101; - v175 = a3g; - v163 = a2g; - v100->DrawTransparentRedShade(v163, v175, v188); - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2g, a3g, v101, v235); - goto LABEL_259; - } - if ( *(char *)(v242 + 516) & 1 ) - { - v101 = (Texture *)(v98 != 0 ? (int)v99 : 0); - v189 = v101; - v176 = a3g; - v164 = a2g; - pRenderer->DrawTextureTransparent(v164, v176, v189); - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2g, a3g, v101, v235); - goto LABEL_259; - } - v101 = (Texture *)(v98 != 0 ? (int)v99 : 0); - v190 = v101; - v177 = a3g; - v165 = a2g; - pRenderer->DrawTransparentGreenShade(v165, v177, v190); - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2g, a3g, v101, v235); - goto LABEL_259; - } - v102 = 17 * pBodyComplection + v90; - v94 = paperdoll_array_511290[0][v102][1]; - if ( v94 == pIcons_LOD->FindTextureByName("pending") ) - goto LABEL_259; - v103 = pPaperdoll_BodyX + paperdoll_shoulder[0][v102][0]; - v104 = pPaperdoll_BodyY + paperdoll_shoulder[0][v102][1]; - v224 = *(int *)(v242 + 516); - v105 = *(int *)(v242 + 516) & 0xF0; - a2g = pPaperdoll_BodyX + paperdoll_shoulder[0][v102][0]; - a3g = pPaperdoll_BodyY + paperdoll_shoulder[0][v102][1]; - if ( !v105 ) - { - v109 = v94 + 1; - v110 = (char *)&pIcons_LOD->pTextures[v94]; - if ( v224 & 2 ) - { - v101 = (Texture *)(v109 != 0 ? (int)v110 : 0); - v188 = v101; - v175 = v104; - v163 = v103; - v100 = pRenderer; - v100->DrawTransparentRedShade(v163, v175, v188); - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2g, a3g, v101, v235); - goto LABEL_259; - } - if ( v224 & 1 ) - { - v101 = (Texture *)(v109 != 0 ? (int)v110 : 0); - v189 = v101; - v176 = v104; - v164 = v103; - v100 = pRenderer; - pRenderer->DrawTextureTransparent(v164, v176, v189); - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2g, a3g, v101, v235); - goto LABEL_259; - } - v101 = (Texture *)(v109 != 0 ? (int)v110 : 0); - v190 = v101; - v177 = v104; - v165 = v103; - v100 = pRenderer; - pRenderer->DrawTransparentGreenShade(v165, v177, v190); - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2g, a3g, v101, v235); - goto LABEL_259; - } - v106 = v105 - 16; - if ( v106 ) - { - v107 = v106 - 16; - if ( !v107 ) - { - v178 = "sp28a"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v242 + 516) &= 0xFu; - ptr_50C9A4 = 0; - } - v187 = 255; - v174 = 0; - v97 = (double)GetTickCount(); - pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), - (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); - goto LABEL_259; - } - v108 = v107 - 32; - if ( !v108 ) - { - v178 = "sp30a"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v242 + 516) &= 0xFu; - ptr_50C9A4 = 0; - } - v187 = 255; - v174 = 0; - v97 = (double)GetTickCount(); - pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), - (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); - goto LABEL_259; - } - if ( v108 == 64 ) - { - v178 = "sp91a"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v242 + 516) &= 0xFu; - ptr_50C9A4 = 0; - } - v187 = 255; - v174 = 0; - v97 = (double)GetTickCount(); - pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), - (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); - goto LABEL_259; - } - } - v178 = "sptext01"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v242 + 516) &= 0xFu; - ptr_50C9A4 = 0; - } - v187 = 255; - v174 = 0; - v97 = (double)GetTickCount(); - pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), - (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); - goto LABEL_259; - } - v186 = 16; - } - else - { - v186 = 13; - } - } - else - { - v186 = 14; - } - v90 = v186; - goto LABEL_209; - } - v90 = 15; - goto LABEL_207; - } - if ( (*(int *)(v57 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v57 + 20) & 0xF0) == 32 ) - { - v171 = "sp28a"; - v63 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v171, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v221 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v64 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2e, a3e, (Texture *)(v59 != -1 ? (int)&pIcons_LOD->pTextures[v59] : 0), v63, - (signed __int64)v64, 0, 255); - goto LABEL_155; - } - if ( (*(int *)(v57 + 20) & 0xF0) == 64 ) - { - v171 = "sp30a"; - v63 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v171, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v221 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v64 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2e, a3e, (Texture *)(v59 != -1 ? (int)&pIcons_LOD->pTextures[v59] : 0), v63, - (signed __int64)v64, 0, 255); - goto LABEL_155; - } - if ( (*(int *)(v57 + 20) & 0xF0) == 128 ) - { - v171 = "sp91a"; - v63 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v171, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v221 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v64 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2e, a3e, (Texture *)(v59 != -1 ? (int)&pIcons_LOD->pTextures[v59] : 0), v63, - (signed __int64)v64, 0, 255); - goto LABEL_155; - } - } - v171 = "sptext01"; - v63 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v171, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v221 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v64 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2e, a3e, (Texture *)(v59 != -1 ? (int)&pIcons_LOD->pTextures[v59] : 0), v63, - (signed __int64)v64, 0, 255); - goto LABEL_155; - } - if ( (*(int *)(v44 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v44 + 20) & 0xF0) == 32 ) - { - v170 = "sp28a"; - } - else - { - if ( (*(int *)(v44 + 20) & 0xF0) != 64 ) - { - v50 = pIcons_LOD; - if ( (*(int *)(v44 + 20) & 0xF0) == 128 ) - { - v170 = "sp91a"; - v51 = &pIcons_LOD->pTextures[v50->LoadTexture(v170, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v220 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v52 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2d, a3d, (Texture *)(v48 != -1 ? (int)&pIcons_LOD->pTextures[v48] : 0), - v51, (signed __int64)v52, 0, 255); - goto LABEL_127; - } - v170 = "sptext01"; - v51 = &pIcons_LOD->pTextures[v50->LoadTexture(v170, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v220 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v52 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2d, a3d, (Texture *)(v48 != -1 ? (int)&pIcons_LOD->pTextures[v48] : 0), - v51, (signed __int64)v52, 0, 255); - goto LABEL_127; - } - v170 = "sp30a"; - } - v50 = pIcons_LOD; - v51 = &pIcons_LOD->pTextures[v50->LoadTexture(v170, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v220 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v52 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2d, a3d, (Texture *)(v48 != -1 ? (int)&pIcons_LOD->pTextures[v48] : 0), - v51, (signed __int64)v52, 0, 255); - goto LABEL_127; - } - v50 = pIcons_LOD; - v170 = "sptext01"; - v51 = &pIcons_LOD->pTextures[v50->LoadTexture(v170, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v220 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v52 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2d, a3d, (Texture *)(v48 != -1 ? (int)&pIcons_LOD->pTextures[v48] : 0), - v51, (signed __int64)v52, 0, 255); - goto LABEL_127; - } - v185 = 16; - } - } - v45 = v185; - goto LABEL_106; - } - v45 = 15; - goto LABEL_104; - } - if ( (*(int *)(v32 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v32 + 20) & 0xF0) == 32 ) - { - v169 = "sp28a"; - } - else - { - if ( (*(int *)(v32 + 20) & 0xF0) != 64 ) - { - v38 = pIcons_LOD; - if ( (*(int *)(v32 + 20) & 0xF0) == 128 ) - { - v169 = "sp91a"; - v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v219 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v40 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, - (signed __int64)v40, 0, 255); - goto LABEL_93; - } - v169 = "sptext01"; - v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v219 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v40 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, - (signed __int64)v40, 0, 255); - goto LABEL_93; - } - v169 = "sp30a"; - } - v38 = pIcons_LOD; - v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v219 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v40 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, - (signed __int64)v40, 0, 255); - goto LABEL_93; - } - v38 = pIcons_LOD; - v169 = "sptext01"; - v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v219 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v40 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, - (signed __int64)v40, 0, 255); - goto LABEL_93; - } - v184 = 9; - break; - } - v33 = v184; - goto LABEL_74; - } - v33 = 5; - goto LABEL_72; - } - if ( (*(int *)(v22 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v22 + 20) & 0xF0) == 32 ) - { - v168 = "sp28a"; - } - else - { - if ( (*(int *)(v22 + 20) & 0xF0) != 64 ) - { - v26 = pIcons_LOD; - if ( (*(int *)(v22 + 20) & 0xF0) == 128 ) - { - v168 = "sp91a"; - a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v22 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0); - v28 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255); - goto LABEL_57; - } - v168 = "sptext01"; - a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v22 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0); - v28 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255); - goto LABEL_57; - } - v168 = "sp30a"; - } - v26 = pIcons_LOD; - a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v22 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0); - v28 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255); - goto LABEL_57; - } - v26 = pIcons_LOD; - v168 = "sptext01"; - a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v22 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0); - v28 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255); - goto LABEL_57;; - } - a3 = pPaperdoll_BodyY; - a2 = pPaperdoll_BodyX; - v240 = 4 * uPlayerID_ - 4; - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, - (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0)); - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2, a3, - (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0), - pPlayer->pEquipment.uBody); - uPlayerID_a = 2 * pBodyComplection; - v6 = pPlayer->pEquipment.uMainHand; - if ( !v6 - || (v7 = *(int *)&pPlayer->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1) - && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], - (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0)); - v8 = pPlayer->pEquipment.uMainHand; - if ( v8 ) - { - v229 = pPlayer->pEquipment.uMainHand; - v9 = (int)&pPlayer->pInventoryItems[v8-1]; - // v10 = pBodyComplection << 7; - v218 = v9; - v11 = *(int *)v9; - v12 = *(int *)v9; - v13 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[v12].uEquipX; - a2a = v13; - a3a = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[v12].uEquipY; - if ( v11 == 64 ) - v166 = "item64v1"; - else - v166 = pItemsTable->pItems[v12].pIconName; - v14 = pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE); - v15 = *(int *)(v218 + 20); - if ( *(int *)(v218 + 20) & 0xF0 ) - { - if ( (*(int *)(v218 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v218 + 20) & 0xF0) == 32 ) - { - v167 = "sp28a"; - //v16 = (Texture *)(72 * pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE) + 7145548); - v16 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v218 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v17 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v13, a3a, (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0), v16, (signed __int64)v17, 0, 255); - goto LABEL_393;; - } - if ( (*(int *)(v218 + 20) & 0xF0) == 64 ) - { - v167 = "sp30a"; - //v16 = (Texture *)(72 * pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE) + 7145548); - v16 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v218 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v17 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v13, a3a, (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0), v16, (signed __int64)v17, 0, 255); - goto LABEL_393; - } - if ( (*(int *)(v218 + 20) & 0xF0) == 128 ) - { - v167 = "sp91a"; - //v16 = (Texture *)(72 * pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE) + 7145548); - v16 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v218 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v17 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v13, a3a, (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0), v16, (signed __int64)v17, 0, 255); - goto LABEL_393; - } - } - v167 = "sptext01"; - //v16 = (Texture *)(72 * pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE) + 7145548); - v16 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v218 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v17 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(v13, a3a, (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0), v16, (signed __int64)v17, 0, 255); - goto LABEL_393; - } - v18 = v14 + 1; - v19 = (char *)&pIcons_LOD->pTextures[v14]; - if ( v15 & 2 ) - { - v20 = (Texture *)(v18 != 0 ? (int)v19 : 0); - pRenderer->DrawTransparentRedShade(a2a, a3a, v20); - } - else - { - if ( v15 & 1 ) - { - v20 = (Texture *)(v18 != 0 ? (int)v19 : 0); - pRenderer->DrawTextureTransparent(a2a, a3a, v20); - } - else - { - v20 = (Texture *)(v18 != 0 ? (int)v19 : 0); - pRenderer->DrawTransparentGreenShade(a2a, a3a, v20); - } - } - if ( !bRingsShownInCharScreen ) - pRenderer->_4A612A(a2a, a3a, v20, v229); - } -LABEL_393: - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[uPlayerID_a], - pPaperdoll_BodyY + pPaperdoll_RightHand[uPlayerID_a + 1], - (Texture *)(*(unsigned int *)((char *)papredoll_drhs + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_drhs + v240)] : 0)); - v161 = pPlayer->pEquipment.uMainHand; - if ( v161 ) - { - v162 = *(int *)&pPlayer->pInventoryItems[v161-1]; - if ( pItemsTable->pItems[v162].uEquipType == 1 || pItemsTable->pItems[v162].uSkillType == 4 && !pPlayer->pEquipment.uOffHand ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[0][uPlayerID_a], - pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[0][uPlayerID_a + 1], - (Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhus + v240)] : 0)); - } - if ( !bRingsShownInCharScreen ) - pRenderer->DrawTextureTransparent(0x25Bu, 0x12Bu, - (Texture *)(uTextureID_MAGNIF_B != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_MAGNIF_B] : 0)); - pRenderer->DrawTextureTransparent(0x1D4u, 0, - (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0)); -} - - -//----- (0043E825) -------------------------------------------------------- -void __fastcall CharacterUI_DrawPaperdollWithRingOverlay(unsigned int uPlayerID) -{ - unsigned int v1; // ebx@1 - Player *pPlayer; // edi@1 - int v3; // ecx@1 - int *v4; // edi@3 - unsigned int v5; // ebx@3 - int v6; // eax@3 - LODFile_IconsBitmaps *v7; // ecx@7 - double v8; // st7@16 - int v9; // edi@17 - Texture *v10; // edi@18 - unsigned __int8 v11; // zf@19 - Texture *v12; // eax@19 - char v13; // sf@24 - unsigned __int8 v14; // of@24 - unsigned int v15; // eax@25 - unsigned int v16; // ebx@26 - int v17; // eax@26 - LODFile_IconsBitmaps *v18; // ecx@30 - double v19; // st7@39 - int v20; // edi@40 - int v21; // eax@41 - signed int v22; // ebx@41 - Texture *v23; // edi@41 - int v24; // eax@42 - char *v25; // eax@42 - unsigned int v26; // eax@46 - int v27; // edi@47 - unsigned int v28; // ebx@47 - int v29; // eax@47 - LODFile_IconsBitmaps *v30; // ecx@51 - Texture *v31; // esi@58 - double v32; // st7@60 - int v33; // esi@61 - int v34; // esi@62 - Texture *v35; // eax@63 - const char *v36; // [sp-8h] [bp-38h]@8 - const char *v37; // [sp-8h] [bp-38h]@31 - const char *v38; // [sp-8h] [bp-38h]@52 - int v39; // [sp+10h] [bp-20h]@3 - Texture *v40; // [sp+10h] [bp-20h]@14 - int v41; // [sp+10h] [bp-20h]@26 - Texture *v42; // [sp+10h] [bp-20h]@37 - int v43; // [sp+10h] [bp-20h]@47 - unsigned int a3; // [sp+14h] [bp-1Ch]@3 - unsigned int a2; // [sp+18h] [bp-18h]@3 - unsigned int *v46; // [sp+1Ch] [bp-14h]@1 - Player *v47; // [sp+20h] [bp-10h]@1 - int v48; // [sp+24h] [bp-Ch]@1 - int v49; // [sp+24h] [bp-Ch]@26 - - v1 = uPlayerID; - pPlayer = pPlayers[uPlayerID]; - v47 = pPlayers[uPlayerID]; - pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE); - CharacterUI_DrawPaperdoll(v1); - pRenderer->DrawTextureTransparent(0x1D9u, 0, (Texture *)(uTextureID_BACKHAND != -1 ? &pIcons_LOD->pTextures[uTextureID_BACKHAND] : 0)); - pRenderer->DrawTextureTransparent(0x1D4u, 0, (Texture *)(uTextureID_507B04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507B04] : 0)); - pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY, - (Texture *)(uTextureID_5118C8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5118C8] : 0)); - v3 = 0; - v46 = &pPlayer->pEquipment.field_28; - v48 = 0; - do - { - if ( !*v46 ) - goto LABEL_24; - v39 = *v46; - v4 = (int *)&pPlayer->pInventoryItems[*v46-1].uItemID; - a3 = pPaperdollRingsY[v3]; - a2 = pPaperdollRingsX[v3]; - v5 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*v4].pIconName, TEXTURE_16BIT_PALETTE); - v6 = *(int *)(v4 + 20); - if ( *(int *)(v4 + 20) & 0xF0 ) - { - if ( (*(int *)(v4 + 20) & 0xF0) != 16 ) - { - if ( (*(int *)(v4 + 20) & 0xF0) == 32 ) - { - v36 = "sp28a"; - } - else - { - if ( (*(int *)(v4 + 20) & 0xF0) != 64 ) - { - v7 = pIcons_LOD; - if ( (*(int *)(v4 + 20) & 0xF0) == 128 ) - { - v36 = "sp91a"; -LABEL_14: - v40 = &pIcons_LOD->pTextures[v7->LoadTexture(v36, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v4 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v8 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(a2, a3, (Texture *)(v5 != -1 ? (int)&pIcons_LOD->pTextures[v5] : 0), - v40, (signed __int64)v8, 0, 255); - goto LABEL_23; - } -LABEL_13: - v36 = "sptext01"; - goto LABEL_14; - } - v36 = "sp30a"; - } - v7 = pIcons_LOD; - goto LABEL_14; - } - v7 = pIcons_LOD; - goto LABEL_13; - } - v9 = v5 + 1; - if ( v6 & 2 ) - { - v10 = (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[v5] : 0); - pRenderer->DrawTransparentRedShade(a2, a3, v10); - } - else - { - v11 = (v6 & 1) == 0; - v12 = &pIcons_LOD->pTextures[v5]; - if ( v11 ) - { - v10 = (Texture *)(v9 != 0 ? (int)v12 : 0); - pRenderer->DrawTransparentGreenShade(a2, a3, v10); - } - else - { - v10 = (Texture *)(v9 != 0 ? (int)v12 : 0); - pRenderer->DrawTextureTransparent(a2, a3, v10); - } - } - pRenderer->_4A601E(a2, a3, v10, v39); -LABEL_23: - pPlayer = v47; -LABEL_24: - v46 += 4; - v3 = v48 + 4; - v14 = __OFSUB__(v48 + 4, 20); - v11 = v48 == 16; - v13 = v48 - 16 < 0; - v48 += 4; - } - while ( (unsigned __int8)(v13 ^ v14) | v11 ); - v15 = pPlayer->pEquipment.field_24; - if ( !v15 ) - goto LABEL_46; - v41 = pPlayer->pEquipment.field_24; - v49 = (int)&pPlayer->pInventoryItems[v15-1]; - v16 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v49].pIconName, TEXTURE_16BIT_PALETTE); - v17 = *(int *)(v49 + 20); - if ( !(*(int *)(v49 + 20) & 0xF0) ) - { - v20 = v16 + 1; - if ( v17 & 2 ) - { - v21 = 9 * v16; - v22 = 493; - v23 = (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0); - pRenderer->DrawTransparentRedShade(0x1EDu, 0x5Bu, v23); - } - else - { - v11 = (v17 & 1) == 0; - v24 = 9 * v16; - v22 = 493; - v25 = (char *)&pIcons_LOD->pTextures[8 * v24 / 0x48u]; - if ( v11 ) - { - v23 = (Texture *)(v20 != 0 ? (int)v25 : 0); - pRenderer->DrawTransparentGreenShade(493, 91, v23); - } - else - { - v23 = (Texture *)(v20 != 0 ? (int)v25 : 0); - pRenderer->DrawTextureTransparent(0x1EDu, 0x5Bu, v23); - } - } - pRenderer->_4A601E(v22, 91, v23, v41); - pPlayer = v47; - goto LABEL_46; - } - if ( (*(int *)(v49 + 20) & 0xF0) == 16 ) - { - v18 = pIcons_LOD; - goto LABEL_36; - } - if ( (*(int *)(v49 + 20) & 0xF0) == 32 ) - { - v37 = "sp28a"; - goto LABEL_34; - } - if ( (*(int *)(v49 + 20) & 0xF0) == 64 ) - { - v37 = "sp30a"; -LABEL_34: - v18 = pIcons_LOD; - goto LABEL_37; - } - v18 = pIcons_LOD; - if ( (*(int *)(v49 + 20) & 0xF0) == 128 ) - { - v37 = "sp91a"; - goto LABEL_37; - } -LABEL_36: - v37 = "sptext01"; -LABEL_37: - v42 = &pIcons_LOD->pTextures[v18->LoadTexture(v37, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v49 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v19 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6( - 0x1EDu, - 0x5Bu, - (Texture *)(v16 != -1 ? (int)&pIcons_LOD->pTextures[v16] : 0), - v42, - (signed __int64)v19, - 0, - 255); -LABEL_46: - v26 = pPlayer->pEquipment.field_1C; - if ( !v26 ) - return; - v43 = pPlayer->pEquipment.field_1C; - v27 = (int)&pPlayer->pInventoryItems[v26-1]; - v28 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v27].pIconName, TEXTURE_16BIT_PALETTE); - v29 = *(int *)(v27 + 20); - if ( !(*(int *)(v27 + 20) & 0xF0) ) - { - v33 = v28 + 1; - if ( v29 & 2 ) - { - v34 = v33 != 0 ? (int)&pIcons_LOD->pTextures[v28] : 0; - pRenderer->DrawTransparentRedShade(0x24Au, 0x58u, (Texture *)v34); - } - else - { - v11 = (v29 & 1) == 0; - v35 = &pIcons_LOD->pTextures[v28]; - if ( v11 ) - { - v34 = v33 != 0 ? (int)v35 : 0; - pRenderer->DrawTransparentGreenShade(586, 88, (Texture *)v34); - } - else - { - v34 = v33 != 0 ? (int)v35 : 0; - pRenderer->DrawTextureTransparent(0x24Au, 0x58u, (Texture *)v34); - } - } - pRenderer->_4A601E(586, 88, (Texture *)v34, v43); - return; - } - if ( (*(int *)(v27 + 20) & 0xF0) == 16 ) - { - v30 = pIcons_LOD; - goto LABEL_57; - } - if ( (*(int *)(v27 + 20) & 0xF0) == 32 ) - { - v38 = "sp28a"; - goto LABEL_55; - } - if ( (*(int *)(v27 + 20) & 0xF0) == 64 ) - { - v38 = "sp30a"; -LABEL_55: - v30 = pIcons_LOD; - goto LABEL_58; - } - v30 = pIcons_LOD; - if ( (*(int *)(v27 + 20) & 0xF0) == 128 ) - { - v38 = "sp91a"; - goto LABEL_58; - } -LABEL_57: - v38 = "sptext01"; -LABEL_58: - v31 = &pIcons_LOD->pTextures[v30->LoadTexture(v38, TEXTURE_16BIT_PALETTE)]; - dword_50C9A8 -= pEventTimer->uTimeElapsed; - if ( dword_50C9A8 <= 0 ) - { - dword_50C9A8 = 0; - *(char *)(v27 + 20) &= 0xFu; - ptr_50C9A4 = 0; - } - v32 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(0x24Au, 0x58u, (Texture *)(v28 != -1 ? (int)&pIcons_LOD->pTextures[v28] : 0), - v31, (signed __int64)v32, 0, 255); -} + //----- (0043ED6F) -------------------------------------------------------- bool _43ED6F_check_party_races(bool a1) @@ -12817,89 +10273,6 @@ aMoonPhaseNames[4] = pGlobalTXT_LocalizationStrings[92]; } -//----- (00410B28) -------------------------------------------------------- -void __thiscall DrawSpellDescriptionPopup(int spell_index) -{ - Player *v1; // edi@1 - SpellInfo *v2; // esi@1 - unsigned int v3; // eax@2 - int v4; // eax@4 - LONG v5; // ecx@4 - int v6; // eax@10 - char *v7; // ST44_4@12 - unsigned __int16 v8; // ax@12 - GUIWindow a1; // [sp+Ch] [bp-68h]@4 - int v10; // [sp+60h] [bp-14h]@1 - POINT a2; // [sp+64h] [bp-10h]@1 - int v12; // [sp+6Ch] [bp-8h]@4 - int v13; // [sp+70h] [bp-4h]@4 - - v1 = pPlayers[uActiveCharacter]; - v10 = spell_index; - v2 = &pSpellStats->pInfos[spell_index + 11 * v1->lastOpenedSpellbookPage + 1]; - if ( pMouse->GetCursorPos(&a2)->y <= 250 ) - v3 = pMouse->GetCursorPos(&a2)->y + 30; - else - v3 = 30; - a1.uFrameY = v3; - a1.uFrameWidth = 328; - a1.uFrameHeight = 68; - a1.uFrameX = 90; - a1.uFrameZ = 417; - a1.uFrameW = v3 + 67; - a1.Hint = 0; - a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL]); - v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_MASTER]); - v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT]); - v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_GRAND]); - v5 = a2.y; - if ( v13 > a2.y ) - v5 = v13; - if ( v12 > v5 ) - v5 = v12; - if ( v4 > v5 ) - v5 = v4; - sprintf( pTmpBuf2, - "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s", - v2->pDescription, - pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL], - v5 + 3, v5 + 10, - v2->pBasicSkillDesc, - pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT], - v5 + 3, v5 + 10, - v2->pExpertSkillDesc, - pGlobalTXT_LocalizationStrings[LOCSTR_MASTER], - v5 + 3, v5 + 10, - v2->pMasterSkillDesc, - pGlobalTXT_LocalizationStrings[LOCSTR_GRAND], - v5 + 3, v5 + 10, - v2->pGrandmasterSkillDesc); - v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2, &a1, 0, 0); - a1.uFrameHeight += v6; - if ( (signed int)a1.uFrameHeight < 150 ) - a1.uFrameHeight = 150; - a1.uFrameWidth = 460; - a1.DrawMessageBox(0); - a1.uFrameWidth -= 12; - a1.uFrameHeight -= 12; - v7 = v2->pName; - a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; - a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; - v8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); - a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u); - a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2, 0, 0, 0); - a1.uFrameWidth = 108; - a1.uFrameZ = a1.uFrameX + 107; - a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v1->lastOpenedSpellbookPage + 12], 3u); - sprintf( pTmpBuf, "%s\n%d", pGlobalTXT_LocalizationStrings[LOCSTR_SP_COST], - pSpellDatas[spell_index + 11 * v1->lastOpenedSpellbookPage + 1].mana_per_skill[v1->pActiveSkills[v1->lastOpenedSpellbookPage + PLAYER_SKILL_FIRE]]); - // *(&[0].field_12 //temp_fix field_14 - // + ((unsigned int)LOBYTE(v1->pActiveSkills[v1->lastOpenedSpellbookPage + 12]) >> 6) - // + 10 * (int)((char *)v10 + 11 * v1->lastOpenedSpellbookPage))); - a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3u); - dword_507B00_spell_info_to_draw_in_popup = 0; -} -// 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup; //----- (00410D99) -------------------------------------------------------- signed int __fastcall sub_410D99_get_map_index(int a1) @@ -13221,1007 +10594,6 @@ } // 4E1D3A: using guessed type __int16 word_4E1D3A[]; -//----- (00411300) -------------------------------------------------------- -void LoadSpellbook(unsigned int spell_school) -{ - //unsigned int v1; // esi@1 - Player *pPlayer; // ecx@1 - char v3; // al@1 - //int v4; // edi@5 - //Texture *result; // eax@6 - //unsigned char *v6; // edi@7 - //unsigned int v7; // eax@7 - //unsigned __int8 v8; // sf@8 - //unsigned __int8 v9; // of@8 - char pContainer[20]; // [sp+Ch] [bp-1Ch]@7 - //Texture *v11; // [sp+20h] [bp-8h]@5 - //int v12; // [sp+24h] [bp-4h]@5 - - byte_506550 = 0; - //v1 = uID; - pPlayer = pPlayers[uActiveCharacter]; - v3 = pPlayer->uQuickSpell; - if ( v3 && (unsigned __int8)v3 / 11 == spell_school ) - quick_spell_at_page = (unsigned __int8)v3 - 11 * spell_school; - else - quick_spell_at_page = 0; - - for (uint i = 1; i < 12; ++i) - { - if (pPlayer->spellbook.pChapters[spell_school].bIsSpellAvailable[i - 1]) - { - sprintf(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]); - dword_506408[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); - - sprintf(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]); - dword_5063D8[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); - } - } -} - -//----- (0041140B) -------------------------------------------------------- -GUIWindow *__cdecl sub_41140B() -{ - signed int v0; // esi@1 - GUIButton *v1; // eax@3 - GUIButton *v2; // esi@4 - GUIWindow *result; // eax@5 - - v0 = 0; - do - { - dword_5063D8[11+v0]->Release(); - dword_506408[11+v0]->Release(); - --v0; - } - while ( v0 >= -11 ); - pIcons_LOD->_40F9C5(); - v1 = pGUIWindow_CurrentMenu->pControlsHead; - if ( v1 ) - { - do - { - v2 = v1->pNext; - pAllocator->FreeChunk(v1); - v1 = v2; - } - while ( v2 ); - } - pGUIWindow_CurrentMenu->pControlsHead = 0; - pGUIWindow_CurrentMenu->pControlsTail = 0; - result = pGUIWindow_CurrentMenu; - pGUIWindow_CurrentMenu->uNumControls = 0; - return result; -} - -//----- (00411473) -------------------------------------------------------- -void __cdecl sub_411473() -{ - pTexture_pagemask->Release(); - pTexture_506448->Release(); - pTexture_50643C->Release(); - for (uint i = 0; i < 8; ++i) - { - pSpellBookPagesTextr[i]->Release(); - pTextures_tabs[i][0]->Release(); - pTextures_tabs[i][1]->Release(); - } - pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0); - pIcons_LOD->_4114F2(); -} - - -//----- (00411597) -------------------------------------------------------- -void __cdecl OnCloseSpellook() -{ - pAllocator->FreeChunk(pSpellFont); - pSpellFont = 0; - pAllocator->FreeChunk(pBookFont); - pBookFont = 0; - pAllocator->FreeChunk(pBook2Font); - pBook2Font = 0; - pAllocator->FreeChunk(pAutonoteFont); - pAutonoteFont = 0; - pTexture_mapbordr->Release(); - pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0); - pIcons_LOD->_4114F2(); - dword_506364 = 0; -} -// 506364: using guessed type int dword_506364; - - - - - - - -//----- (00412AF9) -------------------------------------------------------- -void sub_412AF9() - { - int v0; // ecx@1 - - v0 = 0; - if ( uActiveCharacter ) - v0 = pParty->pPlayers[uActiveCharacter-1].lastOpenedSpellbookPage;//*((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2); - pRenderer->DrawTextureIndexed(8u, 8u, pSpellBookPagesTextr[v0]); - pRenderer->DrawTextureIndexed(0x1DCu, 0x1C2u, pTexture_50643C); - pRenderer->DrawTextureIndexed(0x231u, 0x1C2u, pTexture_506448); -} - -//----- (00412B58) -------------------------------------------------------- -void __cdecl DrawSpellBookContent() -{ - Player *v0; // ebx@1 - int v1; // ebp@1 - unsigned int v2; // eax@1 - Texture *v3; // edi@1 - int v4; // esi@1 - Texture *v5; // eax@3 - Texture *v6; // edx@5 - int v7; // eax@8 - int v8; // eax@11 - POINT *v9; // esi@13 - int v10; // eax@13 - Texture *v11; // edx@14 - int v12; // eax@15 - signed int v13; // ecx@18 - unsigned int v14; // esi@18 - unsigned int v15; // edi@18 - Texture *pPageTexture; // eax@21 - unsigned int v17; // [sp-Ch] [bp-2Ch]@8 - unsigned int v18; // [sp-Ch] [bp-2Ch]@15 - unsigned int v19; // [sp-8h] [bp-28h]@8 - unsigned int v20; // [sp-8h] [bp-28h]@15 - Texture *v21; // [sp-4h] [bp-24h]@15 - signed int v22; // [sp-4h] [bp-24h]@22 - Texture *v23; // [sp+10h] [bp-10h]@5 - POINT a2; // [sp+18h] [bp-8h]@13 - POINT v24; - int v25; - - sub_412AF9(); - v0 = pPlayers[uActiveCharacter]; - v1 = 11 * v0->lastOpenedSpellbookPage; - v2 = pIcons_LOD->FindTextureByName("Pending"); - v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0); - pRenderer->ClearZBuffer(0, 479); - v4 = 1; - if ( __OFSUB__(v1, v1 + 11) ^ 1 ) - { - do - { - if ( *(&v0->_guilds_member_bits[v1 + 63] + v4) ) - { - v5 = (Texture *)dword_506408[v4]; - if ( v5 != v3 ) - { - if ( quick_spell_at_page == v4 ) - { - v6 = dword_5063D8[v4]; - v23 = dword_5063D8[v4]; - } - else - { - v23 = dword_506408[v4]; - v6 = v5; - } - if ( v6->pLevelOfDetail0 ) - { - v7 = v0->lastOpenedSpellbookPage; - // v7 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v4]); - v19 = pViewport->uViewportTL_Y + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos; - v17 = pViewport->uViewportTL_X + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos; - if ( BYTE1(v6->pBits) & 2 ) - pRenderer->DrawTextureTransparent(v17, v19, v6); - else - pRenderer->DrawTextureIndexed(v17, v19, v6); - pRenderer->_4A612A(pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos, - pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos, v23, v4); - } - } - } - ++v4; - } - while ( v4 + v1 - 1 < v1 + 11 ); - } - v9 = pMouse->GetCursorPos(&a2); - v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF; - if ( v10 ) - { - v11 = dword_5063D8[v10]; - if ( v11->pLevelOfDetail0 ) - { - v21 = dword_5063D8[v10]; - v12 = v0->lastOpenedSpellbookPage; - // v12 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v10]); - v20 = pViewport->uViewportTL_Y + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Ypos; - v18 = pViewport->uViewportTL_X + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Xpos; - if ( BYTE1(v11->pBits) & 2 ) - pRenderer->DrawTextureTransparent(v18, v20, v21); - else - pRenderer->DrawTextureIndexed(v18, v20, v21); - } - } - v13 = 0; - a2.x = (LONG)&v0->pActiveSkills[12]; - v14 = (unsigned int)&v0->pActiveSkills[12]; - v15 = (unsigned int)&v0->pActiveSkills[12]; - v25 = 0; - do - { - if ( *(short *)a2.x ) - { - if ( v0->lastOpenedSpellbookPage == v13 ) - { - pPageTexture = pTextures_tabs[v13][1]; - switch ( v13 ) - { - case 0: - v14 = 406; - v22 = 9; - goto LABEL_27; - case 1: - v14 = 406; - goto LABEL_38; - case 2: - v14 = 406; - v22 = 84; - goto LABEL_27; - case 3: - v14 = 406; - goto LABEL_26; - case 4: - v14 = 407; - goto LABEL_29; - case 5: - v15 = 196; - goto LABEL_34; - case 6: - v15 = 234; - goto LABEL_34; - case 7: - v15 = 272; - goto LABEL_34; - case 8: - v15 = 309; -LABEL_34: - v14 = 405; - break; - default: - break; - } - } - else - { - pPageTexture = pTextures_tabs[v13][0]; - switch ( v13 ) - { - case 0: - v14 = 415; - v22 = 10; - goto LABEL_27; - case 1: - v14 = 415; -LABEL_38: - v22 = 46; - goto LABEL_27; - case 2: - v14 = 415; - v22 = 83; - goto LABEL_27; - case 3: - v14 = 415; -LABEL_26: - v22 = 121; -LABEL_27: - v15 = v22; - break; - case 4: - v14 = 415; -LABEL_29: - v15 = 158; - break; - case 5: - v15 = 196; - goto LABEL_46; - case 6: - v15 = 234; - goto LABEL_46; - case 7: - v15 = 271; - goto LABEL_46; - case 8: - v15 = 307; -LABEL_46: - v14 = 416; - break; - default: - break; - } - } - pRenderer->DrawTextureTransparent(v14, v15, pPageTexture); - v13 = v25; - } - a2.x += 2; - ++v13; - v25 = v13; - } - while ( v13 < 9 ); -} -// 506408: using guessed type int dword_506408[]; -// 50654C: using guessed type int dword_50654C; - -//----- (00412E85) -------------------------------------------------------- -char __cdecl DrawBook_History() -{ - unsigned int v0; // eax@3 - unsigned int v1; // eax@7 - int v2; // eax@10 - const char *v3; // eax@10 - signed int v4; // ecx@12 - int v5; // ecx@14 - int v6; // eax@21 - int v7; // esi@21 - char *v8; // eax@21 - int v9; // eax@22 - unsigned int v11; // [sp-8h] [bp-64h]@3 - unsigned int v12; // [sp-8h] [bp-64h]@7 - Texture *v13; // [sp-4h] [bp-60h]@3 - Texture *v14; // [sp-4h] [bp-60h]@7 - GUIWindow a1; // [sp+8h] [bp-54h]@10 - - pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_11); - if ( dword_506548 || !dword_506528 ) - { - v13 = pTex_tab_an_6a__zoom_off; - v11 = pViewport->uViewportTL_Y + 2; - v0 = pViewport->uViewportTL_X + 407; - } - else - { - v13 = pTex_tab_an_6b__zoom_on; - v11 = pViewport->uViewportTL_Y + 1; - v0 = pViewport->uViewportTL_X + 398; - } - pRenderer->DrawTextureTransparent(v0, v11, v13); - if ( dword_506544 || dword_506528 + awards_count >= awards_count2 ) - { - v14 = pTex_tab_an_7a__zoot_off; - v12 = pViewport->uViewportTL_Y + 38; - v1 = pViewport->uViewportTL_X + 407; - } - else - { - v14 = pTex_tab_an_7b__zoot_on; - v12 = pViewport->uViewportTL_Y + 38; - v1 = pViewport->uViewportTL_X + 398; - } - pRenderer->DrawTextureTransparent(v1, v12, v14); - if ( !byte_5C6D50[dword_506528] ) - { - v2 = achievedAwardsIndex[dword_506528]; - a1.uFrameWidth = 460; - a1.uFrameX = 8; - a1.uFrameY = 8; - a1.uFrameHeight = 344; - v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[]; - a1.uFrameZ = 467; - a1.uFrameW = 351; - if ( v3 ) - a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, v3, 3u); - } - a1.uFrameX = 48; - a1.uFrameY = 70; - a1.uFrameWidth = 360; - a1.uFrameHeight = 264; - v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3; - a1.uFrameZ = 407; - a1.uFrameHeight = v4 * 264 / v4; - a1.uFrameW = a1.uFrameHeight + 69; - if ( dword_506544 && dword_506528 + awards_count < awards_count2 ) - { - pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - v5 = dword_50651C++; - dword_506528 += awards_count; - byte_506130[v5] = awards_count; - } - if ( dword_506548 && dword_50651C ) - { - pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - --dword_50651C; - dword_506528 -= (unsigned __int8)byte_506130[dword_50651C]; - } - if ( !awards_count || dword_506528 < 1 ) - { - dword_506528 = 0; - dword_50651C = 0; - } - dword_506544 = 0; - v6 = achievedAwardsIndex[dword_506528]; - dword_506548 = 0; - awards_count = 0; - //v7 = *pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6); - v7 = (int)pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6); - v8 = BuilDialogueString( - pStorylineText->StoreLine[v6].pText, - uActiveCharacter - 1, - 0, - 0, - 0, - (__int64 *)&pParty->field_3C._s_times[ v6 + 21]); - if ( v7 ) - { - v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]); - LOBYTE(v8) = a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0); - ++awards_count; - } - return (char)v8; -} - - -//----- (00413126) -------------------------------------------------------- -void __cdecl DrawBook_Quests() -{ - unsigned int v0; // eax@3 - unsigned int v1; // eax@7 - int v2; // ecx@11 - int v3; // ebx@16 - int v4; // eax@19 - const char *v5; // edi@19 - int v6; // eax@19 - unsigned int v7; // edi@19 - unsigned int v8; // [sp-8h] [bp-68h]@3 - unsigned int v9; // [sp-8h] [bp-68h]@7 - Texture *v10; // [sp-4h] [bp-64h]@3 - Texture *v11; // [sp-4h] [bp-64h]@7 - GUIWindow a1; // [sp+Ch] [bp-54h]@9 - - pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_CurrentBook); - if ( dword_506548 || !dword_506528 ) - { - v10 = pTex_tab_an_6a__zoom_off; - v8 = pViewport->uViewportTL_Y + 2; - v0 = pViewport->uViewportTL_X + 407; - } - else - { - v10 = pTex_tab_an_6b__zoom_on; - v8 = pViewport->uViewportTL_Y + 1; - v0 = pViewport->uViewportTL_X + 398; - } - pRenderer->DrawTextureTransparent(v0, v8, v10); - if ( dword_506544 || dword_506528 + awards_count >= awards_count2 ) - { - v11 = pTex_tab_an_7a__zoot_off; - v9 = pViewport->uViewportTL_Y + 38; - v1 = pViewport->uViewportTL_X + 407; - } - else - { - v11 = pTex_tab_an_7b__zoot_on; - v9 = pViewport->uViewportTL_Y + 38; - v1 = pViewport->uViewportTL_X + 398; - } - pRenderer->DrawTextureTransparent(v1, v9, v11); - a1.uFrameWidth = 460; - a1.uFrameHeight = 344; - a1.uFrameX = 8; - a1.uFrameY = 8; - a1.uFrameZ = 467; - a1.uFrameW = 351; - a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[174], 3u); - a1.uFrameX = 48; - a1.uFrameY = 70; - a1.uFrameWidth = 360; - a1.uFrameHeight = 264; - a1.uFrameZ = 407; - a1.uFrameW = 333; - if ( dword_506544 && dword_506528 + awards_count < awards_count2 ) - { - pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - v2 = dword_50651C++; - dword_506528 += awards_count; - byte_506130[v2] = awards_count; - } - if ( dword_506548 && dword_50651C ) - { - pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - --dword_50651C; - dword_506528 -= (unsigned __int8)byte_506130[dword_50651C]; - } - if ( !awards_count || (v3 = dword_506528, dword_506528 < 1) ) - { - v3 = 0; - dword_50651C = 0; - dword_506528 = 0; - } - dword_506544 = 0; - dword_506548 = 0; - awards_count = 0; - while ( v3 < awards_count2 ) - { - v4 = achievedAwardsIndex[v3]; - ++awards_count; - v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4]; - a1.DrawText(pAutonoteFont, 1, 0, 0, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0); - v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0); - v7 = a1.uFrameY + v6; - if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight ) - break; - pRenderer->DrawTextureTransparent(100, v7 + 12, pSpellBookPagesTextr_10); - ++v3; - a1.uFrameY = v7 + 24; - } -} - - -//----- (0041338E) -------------------------------------------------------- -void __cdecl DrawBook_Autonotes() -{ - unsigned int v0; // eax@3 - unsigned int v1; // eax@7 - signed int v2; // ebp@11 - unsigned int v3; // eax@18 - unsigned int v4; // eax@24 - unsigned int v5; // eax@30 - unsigned int v6; // eax@36 - unsigned int v7; // eax@42 - signed int v8; // ebp@47 - int v9; // eax@52 - int v10; // eax@56 - int v11; // edx@57 - int v12; // ebp@64 - int v13; // eax@65 - const char *v14; // edi@65 - int v15; // eax@65 - unsigned int v16; // edi@65 - unsigned int v17; // [sp-8h] [bp-70h]@3 - unsigned int v18; // [sp-8h] [bp-70h]@7 - unsigned int v19; // [sp-8h] [bp-70h]@18 - unsigned int v20; // [sp-8h] [bp-70h]@24 - unsigned int v21; // [sp-8h] [bp-70h]@30 - unsigned int v22; // [sp-8h] [bp-70h]@36 - unsigned int v23; // [sp-8h] [bp-70h]@42 - Texture *v24; // [sp-4h] [bp-6Ch]@3 - Texture *v25; // [sp-4h] [bp-6Ch]@7 - Texture *v26; // [sp-4h] [bp-6Ch]@18 - Texture *v27; // [sp-4h] [bp-6Ch]@24 - Texture *v28; // [sp-4h] [bp-6Ch]@30 - Texture *v29; // [sp-4h] [bp-6Ch]@36 - Texture *v30; // [sp-4h] [bp-6Ch]@42 - signed __int16 v31; // [sp+10h] [bp-58h]@1 - char *v32; // [sp+10h] [bp-58h]@49 - GUIWindow a1; // [sp+14h] [bp-54h]@46 - - v31 = 0; - pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_AutonotesBook); - if ( dword_506548 || !dword_506528 ) - { - v24 = pTex_tab_an_6a__zoom_off; - v17 = pViewport->uViewportTL_Y + 2; - v0 = pViewport->uViewportTL_X + 407; - } - else - { - v24 = pTex_tab_an_6b__zoom_on; - v17 = pViewport->uViewportTL_Y + 1; - v0 = pViewport->uViewportTL_X + 398; - } - pRenderer->DrawTextureTransparent(v0, v17, v24); - if ( dword_506544 || dword_506528 + awards_count >= awards_count2 ) - { - v25 = pTex_tab_an_7a__zoot_off; - v18 = pViewport->uViewportTL_Y + 38; - v1 = pViewport->uViewportTL_X + 407; - } - else - { - v25 = pTex_tab_an_7b__zoot_on; - v18 = pViewport->uViewportTL_Y + 38; - v1 = pViewport->uViewportTL_X + 398; - } - pRenderer->DrawTextureTransparent(v1, v18, v25); - if ( !dword_506540 ) - { - if ( dword_506568 ) - { - pRenderer->DrawTextureTransparent( - pViewport->uViewportTL_X + 408, - pViewport->uViewportTL_Y + 113, - pTexture_506390); - v2 = 1; - goto LABEL_16; - } - goto LABEL_14; - } - if ( !dword_506568 ) - { -LABEL_14: - v2 = 1; - goto LABEL_15; - } - v2 = 1; - v31 = 1; - pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); -LABEL_15: - dword_506568 = 0; - pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394); -LABEL_16: - if ( dword_50653C ) - { - if ( dword_506568 != v2 ) - { - v31 = v2; - pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); - } - } - else - { - if ( dword_506568 != v2 ) - { - v26 = pTexture_506388; - v19 = pViewport->uViewportTL_Y + 150; - v3 = pViewport->uViewportTL_X + 408; - goto LABEL_22; - } - } - v26 = pTexture_50638C; - dword_506568 = v2; - v19 = pViewport->uViewportTL_Y + 150; - v3 = pViewport->uViewportTL_X + 399; -LABEL_22: - pRenderer->DrawTextureTransparent(v3, v19, v26); - if ( dword_506538 ) - { - if ( dword_506568 != 2 ) - { - v31 = v2; - pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); - } - } - else - { - if ( dword_506568 != 2 ) - { - v27 = pTexture_506380; - v20 = pViewport->uViewportTL_Y + 188; - v4 = pViewport->uViewportTL_X + 408; - goto LABEL_28; - } - } - v27 = pTexture_506384; - dword_506568 = 2; - v20 = pViewport->uViewportTL_Y + 188; - v4 = pViewport->uViewportTL_X + 397; -LABEL_28: - pRenderer->DrawTextureTransparent(v4, v20, v27); - if ( dword_506534 ) - { - if ( dword_506568 != 3 ) - { - v31 = v2; - pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); - } - } - else - { - if ( dword_506568 != 3 ) - { - v28 = pTexture_506378; - v21 = pViewport->uViewportTL_Y + 226; - v5 = pViewport->uViewportTL_X + 408; - goto LABEL_34; - } - } - v28 = pTexture_50637C; - dword_506568 = 3; - v21 = pViewport->uViewportTL_Y + 226; - v5 = pViewport->uViewportTL_X + 397; -LABEL_34: - pRenderer->DrawTextureTransparent(v5, v21, v28); - if ( dword_506530 ) - { - if ( dword_506568 != 4 ) - { - v31 = v2; - pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); - } - } - else - { - if ( dword_506568 != 4 ) - { - v29 = pTexture_506370; - v22 = pViewport->uViewportTL_Y + 263; - v6 = pViewport->uViewportTL_X + 408; - goto LABEL_40; - } - } - v29 = pTexture_506374; - dword_506568 = 4; - v22 = pViewport->uViewportTL_Y + 264; - v6 = pViewport->uViewportTL_X + 397; -LABEL_40: - pRenderer->DrawTextureTransparent(v6, v22, v29); - if ( dword_50652C ) - { - if ( dword_506568 != 5 ) - { - v31 = v2; - pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); - } - } - else - { - if ( dword_506568 != 5 ) - { - v30 = pTexture_506368; - v23 = pViewport->uViewportTL_Y + 302; - v7 = pViewport->uViewportTL_X + 408; - goto LABEL_46; - } - } - v30 = pTexture_50636C; - dword_506568 = 5; - v23 = pViewport->uViewportTL_Y + 302; - v7 = pViewport->uViewportTL_X + 397; -LABEL_46: - pRenderer->DrawTextureTransparent(v7, v23, v30); - a1.uFrameWidth = 460; - a1.uFrameHeight = 344; - a1.uFrameX = 8; - a1.uFrameY = 8; - a1.uFrameZ = 467; - a1.uFrameW = 467; - a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[154], 3u); - a1.uFrameX = 48; - a1.uFrameY = 70; - a1.uFrameWidth = 360; - a1.uFrameHeight = 264; - a1.uFrameZ = 407; - a1.uFrameW = 333; - if ( v31 ) - { - awards_count2 = 0; - dword_506528 = 0; - dword_50651C = 0; - awards_count = 0; - v8 = 0; - do - { - //if ( dword_72371C[2 * v8] == dword_506568 ) - if ( pAutonoteTxt[v8-1].eType == dword_506568 ) - { - //v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8]; - v32 = (char *)pAutonoteTxt[v8-1].pText; - if ( (short)v8 ) - { - if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 ) - { - v9 = awards_count++; - achievedAwardsIndex[v9] = (signed __int16)v8; - } - } - } - ++v8; - } - while ( v8 < 196 ); - awards_count2 = awards_count; - } - else - { - if ( dword_506544 ) - { - v10 = awards_count + dword_506528; - if ( awards_count + dword_506528 < awards_count2 ) - { - v11 = dword_50651C++; - byte_506130[v11] = awards_count; - dword_506528 = v10; - pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - } - } - if ( dword_506548 && dword_50651C ) - { - --dword_50651C; - dword_506528 -= (unsigned __int8)byte_506130[dword_50651C]; - pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - } - if ( !awards_count || dword_506528 < 1 ) - { - dword_506528 = 0; - dword_50651C = 0; - } - } - v12 = dword_506528; - dword_50652C = 0; - dword_506544 = 0; - dword_506548 = 0; - awards_count = 0; - dword_506530 = 0; - dword_506534 = 0; - dword_506538 = 0; - dword_50653C = 0; - dword_506540 = 0; - while ( v12 < awards_count2 ) - { - v13 = achievedAwardsIndex[v12]; - ++awards_count; - //v14 = (&dword_723718_autonote_related)[8 * v13]; - v14 = pAutonoteTxt[v13-1].pText; - //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0); - a1.DrawText(pAutonoteFont, 1, 0, 0, pAutonoteTxt[v13-1].pText, 0, 0, 0); - v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0); - v16 = a1.uFrameY + v15; - if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight ) - break; - pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pSpellBookPagesTextr_10); - ++v12; - a1.uFrameY = v16 + 24; - } -} - - -//----- (00413980) -------------------------------------------------------- -void DrawBook_Maps() - { - - int v6; // eax@31 - unsigned int map_id; // eax@35 - Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3 - char party_coord[120]; // [sp+Ch] [bp-CCh]@37 - GUIWindow map_window; // [sp+84h] [bp-54h]@35 - unsigned int textrX, textrY; - - pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12); - if ( dword_506548 || viewparams->field_2C / 128 >= 12 ) - { - buttnTxtr = pTex_tab_an_6a__zoom_off; - textrY = pViewport->uViewportTL_Y + 2; - textrX = pViewport->uViewportTL_X + 408; - } - else - { - buttnTxtr = pTex_tab_an_6b__zoom_on; - textrY = pViewport->uViewportTL_Y + 1; - textrX = pViewport->uViewportTL_X + 398; - } - pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); - if ( dword_506544 || viewparams->field_2C / 128 <= 3 ) - { - buttnTxtr = pTex_tab_an_7a__zoot_off; - textrY = pViewport->uViewportTL_Y + 38; - textrX = pViewport->uViewportTL_X + 408; - } - else - { - buttnTxtr = pTex_tab_an_7b__zoot_on; - textrY = pViewport->uViewportTL_Y + 38; - textrX = pViewport->uViewportTL_X + 398; - } - pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); - if ( dword_506540 ) - { - buttnTxtr = pTexture_506390; - textrY = pViewport->uViewportTL_Y + 113; - textrX = pViewport->uViewportTL_X + 408; - } - else - { - buttnTxtr = pTexture_506394; - textrY = pViewport->uViewportTL_Y + 113; - textrX = pViewport->uViewportTL_X + 398; - } - pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); - if ( dword_50653C ) - { - buttnTxtr = pTexture_506388; - textrY = pViewport->uViewportTL_X + 150; - textrX = pViewport->uViewportTL_Y + 408; - } - else - { - buttnTxtr = pTexture_50638C; - textrY = pViewport->uViewportTL_X + 150; - textrX = pViewport->uViewportTL_Y + 399; - } - pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); - if ( dword_506538 ) - { - buttnTxtr = pTexture_506380; - textrY = pViewport->uViewportTL_Y + 188; - textrX = pViewport->uViewportTL_X + 408; - } - else - { - buttnTxtr = pTexture_506384; - textrY = pViewport->uViewportTL_Y + 188; - textrX = pViewport->uViewportTL_X + 397; - } - pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); - if ( dword_506534 ) - { - buttnTxtr = pTexture_506378; - textrY = pViewport->uViewportTL_Y + 226; - textrX = pViewport->uViewportTL_X + 408; - } - else - { - buttnTxtr = pTexture_50637C; - textrY = pViewport->uViewportTL_Y + 226; - textrX = pViewport->uViewportTL_X + 397; - } - pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); - if ( dword_506544 ) - viewparams->CenterOnParty2(); - if ( dword_506548 ) - viewparams->CenterOnParty(); - if ( dword_506540 ) - viewparams->_443219(); - if ( dword_50653C ) - viewparams->_443231(); - if ( dword_506538 ) - viewparams->_44323D(); - if ( dword_506534 ) - viewparams->_443225(); - - if ( dword_506548 | dword_506544 | dword_506540 | dword_50653C | dword_506538 | dword_506534 ) - pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); - dword_506548 = 0; - dword_506544 = 0; - dword_506534 = 0; - dword_506538 = 0; - dword_50653C = 0; - dword_506540 = 0; - DrawBook_Map_sub(97, 49, 361, 313, 0); - pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr); - map_window.uFrameWidth = 460; - map_window.uFrameHeight = 344; - map_window.uFrameX = 8; - map_window.uFrameY = 8; - map_window.uFrameZ = 467; - map_window.uFrameW = 467; - map_id = pMapStats->GetMapInfo(pCurrentMapName); - if ( map_id ) - map_window.DrawTitleText(pBook2Font, -14, 12, 0, pMapStats->pInfos[map_id].pName, 3); - map_window.uFrameX = 0; - sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d" - map_window.DrawTitleText(pFontComic, 0, 320, 0, party_coord, 0); -} - - -//----- (00413CC6) -------------------------------------------------------- -void __thiscall SellectDrawBook(unsigned int uBook) -{ - enum WindowType pWindowType; // esi@1 - - pWindowType = (enum WindowType)uBook; - pRenderer->DrawTextureIndexed(471u, 445u, (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0)); - switch ( pWindowType ) - { - case WINDOW_Lloyd: // 177 - DrawLloydBeaconsScreen(); - break; - case WINDOW_TownPortal: //195 - DrawTownPortalScreen(); - break; - case WINDOW_QuestBook: //200 - DrawBook_Quests(); - break; - case WINDOW_AutonotesBook: //201 - DrawBook_Autonotes(); - break; - case WINDOW_MapsBook://202 - DrawBook_Maps(); - break; - case WINDOW_CalendarBook://203 - DrawBook_Calendar(); - break; - case WINDOW_HistoryBook://224 - DrawBook_History(); - break; - } -} //----- (00413D3C) -------------------------------------------------------- char *__cdecl GetDayPart() @@ -14442,496 +10814,8 @@ } // 4E28F8: using guessed type int pCurrentScreen; -//----- (004142D3) -------------------------------------------------------- -char __cdecl GameMenuUI_DrawKeyBindings() -{ - unsigned int v0; // ebp@1 - int v1; // ecx@2 - unsigned int v2; // eax@6 - GUIWindow *v3; // edx@6 - signed int v4; // ecx@7 - signed int v5; // eax@8 - const char *v6; // ST0C_4@16 - unsigned int v7; // eax@16 - const char *v8; // ST0C_4@16 - unsigned int v9; // eax@16 - const char *v10; // ST0C_4@16 - unsigned int v11; // eax@16 - const char *v12; // ST0C_4@16 - unsigned int v13; // eax@16 - const char *v14; // ST0C_4@16 - unsigned int v15; // eax@16 - const char *v16; // ST0C_4@16 - unsigned int v17; // eax@16 - const char *v18; // ST0C_4@16 - unsigned int v19; // eax@16 - const char *v20; // ST0C_4@16 - unsigned int v21; // eax@16 - signed int v22; // ebp@16 - const char *v23; // ST0C_4@16 - unsigned int v24; // eax@16 - const char *v25; // ST0C_4@16 - unsigned int v26; // eax@16 - const char *v27; // ST0C_4@16 - unsigned int v28; // eax@16 - const char *v29; // ST0C_4@16 - unsigned int v30; // eax@16 - const char *v31; // ST0C_4@16 - unsigned int v32; // eax@16 - const char *v33; // ST0C_4@17 - unsigned int v34; // eax@17 - const char *v35; // ST0C_4@17 - unsigned int v36; // eax@17 - const char *v37; // ST0C_4@17 - unsigned int v38; // eax@17 - const char *v39; // ST0C_4@17 - unsigned int v40; // eax@17 - const char *v41; // ST0C_4@17 - unsigned int v42; // eax@17 - const char *v43; // ST0C_4@17 - unsigned int v44; // eax@17 - const char *v45; // ST0C_4@17 - unsigned int v46; // eax@17 - const char *v47; // ST0C_4@17 - unsigned int v48; // eax@17 - const char *v49; // ST0C_4@17 - unsigned int v50; // eax@17 - const char *v51; // ST0C_4@17 - unsigned int v52; // eax@17 - const char *v53; // ST0C_4@17 - unsigned int v54; // eax@17 - const char *v55; // ST0C_4@17 - unsigned int v56; // eax@17 - const char *v57; // ST0C_4@17 - unsigned int v58; // eax@17 - unsigned int v59; // eax@18 - int v61; // [sp-14h] [bp-28h]@16 - const char *v62; // [sp-10h] [bp-24h]@16 - int v63; // [sp-Ch] [bp-20h]@16 - int v64; // [sp-8h] [bp-1Ch]@16 - unsigned int v65; // [sp-4h] [bp-18h]@16 - unsigned int a5; // [sp+10h] [bp-4h]@1 - - v0 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); - a5 = v0; - if ( byte_4E28FC ) - { - v1 = dword_507C0C + 15; - dword_507C0C = v1; - if ( v1 == 255 ) - byte_4E28FC = 0; - } - else - { - v1 = dword_507C0C - 15; - dword_507C0C = v1; - if ( v1 == 15 ) - byte_4E28FC = 1; - } - v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v1, 0, 0); - v3 = pGUIWindow_CurrentMenu; - dword_507C08 = v2; - if ( pGUIWindow_CurrentMenu->field_40 == 2 ) - { - pPrevVirtualCidesMapping[dword_506E68] = pKeyActionMap->pPressedKeysBuffer[0]; - memset(&KeyButtonFlagChangesArray, 0, sizeof(KeyButtonFlagChangesArray)); - v4 = 0; - do - { - v5 = 0; - do - { - if ( v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5] ) - { - KeyButtonFlagChangesArray[v4] = 1; - KeyButtonFlagChangesArray[v5] = 1; - } - ++v5; - } - while ( v5 < 28 ); - ++v4; - } - while ( v4 < 28 ); - dword_506E68 = -1; - v3->field_40 = 0; - } - pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_Optkb[0] != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb[0]] : 0)); - if ( KeyboardPageNum == 1 ) - { - pRenderer->DrawTextureIndexed(0x13, 0x12E, (Texture *)(uTextureID_Optkb[3] != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb[3]] : 0)); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2D5C, 0, 0, 0); - v6 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]); - v7 = sub_414D24(0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v7, v6, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2D50, 0, 0, 0); - v8 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]); - v9 = sub_414D24(1); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v9, v8, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2D48, 0, 0, 0); - v10 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]); - v11 = sub_414D24(2); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v11, v10, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2D40, 0, 0, 0); - v12 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]); - v13 = sub_414D24(3); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v13, v12, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2D38, 0, 0, 0); - v14 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]); - v15 = sub_414D24(4); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v15, v14, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2D30, 0, 0, 0); - v16 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]); - v17 = sub_414D24(5); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v17, v16, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2D28, 0, 0, 0); - v18 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]); - v19 = sub_414D24(6); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v19, v18, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2D1C, 0, 0, 0); - v20 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]); - v21 = sub_414D24(7); - v22 = 350; - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v21, v20, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2D14, 0, 0, 0); - v23 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]); - v24 = sub_414D24(8); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v24, v23, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2D0C, 0, 0, 0); - v25 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]); - v26 = sub_414D24(9); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v26, v25, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2D04, 0, 0, 0); - v27 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]); - v28 = sub_414D24(10); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v28, v27, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2CFC, 0, 0, 0); - v29 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]); - v30 = sub_414D24(11); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v30, v29, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2CF0, 0, 0, 0); - v31 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]); - v32 = sub_414D24(12); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v32, v31, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2CE8, 0, 0, 0); - v65 = 0; - v64 = 0; - v63 = 0; - v62 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]); - v61 = 13; - } - else - { - pRenderer->DrawTextureIndexed(0x7F, 0x12E, (Texture *)(uTextureID_Optkb[4] != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb[4]] : 0)); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2CDC, 0, 0, 0); - v33 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]); - v34 = sub_414D24(14); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v34, v33, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2CD4, 0, 0, 0); - v35 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]); - v36 = sub_414D24(15); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v36, v35, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2CC8, 0, 0, 0); - v37 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]); - v38 = sub_414D24(16); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v38, v37, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2CBC, 0, 0, 0); - v39 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]); - v40 = sub_414D24(17); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v40, v39, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2CB0, 0, 0, 0); - v41 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]); - v42 = sub_414D24(18); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v42, v41, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2CA4, 0, 0, 0); - v43 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]); - v44 = sub_414D24(19); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v44, v43, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2C9C, 0, 0, 0); - v45 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]); - v46 = sub_414D24(20); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v46, v45, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2C90, 0, 0, 0); - v47 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]); - v48 = sub_414D24(21); - v22 = 350; - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v48, v47, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2C84, 0, 0, 0); - v49 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]); - v50 = sub_414D24(22); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v50, v49, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2C7C, 0, 0, 0); - v51 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]); - v52 = sub_414D24(23); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v52, v51, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2C70, 0, 0, 0); - v53 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]); - v54 = sub_414D24(24); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v54, v53, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2C68, 0, 0, 0); - v55 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]); - v56 = sub_414D24(25); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v56, v55, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2C5C, 0, 0, 0); - v57 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]); - v58 = sub_414D24(26); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v58, v57, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2C54, 0, 0, 0); - v65 = 0; - v64 = 0; - v63 = 0; - v62 = pKeyActionMap->GetVKeyDisplayName(pWindowList_at_506F50_minus1_indexing[0]); - v61 = 27; - } - v59 = sub_414D24(v61); - return pGUIWindow_CurrentMenu->DrawText(pFontLucida, v22, 268, v59, v62, v63, v64, v65); -} - - -//----- (00414D24) -------------------------------------------------------- -unsigned int __thiscall sub_414D24(int _this) -{ - int v1; // esi@1 - unsigned int v2; // edi@1 - unsigned int v3; // ebx@1 - unsigned int result; // eax@1 - - v1 = _this; - v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); - v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFu, 0, 0); - result = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); - if ( dword_506E68 == v1 ) - { - if ( GetTickCount() % 0x3E8 <= 0x1F4 ) - result = v3; - else - result = v2; - } - else - { - if ( KeyButtonFlagChangesArray[v1] ) - result = dword_507C08; - } - return result; -} -// 506E68: using guessed type int dword_506E68; -// 506E6C: using guessed type __int16 word_506E6C[18]; -// 507C08: using guessed type int dword_507C08; - -//----- (00414D9A) -------------------------------------------------------- -void __cdecl GameMenuUI_DrawVideoOptions() -{ - const char *v0; // ST0C_4@3 - unsigned __int16 v1; // ax@3 - int v2; // eax@10 - GUIWindow v3; // [sp+8h] [bp-54h]@3 - - pRenderer->DrawTextureIndexed( - 8u, - 8u, - (Texture *)(uTextureID_507C10 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C10] : 0)); - if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() ) - { - pRenderer->DrawTextureIndexed( - 17 * uGammaPos + 42, - 162u, - (Texture *)(pTextureIDs_GammaPositions[uGammaPos] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_GammaPositions[uGammaPos]] : 0)); - pRenderer->DrawTextureRGB(0x112u, 0xA9u, &stru_506E40); - v3.uFrameX = 22; - v0 = pGlobalTXT_LocalizationStrings[226]; - v3.uFrameY = 190; - v3.uFrameWidth = 211; - v3.uFrameHeight = 79; - v3.uFrameZ = 232; - v3.uFrameW = 268; - v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); - v3.DrawTitleText(pFontSmallnum, 0, 0, v1, v0, 3u); - } - if ( !pRenderer->pRenderD3D ) - { - pRenderer->DrawTextureIndexed( - 0x14u, - 0x119u, - (Texture *)(uTextureID_507C50 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C50] : 0)); - pRenderer->DrawTextureIndexed( - 0x14u, - 0x12Fu, - (Texture *)(uTextureID_507C54 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C54] : 0)); - v2 = uTextureID_507C58; - goto LABEL_12; - } - if ( pGame->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS ) - pRenderer->DrawTextureIndexed( - 0x14u, - 0x119u, - (Texture *)(uTextureID_507C14 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C14] : 0)); - if ( pRenderer->bUseColoredLights ) - pRenderer->DrawTextureIndexed( - 0x14u, - 0x12Fu, - (Texture *)(uTextureID_507C18 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C18] : 0)); - if ( pRenderer->bTinting ) - { - v2 = uTextureID_507C1C; -LABEL_12: - pRenderer->DrawTextureIndexed(0x14u, 0x145u, (Texture *)(v2 != -1 ? &pIcons_LOD->pTextures[v2] : 0)); - } -} - - - -//----- (00414F82) -------------------------------------------------------- -void __cdecl DrawGameOptions() -{ - signed int v0; // eax@1 - - pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_Options != -1 ? &pIcons_LOD->pTextures[uTextureID_Options] : 0)); - pRenderer->DrawTextureIndexed(8, 132, (Texture *)(uTextureID_ControlBG[0] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[0]] : 0)); - v0 = 0; - if ( uTurnSpeed == 128 ) - { - v0 = 2; - } - else - { - if ( uTurnSpeed == 64 ) - v0 = 1; - } - pRenderer->DrawTextureIndexed(BtnTurnCoord[v0], 270, (Texture *)(uTextureID_ControlBG[v0 + 1] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[v0 + 1]] : 0)); - if ( bWalkSound ) - pRenderer->DrawTextureIndexed(20, 303, (Texture *)(uTextureID_ControlBG[21] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[21]] : 0)); - if ( bShowDamage ) - pRenderer->DrawTextureIndexed(128, 303, (Texture *)(uTextureID_ControlBG[22] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[22]] : 0)); - if ( bFlipOnExit ) - pRenderer->DrawTextureIndexed(128, 325, (Texture *)(uTextureID_ControlBG[9] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[9]] : 0)); - if ( bAlwaysRun ) - pRenderer->DrawTextureIndexed(20, 325, (Texture *)(uTextureID_ControlBG[20] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[20]] : 0)); - pRenderer->DrawTextureIndexed(17 * (char)uSoundVolumeMultiplier + 265, 162, - (Texture *)(uTextureID_ControlBG[(char)uSoundVolumeMultiplier + 10] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[(char)uSoundVolumeMultiplier + 10]] : 0)); - pRenderer->DrawTextureIndexed(17 * (char)uMusicVolimeMultiplier + 265, 216, - (Texture *)(uTextureID_ControlBG[(char)uMusicVolimeMultiplier + 10] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[(char)uMusicVolimeMultiplier + 10]] : 0)); - pRenderer->DrawTextureIndexed(17 * (char)uVoicesVolumeMultiplier + 265, 270, - (Texture *)(uTextureID_ControlBG[(char)uVoicesVolumeMultiplier + 10] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[(char)uVoicesVolumeMultiplier + 10]] : 0)); -} - - -//----- (004151D9) -------------------------------------------------------- -void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight) -{ - unsigned int v4; // ebx@1 - Texture *v5; // edi@1 - signed int uTileWidth; // ecx@1 - int v7; // eax@5 - int v8; // ecx@10 - unsigned int v9; // ebx@14 - int v10; // [sp+10h] [bp-28h]@5 - signed int uTileHeight; // [sp+18h] [bp-20h]@1 - int v12; // [sp+1Ch] [bp-1Ch]@7 - int v13; // [sp+20h] [bp-18h]@1 - int a5; // [sp+24h] [bp-14h]@5 - unsigned int a5a; // [sp+24h] [bp-14h]@11 - unsigned int a4; // [sp+28h] [bp-10h]@1 - int uNumXTiles; // [sp+2Ch] [bp-Ch]@3 - unsigned int uNumXTilesa; // [sp+2Ch] [bp-Ch]@6 - unsigned int uNumXTilesb; // [sp+2Ch] [bp-Ch]@11 - unsigned int a2a; // [sp+30h] [bp-8h]@1 - unsigned int v21; // [sp+34h] [bp-4h]@5 - unsigned int v22; // [sp+34h] [bp-4h]@11 - - v4 = uY; - a2a = uX; - a4 = uX + uWidth; - pRenderer->Clip(uX, v4, uX + uWidth, v4 + uHeight); - v5 = (Texture *)(uTextureID_Parchment != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Parchment] : 0); - uTileWidth = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24); - v13 = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24); - uTileHeight = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26); - if ( (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24) - && (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26) ) - { - uNumXTiles = (signed int)uWidth / uTileWidth; - if ( (signed int)uWidth % uTileWidth ) - ++uNumXTiles; - a5 = 0; - v21 = v4; - v7 = uNumXTiles + 1; - v10 = uNumXTiles + 1; - do - { - uNumXTilesa = a2a - v13; - if ( v7 > 0 ) - { - v12 = v7; - do - { - uNumXTilesa += v13; - pRenderer->DrawTextureIndexed(uNumXTilesa, v21, v5); - --v12; - } - while ( v12 ); - v7 = v10; - } - v21 += uTileHeight; - v8 = a5++; - } - while ( v8 < (signed int)uHeight / uTileHeight ); - a5a = v4 + uHeight - 32; - pRenderer->DrawTextureTransparent( - a2a, - v4, - (Texture *)(uTextureID_5076AC != -1 ? &pIcons_LOD->pTextures[uTextureID_5076AC] : 0)); - pRenderer->DrawTextureTransparent( - a2a, - a5a, - (Texture *)(uTextureID_5076B4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076B4] : 0)); - pRenderer->DrawTextureTransparent( - a4 - 32, - v4, - (Texture *)(uTextureID_5076A8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A8] : 0)); - pRenderer->DrawTextureTransparent( - a4 - 32, - a5a, - (Texture *)(uTextureID_5076B0 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_5076B0] : 0)); - uNumXTilesb = a2a + 32; - v22 = v4 + uHeight - 10; - if ( (signed int)uWidth > 64 ) - { - pRenderer->Clip(a2a + 32, v4, a4 - 32, v4 + uHeight); - pRenderer->DrawTextureTransparent( - uNumXTilesb, - v4, - (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0)); - pRenderer->DrawTextureTransparent( - uNumXTilesb, - v22, - (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0)); - if ( (signed int)uWidth > 512 ) - { - pRenderer->DrawTextureTransparent( - a2a + 544, - v4, - (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0)); - pRenderer->DrawTextureTransparent( - a2a + 544, - v22, - (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0)); - } - } - v9 = v4 + 32; - if ( (signed int)uHeight > 64 ) - { - pRenderer->Clip(a2a, v9, a4, a5a); - pRenderer->DrawTextureTransparent( - a2a, - v9, - (Texture *)(uTextureID_5076A0 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A0] : 0)); - pRenderer->DrawTextureTransparent( - a4 - 10, - v9, - (Texture *)(uTextureID_50769C != -1 ? &pIcons_LOD->pTextures[uTextureID_50769C] : 0)); - } - pRenderer->ResetClip(); - } -} + + //----- (00415485) -------------------------------------------------------- @@ -15836,380 +11720,7 @@ } -//----- (00416D62) -------------------------------------------------------- -void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this) -{ - signed int pPlayerNum; // eax@12 - char *v2; // eax@32 - void *v3; // ecx@52 - unsigned int v4; // eax@59 - int v5; // esi@62 - signed int v6; // esi@64 - signed int v7; // esi@69 - ItemGen *v8; // ecx@70 - unsigned int v9; // eax@72 - unsigned int v10; // eax@76 - char v11; // zf@83 - GUIButton *pButton; // esi@84 - unsigned int v13; // ecx@85 - char *pStr; // edi@85 - signed int pControlID; // eax@92 - int v16; // eax@95 - int v17; // eax@96 - enum PLAYER_SKILL_TYPE v18; // eax@98 - char *pStr2; // eax@99 - unsigned int v20; // eax@108 - unsigned int pSkillId; // eax@109 - const char *pSkillInfo; // eax@111 - //char *v23; // ebx@112 - char *pHint; // edx@113 - unsigned int pColor; // eax@113 - GUIWindow pWindow; // [sp+4h] [bp-74h]@32 - double v27; // [sp+58h] [bp-20h]@33 - struct tagPOINT Point; // [sp+60h] [bp-18h]@6 - char *v29; // [sp+68h] [bp-10h]@33 - float v30; // [sp+6Ch] [bp-Ch]@33 - unsigned int pX; // [sp+70h] [bp-8h]@3 - unsigned int pY; // [sp+74h] [bp-4h]@3 - - if ( pCurrentScreen == SCREEN_VIDEO ) - return; - if ( _this ) - { - pX = _this->x; - pY = _this->y; - } - else - { - pMouse->GetClickPos(&pX, &pY); - } - if ( pRenderer->bWindowMode ) - { - GetCursorPos(&Point); - ScreenToClient(hWnd, &Point); - if ( Point.x < 1 || Point.y < 1 || Point.x > 638 || Point.y > 478 ) - { - back_to_game(); - return; - } - } - - if ( pParty->pPickedItem.uItemID )// - { - //v1 = 0; - //do - for ( pPlayerNum = 0; pPlayerNum < 4; ++pPlayerNum) - { - if ( (signed int)pX > RightClickPortraitXmin[pPlayerNum] && (signed int)pX < RightClickPortraitXmax[pPlayerNum] - && (signed int)pY > 375 && (signed int)pY < 466 ) - { - pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(pPlayerNum + 1, 1); - return; - } - //++v1; - } - //while ( v1 < 4 ); - } - - pEventTimer->Pause(); - - switch(pCurrentScreen) - { - case SCREEN_CASTING: - { - identify_item(); - break; - } - - case SCREEN_CHEST: - { - if ( !pPlayers[uActiveCharacter]->CanAct() ) - { - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[427],//%s %s - pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]);// - pWindow.Hint = pTmpBuf; - pWindow.uFrameWidth = 384; - pWindow.uFrameHeight = 180; - pWindow.uFrameY = 40; - if ( (signed int)pX <= 320 ) - v10 = pX + 30; - else - v10 = pX - 414; - pWindow.uFrameX = v10; - pWindow.DrawMessageBox(0); - } - else - { - v9 = pX + pSRZBufferLineOffsets[pY]; - if ( pRenderer->pActiveZBuffer[v9] & 0xFFFF ) - { - - // __debugbreak(); // invalid indexing will result in invalid object ptr - // v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18* *((short *)&pChests[0].igChestItems[139].uExpireTime - // + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)pChestWindow->ptr_1C + 3)); - v10=pChests[pChestWindow->par1C].pInventoryIndices[(pRenderer->pActiveZBuffer[v9] & 0xFFFF)-1]; - v8 =&pChests[pChestWindow->par1C].igChestItems[v10-1]; - GameUI_DrawItemInfo(v8); - } - } - break; - } - case SCREEN_GAME: - { - if (GetCurrentMenuID() > 0) - break; - - if ( (signed int)pY > (signed int)pViewport->uViewportBR_Y ) - { - pWindow.ptr_1C = (void *)((signed int)pX / 118); - if ( (signed int)pX / 118 < 4 ) - { - pWindow.Hint = 0; - pWindow.uFrameWidth = 400; - pWindow.uFrameHeight = 200; - pWindow.uFrameX = 38; - pWindow.uFrameY = 60; - pAudioPlayer->StopChannels(-1, -1); - pWindow.DrawQuickCharRecord(); - } - } - else if ( (signed int)pX > (signed int)pViewport->uViewportBR_X ) - { - if ( (signed int)pY >= 130 ) - { - if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 ) - { - pWindow.Hint = 0; - pWindow.uFrameWidth = 400; - pWindow.uFrameHeight = 200; - pWindow.uFrameX = 38; - pWindow.uFrameY = 60; - pAudioPlayer->StopChannels(-1, -1); - pWindow._41D73D_draw_buff_tooltip(); - } - else if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 ) - { - if (!( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 )) - { - pAudioPlayer->StopChannels(-1, -1); - v3 = (void *)1; - } - } - else - { - pAudioPlayer->StopChannels(-1, -1); - v3 = 0; - sub_416B01(v3); - } - } - else - { - pWindow.Hint = _4443D5_GetMinimapRightClickText(); - pWindow.uFrameWidth = 256; - pWindow.uFrameX = 130; - pWindow.uFrameY = 140; - pWindow.uFrameHeight = 64; - pAudioPlayer->StopChannels(-1, -1); - pWindow.DrawMessageBox(0); - } - } - else - { - pWindow.Hint = 0; - pWindow.uFrameWidth = 320; - pWindow.uFrameHeight = 320; - v4 = pX - 350; - if ( (signed int)pX <= 320 ) - v4 = pX + 30; - pWindow.uFrameX = v4; - pWindow.uFrameY = 40; - if ( pRenderer->pRenderD3D ) - LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val(); - else - v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; - v6 = (unsigned __int16)v5; - if ( (v6 & 7) != OBJECT_Item) - { - if ( (v6 & 7) == OBJECT_Actor) - { - if ( pRenderer->uNumSceneBegins ) - { - pWindow.DrawMessageBox(1); - MonsterPopup_Draw(v6 >> 3, &pWindow); - } - else - { - pRenderer->BeginScene(); - pWindow.DrawMessageBox(1); - MonsterPopup_Draw(v6 >> 3, &pWindow); - pRenderer->EndScene(); - } - } - } - else - { - v7 = v6 >> 3; - if ( ! (pObjectList->pObjects[pSpriteObjects[v7].uObjectDescID].uFlags & 0x10 ) ) - { - v8 = &pSpriteObjects[v7].stru_24; - GameUI_DrawItemInfo(v8); - } - } - } - break; - } - case SCREEN_BOOKS: - { - if ( !dword_506364 - || (signed int)pX < (signed int)pViewport->uViewportTL_X - || (signed int)pX > (signed int)pViewport->uViewportBR_X - || (signed int)pY < (signed int)pViewport->uViewportTL_Y - || (signed int)pY > (signed int)pViewport->uViewportBR_Y - || (v2 = (char *)sub_444564(), (pWindow.Hint = v2) == 0) ) - break; - v30 = (double)(pFontArrus->GetLineWidth(v2) + 32); - v27 = v30 + 6.7553994e15; - v29 = (char *)LODWORD(v27); - pWindow.uFrameWidth = LODWORD(v27); - pWindow.uFrameX = pX + 5; - pWindow.uFrameY = pY + 5; - pWindow.uFrameHeight = 64; - pAudioPlayer->StopChannels(-1, -1); - pWindow.DrawMessageBox(0); - break; - } - case SCREEN_CHARACTERS: - case SCREEN_E: - case SCREEN_F: - { - if ( (signed int)pX > 467 && pCurrentScreen != SCREEN_E ) - { - identify_item(); - } - else if ( (signed int)pY >= 345 ) - break; - else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 100 )//2DEvent - CharacerScreenStats - { - CharacterUI_StatsTab_ShowHint(); - } - else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 101 )//2DEvent - CharacerScreenSkills - { - CharacterUI_SkillsTab_ShowHint(); - } - else - { - v11 = pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103;//2DEvent - CharacerScreenInventory - if ( v11 ) - identify_item(); - } - break; - } - case SCREEN_SPELL_BOOK: - { - if ( dword_507B00_spell_info_to_draw_in_popup ) - DrawSpellDescriptionPopup(dword_507B00_spell_info_to_draw_in_popup - 1); - break; - } - case SCREEN_HOUSE: - { - if ( (signed int)pY < 345 && (signed int)pX < 469 ) - sub_4B1A2D();//identify item in inventory - break; - } - - case SCREEN_PARTY_CREATION: - { - pWindow.Hint = 0; - pStr = 0; - for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext) - { - if ( pButton->uButtonType == 1 && pButton->uButtonType != 3 && (signed int)pX > (signed int)pButton->uX && (signed int)pX < (signed int)pButton->uZ - && (signed int)pY > (signed int)pButton->uY && (signed int)pY < (signed int)pButton->uW ) - { - pControlID = pButton->uControlID; - switch ( pControlID ) - { - case 0: //stats info - pWindow.Hint = pAttributeDescriptions[(signed int)pButton->uControlParam % 7]; - pStr = aAttributeNames[(signed int)pButton->uControlParam % 7]; - break; - case 62: //Plus button info - pStr = pGlobalTXT_LocalizationStrings[670];// - pWindow.Hint = pGlobalTXT_LocalizationStrings[671];//" , " - break; - case 63: //Minus button info - pStr = pGlobalTXT_LocalizationStrings[668];// - pWindow.Hint = pGlobalTXT_LocalizationStrings[669];//" , " - break; - case 64: //Available skill button info - v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->uControlParam + 4); - pStr = pSkillNames[v18]; - pWindow.Hint = pSkillDesc[v18]; - break; - case 65: //Available Class Info - pWindow.Hint = pClassDescriptions[pButton->uControlParam]; - pStr = pClassNames[pButton->uControlParam]; - break; - case 66: //OK Info - pWindow.Hint = pGlobalTXT_LocalizationStrings[664];// . - pStr = pGlobalTXT_LocalizationStrings[665];// - break; - case 67: //Clear info - pWindow.Hint = pGlobalTXT_LocalizationStrings[666];// . - pStr = pGlobalTXT_LocalizationStrings[667];// - break; - case 118: // Character info - pStr = pParty->pPlayers[pButton->uControlParam].pName; - pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->uControlParam].classType]; - break; - } - if ( pControlID > 68 && pControlID <= 75 ) //Sellected skills info - { - pSkillId = pParty->pPlayers[pButton->uControlParam].GetSkillIdxByOrder(pControlID - 72); - pY = 0; - if ( (signed int)pSkillId < 37 ) - { - pSkillInfo = CharacterUI_GetSkillDescText(pButton->uControlParam, (enum PLAYER_SKILL_TYPE)pSkillId); - strcpy(pTmpBuf2, pSkillInfo); - pWindow.Hint = pTmpBuf2; - pStr = pSkillNames[pSkillId]; - } - } - } - } - if ( pWindow.Hint ) - { - pHint = pWindow.Hint; - pWindow.Hint = 0; - pWindow.uFrameWidth = 384; - pWindow.uFrameHeight = 256; - pWindow.uFrameX = 128; - pWindow.uFrameY = 40; - pWindow.uFrameHeight = pFontSmallnum->CalcTextHeight(pHint, &pWindow, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24; - pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1; - pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1; - pWindow.DrawMessageBox(0); - pWindow.uFrameX += 12; - pWindow.uFrameWidth -= 24; - pWindow.uFrameY += 12; - pWindow.uFrameHeight -= 12; - pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1; - pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1; - pColor = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFF, 0xFF, 0x9B); - sprintf(pTmpBuf, format_4E2D80, pColor, pStr);//"\f%05d%s\f00000\n" - pWindow.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3); - pWindow.DrawText(pFontSmallnum, 1, pFontLucida->uFontHeight, 0, pHint, 0, 0, 0); - } - break; - } - default: - { - break; - } - } - dword_507BF0_is_there_popup_onscreen = 1; - viewparams->bRedrawGameUI = 1; -} + //----- (004175C0) -------------------------------------------------------- void UI_OnMouseLeftClick(int *pXY) @@ -16543,834 +12054,6 @@ return white; } -//----- (00417BB5) -------------------------------------------------------- -const char *__fastcall CharacterUI_GetSkillDescText(unsigned int uPlayerID, enum PLAYER_SKILL_TYPE uPlayerSkillType) -{ - //enum PLAYER_SKILL_TYPE v2; // esi@1 - //unsigned int v3; // ebx@1 - int v4; // edi@1 - int v5; // eax@1 - Player *pPlayer; // ebx@7 - char v7; // al@7 - char v8; // cl@7 - unsigned int v9; // eax@8 - unsigned int v10; // eax@8 - unsigned int v11; // eax@8 - enum PLAYER_SKILL_TYPE v12; // edi@8 - unsigned int v13; // eax@8 - unsigned int v14; // eax@8 - enum PLAYER_SKILL_TYPE v15; // esi@8 - int v16; // edi@8 - char v17; // al@8 - int v18; // ST5C_4@8 - int v19; // ST4C_4@8 - int v20; // ST3C_4@8 - int v21; // ST2C_4@8 - int v22; // ST1C_4@8 - char *v23; // esi@8 - unsigned int v24; // eax@9 - unsigned int v25; // eax@9 - unsigned int v26; // eax@9 - unsigned int v27; // ecx@9 - enum PLAYER_SKILL_TYPE v28; // ebx@9 - unsigned int v29; // eax@9 - char a2[1200]; // [sp+Ch] [bp-538h]@7 - char Source[120]; // [sp+4BCh] [bp-88h]@7 - unsigned __int16 *v33; // [sp+534h] [bp-10h]@1 - int v34; // [sp+538h] [bp-Ch]@1 - unsigned __int16 *v35; // [sp+53Ch] [bp-8h]@1 - //enum PLAYER_SKILL_TYPE v36; // [sp+540h] [bp-4h]@1 - - //v2 = uPlayerSkillType; - //v3 = uPlayerID; - //v36 = uPlayerSkillType; - v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);// Normal - v34 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);// Expert - v33 = (unsigned __int16 *)pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);// Master - v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);// Grand - v35 = (unsigned __int16 *)v4; - if ( v34 > v4 ) - v35 = (unsigned __int16 *)v34; - if ( (signed int)v33 > (signed int)v35 ) - v35 = v33; - if ( v5 > (signed int)v35 ) - v35 = (unsigned __int16 *)v5; - pPlayer = &pParty->pPlayers[uPlayerID]; - //v33 = &pPlayer->pActiveSkills[uPlayerSkillType]; - v7 = pPlayer->GetActualSkillLevel(uPlayerSkillType); - v8 = pPlayer->pActiveSkills[uPlayerSkillType]; - a2[0] = 0; - Source[0] = 0; - if ( (v8 & 0x3F) == (v7 & 0x3F) ) - { - strcpy(a2, "%s\n\n"); - v24 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 1); - sprintf(Source, "\f%05d", v24); - strcat(a2, Source); - strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v25 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 2); - sprintf(Source, "\f%05d", v25); - strcat(a2, Source); - strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v26 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 3); - sprintf(Source, "\f%05d", v26); - strcat(a2, Source); - strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v27 = pPlayer->classType; - v28 = uPlayerSkillType; - v29 = GetSkillColor(v27, uPlayerSkillType, 4); - sprintf(Source, "\f%05d", v29); - strcat(a2, Source); - strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - - v23 = static_sub_417BB5_out_string; - sprintf(static_sub_417BB5_out_string, a2, pSkillDesc[v28], pGlobalTXT_LocalizationStrings[431], // Normal - (char *)v35 + 3, v35 + 5, pNormalSkillDesc[v28], pGlobalTXT_LocalizationStrings[433], // Expert - (char *)v35 + 3, v35 + 5, pExpertSkillDesc[v28], pGlobalTXT_LocalizationStrings[432], // Master - (char *)v35 + 3, v35 + 5, pMasterSkillDesc[v28], pGlobalTXT_LocalizationStrings[96], // Grand - (char *)v35 + 3, v35 + 5, pGrandSkillDesc[v28]); - } - else - { - strcpy(a2, "%s\n\n"); - v9 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 1); - sprintf(Source, "\f%05d", v9); - strcat(a2, Source); - strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v10 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 2); - sprintf(Source, "\f%05d", v10); - strcat(a2, Source); - strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v11 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 3); - sprintf(Source, "\f%05d", v11); - strcat(a2, Source); - strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); - v12 = uPlayerSkillType; - v13 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 4); - sprintf(Source, "\f%05d", v13); - strcat(a2, Source); - strcat(a2, "%s\t%03d:\t%03d%s\t000\n\n"); - v14 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); - sprintf(Source, "\f%05d", v14); - strcat(a2, Source); - strcat(a2, "%s: +%d"); - v15 = v12; - v16 = (int)(v35 + 5); - v15 = (PLAYER_SKILL_TYPE)((int)v15 * 4); - v34 = (int)((char *)v35 + 3); - v17 = pPlayer->GetActualSkillLevel(uPlayerSkillType); - v18 = *(int *)((char *)pGrandSkillDesc + v15); - v19 = *(int *)((char *)pMasterSkillDesc + v15); - v20 = *(int *)((char *)pExpertSkillDesc + v15); - v21 = *(int *)((char *)pNormalSkillDesc + v15); - v22 = *(int *)((char *)pSkillDesc + v15); - v23 = static_sub_417BB5_out_string; - sprintf( - static_sub_417BB5_out_string, - a2, - v22, - pGlobalTXT_LocalizationStrings[431], - v34, - v16, - v21, - pGlobalTXT_LocalizationStrings[433], - v34, - v16, - v20, - pGlobalTXT_LocalizationStrings[432], - v34, - v16, - v19, - pGlobalTXT_LocalizationStrings[96], - v34, - v16, - v18, - pGlobalTXT_LocalizationStrings[623], - (v17 & 0x3F) - (*(char *)v33 & 0x3F)); - } - return v23; -} - -//----- (00417FE5) -------------------------------------------------------- -char __cdecl CharacterUI_SkillsTab_ShowHint() -{ - unsigned int v0; // ecx@1 - unsigned int v1; // eax@1 - GUIButton *i; // esi@6 - const char *v3; // eax@12 - unsigned int pX; // [sp+4h] [bp-8h]@1 - unsigned int pY; // [sp+8h] [bp-4h]@1 - - pMouse->GetClickPos(&pX, &pY); - v0 = pX; - v1 = pY; - if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 ) - { - for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext ) - { - if ( i->uControlID == 121 - && (signed int)v0 >= (signed int)i->uX - && (signed int)v0 <= (signed int)i->uZ - && (signed int)v1 >= (signed int)i->uY - && (signed int)v1 <= (signed int)i->uW ) - { - v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (enum PLAYER_SKILL_TYPE)i->uControlParam); - sub_4179BC_draw_tooltip(pSkillNames[i->uControlParam], v3); - v1 = pY; - v0 = pX; - } - } - } - else - { - LOBYTE(v1) = sub_4179BC_draw_tooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription); - } - return v1; -} - -//----- (00418083) -------------------------------------------------------- -char __cdecl CharacterUI_StatsTab_ShowHint() -{ - LONG _x; // esi@1 - Player *_y; // eax@1 - int v2; // edi@1 - __int16 *v3; // ecx@1 - LONG v4; // edx@2 - signed int v5; // edx@4 - char *v6; // ecx@9 - char *v7; // ebx@9 - unsigned int v8; // ebx@15 - unsigned __int64 v9; // kr00_8@15 - char *v10; // ST2C_4@15 - signed int v11; // eax@15 - char *v12; // ecx@17 - char *v13; // eax@20 - Player *v14; // esi@28 - int v15; // ebx@28 - int v16; // eax@33 - POINT a2; // [sp+Ch] [bp-24h]@1 - __int64 v19; // [sp+14h] [bp-1Ch]@15 - char *v20; // [sp+1Ch] [bp-14h]@13 - Player *v21; // [sp+20h] [bp-10h]@13 - unsigned int v22; // [sp+24h] [bp-Ch]@15 - int *v23; // [sp+28h] [bp-8h]@13 - const char *v24; // [sp+2Ch] [bp-4h]@10 - - _x = pMouse->GetCursorPos(&a2)->x; - _y = (Player *)pMouse->GetCursorPos(&a2)->y; - v2 = 0; - v3 = &array_4E2940[0].field_2; - while ( 1 ) - { - v4 = *(v3 - 1); - if ( _x >= v4 ) - { - if ( _x <= v4 + v3[1] ) - { - v5 = *v3; - if ( (signed int)_y >= v5 ) - { - if ( (signed int)_y <= v5 + v3[2] ) - break; - } - } - } - v3 += 4; - ++v2; - if ( (signed int)v3 >= (signed int)&off_4E2A12 ) - return (char)_y; - } - switch ( v2 ) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - LOBYTE(_y) = 4 * v2; - v6 = aAttributeNames[v2]; - v7 = pAttributeDescriptions[v2]; - goto LABEL_46; - case 7: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[108]); - v7 = pHealthPointsAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[108]; - goto LABEL_47; - case 8: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[212]); - v7 = pSpellPointsAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[212]; - goto LABEL_47; - case 9: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[12]); - v7 = pArmourClassAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[12]; - goto LABEL_47; - case 10: - v24 = pGlobalTXT_LocalizationStrings[47]; - strcpy(pTmpBuf2, pPlayerConditionAttributeDescription); - v7 = pTmpBuf2; - v20 = pTmpBuf2; - strcat(pTmpBuf2, "\n"); - - extern unsigned int pConditionImportancyTable[18]; - v23 = (int *)pConditionImportancyTable; - _y = pPlayers[uActiveCharacter]; - v21 = pPlayers[uActiveCharacter]; - do - { - if ( _y->pConditions[*v23] ) - { - strcat(pTmpBuf2, " \n"); - v8 = *v23; - v9 = pParty->uTimePlayed - v21->pConditions[*v23]; - a2.x = LODWORD(pParty->uTimePlayed) - LODWORD(v21->pConditions[*v23]); - a2.y = HIDWORD(v9); - v19 = (signed __int64)((double)*(signed __int64 *)&a2 * 0.234375) / 60 / 60; - v22 = (unsigned int)v19 / 0x18; - v10 = aCharacterConditionNames[v8]; - v19 %= 24i64; - v11 = GetConditionDrawColor(v8); - sprintf(pTmpBuf, &byte_4E2DE8, v11, v10); - strcat(pTmpBuf2, pTmpBuf); - if ( v19 && v19 <= 1 ) - v12 = pGlobalTXT_LocalizationStrings[109]; - else - v12 = pGlobalTXT_LocalizationStrings[110]; - if ( !v22 || (v13 = pGlobalTXT_LocalizationStrings[56], v22 > 1) ) - v13 = pGlobalTXT_LocalizationStrings[57]; - sprintf(pTmpBuf, "%lu %s, %lu %s", v22, v13, v19, v12); - strcat(pTmpBuf2, pTmpBuf); - v7 = v20; - _y = v21; - } - ++v23; - } - while ( (signed int)v23 < (signed int)&unk_4EDF40 ); - goto LABEL_47; - case 11: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[172]); - v7 = pFastSpellAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[172]; - goto LABEL_47; - case 12: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[5]); - v7 = pPlayerAgeAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[5]; - goto LABEL_47; - case 13: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[131]); - v7 = pPlayerLevelAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[131]; - goto LABEL_47; - case 14: - v14 = pPlayers[uActiveCharacter]; - v24 = pGlobalTXT_LocalizationStrings[83]; - v15 = v14->uLevel; - do - { - if ( (signed __int64)v14->uExperience < (unsigned int)sub_4B46F8(v15) ) - break; - ++v15; - } - while ( v15 <= 10000 ); - pTmpBuf[0] = 0; - pTmpBuf2[0] = 0; - if ( v15 > v14->uLevel ) - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[147], v15); - v16 = sub_4B46F8(v15) - LODWORD(v14->uExperience); - sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[538], v16, v15 + 1); - strcat(pTmpBuf, "\n"); - strcat(pTmpBuf, pTmpBuf2); - LOBYTE(_y) = sprintf(pTmpBuf2, "%s\n \n%s", pPlayerExperienceAttributeDescription, pTmpBuf); - v7 = pTmpBuf2; - goto LABEL_47; - case 15: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[587]); - v7 = pAttackBonusAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[587]; - goto LABEL_47; - case 16: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[588]); - v7 = pAttackDamageAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[588]; - goto LABEL_47; - case 17: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[589]); - v7 = pMissleBonusAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[589]; - goto LABEL_47; - case 18: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[590]); - v7 = pMissleDamageAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[590]; - goto LABEL_47; - case 19: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[87]); - v7 = pFireResistanceAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[87]; - goto LABEL_47; - case 20: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[6]); - v7 = pAirResistanceAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[6]; - goto LABEL_47; - case 21: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[240]); - v7 = pWaterResistanceAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[240]; - goto LABEL_47; - case 22: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[70]); - v7 = pEarthResistanceAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[70]; - goto LABEL_47; - case 23: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[142]); - v7 = pMindResistanceAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[142]; - goto LABEL_47; - case 24: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[29]); - v7 = pBodyResistanceAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[29]; - goto LABEL_47; - case 25: - LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[207]); - v7 = pSkillPointsAttributeDescription; - v24 = pGlobalTXT_LocalizationStrings[207]; - goto LABEL_47; - case 26: - _y = (Player *)(4 * pPlayers[uActiveCharacter]->classType); - v6 = *(char **)((char *)_y->pConditions + (int)pClassNames); - v7 = *(char **)((char *)_y->pConditions + (int)pClassDescriptions); -LABEL_46: - v24 = v6; -LABEL_47: - if ( v24 && v7 ) - LOBYTE(_y) = sub_4179BC_draw_tooltip(v24, v7); - break; - default: - return (char)_y; - } - return (char)_y; -} - -//----- (00418511) -------------------------------------------------------- -char __fastcall CharacterUI_StatsTab_Draw(unsigned int uPlayerID) -{ - Player *pPlayer; // edi@1 - unsigned int v2; // eax@1 - unsigned int v3; // eax@1 - unsigned int v4; // eax@2 - int v5; // ST20_4@4 - int v6; // ST1C_4@4 - int v7; // ebp@4 - int v8; // eax@4 - unsigned int v9; // eax@4 - int v10; // ST34_4@4 - int v11; // ST20_4@4 - int v12; // ST1C_4@4 - int v13; // ebp@4 - int v14; // eax@4 - unsigned int v15; // eax@4 - int v16; // ST34_4@4 - int v17; // ST20_4@4 - int v18; // ST1C_4@4 - int v19; // ebp@4 - int v20; // eax@4 - unsigned int v21; // eax@4 - int v22; // ST34_4@4 - int v23; // ST20_4@4 - int v24; // ST1C_4@4 - int v25; // ebp@4 - int v26; // eax@4 - unsigned int v27; // eax@4 - int v28; // ST34_4@4 - int v29; // ST20_4@4 - int v30; // ST1C_4@4 - int v31; // ebp@4 - int v32; // eax@4 - unsigned int v33; // eax@4 - int v34; // ST34_4@4 - int v35; // ST20_4@4 - int v36; // ST1C_4@4 - int v37; // ebp@4 - int v38; // eax@4 - unsigned int v39; // eax@4 - int v40; // ST34_4@4 - int v41; // ST20_4@4 - int v42; // ST1C_4@4 - int v43; // ebp@4 - int v44; // eax@4 - unsigned int v45; // eax@4 - int v46; // ebp@4 - signed int v47; // ST20_4@6 - int v48; // ST1C_4@6 - signed int v49; // eax@6 - unsigned int v50; // eax@6 - int v51; // ST20_4@8 - int v52; // ST1C_4@8 - int v53; // eax@8 - unsigned int v54; // eax@8 - int v55; // ST34_4@8 - int v56; // ST20_4@8 - int v57; // ST1C_4@8 - int v58; // ebp@8 - int v59; // eax@8 - unsigned int v60; // eax@8 - unsigned int v61; // ebp@8 - unsigned int v62; // eax@8 - char *v63; // ST20_4@8 - signed int v64; // eax@8 - unsigned int v65; // ebp@8 - unsigned __int8 v66; // al@8 - char *v67; // eax@9 - unsigned int v68; // ST20_4@11 - unsigned int v69; // ST1C_4@11 - signed int v70; // ebp@11 - signed int v71; // eax@11 - unsigned int v72; // eax@11 - int v73; // ST20_4@13 - int v74; // ST1C_4@13 - int v75; // ebp@13 - int v76; // eax@13 - unsigned int v77; // eax@13 - char *v78; // ecx@14 - int v79; // ST20_4@16 - char *v80; // ST40_4@16 - unsigned int v81; // eax@16 - int v82; // ST34_4@16 - int v83; // eax@16 - int v84; // ST34_4@16 - char *v85; // eax@16 - int v86; // ST34_4@16 - int v87; // eax@16 - int v88; // ST34_4@16 - char *v89; // eax@16 - int v90; // eax@16 - int v91; // ST20_4@19 - unsigned int v92; // eax@19 - int v93; // eax@19 - int v94; // ST20_4@22 - unsigned int v95; // eax@22 - int v96; // eax@22 - int v97; // ST20_4@25 - unsigned int v98; // eax@25 - int v99; // eax@25 - int v100; // ST20_4@27 - unsigned int v101; // eax@27 - int v102; // eax@27 - int v103; // ST20_4@30 - unsigned int v104; // eax@30 - char *v105; // ST20_4@32 - unsigned int v106; // eax@32 - int v107; // eax@33 - int v108; // ST20_4@36 - unsigned int v109; // eax@36 - char *v110; // ST20_4@38 - unsigned int v111; // eax@38 - int uY; // [sp+10h] [bp-10h]@6 - int uYa; // [sp+10h] [bp-10h]@11 - int uYb; // [sp+10h] [bp-10h]@13 - int uYc; // [sp+10h] [bp-10h]@16 - int uYd; // [sp+10h] [bp-10h]@19 - int uYe; // [sp+10h] [bp-10h]@22 - int uYf; // [sp+10h] [bp-10h]@25 - int uYg; // [sp+10h] [bp-10h]@27 - int uYh; // [sp+10h] [bp-10h]@33 - const char *a2; // [sp+14h] [bp-Ch]@4 - const char *a2a; // [sp+14h] [bp-Ch]@6 - const char *a2b; // [sp+14h] [bp-Ch]@11 - const char *a2c; // [sp+14h] [bp-Ch]@16 - const char *a2d; // [sp+14h] [bp-Ch]@19 - const char *a2e; // [sp+14h] [bp-Ch]@22 - const char *a2f; // [sp+14h] [bp-Ch]@25 - const char *a2g; // [sp+14h] [bp-Ch]@27 - const char *a2h; // [sp+14h] [bp-Ch]@33 - int v131; // [sp+18h] [bp-8h]@16 - int v132; // [sp+18h] [bp-8h]@19 - int v133; // [sp+18h] [bp-8h]@22 - int v134; // [sp+18h] [bp-8h]@25 - int v135; // [sp+18h] [bp-8h]@27 - int v136; // [sp+18h] [bp-8h]@33 - int v137; // [sp+1Ch] [bp-4h]@27 - int v138; // [sp+1Ch] [bp-4h]@33 - - pPlayer = &pParty->pPlayers[uPlayerID-1]; - v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed(8, 8, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0)); - v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); - sprintf(pTmpBuf, "\f%05d", v3); - sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]);//^Pi[%s] %s - strcat(pTmpBuf, pTmpBuf2); - if ( pPlayer->uSkillPoints ) - v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); - else - v4 = 0xFFFFu; - sprintf(pTmpBuf2, "\f00000\r180%s: \f%05d%d\f00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints);//Skill points - strcat(pTmpBuf, pTmpBuf2); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0); - v5 = pPlayer->GetBaseStrength(); - v6 = pPlayer->GetActualMight(); - v7 = pPlayer->GetBaseStrength(); - v8 = pPlayer->GetActualMight(); - v9 = UI_GetHealthManaStringColor(v8, v7); - sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], v9, v6, v5);//Might - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0); - v10 = LOBYTE(pFontArrus->uFontHeight) + 51; - v11 = pPlayer->GetBaseIntelligence(); - v12 = pPlayer->GetActualIntelligence(); - v13 = pPlayer->GetBaseIntelligence(); - v14 = pPlayer->GetActualIntelligence(); - v15 = UI_GetHealthManaStringColor(v14, v13); - sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], v15, v12, v11);//Intellect - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0); - v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2; - v17 = pPlayer->GetBaseWillpower(); - v18 = pPlayer->GetActualWillpower(); - v19 = pPlayer->GetBaseWillpower(); - v20 = pPlayer->GetActualWillpower(); - v21 = UI_GetHealthManaStringColor(v20, v19); - sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], v21, v18, v17);// - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0); - v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2; - v23 = pPlayer->GetBaseEndurance(); - v24 = pPlayer->GetActualEndurance(); - v25 = pPlayer->GetBaseEndurance(); - v26 = pPlayer->GetActualEndurance(); - v27 = UI_GetHealthManaStringColor(v26, v25); - sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], v27, v24, v23);// - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0); - v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2; - v29 = pPlayer->GetBaseAccuracy(); - v30 = pPlayer->GetActualAccuracy(); - v31 = pPlayer->GetBaseAccuracy(); - v32 = pPlayer->GetActualAccuracy(); - v33 = UI_GetHealthManaStringColor(v32, v31); - sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], v33, v30, v29); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0); - v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2; - v35 = pPlayer->GetBaseSpeed(); - v36 = pPlayer->GetActualSpeed(); - v37 = pPlayer->GetBaseSpeed(); - v38 = pPlayer->GetActualSpeed(); - v39 = UI_GetHealthManaStringColor(v38, v37); - sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], v39, v36, v35); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0); - v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2; - v41 = pPlayer->GetBaseLuck(); - v42 = pPlayer->GetActualLuck(); - v43 = pPlayer->GetBaseLuck(); - v44 = pPlayer->GetActualLuck(); - v45 = UI_GetHealthManaStringColor(v44, v43); - sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], v45, v42, v41); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0); - a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n"; - v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5; - if ( pPlayer->GetMaxHealth() >= 1000 ) - a2 = "%s\f%05u\r388%d\f00000 / %d\n"; - v47 = pPlayer->GetMaxHealth(); - v48 = pPlayer->sHealth; - v49 = pPlayer->GetMaxHealth(); - v50 = UI_GetHealthManaStringColor(pPlayer->sHealth, v49); - sprintf(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0); - a2a = "%s\f%05u\r424%d\f00000 /\t185%d\n"; - uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2; - if ( pPlayer->GetMaxMana() >= 1000 ) - a2a = "%s\f%05u\r388%d\f00000 / %d\n"; - v51 = pPlayer->GetMaxMana(); - v52 = pPlayer->sMana; - v53 = pPlayer->GetMaxMana(); - v54 = UI_GetHealthManaStringColor(pPlayer->sMana, v53); - sprintf(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, v52, v51); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, uY, 0, pTmpBuf, 0, 0, 0); - v55 = LOBYTE(pFontArrus->uFontHeight) + uY - 2; - v56 = pPlayer->GetBaseAC(); - v57 = pPlayer->GetActualAC(); - v58 = pPlayer->GetBaseAC(); - v59 = pPlayer->GetActualAC(); - v60 = UI_GetHealthManaStringColor(v59, v58); - sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], v60, v57, v56); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0); - v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2; - v62 = pPlayer->GetMajorConditionIdx(); - v63 = aCharacterConditionNames[v62]; - v64 = GetConditionDrawColor(v62); - sprintf(pTmpBuf, "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], v64, v63); - pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v61, 0, pTmpBuf, 226, 0); - v65 = LOBYTE(pFontArrus->uFontHeight) + v61 - 1; - v66 = pPlayer->uQuickSpell; - if ( v66 ) - v67 = pSpellStats->pInfos[v66].pShortName; - else - v67 = pGlobalTXT_LocalizationStrings[153]; - sprintf(pTmpBuf, "%s: %s", pGlobalTXT_LocalizationStrings[172], v67); - pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v65, 0, pTmpBuf, 226, 0); - v68 = pPlayer->GetBaseAge(); - v69 = pPlayer->GetActualAge(); - v70 = pPlayer->GetBaseAge(); - v71 = pPlayer->GetActualAge(); - v72 = UI_GetHealthManaStringColor(v71, v70); - sprintf(pTmpBuf, "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5], v72, v69, v68); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0); - a2b = "%s\f%05u\t100%d\f00000 / %d\n"; - uYa = LOBYTE(pFontArrus->uFontHeight) + 48; - if ( pPlayer->GetBaseLevel() > 99 ) - a2b = format_4E2E68; - v73 = pPlayer->GetBaseLevel(); - v74 = pPlayer->GetActualLevel(); - v75 = pPlayer->GetBaseLevel(); - v76 = pPlayer->GetActualLevel(); - v77 = UI_GetHealthManaStringColor(v76, v75); - sprintf(pTmpBuf, a2b, pGlobalTXT_LocalizationStrings[131], v77, v74, v73); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYa, 0, pTmpBuf, 0, 0, 0); - uYb = uYa + LOBYTE(pFontArrus->uFontHeight) - 2; - if ( (signed __int64)pPlayer->uExperience <= 9999999 ) - v78 = pGlobalTXT_LocalizationStrings[83]; - else - v78 = pGlobalTXT_LocalizationStrings[17]; - v79 = LODWORD(pPlayer->uExperience); - v80 = v78; - v81 = pPlayer->GetExperienceDisplayColor(); - sprintf(pTmpBuf, "%s\r180\f%05d%lu\f00000\n\n", v80, v81, v79); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYb, 0, pTmpBuf, 0, 0, 0); - v82 = uYb + 2 * LOBYTE(pFontArrus->uFontHeight); - v83 = pPlayer->GetActualAttack(0); - sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v82, 0, pTmpBuf, 0, 0, 0); - v84 = v82 + LOBYTE(pFontArrus->uFontHeight) - 2; - v85 = pPlayer->GetMeleeDamageString(); - sprintf(pTmpBuf, "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], v85); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v84, 0, pTmpBuf, 0, 0, 0); - v86 = v84 + LOBYTE(pFontArrus->uFontHeight) - 2; - v87 = pPlayer->GetRangedAttack(); - sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], v87); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v86, 0, pTmpBuf, 0, 0, 0); - v88 = v86 + LOBYTE(pFontArrus->uFontHeight) - 2; - v89 = pPlayer->GetRangedDamageString(); - sprintf(pTmpBuf, "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], v89); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v88, 0, pTmpBuf, 0, 0, 0); - a2c = format_4E2E10; - uYc = v88 + 2 * LOBYTE(pFontArrus->uFontHeight) - 4; - v131 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); - v90 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); - if ( v131 > 99 || v90 > 99 ) - a2c = format_4E2E68; - v91 = v90; - v92 = UI_GetHealthManaStringColor(v131, v90); - sprintf(pTmpBuf, a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v91); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYc, 0, pTmpBuf, 0, 0, 0); - a2d = format_4E2E10; - uYd = uYc + LOBYTE(pFontArrus->uFontHeight) - 2; - v132 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); - v93 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); - if ( v132 > 99 || v93 > 99 ) - a2d = format_4E2E68; - v94 = v93; - v95 = UI_GetHealthManaStringColor(v132, v93); - sprintf(pTmpBuf, a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v94); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYd, 0, pTmpBuf, 0, 0, 0); - a2e = format_4E2E10; - uYe = uYd + LOBYTE(pFontArrus->uFontHeight) - 2; - v133 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); - v96 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); - if ( v133 > 99 || v96 > 99 ) - a2e = format_4E2E68; - v97 = v96; - v98 = UI_GetHealthManaStringColor(v133, v96); - sprintf(pTmpBuf, a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v97); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYe, 0, pTmpBuf, 0, 0, 0); - a2f = format_4E2E10; - uYf = uYe + LOBYTE(pFontArrus->uFontHeight) - 2; - v134 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); - v99 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); - if ( v134 > 99 ) - a2f = format_4E2E68; - v100 = v99; - v101 = UI_GetHealthManaStringColor(v134, v99); - sprintf(pTmpBuf, a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v100); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYf, 0, pTmpBuf, 0, 0, 0); - a2g = format_4E2E10; - uYg = uYf + LOBYTE(pFontArrus->uFontHeight) - 2; - v135 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); - v102 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); - v137 = v102; - if ( v135 > 99 || v102 > 99 ) - a2g = format_4E2E68; - v103 = v102; - v104 = UI_GetHealthManaStringColor(v135, v102); - sprintf(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v103); - if ( pPlayer->classType == PLAYER_CLASS_LICH && v137 == 200 ) - { - v105 = pGlobalTXT_LocalizationStrings[625]; - v106 = UI_GetHealthManaStringColor(v135, 200); - sprintf(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, v105); - } - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYg, 0, pTmpBuf, 0, 0, 0); - a2h = format_4E2E10; - uYh = uYg + LOBYTE(pFontArrus->uFontHeight) - 2; - v136 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); - v107 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); - v138 = v107; - if ( v136 > 99 || v107 > 99 ) - a2h = format_4E2E68; - v108 = v107; - v109 = UI_GetHealthManaStringColor(v136, v107); - sprintf(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v108); - if ( pPlayer->classType == PLAYER_CLASS_LICH && v138 == 200 ) - { - v110 = pGlobalTXT_LocalizationStrings[625]; - v111 = UI_GetHealthManaStringColor(v136, 200); - sprintf(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, v110); - } - return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYh, 0, pTmpBuf, 0, 0, 0); -} - -//----- (00419100) -------------------------------------------------------- -void FillAwardsData() - { - Player *pPlayer; // esi@1 - - pPlayer = pPlayers[uActiveCharacter]; - memset(&achievedAwardsIndex, 0, 4000); - memset(pTmpBuf2, 0, 0x7D0u); - dword_506544 = 0; - dword_506548 = 0; - awards_count = 0; - dword_50651C = 0; - dword_506528 = 0; - for(int i=0; i<105; ++i) - { - if ( _449B57_test_bit((unsigned char*)&pPlayer->_guilds_member_bits, i) && pAwards[i].pText ) - achievedAwardsIndex[awards_count++] = i; - } - awards_count2 = awards_count; - awards_count = 0; - //sort awards index - if ( awards_count2>0 ) - { - for(int i=0; i<awards_count2; ++i) - achievedAwardsIndex[awards_count2 + i] = rand() % 16; - - for(int i=1; i<awards_count2-1; ++i) - { - for (int j = i; j < awards_count2-1; ++j ) - { - int tmp=achievedAwardsIndex[j]; - if(pAwards[j].uSort < pAwards[i].uSort) - { - achievedAwardsIndex[j] = achievedAwardsIndex[i]; - achievedAwardsIndex[i] = tmp; - } - } - } - } - } - //----- (00419220) -------------------------------------------------------- void __cdecl sub_419220() @@ -17467,121 +12150,3 @@ } -//----- (00419401) -------------------------------------------------------- -void __cdecl CharacterUI_SkillScreen_Draw() -{ - unsigned int v0; // ecx@3 - GUIButton *pButton; // eax@3 - GUIFont *v2; // eax@8 - unsigned int v3; // esi@8 - int v4; // eax@10 - unsigned int v5; // esi@14 - int v6; // eax@17 - unsigned int v7; // esi@19 - int v8; // eax@21 - unsigned int v9; // esi@25 - int v10; // eax@27 - int a2; // [sp+10h] [bp-14h]@1 - int v12; // [sp+14h] [bp-10h]@8 - int v13; // [sp+14h] [bp-10h]@19 - int *v14; // [sp+18h] [bp-Ch]@8 - int *v15; // [sp+18h] [bp-Ch]@14 - int *v16; // [sp+18h] [bp-Ch]@19 - int *v17; // [sp+18h] [bp-Ch]@25 - Player *v18; // [sp+1Ch] [bp-8h]@8 - int a5; // [sp+20h] [bp-4h]@8 - - a2 = 0; - if ( dword_507CC0 ) - sub_4196A0(); - v0 = uActiveCharacter; - dword_507CC0 = uActiveCharacter; - for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext ) - { - if ( pButton->uControlID == 120 ) - { - dword_50698C = pButton->uX; - dword_506988 = pButton->uY; - dword_506984 = pButton->uZ; - dword_506980 = pButton->uW; - pButton->uW = 0; - pButton->uZ = 0; - pButton->uY = 0; - pButton->uX = 0; - v0 = uActiveCharacter; - } - } - v12 = 0; - a5 = pGUIWindow_CurrentMenu->uNumControls; - v18 = &pParty->pPlayers[v0-1]; - v2 = pFontLucida; - v14 = pWeaponSkills; - v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13; - do - { - if ( v18->pActiveSkills[*v14] & 0x3F )//crash - { - v4 = LOBYTE(v2->uFontHeight); - v3 = v3 + v4 - 3; - ++a2; - ++v12; - pGUIWindow_CurrentMenu->CreateButton(0x18u, v3, 0xCCu, v4 - 3, 3, *v14 | 0x8000, 0x79u, *v14, 0, "", 0, 0); - v2 = pFontLucida; - } - ++v14; - } - while ( v14 <= &pWeaponSkills[8] ); - if ( !v12 ) - v3 = v3 + LOBYTE(v2->uFontHeight) - 3; - v15 = pMagicSkills; - v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6; - do - { - if ( v18->pActiveSkills[*v15] & 0x3F && a2 < 15 ) - { - v6 = LOBYTE(v2->uFontHeight); - v5 = v5 + v6 - 3; - ++a2; - pGUIWindow_CurrentMenu->CreateButton(0x18u, v5, 0xCCu, v6 - 3, 3, *v15 | 0x8000, 0x79u, *v15, 0, "", 0, 0); - v2 = pFontLucida; - } - ++v15; - } - while ( v15 <= &pMagicSkills[8] ); - v13 = 0; - v16 = pArmorSkills; - v7 = 2 * LOBYTE(v2->uFontHeight) + 13; - do - { - if ( v18->pActiveSkills[*v16] & 0x3F ) - { - v8 = LOBYTE(v2->uFontHeight); - v7 = v7 + v8 - 3; - ++a2; - ++v13; - pGUIWindow_CurrentMenu->CreateButton(0xF6u, v7, 0xCCu, v8 - 3, 3, *v16 | 0x8000, 0x79u, *v16, 0, "", 0, 0); - v2 = pFontLucida; - } - ++v16; - } - while ( v16 <= &pArmorSkills[4] ); - if ( !v13 ) - v7 = v7 + LOBYTE(v2->uFontHeight) - 3; - v17 = pMiscSkills; - v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6; - do - { - if ( v18->pActiveSkills[*v17] & 0x3F ) - { - v10 = LOBYTE(v2->uFontHeight); - v9 = v9 + v10 - 3; - ++a2; - pGUIWindow_CurrentMenu->CreateButton(0xF6u, v9, 0xCCu, v10 - 3, 3, *v17 | 0x8000, 0x79u, *v17, 0, "", 0, 0); - v2 = pFontLucida; - } - ++v17; - } - while ( v17 <= &pMiscSkills[11] ); - if ( a2 ) - pGUIWindow_CurrentMenu->_41D08F(a2, 1, 0, a5); -} \ No newline at end of file