Mercurial > mm7
comparison mm7_2.cpp @ 474:442afd6c34a4
Merge
author | Gloval |
---|---|
date | Tue, 26 Feb 2013 07:40:26 +0400 |
parents | 7dfe960c323c 7f1b00901cf7 |
children | 77430756f06a |
comparison
equal
deleted
inserted
replaced
472:7dfe960c323c | 474:442afd6c34a4 |
---|---|
3755 return; | 3755 return; |
3756 pRenderer->ClearZBuffer(0, 479); | 3756 pRenderer->ClearZBuffer(0, 479); |
3757 //v3 = dword_F8B198; | 3757 //v3 = dword_F8B198; |
3758 if ( dword_F8B19C != 1 ) | 3758 if ( dword_F8B19C != 1 ) |
3759 goto LABEL_13; | 3759 goto LABEL_13; |
3760 if ( dword_F8B198 == 30 ) | 3760 if ( in_current_bilding_type == 30 ) |
3761 { | 3761 { |
3762 if ( uMessageParam == 17 ) | 3762 if ( uMessageParam == 17 ) |
3763 { | 3763 { |
3764 v4 = 0; | 3764 v4 = 0; |
3765 v5 = 0; | 3765 v5 = 0; |
3776 return; | 3776 return; |
3777 } | 3777 } |
3778 goto LABEL_9; | 3778 goto LABEL_9; |
3779 } | 3779 } |
3780 v8 = window_SpeakInHouse; | 3780 v8 = window_SpeakInHouse; |
3781 if ( (dword_F8B198 == 27 || dword_F8B198 == 28) | 3781 if ( (in_current_bilding_type == 27 || in_current_bilding_type == 28) |
3782 && (v1 = 0, *(&byte_4F09B1[32 * (unsigned __int8)*(&byte_4F0CCF[4 * (unsigned int)window_SpeakInHouse->ptr_1C] + uMessageParam)] + pParty->uDaysPlayed % 7)) | 3782 && (v1 = 0, *(&byte_4F09B1[32 * (unsigned __int8)*(&byte_4F0CCF[4 * (unsigned int)window_SpeakInHouse->ptr_1C] + uMessageParam)] + pParty->uDaysPlayed % 7)) |
3783 || dword_F8B198 != 23 || uMessageParam != 10 ) | 3783 || in_current_bilding_type != 23 || uMessageParam != 10 ) |
3784 { | 3784 { |
3785 LABEL_9: | 3785 LABEL_9: |
3786 pDialogueWindow->Release(); | 3786 pDialogueWindow->Release(); |
3787 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, v1, v1); | 3787 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, v1, v1); |
3788 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, v1, 0x71u, v1, v1, pGlobalTXT_LocalizationStrings[74],// "End Conversation" | 3788 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, v1, 0x71u, v1, v1, pGlobalTXT_LocalizationStrings[74],// "End Conversation" |
3799 return; | 3799 return; |
3800 goto LABEL_10; | 3800 goto LABEL_10; |
3801 } | 3801 } |
3802 LABEL_11: | 3802 LABEL_11: |
3803 dword_F8B19C = uMessageParam; | 3803 dword_F8B19C = uMessageParam; |
3804 if ( dword_F8B198 < 19 ) | 3804 if ( in_current_bilding_type < 19 ) |
3805 { | 3805 { |
3806 v9 = pIcons_LOD->LoadTexture(off_4F03B8[dword_F8B198], TEXTURE_16BIT_PALETTE); | 3806 v9 = pIcons_LOD->LoadTexture(off_4F03B8[in_current_bilding_type], TEXTURE_16BIT_PALETTE); |
3807 //v3 = dword_F8B198; | 3807 //v3 = dword_F8B198; |
3808 dword_F8B164 = &pIcons_LOD->pTextures[v9]; | 3808 dword_F8B164 = &pIcons_LOD->pTextures[v9]; |
3809 LABEL_13: | 3809 LABEL_13: |
3810 v8 = window_SpeakInHouse; | 3810 v8 = window_SpeakInHouse; |
3811 } | 3811 } |
3812 if ( dword_F8B198 > 21 ) | 3812 if ( in_current_bilding_type > 21 ) |
3813 { | 3813 { |
3814 if ( dword_F8B198 == 22 ) | 3814 if ( in_current_bilding_type == 22 ) |
3815 { | 3815 { |
3816 if ( dword_F8B19C >= 7 && dword_F8B19C <= 8 ) | 3816 if ( dword_F8B19C >= 7 && dword_F8B19C <= 8 ) |
3817 pKeyActionMap->EnterText(1, 10, v8); | 3817 pKeyActionMap->EnterText(1, 10, v8); |
3818 return; | 3818 return; |
3819 } | 3819 } |
3820 if ( dword_F8B198 != 23 && dword_F8B198 != 30 ) | 3820 if ( in_current_bilding_type != 23 && in_current_bilding_type != 30 ) |
3821 return; | 3821 return; |
3822 } | 3822 } |
3823 else | 3823 else |
3824 { | 3824 { |
3825 if ( dword_F8B198 != 21 ) | 3825 if ( in_current_bilding_type != 21 ) |
3826 { | 3826 { |
3827 if ( dword_F8B198 <= (signed int)v1 ) | 3827 if ( in_current_bilding_type <= (signed int)v1 ) |
3828 return; | 3828 return; |
3829 if ( dword_F8B198 > 4 ) | 3829 if ( in_current_bilding_type > 4 ) |
3830 { | 3830 { |
3831 if ( dword_F8B198 <= 16 ) | 3831 if ( in_current_bilding_type <= 16 ) |
3832 { | 3832 { |
3833 if ( (signed __int64)__PAIR__( | 3833 if ( (signed __int64)__PAIR__( |
3834 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44472], | 3834 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44472], |
3835 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44468]) >= (signed __int64)pParty->uTimePlayed ) | 3835 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44468]) >= (signed __int64)pParty->uTimePlayed ) |
3836 { | 3836 { |
3862 *(int *)&stru_AA1058[3].pSounds[8 * (int)v30 + 44468] = v31; | 3862 *(int *)&stru_AA1058[3].pSounds[8 * (int)v30 + 44468] = v31; |
3863 *(int *)&stru_AA1058[3].pSounds[8 * (int)v30 + 44472] = HIDWORD(v31); | 3863 *(int *)&stru_AA1058[3].pSounds[8 * (int)v30 + 44472] = HIDWORD(v31); |
3864 } | 3864 } |
3865 return; | 3865 return; |
3866 } | 3866 } |
3867 if ( dword_F8B198 != 17 ) | 3867 if ( in_current_bilding_type != 17 ) |
3868 return; | 3868 return; |
3869 if ( uMessageParam == 99 ) | 3869 if ( uMessageParam == 99 ) |
3870 { | 3870 { |
3871 v10 = (int)((char *)v8->ptr_1C - 102); | 3871 v10 = (int)((char *)v8->ptr_1C - 102); |
3872 v56 = v10; | 3872 v56 = v10; |
4078 switch ( uMessageParam ) | 4078 switch ( uMessageParam ) |
4079 { | 4079 { |
4080 case 96: | 4080 case 96: |
4081 pDialogueWindow->eWindowType = WINDOW_MainMenu; | 4081 pDialogueWindow->eWindowType = WINDOW_MainMenu; |
4082 UI_CreateEndConversationButton(); | 4082 UI_CreateEndConversationButton(); |
4083 sub_4B3703(dword_F8B198); | 4083 FillAviableSkillsToTeach(in_current_bilding_type); |
4084 break; | 4084 break; |
4085 case 101: | 4085 case 101: |
4086 pDialogueWindow->eWindowType = WINDOW_MainMenu; | 4086 pDialogueWindow->eWindowType = WINDOW_MainMenu; |
4087 UI_CreateEndConversationButton(); | 4087 UI_CreateEndConversationButton(); |
4088 sub_4B3A72(dword_F8B198); | 4088 sub_4B3A72(in_current_bilding_type); |
4089 break; | 4089 break; |
4090 case 102: | 4090 case 102: |
4091 dword_F8B19C = 102; | 4091 dword_F8B19C = 102; |
4092 break; | 4092 break; |
4093 case 103: | 4093 case 103: |
4148 if ( !*(short *)v38 ) | 4148 if ( !*(short *)v38 ) |
4149 { | 4149 { |
4150 if ( pParty->uNumGold < v37 ) | 4150 if ( pParty->uNumGold < v37 ) |
4151 { | 4151 { |
4152 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); | 4152 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); |
4153 if ( dword_F8B198 == 30 || dword_F8B198 == 21 ) | 4153 if ( in_current_bilding_type == 30 || in_current_bilding_type == 21 ) |
4154 v39 = 4; | 4154 v39 = 4; |
4155 else | 4155 else |
4156 v39 = 2; | 4156 v39 = 2; |
4157 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v39); | 4157 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v39); |
4158 } | 4158 } |
4170 { | 4170 { |
4171 if ( uMessageParam == 94 ) | 4171 if ( uMessageParam == 94 ) |
4172 { | 4172 { |
4173 pDialogueWindow->eWindowType = WINDOW_MainMenu; | 4173 pDialogueWindow->eWindowType = WINDOW_MainMenu; |
4174 UI_CreateEndConversationButton(); | 4174 UI_CreateEndConversationButton(); |
4175 sub_4B3AD4(dword_F8B198); | 4175 sub_4B3AD4(in_current_bilding_type); |
4176 } | 4176 } |
4177 } | 4177 } |
4178 } | 4178 } |
4179 return; | 4179 return; |
4180 } | 4180 } |
4220 ++v43; | 4220 ++v43; |
4221 } | 4221 } |
4222 //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); | 4222 //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); |
4223 while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); | 4223 while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); |
4224 } | 4224 } |
4225 if ( dword_F8B198 == 1 ) | 4225 if ( in_current_bilding_type == 1 ) |
4226 { | 4226 { |
4227 v47 = v8->ptr_1C; | 4227 v47 = v8->ptr_1C; |
4228 v48 = 0; | 4228 v48 = 0; |
4229 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) | 4229 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) |
4230 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) | 4230 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) |
4265 ++v43; | 4265 ++v43; |
4266 } | 4266 } |
4267 //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); | 4267 //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ); |
4268 while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); | 4268 while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ); |
4269 } | 4269 } |
4270 if ( dword_F8B198 == 1 ) | 4270 if ( in_current_bilding_type == 1 ) |
4271 { | 4271 { |
4272 v52 = v8->ptr_1C; | 4272 v52 = v8->ptr_1C; |
4273 v53 = 0; | 4273 v53 = 0; |
4274 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) | 4274 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] ) |
4275 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) | 4275 if ( uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] ) |
4334 { | 4334 { |
4335 if ( v0 == 3 || v0 == 5 || v0 == 4 ) | 4335 if ( v0 == 3 || v0 == 5 || v0 == 4 ) |
4336 { | 4336 { |
4337 UI_CreateEndConversationButton(); | 4337 UI_CreateEndConversationButton(); |
4338 dword_F8B19C = 94; | 4338 dword_F8B19C = 94; |
4339 sub_4B3AD4(dword_F8B198); | 4339 sub_4B3AD4(in_current_bilding_type); |
4340 } | 4340 } |
4341 else | 4341 else |
4342 { | 4342 { |
4343 if ( v0 != 102 && v0 != 103 && v0 != 104 ) | 4343 if ( v0 != 102 && v0 != 103 && v0 != 104 ) |
4344 { | 4344 { |
4345 pVideoPlayer->_4BF5B2(); | 4345 pVideoPlayer->_4BF5B2(); |
4346 LABEL_28: | 4346 LABEL_28: |
4347 dword_F8B19C = 1; | 4347 dword_F8B19C = 1; |
4348 sub_4B3B42(dword_F8B198); | 4348 sub_4B3B42(in_current_bilding_type); |
4349 return 1; | 4349 return 1; |
4350 } | 4350 } |
4351 pVideoPlayer->_4BF5B2(); | 4351 pVideoPlayer->_4BF5B2(); |
4352 UI_CreateEndConversationButton(); | 4352 UI_CreateEndConversationButton(); |
4353 dword_F8B19C = 101; | 4353 dword_F8B19C = 101; |
4354 sub_4B3A72(dword_F8B198); | 4354 sub_4B3A72(in_current_bilding_type); |
4355 } | 4355 } |
4356 return 1; | 4356 return 1; |
4357 } | 4357 } |
4358 pVideoPlayer->_4BF5B2(); | 4358 pVideoPlayer->_4BF5B2(); |
4359 UI_CreateEndConversationButton(); | 4359 UI_CreateEndConversationButton(); |
4512 { | 4512 { |
4513 if ( pParty->uNumGold < v44 ) | 4513 if ( pParty->uNumGold < v44 ) |
4514 { | 4514 { |
4515 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u);// "You don't have enough gold" | 4515 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u);// "You don't have enough gold" |
4516 v13 = window_SpeakInHouse->ptr_1C; | 4516 v13 = window_SpeakInHouse->ptr_1C; |
4517 if ( dword_F8B198 == 30 ) | 4517 if ( in_current_bilding_type == 30 ) |
4518 v55 = 4; | 4518 v55 = 4; |
4519 else | 4519 else |
4520 v55 = 2; | 4520 v55 = 2; |
4521 goto LABEL_84; | 4521 goto LABEL_84; |
4522 } | 4522 } |