Mercurial > mm7
changeset 1244:6279bf7a4d1a
Merge
author | Grumpy7 |
---|---|
date | Sun, 09 Jun 2013 23:53:01 +0200 |
parents | 766ec1e7f4ea (current diff) 30df39a3aa92 (diff) |
children | e161d8a5a529 d3bf0d4fb753 7adc8b9b6a25 |
files | mm7_data.cpp mm7_data.h |
diffstat | 9 files changed, 457 insertions(+), 770 deletions(-) [+] |
line wrap: on
line diff
--- a/Arcomage.cpp Sun Jun 09 23:51:53 2013 +0200 +++ b/Arcomage.cpp Sun Jun 09 23:53:01 2013 +0200 @@ -46,16 +46,16 @@ void DrawPlayersTowers(); void DrawPlayersWall(); void DrawCards(); -void __fastcall am_40B76F(int a1); +void DrawCardAnimation(int a1); int GetPlayerHandCardCount(int player_num); signed int DrawCardsRectangles(int player_num); bool am_40BCFB(int player_num, signed int card_slot_index); bool PlayCard(int player_num, signed int card_slot_num); bool CanCardBePlayed(int player_num, int hand_card_indx); -void __fastcall am_40BF77(int a1, unsigned int uCardID); // idb +void ApplyCardToPlayer(int player_num, unsigned int uCardID); // idb int am_40D2B4(POINT* a1, int a2); // weak -int __fastcall am_40D402(int, int); // weak -int __cdecl GameResultsApply(); +int am_40D402(int player_num, int damage); // weak +void GameResultsApply(); void pPrimaryWindow_draws_text(int a1, const char *pText, POINT *pXY); void __thiscall am_BeginScene(unsigned __int16 *pPcxPixels, int a2, int a3); // idb @@ -135,8 +135,9 @@ #pragma pack(pop) - -char am_byte_4E185D; // weak +char byte_4E185C = 1; // weak +char am_byte_4E185D = 1; // weak +char byte_4E185E = 1; // weak int start_tower_height; int start_wall_height; @@ -1714,7 +1715,7 @@ char card_taken_flags[DECK_SIZE]; // [sp+8h] [bp-6Ch]@1 int i,j; - ArcomageGame::PlaySound(0x14u); + ArcomageGame::PlaySound(20); memset(deckMaster.cardsInUse, 0,DECK_SIZE ); memset(card_taken_flags, 0, DECK_SIZE); @@ -1859,26 +1860,24 @@ else { //nullsub_1(); - v11.x = 0; - v11.y = 0; - // inv_strcpy("Ρλεδ", Dest); - v0 = 0; + // v11.x = 0; + // v11.y = 0; + strcpy(Dest,"The Next Player is: ");//"Ρλεδ" + // v0 = 0; v11.y = 200; - v11.x = 320 - 12 * v0 / 2; + v11.x = 320; // - 12 * v0 / 2; pPrimaryWindow_draws_text(-1, Dest, &v11); am_byte_4FAA75 = 1; - v1 = current_player_num + 1; - v3 = __OFSUB__(current_player_num + 1, 2); - v2 = current_player_num++ - 1 < 0; - if ( !(v2 ^ v3) ) + v1 = ++current_player_num; + if ( v1 >= 2 ) { v1 = 0; current_player_num = 0; } strcpy(Dest, am_Players[v1].pPlayerName); - v4 = 0; + // v4 = 0; v11.y = 260; - v11.x = 320 - 12 * v4 / 2; + v11.x = 320;// - 12 * v4 / 2; pPrimaryWindow_draws_text(-1, Dest, &v11); /* v6.left = 0; v6.right = 640; @@ -1953,7 +1952,7 @@ int v1; // ebp@0 unsigned __int64 v2; // qax@3 unsigned __int64 v3; // kr00_8@3 - int v4; // ecx@17 + int v5; // esi@67 char Dest[100]; // [sp+8h] [bp-A8h]@67 int v8; // [sp+6Ch] [bp-44h]@3 @@ -2008,18 +2007,17 @@ pArcomageGame->field_F4 = 1; break; } - v4 = current_player_num; + if (am_Players[current_player_num].IsHisTurn != 1 && !byte_4FAA00 && !byte_4FAA2E && !byte_4FAA2D ) { if ( am_byte_4FAA75 ) am_byte_4FAA76 = 1; am_408BB4(current_player_num); - v4 = current_player_num; byte_4FAA2E = 1; } if ( amuint_4FAA4C != -1 && amuint_4FAA38 > 10 ) amuint_4FAA38 = 10; - if ( byte_4FAA2E || byte_4FAA2D ||am_Players[v4].IsHisTurn != 1 ) + if ( byte_4FAA2E || byte_4FAA2D ||am_Players[current_player_num].IsHisTurn != 1 ) { pArcomageGame->field_F6 = 1; if ( byte_4FAA2D ) @@ -2101,39 +2099,39 @@ } } //nullsub_1(); - if ( false ) - { - if ( !v15 ) - { - //nullsub_1(); - v15 = 1; - } - } - else - { - v15 = 0; - } - if ( false ) - { - //nullsub_1(); - //nullsub_1(); - // assert(false && "Invalid strcpy params"); - // inv_strcpy(nullptr, Dest); - v5 = 0;//unk::const_0(&unk_4E19FC, 0); - //nullsub_1(); - if ( v5 == 1 ) - { - pAudioPlayer->StopChannels(-1, -1); - v16 = 1; - pArcomageGame->field_F4 = 1; - dword_4FAA68 = 0; - } - /*v10[0] = 0; - v10[2] = 640; - v10[1] = 0; - v10[3] = 480;*/ - //nullsub_1(); - } + //if ( false ) + //{ + // if ( !v15 ) + // { + // //nullsub_1(); + // v15 = 1; + // } + //} + //else + //{ + // v15 = 0; + // } + //if ( false ) + //{ + // //nullsub_1(); + // //nullsub_1(); + // // assert(false && "Invalid strcpy params"); + // // inv_strcpy(nullptr, Dest); + // v5 = 0;//unk::const_0(&unk_4E19FC, 0); + // //nullsub_1(); + // if ( v5 == 1 ) + // { + // pAudioPlayer->StopChannels(-1, -1); + // v16 = 1; + // pArcomageGame->field_F4 = 1; + // dword_4FAA68 = 0; + // } + // /*v10[0] = 0; + // v10[2] = 640; + // v10[1] = 0; + // v10[3] = 480;*/ + // //nullsub_1(); + //} if ( dword_4FABB8 != DrawCardsRectangles(player_num) ) { dword_4FABB8 = DrawCardsRectangles(player_num); @@ -2182,7 +2180,7 @@ am_EndScene(); am_BeginScene(pArcomageGame->pSpritesPixels, -1, 1); - am_40B76F(a1); + DrawCardAnimation(a1); for( int i=0; i<10; ++i) { @@ -2270,7 +2268,7 @@ pTargetXY.y = 13; Blt_Chroma(&pSrcRect, &pTargetXY, pArcomageGame->field_54, 2); - //tower heigth rectangle + //tower height rectangle pSrcRect.left = 234; pSrcRect.right = 283; pSrcRect.top = 166; @@ -2283,7 +2281,7 @@ pTargetXY.y = 296; Blt_Chroma(&pSrcRect, &pTargetXY, pArcomageGame->field_54, 2); - //wall heigth rectangle + //wall height rectangle pSrcRect.left = 192; pSrcRect.right = 234; pSrcRect.top = 166; @@ -2632,15 +2630,13 @@ POINT pTargetXY; // [sp+14h] [bp-8h]@4 v0 = am_Players[0].wall_height; -if ( am_Players[0].wall_height <= 100 ) - { - if ( am_Players[0].wall_height <= 0 ) - goto LABEL_5; - } -else - { + +if ( am_Players[0].wall_height > 100 ) v0 = 100; - } + +if ( am_Players[0].wall_height > 0 ) + { + pSrcXYZW.top = 0; pSrcXYZW.left = 843; v1 = 200 * v0 / 100; @@ -2649,18 +2645,16 @@ pTargetXY.x = 177; pTargetXY.y = 297 - v1; Blt_Chroma(&pSrcXYZW, &pTargetXY, pArcomageGame->field_54, 2); - -LABEL_5: + } + v3 = am_Players[1].wall_height; -if ( am_Players[1].wall_height <= 100 ) - { +if ( am_Players[1].wall_height > 100 ) + v3 = 100; + + if ( am_Players[1].wall_height <= 0 ) - return; - } -else - { - v3 = 100; - } + { + pSrcXYZW.top = 0; pSrcXYZW.left = 843; v4 = 200 * v3 / 100; @@ -2669,7 +2663,7 @@ pTargetXY.x = 439; pTargetXY.y = 297 - v4; Blt_Chroma(&pSrcXYZW, &pTargetXY, pArcomageGame->field_54, 2); - + } } //----- (0040B4B9) -------------------------------------------------------- @@ -2710,7 +2704,7 @@ while ( v2 < v0 ) { v3 = current_player_num; - if ( am_byte_4E185D != 0 ) + if ( am_byte_4E185D) { pTargetXY.x += am_Players[current_player_num].arr_6C[v2].field_0 ; @@ -2746,7 +2740,7 @@ v3 = current_player_num; pTargetXY.x += v24 + 96; LABEL_15: - if ( am_byte_4E185D != 0 ) + if ( am_byte_4E185D ) { pTargetXY.x -= am_Players[current_player_num].arr_6C[v2].field_0 ; pTargetXY.y -= am_Players[current_player_num].arr_6C[v2].field_4 ; @@ -2815,8 +2809,8 @@ //----- (0040B76F) -------------------------------------------------------- -void __fastcall am_40B76F(int a1) -{ +void DrawCardAnimation( int animation_stage ) + { int v1; // eax@3 int v2; // eax@3 @@ -2824,7 +2818,7 @@ int v4; // eax@4 POINT *v5; // edx@6 RECT *v6; // ecx@6 -Acromage_st1 *v7; // ebx@11 + int v8; // eax@15 Acromage_st1 *v9; // ecx@15 int v10; // ecx@19 @@ -2845,7 +2839,7 @@ POINT pTargetXY; // [sp+1Ch] [bp-Ch]@20 int v26; // [sp+24h] [bp-4h]@1 -v26 = a1; +v26 = animation_stage; if ( amuint_4FAA4C != -1 ) { if ( amuint_4FAA38 >= 9 ) @@ -2868,36 +2862,35 @@ } am_uint_4FAA44_blt_xy.y += v4; am_uint_4FAA44_blt_xy.x += amuint_4FAA3C_blt_xy.x; - pSrcXYZW.top = 0; + amuint_4FAA3C_blt_xy.y = v4; + pSrcXYZW.left = 192; + pSrcXYZW.top = 0; pSrcXYZW.right = 288; pSrcXYZW.bottom = 128; - v5 = &am_uint_4FAA44_blt_xy; - v6 = &pSrcXYZW; - Blt_Copy(v6, v5, 2); - goto LABEL_11; + Blt_Copy(&pSrcXYZW, &am_uint_4FAA44_blt_xy, 2); } - pSrcXYZW.top = 0; - v6 = &pSrcXYZW; - v5 = &am_uint_4FAA44_blt_xy; + else + { + + + pSrcXYZW.left = 192; + pSrcXYZW.top = 0; + pSrcXYZW.right = 288; pSrcXYZW.bottom = 128; - pSrcXYZW.right = 288; - pSrcXYZW.left = 192; - if ( amuint_4FAA38 ) - { - am_uint_4FAA44_blt_xy.x += amuint_4FAA3C_blt_xy.x; - am_uint_4FAA44_blt_xy.y += amuint_4FAA3C_blt_xy.y; - Blt_Copy(v6, v5, 2); - goto LABEL_11; - } am_uint_4FAA44_blt_xy.x += amuint_4FAA3C_blt_xy.x; am_uint_4FAA44_blt_xy.y += amuint_4FAA3C_blt_xy.y; Blt_Copy(&pSrcXYZW, &am_uint_4FAA44_blt_xy, 2); + if ( !amuint_4FAA38 ) + { + amuint_4FAA4C = -1; + } + } } LABEL_11: -v7 = shown_cards; + if ( uCardID != -1 ) { if ( v26 <= 10 ) @@ -2942,22 +2935,21 @@ Blt_Copy(&pSrcXYZW, &amuint_4FAA5C_blt_xy, 0); } } -v14 = played_card_id; + if ( played_card_id != -1 ) { v15 = v26; if ( v15 > 15.0 ) { pArcomageGame->GetCardRect(played_card_id, &pSrcXYZW); - v16 = &amuint_4FAA5C_blt_xy; amuint_4FAA5C_blt_xy.x += amuint_4FAA54_blt_xy.x; amuint_4FAA5C_blt_xy.y += amuint_4FAA54_blt_xy.y; - Blt_Copy(&pSrcXYZW, v16, 2); + Blt_Copy(&pSrcXYZW, &amuint_4FAA5C_blt_xy, 2); return; } if ( v15 == 15.0 ) { - am_40BF77(current_player_num, played_card_id); + ApplyCardToPlayer(current_player_num, played_card_id); pArcomageGame->GetCardRect(played_card_id, &pSrcXYZW); pTargetXY.x = 272; pTargetXY.y = 173; @@ -3011,12 +3003,13 @@ if ( !v18 ) { - pArcomageGame->GetCardRect(v14, &pSrcXYZW); + pArcomageGame->GetCardRect(played_card_id, &pSrcXYZW); pTargetXY.x = 272; pTargetXY.y = 173; Blt_Copy(&pSrcXYZW, &pTargetXY, 2); return; } + pArcomageGame->GetCardRect(played_card_id, &pSrcXYZW); for (v19=0; v19<10; ++v19) { @@ -3024,240 +3017,14 @@ { shown_cards[v19].uCardId = played_card_id; break; - } - + } } - /* v19 = 0; - while ( v7->uCardId != -1 ) - { - ++v7; - ++v19; - if ( v7 >= &dword_4FABB8 ) - goto LABEL_46; - } - shown_cards[v19].uCardId = played_card_id; - LABEL_46:*/ - - pTargetXY.x = shown_cards[v19].field_8.x; + pTargetXY.x = shown_cards[v19].field_8.x; pTargetXY.y = shown_cards[v19].field_8.y; Blt_Copy(&pSrcXYZW, &pTargetXY, 0); played_card_id = -1; } - - -// int v1; // eax@3 -// int v2; // eax@3 -// int v3; // esi@4 -// int v4; // eax@4 -// int *v5; // edx@6 -// int *v6; // ecx@6 -// signed int v7; // ebx@11 -// int v8; // eax@15 -// signed int v9; // ecx@15 -// int v10; // eax@20 -// int v11; // ecx@20 -// int v12; // eax@20 -// unsigned int v13; // ecx@21 -// double v14; // st7@22 -// int *v15; // edx@23 -// int v16; // eax@32 -// char v17; // zf@37 -// int v18; // eax@41 -// int v19; // eax@46 -// int v20; // ecx@46 -// int v21; // eax@46 -// int v22; // [sp-4h] [bp-2Ch]@6 -// int v23; // [sp-4h] [bp-2Ch]@28 -// int pSrcXYZW[4]; // [sp+Ch] [bp-1Ch]@6 -// int pTargetXY[2]; // [sp+1Ch] [bp-Ch]@20 -// int v26; // [sp+24h] [bp-4h]@1 -// -// v26 = a1; -// if ( amuint_4FAA4C != -1 ) -// { -// if ( amuint_4FAA38 >= 9 ) -// { -// am_uint_4FAA44_blt_xy[1] = 18; -// am_uint_4FAA44_blt_xy[0] = 120; -// v1 = GetPlayerHandCardCount(amuint_4FAA6C); -// v2 = (640 - 96 * v1) / v1 + 96; -// if ( am_byte_4E185D ) -// { -// v3 = 188 * amuint_4FAA6C + 8 * amuint_4FAA4C; -// amuint_4FAA3C_blt_xy[0] = (amuint_4FAA4C * v2 + *(int *)((char *)stru_505708[0].arr_6C[0] + v3) - 120) / 10; -// v4 = (*(int *)((char *)&stru_505708[0].arr_6C[0][1] + v3) + 309) / 10; -// } -// else -// { -// amuint_4FAA3C_blt_xy[0] = (amuint_4FAA4C * v2 - 120) / 10; -// v4 = 30; -// } -// am_uint_4FAA44_blt_xy[1] += v4; -// am_uint_4FAA44_blt_xy[0] += amuint_4FAA3C_blt_xy[0]; -// pSrcXYZW[1] = 0; -// amuint_4FAA3C_blt_xy[1] = v4; -// pSrcXYZW[0] = 192; -// pSrcXYZW[2] = 288; -// pSrcXYZW[3] = 128; -// v5 = am_uint_4FAA44_blt_xy; -// v6 = pSrcXYZW; -// goto LABEL_7; -// } -// pSrcXYZW[1] = 0; -// v6 = pSrcXYZW; -// v5 = am_uint_4FAA44_blt_xy; -// -// pSrcXYZW[3] = 128; -// pSrcXYZW[2] = 288; -// pSrcXYZW[0] = 192; -// if ( amuint_4FAA38 ) -// { -// am_uint_4FAA44_blt_xy[0] += amuint_4FAA3C_blt_xy[0]; -// am_uint_4FAA44_blt_xy[1] += amuint_4FAA3C_blt_xy[1]; -//LABEL_7: -// Blt_Copy(v6, v5, 2); -// goto LABEL_11; -// } -// am_uint_4FAA44_blt_xy[0] += amuint_4FAA3C_blt_xy[0]; -// am_uint_4FAA44_blt_xy[1] += amuint_4FAA3C_blt_xy[1]; -// Blt_Copy(pSrcXYZW, am_uint_4FAA44_blt_xy, 2); -// amuint_4FAA4C = -1; -// } -//LABEL_11: -// v7 = (signed int)amuint_4FAA78; -// if ( uCardID != -1 ) -// { -// if ( v26 <= 10 ) -// { -// if ( v26 == 10 ) -// { -// ArcomageGame::GetCardRect(uCardID, pSrcXYZW); -// v8 = 0; -// v9 = (signed int)amuint_4FAA78; -// while ( *(unsigned int *)v9 != -1 ) -// { -// v9 += 32; -// ++v8; -// if ( v9 >= (signed int)&dword_4FABB8 ) -// goto LABEL_20; -// } -// amuint_4FAA78[8 * v8] = uCardID; -// am_byte_4FAA7C[32 * v8] = 1; -//LABEL_20: -// v10 = 8 * v8; -// v11 = amuint_4FAA80[v10]; -// v12 = amuint_4FAA84[v10]; -// pTargetXY[0] = v11; -// pTargetXY[1] = v12; -// Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 0); -// uCardID = -1; -// } -// } -// else -// { -// ArcomageGame::GetCardRect(uCardID, pSrcXYZW); -// amuint_4FAA5C_blt_xy[0] += amuint_4FAA54_blt_xy[0]; -// amuint_4FAA5C_blt_xy[1] += amuint_4FAA54_blt_xy[1]; -// Blt_Copy(pSrcXYZW, amuint_4FAA5C_blt_xy, 0); -// } -// } -// v13 = amuint_4FABC0; -// if ( amuint_4FABC0 != -1 ) -// { -// v14 = (double)v26; -// if ( v14 > 15.0 ) -// { -// ArcomageGame::GetCardRect(amuint_4FABC0, pSrcXYZW); -// v15 = amuint_4FAA5C_blt_xy; -// amuint_4FAA5C_blt_xy[0] += amuint_4FAA54_blt_xy[0]; -// amuint_4FAA5C_blt_xy[1] += amuint_4FAA54_blt_xy[1]; -//LABEL_28: -// v23 = 2; -//LABEL_29: -// Blt_Copy(pSrcXYZW, v15, v23); -// return; -// } -// if ( v14 == 15.0 ) -// { -// am_40BF77(amuint_4FAA6C, amuint_4FABC0); -// v13 = amuint_4FABC0; -// goto LABEL_26; -// } -// if ( v14 == 5.0 ) -// { -// amuint_4FAA5C_blt_xy[0] = 272; -// amuint_4FAA5C_blt_xy[1] = 173; -// v16 = 0; -// do -// { -// if ( *(unsigned int *)v7 == -1 ) -// break; -// v7 += 32; -// ++v16; -// } -// while ( v7 < (signed int)&dword_4FABB8 ); -// v26 = 32 * v16; -// amuint_4FAA54_blt_xy[0] = (amuint_4FAA80[8 * v16] - 272) / 5; -// amuint_4FAA54_blt_xy[1] = (amuint_4FAA84[8 * v16] - 173) / 5; -// ArcomageGame::GetCardRect(amuint_4FABC0, pSrcXYZW); -// pTargetXY[0] = 272; -// pTargetXY[1] = 173; -// goto LABEL_27; -// } -// if ( v14 >= 5.0 ) -// { -// v17 = v26 == 0; -// } -// else -// { -// v17 = v26 == 0; -// if ( v26 > 0 ) -// { -// ArcomageGame::GetCardRect(amuint_4FABC0, pSrcXYZW); -// v15 = amuint_4FAA5C_blt_xy; -// amuint_4FAA5C_blt_xy[0] += amuint_4FAA54_blt_xy[0]; -// amuint_4FAA5C_blt_xy[1] += amuint_4FAA54_blt_xy[1]; -// v23 = 0; -// goto LABEL_29; -// } -// } -// if ( !v17 ) -// { -//LABEL_26: -// ArcomageGame::GetCardRect(v13, pSrcXYZW); -// pTargetXY[0] = 272; -// pTargetXY[1] = 173; -//LABEL_27: -// v15 = pTargetXY; -// goto LABEL_28; -// } -// ArcomageGame::GetCardRect(amuint_4FABC0, pSrcXYZW); -// v18 = 0; -// while ( *(unsigned int *)v7 != -1 ) -// { -// v7 += 32; -// ++v18; -// if ( v7 >= (signed int)&dword_4FABB8 ) -// goto LABEL_46; -// } -// amuint_4FAA78[8 * v18] = amuint_4FABC0; -//LABEL_46: -// v19 = 8 * v18; -// v20 = amuint_4FAA80[v19]; -// v21 = amuint_4FAA84[v19]; -// pTargetXY[0] = v20; -// pTargetXY[1] = v21; -// Blt_Copy((ArcomageRect *)pSrcXYZW, pTargetXY, 0); -// amuint_4FABC0 = -1; -// } } -// 4E185D: using guessed type char am_byte_4E185D; -// 4FAA38: using guessed type int amuint_4FAA38; -// 4FAA4C: using guessed type int amuint_4FAA4C; -// 4FAA78: using guessed type int amuint_4FAA78[]; -// 4FAA80: using guessed type int amuint_4FAA80[]; -// 4FAA84: using guessed type int amuint_4FAA84[]; -// 4FABB8: using guessed type int dword_4FABB8; //----- (0040BB12) -------------------------------------------------------- void ArcomageGame::GetCardRect(unsigned int uCardID, RECT *pCardRect) @@ -3291,7 +3058,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 @@ -3421,138 +3188,6 @@ return result; - -// int v1; // esi@1 -// signed int result; // eax@1 -// int v3; // ebx@1 -// char v4; // zf@1 -// int v5; // eax@3 -// int v6; // eax@4 -// int v7; // ecx@6 -// char *v8; // eax@6 -// int v9; // eax@10 -// int v10; // ecx@10 -// int v11; // eax@10 -// char v12; // ch@2@11 -// int v13; // ST00_4@12 -// unsigned __int16 v14; // ax@12 -// int v15; // eax@13 -// int v16; // ecx@13 -// int v17; // eax@13 -// char v18; // al@16 -// char v19; // ch@2@16 -// int v20; // ST00_4@19 -// unsigned __int16 v21; // ax@19 -// int pXYZW[4]; // [sp+Ch] [bp-3Ch]@3 -// stru273 v26; // [sp+1Ch] [bp-2Ch]@2 -// int a1a; // [sp+28h] [bp-20h]@1 -// int v25; // [sp+2Ch] [bp-1Ch]@3 -// int var18; // [sp+30h] [bp-18h]@3 -// int i; // [sp+34h] [bp-14h]@4 -// int v28; // [sp+38h] [bp-10h]@1 -// int a2; // [sp+3Ch] [bp-Ch]@3 -// int v30; // [sp+40h] [bp-8h]@1 -// char v31; // [sp+44h] [bp-4h]@12 -// char v32; // [sp+45h] [bp-3h]@12 -// char v33; // [sp+46h] [bp-2h]@12 -// -// v1 = a1; -// v30 = 0; -// result = -1; -// v3 = 188 * a1; -// a1a = a1; -// v4 = LOBYTE(am_Players[a1].field_20) == 0; -// v28 = -1; -// if ( !v4 ) -// { -// if ( v26._40DD2F() ) -// { -// v5 = GetPlayerHandCardCount(v1); -// a2 = 0; -// v25 = v5; -// pXYZW[1] = 327; -// pXYZW[3] = 455; -// pXYZW[0] = (640 - 96 * v5) / (v5 + 1); -// var18 = pXYZW[0] + 96; -// pXYZW[2] = pXYZW[0] + 96; -// if ( v5 > 0 ) -// { -// v6 = 47 * v1; -// for ( i = 47 * v1; ; v6 = i ) -// { -// v7 = v30; -// v8 = (char *)&am_Players[0].cards_at_hand[v30 + v6]; -// if ( *(unsigned int *)v8 == -1 ) -// { -// do -// { -// v8 += 4; -// ++v7; -// } -// while ( *(unsigned int *)v8 == -1 ); -// v30 = v7; -// } -// if ( am_byte_4E185D ) -// { -// v9 = v3 + 8 * v7; -// // v10 = *(int *)((char *)am_Players[0].arr_6C[0] + v9); -// // v11 = *(int *)((char *)&am_Players[0].arr_6C[0][1] + v9); -// pXYZW[0] += v10; -// pXYZW[2] += v10; -// pXYZW[1] += v11; -// pXYZW[3] += v11; -// } -// if ( true)//v26.Inside(pXYZW) ) -// break; -// v31 = 0; -// v32 = 0; -// v33 = 0; -// BYTE3(v13) = v12; -// LOWORD(v13) = *(_WORD *)&v31; -// BYTE2(v13) = 0; -// v14 = R8G8B8_to_TargetFormat(v13); -// // DrawRect(pXYZW, v14, 0); -// pXYZW[0] += var18; -// pXYZW[2] += var18; -// if ( am_byte_4E185D ) -// { -// v15 = v3 + 8 * v30; -// // v16 = *(int *)((char *)am_Players[0].arr_6C[0] + v15); -// // v17 = *(int *)((char *)&am_Players[0].arr_6C[0][1] + v15); -// pXYZW[0] -= v16; -// pXYZW[2] -= v16; -// pXYZW[1] -= v17; -// pXYZW[3] -= v17; -// } -// ++v30; -// ++a2; -// if ( a2 >= v25 ) -// goto LABEL_20; -// } -// v28 = a2; -// v18 = am_40BF15(a1a, a2); -// v31 = -1; -// if ( v18 ) -// { -// v32 = -1; -// v33 = -1; -// } -// else -// { -// v32 = 0; -// v33 = 0; -// } -// BYTE3(v20) = v19; -// LOWORD(v20) = *(_WORD *)&v31; -// BYTE2(v20) = v33; -// v21 = R8G8B8_to_TargetFormat(v20); -// // DrawRect(pXYZW, v21, 0); -// } -// } -//LABEL_20: -// result = v28; -// } -// return result; } // 4E185D: using guessed type char am_byte_4E185D; @@ -3666,18 +3301,18 @@ // v10 = 188 * v8 + 8 * v6; // v11 = v6 + 47 * v3; pArcomageGame->field_F6 = 1; - //v12 = 96 * v6 + *(int *)((char *)am_Players[0].arr_6C[0] + v10) + (640 - 96 * v9) / (v9 + 1); + v12 = am_Players[player_num].arr_6C[v6].field_0 + (640 - 96 * v9) / (v9 + 1)+ 96 * v6 +(640 - 96 * v9) / (v9 + 1); // v13 = *(int *)((char *)&am_Players[0].arr_6C[0][1] + v10) + 327; - amuint_4FAA5C_blt_xy.x = am_Players[player_num].arr_6C[v6].field_0 + (640 - 96 * v9) / (v9 + 1);//v12; + amuint_4FAA5C_blt_xy.x = v12;//v12; amuint_4FAA5C_blt_xy.y = am_Players[player_num].arr_6C[v6].field_4 + 327;//v13; amuint_4FAA54_blt_xy.x = (272 - v12) / 5; amuint_4FAA54_blt_xy.y = -30; - v14 = &pCards[v5->cards_at_hand[v6]]; - v5->resource_bricks -= v14->needed_bricks; - v5->resource_beasts -= v14->needed_beasts; - v5->resource_gems -= v14->needed_gems; + v14 = &pCards[am_Players[player_num].cards_at_hand[v6]]; + am_Players[player_num].resource_bricks -= v14->needed_bricks; + am_Players[player_num].resource_beasts -= v14->needed_beasts; + am_Players[player_num].resource_gems -= v14->needed_gems; played_card_id = am_Players[player_num].cards_at_hand[v6]; am_Players[player_num].cards_at_hand[v6] = -1; return true;; @@ -3716,8 +3351,8 @@ //----- (0040BF77) -------------------------------------------------------- -void __fastcall am_40BF77(int a1, unsigned int uCardID) -{ +void ApplyCardToPlayer( int player_num, unsigned int uCardID ) + { // ArcomagePlayer *v2; // esi@1 // int v3; // eax@1 // ArcomagePlayer *v4; // edi@1 @@ -5747,44 +5382,44 @@ //----- (0040D402) -------------------------------------------------------- -int __fastcall am_40D402(int a1, int a2) -{ +int am_40D402( int player_num, int damage ) + { ArcomagePlayer *v2; // ecx@1 int v3; // esi@1 int result; // eax@3 - v2 = &am_Players[a1]; - v3 = v2->wall_height; + + v3 = am_Players[player_num].wall_height; if ( v3 <= 0 ) { result = 0; } else { - if ( v3 >= -a2 ) + if ( v3 >= -damage ) { - result = a2; - v2->wall_height = a2 + v3; + result = damage; + am_Players[player_num].wall_height += damage; } else { - a2 += v3; + damage += v3; result = -v3; - v2->wall_height = 0; - v2->tower_height += a2; + am_Players[player_num].wall_height = 0; + am_Players[player_num].tower_height += damage; } } - if ( v2->tower_height < 0 ) - v2->tower_height = 0; + if ( am_Players[player_num].tower_height < 0 ) + am_Players[player_num].tower_height = 0; return result; } // 40D402: using guessed type int __fastcall am_40D402(uint, uint); //----- (0040D444) -------------------------------------------------------- -int __cdecl GameResultsApply() -{ +void GameResultsApply() + { int v0; // esi@1 int v1; // edi@1 int v2; // eax@1 @@ -5794,23 +5429,23 @@ int v6; // eax@28 GUIWindow *v7; // ecx@50 signed int v8; // eax@50 - char *v9; // eax@52 + char v9; // eax@52 signed int v10; // eax@54 char *v11; // esi@59 char *v12; // esi@65 signed int v14; // [sp-4h] [bp-58h]@46 char pText[64]; // [sp+Ch] [bp-48h]@1 - int xy[2]; // [sp+4Ch] [bp-8h]@1 + POINT xy; // [sp+4Ch] [bp-8h]@1 v0 = -1; v1 = -1; //nullsub_1(); - xy[0] = 0; - xy[1] = 0; - // inv_strcpy("Οξαεδθ", pText); - v2 = 0; - xy[1] = 160; - xy[0] = 320 - 12 * v2 / 2; + xy.x = 0; + xy.y = 0; + strcpy(pText, "The Winner is: ");//"Οξαεδθ" + // v2 = 0; + xy.y = 160; + xy.x = 320; //- 12 * v2 / 2; // pPrimaryWindow_draws_text(-1, pText, xy); if ( am_Players[0].tower_height < max_tower_height ) { @@ -5949,60 +5584,56 @@ pArcomageGame->uGameResult = v0; if ( v0 == 1 ) { - v7 = window_SpeakInHouse; + v8 = (signed int)window_SpeakInHouse->par1C; - if ( v8 >= 108 ) + if (( v8 >= 108 )&&( v8 <= 120 )) { - if ( v8 <= 120 ) - { - v9 = (char *)&pParty->uNumGoldInBank + v8 + 1; - if ( !*v9 ) + if ( !pParty->pArcomageWins[v8-108] ) { - *v9 = 1; - - //auto _a = (signed __int64)(p2DEvents_minus1__20[13 * (unsigned int)v7->ptr_1C] * 100.0); - auto _a = (signed int)(p2DEvents[(unsigned int)v7->par1C - 1].fPriceMultiplier * 100.0); + pParty->pArcomageWins[v8-108] = 1; + auto _a = (signed int)(p2DEvents[ window_SpeakInHouse->par1C - 1].fPriceMultiplier * 100.0); party_finds_gold(_a, 0); } - } + } v10 = 108; do { - if ( !*((unsigned char *)&pParty->uNumGoldInBank + v10 + 1) ) + if ( !pParty->pArcomageWins[v10-108] ) break; ++v10; } while ( v10 <= 120 ); + if ( v10 == 121 ) _449B7E_toggle_bit(pParty->_quest_bits, 238, 1u); - v11 = (char *)pParty->pPlayers[0]._guilds_member_bits; - do + + + for (int i=0; i<4; ++i ) { + v11 = (char *)&pParty->pPlayers[i]._guilds_member_bits; if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v11, 1) ) _449B7E_toggle_bit((unsigned char *)v11, PLAYER_GUILD_BITS__ARCOMAGE_WIN, 1); - v11 += 6972; + } - while ( (signed int)v11 < (signed int)((char *)&pParty->StandartItemsInShops[36] + 2) ); + ++pParty->uNumArcomageWins; if ( pParty->uNumArcomageWins > 1000000 ) pParty->uNumArcomageWins = 1000000; } else { - v12 = (char *)pParty->pPlayers[0]._guilds_member_bits; - do - { + for (int i=0; i<4; ++i ) + { + v12 = (char *)&pParty->pPlayers[i]._guilds_member_bits; if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v12, 1) ) _449B7E_toggle_bit((unsigned char *)v12, PLAYER_GUILD_BITS__ARCOMAGE_LOSE, 1); - v12 += 6972; } - while ( (signed int)v12 < (signed int)((char *)&pParty->StandartItemsInShops[36] + 2) ); + ++pParty->uNumArcomageLoses; if ( pParty->uNumArcomageLoses > 1000000 ) pParty->uNumArcomageLoses = 1000000; } - return 0; }
--- a/Arcomage.h Sun Jun 09 23:51:53 2013 +0200 +++ b/Arcomage.h Sun Jun 09 23:53:01 2013 +0200 @@ -39,10 +39,7 @@ char needed_gems; char needed_beasts; char field_2B; - char field_2C; - char field_2D; - char field_2E; - char field_2F; + int field_2C; char field_30; char field_31; char field_32;
--- a/ArcomageCards.cpp Sun Jun 09 23:51:53 2013 +0200 +++ b/ArcomageCards.cpp Sun Jun 09 23:53:01 2013 +0200 @@ -2,264 +2,351 @@ #include "Arcomage.h" ArcomageCard pCards[87] = { - {"Brick Shortage", 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {"Brick Shortage", + 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {"Lucky Cache", 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + {"Lucky Cache", + 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0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 0, 0, + {"Crystallize", + 58, 2, 0, 0, 0, 0, 8, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }; \ No newline at end of file
--- a/Indoor.cpp Sun Jun 09 23:51:53 2013 +0200 +++ b/Indoor.cpp Sun Jun 09 23:53:01 2013 +0200 @@ -1312,8 +1312,6 @@ return; } - - if (p->uFaceID == uFaceID) return; if (!node_id && @@ -1337,10 +1335,8 @@ nodes[num_nodes].uViewportZ = pBLVRenderParams->uViewportZ; nodes[num_nodes].uViewportY = pBLVRenderParams->uViewportY; nodes[num_nodes].uViewportW = pBLVRenderParams->uViewportW; - nodes[num_nodes].field_C._43F9E1(pBLVRenderParams->uViewportX, - pBLVRenderParams->uViewportY, - pBLVRenderParams->uViewportZ, - pBLVRenderParams->uViewportW); + nodes[num_nodes].field_C._43F9E1(pBLVRenderParams->uViewportX, pBLVRenderParams->uViewportY, + pBLVRenderParams->uViewportZ, pBLVRenderParams->uViewportW); AddBspNodeToRenderList(++num_nodes - 1); return; } @@ -1381,7 +1377,7 @@ //savegame: qw , 0Bh and 0x1D4h //problem here when standing near/on portal, condition is false because of face_min_screenspace_x > p->uViewportZ if (face_max_screenspace_x >= p->uViewportX && -// face_min_screenspace_x <= p->uViewportZ && + face_min_screenspace_x <= p->uViewportZ && face_max_screenspace_y >= p->uViewportY && face_min_screenspace_y <= p->uViewportW && sub_424829(num_vertices, &nodes[num_nodes].field_C, &p->field_C, uFaceID))
--- a/Viewport.cpp Sun Jun 09 23:51:53 2013 +0200 +++ b/Viewport.cpp Sun Jun 09 23:53:01 2013 +0200 @@ -180,61 +180,59 @@ //----- (00443365) -------------------------------------------------------- void ViewingParams::_443365() - { - - Vec3_short_ *v3; // eax@4 - Vec3_short_ *v6; // eax@12 - int minimum_y; // [sp+10h] [bp-10h]@2 - int maximum_y; // [sp+14h] [bp-Ch]@2 - int minimum_x; // [sp+18h] [bp-8h]@2 - int maximum_x; // [sp+1Ch] [bp-4h]@2 +{ + Vec3_short_ *v3; // eax@4 + Vec3_short_ *v6; // eax@12 + int minimum_y; // [sp+10h] [bp-10h]@2 + int maximum_y; // [sp+14h] [bp-Ch]@2 + int minimum_x; // [sp+18h] [bp-8h]@2 + int maximum_x; // [sp+1Ch] [bp-4h]@2 - - InitGrayPalette(); - if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) - { - minimum_x = 0x40000000; - minimum_y = 0x40000000; + InitGrayPalette(); + if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) + { + minimum_x = 0x40000000; + minimum_y = 0x40000000; - maximum_x = -0x40000000; - maximum_y = -0x40000000; - for (int i=0; i<pIndoor->pMapOutlines->uNumOutlines; ++i) - { - v3 = &pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uFace1ID]; + maximum_x = -0x40000000; + maximum_y = -0x40000000; + for (int i=0; i<pIndoor->pMapOutlines->uNumOutlines; ++i) + { + v3 = &pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uFace1ID]; - if ( v3->x < minimum_x ) - minimum_x = v3->x; - if ( v3->x > maximum_x ) - maximum_x = v3->x; - if ( v3->y < minimum_y ) - minimum_y = v3->x; - if ( v3->y > maximum_y ) - maximum_y = v3->x; + if ( v3->x < minimum_x ) + minimum_x = v3->x; + if ( v3->x > maximum_x ) + maximum_x = v3->x; + if ( v3->y < minimum_y ) + minimum_y = v3->x; + if ( v3->y > maximum_y ) + maximum_y = v3->x; - v6 = &pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uFace2ID]; + v6 = &pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uFace2ID]; + + if ( v6->x < minimum_x ) + minimum_x = v3->x; + if ( v6->x > maximum_x ) + maximum_x = v3->x; - if ( v6->x < minimum_x ) - minimum_x = v3->x; - if ( v6->x > maximum_x ) - maximum_x = v3->x; - - if ( v6->y < minimum_y ) - minimum_y = v3->y; - if ( v6->y > maximum_y ) - maximum_y = v3->y; - } + if ( v6->y < minimum_y ) + minimum_y = v3->y; + if ( v6->y > maximum_y ) + maximum_y = v3->y; + } - uMinimapZoom = 1024; - indoor_center_x = (signed int)(minimum_x + maximum_x) / 2; - field_28 = 10; - indoor_center_y = (signed int)(minimum_y + maximum_y) / 2; - } - else - { - indoor_center_x = 0; - indoor_center_y = 0; - uMinimapZoom = _576E2C_current_minimap_zoom; - field_28 = dword_576E28; - } - field_2C = 384; - } \ No newline at end of file + uMinimapZoom = 1024; + indoor_center_x = (signed int)(minimum_x + maximum_x) / 2; + field_28 = 10; + indoor_center_y = (signed int)(minimum_y + maximum_y) / 2; + } + else + { + indoor_center_x = 0; + indoor_center_y = 0; + uMinimapZoom = _576E2C_current_minimap_zoom; + field_28 = dword_576E28; + } + field_2C = 384; +} \ No newline at end of file
--- a/mm7_1.cpp Sun Jun 09 23:51:53 2013 +0200 +++ b/mm7_1.cpp Sun Jun 09 23:53:01 2013 +0200 @@ -1487,7 +1487,7 @@ //----- (00423B5D) -------------------------------------------------------- int __fastcall sub_423B5D(unsigned int uFaceID) { - BLVFace *v1; // ebx@1 + BLVFace *pFace; // ebx@1 Vec3_short_ *v2; // esi@1 //int v3; // ST28_4@1 __int16 v4; // ST2C_2@1 @@ -1577,45 +1577,39 @@ signed int id; // [sp+24h] [bp-4h]@51 signed int ie; // [sp+24h] [bp-4h]@61 - v1 = &pIndoor->pFaces[uFaceID]; + pFace = &pIndoor->pFaces[uFaceID]; //this = pGame->pIndoorCameraD3D; - v2 = &pIndoor->pVertices[v1->pVertexIDs[0]]; + v2 = &pIndoor->pVertices[pFace->pVertexIDs[0]]; //v3 = *(_DWORD *)&v2->x; v4 = v2->z; //v5 = 0; - if ( v1->pFacePlane_old.vNormal.x * (v2->x - pBLVRenderParams->vPartyPos.x) - + v1->pFacePlane_old.vNormal.y * (v2->y - pBLVRenderParams->vPartyPos.y) - + v1->pFacePlane_old.vNormal.z * (v2->z - pBLVRenderParams->vPartyPos.z) < 0 ) + if ( pFace->pFacePlane_old.vNormal.x * (v2->x - pBLVRenderParams->vPartyPos.x) + + pFace->pFacePlane_old.vNormal.y * (v2->y - pBLVRenderParams->vPartyPos.y) + + pFace->pFacePlane_old.vNormal.z * (v2->z - pBLVRenderParams->vPartyPos.z) < 0 ) { stru_50B700.field_0 = 1; } else { stru_50B700.field_0 = 0; - if ( !v1->Portal() ) + if ( !pFace->Portal() ) return 0; } //v66 = v1->uNumVertices; - for (uint i = 0; i < v1->uNumVertices; ++i) + for (uint i = 0; i < pFace->uNumVertices; ++i) { - auto v6 = &pIndoor->pVertices[v1->pVertexIDs[i]]; - pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible( - v6->x, - v6->y, - v6->z, - &stru_50B700._view_transformed_xs[i], - &stru_50B700._view_transformed_zs[i], - &stru_50B700._view_transformed_ys[i], - 0); + auto v6 = &pIndoor->pVertices[pFace->pVertexIDs[i]]; + pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible(v6->x, v6->y, v6->z, + &stru_50B700._view_transformed_xs[i], &stru_50B700._view_transformed_zs[i], &stru_50B700._view_transformed_ys[i], 0); } //v7 = v1->uNumVertices; //v8 = 0; - if (v1->uNumVertices <= 0) + if (pFace->uNumVertices <= 0) return 0; bool bFound = false; - for (uint i = 0; i < v1->uNumVertices; ++i) + for (uint i = 0; i < pFace->uNumVertices; ++i) if (stru_50B700._view_transformed_xs[i] >= 0x80000u) { bFound = true; @@ -1625,12 +1619,12 @@ return 0; v79 = 0; - stru_50B700._view_transformed_xs[v1->uNumVertices] = stru_50B700._view_transformed_xs[0]; - stru_50B700._view_transformed_zs[v1->uNumVertices] = stru_50B700._view_transformed_zs[0]; - stru_50B700._view_transformed_ys[v1->uNumVertices] = stru_50B700._view_transformed_ys[0]; + stru_50B700._view_transformed_xs[pFace->uNumVertices] = stru_50B700._view_transformed_xs[0]; + stru_50B700._view_transformed_zs[pFace->uNumVertices] = stru_50B700._view_transformed_zs[0]; + stru_50B700._view_transformed_ys[pFace->uNumVertices] = stru_50B700._view_transformed_ys[0]; thisa = stru_50B700._view_transformed_xs[0] >= (signed int)0x80000u; //int i = 1; - for (uint i = 1; i <= v1->uNumVertices; ++i) + for (uint i = 1; i <= pFace->uNumVertices; ++i) { v10 = stru_50B700._view_transformed_xs[i]; v81 = v10 >= (signed int)0x80000u;
--- a/mm7_3.cpp Sun Jun 09 23:51:53 2013 +0200 +++ b/mm7_3.cpp Sun Jun 09 23:53:01 2013 +0200 @@ -11018,10 +11018,8 @@ pBspRenderer->nodes[0].uViewportZ = pBLVRenderParams->uViewportZ; pBspRenderer->nodes[0].uViewportY = pBLVRenderParams->uViewportY; pBspRenderer->nodes[0].uViewportX = pBLVRenderParams->uViewportX; - pBspRenderer->nodes[0].field_C._43F9E1(pBLVRenderParams->uViewportX, - pBLVRenderParams->uViewportY, - pBLVRenderParams->uViewportZ, - pBLVRenderParams->uViewportW); + pBspRenderer->nodes[0].field_C._43F9E1(pBLVRenderParams->uViewportX, pBLVRenderParams->uViewportY, + pBLVRenderParams->uViewportZ, pBLVRenderParams->uViewportW); pBspRenderer->nodes[0].uFaceID = -1; pBspRenderer->nodes[0].viewing_portal_id = -1; pBspRenderer->num_nodes = 1; @@ -11386,85 +11384,75 @@ //----- (00440639) -------------------------------------------------------- void AddBspNodeToRenderList(unsigned int node_id) { - //int v1; // ebx@1 - signed int v2; // edi@1 - BLVSector *v3; // esi@1 - - //v1 = sector_id; - v2 = 0; - v3 = &pIndoor->pSectors[pBspRenderer->nodes[node_id].uSectorID]; + BLVSector *pSector; // esi@1 + + pSector = &pIndoor->pSectors[pBspRenderer->nodes[node_id].uSectorID]; if ( pRenderer->pRenderD3D ) { - for (uint i = 0; i < v3->uNumNonBSPFaces; ++i) + for (uint i = 0; i < pSector->uNumNonBSPFaces; ++i) //Log::Warning(L"Non-BSP face: %X", v3->pFaceIDs[v2]); - pBspRenderer->AddFaceToRenderList_d3d(node_id, v3->pFaceIDs[i]); - } - else - { - if ( v3->uNumNonBSPFaces > 0 ) - { - do - pBspRenderer->AddFaceToRenderList_sw(node_id, v3->pFaceIDs[v2++]); - while ( v2 < v3->uNumNonBSPFaces ); - } - } - if ( v3->field_0 & 0x10 ) - sub_4406BC(node_id, v3->uFirstBSPNode); + pBspRenderer->AddFaceToRenderList_d3d(node_id, pSector->pFaceIDs[i]); + } + else + { + for (uint i = 0; i < pSector->uNumNonBSPFaces; ++i) + pBspRenderer->AddFaceToRenderList_sw(node_id, pSector->pFaceIDs[i]); + } + if ( pSector->field_0 & 0x10 ) + sub_4406BC(node_id, pSector->uFirstBSPNode); } //----- (004406BC) -------------------------------------------------------- void __fastcall sub_4406BC(unsigned int node_id, unsigned int uFirstNode) { - BLVSector *v2; // esi@2 - BSPNode *v3; // edi@2 - BLVFace *v4; // eax@2 + BLVSector *pSector; // esi@2 + BSPNode *pNode; // edi@2 + BLVFace *pFace; // eax@2 int v5; // ecx@2 __int16 v6; // ax@6 int v7; // ebp@10 int v8; // ebx@10 __int16 v9; // di@18 //int v10; // [sp+10h] [bp-Ch]@1 - bool v11; // [sp+14h] [bp-8h]@5 - BspRenderer_stru0 *v12; // [sp+18h] [bp-4h]@1 + //bool v11; // [sp+14h] [bp-8h]@5 + BspRenderer_stru0 *node; // [sp+18h] [bp-4h]@1 //Log::Warning(L"sub_4406BC(%u, %u)", a1, uFirstNode); //v10 = a1; - v12 = &pBspRenderer->nodes[node_id]; + node = &pBspRenderer->nodes[node_id]; while ( 1 ) { - v2 = &pIndoor->pSectors[v12->uSectorID]; - v3 = &pIndoor->pNodes[uFirstNode]; - v4 = &pIndoor->pFaces[v2->pFaceIDs[v3->uCoplanarOffset]]; - v5 = v4->pFacePlane_old.dist - + pBLVRenderParams->vPartyPos.x * v4->pFacePlane_old.vNormal.x - + pBLVRenderParams->vPartyPos.y * v4->pFacePlane_old.vNormal.y - + pBLVRenderParams->vPartyPos.z * v4->pFacePlane_old.vNormal.z; - if (v4->Portal() && v4->uSectorID != v12->uSectorID ) + pSector = &pIndoor->pSectors[node->uSectorID]; + pNode = &pIndoor->pNodes[uFirstNode]; + pFace = &pIndoor->pFaces[pSector->pFaceIDs[pNode->uCoplanarOffset]]; + v5 = pFace->pFacePlane_old.dist + pBLVRenderParams->vPartyPos.x * pFace->pFacePlane_old.vNormal.x + + pBLVRenderParams->vPartyPos.y * pFace->pFacePlane_old.vNormal.y + pBLVRenderParams->vPartyPos.z * pFace->pFacePlane_old.vNormal.z; + if (pFace->Portal() && pFace->uSectorID != node->uSectorID ) v5 = -v5; - v11 = v5 > 0; + //v11 = v5 > 0; if ( v5 <= 0 ) - v6 = v3->uFront; + v6 = pNode->uFront; else - v6 = v3->uBack; + v6 = pNode->uBack; if ( v6 != -1 ) sub_4406BC(node_id, v6); - v7 = v3->uCoplanarOffset; - v8 = v7 + v3->uCoplanarSize; + v7 = pNode->uCoplanarOffset; + v8 = v7 + pNode->uCoplanarSize; //Log::Warning(L"Node %u: %X to %X (%hX)", uFirstNode, v7, v8, v2->pFaceIDs[v7]); if ( pRenderer->pRenderD3D ) { while ( v7 < v8 ) - pBspRenderer->AddFaceToRenderList_d3d(node_id, v2->pFaceIDs[v7++]); + pBspRenderer->AddFaceToRenderList_d3d(node_id, pSector->pFaceIDs[v7++]); } else { while ( v7 < v8 ) - pBspRenderer->AddFaceToRenderList_sw(node_id, v2->pFaceIDs[v7++]); - } - v9 = v11 ? v3->uFront : v3->uBack; + pBspRenderer->AddFaceToRenderList_sw(node_id, pSector->pFaceIDs[v7++]); + } + v9 = v5 > 0 ? pNode->uFront : pNode->uBack; if ( v9 == -1 ) break; uFirstNode = v9;