Mercurial > mm7
comparison mm7_4.cpp @ 468:8822405efad2
Слияние
author | Ritor1 |
---|---|
date | Mon, 25 Feb 2013 11:10:57 +0600 |
parents | 5d2667144526 e9f40d344067 |
children | 0dbf780e247f |
comparison
equal
deleted
inserted
replaced
467:5d2667144526 | 468:8822405efad2 |
---|---|
4913 memset(pTmpBuf2, 0, sizeof(pTmpBuf2)); | 4913 memset(pTmpBuf2, 0, sizeof(pTmpBuf2)); |
4914 | 4914 |
4915 NPCData *npc = nullptr; | 4915 NPCData *npc = nullptr; |
4916 if ( dword_5C35D4 ) | 4916 if ( dword_5C35D4 ) |
4917 { | 4917 { |
4918 __debugbreak(); // fix | 4918 //__debugbreak(); // fix |
4919 npc = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) - 1)]; | 4919 npc = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) - 1)]; |
4920 } | 4920 } |
4921 else | 4921 else |
4922 npc = GetNPCData(uDialogue_SpeakingActorNPC_ID); | 4922 npc = GetNPCData(uDialogue_SpeakingActorNPC_ID); |
4923 //v65 = v9; | 4923 //v65 = v9; |
8920 } | 8920 } |
8921 v6 = pParty->uTimePlayed + 368640; | 8921 v6 = pParty->uTimePlayed + 368640; |
8922 pParty->field_3C._shop_ban_times[2 * a1] = LODWORD(pParty->uTimePlayed) + 368640; | 8922 pParty->field_3C._shop_ban_times[2 * a1] = LODWORD(pParty->uTimePlayed) + 368640; |
8923 pParty->field_3C._shop_ban_times[2 * a1 + 1] = HIDWORD(v6); | 8923 pParty->field_3C._shop_ban_times[2 * a1 + 1] = HIDWORD(v6); |
8924 LABEL_13: | 8924 LABEL_13: |
8925 *(int *)&pParty->field_16154[4 * a1] = 1; | 8925 pParty->InTheShopFlags[a1] = 1; |
8926 if ( v3 ) | 8926 if ( v3 ) |
8927 { | 8927 { |
8928 v7 = &pOutdoor->ddm; | 8928 v7 = &pOutdoor->ddm; |
8929 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor ) | 8929 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor ) |
8930 v7 = &pIndoor->dlv; | 8930 v7 = &pIndoor->dlv; |
9053 return result; | 9053 return result; |
9054 } | 9054 } |
9055 // F8B1E0: using guessed type int dword_F8B1E0; | 9055 // F8B1E0: using guessed type int dword_F8B1E0; |
9056 | 9056 |
9057 | 9057 |
9058 | 9058 //view item details in shop? |
9059 //----- (004B1A2D) -------------------------------------------------------- | 9059 //----- (004B1A2D) -------------------------------------------------------- |
9060 void __cdecl sub_4B1A2D() | 9060 void __cdecl sub_4B1A2D() |
9061 { | 9061 { |
9062 //Player *v0; // edi@1 | 9062 //Player *v0; // edi@1 |
9063 POINT *v1; // esi@5 | 9063 POINT *v1; // esi@5 |
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->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v5]; | 9116 v7 =&pParty->SpecialItemsInShop[(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 ( dword_F8B198 <= 16 && dword_F8B19C == 18 ) |
9120 { | 9120 { |
9121 v1 = pMouse->GetCursorPos(&a2); | 9121 v1 = pMouse->GetCursorPos(&a2); |
10363 0, | 10363 0, |
10364 "", | 10364 "", |
10365 0); | 10365 0); |
10366 } | 10366 } |
10367 | 10367 |
10368 //----- (004B3703) -------------------------------------------------------- | |
10369 int __thiscall sub_4B3703(void *_this) | |
10370 { | |
10371 signed int v1; // edi@1 | |
10372 int v2; // eax@1 | |
10373 char *v3; // ecx@1 | |
10374 signed int v4; // ebx@1 | |
10375 int v5; // ecx@2 | |
10376 int v6; // ecx@3 | |
10377 int v7; // ecx@4 | |
10378 int v8; // ecx@5 | |
10379 int v9; // ecx@6 | |
10380 signed int v10; // ebx@13 | |
10381 signed int v11; // edi@14 | |
10382 signed int v12; // esi@15 | |
10383 unsigned int v13; // ecx@16 | |
10384 int v14; // ecx@16 | |
10385 int v15; // ecx@17 | |
10386 int v16; // ecx@19 | |
10387 int v17; // ecx@20 | |
10388 int v18; // ecx@21 | |
10389 signed int v19; // esi@32 | |
10390 char *v20; // ecx@33 | |
10391 int v21; // ecx@34 | |
10392 int v22; // ecx@36 | |
10393 int v23; // ecx@37 | |
10394 int v24; // ecx@38 | |
10395 int v25; // ecx@39 | |
10396 int v26; // ecx@40 | |
10397 int v27; // ecx@41 | |
10398 int *v28; // esi@54 | |
10399 unsigned int v29; // edx@56 | |
10400 char *v30; // ecx@65 | |
10401 int v31; // ecx@106 | |
10402 int result; // eax@107 | |
10403 int v33; // [sp-4h] [bp-2Ch]@23 | |
10404 int v34; // [sp-4h] [bp-2Ch]@43 | |
10405 int v35[5]; // [sp+Ch] [bp-1Ch]@8 | |
10406 int a2; // [sp+20h] [bp-8h]@1 | |
10407 int v37; // [sp+24h] [bp-4h]@1 | |
10408 | |
10409 v1 = 0; | |
10410 v2 = 0; | |
10411 v3 = (char *)_this - 1; | |
10412 a2 = 0; | |
10413 v37 = 0; | |
10414 dword_F8B1DC = 0; | |
10415 v4 = 2; | |
10416 if ( !v3 ) | |
10417 { | |
10418 while ( 1 ) | |
10419 { | |
10420 v19 = 1; | |
10421 do | |
10422 { | |
10423 v20 = (char *)window_SpeakInHouse->ptr_1C + 4 * (unsigned int)window_SpeakInHouse->ptr_1C + v19; | |
10424 if ( v1 ) | |
10425 v21 = word_4F063E[(signed int)v20]; | |
10426 else | |
10427 v21 = word_4F0404[(signed int)v20 - 4];//word_4F03FE[(signed int)v20]; | |
10428 v22 = v21 - 23; | |
10429 if ( v22 ) | |
10430 { | |
10431 v23 = v22 - 1; | |
10432 if ( v23 ) | |
10433 { | |
10434 v24 = v23 - 1; | |
10435 if ( v24 ) | |
10436 { | |
10437 v25 = v24 - 1; | |
10438 if ( v25 ) | |
10439 { | |
10440 v26 = v25 - 1; | |
10441 if ( v26 ) | |
10442 { | |
10443 v27 = v26 - 1; | |
10444 if ( v27 ) | |
10445 { | |
10446 if ( v27 != v4 ) | |
10447 goto LABEL_51; | |
10448 v34 = 36; | |
10449 } | |
10450 else | |
10451 { | |
10452 v34 = 42; | |
10453 } | |
10454 } | |
10455 else | |
10456 { | |
10457 v34 = 41; | |
10458 } | |
10459 } | |
10460 else | |
10461 { | |
10462 v34 = 40; | |
10463 } | |
10464 } | |
10465 else | |
10466 { | |
10467 v34 = 39; | |
10468 } | |
10469 } | |
10470 else | |
10471 { | |
10472 v34 = 38; | |
10473 } | |
10474 } | |
10475 else | |
10476 { | |
10477 v34 = 37; | |
10478 } | |
10479 v37 = sub_4BE571(v34, v35, v37, 5); | |
10480 v2 = dword_F8B1DC; | |
10481 v4 = 2; | |
10482 LABEL_51: | |
10483 ++v19; | |
10484 } | |
10485 while ( v19 <= 4 ); | |
10486 ++v1; | |
10487 if ( v1 >= v4 ) | |
10488 goto LABEL_53; | |
10489 } | |
10490 } | |
10491 v5 = (int)(v3 - 1); | |
10492 if ( !v5 ) | |
10493 { | |
10494 v10 = 0; | |
10495 while ( 1 ) | |
10496 { | |
10497 v11 = 0; | |
10498 do | |
10499 { | |
10500 v12 = 1; | |
10501 do | |
10502 { | |
10503 v13 = v11 + 2 * (unsigned int)window_SpeakInHouse->ptr_1C - 30; | |
10504 v14 = v12 + 4 * v13 + v13; | |
10505 if ( v10 ) | |
10506 v15 = word_4F06D8[v14]; | |
10507 else | |
10508 v15 = word_4F0498[v14]; | |
10509 v16 = v15 - 31; | |
10510 if ( v16 ) | |
10511 { | |
10512 v17 = v16 - 1; | |
10513 if ( v17 ) | |
10514 { | |
10515 v18 = v17 - 1; | |
10516 if ( v18 ) | |
10517 { | |
10518 if ( v18 != 1 ) | |
10519 goto LABEL_28; | |
10520 v33 = 44; | |
10521 } | |
10522 else | |
10523 { | |
10524 v33 = 47; | |
10525 } | |
10526 } | |
10527 else | |
10528 { | |
10529 v33 = 46; | |
10530 } | |
10531 } | |
10532 else | |
10533 { | |
10534 v33 = 45; | |
10535 } | |
10536 v37 = sub_4BE571(v33, v35, v37, 5); | |
10537 v2 = dword_F8B1DC; | |
10538 LABEL_28: | |
10539 ++v12; | |
10540 } | |
10541 while ( v12 <= 4 ); | |
10542 ++v11; | |
10543 } | |
10544 while ( v11 < 2 ); | |
10545 ++v10; | |
10546 if ( v10 >= 2 ) | |
10547 goto LABEL_53; | |
10548 } | |
10549 } | |
10550 v6 = v5 - 1; | |
10551 if ( v6 ) | |
10552 { | |
10553 v7 = v6 - 1; | |
10554 if ( v7 ) | |
10555 { | |
10556 v8 = v7 - 17; | |
10557 if ( v8 ) | |
10558 { | |
10559 v9 = v8 - 2; | |
10560 if ( v9 ) | |
10561 { | |
10562 if ( v9 == 7 ) | |
10563 { | |
10564 v37 = 2; | |
10565 v35[0] = 69; | |
10566 v35[1] = 60; | |
10567 } | |
10568 } | |
10569 else | |
10570 { | |
10571 v37 = 3; | |
10572 v35[0] = 67; | |
10573 v35[1] = 66; | |
10574 v35[2] = 58; | |
10575 } | |
10576 } | |
10577 else | |
10578 { | |
10579 v37 = 3; | |
10580 v35[0] = 70; | |
10581 v35[1] = 65; | |
10582 v35[2] = 62; | |
10583 } | |
10584 } | |
10585 else | |
10586 { | |
10587 v37 = 2; | |
10588 v35[0] = 71; | |
10589 v35[1] = 68; | |
10590 } | |
10591 } | |
10592 else | |
10593 { | |
10594 v37 = 2; | |
10595 v35[0] = 57; | |
10596 v35[1] = 59; | |
10597 } | |
10598 LABEL_53: | |
10599 if ( v37 > 0 ) | |
10600 { | |
10601 v28 = v35; | |
10602 while ( 1 ) | |
10603 { | |
10604 v29 = *v28; | |
10605 if ( *v28 <= 47 ) | |
10606 break; | |
10607 if ( (signed int)v29 <= 66 ) | |
10608 { | |
10609 if ( v29 == 66 ) | |
10610 { | |
10611 v30 = pSkillNames[30]; | |
10612 goto LABEL_106; | |
10613 } | |
10614 if ( v29 == 57 ) | |
10615 { | |
10616 v30 = pSkillNames[21]; | |
10617 goto LABEL_106; | |
10618 } | |
10619 if ( v29 == 58 ) | |
10620 { | |
10621 v30 = pSkillNames[22]; | |
10622 goto LABEL_106; | |
10623 } | |
10624 if ( v29 == 60 ) | |
10625 { | |
10626 v30 = pSkillNames[24]; | |
10627 goto LABEL_106; | |
10628 } | |
10629 if ( v29 == 62 ) | |
10630 { | |
10631 v30 = pSkillNames[26]; | |
10632 goto LABEL_106; | |
10633 } | |
10634 if ( v29 == 65 ) | |
10635 { | |
10636 v30 = pSkillNames[29]; | |
10637 goto LABEL_106; | |
10638 } | |
10639 goto LABEL_100; | |
10640 } | |
10641 switch ( v29 ) | |
10642 { | |
10643 case 0x43u: | |
10644 v30 = pSkillNames[31]; | |
10645 break; | |
10646 case 0x44u: | |
10647 v30 = pSkillNames[32]; | |
10648 break; | |
10649 case 0x45u: | |
10650 v30 = pSkillNames[33]; | |
10651 break; | |
10652 case 0x46u: | |
10653 v30 = pSkillNames[34]; | |
10654 break; | |
10655 default: | |
10656 if ( v29 != 71 ) | |
10657 goto LABEL_100; | |
10658 v30 = pSkillNames[35]; | |
10659 break; | |
10660 } | |
10661 LABEL_106: | |
10662 pShopOptions[v2] = v30; | |
10663 v31 = a2++; | |
10664 dword_F8B1DC = v2 + 1; | |
10665 sub_4B36CC(v31, v29); | |
10666 ++v28; | |
10667 if ( a2 >= v37 ) | |
10668 goto LABEL_107; | |
10669 v2 = dword_F8B1DC; | |
10670 } | |
10671 if ( *v28 == 47 ) | |
10672 { | |
10673 v30 = pSkillNames[11]; | |
10674 goto LABEL_106; | |
10675 } | |
10676 if ( (signed int)v29 > 40 ) | |
10677 { | |
10678 if ( v29 == 41 ) | |
10679 { | |
10680 v30 = pSkillNames[5]; | |
10681 goto LABEL_106; | |
10682 } | |
10683 if ( v29 == 42 ) | |
10684 { | |
10685 v30 = pSkillNames[6]; | |
10686 goto LABEL_106; | |
10687 } | |
10688 if ( v29 == 44 ) | |
10689 { | |
10690 v30 = pSkillNames[8]; | |
10691 goto LABEL_106; | |
10692 } | |
10693 if ( v29 == 45 ) | |
10694 { | |
10695 v30 = pSkillNames[9]; | |
10696 goto LABEL_106; | |
10697 } | |
10698 if ( v29 == 46 ) | |
10699 { | |
10700 v30 = pSkillNames[10]; | |
10701 goto LABEL_106; | |
10702 } | |
10703 } | |
10704 else | |
10705 { | |
10706 if ( v29 == 40 ) | |
10707 { | |
10708 v30 = pSkillNames[4]; | |
10709 goto LABEL_106; | |
10710 } | |
10711 if ( v29 == 5 ) | |
10712 { | |
10713 v30 = pSkillNames[23]; | |
10714 goto LABEL_106; | |
10715 } | |
10716 if ( v29 == 36 ) | |
10717 { | |
10718 v30 = pSkillNames[0]; | |
10719 goto LABEL_106; | |
10720 } | |
10721 if ( v29 == 37 ) | |
10722 { | |
10723 v30 = pSkillNames[1]; | |
10724 goto LABEL_106; | |
10725 } | |
10726 if ( v29 == 38 ) | |
10727 { | |
10728 v30 = pSkillNames[2]; | |
10729 goto LABEL_106; | |
10730 } | |
10731 if ( v29 == 39 ) | |
10732 { | |
10733 v30 = pSkillNames[3]; | |
10734 goto LABEL_106; | |
10735 } | |
10736 } | |
10737 LABEL_100: | |
10738 v30 = pGlobalTXT_LocalizationStrings[127]; | |
10739 goto LABEL_106; | |
10740 } | |
10741 LABEL_107: | |
10742 pDialogueWindow->_41D08F(a2, 1, 0, 2); | |
10743 result = pDialogueWindow->pNumPresenceButton; | |
10744 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; | |
10745 return result; | |
10746 } | |
10747 | 10368 |
10748 | 10369 |
10749 //----- (004B3A72) -------------------------------------------------------- | 10370 //----- (004B3A72) -------------------------------------------------------- |
10750 int __thiscall sub_4B3A72(int a1) | 10371 int __thiscall sub_4B3A72(int a1) |
10751 { | 10372 { |
12159 if ( dword_F8B19C == 2 ) | 11780 if ( dword_F8B19C == 2 ) |
12160 { | 11781 { |
12161 do | 11782 do |
12162 { | 11783 { |
12163 // if ( pParty->field_777C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) | 11784 // if ( pParty->field_777C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) |
12164 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID); | 11785 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID); |
12165 { | 11786 { |
12166 v50 = dword_F8B168[v49]; | 11787 v50 = dword_F8B168[v49]; |
12167 v51 = 152 - v50->uTextureHeight; | 11788 v51 = 152 - v50->uTextureHeight; |
12168 if ( (signed int)v51 < 1 ) | 11789 if ( (signed int)v51 < 1 ) |
12169 v51 = 0; | 11790 v51 = 0; |
12192 while ( v49 < 6 ); | 11813 while ( v49 < 6 ); |
12193 v122 = 0; | 11814 v122 = 0; |
12194 do | 11815 do |
12195 { | 11816 { |
12196 //if ( pParty->field_777C[9 * (v122 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] ) | 11817 //if ( pParty->field_777C[9 * (v122 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] ) |
12197 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v122+1].uItemID); | 11818 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v122+1].uItemID); |
12198 { | 11819 { |
12199 v54 = dword_F8B168[v122 + 6]; | 11820 v54 = dword_F8B168[v122 + 6]; |
12200 v55 = 306 - v54->uTextureHeight; | 11821 v55 = 306 - v54->uTextureHeight; |
12201 v56 = 75 * v122 - v54->uTextureWidth / 2 + 40; | 11822 v56 = 75 * v122 - v54->uTextureWidth / 2 + 40; |
12202 if ( v122 ) | 11823 if ( v122 ) |
12223 else | 11844 else |
12224 { | 11845 { |
12225 do | 11846 do |
12226 { | 11847 { |
12227 // if ( pParty->field_C59C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 11848 // if ( pParty->field_C59C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
12228 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID) | 11849 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID) |
12229 { | 11850 { |
12230 v58 = dword_F8B168[v49]; | 11851 v58 = dword_F8B168[v49]; |
12231 v59 = 152 - v58->uTextureHeight; | 11852 v59 = 152 - v58->uTextureHeight; |
12232 if ( (signed int)v59 < 1 ) | 11853 if ( (signed int)v59 < 1 ) |
12233 v59 = 0; | 11854 v59 = 0; |
12256 while ( v49 < 6 ); | 11877 while ( v49 < 6 ); |
12257 v122 = 0; | 11878 v122 = 0; |
12258 do | 11879 do |
12259 { | 11880 { |
12260 //if ( pParty->Spell_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v49] + 778] ) //weak | 11881 //if ( pParty->Spell_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v49] + 778] ) //weak |
12261 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uAttributes) | 11882 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uAttributes) |
12262 { | 11883 { |
12263 v62 = dword_F8B168[v122 + 6]; | 11884 v62 = dword_F8B168[v122 + 6]; |
12264 v63 = 306 - v62->uTextureHeight; | 11885 v63 = 306 - v62->uTextureHeight; |
12265 if ( (signed int)v63 < 1 ) | 11886 if ( (signed int)v63 < 1 ) |
12266 v63 = 0; | 11887 v63 = 0; |
12293 v117 = 0; | 11914 v117 = 0; |
12294 if ( dword_F8B19C == 2 ) | 11915 if ( dword_F8B19C == 2 ) |
12295 { | 11916 { |
12296 do | 11917 do |
12297 { | 11918 { |
12298 if ( pParty->field_777C[(unsigned int)window_SpeakInHouse->ptr_1C][v66].uItemID); //9 * (v66 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) | 11919 if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v66].uItemID); //9 * (v66 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) |
12299 ++v117; | 11920 ++v117; |
12300 ++v66; | 11921 ++v66; |
12301 } | 11922 } |
12302 while ( v66 < 12 ); | 11923 while ( v66 < 12 ); |
12303 } | 11924 } |
12304 else | 11925 else |
12305 { | 11926 { |
12306 do | 11927 do |
12307 { | 11928 { |
12308 //if ( pParty->field_C59C[9 * (v66 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) | 11929 //if ( pParty->field_C59C[9 * (v66 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) |
12309 if (pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v66].uItemID) | 11930 if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v66].uItemID) |
12310 ++v117; | 11931 ++v117; |
12311 ++v66; | 11932 ++v66; |
12312 } | 11933 } |
12313 while ( v66 < 12 ); | 11934 while ( v66 < 12 ); |
12314 } | 11935 } |
12338 { | 11959 { |
12339 v71 = (pRenderer->pActiveZBuffer[result] & 0xFFFF) - 1; | 11960 v71 = (pRenderer->pActiveZBuffer[result] & 0xFFFF) - 1; |
12340 v117 = v71; | 11961 v117 = v71; |
12341 v72 = (int)window_SpeakInHouse->ptr_1C; | 11962 v72 = (int)window_SpeakInHouse->ptr_1C; |
12342 // v73 = 9 * (v71 + 12 * v72); | 11963 // v73 = 9 * (v71 + 12 * v72); |
12343 v74 = (ItemGen *)&pParty->field_777C[v72][v71]; | 11964 v74 = (ItemGen *)&pParty->StandartItemsInShops[v72][v71]; |
12344 if ( dword_F8B19C != 2 ) | 11965 if ( dword_F8B19C != 2 ) |
12345 // v74 = (ItemGen *)&pParty->field_C59C[v73 + 724]; | 11966 // v74 = (ItemGen *)&pParty->field_C59C[v73 + 724]; |
12346 v74 =&pParty->Recipes_Item[v72][v71]; | 11967 v74 =&pParty->SpecialItemsInShop[v72][v71]; |
12347 if ( v67 && Str ) | 11968 if ( v67 && Str ) |
12348 { | 11969 { |
12349 v10 = pGlobalTXT_LocalizationStrings[181];// "Steal %24" | 11970 v10 = pGlobalTXT_LocalizationStrings[181];// "Steal %24" |
12350 v96 = 0; | 11971 v96 = 0; |
12351 v94 = 2; | 11972 v94 = 2; |
13437 return result; | 13058 return result; |
13438 } | 13059 } |
13439 | 13060 |
13440 | 13061 |
13441 | 13062 |
13442 //----- (004B8F94) -------------------------------------------------------- | |
13443 void sub_4B8F94() | |
13444 { | |
13445 GUIWindow *v0; // edi@1 | |
13446 signed int v1; // ebp@1 | |
13447 int v2; // ebx@1 | |
13448 signed int v3; // esi@1 | |
13449 int v4; // eax@3 | |
13450 int v5; // ebx@3 | |
13451 int v6; // ecx@3 | |
13452 bool v7; // eax@5 | |
13453 bool v8; // ST1C_4@5 | |
13454 int v9; // eax@5 | |
13455 int v10; // eax@10 | |
13456 void *result; // eax@15 | |
13457 signed int v12; // [sp-4h] [bp-18h]@7 | |
13458 | |
13459 v0 = window_SpeakInHouse; | |
13460 v1 = 0; | |
13461 v2 = (int)&window_SpeakInHouse->ptr_1C; | |
13462 v3 = (signed int)window_SpeakInHouse->ptr_1C; | |
13463 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)ptr_507BC0->ptr_1C]] ) | |
13464 if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) | |
13465 { | |
13466 while ( v3 > 14 ) | |
13467 { | |
13468 if ( v3 <= 28 ) | |
13469 { | |
13470 v7 = v1 > 3; | |
13471 v8 = v7; | |
13472 v9 = 5 * (v7 + 2 * v3 - 30); | |
13473 v3 = (signed int)v0->ptr_1C; | |
13474 v5 = word_4F06D8[v9]; | |
13475 v6 = word_4F05AE[5 * (v8 + 2 * v3) + rand() % 4]; | |
13476 goto LABEL_13; | |
13477 } | |
13478 if ( v3 <= 41 ) | |
13479 { | |
13480 v5 = word_4F07B6[v3]; | |
13481 v12 = 22; | |
13482 goto LABEL_12; | |
13483 } | |
13484 if ( v3 <= 53 ) | |
13485 { | |
13486 if ( v1 >= 6 ) | |
13487 { | |
13488 v5 = word_4F07B6[v3 + 1]; | |
13489 v12 = 44; | |
13490 LABEL_12: | |
13491 v6 = v12; | |
13492 LABEL_13: | |
13493 pItemsTable->GenerateItem(v5, v6,&pParty->Recipes_Item[v3][v1]);//(ItemGen *)&pParty->field_C59C[9 * (v1 + 12 * v3) + 724]); | |
13494 v0 = window_SpeakInHouse; | |
13495 v2 = (int)&window_SpeakInHouse->ptr_1C; | |
13496 // pParty->field_C59C[9 * (v1 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 729] = 1; | |
13497 pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v1].uAttributes= 1; | |
13498 goto LABEL_14; | |
13499 } | |
13500 // auto _a = (ItemGen *)&pParty->field_C59C[9 * (v1 + 12 * v3) + 724]; | |
13501 auto _a =&pParty->Recipes_Item[v3][v1]; | |
13502 _a->Reset(); | |
13503 // v2 = (int)&v0->ptr_1C; | |
13504 //v10 = rand(); | |
13505 // v0 = window_SpeakInHouse; | |
13506 // pParty->field_C59C[9 * (v1 + 12 * *(int *)v2) + 724] = v10 % 32 + 740; | |
13507 pParty->Recipes_Item[(int)v0->ptr_1C][v1].uItemID= rand() % 32 + 740; | |
13508 } | |
13509 LABEL_14: | |
13510 v3 = *(int *)v2; | |
13511 ++v1; | |
13512 //if ( v1 >= (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * *(int *)v2]] ) | |
13513 if ( v1 >= (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[*(int *)v2 - 1].uType] ) | |
13514 goto LABEL_15; | |
13515 } | |
13516 v4 = 5 * v3; | |
13517 v3 = (signed int)v0->ptr_1C; | |
13518 v5 = word_4F063E[v4]; | |
13519 v6 = word_4F063E[5 * v3 + rand() % 4 + 1]; | |
13520 goto LABEL_13; | |
13521 } | |
13522 LABEL_15: | |
13523 result = v0->ptr_1C; | |
13524 pParty->field_16154[(int)v0->ptr_1C] = 0; | |
13525 } | |
13526 | |
13527 | |
13528 //----- (004B6478) -------------------------------------------------------- | 13063 //----- (004B6478) -------------------------------------------------------- |
13529 int __cdecl sub_4B6478() | 13064 int __cdecl sub_4B6478() |
13530 { | 13065 { |
13531 GUIWindow *v0; // ebx@1 | 13066 GUIWindow *v0; // ebx@1 |
13532 Player *v1; // edi@1 | 13067 Player *v1; // edi@1 |