Mercurial > mm7
changeset 1696:7d99124bccd8
Merge
author | Grumpy7 |
---|---|
date | Sun, 22 Sep 2013 10:51:08 +0200 |
parents | 33df22a5e376 (current diff) 33171f1f3daf (diff) |
children | 8cfb2e978445 ef42788fef1d |
files | mm7_5.cpp mm7_data.cpp mm7_data.h |
diffstat | 17 files changed, 695 insertions(+), 939 deletions(-) [+] |
line wrap: on
line diff
--- a/Arcomage.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/Arcomage.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -47,25 +47,25 @@ void DrawCards(); void DrawCardAnimation(int a1); int GetPlayerHandCardCount(int player_num); -signed int DrawCardsRectangles(int player_num); -bool DiscardCard(int player_num, signed int card_slot_index); -bool PlayCard(int player_num, signed int card_slot_num); +int DrawCardsRectangles(int player_num); +bool DiscardCard(int player_num, int card_slot_index); +bool PlayCard(int player_num, int card_slot_num); bool CanCardBePlayed(int player_num, int hand_card_indx); void ApplyCardToPlayer(int player_num, unsigned int uCardID); int am_40D2B4(POINT* a1, int a2); // weak int ApplyDamageToBuildings(int player_num, int damage); // weak void GameResultsApply(); -void pPrimaryWindow_draws_text(int a1, const char *pText, POINT *pXY); +void am_DrawText(int a1, const char *pText, POINT *pXY); void am_BeginScene(unsigned __int16 *pPcxPixels, int a2, int a3); // idb void __fastcall Blt_Chroma(RECT *pSrcXYZW, POINT *pTargetXY, int a3, int a4); void Blt_Copy(RECT *pSrcRect, POINT *pTargetXY, int a3); void am_EndScene(); void DrawRect(RECT *pXYZW, unsigned __int16 uColor, char bSolidFill); -void SetPixel2sq( POINT *pTargetXY, unsigned __int16 uColor ); -void SetPixel(POINT *pTargetXY, unsigned __int16 uColor); +void DrawSquare( POINT *pTargetXY, unsigned __int16 uColor ); +void DrawPixel(POINT *pTargetXY, unsigned __int16 uColor); int rand_interval(int min, int max); // idb -void __fastcall intToString(int val, char *pOut); +void __fastcall am_IntToString(int val, char *pOut); //----- (0040DEDB) -------------------------------------------------------- unsigned int R8G8B8_to_TargetFormat(int uColor) @@ -112,17 +112,16 @@ ArcomageGame *pArcomageGame = new ArcomageGame; -ArcomagePlayer am_Players[2]; -Acromage_st1 shown_cards[10]; //amuint_4FAA78; // weak -stru272 array_4FABD0[10]; - - -ArcomageDeck playDeck; -ArcomageDeck deckMaster; +ArcomagePlayer am_Players[2]; // 00505708 +AcromageCardOnTable shown_cards[10]; // 004FAA78 +stru272 array_4FABD0[10]; // 4FABD0 + + +ArcomageDeck playDeck; // 00505288 +ArcomageDeck deckMaster; // 005054C8 char Player2Name[] = "Enemy"; char Player1Name[] = "Player"; -char pDeckMaster[] = "Master Deck"; /* 267 */ #pragma pack(push, 1) @@ -163,7 +162,7 @@ int start_zoo_level; -int minimum_cards_at_hand = 5; +int minimum_cards_at_hand = 5; // 004E1874 int quarry_bonus = 1; int magic_bonus = 1; int zoo_bonus = 1; @@ -173,17 +172,17 @@ int opponent_mastery = 1 ; // weak -char byte_4FAA2C; // weak +bool am_gameover; // 004FAA2C char byte_4FAA2D; // weak -int current_player_num; // idb -char need_to_discard_card; // weak - -signed int current_card_slot_index; -int played_card_id; // idb 4FABC0 -int uCardID; // idb 4FAA50 - -int deck_walk_index; +int current_player_num; // 004FAA6C +char need_to_discard_card; // 04FAA77 + +int current_card_slot_index; // 004FABBC +int played_card_id; // 4FABC0 +int uCardID; // 4FAA50 + +int deck_walk_index; // 004FABC8 int start_bricks_amount; int start_gems_amount; @@ -242,20 +241,20 @@ } //----- (0040DFD1) -------------------------------------------------------- -void stru272_stru0::Ctor(stru272_stru0 **a1) - { - stru272_stru0 *v2; // eax@1 - v2 = (stru272_stru0 *)malloc(0x5Cu); - *a1 = v2; +stru272_stru0 *stru272_stru0::New() +{ + stru272_stru0 *v2 = (stru272_stru0 *)malloc(0x5Cu); v2->signature = SIG_trpg; v2->position_in_sparks_arr = 0; v2->field_30 = 0.0; v2->field_58 = 0; v2->field_59 = 0; - } + + return v2; +} //----- (0040DFFE) -------------------------------------------------------- -int stru272_stru0::Dtor() +int stru272_stru0::Free() { if ( this->signature == SIG_trpg ) @@ -299,7 +298,7 @@ } //----- (0040E0F5) -------------------------------------------------------- -int stru272_stru0::Empty(char a2, char a3) +int stru272_stru0::Clear(char a2, char a3) { if ( signature == SIG_trpg) { @@ -982,7 +981,6 @@ //----- (00408BB4) -------------------------------------------------------- bool OpponentsAITurn(int player_num) { - char result; // al@3 signed int v2; // ebx@8 int v3; // esi@8 @@ -1269,7 +1267,7 @@ pArcomageGame->GameOver = 1; } GameResultsApply(); - if ( byte_4FAA2C ) + if ( am_gameover ) { dword_4FAA70 = 0; } @@ -1277,23 +1275,21 @@ { dword_4FAA70 = -1; } - pVideoPlayer->BinkUpdatePalette(dword_4FAA28); for(int i=0; i<10; ++i) - { - array_4FABD0[i].field_40->Empty(1,1); - array_4FABD0[i].field_40->Dtor(); - } + { + array_4FABD0[i].field_40->Clear(1, 1); + array_4FABD0[i].field_40->Free(); + } pArcomageGame->pGameBackground.Release(); pArcomageGame->pSprites.Release(); - pArcomageGame->bGameInProgress = 0; - viewparams->bRedrawGameUI = 1; + pArcomageGame->bGameInProgress = false; + viewparams->bRedrawGameUI = true; if ( pVideoPlayer->AnyMovieLoaded() ) pVideoPlayer->_4BF5B2(); for(int i=0; i<12; ++i) pSoundList->UnloadSound(am_sounds[i], 1); - } @@ -1301,8 +1297,7 @@ //----- (00409FE9) -------------------------------------------------------- void SetStartGameData() - { - +{ signed int j; // edx@7 int card_id_counter; // edx@13 signed int i; // ecx@13 @@ -1349,7 +1344,7 @@ } } } - strcpy(deckMaster.name, pDeckMaster); + strcpy(deckMaster.name, "Master Deck"); for (i=0, card_dispenser_counter=-2, card_id_counter=0; i<DECK_SIZE; ++i, ++card_dispenser_counter) { deckMaster.cardsInUse[i] = 0; @@ -1503,7 +1498,7 @@ } //----- (0040A346) -------------------------------------------------------- -void IncreaseResourcesInTurn( int player_num ) +void IncreaseResourcesInTurn(int player_num) { am_Players[player_num].resource_bricks += quarry_bonus + am_Players[player_num].quarry_level; am_Players[player_num].resource_gems += magic_bonus + am_Players[player_num].magic_level; @@ -1513,8 +1508,7 @@ //----- (0040A383) -------------------------------------------------------- void TurnChange() - { - +{ char player_name[64]; // [sp+4h] [bp-64h]@4 // RECT v6; // [sp+44h] [bp-24h]@6 @@ -1535,11 +1529,11 @@ //nullsub_1(); // v11.x = 0; // v11.y = 0; - strcpy(player_name,"The Next Player is: ");//"Ñëåä" + strcpy(player_name, "The Next Player is: ");//"Ñëåä" // v0 = 0; v11.y = 200; v11.x = 320; // - 12 * v0 / 2; - pPrimaryWindow_draws_text(-1, player_name, &v11); + am_DrawText(-1, player_name, &v11); am_byte_4FAA75 = 1; ++current_player_num; if ( current_player_num >= 2 ) @@ -1548,13 +1542,13 @@ // v4 = 0; v11.y = 260; v11.x = 320;// - 12 * v4 / 2; - pPrimaryWindow_draws_text(-1, player_name, &v11); + am_DrawText(-1, player_name, &v11); /* v6.left = 0; v6.right = 640; v6.top = 0; v6.bottom = 480;*/ //nullsub_1(); - CallRenderPresent(); + pRenderer->Present(); //nullsub_1(); while ( 1 ) { @@ -1583,7 +1577,7 @@ v6.top = 0; v6.bottom = 480;*/ //nullsub_1(); - CallRenderPresent(); + pRenderer->Present(); } } } @@ -1591,7 +1585,7 @@ //----- (0040A514) -------------------------------------------------------- bool IsGameOver() - { +{ bool result; // eax@1 result = false; @@ -1606,10 +1600,8 @@ || am_Players[i].resource_beasts >= max_resources_amount ) result = true; } - - if ( result ) - byte_4FAA2C = 1; - return result; + + return am_gameover = result; } @@ -1649,7 +1641,7 @@ } while (v3 < 6); - pArcomageGame->event_timer_time = (unsigned int )pEventTimer->Time(); + pArcomageGame->event_timer_time = (unsigned int)pEventTimer->Time(); if ( pArcomageGame->field_F4 ) break_loop = 1; ArcomageGame::MsgLoop(0, &a2); @@ -1834,8 +1826,7 @@ //----- (0040A9AF) -------------------------------------------------------- void DrawGameUI( int animation_stage ) - { - +{ am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1); DrawRectanglesForText(); am_EndScene(); @@ -1880,9 +1871,9 @@ if (array_4FABD0[i].effect_sparks[j].have_spark > 0) { if (j%2) - SetPixel(&array_4FABD0[i].effect_sparks[j].spark_position, pixel_color); + DrawPixel(&array_4FABD0[i].effect_sparks[j].spark_position, pixel_color); else - SetPixel2sq(&array_4FABD0[i].effect_sparks[j].spark_position, pixel_color); + DrawSquare(&array_4FABD0[i].effect_sparks[j].spark_position, pixel_color); } } } @@ -1892,10 +1883,10 @@ //----- (0040AB0A) -------------------------------------------------------- void DrawRectanglesForText() - { - +{ RECT pSrcRect; // [sp+Ch] [bp-18h]@1 POINT pTargetXY; // [sp+1Ch] [bp-8h]@1 + //resources rectangles pSrcRect.left = 765; pSrcRect.top = 0; @@ -1963,46 +1954,46 @@ strcpy(text_buff, pGlobalTXT_LocalizationStrings[266]);// DISCARD A CARD text_position.x = 320 - pArcomageGame->pfntArrus->GetLineWidth(text_buff) / 2; text_position.y = 306; - pPrimaryWindow_draws_text(-1, text_buff, &text_position); + am_DrawText(-1, text_buff, &text_position); } strcpy( text_buff, am_Players[0].pPlayerName); if ( !current_player_num ) strcat(text_buff, "***"); text_position.x = 47 - pArcomageGame->pfntComic->GetLineWidth(text_buff) / 2; text_position.y = 21; - pPrimaryWindow_draws_text(-1, text_buff, &text_position); + am_DrawText(-1, text_buff, &text_position); strcpy(text_buff, am_Players[1].pPlayerName); if ( current_player_num == 1 ) strcat(text_buff, "***" ); text_position.x = 595 - pArcomageGame->pfntComic->GetLineWidth(text_buff) / 2; text_position.y = 21; - pPrimaryWindow_draws_text(-1, text_buff, &text_position); - - intToString(am_Players[0].tower_height, text_buff); + am_DrawText(-1, text_buff, &text_position); + + am_IntToString(am_Players[0].tower_height, text_buff); text_position.x = 123 - pArcomageGame->pfntComic->GetLineWidth(text_buff) / 2; text_position.y = 305; - pPrimaryWindow_draws_text(-1, text_buff, &text_position); - - intToString(am_Players[1].tower_height, text_buff); + am_DrawText(-1, text_buff, &text_position); + + am_IntToString(am_Players[1].tower_height, text_buff); text_position.x = 515 - pArcomageGame->pfntComic->GetLineWidth(text_buff) / 2; text_position.y = 305; - pPrimaryWindow_draws_text(-1, text_buff, &text_position); - - intToString(am_Players[0].wall_height, text_buff); + am_DrawText(-1, text_buff, &text_position); + + am_IntToString(am_Players[0].wall_height, text_buff); text_position.x = 188 - pArcomageGame->pfntComic->GetLineWidth(text_buff) / 2; text_position.y = 305; - pPrimaryWindow_draws_text(-1, text_buff, &text_position); - - intToString(am_Players[1].wall_height, text_buff); + am_DrawText(-1, text_buff, &text_position); + + am_IntToString(am_Players[1].wall_height, text_buff); text_position.x = 451 - pArcomageGame->pfntComic->GetLineWidth(text_buff) / 2; text_position.y = 305; - pPrimaryWindow_draws_text(-1, text_buff, &text_position); + am_DrawText(-1, text_buff, &text_position); res_value = am_Players[0].quarry_level; if ( use_start_bonus ) res_value =am_Players[0].quarry_level + quarry_bonus; - intToString(res_value, text_buff); + am_IntToString(res_value, text_buff); text_position.x = 14;// - 6 * 0 / 2; text_position.y = 92; DrawPlayerLevels(-1, text_buff, &text_position); @@ -2010,7 +2001,7 @@ res_value = am_Players[1].quarry_level; if ( use_start_bonus ) res_value = am_Players[1].quarry_level + quarry_bonus; - intToString(res_value, text_buff); + am_IntToString(res_value, text_buff); // v2 = 0; text_position.y = 92; text_position.x = 561; //- 6 * v2 / 2; @@ -2019,7 +2010,7 @@ res_value = am_Players[0].magic_level; if ( use_start_bonus ) res_value = am_Players[0].magic_level + magic_bonus; - intToString(res_value, text_buff); + am_IntToString(res_value, text_buff); // v4 = 0; text_position.y = 164; text_position.x = 14; //- 6 * v4 / 2; @@ -2028,7 +2019,7 @@ res_value = am_Players[1].magic_level; if ( use_start_bonus ) res_value = am_Players[1].magic_level + magic_bonus; - intToString(res_value, text_buff); + am_IntToString(res_value, text_buff); // v6 = 0; text_position.y = 164; text_position.x = 561; //- 6 * v6 / 2; @@ -2037,7 +2028,7 @@ res_value = am_Players[0].zoo_level; if ( use_start_bonus ) res_value = am_Players[0].zoo_level + zoo_bonus; - intToString(res_value, text_buff); + am_IntToString(res_value, text_buff); // v8 = 0; text_position.y = 236; text_position.x = 14;// - 6 * v8 / 2; @@ -2046,38 +2037,38 @@ res_value = am_Players[1].zoo_level; if ( use_start_bonus ) res_value = am_Players[1].zoo_level + zoo_bonus; - intToString(res_value, text_buff); + am_IntToString(res_value, text_buff); // v10 = 0; text_position.y = 236; text_position.x = 561;// - 6 * v10 / 2; DrawPlayerLevels(-1, text_buff, &text_position); - intToString(am_Players[0].resource_bricks, text_buff); + am_IntToString(am_Players[0].resource_bricks, text_buff); text_position.y = 114; text_position.x = 10; DrawBricksCount(-1, text_buff, &text_position); - intToString(am_Players[1].resource_bricks, text_buff); + am_IntToString(am_Players[1].resource_bricks, text_buff); text_position.x = 557; text_position.y = 114; DrawBricksCount(-1, text_buff, &text_position); - intToString(am_Players[0].resource_gems, text_buff); + am_IntToString(am_Players[0].resource_gems, text_buff); text_position.x = 10; text_position.y = 186; DrawGemsCount(-1, text_buff, &text_position); - intToString(am_Players[1].resource_gems, text_buff); + am_IntToString(am_Players[1].resource_gems, text_buff); text_position.x = 557; text_position.y = 186; DrawGemsCount(-1, text_buff, &text_position); - intToString(am_Players[0].resource_beasts, text_buff); + am_IntToString(am_Players[0].resource_beasts, text_buff); text_position.x = 10; text_position.y = 258; DrawBeastsCount(-1, text_buff, &text_position); - intToString(am_Players[1].resource_beasts, text_buff); + am_IntToString(am_Players[1].resource_beasts, text_buff); text_position.x = 557; text_position.y = 258; DrawBeastsCount(-1, text_buff, &text_position); @@ -2344,7 +2335,7 @@ int v16; // ecx@25 POINT *v17; // esi@26 signed int v18; // eax@29 -Acromage_st1 *v19; // ecx@29 +AcromageCardOnTable *v19; // ecx@29 int v20; // ecx@31 int v21; // [sp-4h] [bp-2Ch]@8 RECT pSrcXYZW; // [sp+Ch] [bp-1Ch]@8 @@ -2475,7 +2466,7 @@ RECT *v6; // ecx@6 int v8; // eax@15 -Acromage_st1 *v9; // ecx@15 +AcromageCardOnTable *v9; // ecx@15 int v10; // ecx@19 int v11; // eax@20 int v12; // ecx@20 @@ -2702,9 +2693,7 @@ //----- (0040BB67) -------------------------------------------------------- signed int DrawCardsRectangles( int player_num ) - { -//need do fix rectangle not fit to card - +{ //int v1; // esi@1 signed int result; // eax@1 int v3; // ebx@1 @@ -2738,6 +2727,7 @@ char v32; // [sp+45h] [bp-3h]@12 char v33; // [sp+46h] [bp-2h]@12 +__debugbreak(); // need do fix rectangle not fit to card v30 = 0; result = -1; @@ -2900,9 +2890,8 @@ //----- (0040BE0E) -------------------------------------------------------- -bool PlayCard( int player_num, signed int card_slot_num ) - { - +bool PlayCard( int player_num, int card_slot_num ) +{ int v3; // ebp@1 int v4; // ecx@2 ArcomagePlayer *v5; // esi@2 @@ -2962,8 +2951,8 @@ } //----- (0040BF15) -------------------------------------------------------- -bool CanCardBePlayed( int player_num, int hand_card_indx ) - { +bool CanCardBePlayed(int player_num, int hand_card_indx) +{ bool result; // eax@1 ArcomageCard *test_card; // ecx@1 ArcomagePlayer *pPlayer; // esi@1 @@ -2975,7 +2964,7 @@ result = false; if ( test_card->needed_magic_level > pPlayer->magic_level ) result = false; - if ( test_card->needed_might_level > pPlayer->zoo_level ) + if ( test_card->needed_zoo_level > pPlayer->zoo_level ) result = false; if ( test_card->needed_bricks > pPlayer->resource_bricks ) result = false; @@ -3766,7 +3755,7 @@ // v2 = 0; xy.y = 160; xy.x = 320; //- 12 * v2 / 2; -// pPrimaryWindow_draws_text(-1, pText, xy); +// am_DrawText(-1, pText, xy); if ( am_Players[0].tower_height < max_tower_height ) { if ( am_Players[1].tower_height < max_tower_height ) @@ -4001,20 +3990,20 @@ am_EndScene(); pRenderer->Present(); ArcomageGame::LoadSprites(); - CallRenderPresent(); + pRenderer->Present(); v4 = 120; for (int i=0; i<12; ++i) am_sounds[i] = pSoundList->LoadSound(v4++, 0); for (int i=0; i<10; ++i) - stru272_stru0::Ctor(&array_4FABD0[i].field_40); + array_4FABD0[i].field_40 = stru272_stru0::New(); current_card_slot_index = -1; amuint_4FAA4C = -1; byte_4FAA74 = 0; pArcomageGame->field_F4 = 0; - byte_4FAA2C = 0; + am_gameover = false; byte_505880 = 0; dword_4FAA70 = 0; need_to_discard_card = 0; @@ -4066,7 +4055,7 @@ //----- (0040D75D) -------------------------------------------------------- -void pPrimaryWindow_draws_text( int a1, const char *pText, POINT *pXY ) +void am_DrawText( int a1, const char *pText, POINT *pXY ) { pPrimaryWindow->DrawText( pFontComic, pXY->x, pXY->y - ((pFontComic->uFontHeight - 3) >> 1) + 3, 0, pText, 0, 0, 0); } @@ -4095,7 +4084,7 @@ pRenderer->EndScene(); } -void SetPixel2sq( POINT *pTargetXY, unsigned __int16 uColor ) +void DrawSquare( POINT *pTargetXY, unsigned __int16 uColor ) { pRenderer->BeginScene(); if ( pRenderer->uNumSceneBegins ) @@ -4114,7 +4103,7 @@ } //----- (0040DBD3) -------------------------------------------------------- -void SetPixel( POINT *pTargetXY, unsigned __int16 uColor ) +void DrawPixel( POINT *pTargetXY, unsigned __int16 uColor ) { pRenderer->BeginScene(); if ( pRenderer->uNumSceneBegins ) @@ -4138,9 +4127,9 @@ //----- (0040DEC8) -------------------------------------------------------- -void __fastcall intToString(int val, char *pOut) +void __fastcall am_IntToString(int val, char *pOut) { - sprintf(pOut, "%d", val); + sprintfex(pOut, "%d", val); } void set_stru1_field_8_InArcomage(int inValue)
--- a/Arcomage.h Sun Sep 22 10:44:42 2013 +0200 +++ b/Arcomage.h Sun Sep 22 10:51:08 2013 +0200 @@ -4,18 +4,6 @@ #include "Texture.h" -/* 401 */ -#pragma pack(push, 1) -struct Acromage_st1 -{ - int uCardId; - int field_4; - POINT field_8; - int field_10_xplus; - int field_14_y_plus; - POINT field_18_point; -}; -#pragma pack(pop) /* 272 */ @@ -27,11 +15,11 @@ char field_24; char needed_quarry_level; char needed_magic_level; - char needed_might_level; + char needed_zoo_level; char needed_bricks; char needed_gems; char needed_beasts; - char can_be_discarded; + bool can_be_discarded; int compare_param; char field_30; char draw_extra_card_count; @@ -97,6 +85,18 @@ #pragma pack(pop) +/* 401 */ +#pragma pack(push, 1) +struct AcromageCardOnTable +{ + int uCardId; + int field_4; + POINT field_8; + int field_10_xplus; + int field_14_y_plus; + POINT field_18_point; +}; +#pragma pack(pop) #pragma pack(push, 1) @@ -232,10 +232,11 @@ #pragma pack(push, 1) struct stru272_stru0 // ARCOMAGE stuff { - static void Ctor(stru272_stru0 **a1); - int Dtor(); + static stru272_stru0 *New(); + + int Free(); int StartFill(stru272_stru2* a2); - int Empty(char a2, char a3); + int Clear(char a2, char a3); int DrawEffect(); int _40E2A7();
--- a/Chest.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/Chest.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -801,7 +801,7 @@ } // 506128: using guessed type int areWeLoadingTexture; //----- (00420E01) -------------------------------------------------------- -void OnChestLeftClick() +void OnChestLeftClick() { int chest_id; // edi@1 POINT *v1; // esi@2
--- a/Render.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/Render.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -6914,101 +6914,61 @@ } //----- (004A5D33) -------------------------------------------------------- -void Render::_4A5D33(unsigned int pX, unsigned int pY, int a4, int a5, RGBTexture *pTexture) +void Render::CreditsTextureScroll(unsigned int pX, unsigned int pY, int move_X, int move_Y, RGBTexture *pTexture) { - Render *v6; // esi@1 unsigned __int16 *v7; // ebx@3 - int v8; // ecx@3 - int v9; // edx@3 - int v10; // ecx@3 - int v11; // edi@3 - signed int v12; // eax@4 - unsigned int v13; // eax@5 - signed int v14; // eax@6 - unsigned int v15; // eax@7 - unsigned int v16; // edx@8 - int v17; // eax@10 - unsigned int v18; // ecx@11 - unsigned int v19; // ecx@14 - int v20; // eax@16 - unsigned int v21; // ecx@17 - int v22; // eax@21 + int full_width; // ecx@3 + int full_height; // edi@3 int v23; // edi@23 - int v24; // [sp+Ch] [bp-4h]@3 - int a2a; // [sp+18h] [bp+8h]@21 - unsigned int teal; // [sp+1Ch] [bp+Ch]@20 - int a4a; // [sp+20h] [bp+10h]@3 - int a4b; // [sp+20h] [bp+10h]@21 unsigned __int16 *pTexturea; // [sp+28h] [bp+18h]@3 - v6 = this; if ( this->uNumSceneBegins && pTexture ) { v7 = &this->pTargetSurface[pX + pY * this->uTargetSurfacePitch]; - v8 = pTexture->uWidth; - v24 = pTexture->uWidth; - v9 = a4 + a5 * v8; - v10 = v8 - a4; - a4a = v10; - v11 = pTexture->uHeight - a5; - pTexturea = &pTexture->pPixels[v9]; - if ( v6->bClip ) - { - v12 = v6->uClipX; - if ( (signed int)pX < v12 ) - { - v13 = 2 * (v12 - pX); - pTexturea = (unsigned __int16 *)((char *)pTexturea + v13); - v10 += pX - v6->uClipX; - v7 = (unsigned __int16 *)((char *)v7 + v13); - a4a = v10; - } - v14 = v6->uClipY; - if ( (signed int)pY < v14 ) - { - v15 = v14 - pY; - pTexturea += v24 * v15; - v11 += pY - v6->uClipY; - v10 = a4a; - v7 += v6->uTargetSurfacePitch * v15; - } - v16 = v6->uClipX; - if ( (signed int)v16 < (signed int)pX ) - v16 = pX; - v17 = v6->uClipZ; - if ( (signed int)(v10 + v16) > v17 ) - { - v18 = v6->uClipX; - if ( (signed int)v18 < (signed int)pX ) - v18 = pX; - a4a = v17 - v18; - } - v19 = v6->uClipY; - if ( (signed int)v19 < (signed int)pY ) - v19 = pY; - v20 = v6->uClipW; - if ( (signed int)(v11 + v19) > v20 ) - { - v21 = v6->uClipY; - if ( (signed int)v21 < (signed int)pY ) - v21 = pY; - v11 = v20 - v21; - } - } - teal = TargetColor(0, 0xFFu, 0xFFu); - if ( v11 > 0 ) - { - v22 = a4a; - a2a = v11; - a4b = 2 * (v24 - a4a); + full_width = pTexture->uWidth - move_X; + full_height = pTexture->uHeight - move_Y; + pTexturea = &pTexture->pPixels[move_X + move_Y * pTexture->uWidth]; + if ( this->bClip ) + { + if ( pX < this->uClipX )//åñëè êàäð âûõîäèò çà ïðàâóþ ãðàíèöó + { + pTexturea = (unsigned __int16 *)((char *)pTexturea + (2 * (this->uClipX - pX))); + full_width += pX - this->uClipX; + v7 = (unsigned __int16 *)((char *)v7 + (2 * (this->uClipX - pX))); + } + if ( pY < this->uClipY )//åñëè êàäð âûõîäèò çà âåðõíþþ ãðàíèöó + { + pTexturea += pTexture->uWidth * (this->uClipY - pY); + full_height += pY - this->uClipY; + v7 += this->uTargetSurfacePitch * (this->uClipY - pY); + } + if ( this->uClipX < pX )//åñëè ïðàâàÿ ãðàíèöà îêíà ìåíüøå õ êîîðäèíàòû êàäðà + this->uClipX = pX; + if ( this->uClipY < pY )//åñëè âåðõíÿÿ ãðàíèöà îêíà ìåíüøå y êîîðäèíàòû êàäðà + this->uClipY = pY; + if ( (full_width + this->uClipX) > this->uClipZ )//åñëè øèðèíà êàäðà âûõîäèò çà ïðàâóþ ãðàíèöó + { + if ( this->uClipX < pX ) + this->uClipX = pX; + full_width = this->uClipZ - this->uClipX; + } + if ( (full_height + this->uClipY) > this->uClipW )//åñëè âûñîòà êàäðà âûõîäèò çà íèæíþþ ãðàíèöó + { + if ( this->uClipY < pY ) + this->uClipY = pY; + full_height = this->uClipW - this->uClipY; + } + } + if ( full_height > 0 ) + { do { - if ( v22 > 0 ) + if ( full_width > 0 ) { - v23 = v22; + v23 = full_width; do { - if ( *pTexturea != teal ) + if ( *pTexturea != TargetColor(0, 0xFFu, 0xFFu) ) *v7 = *pTexturea; ++pTexturea; ++v7; @@ -7016,11 +6976,11 @@ } while ( v23 ); } - v7 += v6->uTargetSurfacePitch - v22; - pTexturea = (unsigned __int16 *)((char *)pTexturea + a4b); - --a2a; - } - while ( a2a ); + v7 += this->uTargetSurfacePitch - full_width; + pTexturea = (unsigned __int16 *)((char *)pTexturea + 2 * (pTexture->uWidth - full_width)); + --full_height; + } + while ( full_height ); } } } @@ -8392,9 +8352,9 @@ SetUserInterface(pParty->alignment, true); if ( pVideoPlayer->pVideoFrame.pPixels ) pVideoPlayer->pVideoFrame.Load(pVideoPlayer->pVideoFrameTextureFilename, 1); - if ( uCurrentMenuID != 6 ) - { - if ( uCurrentMenuID == 8 ) + if ( uCurrentMenuID != MENU_CREATEPARTY ) + { + if ( uCurrentMenuID == MENU_CREDITSPROC ) dword_A74C88 = 1; } else @@ -8757,9 +8717,4 @@ assert(false); break; } -} -//----- (0040DF3D) -------------------------------------------------------- -void CallRenderPresent() -{ - pRenderer->Present(); -} +} \ No newline at end of file
--- a/Render.h Sun Sep 22 10:44:42 2013 +0200 +++ b/Render.h Sun Sep 22 10:51:08 2013 +0200 @@ -341,7 +341,7 @@ void SetTextureClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW); void ResetTextureClipRect(); void DrawTextureRGB(unsigned int uOutX, unsigned int uOutY, RGBTexture *a4); - void _4A5D33(unsigned int a2, unsigned int a3, int a4, int a5, RGBTexture *pTexture); + void CreditsTextureScroll(unsigned int pX, unsigned int pY, int move_X, int move_Y, RGBTexture *pTexture); void DrawTextureIndexed(unsigned int uX, unsigned int uY, struct Texture *a4); void ZBuffer_Fill_2(signed int a2, signed int a3, struct Texture *pTexture, int a5); void DrawMaskToZBuffer(signed int uOutX, unsigned int uOutY, struct Texture *pTexture, int zVal);
--- a/Spells.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/Spells.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -1168,8 +1168,8 @@ { bool result; // eax@2 - __debugbreak(); // refactor - if ( *(&pSpellDatas[0].field_12 + 20 * uSpellID) & 0xC ) + __debugbreak(); // wut is dat? + if ( pSpellDatas[uSpellID].field_12 & 0xC ) result = 1; else result = 0;
--- a/Texture.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/Texture.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -176,16 +176,16 @@ std::array<unsigned int, 5> uTextureID_Optkb; -unsigned int uTextureID_507C10; // weak -unsigned int uTextureID_507C14; // weak -unsigned int uTextureID_507C18; // weak -unsigned int uTextureID_507C1C; // weak +unsigned int optvid_base_texture_id; +unsigned int bloodsplats_texture_id; +unsigned int us_colored_lights_texture_id; +unsigned int tinting_texture_id; unsigned int uTextureID_507C20; // weak unsigned int uTextureID_507C24; // weak std::array<unsigned int, 10> pTextureIDs_GammaPositions; -unsigned int uTextureID_507C50; // weak -unsigned int uTextureID_507C54; // weak -unsigned int uTextureID_507C58; // weak +unsigned int not_available_bloodsplats_texture_id; +unsigned int not_available_us_colored_lights_texture_id; +unsigned int not_available_tinting_texture_id; unsigned int uTextureID_detaliz_close_button; // weak
--- a/Texture.h Sun Sep 22 10:44:42 2013 +0200 +++ b/Texture.h Sun Sep 22 10:51:08 2013 +0200 @@ -275,16 +275,16 @@ extern std::array<unsigned int, 5> uTextureID_Optkb; -extern unsigned int uTextureID_507C10; // weak -extern unsigned int uTextureID_507C14; // weak -extern unsigned int uTextureID_507C18; // weak -extern unsigned int uTextureID_507C1C; // weak +extern unsigned int optvid_base_texture_id; +extern unsigned int bloodsplats_texture_id; +extern unsigned int us_colored_lights_texture_id; +extern unsigned int tinting_texture_id; extern unsigned int uTextureID_507C20; // weak extern unsigned int uTextureID_507C24; // weak extern std::array<unsigned int, 10> pTextureIDs_GammaPositions; -extern unsigned int uTextureID_507C50; // weak -extern unsigned int uTextureID_507C54; // weak -extern unsigned int uTextureID_507C58; // weak +extern unsigned int not_available_bloodsplats_texture_id; +extern unsigned int not_available_us_colored_lights_texture_id; +extern unsigned int not_available_tinting_texture_id; struct OptionsMenuSkin
--- a/TurnEngine.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/TurnEngine.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -545,8 +545,8 @@ } //----- (004063A1) -------------------------------------------------------- - int stru262_TurnBased::StepTurnQueue() - { + bool stru262_TurnBased::StepTurnQueue() + { int v9; // dx@12 int j; @@ -564,7 +564,7 @@ } --turn_initiative; if (turn_initiative == 0) - return 1; + return true; } while (pQueue[0].actor_initiative != 0); } @@ -586,14 +586,14 @@ } --turn_initiative; if (turn_initiative == 0) - return 1; + return true; } while (pQueue[0].actor_initiative > 0); } } } } - return 0; + return false; } //----- (00406457) --------------------------------------------------------
--- a/TurnEngine.h Sun Sep 22 10:44:42 2013 +0200 +++ b/TurnEngine.h Sun Sep 22 10:51:08 2013 +0200 @@ -54,14 +54,14 @@ pending_actions = 0; } - void SortTurnQueue(); + void SortTurnQueue(); void ApplyPlayerAction(); - void Start(); + void Start(); void End(bool bPlaySound); void AITurnBasedAction(); void StartTurn(); void NextTurn(); - int StepTurnQueue(); + bool StepTurnQueue(); void _406457(int a2); void SetAIRecoveryTimes(); void _4065B0();
--- a/UI/UIMainMenu.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/UI/UIMainMenu.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -194,75 +194,73 @@ //----- (004979D2) -------------------------------------------------------- MENU_STATE MainMenuUI_Credits_Loop() { - char *v1; // edi@5 + char *cred_texturet; // edi@5 FILE *pFile; // eax@5 unsigned int pSize; // esi@7 - __int16 pHeight; // ax@9 - void *v7; // eax@9 - unsigned int pNumPixels; // ST2C_4@9 - unsigned int v10; // ST2C_4@19 MSG Msg; // [sp+84h] [bp-B8h]@10 - int v17; // [sp+A0h] [bp-9Ch]@9 GUIWindow credit_window; - int a5; // [sp+128h] [bp-14h]@1 + int move_Y; // [sp+128h] [bp-14h]@1 char *pString; // [sp+12Ch] [bp-10h]@9 - char *ptr; // [sp+130h] [bp-Ch]@5 GUIFont *pFontQuick; // [sp+134h] [bp-8h]@1 GUIFont *pFontCChar; // [sp+138h] [bp-4h]@1 - RGBTexture pTexture; // [sp+54h] [bp-E8h]@1 - RGBTexture pTexture2; // [sp+100h] [bp-3Ch]@1 - Texture pTexture3; // [sp+Ch] [bp-130h]@5 + RGBTexture mm6title_texture; // [sp+54h] [bp-E8h]@1 + RGBTexture cred_texture; // [sp+100h] [bp-3Ch]@1 + Texture pTemporaryTexture; // [sp+Ch] [bp-130h]@5 - a5 = 0; pFontQuick = LoadFont("quick.fnt", "FONTPAL", NULL); pFontCChar = LoadFont("cchar.fnt", "FONTPAL", NULL); + if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; ++pIcons_LOD->uTexturePacksCount; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; - dword_A74C88 = 0; + //dword_A74C88 = 0;//??? ÷àñòü äàëüíåéøåãî êîäà îòñóòñòâóåò, òàì èñïîëüçîâàëàñü äàííàÿ ïåðåìåííàÿ + pAudioPlayer->PlayMusicTrack(MUSIC_Credits); - pTexture.Load("mm6title.pcx", 0); - ptr = (char *)pEvents_LOD->LoadRaw("credits.txt", 0); - v1 = ptr; + + mm6title_texture.Load("mm6title.pcx", 0); + cred_texturet = (char *)pEvents_LOD->LoadRaw("credits.txt", 0); pFile = pEvents_LOD->FindContainer("credits.txt", 0); if ( !pFile ) Error(pGlobalTXT_LocalizationStrings[63]); // "Might and Magic VII is having trouble loading files. // Please re-install to fix this problem. Note: Re-installing will not destroy your save games." - fread(&pTexture3, 1, 0x30, pFile); - pSize = pTexture3.uDecompressedSize; - if ( !pTexture3.uDecompressedSize ) - pSize = pTexture3.uTextureSize; - memset(&pTexture3, 0, 0x48); - v1[pSize] = 0; + + //äëÿ ïîëó÷åíèÿ ðàçìåðà----------------------- + fread(&pTemporaryTexture, 1, 0x30, pFile); + pSize = pTemporaryTexture.uDecompressedSize; + if ( !pSize ) + pSize = pTemporaryTexture.uTextureSize; + memset(&pTemporaryTexture, 0, 0x48);//îáíóëåíèå + cred_texturet[pSize] = 0;//êîíåö òåêñòà credit_window.uFrameWidth = 250; credit_window.uFrameHeight = 440; credit_window.uFrameX = 389; credit_window.uFrameY = 19; - pTexture2.uWidth = 250; - pHeight = pFontQuick->GetStringHeight2(pFontCChar, v1, &credit_window, 0, 1); - pTexture2.uHeight = pHeight + 2 * credit_window.uFrameHeight; - pTexture2.uNumPixels = (signed __int16)pTexture2.uWidth * (signed __int16)pTexture2.uHeight; - v7 = malloc(2 * pTexture2.uNumPixels);//, "scrollermap"); - pNumPixels = pTexture2.uNumPixels; - pTexture2.pPixels = (unsigned __int16 *)v7; - fill_pixels_fast(TargetColor(0, 0xFFu, 0xFFu), pTexture2.pPixels, pNumPixels); - pTexture2._allocation_flags = 0; + cred_texture.uWidth = 250; + cred_texture.uHeight = pFontQuick->GetStringHeight2(pFontCChar, cred_texturet, &credit_window, 0, 1) + 2 * credit_window.uFrameHeight; + cred_texture.uNumPixels = cred_texture.uWidth * cred_texture.uHeight; + cred_texture.pPixels = (unsigned __int16 *)malloc(2 * cred_texture.uNumPixels); + fill_pixels_fast(TargetColor(0, 0xFFu, 0xFFu), cred_texture.pPixels, cred_texture.uNumPixels); + cred_texture._allocation_flags = 0; + + //äàòü øðèôò è öâåòà òåêñòó pString = (char *)malloc(2 * pSize); - strncpy(pString, ptr, pSize); - pString[pSize]=0; - pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 0, credit_window.uFrameHeight, (signed __int16)pTexture2.uWidth, - (signed __int16)pTexture2.uHeight, TargetColor(0x70u, 0x8Fu, 0xFEu), TargetColor(0xECu, 0xE6u, 0x9Cu), pString, pTexture2.pPixels, - (signed __int16)pTexture2.uWidth); + strncpy(pString, cred_texturet, pSize); + pString[pSize] = 0; + pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 0, credit_window.uFrameHeight, cred_texture.uWidth, + cred_texture.uHeight, TargetColor(0x70u, 0x8Fu, 0xFEu), TargetColor(0xECu, 0xE6u, 0x9Cu), pString, cred_texture.pPixels, cred_texture.uWidth); free(pString); - pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, ptr); - pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_Escape, 0, 0x1Bu, "", 0); + + pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, cred_texturet); + pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_Escape, 0, 27, "", 0); pCurrentScreen = SCREEN_CREATORS; SetCurrentMenuID(MENU_CREDITSPROC); + + move_Y = 0; do { while ( PeekMessageA(&Msg, 0, 0, 0, 1) ) @@ -279,14 +277,14 @@ else { pRenderer->BeginScene(); - pRenderer->DrawTextureRGB(0, 0, &pTexture); + pRenderer->DrawTextureRGB(0, 0, &mm6title_texture); pRenderer->SetTextureClipRect(credit_window.uFrameX, credit_window.uFrameY, credit_window.uFrameX + credit_window.uFrameWidth, credit_window.uFrameY + credit_window.uFrameHeight); - pRenderer->_4A5D33(credit_window.uFrameX, credit_window.uFrameY, 0, a5, &pTexture2); + pRenderer->CreditsTextureScroll(credit_window.uFrameX, credit_window.uFrameY, 0, move_Y, &cred_texture); pRenderer->ResetTextureClipRect(); pRenderer->EndScene(); - ++a5; - if ( a5 >= (signed __int16)pTexture2.uHeight ) + ++move_Y; + if ( move_Y >= cred_texture.uHeight ) SetCurrentMenuID(MENU_MAIN); pRenderer->Present(); pCurrentScreen = SCREEN_GAME;//Ritor1: temporarily, must be corrected GUI_MainMenuMessageProc() @@ -295,12 +293,59 @@ } while ( GetCurrentMenuID() == MENU_CREDITSPROC ); pAudioPlayer->_4AA258(1); - free(ptr); + free(cred_texturet); free(pFontQuick); free(pFontCChar); pWindow_MainMenu->Release(); pIcons_LOD->RemoveTexturesPackFromTextureList(); - pTexture.Release(); - pTexture2.Release(); + mm6title_texture.Release(); + cred_texture.Release(); return MENU_MAIN; // return MENU_Main -} \ No newline at end of file +} +/*MENU_STATE MainMenuUI_Credits_Loop()//NewTitle +{ + MSG Msg; + GUIWindow credit_window; + RGBTexture mm6title_texture; + + if ( pMessageQueue_50CBD0->uNumMessages ) + pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; + ++pIcons_LOD->uTexturePacksCount; + if ( !pIcons_LOD->uNumPrevLoadedFiles ) + pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; + + //pAudioPlayer->PlayMusicTrack(MUSIC_Credits); + + mm6title_texture.Load("newtitle.pcx", 0); + pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_Escape, 0, 27, "", 0); + pCurrentScreen = SCREEN_CREATORS; + SetCurrentMenuID(MENU_CREDITSPROC); + + do + { + while ( PeekMessageA(&Msg, 0, 0, 0, 1) ) + { + if ( Msg.message == 18 ) + Game_DeinitializeAndTerminate(0); + TranslateMessage(&Msg); + DispatchMessageA(&Msg); + } + if ( BYTE1(dword_6BE364_game_settings_1) & 1 ) + { + WaitMessage(); + } + else + { + pRenderer->BeginScene(); + pRenderer->DrawTextureRGB(0, 0, &mm6title_texture); + pRenderer->EndScene(); + pRenderer->Present(); + pCurrentScreen = SCREEN_GAME; + GUI_MainMenuMessageProc(); + } + } + while ( GetCurrentMenuID() == MENU_CREDITSPROC ); + //pAudioPlayer->_4AA258(1); + mm6title_texture.Release(); + return MENU_MAIN; // return MENU_Main +}*/ \ No newline at end of file
--- a/UI/UIOptions.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/UI/UIOptions.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -51,151 +51,138 @@ //----- (004142D3) -------------------------------------------------------- void GameMenuUI_DrawKeyBindings() { - signed int v4; // ecx@7 - signed int v5; // eax@8 - - if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) + signed int v4; // ecx@7 + signed int v5; // eax@8 + + if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) + { + pPrevVirtualCidesMapping[uGameMenuUI_CurentlySelectedKeyIdx] = pKeyActionMap->pPressedKeysBuffer[0]; + memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0, sizeof(GameMenuUI_InvaligKeyBindingsFlags)); + v4 = 0; + do + { + v5 = 0; + do + { + if ( v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5] ) { - pPrevVirtualCidesMapping[uGameMenuUI_CurentlySelectedKeyIdx] = pKeyActionMap->pPressedKeysBuffer[0]; - memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0, sizeof(GameMenuUI_InvaligKeyBindingsFlags)); - v4 = 0; - do - { - v5 = 0; - do - { - if ( v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5] ) - { - GameMenuUI_InvaligKeyBindingsFlags[v4] = true; - GameMenuUI_InvaligKeyBindingsFlags[v5] = true; - } - ++v5; - } - while ( v5 < 28 ); - ++v4; - } - while ( v4 < 28 ); - uGameMenuUI_CurentlySelectedKeyIdx = -1; - pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; + GameMenuUI_InvaligKeyBindingsFlags[v4] = true; + GameMenuUI_InvaligKeyBindingsFlags[v5] = true; } - pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Optkb[0])); - if ( KeyboardPageNum == 1 ) - { - pRenderer->DrawTextureIndexed(0x13, 0x12E, pIcons_LOD->GetTexture(uTextureID_Optkb[3])); + ++v5; + } + while ( v5 < 28 ); + ++v4; + } + while ( v4 < 28 ); + uGameMenuUI_CurentlySelectedKeyIdx = -1; + pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; + } + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Optkb[0]));//draw base texture + if ( KeyboardPageNum == 1 ) + { + pRenderer->DrawTextureIndexed(19, 302, pIcons_LOD->GetTexture(uTextureID_Optkb[3])); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "ÂÏÅШÄ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(0), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÍÀÇÀÄ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(1), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÂËÅÂÎ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(2), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÂÏÐÀÂÎ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(3), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÐÈÊ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(4), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÏÐÛÆÎÊ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(5), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "Ï.ÐÅÆÈÌ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(6), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÏÐÈÌ. ÇÀÊË.", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(7), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÀÒÀÊÀ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(8), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÄÅÉÑÒÂ.", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(9), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÇÀÊËÈÍ.", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(10), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "ÈÃÐÎÊ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(11), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "ÑËÅÄ. ÈÃÐÎÊ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(12), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÇÀÄÀÍÈß", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(13), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]), 0, 0, 0); - } - else - { - pRenderer->DrawTextureIndexed(0x7F, 0x12E, pIcons_LOD->GetTexture(uTextureID_Optkb[4])); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "ÂÏÅШÄ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(0), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÍÀÇÀÄ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(1), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÂËÅÂÎ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(2), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÂÏÐÀÂÎ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(3), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÐÈÊ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(4), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÏÐÛÆÎÊ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(5), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "Ï.ÐÅÆÈÌ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(6), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÏÐÈÌ. ÇÀÊË.", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(7), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÀÒÀÊÀ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(8), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÄÅÉÑÒÂ.", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(9), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÇÀÊËÈÍ.", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(10), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "ÈÃÐÎÊ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(11), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "ÑËÅÄ. ÈÃÐÎÊ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(12), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÇÀÄÀÍÈß", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(13), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]), 0, 0, 0); + } + else + { + pRenderer->DrawTextureIndexed(127, 302, pIcons_LOD->GetTexture(uTextureID_Optkb[4])); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "Á. ÑÏÐÀÂÊÀ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(14), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÎÒÄÛÕ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(15), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÒÅÊ. ÂÐÅÌß", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(16), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÀÂÒÎÇÀÌÅÒÊÈ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(17), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÀÐÒÀ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(18), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÁÅÆÀÒÜ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(19), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÂÅÐÕ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(20), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÍÈÇ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(21), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÏÅШÄ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(22), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÏÐÈÁËÈÇ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(23), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÎÒÄÀËÈÒÜ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(24), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "Ï. ÂÂÅÐÕ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(25), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "Ï. ÂÍÈÇ", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(26), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]), 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÏÐÈÇÅÌË", 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(27), pKeyActionMap->GetVKeyDisplayName(pWindowList_at_506F50_minus1_indexing[0]), 0, 0, 0); - } + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "Á. ÑÏÐÀÂÊÀ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(14), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÎÒÄÛÕ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(15), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÒÅÊ. ÂÐÅÌß", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(16), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÀÂÒÎÇÀÌÅÒÊÈ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(17), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÀÐÒÀ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(18), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÁÅÆÀÒÜ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(19), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÂÅÐÕ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(20), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÍÈÇ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(21), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÏÅШÄ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(22), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÏÐÈÁËÈÇ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(23), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÎÒÄÀËÈÒÜ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(24), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "Ï. ÂÂÅÐÕ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(25), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "Ï. ÂÍÈÇ", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(26), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÏÐÈÇÅÌË", 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(27), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[27]), 0, 0, 0); + } } - - - //----- (00414D9A) -------------------------------------------------------- void GameMenuUI_DrawVideoOptions() { - const char *v0; // ST0C_4@3 - //unsigned __int16 v1; // ax@3 - //int v2; // eax@10 - GUIWindow v3; // [sp+8h] [bp-54h]@3 + GUIWindow msg_window; // [sp+8h] [bp-54h]@3 + + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(optvid_base_texture_id));//draw base texture + if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() ) + { + pRenderer->DrawTextureIndexed(17 * uGammaPos + 42, 162, pIcons_LOD->GetTexture(pTextureIDs_GammaPositions[uGammaPos])); + pRenderer->DrawTextureRGB(274, 169, &stru_506E40);//review_window + msg_window.uFrameX = 22; + msg_window.uFrameY = 190; + msg_window.uFrameWidth = 211; + msg_window.uFrameHeight = 79; + msg_window.uFrameZ = 232; + msg_window.uFrameW = 268; + msg_window.DrawTitleText(pFontSmallnum, 0, 0, ui_gamemenu_video_gamma_title_color, pGlobalTXT_LocalizationStrings[226], 3); // "Gamma controls the relative ""brightness"" of the game. May vary depending on your monitor." + } - pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_507C10)); - if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() ) - { - pRenderer->DrawTextureIndexed( - 17 * uGammaPos + 42, - 162, - pIcons_LOD->GetTexture(pTextureIDs_GammaPositions[uGammaPos])); - pRenderer->DrawTextureRGB(0x112u, 0xA9u, &stru_506E40); - v3.uFrameX = 22; - v0 = pGlobalTXT_LocalizationStrings[226]; // "Gamma controls the relative ""brightness"" of the game. May vary depending on your monitor." - v3.uFrameY = 190; - v3.uFrameWidth = 211; - v3.uFrameHeight = 79; - v3.uFrameZ = 232; - v3.uFrameW = 268; - //v1 = TargetColor(0xFFu, 0xFFu, 0x9Bu); - v3.DrawTitleText(pFontSmallnum, 0, 0, ui_gamemenu_video_gamma_title_color, v0, 3u); - } - - if (!pRenderer->pRenderD3D) - { - pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(uTextureID_507C50)); - pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(uTextureID_507C54)); - pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(uTextureID_507C58)); - } - else - { - if (pGame->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS) - pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(uTextureID_507C14)); - if (pRenderer->bUseColoredLights) - pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(uTextureID_507C18)); - if (pRenderer->bTinting) - pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(uTextureID_507C1C)); - } + if (!pRenderer->pRenderD3D)//if software + { + pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(not_available_bloodsplats_texture_id)); + pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(not_available_us_colored_lights_texture_id)); + pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(not_available_tinting_texture_id)); + } + else + { + if (pGame->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS) + pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(bloodsplats_texture_id)); + if (pRenderer->bUseColoredLights) + pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(us_colored_lights_texture_id)); + if (pRenderer->bTinting) + pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(tinting_texture_id)); + } } - - //----- (00414F82) -------------------------------------------------------- void GameMenuUI_Options_Draw() { @@ -219,15 +206,6 @@ pRenderer->DrawTextureIndexed(265 + 17 * uVoicesVolumeMultiplier, 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uVoicesVolumeMultiplier])); } - - - - - - - - - OptionsMenuSkin::OptionsMenuSkin(): uTextureID_Background(0), uTextureID_ArrowLeft(0), @@ -264,4 +242,4 @@ RELEASE(uTextureID_ShowDamage); #undef RELEASE -} +} \ No newline at end of file
--- a/UI/UIPartyCreation.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/UI/UIPartyCreation.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -21,91 +21,57 @@ //----- (004908DE) -------------------------------------------------------- -int PlayerCreation_Choose4Skills() - { - Player *v0; // esi@1 - signed int v1; // edx@2 - unsigned short *v2; // eax@2 - signed int v3; // ecx@2 +bool PlayerCreation_Choose4Skills() +{ + signed int skills_count; // edx@2 - v0 = pParty->pPlayers;//[0].pActiveSkills; - while ( 1 ) - { - v1 = 0; - v2 = v0->pActiveSkills; - v3 = 37; - do - { - if ( *v2 ) - ++v1; - ++v2; - --v3; - } - while ( v3 ); - if ( v1 < 4 ) - break; - ++v0; - if ( v0 > &pParty->pPlayers[3] ) - return 1; - } - return 0; + for ( uint j = 0; j < 4; ++j ) + { + skills_count = 0; + for ( uint i = 0; i < 37; ++i ) + { + if ( pParty->pPlayers[j].pActiveSkills[i] ) + ++skills_count; } - - - + if ( skills_count < 4 ) + return false; + } + return true; +} //----- (00491CB5) -------------------------------------------------------- void LoadPlayerPortraintsAndVoices() - { - //Texture **v0; // ebx@1 - //int v1; // eax@2 - //int v2; // edi@3 - char *v3; // esi@5 - char *v4; // [sp+10h] [bp-4h]@1 - - pIcons_LOD->pFacesLock = pIcons_LOD->uNumLoadedFiles; +{ + pIcons_LOD->pFacesLock = pIcons_LOD->uNumLoadedFiles; - for (uint i = 0; i < 4; ++i) - for (uint j = 0; j < 56; ++j) - { - sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[pParty->pPlayers[i].uCurrentFace], j + 1); - pTextures_PlayerFaces[i][j] = pIcons_LOD->LoadTexturePtr(pTmpBuf.data(), TEXTURE_16BIT_PALETTE); - } - - pTexture_PlayerFaceEradicated = pIcons_LOD->LoadTexturePtr("ERADCATE", TEXTURE_16BIT_PALETTE); - pTexture_PlayerFaceDead = pIcons_LOD->LoadTexturePtr("DEAD", TEXTURE_16BIT_PALETTE); - pTexture_PlayerFaceMask = pIcons_LOD->LoadTexturePtr("FACEMASK", TEXTURE_16BIT_PALETTE); - - if (SoundSetAction[24][0]) - for (uint i = 0; i < 4; ++i) - { - pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4998, 0); - pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4999, 0); - } + for (uint i = 0; i < 4; ++i) + for (uint j = 0; j < 56; ++j) + { + sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[pParty->pPlayers[i].uCurrentFace], j + 1); + pTextures_PlayerFaces[i][j] = pIcons_LOD->LoadTexturePtr(pTmpBuf.data(), TEXTURE_16BIT_PALETTE); } -//----- (00491DE7) -------------------------------------------------------- -int __fastcall ReloadPlayerPortraits(int a1, int a2) - { - int result; // eax@1 - const char **v3; // ebp@1 - Texture **v4; // ebx@1 - int v5; // esi@2 + pTexture_PlayerFaceEradicated = pIcons_LOD->LoadTexturePtr("ERADCATE", TEXTURE_16BIT_PALETTE); + pTexture_PlayerFaceDead = pIcons_LOD->LoadTexturePtr("DEAD", TEXTURE_16BIT_PALETTE); + pTexture_PlayerFaceMask = pIcons_LOD->LoadTexturePtr("FACEMASK", TEXTURE_16BIT_PALETTE); - result = 0; - v3 = &pPlayerPortraitsNames[a2]; - v4 = pTextures_PlayerFaces[a1].data(); - do - { - v5 = result + 1; - sprintf(pTmpBuf.data(), "%s%02d", *v3, result + 1); - pIcons_LOD->ReloadTexture(*v4, pTmpBuf.data(), 2); - result = v5; - ++v4; - } - while ( v5 < 56 ); - return result; + if (SoundSetAction[24][0]) + for (uint i = 0; i < 4; ++i) + { + pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4998, 0); + pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4999, 0); } +} + +//----- (00491DE7) -------------------------------------------------------- +void ReloadPlayerPortraits(int player_id, int face_id)//the transition from the zombies in the normal state +{ + for ( uint i = 0; i <= 55; ++i ) + { + sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[face_id], i + 1); + pIcons_LOD->ReloadTexture(pTextures_PlayerFaces[player_id][i], pTmpBuf.data(), 2); + } +} //----- (00495B39) -------------------------------------------------------- void PlayerCreationUI_Draw() { @@ -113,18 +79,10 @@ IconFrame *pFrame; // eax@3 int pX; // ecx@7 GUIButton *uPosActiveItem; // edi@12 - int uNumLet; // eax@14 - char v8; // al@17 - int v9; // ecx@17 - char v10; // sf@17 - size_t v16; // eax@28 int v17; // eax@33 int uStatLevel; // eax@44 unsigned int pStatColor; // eax@44 PLAYER_SKILL_TYPE pSkillsType; // eax@44 - int v51; // eax@49 - char *v52; // edi@52 - char v53; // al@52 PLAYER_CLASS_TYPE uClassType; // edi@53 int pColorText; // eax@53 PLAYER_SKILL_TYPE pSkillId; // edi@72 @@ -134,26 +92,15 @@ signed int pBonusNum; // edi@82 const char *uRaceName; // [sp+0h] [bp-170h]@39 char pText[200]; // [sp+10h] [bp-160h]@14 - GUIWindow pWindow; // [sp+D8h] [bp-98h]@83 - size_t v120; // [sp+130h] [bp-40h]@25 - int uColor1; // [sp+144h] [bp-2Ch]@1 + GUIWindow message_window; // [sp+D8h] [bp-98h]@83 int v126; // [sp+148h] [bp-28h]@25 - int uColorGreen; // [sp+14Ch] [bp-24h]@1 int pIntervalY; // [sp+150h] [bp-20h]@14 int pX_Numbers; // [sp+154h] [bp-1Ch]@18 - int uColorTeal; // [sp+158h] [bp-18h]@1 - int uColorWhite; // [sp+15Ch] [bp-14h]@1 int uX; // [sp+160h] [bp-10h]@18 - unsigned int v133; // [sp+164h] [bp-Ch]@25 - int pOrder; // [sp+168h] [bp-8h]@14 int pIntervalX; int pCorrective; - const char *pSkillName; - uColor1 = TargetColor(0xD1, 0xBB, 0x61); - uColorTeal = TargetColor(0, 0xF7, 0xF7); - uColorGreen = TargetColor(0, 0xFF, 0); - uColorWhite = TargetColor(0xFF, 0xFF, 0xFF); + //move sky pRenderer->BeginScene(); pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); uPlayerCreationUI_SkySliderPos = (GetTickCount() % 12800) / 20; @@ -173,7 +120,7 @@ } pTextCenter = pFontCChar->AlignText_Center(640, pGlobalTXT_LocalizationStrings[51]); - pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0);//Ñ Î Ç Ä À Ò Ü Î Ò Ð ß Ä pRenderer->DrawTextureTransparent(17, 35, pPlayerPortraits[pParty->pPlayers[0].uCurrentFace]); pRenderer->DrawTextureTransparent(176, 35, pPlayerPortraits[pParty->pPlayers[1].uCurrentFace]); pRenderer->DrawTextureTransparent(335, 35, pPlayerPortraits[pParty->pPlayers[2].uCurrentFace]); @@ -189,34 +136,18 @@ memset(pText, 0, 200); strcpy(pText, pGlobalTXT_LocalizationStrings[205]);// "Skills" - uNumLet = strlen(pText) - 1; - pOrder = uNumLet; - if ( uNumLet >= 0 ) - { - while ( 1 ) - { - v8 = toupper((unsigned __int8)pText[uNumLet]); - v9 = pOrder; - v10 = pOrder-- - 1 < 0; - pText[v9] = v8; - if ( v10 ) - break; - uNumLet = pOrder; - } - } + for ( int i = strlen(pText) - 1; i >= 0; i-- )//??? + pText[i] = toupper((unsigned __int8)pText[i]); pIntervalX = 18; pIntervalY = pFontCreate->uFontHeight - 2; - //v124 = 0; uX = 32; pX_Numbers = 493; for (int i = 0; i < 4; ++i) { - auto player = pParty->pPlayers + i; - - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pIntervalX + 73, 100, 0, pClassNames[player->classType], 0, 0, 0); - pRenderer->DrawTextureTransparent(pIntervalX + 77, 50, pTexture_IC_KNIGHT[player->classType / 4]); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pIntervalX + 73, 100, 0, pClassNames[pParty->pPlayers[i].classType], 0, 0, 0); + pRenderer->DrawTextureTransparent(pIntervalX + 77, 50, pTexture_IC_KNIGHT[pParty->pPlayers[i].classType / 4]); if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 != WINDOW_INPUT_NONE && pGUIWindow_CurrentMenu->ptr_1C == (void *)i ) { @@ -228,38 +159,30 @@ break; case WINDOW_INPUT_CONFIRMED: // press enter pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; - v120 = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); v126 = 0; - v133 = 0; - if ( strlen((const char *)pKeyActionMap->pPressedKeysBuffer) )//edit name + for ( int i = 0; i < strlen((const char *)pKeyActionMap->pPressedKeysBuffer); ++i )//edit name { - do - { - if ( pKeyActionMap->pPressedKeysBuffer[v133] == ' ' ) - ++v126; - ++v133; - v16 = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); - } - while ( v133 < v16 ); + if ( pKeyActionMap->pPressedKeysBuffer[i] == ' ' ) + ++v126; } - if ( v120 && v126 != v120 ) - strcpy(player->pName, (const char *)pKeyActionMap->pPressedKeysBuffer); - pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, player->pName, 130, 0); - *(short *)&player->field_1988[27] = 1; + if ( strlen((const char *)pKeyActionMap->pPressedKeysBuffer) && v126 != strlen((const char *)pKeyActionMap->pPressedKeysBuffer) ) + strcpy(pParty->pPlayers[i].pName, (const char *)pKeyActionMap->pPressedKeysBuffer); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, pParty->pPlayers[i].pName, 130, 0); + pParty->pPlayers[i].field_1988[27] = 1; break; case WINDOW_INPUT_CANCELLED: // press escape pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; - pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, player->pName, 130, 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, pParty->pPlayers[i].pName, 130, 0); SetCurrentMenuID(MENU_NAMEPANELESC); break; } } else { - pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, player->pName, 130, 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, pParty->pPlayers[i].pName, 130, 0); } - switch (player->GetRace()) + switch (pParty->pPlayers[i].GetRace()) { case 0: uRaceName = pGlobalTXT_LocalizationStrings[99]; break; // "Human" case 1: uRaceName = pGlobalTXT_LocalizationStrings[103]; break; // "Dwarf" @@ -270,152 +193,139 @@ pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX + 72, pIntervalY + 12, 0, pTmpBuf.data(), 130, 0);//Race Name pTextCenter = pFontCreate->AlignText_Center(150, pText); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + uX - 24, 291, uColor1, pText, 0, 0, 0); // Skills + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + uX - 24, 291, TargetColor(0xD1, 0xBB, 0x61), pText, 0, 0, 0); // Skills - uStatLevel = player->GetActualMight(); + uStatLevel = pParty->pPlayers[i].GetActualMight(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[144], pX_Numbers, uStatLevel);// "Might" - pStatColor = player->GetStatColor(0); + pStatColor = pParty->pPlayers[i].GetStatColor(0); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualIntelligence(); + uStatLevel = pParty->pPlayers[i].GetActualIntelligence(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[116], pX_Numbers, uStatLevel);// "Intellect" - pStatColor = player->GetStatColor(1); + pStatColor = pParty->pPlayers[i].GetStatColor(1); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualWillpower(); + uStatLevel = pParty->pPlayers[i].GetActualWillpower(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[163], pX_Numbers, uStatLevel);// "Personality" - pStatColor = player->GetStatColor(2); + pStatColor = pParty->pPlayers[i].GetStatColor(2); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 2 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualEndurance(); + uStatLevel = pParty->pPlayers[i].GetActualEndurance(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[75], pX_Numbers, uStatLevel);// "Endurance" - pStatColor = player->GetStatColor(3); + pStatColor = pParty->pPlayers[i].GetStatColor(3); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 3 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualAccuracy(); + uStatLevel = pParty->pPlayers[i].GetActualAccuracy(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[1], pX_Numbers, uStatLevel);// "Accuracy" - pStatColor = player->GetStatColor(4); + pStatColor = pParty->pPlayers[i].GetStatColor(4); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 4 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualSpeed(); + uStatLevel = pParty->pPlayers[i].GetActualSpeed(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[211], pX_Numbers, uStatLevel);// "Speed" - pStatColor = player->GetStatColor(5); + pStatColor = pParty->pPlayers[i].GetStatColor(5); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 5 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualLuck(); + uStatLevel = pParty->pPlayers[i].GetActualLuck(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[136], pX_Numbers, uStatLevel);// "Luck" - pStatColor = player->GetStatColor(6); + pStatColor = pParty->pPlayers[i].GetStatColor(6); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 6 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - pSkillsType = player->GetSkillIdxByOrder(0); + pSkillsType = pParty->pPlayers[i].GetSkillIdxByOrder(0); pTextCenter = pFontCreate->AlignText_Center(150, pSkillNames[pSkillsType]); sprintf(pTmpBuf.data(), "\t%03u%s", pTextCenter, pSkillNames[pSkillsType]); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, uColorWhite, pTmpBuf.data(), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, TargetColor(0xFF, 0xFF, 0xFF), pTmpBuf.data(), 0, 0, 0); - pSkillsType = player->GetSkillIdxByOrder(1); + pSkillsType = pParty->pPlayers[i].GetSkillIdxByOrder(1); pTextCenter = pFontCreate->AlignText_Center(150, pSkillNames[pSkillsType]); sprintf(pTmpBuf.data(), "\t%03u%s", pTextCenter, pSkillNames[pSkillsType]); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, pIntervalY + 311, uColorWhite, pTmpBuf.data(), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, pIntervalY + 311, TargetColor(0xFF, 0xFF, 0xFF), pTmpBuf.data(), 0, 0, 0); - pSkillsType = player->GetSkillIdxByOrder(2); + pSkillsType = pParty->pPlayers[i].GetSkillIdxByOrder(2); pTextCenter = pFontCreate->AlignText_Center(150, pSkillNames[pSkillsType]); sprintf(pTmpBuf.data(), "\t%03u%s", pTextCenter, pSkillNames[pSkillsType]); - pColorText = uColorGreen; + pColorText = TargetColor(0, 0xFF, 0); if ( (signed int)pSkillsType >= 37 ) - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 2 * pIntervalY + 311, pColorText, pTmpBuf.data(), 0, 0, 0); - pSkillsType = player->GetSkillIdxByOrder(3); + pSkillsType = pParty->pPlayers[i].GetSkillIdxByOrder(3); pTextCenter = pFontCreate->AlignText_Center(150, pSkillNames[pSkillsType]); sprintf(pTmpBuf.data(), "\t%03u%s", pTextCenter, pSkillNames[pSkillsType]); - pColorText = uColorGreen; + pColorText = TargetColor(0, 0xFF, 0); if ( (signed int)pSkillsType >= 37 ) - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 3 * pIntervalY + 311, pColorText, pTmpBuf.data(), 0, 0, 0); - //v124 = (char *)v124 + 1; pIntervalX += 159; pX_Numbers -= 158; uX += 158; } strcpy(pText, pGlobalTXT_LocalizationStrings[41]);// "Class" - v51 = strlen(pText) - 1; - pOrder = v51; - if ( v51 >= 0 ) - { - while ( 1 ) - { - v52 = &pText[v51]; - v53 = toupper((unsigned __int8)pText[v51]); - v10 = pOrder-- - 1 < 0; - *v52 = v53; - if ( v10 ) - break; - v51 = pOrder; - } - } + for ( int i = strlen(pText) - 1; i >= 0; i-- ) + pText[i] = toupper((unsigned __int8)pText[i]); + uClassType = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].classType; pTextCenter = pFontCreate->AlignText_Center(193, pText); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 324, 395, uColor1, pText, 0, 0, 0);//Classes + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 324, 395, TargetColor(0xD1, 0xBB, 0x61), pText, 0, 0, 0);//Classes - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[0]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 323, 417, pColorText, pClassNames[0], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_PALADIN ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[12]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 323, pIntervalY + 417, pColorText, pClassNames[12], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_DRUID ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[20]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 323, 2 * pIntervalY + 417, pColorText, pClassNames[20], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_CLERIC ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[24]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, 417, pColorText, pClassNames[24], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_DRUID) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[28]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, pIntervalY + 417, pColorText, pClassNames[28], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_SORCERER ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[32]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, 2 * pIntervalY + 417, pColorText, pClassNames[32], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_ARCHER ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[16]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 453, 417, pColorText, pClassNames[16], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_MONK ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[8]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 453, pIntervalY + 417, pColorText, pClassNames[8], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_THEIF ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[4]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 453, 2 * pIntervalY + 417, pColorText, pClassNames[4], 0, 0, 0); pTextCenter = pFontCreate->AlignText_Center(236, pGlobalTXT_LocalizationStrings[20]); // "Available Skills" - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 37, 395, uColor1, pGlobalTXT_LocalizationStrings[20], 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 37, 395, TargetColor(0xD1, 0xBB, 0x61), pGlobalTXT_LocalizationStrings[20], 0, 0, 0); for (uint i = 0; i < 9; ++i) { pSkillId = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(i + 4); @@ -441,31 +351,31 @@ pCorrective = -10;//-5 if ( (signed int)pLenText < 8 )//if ( (signed int)v124 > 2 ) pCorrective = 0; - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( !pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].pActiveSkills[pSkillId] ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(100, pText); pGUIWindow_CurrentMenu->DrawText(pFontCreate, 100 * (i / 3) + pTextCenter + pCorrective + 17, pIntervalY * (i % 3) + 417, pColorText, pText, 0, 0, 0); } pTextCenter = pFontCreate->AlignText_Center(0x5C, pGlobalTXT_LocalizationStrings[30]);// "Bonus" - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 533, 394, uColor1, pGlobalTXT_LocalizationStrings[30], 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 533, 394, TargetColor(0xD1, 0xBB, 0x61), pGlobalTXT_LocalizationStrings[30], 0, 0, 0); pBonusNum = PlayerCreation_GetUnspentAttributePointCount(); sprintf(pTmpBuf.data(), "%d", pBonusNum); pTextCenter = pFontCreate->AlignText_Center(84, pTmpBuf.data()); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 530, 410, uColorWhite, pTmpBuf.data(), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 530, 410, TargetColor(0xFF, 0xFF, 0xFF), pTmpBuf.data(), 0, 0, 0); if ( GameUI_Footer_TimeLeft > GetTickCount() ) { - pWindow.Hint = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points." + message_window.Hint = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points." if ( pBonusNum < 0 ) - pWindow.Hint = pGlobalTXT_LocalizationStrings[413];// "You can't spend more than 50 points." - pWindow.uFrameWidth = 300; - pWindow.uFrameHeight = 100; - pWindow.uFrameX = 170; - pWindow.uFrameY = 140; - pWindow.uFrameZ = 469; - pWindow.uFrameW = 239; - pWindow.DrawMessageBox(0); + message_window.Hint = pGlobalTXT_LocalizationStrings[413];// "You can't spend more than 50 points." + message_window.uFrameWidth = 300; + message_window.uFrameHeight = 100; + message_window.uFrameX = 170; + message_window.uFrameY = 140; + message_window.uFrameZ = 469; + message_window.uFrameW = 239; + message_window.DrawMessageBox(0); } pRenderer->EndScene(); } @@ -474,20 +384,8 @@ void PlayerCreationUI_Initialize() { unsigned int v0; // ebx@5 - unsigned int v1; // eax@6 - int v2; // ecx@6 - //unsigned int v3; // eax@8 - //signed int v4; // ecx@8 signed int uControlParam; // [sp+10h] [bp-Ch]@7 - unsigned int uControlParama; // [sp+10h] [bp-Ch]@9 - unsigned int uControlParamb; // [sp+10h] [bp-Ch]@11 - unsigned int uControlParamc; // [sp+10h] [bp-Ch]@13 - signed int uControlParamd; // [sp+10h] [bp-Ch]@15 signed int uX; // [sp+14h] [bp-8h]@5 - unsigned int uXa; // [sp+14h] [bp-8h]@9 - unsigned int uXb; // [sp+14h] [bp-8h]@11 - unsigned int uXc; // [sp+14h] [bp-8h]@13 - signed int uXd; // [sp+14h] [bp-8h]@16 pMessageQueue_50CBD0->Flush(); @@ -511,11 +409,10 @@ pTexture_IC_KNIGHT[8] = pIcons_LOD->LoadTexturePtr("IC_SORC", TEXTURE_16BIT_PALETTE); pTexture_MAKETOP = pIcons_LOD->LoadTexturePtr("MAKETOP", TEXTURE_16BIT_PALETTE); pTexture_MAKESKY = pIcons_LOD->LoadTexturePtr("MAKESKY", TEXTURE_16BIT_PALETTE); - for(uX=0;uX < 22;++uX ) // load PlayerPortraits texture + for( uX = 0; uX < 22; ++uX ) // load PlayerPortraits texture { sprintf(pTmpBuf.data(), "%s01", pPlayerPortraitsNames[uX]); - v1 = pIcons_LOD->LoadTexture(pTmpBuf.data(), TEXTURE_16BIT_PALETTE); - pPlayerPortraits[uX] = &pIcons_LOD->pTextures[v1]; + pPlayerPortraits[uX] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf.data(), TEXTURE_16BIT_PALETTE)]; } pTexture_PlayerFaceMask = pIcons_LOD->LoadTexturePtr("FACEMASK", TEXTURE_16BIT_PALETTE); @@ -534,15 +431,15 @@ } while ( ++uControlParam < 20 ); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); - uControlParama = 0; - uXa = 8; + uControlParam = 0; + uX = 8; do { - pGUIWindow_CurrentMenu->CreateButton(uXa, 120, 145, 25, 1, 0, UIMSG_PlayerCreationChangeName, uControlParama, 0, "", 0); - uXa += 158; - ++uControlParama; + pGUIWindow_CurrentMenu->CreateButton(uX, 120, 145, 25, 1, 0, UIMSG_PlayerCreationChangeName, uControlParam, 0, "", 0); + uX += 158; + ++uControlParam; } - while ( (signed int)uXa < 640 ); + while ( (signed int)uX < 640 ); pCreationUI_BtnPressLeft[0] = pGUIWindow_CurrentMenu->CreateButton( 10, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 0, 0, "", pTexture_presleft, 0); pCreationUI_BtnPressLeft[1] = pGUIWindow_CurrentMenu->CreateButton(169, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 1, 0, "", pTexture_presleft, 0); @@ -561,39 +458,39 @@ pCreationUI_BtnPressRight2[2] = pGUIWindow_CurrentMenu->CreateButton(391, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoiceNext, 2, 0, "", pTexture_pressrigh, 0); pCreationUI_BtnPressRight2[3] = pGUIWindow_CurrentMenu->CreateButton(549, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoiceNext, 3, 0, "", pTexture_pressrigh, 0); - uControlParamb = 0; - uXb = 8; + uControlParam = 0; + uX = 8; do { - pGUIWindow_CurrentMenu->CreateButton(uXb, 308, 150, v0, 1, 0, UIMSG_48, uControlParamb, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXb, v0 + 308, 150, v0, 1, 0, UIMSG_49, uControlParamb, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXb, 2 * v0 + 308, 150, v0, 1, 0, UIMSG_PlayerCreationRemoveUpSkill, uControlParamb, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXb, 3 * v0 + 308, 150, v0, 1, 0, UIMSG_PlayerCreationRemoveDownSkill, uControlParamb, 0, "", 0); - uXb += 158; - ++uControlParamb; + pGUIWindow_CurrentMenu->CreateButton(uX, 308, 150, v0, 1, 0, UIMSG_48, uControlParam, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uX, v0 + 308, 150, v0, 1, 0, UIMSG_49, uControlParam, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uX, 2 * v0 + 308, 150, v0, 1, 0, UIMSG_PlayerCreationRemoveUpSkill, uControlParam, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uX, 3 * v0 + 308, 150, v0, 1, 0, UIMSG_PlayerCreationRemoveDownSkill, uControlParam, 0, "", 0); + uX += 158; + ++uControlParam; } - while ( (signed int)uXb < 640 ); + while ( (signed int)uX < 640 ); pGUIWindow_CurrentMenu->CreateButton( 5, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 0, '1', "", 0); pGUIWindow_CurrentMenu->CreateButton(163, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 1, '2', "", 0); pGUIWindow_CurrentMenu->CreateButton(321, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 2, '3', "", 0); pGUIWindow_CurrentMenu->CreateButton(479, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 3, '4', "", 0); - uXc = 23; - uControlParamc = 2; + uX = 23; + uControlParam = 2; do { - pGUIWindow_CurrentMenu->CreateButton(uXc, 169, 120, 20, 1, 0, UIMSG_0, uControlParamc - 2, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXc, v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc - 1, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXc, 2 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXc, 3 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc + 1, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXc, 4 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc + 2, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXc, 5 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc + 3, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXc, 6 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc + 4, 0, "", 0); - uControlParamc += 7; - uXc += 158; + pGUIWindow_CurrentMenu->CreateButton(uX, 169, 120, 20, 1, 0, UIMSG_0, uControlParam - 2, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uX, v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParam - 1, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uX, 2 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParam, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uX, 3 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParam + 1, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uX, 4 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParam + 2, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uX, 5 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParam + 3, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uX, 6 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParam + 4, 0, "", 0); + uControlParam += 7; + uX += 158; } - while ( (signed int)uControlParamc < 30 ); + while ( (signed int)uControlParam < 30 ); pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(28, 0, 7, 40); pGUIWindow_CurrentMenu->CreateButton(323, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0, 0, "", 0); @@ -606,17 +503,17 @@ pGUIWindow_CurrentMenu->CreateButton(453, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 8, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(453, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 4, 0, "", 0); - uControlParamd = 0; + uControlParam = 0; do { - uXd = -5; - if ( uControlParamd <= 3 ) - uXd = 0; - pGUIWindow_CurrentMenu->CreateButton(100 * (uControlParamd / 3) + uXd + 17, v0 * (uControlParamd % 3) + 417, 100, v0, 1, 0, UIMSG_PlayerCreationSelectActiveSkill, - uControlParamd, 0, "", 0); - ++uControlParamd; + uX = -5; + if ( uControlParam <= 3 ) + uX = 0; + pGUIWindow_CurrentMenu->CreateButton(100 * (uControlParam / 3) + uX + 17, v0 * (uControlParam % 3) + 417, 100, v0, 1, 0, UIMSG_PlayerCreationSelectActiveSkill, + uControlParam, 0, "", 0); + ++uControlParam; } - while ( uControlParamd < 9 ); + while ( uControlParam < 9 ); pPlayerCreationUI_BtnOK = pGUIWindow_CurrentMenu->CreateButton(580, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickOK, 0, '\r', "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE), 0); pPlayerCreationUI_BtnReset = pGUIWindow_CurrentMenu->CreateButton(527, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickReset, 0, 'C', "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE2), 0); @@ -636,49 +533,30 @@ //----- (00497526) -------------------------------------------------------- bool PlayerCreationUI_Loop() { - //RGBTexture *pTexture; // ebx@1 - //UINT v1; // esi@1 - unsigned int v2; // ecx@3 LONG uMouseX; // edi@6 LONG uMouseY; // eax@6 - GUIButton *pControlsHead; // edx@6 - //unsigned int pNumMessage; // ecx@7 - int pControlParam; // esi@12 + //GUIButton *pControlsHead; // edx@6 + //int pControlParam; // esi@12 signed int v8; // edi@30 int v9; // edx@31 char *v10; // ebx@37 - Player *v11; // esi@38 - //signed int uSpellBookPageCount; // ecx@40 - int v13; // eax@40 - //signed int uSkillIdx; // eax@45 - int v15; // eax@70 - signed int v16; // ecx@70 - //unsigned int v18; // [sp-4h] [bp-84h]@48 ItemGen item; // [sp+Ch] [bp-74h]@37 char v20[32]; // [sp+30h] [bp-50h]@29 - //char v21; // [sp+31h] [bp-4Fh]@29 - //__int16 v22; // [sp+4Dh] [bp-33h]@29 - char v23; // [sp+4Fh] [bp-31h]@29 MSG Msg; // [sp+50h] [bp-30h]@17 POINT v25; // [sp+6Ch] [bp-14h]@6 - bool v26; // [sp+74h] [bp-Ch]@1 - //POINT v24; // [sp+78h] [bp-8h]@6 - //Player *pPlayer; + bool party_not_creation_flag; // [sp+74h] [bp-Ch]@1 - //pTexture = &pTexture_PCX; - v26 = 0; + party_not_creation_flag = false; pTexture_PCX.Release(); pTexture_PCX.Load("makeme.pcx", 0); - v2 = 6; pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; -//LABEL_27: - SetCurrentMenuID((MENU_STATE)v2); + SetCurrentMenuID(MENU_CREATEPARTY); while ( GetCurrentMenuID() == MENU_CREATEPARTY ) { uMouseX = pMouse->GetCursorPos(&v25)->x; uMouseY = pMouse->GetCursorPos(&v25)->y; - pControlsHead = pGUIWindow_CurrentMenu->pControlsHead; + //pControlsHead = pGUIWindow_CurrentMenu->pControlsHead; //does nothing actually /*if ( pControlsHead != (GUIButton *)v1 ) @@ -719,17 +597,13 @@ pRenderer->Present(); if ( uGameState == GAME_FINISHED )//if click Esc in PlayerCreation Window { - v26 = 1; - //v2 = 0; - //goto LABEL_27; + party_not_creation_flag = true; SetCurrentMenuID(MENU_MAIN); continue; } if ( uGameState == GAME_STATE_STARTING_NEW_GAME )//if click OK in PlayerCreation Window { uGameState = GAME_STATE_PLAYING; - //v2 = 1; - //goto LABEL_27; SetCurrentMenuID(MENU_NEWGAME); continue; } @@ -739,19 +613,15 @@ pGUIWindow_CurrentMenu->Release(); pIcons_LOD->RemoveTexturesPackFromTextureList(); - int v1 = 0; memset(v20, 0, 32); - do + for ( int i = 0; i < 32; i++ ) { - v8 = 0; - do + for ( v8 = 0; v8 < 10; ++v8 ) { v9 = rand() % 32; if ( !v20[v9] ) break; - ++v8; } - while ( v8 < 10 ); if ( v8 == 10 ) { v9 = 0; @@ -762,83 +632,75 @@ while ( v20[v9] ); } } - pParty->field_854[v1++] = v9; + pParty->field_854[i] = v9; v20[v9] = 1; } - while ( (signed int)v1 < 32 ); - //v10 = (char *)&pParty->pPlayers[0].sResMagicBase; - + item.Reset(); - //for ( pPlayer = &pParty->pPlayers[0]; pPlayer < &pParty->pPlayers[4]; pPlayer++) for (uint i = 0; i < 4; ++i) { - auto player = &pParty->pPlayers[i]; - //v11 = pPlayer; - if (player->classType == PLAYER_CLASS_KNIGHT) - player->sResMagicBase = 10; - //*((short *)v10 + 400) = 0; - player->pPlayerBuffs[22].uExpireTime = 0; + if (pParty->pPlayers[i].classType == PLAYER_CLASS_KNIGHT) + pParty->pPlayers[i].sResMagicBase = 10; + pParty->pPlayers[i].pPlayerBuffs[22].uExpireTime = 0; for (uint j = 0; j < 9; j++) { - if (player->pActiveSkills[PLAYER_SKILL_FIRE + j]) + if (pParty->pPlayers[i].pActiveSkills[PLAYER_SKILL_FIRE + j]) { - player->lastOpenedSpellbookPage = j; + pParty->pPlayers[i].lastOpenedSpellbookPage = j; break; } } pItemsTable->GenerateItem(2, 40, &item); - player->AddItem2(-1, &item); - //uSkillIdx = 0; - //v24.y = 0; + pParty->pPlayers[i].AddItem2(-1, &item); - player->sHealth = player->GetMaxHealth(); - player->sMana = player->GetMaxMana(); + pParty->pPlayers[i].sHealth = pParty->pPlayers[i].GetMaxHealth(); + pParty->pPlayers[i].sMana = pParty->pPlayers[i].GetMaxMana(); for (uint j = 0; j < 37; ++j) { - if (!player->pActiveSkills[j]) + if (!pParty->pPlayers[i].pActiveSkills[j]) continue; switch (j) { - case PLAYER_SKILL_STAFF: player->AddItem(-1, 61); break; - case PLAYER_SKILL_SWORD: player->AddItem(-1, 1); break; - case PLAYER_SKILL_DAGGER: player->AddItem(-1, 15); break; - case PLAYER_SKILL_AXE: player->AddItem(-1, 23); break; - case PLAYER_SKILL_SPEAR: player->AddItem(-1, 31); break; - case PLAYER_SKILL_BOW: player->AddItem(-1, 47); break; - case PLAYER_SKILL_MACE: player->AddItem(-1, 50); break; + case PLAYER_SKILL_STAFF: pParty->pPlayers[i].AddItem(-1, 61); break; + case PLAYER_SKILL_SWORD: pParty->pPlayers[i].AddItem(-1, 1); break; + case PLAYER_SKILL_DAGGER: pParty->pPlayers[i].AddItem(-1, 15); break; + case PLAYER_SKILL_AXE: pParty->pPlayers[i].AddItem(-1, 23); break; + case PLAYER_SKILL_SPEAR: pParty->pPlayers[i].AddItem(-1, 31); break; + case PLAYER_SKILL_BOW: pParty->pPlayers[i].AddItem(-1, 47); break; + case PLAYER_SKILL_MACE: pParty->pPlayers[i].AddItem(-1, 50); break; case PLAYER_SKILL_BLASTER: Error("No blasters at startup :p"); - case PLAYER_SKILL_SHIELD: player->AddItem(-1, 84); break; - case PLAYER_SKILL_LEATHER: player->AddItem(-1, 66); break; - case PLAYER_SKILL_CHAIN: player->AddItem(-1, 71); break; - case PLAYER_SKILL_PLATE: player->AddItem(-1, 76); break; + case PLAYER_SKILL_SHIELD: pParty->pPlayers[i].AddItem(-1, 84); break; + case PLAYER_SKILL_LEATHER: pParty->pPlayers[i].AddItem(-1, 66); break; + case PLAYER_SKILL_CHAIN: pParty->pPlayers[i].AddItem(-1, 71); break; + case PLAYER_SKILL_PLATE: pParty->pPlayers[i].AddItem(-1, 76); break; case PLAYER_SKILL_FIRE: - player->AddItem(-1, 0x191); - player->spellbook.pFireSpellbook.bIsSpellAvailable[0] = true; + pParty->pPlayers[i].AddItem(-1, 0x191); + pParty->pPlayers[i].spellbook.pFireSpellbook.bIsSpellAvailable[0] = true; break; case PLAYER_SKILL_AIR: - player->AddItem(-1, 0x19C); - player->spellbook.pAirSpellbook.bIsSpellAvailable[0] = true; + pParty->pPlayers[i].AddItem(-1, 0x19C); + pParty->pPlayers[i].spellbook.pAirSpellbook.bIsSpellAvailable[0] = true; break; case PLAYER_SKILL_WATER: - player->AddItem(-1, 0x1A7); - player->spellbook.pWaterSpellbook.bIsSpellAvailable[0] = true; + pParty->pPlayers[i].AddItem(-1, 0x1A7); + pParty->pPlayers[i].spellbook.pWaterSpellbook.bIsSpellAvailable[0] = true; break; case PLAYER_SKILL_EARTH: - player->AddItem(-1, 0x1B2); - player->spellbook.pEarthSpellbook.bIsSpellAvailable[0] = true; + pParty->pPlayers[i].AddItem(-1, 0x1B2); + pParty->pPlayers[i].spellbook.pEarthSpellbook.bIsSpellAvailable[0] = true; break; case PLAYER_SKILL_SPIRIT: - player->AddItem(-1, 0x1BD); - player->spellbook.pSpiritSpellbook.bIsSpellAvailable[0] = true; + pParty->pPlayers[i].AddItem(-1, 0x1BD); + pParty->pPlayers[i].spellbook.pSpiritSpellbook.bIsSpellAvailable[0] = true; break; case PLAYER_SKILL_MIND: - player->AddItem(-1, 0x1C8); - player->spellbook.pMindSpellbook.bIsSpellAvailable[0] = true; + pParty->pPlayers[i].AddItem(-1, 0x1C8); + pParty->pPlayers[i].spellbook.pMindSpellbook.bIsSpellAvailable[0] = true; break; case PLAYER_SKILL_BODY: - player->AddItem(-1, 0x1D3); - player->spellbook.pBodySpellbook.bIsSpellAvailable[0] = true; + pParty->pPlayers[i].AddItem(-1, 0x1D3); + pParty->pPlayers[i].spellbook.pBodySpellbook.bIsSpellAvailable[0] = true; break; case PLAYER_SKILL_LIGHT: case PLAYER_SKILL_DARK: @@ -851,23 +713,23 @@ case PLAYER_SKILL_PERCEPTION: case PLAYER_SKILL_TRAP_DISARM: case PLAYER_SKILL_LEARNING: - player->AddItem(-1, 0xDC); - player->AddItem(-1, 5 * (rand() % 3 + 40)); + pParty->pPlayers[i].AddItem(-1, 0xDC); + pParty->pPlayers[i].AddItem(-1, 5 * (rand() % 3 + 40)); break; - case PLAYER_SKILL_DODGE: player->AddItem(-1, 115); break; - case PLAYER_SKILL_UNARMED: player->AddItem(-1, 110); break; + case PLAYER_SKILL_DODGE: pParty->pPlayers[i].AddItem(-1, 115); break; + case PLAYER_SKILL_UNARMED: pParty->pPlayers[i].AddItem(-1, 110); break; default: break; } for (uint k = 0; k < 138; k++) { - if (player->pOwnItems[k].uItemID) - player->pOwnItems[k].SetIdentified(); + if (pParty->pPlayers[i].pOwnItems[k].uItemID) + pParty->pPlayers[i].pOwnItems[k].SetIdentified(); } } } pAudioPlayer->StopChannels(-1, -1); - return v26; + return party_not_creation_flag; } \ No newline at end of file
--- a/UI/UIPopup.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/UI/UIPopup.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -29,151 +29,96 @@ //----- (004179BC) -------------------------------------------------------- -void CharacterUI_DrawTooltip(const char *a1, const char *a2) +void CharacterUI_DrawTooltip(const char *Title, const char *content) { - //const char *v2; // ebx@1 - //const char *v3; // edi@1 - //unsigned int v4; // eax@1 - GUIWindow Dst; // [sp+Ch] [bp-5Ch]@1 + GUIWindow popup_window; // [sp+Ch] [bp-5Ch]@1 POINT v6; // [sp+60h] [bp-8h]@1 - //v2 = a2; - //v3 = a1; - memset(&Dst, 0, 0x54u); - Dst.uFrameWidth = 384; - Dst.uFrameHeight = 256; - Dst.uFrameX = 128; - Dst.uFrameY = pMouse->GetCursorPos(&v6)->y + 30; - Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(a2, &Dst, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24; - Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; - Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; - Dst.DrawMessageBox(0); - Dst.uFrameX += 12; - Dst.uFrameWidth -= 24; - Dst.uFrameY += 12; - Dst.uFrameHeight -= 12; - Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; - Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; - sprintf(pTmpBuf.data(), "\f%05d%s\f00000\n", ui_character_tooltip_header_default_color, a1); - Dst.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3u); - Dst.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, a2, 0, 0, 0); + memset(&popup_window, 0, 0x54u); + popup_window.uFrameWidth = 384; + popup_window.uFrameHeight = 256; + popup_window.uFrameX = 128; + popup_window.uFrameY = pMouse->GetCursorPos(&v6)->y + 30; + popup_window.uFrameHeight = pFontSmallnum->CalcTextHeight(content, &popup_window, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24; + popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1; + popup_window.uFrameW = popup_window.uFrameY + popup_window.uFrameHeight - 1; + popup_window.DrawMessageBox(0); + + popup_window.uFrameX += 12; + popup_window.uFrameWidth -= 24; + popup_window.uFrameY += 12; + popup_window.uFrameHeight -= 12; + popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1; + popup_window.uFrameW = popup_window.uFrameY + popup_window.uFrameHeight - 1; + sprintf(pTmpBuf.data(), "\f%05d%s\f00000\n", ui_character_tooltip_header_default_color, Title); + popup_window.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3); + popup_window.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, content, 0, 0, 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 +{ + unsigned int uNumTiles; // [sp+2Ch] [bp-Ch]@6 + unsigned int coord_x; // [sp+2Ch] [bp-Ch]@3 + unsigned int coord_y; // [sp+34h] [bp-4h]@5 - v4 = uY; - a2a = uX; - a4 = uX + uWidth; - pRenderer->SetTextureClipRect(uX, v4, uX + uWidth, v4 + uHeight); - v5 = pIcons_LOD->GetTexture(uTextureID_Parchment); - uTileWidth = v5->uTextureWidth; - v13 = v5->uTextureWidth; - uTileHeight = v5->uTextureHeight; - if ( v5->uTextureWidth && v5->uTextureHeight) + pRenderer->SetTextureClipRect(uX, uY, uX + uWidth, uY + uHeight); + if ( pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth && pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureHeight) + { + uNumTiles = uWidth / pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth; + if ( uWidth % pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth ) + ++uNumTiles; + coord_y = uY; + for ( uint j = 0; j <= uHeight / pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureHeight; j++ ) { - 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, pIcons_LOD->GetTexture(uTextureID_5076AC)); - pRenderer->DrawTextureTransparent(a2a, a5a, pIcons_LOD->GetTexture(uTextureID_5076B4)); - pRenderer->DrawTextureTransparent(a4 - 32, v4, pIcons_LOD->GetTexture(uTextureID_5076A8)); - pRenderer->DrawTextureTransparent(a4 - 32, a5a, pIcons_LOD->GetTexture(uTextureID_5076B0)); - uNumXTilesb = a2a + 32; - v22 = v4 + uHeight - 10; - if ( (signed int)uWidth > 64 ) - { - pRenderer->SetTextureClipRect(a2a + 32, v4, a4 - 32, v4 + uHeight); - pRenderer->DrawTextureTransparent(uNumXTilesb, v4, pIcons_LOD->GetTexture(uTextureID_507698)); - pRenderer->DrawTextureTransparent(uNumXTilesb, v22, pIcons_LOD->GetTexture(uTextureID_5076A4)); - if ( (signed int)uWidth > 512 ) - { - pRenderer->DrawTextureTransparent(a2a + 544, v4, pIcons_LOD->GetTexture(uTextureID_507698)); - pRenderer->DrawTextureTransparent(a2a + 544, v22, pIcons_LOD->GetTexture(uTextureID_5076A4)); - } - } - v9 = v4 + 32; - if ( (signed int)uHeight > 64 ) - { - pRenderer->SetTextureClipRect(a2a, v9, a4, a5a); - pRenderer->DrawTextureTransparent(a2a, v9, pIcons_LOD->GetTexture(uTextureID_5076A0)); - pRenderer->DrawTextureTransparent(a4 - 10, v9, pIcons_LOD->GetTexture(uTextureID_50769C)); - } - pRenderer->ResetTextureClipRect(); - } + coord_x = uX - pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth; + for ( uint i = uNumTiles + 1; i; --i ) + { + coord_x += pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth; + pRenderer->DrawTextureIndexed(coord_x, coord_y, pIcons_LOD->GetTexture(uTextureID_Parchment)); + } + coord_y += pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureHeight; } - - + pRenderer->DrawTextureTransparent(uX, uY, pIcons_LOD->GetTexture(uTextureID_5076AC)); + pRenderer->DrawTextureTransparent(uX, uY + uHeight - 32, pIcons_LOD->GetTexture(uTextureID_5076B4)); + pRenderer->DrawTextureTransparent(uX + uWidth - 32, uY, pIcons_LOD->GetTexture(uTextureID_5076A8)); + pRenderer->DrawTextureTransparent(uX + uWidth - 32, uY + uHeight - 32, pIcons_LOD->GetTexture(uTextureID_5076B0)); + if ( uWidth > 64 ) + { + pRenderer->SetTextureClipRect(uX + 32, uY, uX + uWidth - 32, uY + uHeight); + pRenderer->DrawTextureTransparent(uX + 32, uY, pIcons_LOD->GetTexture(uTextureID_507698)); + pRenderer->DrawTextureTransparent(uX + 32, uY + uHeight - 10, pIcons_LOD->GetTexture(uTextureID_5076A4)); + if ( uWidth > 512 ) + { + pRenderer->DrawTextureTransparent(uX + 544, uY, pIcons_LOD->GetTexture(uTextureID_507698)); + pRenderer->DrawTextureTransparent(uX + 544, uY + uHeight - 10, pIcons_LOD->GetTexture(uTextureID_5076A4)); + } + } + if ( uHeight > 64 ) + { + pRenderer->SetTextureClipRect(uX, uY + 32, uX + uWidth, uY + uHeight - 32); + pRenderer->DrawTextureTransparent(uX, uY + 32, pIcons_LOD->GetTexture(uTextureID_5076A0)); + pRenderer->DrawTextureTransparent(uX + uWidth - 10, uY + 32, pIcons_LOD->GetTexture(uTextureID_50769C)); + } + pRenderer->ResetTextureClipRect(); + } +} //----- (0041D895) -------------------------------------------------------- void GameUI_DrawItemInfo( struct ItemGen* inspect_item ) { ItemGen *v1; // esi@1 unsigned int v2; // eax@3 - //char *v3; // edi@5 - //unsigned int v4; // eax@5 - //unsigned int v5; // esi@5 signed int v6; // eax@5 int v7; // edx@5 - //unsigned int v9; // eax@12 char v10; // zf@16 ItemGen *v11; // eax@16 ItemGen *v12; // eax@25 - //unsigned int v13; // ecx@32 - //unsigned int v14; // eax@32 - //Render *v15; // edi@33 const char *v16; // eax@34 int v17; // eax@36 int v18; // esi@37 unsigned __int16 v19; // ax@37 - //char v20; // al@40 char v21; // al@44 - //char v22; // al@48 - //char v23; // al@51 int v24; // eax@52 int v25; // eax@57 int v26; // eax@60 @@ -193,47 +138,31 @@ GUIFont *v40; // edx@113 signed int v41; // [sp-20h] [bp-298h]@113 int v42; // [sp-1Ch] [bp-294h]@113 - //char *v43; // [sp-18h] [bp-290h]@46 unsigned int v44; // [sp-18h] [bp-290h]@113 - //int v45; // [sp-14h] [bp-28Ch]@46 const char *v46; // [sp-14h] [bp-28Ch]@58 char *v47; // [sp-14h] [bp-28Ch]@110 - //char *v48; // [sp-10h] [bp-288h]@46 const char *v49; // [sp-10h] [bp-288h]@56 char *v50; // [sp-10h] [bp-288h]@58 int v51; // [sp-10h] [bp-288h]@110 const char *v52; // [sp-Ch] [bp-284h]@36 - //int v53; // [sp-Ch] [bp-284h]@46 char *v54; // [sp-Ch] [bp-284h]@56 int v55; // [sp-Ch] [bp-284h]@58 int v56; // [sp-Ch] [bp-284h]@110 unsigned int v57; // [sp-8h] [bp-280h]@36 - //int v58; // [sp-8h] [bp-280h]@46 int v59; // [sp-8h] [bp-280h]@56 int v60; // [sp-8h] [bp-280h]@58 unsigned int v61; // [sp-8h] [bp-280h]@110 char out_text[300]; // [sp+8h] [bp-270h]@40 - //char Dest[100]; // [sp+6Ch] [bp-20Ch]@40 - //char v64[100]; // [sp+D0h] [bp-1A8h]@40 char v65[120]; // [sp+134h] [bp-144h]@92 char Source[40]; // [sp+1ACh] [bp-CCh]@49 stru351_summoned_item v67; - //int v67; // [sp+1D4h] [bp-A4h]@91 - //int v68; // [sp+1D8h] [bp-A0h]@106 - //int v69; // [sp+1DCh] [bp-9Ch]@101 - //int v70; // [sp+1E0h] [bp-98h]@97 - //int v71; // [sp+1E8h] [bp-90h]@93 - //int v72; // [sp+1ECh] [bp-8Ch]@91 int var88; // [sp+1F0h] [bp-88h]@1 Texture *v73; // [sp+1F4h] [bp-84h]@5 - //unsigned int v75; // [sp+1F8h] [bp-80h]@5 - //char *v76; // [sp+1FCh] [bp-7Ch]@5 int v77; // [sp+200h] [bp-78h]@12 int v78; // [sp+204h] [bp-74h]@5 GUIWindow wHintWindow; // [sp+208h] [bp-70h]@2 POINT a2; // [sp+25Ch] [bp-1Ch]@2 int v81; // [sp+264h] [bp-14h]@5 - // GUIFont *pFontComic; // [sp+268h] [bp-10h]@1 PlayerSpeech v83; // [sp+26Ch] [bp-Ch]@18 char* v84; int v85; @@ -1748,10 +1677,8 @@ break; case 26: // Class description { - auto v24 = pClassNames[pPlayers[uActiveCharacter]->classType]; - auto v7 = pClassDescriptions[pPlayers[uActiveCharacter]->classType]; - if (v7 && v24) - CharacterUI_DrawTooltip(v24, v7); + if (pClassDescriptions[pPlayers[uActiveCharacter]->classType] && pClassNames[pPlayers[uActiveCharacter]->classType]) + CharacterUI_DrawTooltip(pClassNames[pPlayers[uActiveCharacter]->classType], pClassDescriptions[pPlayers[uActiveCharacter]->classType]); } break;
--- a/mm7_5.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/mm7_5.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -673,10 +673,10 @@ pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = 1; pCurrentScreen = SCREEN_VIDEO_OPTIONS; - uTextureID_507C10 = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE); - uTextureID_507C14 = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE); - uTextureID_507C18 = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE); - uTextureID_507C1C = pIcons_LOD->LoadTexture("opvdH-tn", TEXTURE_16BIT_PALETTE); + optvid_base_texture_id = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE); + bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE); + us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE); + tinting_texture_id = pIcons_LOD->LoadTexture("opvdH-tn", TEXTURE_16BIT_PALETTE); uTextureID_507C20 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE); uTextureID_507C24 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE); pTextureIDs_GammaPositions[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE); @@ -689,9 +689,9 @@ pTextureIDs_GammaPositions[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE); pTextureIDs_GammaPositions[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE); pTextureIDs_GammaPositions[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE); - uTextureID_507C50 = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE); - uTextureID_507C54 = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE); - uTextureID_507C58 = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE); + not_available_bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE); + not_available_us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE); + not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_VideoOptions, 0, 0); pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0); if ( pRenderer->pRenderD3D ) @@ -3569,7 +3569,7 @@ break; case UIMSG_PlayerCreationRemoveDownSkill: uPlayerCreationUI_SelectedCharacter = pParam; - __debugbreak(); + //__debugbreak(); pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(3)
--- a/mm7_data.cpp Sun Sep 22 10:44:42 2013 +0200 +++ b/mm7_data.cpp Sun Sep 22 10:51:08 2013 +0200 @@ -917,7 +917,7 @@ int dword_506988_uY; // weak int dword_50698C_uX; // weak int uGameMenuUI_CurentlySelectedKeyIdx; // 506E68 -std::array<unsigned int, 27> pPrevVirtualCidesMapping; +std::array<unsigned int, 28> pPrevVirtualCidesMapping; int KeyboardPageNum; // weak int uRestUI_FoodRequiredToRest; int dword_506F14; // weak
--- a/mm7_data.h Sun Sep 22 10:44:42 2013 +0200 +++ b/mm7_data.h Sun Sep 22 10:51:08 2013 +0200 @@ -599,7 +599,7 @@ extern int dword_50698C_uX; // weak extern int uGameMenuUI_CurentlySelectedKeyIdx; // 506E68 extern std::array<bool, 28> GameMenuUI_InvaligKeyBindingsFlags; // 506E6C -extern std::array<unsigned int, 27> pPrevVirtualCidesMapping; +extern std::array<unsigned int, 28> pPrevVirtualCidesMapping; extern int KeyboardPageNum; // weak extern int uRestUI_FoodRequiredToRest; extern int dword_506F14; // weak @@ -1100,7 +1100,6 @@ unsigned int SearchActorByID(unsigned int *pTotalActors, unsigned int a2); void PrepareArcomage(); unsigned short TargetColor(unsigned __int16 r, unsigned __int16 g, unsigned __int16 b); // idb -void CallRenderPresent(); void DoBlt_Copy(unsigned __int16 *pPixels); // idb void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue); void __fastcall ZBuffer_DoFill(int *pZBuffer, struct Texture *pTex, int uZValue); @@ -1275,10 +1274,10 @@ bool __fastcall HSV2RGB(float *a1, float *a2, float *a3, float a4, float a5, float a6); void __fastcall RGB2HSV(float *a1, float *a2, float a3, float a4, float a5, float *a6); unsigned int ReplaceHSV(unsigned int uColor, float a2, float gamma, float a4); -int PlayerCreation_Choose4Skills(); +bool PlayerCreation_Choose4Skills(); int PlayerCreation_GetUnspentAttributePointCount(); void LoadPlayerPortraintsAndVoices(); -int __fastcall ReloadPlayerPortraits(int, int); // weak +void ReloadPlayerPortraits(int player_id, int face_id); void sub_491E3A(); int CycleCharacter(bool backwards); void __fastcall Rest(unsigned int uHoursToSleep);