Mercurial > mm7
comparison mm7_2.cpp @ 874:231523a39203
Buy books(first)
author | Ritor1 |
---|---|
date | Mon, 01 Apr 2013 17:37:32 +0600 |
parents | f4394e320312 |
children | b7246c149957 |
comparison
equal
deleted
inserted
replaced
873:aa0172fd88c6 | 874:231523a39203 |
---|---|
1004 sub_421EA6_OnInventoryLeftClick(); | 1004 sub_421EA6_OnInventoryLeftClick(); |
1005 return; | 1005 return; |
1006 } | 1006 } |
1007 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 1007 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
1008 { | 1008 { |
1009 v56 = 0; | 1009 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
1010 v52 = 0; | |
1011 v50 = 0; | |
1012 v49 = 0; | |
1013 v48 = -1; | |
1014 v47 = 0; | |
1015 v46 = 0; | |
1016 pAudioPlayer->PlaySound(SOUND_27, v46, v47, v48, v49, v50, v52, v56); | |
1017 return; | 1010 return; |
1018 } | 1011 } |
1019 | 1012 |
1020 switch(dialog_menu_id) | 1013 switch(dialog_menu_id) |
1021 { | 1014 { |
1022 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: | 1015 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: |
1023 { | 1016 { |
1024 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; | 1017 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; |
1025 sub_421EA6_OnInventoryLeftClick(); | 1018 sub_421EA6_OnInventoryLeftClick(); |
1026 break; | 1019 break; |
1027 } | 1020 } |
1028 case HOUSE_DIALOGUE_GULD_BUY_BOOKS: | 1021 case HOUSE_DIALOGUE_GUILD_BUY_BOOKS://Ritor1: in process |
1029 { | 1022 { |
1030 v17 = pMouse->GetCursorPos(&v63); | 1023 v17 = pMouse->GetCursorPos(&v63); |
1031 v18 = pRenderer->pActiveZBuffer[v17->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v61)->y]] & 0xFFFF; | 1024 v18 = pRenderer->pActiveZBuffer[v17->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v61)->y]] & 0xFFFF; |
1032 if ( !v18 ) | 1025 if ( !v18 ) |
1033 return; | 1026 return; |
1034 v19 = window_SpeakInHouse->ptr_1C; | 1027 v20 = (ItemGen *)(&pParty->pPlayers[1].uExpressionTimeLength + 18 * (v18 + 12 * (int)window_SpeakInHouse->ptr_1C)); |
1035 v20 = (ItemGen *)(&pParty->pPlayers[1].uExpressionTimeLength + 18 * (v18 + 12 * (int)v19)); | 1028 v21 = p2DEvents[(signed int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier; |
1036 //v21 = p2DEvents_minus1__20[13 * (signed int)v19]; | |
1037 v21 = p2DEvents[(signed int)v19 - 1].fPriceMultiplier; | |
1038 _this = v20; | 1029 _this = v20; |
1039 v22 = v20->GetValue(); | 1030 v22 = v20->GetValue(); |
1040 v23 = v0->GetBuyingPrice(v22, v21); | 1031 v23 = v0->GetBuyingPrice(v22, v21); |
1041 v80 = v23; | 1032 v80 = v23; |
1042 GetAsyncKeyState(VK_CONTROL); | 1033 GetAsyncKeyState(VK_CONTROL); |
1043 if ( pParty->uNumGold < v23 ) | 1034 if ( pParty->uNumGold < v23 ) |
1044 { | 1035 { |
1045 v24 = 2; | 1036 v24 = 2; |
1046 //LABEL_62: | |
1047 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v24); | 1037 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v24); |
1048 v9 = pGlobalTXT_LocalizationStrings[155]; | 1038 v9 = pGlobalTXT_LocalizationStrings[155]; |
1049 v54 = 2; | 1039 v54 = 2; |
1050 ShowStatusBarString(v9, v54); | 1040 ShowStatusBarString(v9, v54); |
1051 return; | 1041 return; |
1060 Party::TakeGold(v80); | 1050 Party::TakeGold(v80); |
1061 viewparams->bRedrawGameUI = v26; | 1051 viewparams->bRedrawGameUI = v26; |
1062 _this->Reset(); | 1052 _this->Reset(); |
1063 pRenderer->ClearZBuffer(0, 479); | 1053 pRenderer->ClearZBuffer(0, 479); |
1064 v27 = v77; | 1054 v27 = v77; |
1065 v53 = 0; | 1055 v27->PlaySound((PlayerSpeech)SPEECH_75, 0); |
1066 v51 = SPEECH_75; | |
1067 v27->PlaySound((PlayerSpeech)v51, v53); | |
1068 return; | 1056 return; |
1069 } | 1057 } |
1070 v0->PlaySound(SPEECH_NoRoom, 0); | 1058 v0->PlaySound(SPEECH_NoRoom, 0); |
1071 v54 = 5; | 1059 ShowStatusBarString(pGlobalTXT_LocalizationStrings[563], 5); // "Pack is Full!" |
1072 //LABEL_70: | |
1073 v9 = pGlobalTXT_LocalizationStrings[563]; // "Pack is Full!" | |
1074 ShowStatusBarString(v9, v54); | |
1075 break; | 1060 break; |
1076 } | 1061 } |
1077 | 1062 |
1078 case HOUSE_DIALOGUE_SHOP_SELL: | 1063 case HOUSE_DIALOGUE_SHOP_SELL: |
1079 { | 1064 { |
1339 v9 = pGlobalTXT_LocalizationStrings[563]; // "Pack is Full!" | 1324 v9 = pGlobalTXT_LocalizationStrings[563]; // "Pack is Full!" |
1340 ShowStatusBarString(v9, v54); | 1325 ShowStatusBarString(v9, v54); |
1341 break; | 1326 break; |
1342 } | 1327 } |
1343 | 1328 |
1344 default: | 1329 default:// if click video screen in shop |
1345 { | 1330 { |
1346 __debugbreak(); // please do record these dialogue ids to the HOUSE_DIALOGUE_MENU enum | 1331 __debugbreak(); // please do record these dialogue ids to the HOUSE_DIALOGUE_MENU enum |
1347 if( dialog_menu_id >= 36 && dialog_menu_id <= 72 ) | 1332 if( dialog_menu_id >= 36 && dialog_menu_id <= 72 ) |
1348 { | 1333 { |
1349 v42 = dialog_menu_id - 36; | 1334 v42 = dialog_menu_id - 36; |