comparison mm7_2.cpp @ 611:7bae884b7cd0

Слияние
author Ritor1
date Wed, 06 Mar 2013 20:16:06 +0600
parents 42d5777c2f47 a463d7784d33
children 5bf285f56fa8
comparison
equal deleted inserted replaced
610:c615ff03b144 611:7bae884b7cd0
3245 v24 = -1; 3245 v24 = -1;
3246 v23 = 0; 3246 v23 = 0;
3247 v22 = 0; 3247 v22 = 0;
3248 v21 = (SoundID)11090; 3248 v21 = (SoundID)11090;
3249 } 3249 }
3250 goto LABEL_40; 3250 pAudioPlayer->PlaySound(v21, v22, v23, v24, v25, v27, v29, v31);
3251 return 0;
3251 } 3252 }
3252 if ( a1 == 10 ) 3253 if ( a1 == 10 )
3253 { 3254 {
3254 v18 = pParty->pPlayers; 3255 v18 = pParty->pPlayers;
3255 do 3256 do
3826 v2 = 0; 3827 v2 = 0;
3827 for(int i=0; i<12; ++i) 3828 for(int i=0; i<12; ++i)
3828 { 3829 {
3829 //v3 = p2DEvents_minus1___00[26 * (unsigned int)ptr_507BC0->ptr_1C]; 3830 //v3 = p2DEvents_minus1___00[26 * (unsigned int)ptr_507BC0->ptr_1C];
3830 v3 = p2DEvents[window_SpeakInHouse->par1C - 1].uType; 3831 v3 = p2DEvents[window_SpeakInHouse->par1C - 1].uType;
3831 if ( v3 < 5 ) 3832 if ( v3 >= 5 )
3832 goto LABEL_12; 3833 {
3833 if ( v3 <= 13 ) 3834 if ( v3 <= 13 )
3834 { 3835 {
3835 v0 = rand() % word_4F0F30[(signed int)v1] 3836 v0 = rand() % word_4F0F30[(signed int)v1]
3836 //+ 11 * p2DEvents_minus1___00[26 * (unsigned int)ptr_507BC0->ptr_1C] 3837 //+ 11 * p2DEvents_minus1___00[26 * (unsigned int)ptr_507BC0->ptr_1C]
3837 + 11 * p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType 3838 + 11 * p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType
3838 + 345; 3839 + 345;
3839 } 3840 }
3840 else 3841 else
3841 { 3842 {
3842 if ( v3 == 14 ) 3843 if ( v3 == 14 )
3843 { 3844 {
3844 v4 = rand() % 4; 3845 v4 = rand() % 4;
3845 } 3846 }
3846 else 3847 else if ( v3 == 15 )
3847 { 3848 {
3848 if ( v3 == 15 ) 3849 v4 = rand() % 3 + 4;
3849 { 3850 }
3850 v4 = rand() % 3 + 4; 3851 else if ( v3 == 16 )
3851 } 3852 v4 = rand() % 2 + 7;
3852 else 3853 if( v3 <= 16 )
3853 { 3854 v0 = rand() % word_4F0F30[(signed int)v1] + 11 * v4 + 400;
3854 if ( v3 != 16 ) 3855 }
3855 goto LABEL_12; 3856 }
3856 v4 = rand() % 2 + 7;
3857 }
3858 }
3859 v0 = rand() % word_4F0F30[(signed int)v1] + 11 * v4 + 400;
3860 }
3861 LABEL_12:
3862 if ( v0 == 487 ) 3857 if ( v0 == 487 )
3863 { 3858 {
3864 if ( !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 239) ) 3859 if ( !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 239) )
3865 v0 = 486; 3860 v0 = 486;
3866 } 3861 }
3956 if ( !pDialogueWindow->pNumPresenceButton ) 3951 if ( !pDialogueWindow->pNumPresenceButton )
3957 return; 3952 return;
3958 pRenderer->ClearZBuffer(0, 479); 3953 pRenderer->ClearZBuffer(0, 479);
3959 //v3 = dword_F8B198; 3954 //v3 = dword_F8B198;
3960 if ( dword_F8B19C != 1 ) 3955 if ( dword_F8B19C != 1 )
3961 goto LABEL_13; 3956 {
3962 if ( in_current_building_type == BildingType_Training ) 3957 v8 = window_SpeakInHouse;
3963 { 3958 }
3964 if ( uMessageParam == 17 ) 3959 else
3965 { 3960 {
3966 v4 = 0; 3961 if ( in_current_building_type == BildingType_Training )
3967 v5 = 0; 3962 {
3968 //v6 = pPlayers[uActiveCharacter]; 3963 if ( uMessageParam == 17 )
3969 //v7 = pPlayers[uActiveCharacter]->uLevel; 3964 {
3970 if ( pPlayers[uActiveCharacter]->uLevel > 0 ) 3965 v4 = 0;
3971 { 3966 v5 = 0;
3972 do 3967 //v6 = pPlayers[uActiveCharacter];
3973 v4 += v5++ + 1; 3968 //v7 = pPlayers[uActiveCharacter]->uLevel;
3974 while ( v5 < pPlayers[uActiveCharacter]->uLevel ); 3969 if ( pPlayers[uActiveCharacter]->uLevel > 0 )
3975 } 3970 {
3976 if ( pPlayers[uActiveCharacter]->uLevel < (unsigned __int16)word_4F0866[(unsigned int)window_SpeakInHouse->ptr_1C] 3971 do
3977 && (signed __int64)pPlayers[uActiveCharacter]->uExperience < 1000 * v4 ) 3972 v4 += v5++ + 1;
3978 return; 3973 while ( v5 < pPlayers[uActiveCharacter]->uLevel );
3979 } 3974 }
3980 goto LABEL_9; 3975 if ( pPlayers[uActiveCharacter]->uLevel < (unsigned __int16)word_4F0866[(unsigned int)window_SpeakInHouse->ptr_1C]
3981 } 3976 && (signed __int64)pPlayers[uActiveCharacter]->uExperience < 1000 * v4 )
3982 v8 = window_SpeakInHouse; 3977 return;
3983 if ( (in_current_building_type == BildingType_Stables || in_current_building_type == BildingType_Boats) 3978 }
3984 && (v1 = 0, *(&byte_4F09B1[32 * (unsigned __int8)*(&byte_4F0CCF[4 * (unsigned int)window_SpeakInHouse->ptr_1C] + uMessageParam)] + pParty->uDaysPlayed % 7)) 3979 pDialogueWindow->Release();
3985 || in_current_building_type != BildingType_Temple || uMessageParam != BildingType_MindGuild ) 3980 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, v1, v1);
3986 { 3981 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, v1, 0x71u, v1, v1, pGlobalTXT_LocalizationStrings[74],// "End Conversation"
3987 LABEL_9: 3982 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), v1);
3988 pDialogueWindow->Release(); 3983 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, v1, 0x51u, v1, v1, "", (Texture *)v1);
3989 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, v1, v1); 3984 // LABEL_10:
3990 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, v1, 0x71u, v1, v1, pGlobalTXT_LocalizationStrings[74],// "End Conversation" 3985 //v3 = dword_F8B198;
3991 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), v1); 3986 v8 = window_SpeakInHouse;
3992 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, v1, 0x51u, v1, v1, "", (Texture *)v1); 3987 }
3993 LABEL_10: 3988 else
3994 //v3 = dword_F8B198; 3989 {
3995 v8 = window_SpeakInHouse; 3990 v8 = window_SpeakInHouse;
3996 goto LABEL_11; 3991 if ( (in_current_building_type == BildingType_Stables || in_current_building_type == BildingType_Boats)
3997 } 3992 && (v1 = 0, *(&byte_4F09B1[32 * (unsigned __int8)*(&byte_4F0CCF[4 * (unsigned int)window_SpeakInHouse->ptr_1C] + uMessageParam)] + pParty->uDaysPlayed % 7))
3998 if ( uActiveCharacter != v1 ) 3993 || in_current_building_type != BildingType_Temple || uMessageParam != BildingType_MindGuild )
3999 { 3994 {
4000 if ( !pPlayers[uActiveCharacter]->_4B6FF9() ) 3995 //LABEL_9:
4001 return; 3996 pDialogueWindow->Release();
4002 goto LABEL_10; 3997 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, v1, v1);
4003 } 3998 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, v1, 0x71u, v1, v1, pGlobalTXT_LocalizationStrings[74],// "End Conversation"
4004 LABEL_11: 3999 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), v1);
4005 dword_F8B19C = uMessageParam; 4000 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, v1, 0x51u, v1, v1, "", (Texture *)v1);
4006 if ( in_current_building_type < BildingType_19 ) 4001 // LABEL_10:
4007 { 4002 //v3 = dword_F8B198;
4008 v9 = pIcons_LOD->LoadTexture(off_4F03B8[in_current_building_type], TEXTURE_16BIT_PALETTE); 4003 v8 = window_SpeakInHouse;
4009 //v3 = dword_F8B198; 4004 }
4010 ShopTexture = &pIcons_LOD->pTextures[v9]; 4005 else if ( uActiveCharacter != v1 )
4011 LABEL_13: 4006 {
4012 v8 = window_SpeakInHouse; 4007 if ( !pPlayers[uActiveCharacter]->_4B6FF9() )
4008 return;
4009 v8 = window_SpeakInHouse;
4010 }
4011 }
4012 //LABEL_11:
4013 dword_F8B19C = uMessageParam;
4014 if ( in_current_building_type < BildingType_19 )
4015 {
4016 v9 = pIcons_LOD->LoadTexture(off_4F03B8[in_current_building_type], TEXTURE_16BIT_PALETTE);
4017 //v3 = dword_F8B198;
4018 ShopTexture = &pIcons_LOD->pTextures[v9];
4019 //LABEL_13:
4020 v8 = window_SpeakInHouse;
4021 }
4013 } 4022 }
4014 if ( in_current_building_type > BildingType_Tavern ) 4023 if ( in_current_building_type > BildingType_Tavern )
4015 { 4024 {
4016 if ( in_current_building_type == BildingType_Bank ) 4025 if ( in_current_building_type == BildingType_Bank )
4017 { 4026 {
4261 pParty->field_75A[v25] = v13; 4270 pParty->field_75A[v25] = v13;
4262 } 4271 }
4263 v1 = 0; 4272 v1 = 0;
4264 dword_F8B1A4 = pNPCTopics[352].pText; 4273 dword_F8B1A4 = pNPCTopics[352].pText;
4265 } 4274 }
4266 goto LABEL_196; 4275 }
4267 } 4276 else if ( uMessageParam == 100 )
4268 if ( uMessageParam == 100 )
4269 { 4277 {
4270 pKeyActionMap->EnterText(1, 10, v8); 4278 pKeyActionMap->EnterText(1, 10, v8);
4271 goto LABEL_196;
4272 } 4279 }
4273 } 4280 }
4274 } 4281 }
4275 } 4282 }
4276 if ( uMessageParam > 95 ) 4283 if ( uMessageParam > 95 )
4525 if ( v0 && v0 != 1 ) 4532 if ( v0 && v0 != 1 )
4526 { 4533 {
4527 if ( v0 == -1 ) 4534 if ( v0 == -1 )
4528 { 4535 {
4529 _4B4224_UpdateNPCTopics((int)((char *)pDialogueNPCCount - 1)); 4536 _4B4224_UpdateNPCTopics((int)((char *)pDialogueNPCCount - 1));
4530 LABEL_33: 4537 //LABEL_33:
4531 pVideoPlayer->_4BF5B2(); 4538 pVideoPlayer->_4BF5B2();
4532 return 1; 4539 return 1;
4533 } 4540 }
4534 if ( v0 != 94 && v0 != 96 && v0 != 101 ) 4541 if ( v0 != 94 && v0 != 96 && v0 != 101 )
4535 { 4542 {
4542 else 4549 else
4543 { 4550 {
4544 if ( v0 != 102 && v0 != 103 && v0 != 104 ) 4551 if ( v0 != 102 && v0 != 103 && v0 != 104 )
4545 { 4552 {
4546 pVideoPlayer->_4BF5B2(); 4553 pVideoPlayer->_4BF5B2();
4547 LABEL_28: 4554 //LABEL_28:
4548 dword_F8B19C = 1; 4555 dword_F8B19C = 1;
4549 sub_4B3B42(in_current_building_type); 4556 sub_4B3B42(in_current_building_type);
4550 return 1; 4557 return 1;
4551 } 4558 }
4552 pVideoPlayer->_4BF5B2(); 4559 pVideoPlayer->_4BF5B2();
4556 } 4563 }
4557 return 1; 4564 return 1;
4558 } 4565 }
4559 pVideoPlayer->_4BF5B2(); 4566 pVideoPlayer->_4BF5B2();
4560 UI_CreateEndConversationButton(); 4567 UI_CreateEndConversationButton();
4561 goto LABEL_28; 4568 dword_F8B19C = 1;
4569 sub_4B3B42(in_current_building_type);
4570 return 1;
4562 } 4571 }
4563 pDialogueNPCCount = 0; 4572 pDialogueNPCCount = 0;
4564 pDialogueWindow->Release(); 4573 pDialogueWindow->Release();
4565 dword_F8B19C = 0; 4574 dword_F8B19C = 0;
4566 pDialogueWindow = 0; 4575 pDialogueWindow = 0;
4581 ++v2; 4590 ++v2;
4582 v3 += 100; 4591 v3 += 100;
4583 } 4592 }
4584 while ( (signed int)v2 < uNumDialogueNPCPortraits ); 4593 while ( (signed int)v2 < uNumDialogueNPCPortraits );
4585 } 4594 }
4586 goto LABEL_33; 4595 pVideoPlayer->_4BF5B2();
4596 return 1;
4587 } 4597 }
4588 } 4598 }
4589 return 0; 4599 return 0;
4590 } 4600 }
4591 4601
4680 ItemGen *_this; // [sp+B0h] [bp-4h]@13 4690 ItemGen *_this; // [sp+B0h] [bp-4h]@13
4681 4691
4682 v0 = pPlayers[uActiveCharacter]; 4692 v0 = pPlayers[uActiveCharacter];
4683 v77 = pPlayers[uActiveCharacter]; 4693 v77 = pPlayers[uActiveCharacter];
4684 if ( pCurrentScreen == SCREEN_E ) 4694 if ( pCurrentScreen == SCREEN_E )
4685 goto LABEL_73; 4695 {
4696 sub_421EA6_OnInventoryLeftClick();
4697 return;
4698 }
4686 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) 4699 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() )
4687 { 4700 {
4688 v56 = 0; 4701 v56 = 0;
4689 v52 = 0; 4702 v52 = 0;
4690 v50 = 0; 4703 v50 = 0;
4691 v49 = 0; 4704 v49 = 0;
4692 v48 = -1; 4705 v48 = -1;
4693 v47 = 0; 4706 v47 = 0;
4694 v46 = 0; 4707 v46 = 0;
4695 goto LABEL_87; 4708 pAudioPlayer->PlaySound(SOUND_27, v46, v47, v48, v49, v50, v52, v56);
4709 return;
4696 } 4710 }
4697 if ( dword_F8B19C > 18 ) 4711 if ( dword_F8B19C > 18 )
4698 { 4712 {
4699 if ( dword_F8B19C < 36 ) 4713 if ( dword_F8B19C < 36 )
4700 return; 4714 return;
4717 v13 = window_SpeakInHouse->ptr_1C; 4731 v13 = window_SpeakInHouse->ptr_1C;
4718 if ( in_current_building_type == BildingType_Training ) 4732 if ( in_current_building_type == BildingType_Training )
4719 v55 = 4; 4733 v55 = 4;
4720 else 4734 else
4721 v55 = 2; 4735 v55 = 2;
4722 goto LABEL_84; 4736 HousePlaySomeSound((unsigned int)v13, v55);
4737 return;
4723 } 4738 }
4724 Party::TakeGold(v44); 4739 Party::TakeGold(v44);
4725 v53 = 0; 4740 v53 = 0;
4726 dword_F8B1E4 = 1; 4741 dword_F8B1E4 = 1;
4727 *pSkill = 1; 4742 *pSkill = 1;
4728 v51 = 78; 4743 v51 = 78;
4729 goto LABEL_80; 4744 v27 = v0;
4745 v27->PlaySound((PlayerSpeech)v51, v53);
4746 return;
4730 } 4747 }
4731 } 4748 }
4732 return; 4749 return;
4733 } 4750 }
4734 if ( dword_F8B19C != 94 ) 4751 if ( dword_F8B19C != 94 )
4736 if ( dword_F8B19C != 95 ) 4753 if ( dword_F8B19C != 95 )
4737 return; 4754 return;
4738 goto LABEL_49; 4755 goto LABEL_49;
4739 } 4756 }
4740 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; 4757 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
4741 LABEL_73: 4758 //LABEL_73:
4742 sub_421EA6_OnInventoryLeftClick(); 4759 sub_421EA6_OnInventoryLeftClick();
4743 return; 4760 return;
4744 } 4761 }
4745 if ( dword_F8B19C == 18 ) 4762 if ( dword_F8B19C == 18 )
4746 { 4763 {
4758 v80 = v23; 4775 v80 = v23;
4759 GetAsyncKeyState(VK_CONTROL); 4776 GetAsyncKeyState(VK_CONTROL);
4760 if ( pParty->uNumGold < v23 ) 4777 if ( pParty->uNumGold < v23 )
4761 { 4778 {
4762 v24 = 2; 4779 v24 = 2;
4763 LABEL_62: 4780 //LABEL_62:
4764 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v24); 4781 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v24);
4765 v9 = pGlobalTXT_LocalizationStrings[155]; 4782 v9 = pGlobalTXT_LocalizationStrings[155];
4766 v54 = 2; 4783 v54 = 2;
4767 goto LABEL_71; 4784 ShowStatusBarString(v9, v54);
4785 return;
4768 } 4786 }
4769 v25 = v0->AddItem(0xFFFFFFFFu, v20->uItemID); 4787 v25 = v0->AddItem(0xFFFFFFFFu, v20->uItemID);
4770 if ( v25 ) 4788 if ( v25 )
4771 { 4789 {
4772 v26 = 1; 4790 v26 = 1;
4773 v20->SetIdentified(); 4791 v20->SetIdentified();
4774 memcpy(&v0->pInventoryItems[v25-1], v20, 0x24u); 4792 memcpy(&v0->pInventoryItems[v25-1], v20, 0x24u);
4775 goto LABEL_42; 4793 dword_F8B1E4 = v26;
4794 Party::TakeGold(v80);
4795 viewparams->bRedrawGameUI = v26;
4796 _this->Reset();
4797 pRenderer->ClearZBuffer(0, 479);
4798 v27 = v77;
4799 v53 = 0;
4800 v51 = SPEECH_75;
4801 v27->PlaySound((PlayerSpeech)v51, v53);
4802 return;
4776 } 4803 }
4777 v0->PlaySound(SPEECH_NoRoom, 0); 4804 v0->PlaySound(SPEECH_NoRoom, 0);
4778 v54 = 5; 4805 v54 = 5;
4779 LABEL_70: 4806 //LABEL_70:
4780 v9 = pGlobalTXT_LocalizationStrings[563]; // "Pack is Full!" 4807 v9 = pGlobalTXT_LocalizationStrings[563]; // "Pack is Full!"
4781 goto LABEL_71; 4808 ShowStatusBarString(v9, v54);
4809 return;
4782 } 4810 }
4783 if ( dword_F8B19C == 2 ) 4811 if ( dword_F8B19C == 2 )
4784 { 4812 {
4785 LABEL_49: 4813 LABEL_49:
4786 v28 = pMouse->GetCursorPos(&v59); 4814 v28 = pMouse->GetCursorPos(&v59);
4830 { 4858 {
4831 v24 = 2; 4859 v24 = 2;
4832 if ( uNumSeconds != 2 ) 4860 if ( uNumSeconds != 2 )
4833 { 4861 {
4834 if ( uNumSeconds != 1 ) 4862 if ( uNumSeconds != 1 )
4835 goto LABEL_62; 4863 {
4864 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v24);
4865 v9 = pGlobalTXT_LocalizationStrings[155];
4866 v54 = 2;
4867 ShowStatusBarString(v9, v54);
4868 return;
4869 }
4836 } 4870 }
4837 } 4871 }
4838 v39 = v0->AddItem(0xFFFFFFFFu, v32->uItemID); 4872 v39 = v0->AddItem(0xFFFFFFFFu, v32->uItemID);
4839 if ( v39 ) 4873 if ( v39 )
4840 { 4874 {
4849 v41 = uNumSeconds; 4883 v41 = uNumSeconds;
4850 if ( uNumSeconds == 1 || uNumSeconds == 2 ) 4884 if ( uNumSeconds == 1 || uNumSeconds == 2 )
4851 { 4885 {
4852 *(char *)(v40 + 517) |= 1u; 4886 *(char *)(v40 + 517) |= 1u;
4853 sub_4B1447_party_fine((int)window_SpeakInHouse->ptr_1C, v41, a6); 4887 sub_4B1447_party_fine((int)window_SpeakInHouse->ptr_1C, v41, a6);
4854 goto LABEL_43; 4888 viewparams->bRedrawGameUI = v26;
4889 _this->Reset();
4890 pRenderer->ClearZBuffer(0, 479);
4891 v27 = v77;
4892 v53 = 0;
4893 v51 = SPEECH_75;
4894 v27->PlaySound((PlayerSpeech)v51, v53);
4895 return;
4855 } 4896 }
4856 } 4897 }
4857 } 4898 }
4858 LABEL_42: 4899 //LABEL_42:
4859 dword_F8B1E4 = v26; 4900 dword_F8B1E4 = v26;
4860 Party::TakeGold(v80); 4901 Party::TakeGold(v80);
4861 LABEL_43: 4902 //LABEL_43:
4862 viewparams->bRedrawGameUI = v26; 4903 viewparams->bRedrawGameUI = v26;
4863 _this->Reset(); 4904 _this->Reset();
4864 pRenderer->ClearZBuffer(0, 479); 4905 pRenderer->ClearZBuffer(0, 479);
4865 v27 = v77; 4906 v27 = v77;
4866 v53 = 0; 4907 v53 = 0;
4867 v51 = SPEECH_75; 4908 v51 = SPEECH_75;
4868 LABEL_81: 4909 //LABEL_81:
4869 v27->PlaySound((PlayerSpeech)v51, v53); 4910 v27->PlaySound((PlayerSpeech)v51, v53);
4870 return; 4911 return;
4871 } 4912 }
4872 v0->PlaySound(SPEECH_NoRoom, 0); 4913 v0->PlaySound(SPEECH_NoRoom, 0);
4873 v54 = 2; 4914 v54 = 2;
4874 goto LABEL_70; 4915 v9 = pGlobalTXT_LocalizationStrings[563]; // "Pack is Full!"
4916 ShowStatusBarString(v9, v54);
4917 return;
4875 } 4918 }
4876 if ( dword_F8B19C == 3 ) 4919 if ( dword_F8B19C == 3 )
4877 { 4920 {
4878 v14 = pMouse->GetCursorPos(&v71)->x - 14; 4921 v14 = pMouse->GetCursorPos(&v71)->x - 14;
4879 v79 = (v14 >> 5) + 14 * ((pMouse->GetCursorPos(&v69)->y - 17) >> 5); 4922 v79 = (v14 >> 5) + 14 * ((pMouse->GetCursorPos(&v69)->y - 17) >> 5);
4888 v0->_4BE2DD(v79, (int)((char *)v77 - 1), (int)v16->ptr_1C); 4931 v0->_4BE2DD(v79, (int)((char *)v77 - 1), (int)v16->ptr_1C);
4889 viewparams->bRedrawGameUI = 1; 4932 viewparams->bRedrawGameUI = 1;
4890 pRenderer->ClearZBuffer(0, 479); 4933 pRenderer->ClearZBuffer(0, 479);
4891 v53 = 0; 4934 v53 = 0;
4892 v51 = 77; 4935 v51 = 77;
4893 goto LABEL_80; 4936 v27 = v0;
4894 } 4937 v27->PlaySound((PlayerSpeech)v51, v53);
4938 return;
4939 }
4895 v0->PlaySound(SPEECH_79, 0); 4940 v0->PlaySound(SPEECH_79, 0);
4896 v56 = 0; 4941 v56 = 0;
4897 v52 = 0; 4942 v52 = 0;
4898 v50 = 0; 4943 v50 = 0;
4899 v49 = 0; 4944 v49 = 0;
4900 v48 = -1; 4945 v48 = -1;
4901 v47 = 0; 4946 v47 = 0;
4902 v46 = 0; 4947 v46 = 0;
4903 LABEL_87: 4948 //LABEL_87:
4904 pAudioPlayer->PlaySound(SOUND_27, v46, v47, v48, v49, v50, v52, v56); 4949 pAudioPlayer->PlaySound(SOUND_27, v46, v47, v48, v49, v50, v52, v56);
4905 return; 4950 return;
4906 } 4951 }
4907 if ( dword_F8B19C == 4 ) 4952 if ( dword_F8B19C == 4 )
4908 { 4953 {
4928 dword_F8B1E4 = 1; 4973 dword_F8B1E4 = 1;
4929 Party::TakeGold(v80); 4974 Party::TakeGold(v80);
4930 *(int *)(v12 + 20) |= 1u; 4975 *(int *)(v12 + 20) |= 1u;
4931 v0->PlaySound(SPEECH_73, 0); 4976 v0->PlaySound(SPEECH_73, 0);
4932 v9 = pGlobalTXT_LocalizationStrings[569]; 4977 v9 = pGlobalTXT_LocalizationStrings[569];
4933 goto LABEL_25; 4978 v54 = 2;
4979 ShowStatusBarString(v9, v54);
4980 return;
4934 } 4981 }
4935 goto LABEL_26; 4982 v13 = _this;
4983 v55 = 2;
4984 HousePlaySomeSound((unsigned int)v13, v55);
4985 return;
4936 } 4986 }
4937 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); 4987 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
4938 v53 = 0; 4988 v53 = 0;
4939 goto LABEL_28; 4989 v51 = 79;
4990 v27 = v0;
4991 v27->PlaySound((PlayerSpeech)v51, v53);
4992 return;
4940 } 4993 }
4941 v53 = 0; 4994 v53 = 0;
4942 LABEL_30: 4995 //LABEL_30:
4943 v51 = 76; 4996 v51 = 76;
4944 goto LABEL_80; 4997 v27 = v0;
4945 } 4998 v27->PlaySound((PlayerSpeech)v51, v53);
4999 return;
5000 }
4946 } 5001 }
4947 } 5002 }
4948 } 5003 }
4949 else 5004 else
4950 { 5005 {
4981 v8 = *(int *)(v3 + 20); 5036 v8 = *(int *)(v3 + 20);
4982 LOBYTE(v8) = v8 & 0xFD; 5037 LOBYTE(v8) = v8 & 0xFD;
4983 *(int *)(v3 + 20) = v8 | 1; 5038 *(int *)(v3 + 20) = v8 | 1;
4984 v0->PlaySound(SPEECH_74, 0); 5039 v0->PlaySound(SPEECH_74, 0);
4985 v9 = pGlobalTXT_LocalizationStrings[570]; 5040 v9 = pGlobalTXT_LocalizationStrings[570];
4986 LABEL_25: 5041 //LABEL_25:
4987 v54 = 2; 5042 v54 = 2;
4988 LABEL_71: 5043 //LABEL_71:
4989 ShowStatusBarString(v9, v54); 5044 ShowStatusBarString(v9, v54);
4990 return; 5045 return;
4991 } 5046 }
4992 LABEL_26: 5047 //LABEL_26:
4993 v13 = _this; 5048 v13 = _this;
4994 v55 = 2; 5049 v55 = 2;
4995 LABEL_84: 5050 //LABEL_84:
4996 HousePlaySomeSound((unsigned int)v13, v55); 5051 HousePlaySomeSound((unsigned int)v13, v55);
4997 return; 5052 return;
4998 } 5053 }
4999 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); 5054 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
5000 v53 = 0; 5055 v53 = 0;
5001 LABEL_28: 5056 //LABEL_28:
5002 v51 = 79; 5057 v51 = 79;
5003 LABEL_80: 5058 //LABEL_80:
5004 v27 = v0; 5059 v27 = v0;
5005 goto LABEL_81; 5060 v27->PlaySound((PlayerSpeech)v51, v53);
5061 return;
5006 } 5062 }
5007 v53 = 0; 5063 v53 = 0;
5008 goto LABEL_30; 5064 v51 = 76;
5009 } 5065 v27 = v0;
5066 v27->PlaySound((PlayerSpeech)v51, v53);
5067 return;
5068 }
5010 } 5069 }
5011 } 5070 }
5012 } 5071 }
5013 } 5072 }
5014 } 5073 }
5128 { 5187 {
5129 v5 = v2[v7]; 5188 v5 = v2[v7];
5130 *v2 = v5; 5189 *v2 = v5;
5131 if ( !v5 ) 5190 if ( !v5 )
5132 { 5191 {
5133 LABEL_23: 5192 //LABEL_23:
5134 *v2 = 0; 5193 *v2 = 0;
5135 break; 5194 break;
5136 } 5195 }
5137 if ( v5 == ',' ) 5196 if ( v5 == ',' )
5138 { 5197 {
5139 if ( v3 ) 5198 if ( v3 )
5140 goto LABEL_18; 5199 {
5141 *v2 = 0; 5200 if ( v4 )
5201 {
5202 stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2;
5203 ++stru_F8B5E8.field_0;
5204 }
5205 v4 = 0;
5206 }
5207 else
5208 {
5209 *v2 = 0;
5210 v4 = 1;
5211 }
5142 } 5212 }
5143 else 5213 else
5144 { 5214 {
5145 if ( v5 != '\t' ) 5215 if ( v5 != '\t' )
5146 { 5216 {
5159 { 5229 {
5160 stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2; 5230 stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2;
5161 ++stru_F8B5E8.field_0; 5231 ++stru_F8B5E8.field_0;
5162 } 5232 }
5163 } 5233 }
5164 goto LABEL_21;
5165 } 5234 }
5166 LABEL_18: 5235 else
5167 if ( v4 ) 5236 {
5168 { 5237 //LABEL_18:
5169 stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2; 5238 if ( v4 )
5170 ++stru_F8B5E8.field_0; 5239 {
5171 } 5240 stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2;
5172 v4 = 0; 5241 ++stru_F8B5E8.field_0;
5173 goto LABEL_21; 5242 }
5174 } 5243 v4 = 0;
5175 if ( v3 ) 5244 }
5176 goto LABEL_18; 5245 }
5177 *v2 = 0; 5246 else
5178 if ( v4 ) 5247 {
5179 { 5248 if ( v3 )
5180 stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2; 5249 {
5181 ++stru_F8B5E8.field_0; 5250 if ( v4 )
5182 } 5251 {
5252 stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2;
5253 ++stru_F8B5E8.field_0;
5254 }
5255 v4 = 0;
5256 }
5257 else
5258 {
5259 *v2 = 0;
5260 if ( v4 )
5261 {
5262 stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2;
5263 ++stru_F8B5E8.field_0;
5264 }
5265 v4 = 1;
5266 }
5267 }
5183 } 5268 }
5184 v4 = 1; 5269 //LABEL_21:
5185 LABEL_21:
5186 if ( stru_F8B5E8.field_0 < 30 ) 5270 if ( stru_F8B5E8.field_0 < 30 )
5187 { 5271 {
5188 ++v2; 5272 ++v2;
5189 if ( (unsigned int)v2 < (unsigned int)&unk_F8B5E0 ) 5273 if ( (unsigned int)v2 < (unsigned int)&unk_F8B5E0 )
5190 continue; 5274 continue;
5191 } 5275 }
5192 goto LABEL_23; 5276 *v2 = 0;
5277 break;
5193 } 5278 }
5194 } 5279 }
5195 result = a2; 5280 result = a2;
5196 memcpy(a2, &stru_F8B5E8, 0x7Cu); 5281 memcpy(a2, &stru_F8B5E8, 0x7Cu);
5197 return result; 5282 return result;
11614 } 11699 }
11615 pWindow_MainMenu->Release(); 11700 pWindow_MainMenu->Release();
11616 pIcons_LOD->_4114F2(); 11701 pIcons_LOD->_4114F2();
11617 } 11702 }
11618 11703
11619
11620
11621 //----- (004637EB) -------------------------------------------------------- 11704 //----- (004637EB) --------------------------------------------------------
11622 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam) 11705 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam)
11623 { 11706 {
11624 unsigned int v4; // esi@1 11707 unsigned int v4; // esi@1
11625 Render *v5; // ecx@14 11708 Render *v5; // ecx@14
13164 pGame->pGammaController->Initialize(uGammaPos * 0.1 + 0.6); 13247 pGame->pGammaController->Initialize(uGammaPos * 0.1 + 0.6);
13165 13248
13166 if ( ReadWindowsRegistryInt("Bloodsplats", 1) ) 13249 if ( ReadWindowsRegistryInt("Bloodsplats", 1) )
13167 pGame->uFlags2 |= GAME_FLAGS_2_DRAW_BLOODSPLATS; 13250 pGame->uFlags2 |= GAME_FLAGS_2_DRAW_BLOODSPLATS;
13168 else 13251 else
13169 pGame->uFlags2 &= ~GAME_FLAGS_2_DRAW_BLOODSPLATS; 13252 pGame->uFlags2 &= GAME_FLAGS_2_DRAW_BLOODSPLATS;
13170 13253
13171 uTurnSpeed = ReadWindowsRegistryInt("TurnDelta", 0); 13254 uTurnSpeed = ReadWindowsRegistryInt("TurnDelta", 0);
13172 dword_6BE384_2dacceloff = ReadWindowsRegistryInt("2dacceloff", 0); 13255 dword_6BE384_2dacceloff = ReadWindowsRegistryInt("2dacceloff", 0);
13173 13256
13174 if (!bNoSound) 13257 if (!bNoSound)