comparison mm7_4.cpp @ 506:9b4bdf6089af

Слияние
author Ritor1
date Tue, 26 Feb 2013 18:48:05 +0600
parents d027c6848fbb 5b6e2021c6fe
children 00ce82758c72
comparison
equal deleted inserted replaced
505:81410c3feebc 506:9b4bdf6089af
9067 int v5; // eax@12 9067 int v5; // eax@12
9068 unsigned int v6; // eax@13 9068 unsigned int v6; // eax@13
9069 ItemGen *v7; // ecx@13 9069 ItemGen *v7; // ecx@13
9070 signed int v8; // esi@17 9070 signed int v8; // esi@17
9071 unsigned int v9; // eax@19 9071 unsigned int v9; // eax@19
9072 char v10; // [sp+8h] [bp-44h]@12 9072 POINT v10; // [sp+8h] [bp-44h]@12
9073 char v11; // [sp+10h] [bp-3Ch]@12 9073 POINT v11; // [sp+10h] [bp-3Ch]@12
9074 char v12; // [sp+18h] [bp-34h]@18 9074 POINT v12; // [sp+18h] [bp-34h]@18
9075 char v13; // [sp+20h] [bp-2Ch]@17 9075 POINT v13; // [sp+20h] [bp-2Ch]@17
9076 char v14; // [sp+28h] [bp-24h]@17 9076 POINT v14; // [sp+28h] [bp-24h]@17
9077 char v15; // [sp+30h] [bp-1Ch]@17 9077 POINT v15; // [sp+30h] [bp-1Ch]@17
9078 char v16; // [sp+38h] [bp-14h]@5 9078 POINT v16; // [sp+38h] [bp-14h]@5
9079 POINT a2; // [sp+40h] [bp-Ch]@5 9079 POINT a2; // [sp+40h] [bp-Ch]@5
9080 int v18; // [sp+48h] [bp-4h]@5 9080 int v18; // [sp+48h] [bp-4h]@5
9081 9081
9082 //v0 = pPlayers[uActiveCharacter]; 9082 //v0 = pPlayers[uActiveCharacter];
9083 if ( dword_F8B198 <= 0 ) 9083 if ( in_current_bilding_type <= 0 )
9084 return; 9084 return;
9085 if ( dword_F8B198 <= 4 ) 9085 if ( in_current_bilding_type <= BildingType_AlchemistShop )
9086 { 9086 {
9087 if ( dword_F8B19C != 2 ) 9087 if ( dword_F8B19C != 2 )
9088 { 9088 {
9089 if ( dword_F8B19C <= 2 ) 9089 if ( dword_F8B19C <= 2 )
9090 return; 9090 return;
9091 if ( dword_F8B19C <= 5 || dword_F8B19C == 94 ) 9091 if ( dword_F8B19C <= 5 || dword_F8B19C == 94 )
9092 { 9092 {
9093 v8 = pMouse->GetCursorPos((POINT *)&v15)->x - 14; 9093 v8 = pMouse->GetCursorPos(&v15)->x - 14;
9094 v18 = (v8 >> 5) + 14 * ((pMouse->GetCursorPos((POINT *)&v14)->y - 17) >> 5); 9094 v18 = (v8 >> 5) + 14 * ((pMouse->GetCursorPos(&v14)->y - 17) >> 5);
9095 if ( pMouse->GetCursorPos((POINT *)&v13)->x <= 13 9095 if ( pMouse->GetCursorPos(&v13)->x <= 13
9096 || pMouse->GetCursorPos((POINT *)&v12)->x >= 462 9096 || pMouse->GetCursorPos(&v12)->x >= 462
9097 || (v9 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex(&v18)) == 0 ) 9097 || (v9 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex(&v18)) == 0 )
9098 return; 9098 return;
9099 v7 = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItems[v9-1]; 9099 v7 = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItems[v9-1];
9100 LABEL_15: 9100 LABEL_15:
9101 GameUI_DrawItemInfo(v7); 9101 GameUI_DrawItemInfo(v7);
9102 return; 9102 return;
9103 } 9103 }
9104 if ( dword_F8B19C != 95 ) 9104 if ( dword_F8B19C != 95 )
9105 return; 9105 return;
9106 } 9106 }
9107 v4 = pMouse->GetCursorPos((POINT *)&v11); 9107 v4 = pMouse->GetCursorPos(&v11);
9108 v5 = pRenderer->pActiveZBuffer[v4->x + pSRZBufferLineOffsets[pMouse->GetCursorPos((POINT *)&v10)->y]] & 0xFFFF; 9108 v5 = pRenderer->pActiveZBuffer[v4->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v10)->y]] & 0xFFFF;
9109 v18 = v5; 9109 v18 = v5;
9110 if ( !v5 ) 9110 if ( !v5 )
9111 return; 9111 return;
9112 v6 = 9 * (v5 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C); 9112 v6 = 9 * (v5 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C);
9113 v7 = (ItemGen *)((char *)&pParty->pPickedItem + 4 * v6 + 4); 9113 v7 = (ItemGen *)((char *)&pParty->pPickedItem + 4 * v6 + 4);
9114 if ( dword_F8B19C != 2 ) 9114 if ( dword_F8B19C != 2 )
9115 // v7 = (ItemGen *)&pParty->field_C59C[v6 + 715]; 9115 // v7 = (ItemGen *)&pParty->field_C59C[v6 + 715];
9116 v7 =&pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v5]; 9116 v7 =&pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v5];
9117 goto LABEL_15; 9117 goto LABEL_15;
9118 } 9118 }
9119 if ( dword_F8B198 <= 16 && dword_F8B19C == 18 ) 9119 if ( in_current_bilding_type <= BildingType_16 && dword_F8B19C == BildingType_18 )
9120 { 9120 {
9121 v1 = pMouse->GetCursorPos(&a2); 9121 v1 = pMouse->GetCursorPos(&a2);
9122 v2 = v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos((POINT *)&v16)->y]; 9122 v2 = v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v16)->y];
9123 v3 = pRenderer->pActiveZBuffer[v2] & 0xFFFF; 9123 v3 = pRenderer->pActiveZBuffer[v2] & 0xFFFF;
9124 v18 = pRenderer->pActiveZBuffer[v2] & 0xFFFF; 9124 v18 = pRenderer->pActiveZBuffer[v2] & 0xFFFF;
9125 if ( v18 ) 9125 if ( v18 )
9126 sub_4B1523((int *)&pParty->pPlayers[1].uExpressionTimeLength + 9 * (v3 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)); 9126 sub_4B1523((int *)&pParty->pPlayers[1].uExpressionTimeLength + 9 * (v3 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C));
9127 } 9127 }
9178 __int16 v4; // ax@15 9178 __int16 v4; // ax@15
9179 signed int v5; // edi@20 9179 signed int v5; // edi@20
9180 int v6; // esi@20 9180 int v6; // esi@20
9181 int v7[4]; // [sp+Ch] [bp-10h]@12 9181 int v7[4]; // [sp+Ch] [bp-10h]@12
9182 9182
9183 if ( dword_F8B198 > 0 ) 9183 if ( in_current_bilding_type > 0 )
9184 { 9184 {
9185 v0 = 3; 9185 v0 = 3;
9186 if ( dword_F8B198 > 3 ) 9186 if ( in_current_bilding_type > BildingType_MagicShop )
9187 { 9187 {
9188 if ( dword_F8B198 == 22 ) 9188 if ( in_current_bilding_type == BildingType_Bank )
9189 { 9189 {
9190 if ( !dword_F8B1E4 ) 9190 if ( !dword_F8B1E4 )
9191 return; 9191 return;
9192 } 9192 }
9193 else 9193 else
9194 { 9194 {
9195 if ( dword_F8B198 != 23 ) 9195 if ( in_current_bilding_type != BildingType_Temple )
9196 return; 9196 return;
9197 } 9197 }
9198 v1 = (unsigned int)window_SpeakInHouse->ptr_1C; 9198 v1 = (unsigned int)window_SpeakInHouse->ptr_1C;
9199 LABEL_28: 9199 LABEL_28:
9200 HousePlaySomeSound(v1, v0); 9200 HousePlaySomeSound(v1, v0);
9636 v22 = pParty->pHireling1Name; 9636 v22 = pParty->pHireling1Name;
9637 } 9637 }
9638 strcpy(v22, v24); 9638 strcpy(v22, v24);
9639 pParty->field_709 = 0; 9639 pParty->field_709 = 0;
9640 sub_44A56A(); 9640 sub_44A56A();
9641 PrepareHouse((HOUSE_TYPE)(int)window_SpeakInHouse->ptr_1C); 9641 PrepareHouse((HOUSE_ID)(int)window_SpeakInHouse->ptr_1C);
9642 dword_F8B19C = 1; 9642 dword_F8B19C = 1;
9643 9643
9644 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 9644 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
9645 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 9645 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
9646 { 9646 {
10348 10348
10349 10349
10350 10350
10351 10351
10352 //----- (004B36CC) -------------------------------------------------------- 10352 //----- (004B36CC) --------------------------------------------------------
10353 GUIButton *__fastcall sub_4B36CC(int a1, unsigned int a2) 10353 void CreateButtonInColumn( int column_pos, unsigned int control_id )
10354 { 10354 {
10355 return pDialogueWindow->CreateButton( 10355 pDialogueWindow->CreateButton( 480, 30 * column_pos + 146, 140, 30, 1, 0, 0x195u, control_id, 0, "", 0);
10356 0x1E0u,
10357 30 * a1 + 146,
10358 0x8Cu,
10359 0x1Eu,
10360 1,
10361 0,
10362 0x195u,
10363 a2,
10364 0,
10365 "",
10366 0);
10367 } 10356 }
10368 10357
10369 10358
10370 10359
10371 //----- (004B3A72) -------------------------------------------------------- 10360 //----- (004B3A72) --------------------------------------------------------
10372 int __thiscall sub_4B3A72(int a1) 10361 void sub_4B3A72( int a1 )
10373 { 10362 {
10374 int v1; // esi@1 10363 int num_buttons; // esi@1
10375 int result; // eax@4 10364
10376 10365 num_buttons = 0;
10377 v1 = 0;
10378 if ( a1 == 21 ) 10366 if ( a1 == 21 )
10379 { 10367 {
10380 sub_4B36CC(0, 0x66u); 10368 CreateButtonInColumn(0, 0x66u);
10381 v1 = 2; 10369 num_buttons = 2;
10382 sub_4B36CC(1, 0x67u); 10370 CreateButtonInColumn(1, 0x67u);
10383 if ( pParty->HasItem(0x28Bu) ) 10371 if ( pParty->HasItem(651) ) //Arcomage Deck
10384 { 10372 {
10385 v1 = 3; 10373 num_buttons = 3;
10386 sub_4B36CC(2, 0x68u); 10374 CreateButtonInColumn(2, 0x68u);
10387 } 10375 }
10388 } 10376 }
10389 pDialogueWindow->_41D08F(v1, 1, 0, 2); 10377 pDialogueWindow->_41D08F(num_buttons, 1, 0, 2);
10390 result = pDialogueWindow->pNumPresenceButton;
10391 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; 10378 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton;
10392 return result;
10393 } 10379 }
10394 // F8B1E0: using guessed type int dword_F8B1E0; 10380 // F8B1E0: using guessed type int dword_F8B1E0;
10395 10381
10396 //----- (004B3AD4) -------------------------------------------------------- 10382 //----- (004B3AD4) --------------------------------------------------------
10397 int __fastcall sub_4B3AD4(signed int a1) 10383 void sub_4B3AD4( signed int a1 )
10398 { 10384 {
10399 int result; // eax@7
10400 int v2; // [sp-10h] [bp-10h]@4
10401 int v3; // [sp-Ch] [bp-Ch]@4
10402 int v4; // [sp-8h] [bp-8h]@4
10403 int v5; // [sp-4h] [bp-4h]@4
10404
10405 if ( a1 > 0 ) 10385 if ( a1 > 0 )
10406 { 10386 {
10407 if ( a1 <= 3 ) 10387 if ( a1 <= 3 )
10408 { 10388 {
10409 sub_4B36CC(0, 3u); 10389 CreateButtonInColumn(0, 3u);
10410 sub_4B36CC(1, 4u); 10390 CreateButtonInColumn(1, 4u);
10411 sub_4B36CC(2, 5u); 10391 CreateButtonInColumn(2, 5u);
10412 v5 = 2; 10392 pDialogueWindow->_41D08F(3, 1, 0, 2);
10413 v4 = 0;
10414 v3 = 1;
10415 v2 = 3;
10416 goto LABEL_6;
10417 } 10393 }
10418 if ( a1 == 4 ) 10394 if ( a1 == 4 )
10419 { 10395 {
10420 sub_4B36CC(0, 3u); 10396 CreateButtonInColumn(0, 3u);
10421 sub_4B36CC(1, 4u); 10397 CreateButtonInColumn(1, 4u);
10422 v5 = 2; 10398 pDialogueWindow->_41D08F(2, 1, 0, 2);
10423 v4 = 0; 10399 }
10424 v3 = 1; 10400 }
10425 v2 = 2;
10426 LABEL_6:
10427 pDialogueWindow->_41D08F(v2, v3, v4, v5);
10428 goto LABEL_7;
10429 }
10430 }
10431 LABEL_7:
10432 result = pDialogueWindow->pNumPresenceButton;
10433 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; 10401 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton;
10434 return result;
10435 } 10402 }
10436 // F8B1E0: using guessed type int dword_F8B1E0; 10403 // F8B1E0: using guessed type int dword_F8B1E0;
10437 10404
10438 //----- (004B3B42) -------------------------------------------------------- 10405 //----- (004B3B42) --------------------------------------------------------
10439 int __fastcall sub_4B3B42(signed int a1) 10406 void sub_4B3B42( signed int a1 )
10440 { 10407 {
10441 int v1; // ecx@18 10408 int v1; // ecx@18
10442 int v2; // ecx@19 10409 int v2; // ecx@19
10443 int v3; // ecx@20 10410 int v3; // ecx@20
10444 signed int v4; // esi@22 10411 signed int v4; // esi@22
10445 signed int v5; // eax@22 10412 signed int v5; // eax@22
10460 { 10427 {
10461 if ( a1 > 22 ) 10428 if ( a1 > 22 )
10462 { 10429 {
10463 if ( a1 == 23 ) 10430 if ( a1 == 23 )
10464 { 10431 {
10465 sub_4B36CC(0, 0xAu); 10432 CreateButtonInColumn(0, 0xAu);
10466 sub_4B36CC(1, 0xBu); 10433 CreateButtonInColumn(1, 0xBu);
10467 v14 = 96; 10434 v14 = 96;
10468 LABEL_41: 10435 LABEL_41:
10469 sub_4B36CC(2, v14); 10436 CreateButtonInColumn(2, v14);
10470 v17 = 2; 10437 v17 = 2;
10471 v11 = 0; 10438 v11 = 0;
10472 v10 = 1; 10439 v10 = 1;
10473 v9 = 3; 10440 v9 = 3;
10474 goto LABEL_42; 10441 goto LABEL_42;
10477 goto LABEL_43; 10444 goto LABEL_43;
10478 if ( a1 > 28 ) 10445 if ( a1 > 28 )
10479 { 10446 {
10480 if ( a1 != 30 ) 10447 if ( a1 != 30 )
10481 goto LABEL_43; 10448 goto LABEL_43;
10482 sub_4B36CC(0, 0x11u); 10449 CreateButtonInColumn(0, 0x11u);
10483 v16 = 96; 10450 v16 = 96;
10484 goto LABEL_37; 10451 goto LABEL_37;
10485 } 10452 }
10486 sub_4B36CC(0, 0x69u); 10453 CreateButtonInColumn(0, 0x69u);
10487 sub_4B36CC(1, 0x6Au); 10454 CreateButtonInColumn(1, 0x6Au);
10488 sub_4B36CC(2, 0x6Bu); 10455 CreateButtonInColumn(2, 0x6Bu);
10489 v12 = 108; 10456 v12 = 108;
10490 } 10457 }
10491 else 10458 else
10492 { 10459 {
10493 if ( a1 == 22 ) 10460 if ( a1 == 22 )
10494 { 10461 {
10495 sub_4B36CC(0, 7u); 10462 CreateButtonInColumn(0, 7u);
10496 v16 = 8; 10463 v16 = 8;
10497 goto LABEL_37; 10464 goto LABEL_37;
10498 } 10465 }
10499 v1 = a1 - 14; 10466 v1 = a1 - 14;
10500 if ( !v1 ) 10467 if ( !v1 )
10501 { 10468 {
10502 sub_4B36CC(0, 0x12u); 10469 CreateButtonInColumn(0, 0x12u);
10503 sub_4B36CC(1, 0x30u); 10470 CreateButtonInColumn(1, 0x30u);
10504 sub_4B36CC(2, 0x31u); 10471 CreateButtonInColumn(2, 0x31u);
10505 sub_4B36CC(3, 0x32u); 10472 CreateButtonInColumn(3, 0x32u);
10506 sub_4B36CC(4, 0x33u); 10473 CreateButtonInColumn(4, 0x33u);
10507 v17 = 2; 10474 v17 = 2;
10508 v11 = 0; 10475 v11 = 0;
10509 v10 = 1; 10476 v10 = 1;
10510 v9 = 5; 10477 v9 = 5;
10511 goto LABEL_42; 10478 goto LABEL_42;
10516 v3 = v2 - 2; 10483 v3 = v2 - 2;
10517 if ( v3 ) 10484 if ( v3 )
10518 { 10485 {
10519 if ( v3 != 4 ) 10486 if ( v3 != 4 )
10520 goto LABEL_43; 10487 goto LABEL_43;
10521 sub_4B36CC(0, 0xFu); 10488 CreateButtonInColumn(0, 0xFu);
10522 sub_4B36CC(1, 0x10u); 10489 CreateButtonInColumn(1, 0x10u);
10523 v4 = 3; 10490 v4 = 3;
10524 sub_4B36CC(2, 0x60u); 10491 CreateButtonInColumn(2, 0x60u);
10525 v5 = (signed int)window_SpeakInHouse->ptr_1C; 10492 v5 = (signed int)window_SpeakInHouse->ptr_1C;
10526 if ( v5 < 108 || v5 > 120 ) 10493 if ( v5 < 108 || v5 > 120 )
10527 goto LABEL_28; 10494 goto LABEL_28;
10528 v4 = 4; 10495 v4 = 4;
10529 v6 = 101; 10496 v6 = 101;
10530 v7 = 3; 10497 v7 = 3;
10531 } 10498 }
10532 else 10499 else
10533 { 10500 {
10534 v4 = 1; 10501 v4 = 1;
10535 sub_4B36CC(0, 0x63u); 10502 CreateButtonInColumn(0, 0x63u);
10536 if ( !pParty->uFine ) 10503 if ( !pParty->uFine )
10537 { 10504 {
10538 LABEL_28: 10505 LABEL_28:
10539 v17 = 2; 10506 v17 = 2;
10540 v11 = 0; 10507 v11 = 0;
10546 } 10513 }
10547 v4 = 2; 10514 v4 = 2;
10548 v7 = 1; 10515 v7 = 1;
10549 v6 = 100; 10516 v6 = 100;
10550 } 10517 }
10551 sub_4B36CC(v7, v6); 10518 CreateButtonInColumn(v7, v6);
10552 goto LABEL_28; 10519 goto LABEL_28;
10553 } 10520 }
10554 sub_4B36CC(0, 0x12u); 10521 CreateButtonInColumn(0, 0x12u);
10555 sub_4B36CC(1, 0x34u); 10522 CreateButtonInColumn(1, 0x34u);
10556 sub_4B36CC(2, 0x35u); 10523 CreateButtonInColumn(2, 0x35u);
10557 v12 = 54; 10524 v12 = 54;
10558 } 10525 }
10559 LABEL_39: 10526 LABEL_39:
10560 sub_4B36CC(3, v12); 10527 CreateButtonInColumn(3, v12);
10561 v17 = 2; 10528 v17 = 2;
10562 v11 = 0; 10529 v11 = 0;
10563 v10 = 1; 10530 v10 = 1;
10564 v9 = 4; 10531 v9 = 4;
10565 goto LABEL_42; 10532 goto LABEL_42;
10566 } 10533 }
10567 if ( a1 == 13 ) 10534 if ( a1 == 13 )
10568 { 10535 {
10569 sub_4B36CC(0, 0x12u); 10536 CreateButtonInColumn(0, 0x12u);
10570 v16 = 56; 10537 v16 = 56;
10571 LABEL_37: 10538 LABEL_37:
10572 sub_4B36CC(1, v16); 10539 CreateButtonInColumn(1, v16);
10573 v17 = 2; 10540 v17 = 2;
10574 v11 = 0; 10541 v11 = 0;
10575 v10 = 1; 10542 v10 = 1;
10576 v9 = 2; 10543 v9 = 2;
10577 goto LABEL_42; 10544 goto LABEL_42;
10580 { 10547 {
10581 case 1: 10548 case 1:
10582 case 2: 10549 case 2:
10583 case 3: 10550 case 3:
10584 case 4: 10551 case 4:
10585 sub_4B36CC(0, 2u); 10552 CreateButtonInColumn(0, 2u);
10586 sub_4B36CC(1, 0x5Fu); 10553 CreateButtonInColumn(1, 0x5Fu);
10587 sub_4B36CC(2, 0x5Eu); 10554 CreateButtonInColumn(2, 0x5Eu);
10588 v12 = 96; 10555 v12 = 96;
10589 goto LABEL_39; 10556 goto LABEL_39;
10590 case 5: 10557 case 5:
10591 sub_4B36CC(0, 0x12u); 10558 CreateButtonInColumn(0, 0x12u);
10592 v13 = 48; 10559 v13 = 48;
10593 goto LABEL_9; 10560 goto LABEL_9;
10594 case 6: 10561 case 6:
10595 sub_4B36CC(0, 0x12u); 10562 CreateButtonInColumn(0, 0x12u);
10596 v13 = 49; 10563 v13 = 49;
10597 goto LABEL_9; 10564 goto LABEL_9;
10598 case 7: 10565 case 7:
10599 sub_4B36CC(0, 0x12u); 10566 CreateButtonInColumn(0, 0x12u);
10600 v13 = 50; 10567 v13 = 50;
10601 goto LABEL_9; 10568 goto LABEL_9;
10602 case 8: 10569 case 8:
10603 sub_4B36CC(0, 0x12u); 10570 CreateButtonInColumn(0, 0x12u);
10604 v13 = 51; 10571 v13 = 51;
10605 LABEL_9: 10572 LABEL_9:
10606 sub_4B36CC(1, v13); 10573 CreateButtonInColumn(1, v13);
10607 v14 = 72; 10574 v14 = 72;
10608 goto LABEL_41; 10575 goto LABEL_41;
10609 case 9: 10576 case 9:
10610 sub_4B36CC(0, 0x12u); 10577 CreateButtonInColumn(0, 0x12u);
10611 v15 = 52; 10578 v15 = 52;
10612 goto LABEL_13; 10579 goto LABEL_13;
10613 case 10: 10580 case 10:
10614 sub_4B36CC(0, 0x12u); 10581 CreateButtonInColumn(0, 0x12u);
10615 v15 = 53; 10582 v15 = 53;
10616 goto LABEL_13; 10583 goto LABEL_13;
10617 case 11: 10584 case 11:
10618 sub_4B36CC(0, 0x12u); 10585 CreateButtonInColumn(0, 0x12u);
10619 v15 = 54; 10586 v15 = 54;
10620 LABEL_13: 10587 LABEL_13:
10621 sub_4B36CC(1, v15); 10588 CreateButtonInColumn(1, v15);
10622 v14 = 61; 10589 v14 = 61;
10623 goto LABEL_41; 10590 goto LABEL_41;
10624 case 12: 10591 case 12:
10625 sub_4B36CC(0, 0x12u); 10592 CreateButtonInColumn(0, 0x12u);
10626 v16 = 55; 10593 v16 = 55;
10627 goto LABEL_37; 10594 goto LABEL_37;
10628 default: 10595 default:
10629 break; 10596 break;
10630 } 10597 }
10631 LABEL_43: 10598 LABEL_43:
10632 result = pDialogueWindow->pNumPresenceButton;
10633 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; 10599 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton;
10634 return result;
10635 } 10600 }
10636 // F8B1E0: using guessed type int dword_F8B1E0; 10601 // F8B1E0: using guessed type int dword_F8B1E0;
10637 10602
10638 //----- (004B3E1E) -------------------------------------------------------- 10603 //----- (004B3E1E) --------------------------------------------------------
10639 void __cdecl sub_4B3E1E() 10604 void __cdecl sub_4B3E1E()
10814 pGlobalTXT_LocalizationStrings[74],// "End Conversation" 10779 pGlobalTXT_LocalizationStrings[74],// "End Conversation"
10815 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); 10780 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0);
10816 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", 0); 10781 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", 0);
10817 if ( pDialogueNPCCount == 1 && dword_591080 ) 10782 if ( pDialogueNPCCount == 1 && dword_591080 )
10818 { 10783 {
10819 sub_4B3B42(dword_F8B198); 10784 sub_4B3B42(in_current_bilding_type);
10820 } 10785 }
10821 else 10786 else
10822 { 10787 {
10823 if ( v17->joins ) 10788 if ( v17->joins )
10824 { 10789 {
10889 } 10854 }
10890 10855
10891 10856
10892 10857
10893 //----- (004B46A5) -------------------------------------------------------- 10858 //----- (004B46A5) --------------------------------------------------------
10894 char __fastcall sub_4B46A5(const char *Str, int a5) 10859 char __fastcall DrawTextAtStatusBar(const char *sText, int font_color)
10895 { 10860 {
10896 const char *v2; // esi@1
10897 int v3; // edi@1
10898 int v4; // eax@1 10861 int v4; // eax@1
10899 10862 pRenderer->DrawTextureRGB(0, 352, pTexture_StatusBar);
10900 v2 = Str; 10863 v4 = pFontLucida->AlignText_Center(450, sText);
10901 v3 = a5; 10864 return pPrimaryWindow->DrawText(pFontLucida, v4 + 11, 357, font_color, sText, 0, 0, 0);
10902 pRenderer->DrawTextureRGB(0, 0x160u, pTexture_StatusBar);
10903 v4 = pFontLucida->AlignText_Center(0x1C2u, v2);
10904 return pPrimaryWindow->DrawText(pFontLucida, v4 + 11, 357, v3, v2, 0, 0, 0);
10905 } 10865 }
10906 10866
10907 //----- (004B46F8) -------------------------------------------------------- 10867 //----- (004B46F8) --------------------------------------------------------
10908 int __fastcall sub_4B46F8(int a1) 10868 int __fastcall sub_4B46F8(int a1)
10909 { 10869 {
11609 { 11569 {
11610 if ( dword_F8B19C == 5 ) 11570 if ( dword_F8B19C == 5 )
11611 { 11571 {
11612 draw_leather(); 11572 draw_leather();
11613 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); 11573 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
11614 sub_4B46A5(pGlobalTXT_LocalizationStrings[198], 0);// "Select the Item to Repair" 11574 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[198], 0);// "Select the Item to Repair"
11615 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); 11575 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win();
11616 if ( !result 11576 if ( !result
11617 || (v27 = pMouse->GetCursorPos(&v110)->x - 14, 11577 || (v27 = pMouse->GetCursorPos(&v110)->x - 14,
11618 v117 = (v27 >> 5) + 14 * ((pMouse->GetCursorPos(&v108)->y - 17) >> 5), 11578 v117 = (v27 >> 5) + 14 * ((pMouse->GetCursorPos(&v108)->y - 17) >> 5),
11619 result = (int)pMouse->GetCursorPos(&v106), 11579 result = (int)pMouse->GetCursorPos(&v106),
11695 result = dword_F8B19C - 4; 11655 result = dword_F8B19C - 4;
11696 if ( dword_F8B19C == 4 ) 11656 if ( dword_F8B19C == 4 )
11697 { 11657 {
11698 draw_leather(); 11658 draw_leather();
11699 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); 11659 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
11700 sub_4B46A5(pGlobalTXT_LocalizationStrings[197], 0);// "Select the Item to Identify" 11660 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[197], 0);// "Select the Item to Identify"
11701 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); 11661 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win();
11702 if ( result ) 11662 if ( result )
11703 { 11663 {
11704 v2 = pMouse->GetCursorPos(&a2)->x - 14; 11664 v2 = pMouse->GetCursorPos(&a2)->x - 14;
11705 v117 = (v2 >> 5) + 14 * ((pMouse->GetCursorPos(&v98)->y - 17) >> 5); 11665 v117 = (v2 >> 5) + 14 * ((pMouse->GetCursorPos(&v98)->y - 17) >> 5);
11740 } 11700 }
11741 return result; 11701 return result;
11742 } 11702 }
11743 draw_leather(); 11703 draw_leather();
11744 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); 11704 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
11745 sub_4B46A5(pGlobalTXT_LocalizationStrings[199], 0);// "Select the Item to Sell" 11705 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[199], 0);// "Select the Item to Sell"
11746 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); 11706 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win();
11747 if ( !result 11707 if ( !result
11748 || (v11 = pMouse->GetCursorPos(&v107)->x - 14, 11708 || (v11 = pMouse->GetCursorPos(&v107)->x - 14,
11749 v117 = (v11 >> 5) + 14 * ((pMouse->GetCursorPos(&v99)->y - 17) >> 5), 11709 v117 = (v11 >> 5) + 14 * ((pMouse->GetCursorPos(&v99)->y - 17) >> 5),
11750 result = (int)pMouse->GetCursorPos(&v105), 11710 result = (int)pMouse->GetCursorPos(&v105),
11783 do 11743 do
11784 { 11744 {
11785 // if ( pParty->field_777C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) 11745 // if ( pParty->field_777C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] )
11786 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID); 11746 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID);
11787 { 11747 {
11788 v50 = dword_F8B168[v49]; 11748 v50 = ItemsInShopTexture[v49];
11789 v51 = 152 - v50->uTextureHeight; 11749 v51 = 152 - v50->uTextureHeight;
11790 if ( (signed int)v51 < 1 ) 11750 if ( (signed int)v51 < 1 )
11791 v51 = 0; 11751 v51 = 0;
11792 v52 = 75 * v49 - v50->uTextureWidth / 2 + 40; 11752 v52 = 75 * v49 - v50->uTextureWidth / 2 + 40;
11793 if ( v122 ) 11753 if ( v122 )
11794 { 11754 {
11795 if ( v122 == 5 ) 11755 if ( v122 == 5 )
11796 { 11756 {
11797 v53 = dword_F8B168[5]->uTextureWidth; 11757 v53 = ItemsInShopTexture[5]->uTextureWidth;
11798 if ( (signed int)v52 > 457 - v53 ) 11758 if ( (signed int)v52 > 457 - v53 )
11799 v52 = 457 - v53; 11759 v52 = 457 - v53;
11800 } 11760 }
11801 } 11761 }
11802 else 11762 else
11803 { 11763 {
11804 if ( (signed int)v52 < 18 ) 11764 if ( (signed int)v52 < 18 )
11805 v52 = 18; 11765 v52 = 18;
11806 } 11766 }
11807 pRenderer->DrawTextureTransparent(v52, v51, v50); 11767 pRenderer->DrawTextureTransparent(v52, v51, v50);
11808 sub_40F92A(&pRenderer->pActiveZBuffer[v52 + 640 * v51], dword_F8B168[v122], v122 + 1); 11768 sub_40F92A(&pRenderer->pActiveZBuffer[v52 + 640 * v51], ItemsInShopTexture[v122], v122 + 1);
11809 v49 = v122; 11769 v49 = v122;
11810 } 11770 }
11811 ++v49; 11771 ++v49;
11812 v122 = v49; 11772 v122 = v49;
11813 } 11773 }
11816 do 11776 do
11817 { 11777 {
11818 //if ( pParty->field_777C[9 * (v122 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] ) 11778 //if ( pParty->field_777C[9 * (v122 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] )
11819 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v122+1].uItemID); 11779 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v122+1].uItemID);
11820 { 11780 {
11821 v54 = dword_F8B168[v122 + 6]; 11781 v54 = ItemsInShopTexture[v122 + 6];
11822 v55 = 306 - v54->uTextureHeight; 11782 v55 = 306 - v54->uTextureHeight;
11823 v56 = 75 * v122 - v54->uTextureWidth / 2 + 40; 11783 v56 = 75 * v122 - v54->uTextureWidth / 2 + 40;
11824 if ( v122 ) 11784 if ( v122 )
11825 { 11785 {
11826 if ( v122 == 5 ) 11786 if ( v122 == 5 )
11827 { 11787 {
11828 v57 = dword_F8B168[11]->uTextureWidth; 11788 v57 = ItemsInShopTexture[11]->uTextureWidth;
11829 if ( (signed int)v56 > 457 - v57 ) 11789 if ( (signed int)v56 > 457 - v57 )
11830 v56 = 457 - v57; 11790 v56 = 457 - v57;
11831 } 11791 }
11832 } 11792 }
11833 else 11793 else
11834 { 11794 {
11835 if ( (signed int)v56 < 18 ) 11795 if ( (signed int)v56 < 18 )
11836 v56 = 18; 11796 v56 = 18;
11837 } 11797 }
11838 pRenderer->DrawTextureTransparent(v56, v55, v54); 11798 pRenderer->DrawTextureTransparent(v56, v55, v54);
11839 sub_40F92A(&pRenderer->pActiveZBuffer[v56 + 640 * v55], dword_F8B168[v122 + 6], v122 + 7); 11799 sub_40F92A(&pRenderer->pActiveZBuffer[v56 + 640 * v55], ItemsInShopTexture[v122 + 6], v122 + 7);
11840 } 11800 }
11841 ++v122; 11801 ++v122;
11842 } 11802 }
11843 while ( v122 < 6 ); 11803 while ( v122 < 6 );
11844 } 11804 }
11845 else 11805 else
11846 { 11806 {
11847 do 11807 do
11848 { 11808 {
11849 // if ( pParty->field_C59C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) 11809 // if ( pParty->field_C59C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] )
11850 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID) 11810 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID)
11851 { 11811 {
11852 v58 = dword_F8B168[v49]; 11812 v58 = ItemsInShopTexture[v49];
11853 v59 = 152 - v58->uTextureHeight; 11813 v59 = 152 - v58->uTextureHeight;
11854 if ( (signed int)v59 < 1 ) 11814 if ( (signed int)v59 < 1 )
11855 v59 = 0; 11815 v59 = 0;
11856 v60 = 75 * v49 - v58->uTextureWidth / 2 + 40; 11816 v60 = 75 * v49 - v58->uTextureWidth / 2 + 40;
11857 if ( v122 ) 11817 if ( v122 )
11858 { 11818 {
11859 if ( v122 == 5 ) 11819 if ( v122 == 5 )
11860 { 11820 {
11861 v61 = dword_F8B168[5]->uTextureWidth; 11821 v61 = ItemsInShopTexture[5]->uTextureWidth;
11862 if ( (signed int)v60 > 457 - v61 ) 11822 if ( (signed int)v60 > 457 - v61 )
11863 v60 = 457 - v61; 11823 v60 = 457 - v61;
11864 } 11824 }
11865 } 11825 }
11866 else 11826 else
11867 { 11827 {
11868 if ( (signed int)v60 < 18 ) 11828 if ( (signed int)v60 < 18 )
11869 v60 = 18; 11829 v60 = 18;
11870 } 11830 }
11871 pRenderer->DrawTextureTransparent(v60, v59, v58); 11831 pRenderer->DrawTextureTransparent(v60, v59, v58);
11872 sub_40F92A(&pRenderer->pActiveZBuffer[v60 + 640 * v59], dword_F8B168[v122], v122 + 1); 11832 sub_40F92A(&pRenderer->pActiveZBuffer[v60 + 640 * v59], ItemsInShopTexture[v122], v122 + 1);
11873 v49 = v122; 11833 v49 = v122;
11874 } 11834 }
11875 ++v49; 11835 ++v49;
11876 v122 = v49; 11836 v122 = v49;
11877 } 11837 }
11878 while ( v49 < 6 ); 11838 while ( v49 < 6 );
11879 v122 = 0; 11839 v122 = 0;
11880 do 11840 do
11881 { 11841 {
11882 //if ( pParty->Spell_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v49] + 778] ) //weak 11842 //if ( pParty->Spell_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v49] + 778] ) //weak
11883 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uAttributes) 11843 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uAttributes)
11884 { 11844 {
11885 v62 = dword_F8B168[v122 + 6]; 11845 v62 = ItemsInShopTexture[v122 + 6];
11886 v63 = 306 - v62->uTextureHeight; 11846 v63 = 306 - v62->uTextureHeight;
11887 if ( (signed int)v63 < 1 ) 11847 if ( (signed int)v63 < 1 )
11888 v63 = 0; 11848 v63 = 0;
11889 v64 = 75 * v122 - v62->uTextureWidth / 2 + 40; 11849 v64 = 75 * v122 - v62->uTextureWidth / 2 + 40;
11890 if ( v122 ) 11850 if ( v122 )
11891 { 11851 {
11892 if ( v122 == 5 ) 11852 if ( v122 == 5 )
11893 { 11853 {
11894 v65 = dword_F8B168[11]->uTextureWidth; 11854 v65 = ItemsInShopTexture[11]->uTextureWidth;
11895 if ( (signed int)v64 > 457 - v65 ) 11855 if ( (signed int)v64 > 457 - v65 )
11896 v64 = 457 - v65; 11856 v64 = 457 - v65;
11897 } 11857 }
11898 } 11858 }
11899 else 11859 else
11900 { 11860 {
11901 if ( (signed int)v64 < 18 ) 11861 if ( (signed int)v64 < 18 )
11902 v64 = 18; 11862 v64 = 18;
11903 } 11863 }
11904 pRenderer->DrawTextureTransparent(v64, v63, v62); 11864 pRenderer->DrawTextureTransparent(v64, v63, v62);
11905 sub_40F92A(&pRenderer->pActiveZBuffer[v64 + 640 * v63], dword_F8B168[v122 + 6], v122 + 7); 11865 sub_40F92A(&pRenderer->pActiveZBuffer[v64 + 640 * v63], ItemsInShopTexture[v122 + 6], v122 + 7);
11906 } 11866 }
11907 ++v122; 11867 ++v122;
11908 } 11868 }
11909 while ( v122 < 6 ); 11869 while ( v122 < 6 );
11910 } 11870 }
11926 else 11886 else
11927 { 11887 {
11928 do 11888 do
11929 { 11889 {
11930 //if ( pParty->field_C59C[9 * (v66 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) 11890 //if ( pParty->field_C59C[9 * (v66 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] )
11931 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v66].uItemID) 11891 if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v66].uItemID)
11932 ++v117; 11892 ++v117;
11933 ++v66; 11893 ++v66;
11934 } 11894 }
11935 while ( v66 < 12 ); 11895 while ( v66 < 12 );
11936 } 11896 }
11945 { 11905 {
11946 v69 = pGlobalTXT_LocalizationStrings[195];// "Select the Item to Buy" 11906 v69 = pGlobalTXT_LocalizationStrings[195];// "Select the Item to Buy"
11947 if ( dword_F8B19C != 2 ) 11907 if ( dword_F8B19C != 2 )
11948 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy" 11908 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy"
11949 } 11909 }
11950 sub_4B46A5(v69, 0); 11910 DrawTextAtStatusBar(v69, 0);
11951 if ( !v117 ) 11911 if ( !v117 )
11952 return (int)v112._4B1854( 11912 {
11953 __PAIR__( 11913 v112.DrawCurrentTime( pParty->field_3C.field_50[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
11954 pParty->field_3C.field_50[2 * (unsigned int)window_SpeakInHouse->ptr_1C + 1], 11914 return 0;
11955 pParty->field_3C.field_50[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) 11915 }
11956 - pParty->uTimePlayed);
11957 v70 = pMouse->GetCursorPos(&v102); 11916 v70 = pMouse->GetCursorPos(&v102);
11958 result = v70->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v100)->y]; 11917 result = v70->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v100)->y];
11959 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) 11918 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF )
11960 { 11919 {
11961 v71 = (pRenderer->pActiveZBuffer[result] & 0xFFFF) - 1; 11920 v71 = (pRenderer->pActiveZBuffer[result] & 0xFFFF) - 1;
11963 v72 = (int)window_SpeakInHouse->ptr_1C; 11922 v72 = (int)window_SpeakInHouse->ptr_1C;
11964 // v73 = 9 * (v71 + 12 * v72); 11923 // v73 = 9 * (v71 + 12 * v72);
11965 v74 = (ItemGen *)&pParty->StandartItemsInShops[v72][v71]; 11924 v74 = (ItemGen *)&pParty->StandartItemsInShops[v72][v71];
11966 if ( dword_F8B19C != 2 ) 11925 if ( dword_F8B19C != 2 )
11967 // v74 = (ItemGen *)&pParty->field_C59C[v73 + 724]; 11926 // v74 = (ItemGen *)&pParty->field_C59C[v73 + 724];
11968 v74 =&pParty->SpecialItemsInShop[v72][v71]; 11927 v74 =&pParty->SpecialItemsInShops[v72][v71];
11969 if ( v67 && Str ) 11928 if ( v67 && Str )
11970 { 11929 {
11971 v10 = pGlobalTXT_LocalizationStrings[181];// "Steal %24" 11930 v10 = pGlobalTXT_LocalizationStrings[181];// "Steal %24"
11972 v96 = 0; 11931 v96 = 0;
11973 v94 = 2; 11932 v94 = 2;
12455 v63 = 32; 12414 v63 = 32;
12456 do 12415 do
12457 { 12416 {
12458 if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v6 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) ) 12417 if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v6 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) )
12459 { 12418 {
12460 pRenderer->DrawTextureTransparent(v63, 0x5Au, dword_F8B168[v6]); 12419 pRenderer->DrawTextureTransparent(v63, 0x5Au, ItemsInShopTexture[v6]);
12461 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 230528), dword_F8B168[v6], v6 + 1); 12420 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 230528), ItemsInShopTexture[v6], v6 + 1);
12462 v1 = v58; 12421 v1 = v58;
12463 } 12422 }
12464 v63 += 70; 12423 v63 += 70;
12465 v62 += 280; 12424 v62 += 280;
12466 ++v6; 12425 ++v6;
12471 v63 = 32; 12430 v63 = 32;
12472 do 12431 do
12473 { 12432 {
12474 if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v7 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) ) 12433 if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v7 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) )
12475 { 12434 {
12476 pRenderer->DrawTextureTransparent(v63, 0xFAu, dword_F8B168[v7]); 12435 pRenderer->DrawTextureTransparent(v63, 0xFAu, ItemsInShopTexture[v7]);
12477 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 638448), dword_F8B168[v7], v7 + 1); 12436 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 638448), ItemsInShopTexture[v7], v7 + 1);
12478 v1 = v58; 12437 v1 = v58;
12479 } 12438 }
12480 v63 += 70; 12439 v63 += 70;
12481 v62 += 280; 12440 v62 += 280;
12482 ++v7; 12441 ++v7;
12498 while ( v9 ); 12457 while ( v9 );
12499 GetAsyncKeyState(17); 12458 GetAsyncKeyState(17);
12500 v11 = pGlobalTXT_LocalizationStrings[195]; 12459 v11 = pGlobalTXT_LocalizationStrings[195];
12501 if ( dword_F8B19C != 2 ) 12460 if ( dword_F8B19C != 2 )
12502 v11 = pGlobalTXT_LocalizationStrings[196]; 12461 v11 = pGlobalTXT_LocalizationStrings[196];
12503 sub_4B46A5(v11, 0); 12462 DrawTextAtStatusBar(v11, 0);
12504 if ( !v8 ) 12463 if ( !v8 )
12505 return (int)v52._4B1854( 12464 {
12465 v52.DrawCurrentTime(
12506 __PAIR__( 12466 __PAIR__(
12507 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44472], 12467 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44472],
12508 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44468]) 12468 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44468])
12509 - pParty->uTimePlayed); 12469 - pParty->uTimePlayed);
12470 return 0;
12471 }
12510 v12 = pMouse->GetCursorPos(&v51); 12472 v12 = pMouse->GetCursorPos(&v51);
12511 result = v12->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v50)->y]; 12473 result = v12->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v50)->y];
12512 v13 = pRenderer->pActiveZBuffer[result] & 0xFFFF; 12474 v13 = pRenderer->pActiveZBuffer[result] & 0xFFFF;
12513 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) 12475 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF )
12514 { 12476 {
13170 ++pMessageQueue_50CBD0->uNumMessages; 13132 ++pMessageQueue_50CBD0->uNumMessages;
13171 }*/ 13133 }*/
13172 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5); 13134 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5);
13173 return result; // void func 13135 return result; // void func
13174 } 13136 }
13175 if ( !(unsigned __int16)_449B57_test_bit( 13137 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v1->field_152, word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) )
13176 (unsigned __int8 *)v1->field_152,
13177 word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) )
13178 { 13138 {
13179 v24 = pNPCTopics[171].pText; 13139 v24 = pNPCTopics[171].pText;
13180 v25 = v31; 13140 v25 = v31;
13181 v26 = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &v28, 0, 0); 13141 v26 = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &v28, 0, 0);
13182 v28.DrawTitleText(pFontArrus, 0, (212 - v26) / 2 + 101, v25, v24, 3u); 13142 v28.DrawTitleText(pFontArrus, 0, (212 - v26) / 2 + 101, v25, v24, 3u);
14247 uCurrentHouse_Animation = v23; 14207 uCurrentHouse_Animation = v23;
14248 return result; 14208 return result;
14249 } 14209 }
14250 14210
14251 //----- (0044606A) -------------------------------------------------------- 14211 //----- (0044606A) --------------------------------------------------------
14252 void PrepareHouse(HOUSE_TYPE house) 14212 void PrepareHouse(HOUSE_ID house)
14253 { 14213 {
14254 //unsigned int v1; // ebx@1 14214 //unsigned int v1; // ebx@1
14255 //signed int v2; // esi@1 14215 //signed int v2; // esi@1
14256 //int uExitPic; // edi@1 14216 //int uExitPic; // edi@1
14257 __int16 uExitMapID; // ax@2 14217 __int16 uExitMapID; // ax@2
14370 } 14330 }
14371 14331
14372 14332
14373 14333
14374 //----- (0044622E) -------------------------------------------------------- 14334 //----- (0044622E) --------------------------------------------------------
14375 bool __fastcall EnterHouse(HOUSE_TYPE uHouseID) 14335 bool __fastcall EnterHouse(enum HOUSE_ID uHouseID)
14376 { 14336 {
14377 //enum HOUSE_TYPE v1; // edi@1 14337 //enum HOUSE_ID v1; // edi@1
14378 //int v2; // edi@5 14338 //int v2; // edi@5
14379 unsigned int uOpenTime; // eax@5 14339 unsigned int uOpenTime; // eax@5
14380 int uCloseTime; // esi@5 14340 int uCloseTime; // esi@5
14381 unsigned int v5; // esi@5 14341 unsigned int v5; // esi@5
14382 int v6; // edx@5 14342 int v6; // edx@5
14395 signed int v19; // edi@41 14355 signed int v19; // edi@41
14396 //unsigned int v20; // ecx@41 14356 //unsigned int v20; // ecx@41
14397 //const char *v22; // [sp-4h] [bp-40h]@33 14357 //const char *v22; // [sp-4h] [bp-40h]@33
14398 char pContainer[40]; // [sp+Ch] [bp-30h]@32 14358 char pContainer[40]; // [sp+Ch] [bp-30h]@32
14399 unsigned int v24; // [sp+34h] [bp-8h]@5 14359 unsigned int v24; // [sp+34h] [bp-8h]@5
14400 //enum HOUSE_TYPE v25; // [sp+38h] [bp-4h]@1 14360 //enum HOUSE_ID v25; // [sp+38h] [bp-4h]@1
14401 14361
14402 //v1 = uHouseID; 14362 //v1 = uHouseID;
14403 //v25 = uHouseID; 14363 //v25 = uHouseID;
14404 GameUI_StatusBar_TimedString[0] = 0; 14364 GameUI_StatusBar_TimedString[0] = 0;
14405 pStatusBarString[0] = 0; 14365 pStatusBarString[0] = 0;
14474 LABEL_21: 14434 LABEL_21:
14475 if ( !start_event_seq_number ) 14435 if ( !start_event_seq_number )
14476 pAudioPlayer->StopChannels(-1, -1); 14436 pAudioPlayer->StopChannels(-1, -1);
14477 //uCurrentHouse_Animation = p2DEvents_minus1___02[v2]; 14437 //uCurrentHouse_Animation = p2DEvents_minus1___02[v2];
14478 uCurrentHouse_Animation = p2DEvents[uHouseID - 1].uAnimationID; 14438 uCurrentHouse_Animation = p2DEvents[uHouseID - 1].uAnimationID;
14479 dword_F8B198 = LOBYTE(pAnimatedRooms[uCurrentHouse_Animation].field_C); 14439 in_current_bilding_type = LOBYTE(pAnimatedRooms[uCurrentHouse_Animation].field_C);
14480 if ( dword_F8B198 == 20 && pParty->uFine ) // going 2 jail 14440 if ( in_current_bilding_type == BildingType_20 && pParty->uFine ) // going 2 jail
14481 { 14441 {
14482 uCurrentHouse_Animation = (signed __int16)p2DEvents[186].uAnimationID; 14442 uCurrentHouse_Animation = (signed __int16)p2DEvents[186].uAnimationID;
14483 //v25 = HOUSE_187; 14443 //v25 = HOUSE_187;
14484 uHouseID = HOUSE_JAIL; 14444 uHouseID = HOUSE_JAIL;
14485 v12 = LODWORD(pParty->uTimePlayed); 14445 v12 = LODWORD(pParty->uTimePlayed);
14486 LODWORD(pParty->uTimePlayed) += 0x7620000u; 14446 LODWORD(pParty->uTimePlayed) += 0x7620000u;
14487 v14 = LOBYTE(pAnimatedRooms[(signed __int16)p2DEvents[HOUSE_186].uAnimationID].field_C); 14447 v14 = LOBYTE(pAnimatedRooms[(signed __int16)p2DEvents[HOUSE_LORD_AND_JUDGE].uAnimationID].field_C);
14488 pParty->uTimePlayed = __PAIR__(HIDWORD(pParty->uTimePlayed), v12) + 0x7620000; 14448 pParty->uTimePlayed = __PAIR__(HIDWORD(pParty->uTimePlayed), v12) + 0x7620000;
14489 dword_F8B198 = v14; 14449 in_current_bilding_type = v14;
14490 //v13 = pParty->pPlayers;//[0].uNumDivineInterventionCastsThisDay; 14450 //v13 = pParty->pPlayers;//[0].uNumDivineInterventionCastsThisDay;
14491 //do 14451 //do
14492 ++pParty->uNumPrisonTerms; 14452 ++pParty->uNumPrisonTerms;
14493 pParty->uFine = 0; 14453 pParty->uFine = 0;
14494 for (uint i = 0; i < 4; ++i) 14454 for (uint i = 0; i < 4; ++i)