Mercurial > mm7
comparison mm7_5.cpp @ 990:087a9af8e0ec
MessageParam
author | Ritor1 |
---|---|
date | Mon, 13 May 2013 18:03:55 +0600 |
parents | 9e132060ada3 |
children | 3a3ab572eff5 bdbbdfa77ea6 |
comparison
equal
deleted
inserted
replaced
989:bb37d33934b0 | 990:087a9af8e0ec |
---|---|
973 continue; | 973 continue; |
974 case UIMSG_Escape:// нажатие Escape and return to game | 974 case UIMSG_Escape:// нажатие Escape and return to game |
975 back_to_game(); | 975 back_to_game(); |
976 if ( pMessageQueue_50CBD0->uNumMessages ) | 976 if ( pMessageQueue_50CBD0->uNumMessages ) |
977 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 977 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
978 if ( pCurrentScreen > SCREEN_CHEST_INVENTORY ) | 978 switch ( pCurrentScreen ) |
979 { | 979 { |
980 if ( pCurrentScreen >= SCREEN_CHANGE_LOCATION && (pCurrentScreen <= SCREEN_INPUT_BLV || pCurrentScreen == SCREEN_QUICK_REFERENCE) ) | 980 case SCREEN_E: |
981 { | 981 __debugbreak(); |
982 case SCREEN_NPC_DIALOGUE: | |
983 case SCREEN_CHEST: | |
984 case SCREEN_CHEST_INVENTORY: | |
985 case SCREEN_CHANGE_LOCATION: | |
986 case SCREEN_INPUT_BLV: | |
987 case SCREEN_QUICK_REFERENCE: | |
982 if ( dword_50CDC8 ) | 988 if ( dword_50CDC8 ) |
983 goto LABEL_232; | 989 break; |
984 CloseWindowBackground(); | 990 CloseWindowBackground(); |
985 uMessageParam = 1; | 991 uMessageParam = 1; |
986 goto LABEL_232; | 992 break; |
987 } | 993 case SCREEN_HOUSE: |
988 } | 994 if ( !dword_50CDC8 && !dword_5C35C8 ) |
989 else | 995 { |
990 { | 996 CloseWindowBackground(); |
991 if ( pCurrentScreen >= SCREEN_E || pCurrentScreen == SCREEN_NPC_DIALOGUE || pCurrentScreen == SCREEN_CHEST ) | 997 dword_5C35C8 = 0; |
992 { | 998 uMessageParam = 1; |
993 if ( dword_50CDC8 ) | 999 break; |
994 goto LABEL_232; | 1000 } |
995 CloseWindowBackground(); | 1001 break; |
996 uMessageParam = 1; | 1002 } |
997 goto LABEL_232; | |
998 } | |
999 if ( pCurrentScreen == SCREEN_HOUSE && !dword_50CDC8 && !dword_5C35C8 ) | |
1000 { | |
1001 CloseWindowBackground(); | |
1002 dword_5C35C8 = 0; | |
1003 uMessageParam = 1; | |
1004 } | |
1005 } | |
1006 LABEL_232: | |
1007 if ( !ptr_507BDC ) | 1003 if ( !ptr_507BDC ) |
1008 { | 1004 { |
1009 pRenderer->ClearZBuffer(0, 479); | 1005 pRenderer->ClearZBuffer(0, 479); |
1010 viewparams->bRedrawGameUI = 1; | 1006 viewparams->bRedrawGameUI = 1; |
1011 viewparams->field_48 = 1; | 1007 viewparams->field_48 = 1; |
1012 if ( pCurrentScreen ) | 1008 if ( pCurrentScreen ) |
1013 { | 1009 { |
1014 if ( pCurrentScreen > SCREEN_67 ) | 1010 if ( pCurrentScreen > SCREEN_67 ) |
1015 { | 1011 { |
1016 if ( pCurrentScreen == SCREEN_QUICK_REFERENCE ) | 1012 if ( pCurrentScreen == SCREEN_QUICK_REFERENCE ) |
1017 goto LABEL_321; | 1013 { |
1014 pIcons_LOD->_4114F2(); | |
1015 if ( pGUIWindow_Settings ) | |
1016 { | |
1017 if ( pCurrentScreen == SCREEN_CHARACTERS ) | |
1018 { | |
1019 pMouse->SetCursorBitmap("MICON2"); | |
1020 } | |
1021 else | |
1022 { | |
1023 pGUIWindow_Settings->Release(); | |
1024 pGUIWindow_Settings = 0; | |
1025 pMouse->SetCursorBitmap("MICON1"); | |
1026 GameUI_Footer_TimeLeft = 0; | |
1027 unk_50C9A0 = 0; | |
1028 back_to_game(); | |
1029 } | |
1030 } | |
1031 if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 ) | |
1032 uActiveCharacter = pParty->GetNextActiveCharacter(); | |
1033 pGUIWindow_CurrentMenu->Release(); | |
1034 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse ) | |
1035 window_SpeakInHouse = 0; | |
1036 pGUIWindow_CurrentMenu = 0; | |
1037 pEventTimer->Resume(); | |
1038 pCurrentScreen = SCREEN_GAME; | |
1039 viewparams->bRedrawGameUI = 1; | |
1040 pIcons_LOD->_4355F7(); | |
1041 continue; | |
1042 } | |
1018 } | 1043 } |
1019 else | 1044 else |
1020 { | 1045 { |
1021 if ( pCurrentScreen < SCREEN_64 ) | 1046 if ( pCurrentScreen < SCREEN_64 ) |
1022 { | 1047 { |
1378 continue; | 1403 continue; |
1379 case SCREEN_VIDEO: | 1404 case SCREEN_VIDEO: |
1380 pVideoPlayer->Unload(); | 1405 pVideoPlayer->Unload(); |
1381 continue; | 1406 continue; |
1382 case SCREEN_CHARACTERS: | 1407 case SCREEN_CHARACTERS: |
1383 goto LABEL_319; | 1408 sub_4196A0(); |
1409 sub_419379(); | |
1410 pIcons_LOD->_4114F2(); | |
1411 if ( pGUIWindow_Settings ) | |
1412 { | |
1413 if ( pCurrentScreen == SCREEN_CHARACTERS ) | |
1414 { | |
1415 pMouse->SetCursorBitmap("MICON2"); | |
1416 } | |
1417 else | |
1418 { | |
1419 pGUIWindow_Settings->Release(); | |
1420 pGUIWindow_Settings = 0; | |
1421 pMouse->SetCursorBitmap("MICON1"); | |
1422 GameUI_Footer_TimeLeft = 0; | |
1423 unk_50C9A0 = 0; | |
1424 back_to_game(); | |
1425 } | |
1426 } | |
1427 if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 ) | |
1428 uActiveCharacter = pParty->GetNextActiveCharacter(); | |
1429 pGUIWindow_CurrentMenu->Release(); | |
1430 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse ) | |
1431 window_SpeakInHouse = 0; | |
1432 pGUIWindow_CurrentMenu = 0; | |
1433 pEventTimer->Resume(); | |
1434 pCurrentScreen = SCREEN_GAME; | |
1435 viewparams->bRedrawGameUI = 1; | |
1436 pIcons_LOD->_4355F7(); | |
1437 continue; | |
1384 default: | 1438 default: |
1385 if ( pGUIWindow_Settings ) | 1439 if ( pGUIWindow_Settings ) |
1386 { | 1440 { |
1387 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 1441 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
1388 { | 1442 { |
1436 pCurrentScreen = SCREEN_GAME; | 1490 pCurrentScreen = SCREEN_GAME; |
1437 viewparams->bRedrawGameUI = 1; | 1491 viewparams->bRedrawGameUI = 1; |
1438 pIcons_LOD->_4355F7(); | 1492 pIcons_LOD->_4355F7(); |
1439 continue; | 1493 continue; |
1440 } | 1494 } |
1441 LABEL_319: | |
1442 sub_4196A0(); | 1495 sub_4196A0(); |
1443 sub_419379(); | 1496 sub_419379(); |
1444 LABEL_321: | |
1445 pIcons_LOD->_4114F2(); | 1497 pIcons_LOD->_4114F2(); |
1446 } | 1498 } |
1447 if ( pGUIWindow_Settings ) | 1499 if ( pGUIWindow_Settings ) |
1448 { | 1500 { |
1449 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 1501 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
1837 pMouse->SetCursorBitmap("MICON1"); | 1889 pMouse->SetCursorBitmap("MICON1"); |
1838 GameUI_Footer_TimeLeft = 0; | 1890 GameUI_Footer_TimeLeft = 0; |
1839 unk_50C9A0 = 0; | 1891 unk_50C9A0 = 0; |
1840 back_to_game(); | 1892 back_to_game(); |
1841 continue; | 1893 continue; |
1894 case UIMSG_CastSpell_8F: | |
1895 __debugbreak(); | |
1842 case UIMSG_CastSpell_SPIRIT_Preservation://and blessing, treatment paralysis, hand hammers(individual upgrade) | 1896 case UIMSG_CastSpell_SPIRIT_Preservation://and blessing, treatment paralysis, hand hammers(individual upgrade) |
1843 case UIMSG_CastSpell_SPIRIT_Fate: | 1897 case UIMSG_CastSpell_SPIRIT_Fate: |
1844 case UIMSG_CastSpell_8F://??? | |
1845 if ( pMessageQueue_50CBD0->uNumMessages ) | 1898 if ( pMessageQueue_50CBD0->uNumMessages ) |
1846 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1899 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1847 if ( unk_50C9A0 ) | 1900 if ( unk_50C9A0 ) |
1848 { | 1901 { |
1849 uActiveCharacter = uMessageParam; | 1902 uActiveCharacter = uMessageParam; |
1903 } | 1956 } |
1904 sub_4BD8B5(); | 1957 sub_4BD8B5(); |
1905 //goto LABEL_434; | 1958 //goto LABEL_434; |
1906 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 1959 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
1907 { | 1960 { |
1908 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 1961 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; |
1909 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0; | 1962 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0; |
1910 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 1963 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
1911 ++pMessageQueue_50CBD0->uNumMessages; | 1964 ++pMessageQueue_50CBD0->uNumMessages; |
1912 }*/ | 1965 }*/ |
1913 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1966 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); |
1960 case UIMSG_CloseAfterInstallBeacon: | 2013 case UIMSG_CloseAfterInstallBeacon: |
1961 dword_50CDC8 = 1; | 2014 dword_50CDC8 = 1; |
1962 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 2015 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
1963 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 2016 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
1964 continue; | 2017 continue; |
1965 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 2018 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; |
1966 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 2019 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
1967 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 2020 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
1968 ++pMessageQueue_50CBD0->uNumMessages;*/ | 2021 ++pMessageQueue_50CBD0->uNumMessages;*/ |
1969 continue; | 2022 continue; |
1970 case UIMSG_InstallBeacon: | 2023 case UIMSG_InstallBeacon: |
2106 v67 = pGUIWindow_CurrentMenu->Hint; | 2159 v67 = pGUIWindow_CurrentMenu->Hint; |
2107 if ( v67 ) | 2160 if ( v67 ) |
2108 *((int *)v67 + 17) = 1; | 2161 *((int *)v67 + 17) = 1; |
2109 else | 2162 else |
2110 pParty->pPlayers[(unsigned __int8)town_portal_caster_id].CanCastSpell(0x14u); | 2163 pParty->pPlayers[(unsigned __int8)town_portal_caster_id].CanCastSpell(0x14u); |
2111 //LABEL_434: | |
2112 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 2164 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
2113 { | 2165 { |
2114 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 2166 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; |
2115 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0; | 2167 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0; |
2116 //LABEL_771: | |
2117 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 2168 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
2118 ++pMessageQueue_50CBD0->uNumMessages; | 2169 ++pMessageQueue_50CBD0->uNumMessages; |
2119 }*/ | 2170 }*/ |
2120 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2171 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); |
2121 continue; | 2172 continue; |
2245 continue; | 2296 continue; |
2246 case UIMSG_C4: | 2297 case UIMSG_C4: |
2247 __debugbreak(); | 2298 __debugbreak(); |
2248 uGameState = GAME_STATE_PLAYING; | 2299 uGameState = GAME_STATE_PLAYING; |
2249 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2"); | 2300 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2"); |
2250 goto LABEL_524; | |
2251 case UIMSG_DD: | 2301 case UIMSG_DD: |
2252 LABEL_524: | 2302 __debugbreak(); |
2253 sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer); | 2303 sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer); |
2254 memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); | 2304 memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); |
2255 if ( v216.uPropCount == 1 ) | 2305 if ( v216.uPropCount == 1 ) |
2256 { | 2306 { |
2257 pNPCData4 = (NPCData *)((signed int)pGames_LOD->uNumSubDirs / 2); | 2307 pNPCData4 = (NPCData *)((signed int)pGames_LOD->uNumSubDirs / 2); |
2258 v70 = atoi(v216.pProperties[0]); | 2308 v70 = atoi(v216.pProperties[0]); |
2259 if ( v70 <= 0 || v70 >= 77 ) | 2309 if ( v70 <= 0 || v70 >= 77 ) |
2260 { | 2310 { |
2261 //LABEL_90: | |
2262 v1 = ""; | 2311 v1 = ""; |
2263 //LABEL_91: | |
2264 //v0 = 1; | |
2265 continue; | 2312 continue; |
2266 } | 2313 } |
2267 v71 = v70; | 2314 v71 = v70; |
2268 strcpy(Str2, pMapStats->pInfos[v70].pFilename); | 2315 strcpy(Str2, pMapStats->pInfos[v70].pFilename); |
2269 pNPCData3 = 0; | 2316 pNPCData3 = 0; |
2282 { | 2329 { |
2283 strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)pNPCData3]); | 2330 strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)pNPCData3]); |
2284 dword_6BE364_game_settings_1 |= 1u; | 2331 dword_6BE364_game_settings_1 |= 1u; |
2285 uGameState = GAME_STATE_2; | 2332 uGameState = GAME_STATE_2; |
2286 OnMapLeave(); | 2333 OnMapLeave(); |
2287 //goto LABEL_90; | |
2288 v1 = ""; | 2334 v1 = ""; |
2289 //v0 = 1; | |
2290 continue; | 2335 continue; |
2291 } | 2336 } |
2292 } | 2337 } |
2293 sprintf(Str2, "No map found for %s", pMapStats->pInfos[v71].pName); | 2338 sprintf(Str2, "No map found for %s", pMapStats->pInfos[v71].pName); |
2294 v73 = Str2; | 2339 v73 = Str2; |
2295 } | 2340 } |
2296 else | 2341 else |
2297 { | 2342 { |
2298 if ( v216.uPropCount != 3 ) | 2343 if ( v216.uPropCount != 3 ) |
2299 //goto LABEL_90; | |
2300 { | 2344 { |
2301 v1 = ""; | 2345 v1 = ""; |
2302 //v0 = 1; | |
2303 continue; | 2346 continue; |
2304 } | 2347 } |
2305 v74 = atoi(v216.pProperties[0]); | 2348 v74 = atoi(v216.pProperties[0]); |
2306 thisi = atoi(v216.pProperties[1]); | 2349 thisi = atoi(v216.pProperties[1]); |
2307 v75 = atoi(v216.pProperties[2]); | 2350 v75 = atoi(v216.pProperties[2]); |
2309 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 2352 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
2310 { | 2353 { |
2311 if ( pIndoor->GetSector(v74, thisi, v75) ) | 2354 if ( pIndoor->GetSector(v74, thisi, v75) ) |
2312 { | 2355 { |
2313 v77 = thisi; | 2356 v77 = thisi; |
2314 //LABEL_544: | |
2315 pParty->vPosition.x = v74; | 2357 pParty->vPosition.x = v74; |
2316 pParty->vPosition.y = v77; | 2358 pParty->vPosition.y = v77; |
2317 pParty->vPosition.z = v76; | 2359 pParty->vPosition.z = v76; |
2318 pParty->uFallStartY = v76; | 2360 pParty->uFallStartY = v76; |
2319 //goto LABEL_90; | |
2320 v1 = ""; | 2361 v1 = ""; |
2321 //v0 = 1; | |
2322 continue; | 2362 continue; |
2323 } | 2363 } |
2324 } | 2364 } |
2325 else | 2365 else |
2326 { | 2366 { |
2330 { | 2370 { |
2331 v77 = thisi; | 2371 v77 = thisi; |
2332 if ( thisi > -32768 ) | 2372 if ( thisi > -32768 ) |
2333 { | 2373 { |
2334 if ( thisi < 32768 && v76 >= 0 && v76 < 10000 ) | 2374 if ( thisi < 32768 && v76 >= 0 && v76 < 10000 ) |
2335 //goto LABEL_544; | |
2336 { | 2375 { |
2337 pParty->vPosition.x = v74; | 2376 pParty->vPosition.x = v74; |
2338 pParty->vPosition.y = v77; | 2377 pParty->vPosition.y = v77; |
2339 pParty->vPosition.z = v76; | 2378 pParty->vPosition.z = v76; |
2340 pParty->uFallStartY = v76; | 2379 pParty->uFallStartY = v76; |
2341 //goto LABEL_90; | |
2342 v1 = ""; | 2380 v1 = ""; |
2343 //v0 = 1; | |
2344 continue; | 2381 continue; |
2345 } | 2382 } |
2346 } | 2383 } |
2347 } | 2384 } |
2348 } | 2385 } |
2349 } | 2386 } |
2350 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 2387 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
2351 v73 = "Can't jump to that location!"; | 2388 v73 = "Can't jump to that location!"; |
2352 } | 2389 } |
2353 ShowStatusBarString(v73, 6u); | 2390 ShowStatusBarString(v73, 6u); |
2354 //goto LABEL_90; | |
2355 v1 = ""; | 2391 v1 = ""; |
2356 //v0 = 1; | |
2357 continue; | 2392 continue; |
2358 case UIMSG_CastQuickSpell: | 2393 case UIMSG_CastQuickSpell: |
2359 if ( bUnderwater == 1 ) | 2394 if ( bUnderwater == 1 ) |
2360 { | 2395 { |
2361 ShowStatusBarString(pGlobalTXT_LocalizationStrings[652], 2);// "You can not do that while you are underwater!" | 2396 ShowStatusBarString(pGlobalTXT_LocalizationStrings[652], 2);// "You can not do that while you are underwater!" |
2362 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); | 2397 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); |
2363 continue; | 2398 continue; |
2364 } | 2399 } |
2365 if ( !uActiveCharacter || (pPlayer2 = pPlayers[uActiveCharacter], pPlayer2->uTimeToRecovery) ) | 2400 if ( !uActiveCharacter || (pPlayer2 = pPlayers[uActiveCharacter], pPlayer2->uTimeToRecovery) ) |
2366 //goto LABEL_90; | |
2367 { | 2401 { |
2368 v1 = ""; | 2402 v1 = ""; |
2369 //v0 = 1; | |
2370 continue; | 2403 continue; |
2371 } | 2404 } |
2372 _42777D_CastSpell_UseWand_ShootArrow(pPlayer2->uQuickSpell, uActiveCharacter - 1, 0, 0, uActiveCharacter); | 2405 _42777D_CastSpell_UseWand_ShootArrow(pPlayer2->uQuickSpell, uActiveCharacter - 1, 0, 0, uActiveCharacter); |
2373 continue; | 2406 continue; |
2407 case UIMSG_CastSpell_GreatShot://??? | |
2408 __debugbreak(); | |
2374 case UIMSG_CastSpell_SmallShot://FireBlow, Lightning, Ice Lightning, Swarm, | 2409 case UIMSG_CastSpell_SmallShot://FireBlow, Lightning, Ice Lightning, Swarm, |
2375 case UIMSG_CastSpell_GreatShot://??? | |
2376 if ( pRenderer->pRenderD3D ) | 2410 if ( pRenderer->pRenderD3D ) |
2377 { | 2411 { |
2378 v81 = pGame->pVisInstance->get_picked_object_zbuf_val(); | 2412 v81 = pGame->pVisInstance->get_picked_object_zbuf_val(); |
2379 } | 2413 } |
2380 else | 2414 else |
2401 if ( uMessage == UIMSG_CastSpell_GreatShot ) | 2435 if ( uMessage == UIMSG_CastSpell_GreatShot ) |
2402 HIBYTE(v51->field_8) &= 0xFEu; | 2436 HIBYTE(v51->field_8) &= 0xFEu; |
2403 else | 2437 else |
2404 HIBYTE(v51->field_8) &= 0xFDu; | 2438 HIBYTE(v51->field_8) &= 0xFDu; |
2405 } | 2439 } |
2406 //goto LABEL_416; | |
2407 v51->uPlayerID_2 = uMessageParam; | 2440 v51->uPlayerID_2 = uMessageParam; |
2408 v51->spell_target_pid = v44; | 2441 v51->spell_target_pid = v44; |
2409 pParty->pPlayers[v51->uPlayerID].SetRecoveryTime(300); | 2442 pParty->pPlayers[v51->uPlayerID].SetRecoveryTime(300); |
2410 pWindow3 = pGUIWindow_Settings; | 2443 pWindow3 = pGUIWindow_Settings; |
2411 pWindow3->Release(); | 2444 pWindow3->Release(); |
2427 pEventTimer->Pause(); | 2460 pEventTimer->Pause(); |
2428 continue; | 2461 continue; |
2429 case UIMSG_1B: | 2462 case UIMSG_1B: |
2430 __debugbreak(); | 2463 __debugbreak(); |
2431 if ( !uActiveCharacter ) | 2464 if ( !uActiveCharacter ) |
2432 //goto LABEL_90; | |
2433 { | 2465 { |
2434 v1 = ""; | 2466 v1 = ""; |
2435 //v0 = 1; | |
2436 continue; | 2467 continue; |
2437 } | 2468 } |
2438 if ( pParty->bTurnBasedModeOn != 1 ) | 2469 if ( pParty->bTurnBasedModeOn != 1 ) |
2439 //goto LABEL_569; | |
2440 { | 2470 { |
2441 if ( pActors[uMessageParam].uAIState == 5 ) | 2471 if ( pActors[uMessageParam].uAIState == 5 ) |
2442 stru_50C198.LootActor(&pActors[uMessageParam]); | 2472 stru_50C198.LootActor(&pActors[uMessageParam]); |
2443 else | 2473 else |
2444 Actor::StealFrom(uMessageParam); | 2474 Actor::StealFrom(uMessageParam); |
2445 continue; | 2475 continue; |
2446 } | 2476 } |
2447 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3 ) | 2477 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3 ) |
2448 //goto LABEL_90; | |
2449 { | 2478 { |
2450 v1 = ""; | 2479 v1 = ""; |
2451 //v0 = 1; | |
2452 continue; | 2480 continue; |
2453 } | 2481 } |
2454 if ( !(pTurnEngine->field_18 & 2) ) | 2482 if ( !(pTurnEngine->field_18 & 2) ) |
2455 { | 2483 { |
2456 //LABEL_569: | |
2457 if ( pActors[uMessageParam].uAIState == 5 ) | 2484 if ( pActors[uMessageParam].uAIState == 5 ) |
2458 stru_50C198.LootActor(&pActors[uMessageParam]); | 2485 stru_50C198.LootActor(&pActors[uMessageParam]); |
2459 else | 2486 else |
2460 Actor::StealFrom(uMessageParam); | 2487 Actor::StealFrom(uMessageParam); |
2461 } | 2488 } |
2462 continue; | 2489 continue; |
2463 | 2490 |
2464 case UIMSG_Attack: | 2491 case UIMSG_Attack: |
2465 if ( !uActiveCharacter ) | 2492 if ( !uActiveCharacter ) |
2466 //goto LABEL_90; | |
2467 { | 2493 { |
2468 v1 = ""; | 2494 v1 = ""; |
2469 //v0 = 1; | |
2470 continue; | 2495 continue; |
2471 } | 2496 } |
2472 if ( pParty->bTurnBasedModeOn != 1 ) | 2497 if ( pParty->bTurnBasedModeOn != 1 ) |
2473 //goto LABEL_577; | |
2474 { | 2498 { |
2475 _42ECB5_PlayerAttacksActor(); | 2499 _42ECB5_PlayerAttacksActor(); |
2476 continue; | 2500 continue; |
2477 } | 2501 } |
2478 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3 ) | 2502 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3 ) |
2479 //goto LABEL_90; | |
2480 { | 2503 { |
2481 v1 = ""; | 2504 v1 = ""; |
2482 //v0 = 1; | |
2483 continue; | 2505 continue; |
2484 } | 2506 } |
2485 if ( !(pTurnEngine->field_18 & 2) ) | 2507 if ( !(pTurnEngine->field_18 & 2) ) |
2486 //LABEL_577: | |
2487 _42ECB5_PlayerAttacksActor(); | 2508 _42ECB5_PlayerAttacksActor(); |
2488 continue; | 2509 continue; |
2489 case UIMSG_ExitRest: | 2510 case UIMSG_ExitRest: |
2490 GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, WINDOW_CloseRestWindowBtn, (int)pButton_RestUI_Exit, (int)pGlobalTXT_LocalizationStrings[81]);// "Exit Rest" | 2511 GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, WINDOW_CloseRestWindowBtn, (int)pButton_RestUI_Exit, (int)pGlobalTXT_LocalizationStrings[81]);// "Exit Rest" |
2491 continue; | 2512 continue; |
2545 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" | 2566 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" |
2546 ShowStatusBarString(v88, 2); | 2567 ShowStatusBarString(v88, 2); |
2547 if ( !uActiveCharacter ) | 2568 if ( !uActiveCharacter ) |
2548 { | 2569 { |
2549 v1 = ""; | 2570 v1 = ""; |
2550 //v0 = 1; | |
2551 continue; | 2571 continue; |
2552 } | 2572 } |
2553 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)13, 0); | 2573 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)13, 0); |
2554 continue; | 2574 continue; |
2555 } | 2575 } |
2573 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" | 2593 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" |
2574 ShowStatusBarString(v88, 2u); | 2594 ShowStatusBarString(v88, 2u); |
2575 if ( !uActiveCharacter ) | 2595 if ( !uActiveCharacter ) |
2576 { | 2596 { |
2577 v1 = ""; | 2597 v1 = ""; |
2578 //v0 = 1; | |
2579 continue; | 2598 continue; |
2580 } | 2599 } |
2581 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)13, 0); | 2600 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)13, 0); |
2582 continue; | 2601 continue; |
2583 case UIMSG_Rest8Hour: | 2602 case UIMSG_Rest8Hour: |
2623 Rest(v95 % 6 + 60); | 2642 Rest(v95 % 6 + 60); |
2624 _506F18_num_hours_to_sleep = 0; | 2643 _506F18_num_hours_to_sleep = 0; |
2625 dword_506F14 = 0; | 2644 dword_506F14 = 0; |
2626 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 2645 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
2627 { | 2646 { |
2628 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 2647 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; |
2629 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 2648 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
2630 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 2649 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
2631 ++pMessageQueue_50CBD0->uNumMessages; | 2650 ++pMessageQueue_50CBD0->uNumMessages; |
2632 }*/ | 2651 }*/ |
2633 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 2652 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
2693 v178 = pSpellStats->pInfos[uMessageParam + 11 * v98 + 1].pName; | 2712 v178 = pSpellStats->pInfos[uMessageParam + 11 * v98 + 1].pName; |
2694 v161 = pGlobalTXT_LocalizationStrings[486]; | 2713 v161 = pGlobalTXT_LocalizationStrings[486]; |
2695 } | 2714 } |
2696 sprintfex(pTmpBuf, v161, v178); | 2715 sprintfex(pTmpBuf, v161, v178); |
2697 sub_41C0B8_set_status_string(pTmpBuf); | 2716 sub_41C0B8_set_status_string(pTmpBuf); |
2698 //v0 = 1; | |
2699 continue; | 2717 continue; |
2700 case UIMSG_ClickInstallRemoveQuickSpellBtn: | 2718 case UIMSG_ClickInstallRemoveQuickSpellBtn: |
2701 GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, WINDOW_PressedButton2, (int)pBtn_InstallRemoveSpell, 0); | 2719 GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, WINDOW_PressedButton2, (int)pBtn_InstallRemoveSpell, 0); |
2702 if ( !uActiveCharacter ) | 2720 if ( !uActiveCharacter ) |
2703 continue; | 2721 continue; |
2832 if ( pMessageQueue_50CBD0->uNumMessages ) | 2850 if ( pMessageQueue_50CBD0->uNumMessages ) |
2833 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2851 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2834 if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery ) | 2852 if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery ) |
2835 { | 2853 { |
2836 if ( !pCurrentScreen ) | 2854 if ( !pCurrentScreen ) |
2837 //goto LABEL_693; | |
2838 { | 2855 { |
2839 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0); | 2856 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0); |
2840 pCurrentScreen = SCREEN_SPELL_BOOK; | 2857 pCurrentScreen = SCREEN_SPELL_BOOK; |
2841 pEventTimer->Pause(); | 2858 pEventTimer->Pause(); |
2842 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); | 2859 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); |
2895 stru_506E40._40E55E("gamma.pcx", 0); | 2912 stru_506E40._40E55E("gamma.pcx", 0); |
2896 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, WINDOW_PressedButton, (int)pBtn_GameSettings, 0); | 2913 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, WINDOW_PressedButton, (int)pBtn_GameSettings, 0); |
2897 //LABEL_453: | 2914 //LABEL_453: |
2898 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 2915 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
2899 continue; | 2916 continue; |
2900 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 2917 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; |
2901 //goto LABEL_770; | 2918 //goto LABEL_770; |
2902 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 2919 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
2903 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 2920 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
2904 ++pMessageQueue_50CBD0->uNumMessages;*/ | 2921 ++pMessageQueue_50CBD0->uNumMessages;*/ |
2905 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 2922 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
2910 if ( pMouse->GetCursorPos(&v211)->y > 178 ) | 2927 if ( pMouse->GetCursorPos(&v211)->y > 178 ) |
2911 dword_50651C = -1; | 2928 dword_50651C = -1; |
2912 continue; | 2929 continue; |
2913 case UIMSG_ClickAwardsUpBtn: | 2930 case UIMSG_ClickAwardsUpBtn: |
2914 GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, WINDOW_CharactersPressedButton, (int)pBtn_Up, 0); | 2931 GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, WINDOW_CharactersPressedButton, (int)pBtn_Up, 0); |
2915 dword_506548 = 1; | 2932 BtnUp_flag = 1; |
2916 continue; | 2933 continue; |
2917 case UIMSG_ClickAwardsDownBtn: | 2934 case UIMSG_ClickAwardsDownBtn: |
2918 GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, WINDOW_CharactersPressedButton, (int)pBtn_Down, 0); | 2935 GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, WINDOW_CharactersPressedButton, (int)pBtn_Down, 0); |
2919 dword_506544 = 1; | 2936 BtnDown_flag = 1; |
2920 continue; | 2937 continue; |
2921 case UIMSG_ChangeDetaliz: | 2938 case UIMSG_ChangeDetaliz: |
2922 bRingsShownInCharScreen ^= 1; | 2939 bRingsShownInCharScreen ^= 1; |
2923 pCharacterScreen_DetalizBtn->Release(); | 2940 pCharacterScreen_DetalizBtn->Release(); |
2924 pCharacterScreen_DollBtn->Release(); | 2941 pCharacterScreen_DollBtn->Release(); |
2996 sub_419220(); | 3013 sub_419220(); |
2997 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; | 3014 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; |
2998 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, WINDOW_CharactersPressedButton, (int)pCharacterScreen_AwardsBtn, 0); | 3015 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, WINDOW_CharactersPressedButton, (int)pCharacterScreen_AwardsBtn, 0); |
2999 FillAwardsData(); | 3016 FillAwardsData(); |
3000 continue; | 3017 continue; |
3001 case UIMSG_AutonotesBook: | 3018 case UIMSG_AutonotesBook://не только Автозаметки (в процессе) |
3002 switch ( uMessageParam ) | 3019 switch ( uMessageParam ) |
3003 { | 3020 { |
3004 default: | 3021 case 11://Page UP |
3005 continue; | 3022 BtnUp_flag = 1; |
3006 case 11: | 3023 pButton = pBtn_Book_2; |
3007 dword_506548 = 1; | 3024 break; |
3008 continue; | 3025 case 10://Page DOWN |
3009 case 10: | 3026 BtnDown_flag = 1; |
3010 dword_506544 = 1; | 3027 pButton = pBtn_Book_1; |
3011 continue; | 3028 break; |
3012 case 0: | 3029 case 0: |
3013 pButton = pBtn_Book_1; | 3030 pButton = pBtn_Book_1; |
3014 dword_506544 = 1; | 3031 BtnDown_flag = 1; |
3015 break; | 3032 break; |
3016 case 1: | 3033 case 1: |
3017 pButton = pBtn_Book_2; | 3034 pButton = pBtn_Book_2;//увеличить в MapsBook |
3018 dword_506548 = 1; | 3035 BtnUp_flag = 1; |
3019 break; | 3036 break; |
3020 case 2: | 3037 case 2://Potions |
3021 dword_506540 = 1; | 3038 Book_PageBtn3_flag = 1; |
3022 if ( dword_506364 ) | 3039 if ( dword_506364 ) |
3023 continue; | 3040 continue; |
3024 pButton = pBtn_Book_3; | 3041 pButton = pBtn_Book_3; |
3025 break; | 3042 break; |
3026 case 3: | 3043 case 3://fountains |
3027 dword_50653C = 1; | 3044 Book_PageBtn4_flag = 1; |
3028 if ( dword_506364 ) | 3045 if ( dword_506364 ) |
3029 continue; | 3046 continue; |
3030 pButton = pBtn_Book_4; | 3047 pButton = pBtn_Book_4; |
3031 break; | 3048 break; |
3032 case 4: | 3049 case 4://obelisks |
3033 dword_506538 = 1; | 3050 Book_PageBtn5_flag = 1;//Autonotes_Obelisks_page_flag |
3034 if ( dword_506364 ) | 3051 if ( dword_506364 ) |
3035 continue; | 3052 continue; |
3036 pButton = pBtn_Book_5; | 3053 pButton = pBtn_Book_5; |
3037 break; | 3054 break; |
3038 case 5: | 3055 case 5://seer |
3039 dword_506534 = 1; | 3056 Book_PageBtn6_flag = 1;//Autonotes_Seer_page_flag |
3040 if ( dword_506364 ) | 3057 if ( dword_506364 ) |
3041 continue; | 3058 continue; |
3042 pButton = pBtn_Book_6; | 3059 pButton = pBtn_Book_6; |
3043 break; | 3060 break; |
3044 case 6: | 3061 case 6://misc |
3045 pButton = pBtn_Autonotes_Misc; | 3062 pButton = pBtn_Autonotes_Misc; |
3046 dword_506530 = 1; | 3063 Autonotes_Misc_page_flag = 1; |
3047 break; | 3064 break; |
3048 case 7: | 3065 case 7://Instructors |
3049 pButton = pBtn_Autonotes_Instructors; | 3066 pButton = pBtn_Autonotes_Instructors; |
3050 dword_50652C = 1; | 3067 Autonotes_Instructors_page_flag = 1; |
3051 break; | 3068 break; |
3069 default: | |
3070 continue; | |
3052 } | 3071 } |
3053 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); | 3072 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); |
3054 continue; | 3073 continue; |
3055 case UIMSG_SelectCharacter: | 3074 case UIMSG_SelectCharacter: |
3056 if ( pMessageQueue_50CBD0->uNumMessages ) | 3075 if ( pMessageQueue_50CBD0->uNumMessages ) |
3126 } | 3145 } |
3127 v115 = pMessageQueue_50CBD0->uNumMessages; | 3146 v115 = pMessageQueue_50CBD0->uNumMessages; |
3128 if ( !pMessageQueue_50CBD0->uNumMessages ) | 3147 if ( !pMessageQueue_50CBD0->uNumMessages ) |
3129 //goto LABEL_768; | 3148 //goto LABEL_768; |
3130 { | 3149 { |
3131 pMessageQueue_50CBD0->AddMessage(UIMSG_E, 0, 0); | 3150 pMessageQueue_50CBD0->AddMessage(UIMSG_MouseLeftClickInScreen, 0, 0); |
3132 /*if ( (signed int)v115 < 40 ) | 3151 /*if ( (signed int)v115 < 40 ) |
3133 //goto LABEL_769; | 3152 //goto LABEL_769; |
3134 { | 3153 { |
3135 pMessageQueue_50CBD0->pMessages[v115].eType = (UIMessageType)14; | 3154 pMessageQueue_50CBD0->pMessages[v115].eType = UIMSG_MouseLeftClickInScreen; |
3136 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 3155 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
3137 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 3156 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
3138 ++pMessageQueue_50CBD0->uNumMessages; | 3157 ++pMessageQueue_50CBD0->uNumMessages; |
3139 continue; | 3158 continue; |
3140 }*/ | 3159 }*/ |
3141 continue; | 3160 continue; |
3142 } | 3161 } |
3143 if ( pMessageQueue_50CBD0->pMessages[0].field_8 ) | 3162 if ( pMessageQueue_50CBD0->pMessages[0].field_8 ) |
3144 { | 3163 { |
3145 pMessageQueue_50CBD0->uNumMessages = 1; | 3164 pMessageQueue_50CBD0->uNumMessages = 1; |
3146 pMessageQueue_50CBD0->AddMessage(UIMSG_E, 0, 0); | 3165 pMessageQueue_50CBD0->AddMessage(UIMSG_MouseLeftClickInScreen, 0, 0); |
3147 /*v115 = v0; | 3166 /*v115 = v0; |
3148 pMessageQueue_50CBD0->uNumMessages = v0; | 3167 pMessageQueue_50CBD0->uNumMessages = v0; |
3149 pMessageQueue_50CBD0->pMessages[v115].eType = (UIMessageType)14; | 3168 pMessageQueue_50CBD0->pMessages[v115].eType = UIMSG_MouseLeftClickInScreen; |
3150 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 3169 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
3151 //goto LABEL_771; | 3170 //goto LABEL_771; |
3152 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 3171 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
3153 ++pMessageQueue_50CBD0->uNumMessages;*/ | 3172 ++pMessageQueue_50CBD0->uNumMessages;*/ |
3154 continue; | 3173 continue; |
3155 } | 3174 } |
3156 v115 = 0; | 3175 v115 = 0; |
3157 pMessageQueue_50CBD0->uNumMessages = 0; | 3176 pMessageQueue_50CBD0->uNumMessages = 0; |
3158 pMessageQueue_50CBD0->AddMessage(UIMSG_E, 0, 0); | 3177 pMessageQueue_50CBD0->AddMessage(UIMSG_MouseLeftClickInScreen, 0, 0); |
3159 /*if ( (signed int)v115 < 40 ) | 3178 /*if ( (signed int)v115 < 40 ) |
3160 //goto LABEL_769; | 3179 //goto LABEL_769; |
3161 { | 3180 { |
3162 pMessageQueue_50CBD0->pMessages[v115].eType = (UIMessageType)14; | 3181 pMessageQueue_50CBD0->pMessages[v115].eType = UIMSG_MouseLeftClickInScreen; |
3163 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 3182 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
3164 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 3183 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
3165 ++pMessageQueue_50CBD0->uNumMessages; | 3184 ++pMessageQueue_50CBD0->uNumMessages; |
3166 continue; | 3185 continue; |
3167 }*/ | 3186 }*/ |
3168 continue; | 3187 continue; |
3169 case UIMSG_E: | 3188 case UIMSG_MouseLeftClickInScreen://срабатывает при нажатии на правую кнопку мыши после UIMSG_MouseLeftClickInGame |
3170 __debugbreak();//срабатывает при нажатии на правую кнопку мыши после UIMSG_MouseLeftClickInGame | |
3171 if ( pMessageQueue_50CBD0->uNumMessages ) | 3189 if ( pMessageQueue_50CBD0->uNumMessages ) |
3172 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3190 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
3173 OnGameViewportClick(); | 3191 OnGameViewportClick(); |
3174 continue; | 3192 continue; |
3175 case UIMSG_F: | 3193 case UIMSG_F: |
3188 GUIWindow::Create(0, 0, 0, 0, WINDOW_F, (int)pButton2, 0); | 3206 GUIWindow::Create(0, 0, 0, 0, WINDOW_F, (int)pButton2, 0); |
3189 continue; | 3207 continue; |
3190 case UIMSG_54: | 3208 case UIMSG_54: |
3191 __debugbreak(); | 3209 __debugbreak(); |
3192 pButton2 = (GUIButton *)uMessageParam; | 3210 pButton2 = (GUIButton *)uMessageParam; |
3193 GUIWindow::Create(0, 0, 0, 0, (WindowType)22, (int)pButton2, 0); | 3211 GUIWindow::Create(0, 0, 0, 0, WINDOW_22, (int)pButton2, 0); |
3194 continue; | 3212 continue; |
3195 case UIMSG_Game_Action: | 3213 case UIMSG_Game_Action: |
3196 if ( pMessageQueue_50CBD0->uNumMessages ) | 3214 if ( pMessageQueue_50CBD0->uNumMessages ) |
3197 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3215 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
3198 OnPressSpace(); | 3216 OnPressSpace(); |
10910 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0); | 10928 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0); |
10911 | 10929 |
10912 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 10930 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
10913 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 10931 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
10914 { | 10932 { |
10915 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 10933 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; |
10916 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 10934 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
10917 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 10935 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
10918 ++pMessageQueue_50CBD0->uNumMessages; | 10936 ++pMessageQueue_50CBD0->uNumMessages; |
10919 }*/ | 10937 }*/ |
10920 v42 = (int *)&a2.y; | 10938 v42 = (int *)&a2.y; |
10986 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0); | 11004 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0); |
10987 | 11005 |
10988 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 11006 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
10989 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 11007 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
10990 { | 11008 { |
10991 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 11009 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; |
10992 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 11010 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
10993 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 11011 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
10994 ++pMessageQueue_50CBD0->uNumMessages; | 11012 ++pMessageQueue_50CBD0->uNumMessages; |
10995 }*/ | 11013 }*/ |
10996 v42 = (int *)&a2.y; | 11014 v42 = (int *)&a2.y; |
11302 && pPlayers[uActiveCharacter]->CanAct() | 11320 && pPlayers[uActiveCharacter]->CanAct() |
11303 && pPlayers[uActiveCharacter]->CanSteal() ) | 11321 && pPlayers[uActiveCharacter]->CanSteal() ) |
11304 { | 11322 { |
11305 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 11323 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
11306 { | 11324 { |
11307 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)27; | 11325 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_1B; |
11308 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v6 >> 3; | 11326 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v6 >> 3; |
11309 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 11327 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
11310 ++pMessageQueue_50CBD0->uNumMessages; | 11328 ++pMessageQueue_50CBD0->uNumMessages; |
11311 }*/ | 11329 }*/ |
11312 pMessageQueue_50CBD0->AddMessage(UIMSG_1B, PID_ID(v6), 0); | 11330 pMessageQueue_50CBD0->AddMessage(UIMSG_1B, PID_ID(v6), 0); |