comparison mm7_5.cpp @ 1035:306ec23b37df

004C1EE5 & other stuff
author Nomad
date Wed, 22 May 2013 14:12:51 +0200
parents 3a5c8df8381d
children ff2d888f8033 39f42990698f 010a844ef4a0
comparison
equal deleted inserted replaced
1034:aa848c90181f 1035:306ec23b37df
1342 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse ) 1342 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse )
1343 window_SpeakInHouse = 0; 1343 window_SpeakInHouse = 0;
1344 pGUIWindow_CurrentMenu = 0; 1344 pGUIWindow_CurrentMenu = 0;
1345 pEventTimer->Resume(); 1345 pEventTimer->Resume();
1346 pCurrentScreen = SCREEN_GAME; 1346 pCurrentScreen = SCREEN_GAME;
1347 viewparams->bRedrawGameUI = 1; 1347 viewparams->bRedrawGameUI = true;
1348 pIcons_LOD->_4355F7(); 1348 pIcons_LOD->_4355F7();
1349 continue; 1349 continue;
1350 case SCREEN_INPUT_BLV://click escape 1350 case SCREEN_INPUT_BLV://click escape
1351 if ( uCurrentHouse_Animation == 153 ) 1351 if ( uCurrentHouse_Animation == 153 )
1352 PlayHouseSound(0x99u, HouseSound_Greeting_2); 1352 PlayHouseSound(0x99u, HouseSound_Greeting_2);
1353 pVideoPlayer->Unload(); 1353 pVideoPlayer->Unload();
1354 if ( dword_5B65CC ) 1354 if ( dword_5B65CC )
1355 { 1355 {
1356 pParty->field_709 = 0; 1356 pParty->field_709 = 0;
1357 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu; 1357 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu;
1358 Party__CountHirelings(); 1358 pParty->CountHirelings();
1359 viewparams->bRedrawGameUI = 1; 1359 viewparams->bRedrawGameUI = true;
1360 dword_5B65CC = 0; 1360 dword_5B65CC = 0;
1361 } 1361 }
1362 DialogueEnding(); 1362 DialogueEnding();
1363 pCurrentScreen = SCREEN_GAME; 1363 pCurrentScreen = SCREEN_GAME;
1364 viewparams->bRedrawGameUI = 1; 1364 viewparams->bRedrawGameUI = true;
1365 continue; 1365 continue;
1366 case SCREEN_NPC_DIALOGUE://click escape 1366 case SCREEN_NPC_DIALOGUE://click escape
1367 if ( dword_5B65CC ) 1367 if ( dword_5B65CC )
1368 { 1368 {
1369 pParty->field_709 = 0; 1369 pParty->field_709 = 0;
1370 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu; 1370 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu;
1371 Party__CountHirelings(); 1371 pParty->CountHirelings();
1372 viewparams->bRedrawGameUI = 1; 1372 viewparams->bRedrawGameUI = true;
1373 dword_5B65CC = 0; 1373 dword_5B65CC = 0;
1374 } 1374 }
1375 //goto LABEL_317; 1375 //goto LABEL_317;
1376 DialogueEnding(); 1376 DialogueEnding();
1377 pCurrentScreen = SCREEN_GAME; 1377 pCurrentScreen = SCREEN_GAME;
1378 viewparams->bRedrawGameUI = 1; 1378 viewparams->bRedrawGameUI = true;
1379 continue; 1379 continue;
1380 case SCREEN_BRANCHLESS_NPC_DIALOG://click escape 1380 case SCREEN_BRANCHLESS_NPC_DIALOG://click escape
1381 memset(GameUI_Footer_TimedString, 0, 0xC8u); 1381 memset(GameUI_Footer_TimedString, 0, 0xC8u);
1382 sub_4452BB(); 1382 sub_4452BB();
1383 DialogueEnding(); 1383 DialogueEnding();
1384 pCurrentScreen = SCREEN_GAME; 1384 pCurrentScreen = SCREEN_GAME;
1385 viewparams->bRedrawGameUI = 1; 1385 viewparams->bRedrawGameUI = true;
1386 continue; 1386 continue;
1387 case SCREEN_CHANGE_LOCATION://click escape 1387 case SCREEN_CHANGE_LOCATION://click escape
1388 if ( pParty->vPosition.x < -22528 ) 1388 if ( pParty->vPosition.x < -22528 )
1389 pParty->vPosition.x = -22528; 1389 pParty->vPosition.x = -22528;
1390 if ( pParty->vPosition.x > 22528 ) 1390 if ( pParty->vPosition.x > 22528 )
1393 pParty->vPosition.y = -22528; 1393 pParty->vPosition.y = -22528;
1394 if ( pParty->vPosition.y > 22528 ) 1394 if ( pParty->vPosition.y > 22528 )
1395 pParty->vPosition.y = 22528; 1395 pParty->vPosition.y = 22528;
1396 DialogueEnding(); 1396 DialogueEnding();
1397 pCurrentScreen = SCREEN_GAME; 1397 pCurrentScreen = SCREEN_GAME;
1398 viewparams->bRedrawGameUI = 1; 1398 viewparams->bRedrawGameUI = true;
1399 continue; 1399 continue;
1400 case SCREEN_VIDEO: 1400 case SCREEN_VIDEO:
1401 pVideoPlayer->Unload(); 1401 pVideoPlayer->Unload();
1402 continue; 1402 continue;
1403 case SCREEN_CHARACTERS: 1403 case SCREEN_CHARACTERS:
1426 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse ) 1426 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse )
1427 window_SpeakInHouse = 0; 1427 window_SpeakInHouse = 0;
1428 pGUIWindow_CurrentMenu = 0; 1428 pGUIWindow_CurrentMenu = 0;
1429 pEventTimer->Resume(); 1429 pEventTimer->Resume();
1430 pCurrentScreen = SCREEN_GAME; 1430 pCurrentScreen = SCREEN_GAME;
1431 viewparams->bRedrawGameUI = 1; 1431 viewparams->bRedrawGameUI = true;
1432 pIcons_LOD->_4355F7(); 1432 pIcons_LOD->_4355F7();
1433 continue; 1433 continue;
1434 default: 1434 default:
1435 if ( pGUIWindow_Settings ) 1435 if ( pGUIWindow_Settings )
1436 { 1436 {
1482 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse ) 1482 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse )
1483 window_SpeakInHouse = 0; 1483 window_SpeakInHouse = 0;
1484 pGUIWindow_CurrentMenu = 0; 1484 pGUIWindow_CurrentMenu = 0;
1485 pEventTimer->Resume(); 1485 pEventTimer->Resume();
1486 pCurrentScreen = SCREEN_GAME; 1486 pCurrentScreen = SCREEN_GAME;
1487 viewparams->bRedrawGameUI = 1; 1487 viewparams->bRedrawGameUI = true;
1488 pIcons_LOD->_4355F7(); 1488 pIcons_LOD->_4355F7();
1489 continue; 1489 continue;
1490 } 1490 }
1491 CharacterUI_ReleaseButtons(); 1491 CharacterUI_ReleaseButtons();
1492 sub_419379(); 1492 sub_419379();
1514 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse ) 1514 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse )
1515 window_SpeakInHouse = 0; 1515 window_SpeakInHouse = 0;
1516 pGUIWindow_CurrentMenu = 0; 1516 pGUIWindow_CurrentMenu = 0;
1517 pEventTimer->Resume(); 1517 pEventTimer->Resume();
1518 pCurrentScreen = SCREEN_GAME; 1518 pCurrentScreen = SCREEN_GAME;
1519 viewparams->bRedrawGameUI = 1; 1519 viewparams->bRedrawGameUI = true;
1520 pIcons_LOD->_4355F7(); 1520 pIcons_LOD->_4355F7();
1521 continue; 1521 continue;
1522 } 1522 }
1523 if ( !pGUIWindow_Settings )//Draw Menu 1523 if ( !pGUIWindow_Settings )//Draw Menu
1524 { 1524 {
1525 dword_6BE138 = -1; 1525 dword_6BE138 = -1;
1526 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_GameSettings, 1); 1526 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_GameSettings, 1);
1527 pEventTimer->Pause(); 1527 pEventTimer->Pause();
1528 pAudioPlayer->StopChannels(-1, -1); 1528 pAudioPlayer->StopChannels(-1, -1);
1529 pCurrentScreen = SCREEN_MENU;
1530
1529 ++pIcons_LOD->uTexturePacksCount; 1531 ++pIcons_LOD->uTexturePacksCount;
1530 pCurrentScreen = 1;
1531 if ( !pIcons_LOD->uNumPrevLoadedFiles ) 1532 if ( !pIcons_LOD->uNumPrevLoadedFiles )
1532 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; 1533 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
1534
1533 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_OptionsButtons, 0, 0); 1535 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_OptionsButtons, 0, 0);
1534 uTextureID_Options = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); 1536 uTextureID_Options = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE);
1535 uTextureID_New1 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); 1537 uTextureID_New1 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE);
1536 uTextureID_Load1 = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE); 1538 uTextureID_Load1 = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE);
1537 uTextureID_Save1 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE); 1539 uTextureID_Save1 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE);
1663 case UIMSG_TransitionWindowCloseBtn: 1665 case UIMSG_TransitionWindowCloseBtn:
1664 CloseWindowBackground(); 1666 CloseWindowBackground();
1665 pVideoPlayer->Unload(); 1667 pVideoPlayer->Unload();
1666 DialogueEnding(); 1668 DialogueEnding();
1667 start_event_seq_number = 0; 1669 start_event_seq_number = 0;
1668 viewparams->bRedrawGameUI = 1; 1670 viewparams->bRedrawGameUI = true;
1669 continue; 1671 continue;
1670 case UIMSG_CycleCharacters: 1672 case UIMSG_CycleCharacters:
1671 v39 = GetAsyncKeyState(VK_SHIFT); 1673 v39 = GetAsyncKeyState(VK_SHIFT);
1672 uActiveCharacter = CycleCharacter(v39); 1674 uActiveCharacter = CycleCharacter(v39);
1673 viewparams->bRedrawGameUI = 1; 1675 viewparams->bRedrawGameUI = true;
1674 continue; 1676 continue;
1675 case UIMSG_OnTravelByFoot: 1677 case UIMSG_OnTravelByFoot:
1676 if ( pMessageQueue_50CBD0->uNumMessages ) 1678 if ( pMessageQueue_50CBD0->uNumMessages )
1677 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 1679 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
1678 dword_50CDC8 = 1; 1680 dword_50CDC8 = 1;