Mercurial > mm7
comparison mm7_5.cpp @ 4:8e33efd39355
15.01.13(work)
author | Ritor1 |
---|---|
date | Tue, 15 Jan 2013 17:44:23 +0600 |
parents | bf31c505f4d3 |
children | 66319a734368 |
comparison
equal
deleted
inserted
replaced
3:bf31c505f4d3 | 4:8e33efd39355 |
---|---|
313 pMessageQueue_50CBD0->PopMessage(&uMessage, &uMessageParam, (int *)&v199); | 313 pMessageQueue_50CBD0->PopMessage(&uMessage, &uMessageParam, (int *)&v199); |
314 switch ( uMessage ) | 314 switch ( uMessage ) |
315 { | 315 { |
316 case UIMSG_ChangeGameState: | 316 case UIMSG_ChangeGameState: |
317 uGameState = v0; | 317 uGameState = v0; |
318 goto _continue; | 318 continue; |
319 case UIMSG_PlayArcomage: | 319 case UIMSG_PlayArcomage: |
320 pVideoPlayer->_4BF5B2(); | 320 pVideoPlayer->_4BF5B2(); |
321 pArcomageGame->bGameInProgress = 1; | 321 pArcomageGame->bGameInProgress = 1; |
322 PrepareArcomage(); | 322 PrepareArcomage(); |
323 goto _continue; | 323 continue; |
324 case UIMSG_StartNPCDialogue: | 324 case UIMSG_StartNPCDialogue: |
325 if ( !uActiveCharacter ) | 325 if ( !uActiveCharacter ) |
326 goto _continue; | 326 continue; |
327 viewparams->field_48 = v0; | 327 viewparams->field_48 = v0; |
328 if ( pMessageQueue_50CBD0->uNumMessages ) | 328 if ( pMessageQueue_50CBD0->uNumMessages ) |
329 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 329 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
330 dword_5B65D0_dialogue_actor_npc_id = pActors[uMessageParam].uNPC_ID; | 330 dword_5B65D0_dialogue_actor_npc_id = pActors[uMessageParam].uNPC_ID; |
331 pActor = &pActors[uMessageParam]; | 331 pActor = &pActors[uMessageParam]; |
332 goto _actor_init_dlg; | 332 //goto _actor_init_dlg; |
333 pActor->InitializeDialogue(v0); | |
334 continue; | |
333 case UIMSG_Quit|0x2: | 335 case UIMSG_Quit|0x2: |
334 case 0x87: | 336 case 0x87: |
335 if ( bNoNPCHiring != 1 && !pCurrentScreen ) | 337 if ( bNoNPCHiring != 1 && !pCurrentScreen ) |
336 { | 338 { |
337 if ( pMessageQueue_50CBD0->uNumMessages ) | 339 if ( pMessageQueue_50CBD0->uNumMessages ) |
373 { | 375 { |
374 //Actor::Actor(&actor); | 376 //Actor::Actor(&actor); |
375 memset(&actor, 0, 0x344u); | 377 memset(&actor, 0, 0x344u); |
376 actor.uNPC_ID += -1 - (unsigned __int8)pParty->field_709 - uNumSeconds; | 378 actor.uNPC_ID += -1 - (unsigned __int8)pParty->field_709 - uNumSeconds; |
377 pActor = &actor; | 379 pActor = &actor; |
378 _actor_init_dlg: | 380 //_actor_init_dlg: |
379 pActor->InitializeDialogue(v0); | 381 pActor->InitializeDialogue(v0); |
380 } | 382 } |
381 } | 383 } |
382 goto _continue; | 384 continue; |
383 case 0x51: | 385 case 0x51: |
384 sub_4BDB56_buy_skill____(); | 386 sub_4BDB56_buy_skill____(); |
385 goto _continue; | 387 continue; |
386 case UIMSG_AF: | 388 case UIMSG_AF: |
387 sub_4B2001(uMessageParam); | 389 sub_4B2001(uMessageParam); |
388 goto _continue; | 390 continue; |
389 case 0x195: | 391 case 0x195: |
390 sub_4BCACC_bounties(uMessageParam); | 392 sub_4BCACC_bounties(uMessageParam); |
391 goto _continue; | 393 continue; |
392 case 0x88: | 394 case 0x88: |
393 sub_4BC49B(uMessageParam); | 395 sub_4BC49B(uMessageParam); |
394 goto _continue; | 396 continue; |
395 case 0x19A: | 397 case 0x19A: |
396 _4B4224_UpdateNPCTopics(uMessageParam); | 398 _4B4224_UpdateNPCTopics(uMessageParam); |
397 goto _continue; | 399 continue; |
398 case UIMSG_StartNewGame: | 400 case UIMSG_StartNewGame: |
399 if ( dword_6BE138 == 124 || uMessageParam ) | 401 if ( dword_6BE138 == 124 || uMessageParam ) |
400 { | 402 { |
401 pIcons_LOD->_40F9C5(); | 403 pIcons_LOD->_40F9C5(); |
402 pIcons_LOD->_4114F2(); | 404 pIcons_LOD->_4114F2(); |
412 { | 414 { |
413 ShowStatusBarString(pGlobalTXT_LocalizationStrings[201], 2u);// "Are you sure? Click again to start a New Game" | 415 ShowStatusBarString(pGlobalTXT_LocalizationStrings[201], 2u);// "Are you sure? Click again to start a New Game" |
414 pAudioPlayer->PlaySound(SOUND_20001, 0, 0, -1, 0, 0, 0, 0); | 416 pAudioPlayer->PlaySound(SOUND_20001, 0, 0, -1, 0, 0, 0, 0); |
415 dword_6BE138 = 124; | 417 dword_6BE138 = 124; |
416 } | 418 } |
417 _release_tex_and_continue: | 419 //_release_tex_and_continue: |
418 stru_506E40.Release(); | 420 stru_506E40.Release(); |
419 goto _continue; | 421 continue; |
420 case UIMSG_Game_OpenLoadGameDialog: | 422 case UIMSG_Game_OpenLoadGameDialog: |
421 pIcons_LOD->_40F9C5(); | 423 pIcons_LOD->_40F9C5(); |
422 pIcons_LOD->_4114F2(); | 424 pIcons_LOD->_4114F2(); |
423 if ( pMessageQueue_50CBD0->uNumMessages ) | 425 if ( pMessageQueue_50CBD0->uNumMessages ) |
424 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 426 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
425 pGUIWindow_CurrentMenu->Release(); | 427 pGUIWindow_CurrentMenu->Release(); |
426 pCurrentScreen = 12; | 428 pCurrentScreen = 12; |
427 GameUI_DrawLoadMenu(v0); | 429 GameUI_DrawLoadMenu(v0); |
428 goto _continue; | 430 continue; |
429 case UIMSG_Quit: | 431 case UIMSG_Quit: |
430 if ( dword_6BE138 == 132 || uMessageParam ) | 432 if ( dword_6BE138 == 132 || uMessageParam ) |
431 { | 433 { |
432 pIcons_LOD->_40F9C5(); | 434 pIcons_LOD->_40F9C5(); |
433 pIcons_LOD->_4114F2(); | 435 pIcons_LOD->_4114F2(); |
444 { | 446 { |
445 ShowStatusBarString(pGlobalTXT_LocalizationStrings[82], 2u);// "Are you sure? Click again to quit" | 447 ShowStatusBarString(pGlobalTXT_LocalizationStrings[82], 2u);// "Are you sure? Click again to quit" |
446 pAudioPlayer->PlaySound(SOUND_20001, 0, 0, -1, 0, 0, 0, 0); | 448 pAudioPlayer->PlaySound(SOUND_20001, 0, 0, -1, 0, 0, 0, 0); |
447 dword_6BE138 = 132; | 449 dword_6BE138 = 132; |
448 } | 450 } |
449 goto _release_tex_and_continue; | 451 //goto _release_tex_and_continue; |
452 stru_506E40.Release(); | |
453 continue; | |
450 case 0x80: | 454 case 0x80: |
451 pIcons_LOD->_40F9C5(); | 455 pIcons_LOD->_40F9C5(); |
452 pIcons_LOD->_4114F2(); | 456 pIcons_LOD->_4114F2(); |
453 pGUIWindow_CurrentMenu->Release(); | 457 pGUIWindow_CurrentMenu->Release(); |
454 pCurrentScreen = 2; | 458 pCurrentScreen = 2; |
534 pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu); | 538 pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu); |
535 if ( strcmp((const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pGlobalTXT_LocalizationStrings[72]) )// "Empty" | 539 if ( strcmp((const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pGlobalTXT_LocalizationStrings[72]) )// "Empty" |
536 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot); | 540 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot); |
537 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); | 541 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); |
538 } | 542 } |
539 goto _continue; | 543 continue; |
540 case UIMSG_LoadGame: | 544 case UIMSG_LoadGame: |
541 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] ) | 545 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] ) |
542 { | 546 { |
543 LoadGame(uLoadGameUI_SelectedSlot); | 547 LoadGame(uLoadGameUI_SelectedSlot); |
544 uGameState = 3; | 548 uGameState = 3; |
545 } | 549 } |
546 goto _release_tex_and_continue; | 550 //goto _release_tex_and_continue; |
551 stru_506E40.Release(); | |
552 continue; | |
547 case UIMSG_SaveGame: | 553 case UIMSG_SaveGame: |
548 if ( pGUIWindow_CurrentMenu->field_40 == v0 ) | 554 if ( pGUIWindow_CurrentMenu->field_40 == v0 ) |
549 { | 555 { |
550 pKeyActionMap->_459ED1(0); | 556 pKeyActionMap->_459ED1(0); |
551 strcpy( | 557 strcpy( |
552 (char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, | 558 (char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, |
553 (const char *)pKeyActionMap->pPressedKeysBuffer); | 559 (const char *)pKeyActionMap->pPressedKeysBuffer); |
554 } | 560 } |
555 DoSavegame(uLoadGameUI_SelectedSlot); | 561 DoSavegame(uLoadGameUI_SelectedSlot); |
556 goto _release_tex_and_continue; | 562 //goto _release_tex_and_continue; |
563 stru_506E40.Release(); | |
564 continue; | |
557 case UIMSG_StartNewGame|0x2: | 565 case UIMSG_StartNewGame|0x2: |
558 pGUIWindow_CurrentMenu->Release(); | 566 pGUIWindow_CurrentMenu->Release(); |
559 pCurrentScreen = 11; | 567 pCurrentScreen = 11; |
560 GameUI_DrawSaveMenu(); | 568 GameUI_DrawSaveMenu(); |
561 goto _continue; | 569 continue; |
562 case UIMSG_Game_OpenOptionsDialog: | 570 case UIMSG_Game_OpenOptionsDialog: |
563 if ( pMessageQueue_50CBD0->uNumMessages ) | 571 if ( pMessageQueue_50CBD0->uNumMessages ) |
564 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 572 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
565 pGUIWindow_CurrentMenu->Release(); | 573 pGUIWindow_CurrentMenu->Release(); |
566 viewparams->field_48 = v0; | 574 viewparams->field_48 = v0; |
642 v129 = v0; | 650 v129 = v0; |
643 v126 = 40; | 651 v126 = 40; |
644 v124 = 214; | 652 v124 = 214; |
645 v122 = 194; | 653 v122 = 194; |
646 v120 = 19; | 654 v120 = 19; |
647 goto LABEL_117; | 655 //goto LABEL_117; |
656 pGUIWindow_CurrentMenu->CreateButton(v120, v122, v124, v126, v129, v131, v134, v138, v143, v150, pTexture); | |
657 continue; | |
648 case UIMSG_OpenKeyMappingOptions: | 658 case UIMSG_OpenKeyMappingOptions: |
649 if ( pMessageQueue_50CBD0->uNumMessages ) | 659 if ( pMessageQueue_50CBD0->uNumMessages ) |
650 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 660 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
651 pGUIWindow_CurrentMenu->Release(); | 661 pGUIWindow_CurrentMenu->Release(); |
652 viewparams->field_48 = 1; | 662 viewparams->field_48 = 1; |
680 dword_506F08 = 1; | 690 dword_506F08 = 1; |
681 memset(word_506E6C, 0, 0x1Cu); | 691 memset(word_506E6C, 0, 0x1Cu); |
682 word_506E6C[14] = 0; | 692 word_506E6C[14] = 0; |
683 memcpy(pPrevVirtualCidesMapping, pKeyActionMap->pVirtualKeyCodesMapping, 0x78u); | 693 memcpy(pPrevVirtualCidesMapping, pKeyActionMap->pVirtualKeyCodesMapping, 0x78u); |
684 goto LABEL_90; | 694 goto LABEL_90; |
685 default: | 695 //default: |
686 goto _continue; | 696 //continue; |
687 case UIMSG_ResetKeyMapping|0x1: | 697 case UIMSG_ResetKeyMapping|0x1: |
688 if ( dword_506E68 != -1 ) | 698 if ( dword_506E68 != -1 ) |
689 goto LABEL_623; | 699 goto LABEL_623; |
690 v14 = uMessageParam; | 700 v14 = uMessageParam; |
691 if ( dword_506F08 != v0 ) | 701 if ( dword_506F08 != v0 ) |
692 v14 = uMessageParam + 14; | 702 v14 = uMessageParam + 14; |
693 dword_506E68 = v14; | 703 dword_506E68 = v14; |
694 pKeyActionMap->EnterText(0, v0, pGUIWindow_CurrentMenu); | 704 pKeyActionMap->EnterText(0, v0, pGUIWindow_CurrentMenu); |
695 goto _continue; | 705 continue; |
696 case UIMSG_ResetKeyMapping: | 706 case UIMSG_ResetKeyMapping: |
697 v197 = 1; | 707 v197 = 1; |
698 pKeyActionMap->SetDefaultMapping(); | 708 pKeyActionMap->SetDefaultMapping(); |
699 uAction = 0; | 709 uAction = 0; |
700 do | 710 do |
714 GUI_ReplaceHotkey(LOBYTE(pPrevVirtualCidesMapping[uAction]), v17, 0); | 724 GUI_ReplaceHotkey(LOBYTE(pPrevVirtualCidesMapping[uAction]), v17, 0); |
715 } | 725 } |
716 } | 726 } |
717 pPrevVirtualCidesMapping[uAction] = pKeyActionMap->GetActionVKey((enum InputAction)uAction); | 727 pPrevVirtualCidesMapping[uAction] = pKeyActionMap->GetActionVKey((enum InputAction)uAction); |
718 v18 = uAction++; | 728 v18 = uAction++; |
719 v13 = __OFSUB__(uAction, 28); | 729 v13 = uAction > 28; |
720 v12 = uAction - 28 < 0; | 730 v12 = uAction - 28 < 0; |
721 *((char *)word_506E6C + v18) = 0; | 731 *((char *)word_506E6C + v18) = 0; |
722 } | 732 } |
723 while ( v12 ^ v13 ); | 733 while ( v12 ^ v13 ); |
724 v165 = 0; | 734 v165 = 0; |
730 v130 = 0; | 740 v130 = 0; |
731 v127 = 219; | 741 v127 = 219; |
732 goto _play_sound_and_continue; | 742 goto _play_sound_and_continue; |
733 case 0x1A0: | 743 case 0x1A0: |
734 dword_506F08 = v0; | 744 dword_506F08 = v0; |
735 goto _continue; | 745 continue; |
736 case UIMSG_StartNPCDialogue|0x100: | 746 case UIMSG_StartNPCDialogue|0x100: |
737 dword_506F08 = 2; | 747 dword_506F08 = 2; |
738 goto _continue; | 748 continue; |
739 case UIMSG_OpenVideoOptions: | 749 case UIMSG_OpenVideoOptions: |
740 if ( pMessageQueue_50CBD0->uNumMessages ) | 750 if ( pMessageQueue_50CBD0->uNumMessages ) |
741 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 751 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
742 pGUIWindow_CurrentMenu->Release(); | 752 pGUIWindow_CurrentMenu->Release(); |
743 viewparams->field_48 = v0; | 753 viewparams->field_48 = v0; |
787 v129 = 1; | 797 v129 = 1; |
788 v126 = 18; | 798 v126 = 18; |
789 v124 = 170; | 799 v124 = 170; |
790 v122 = 162; | 800 v122 = 162; |
791 v120 = 42; | 801 v120 = 42; |
792 LABEL_117: | 802 //LABEL_117: |
793 pGUIWindow_CurrentMenu->CreateButton(v120, v122, v124, v126, v129, v131, v134, v138, v143, v150, pTexture); | 803 pGUIWindow_CurrentMenu->CreateButton(v120, v122, v124, v126, v129, v131, v134, v138, v143, v150, pTexture); |
794 } | 804 } |
795 } | 805 } |
796 goto _continue; | 806 continue; |
797 case UIMSG_ToggleTint|0x1: | 807 case UIMSG_ToggleTint|0x1: |
798 if ( uMessageParam == 4 ) | 808 if ( uMessageParam == 4 ) |
799 { | 809 { |
800 --uGammaPos; | 810 --uGammaPos; |
801 if ( (uGammaPos & 0x80000000u) != 0 ) | 811 if ( (uGammaPos /*& 0x80000000u*/) != 0 ) |
802 { | 812 { |
803 uGammaPos = 0; | 813 uGammaPos = 0; |
804 goto LABEL_128; | 814 //goto LABEL_128; |
815 v165 = 0; | |
816 v151 = 0; | |
817 v144 = 0; | |
818 v139 = 0; | |
819 v135 = -1; | |
820 v132 = 0; | |
821 v130 = 0; | |
822 v127 = 21; | |
823 goto _play_sound_and_continue; | |
805 } | 824 } |
806 v19 = (double)(signed int)uGammaPos * 0.1 + 0.6; | 825 v19 = (double)(signed int)uGammaPos * 0.1 + 0.6; |
807 pGame->pGammaController->Initialize(v19); | 826 pGame->pGammaController->Initialize(v19); |
808 v166 = v0; | 827 v166 = v0; |
809 v152 = (int)pBtn_SliderLeft; | 828 v152 = (int)pBtn_SliderLeft; |
810 pWindowType2 = (WindowType)90; | 829 pWindowType2 = (WindowType)90; |
811 v140 = 0; | 830 v140 = 0; |
812 v136 = 0; | 831 v136 = 0; |
813 v20 = 21; | 832 v20 = 21; |
814 goto LABEL_122; | 833 //goto LABEL_122; |
834 GUIWindow::Create(v20, 0xA1u, v136, v140, pWindowType2, v152, v166); | |
835 //goto LABEL_128; | |
836 v165 = 0; | |
837 v151 = 0; | |
838 v144 = 0; | |
839 v139 = 0; | |
840 v135 = -1; | |
841 v132 = 0; | |
842 v130 = 0; | |
843 v127 = 21; | |
844 goto _play_sound_and_continue; | |
815 } | 845 } |
816 if ( uMessageParam == 5 ) | 846 if ( uMessageParam == 5 ) |
817 { | 847 { |
818 ++uGammaPos; | 848 ++uGammaPos; |
819 if ( (signed int)uGammaPos <= 9 ) | 849 if ( (signed int)uGammaPos <= 9 ) |
824 v166 = v0; | 854 v166 = v0; |
825 v152 = (int)pBtn_SliderRight; | 855 v152 = (int)pBtn_SliderRight; |
826 pWindowType2 = (WindowType)90; | 856 pWindowType2 = (WindowType)90; |
827 v140 = 0; | 857 v140 = 0; |
828 v136 = 0; | 858 v136 = 0; |
829 LABEL_122: | 859 //LABEL_122: |
830 GUIWindow::Create(v20, 0xA1u, v136, v140, pWindowType2, v152, v166); | 860 GUIWindow::Create(v20, 0xA1u, v136, v140, pWindowType2, v152, v166); |
831 goto LABEL_128; | 861 //goto LABEL_128; |
862 v165 = 0; | |
863 v151 = 0; | |
864 v144 = 0; | |
865 v139 = 0; | |
866 v135 = -1; | |
867 v132 = 0; | |
868 v130 = 0; | |
869 v127 = 21; | |
870 goto _play_sound_and_continue; | |
832 } | 871 } |
833 uGammaPos = 9; | 872 uGammaPos = 9; |
834 } | 873 } |
835 else | 874 else |
836 { | 875 { |
837 uGammaPos = (pMouse->GetCursorPos(&a2)->x - 42) / 17; | 876 uGammaPos = (pMouse->GetCursorPos(&a2)->x - 42) / 17; |
838 v22 = (double)(signed int)uGammaPos * 0.1 + 0.6; | 877 v22 = (double)(signed int)uGammaPos * 0.1 + 0.6; |
839 pGame->pGammaController->Initialize(v22); | 878 pGame->pGammaController->Initialize(v22); |
840 } | 879 } |
841 LABEL_128: | 880 //LABEL_128: |
842 v165 = 0; | 881 v165 = 0; |
843 v151 = 0; | 882 v151 = 0; |
844 v144 = 0; | 883 v144 = 0; |
845 v139 = 0; | 884 v139 = 0; |
846 v135 = -1; | 885 v135 = -1; |
848 v130 = 0; | 887 v130 = 0; |
849 v127 = 21; | 888 v127 = 21; |
850 goto _play_sound_and_continue; | 889 goto _play_sound_and_continue; |
851 case UIMSG_ToggleBloodsplats: | 890 case UIMSG_ToggleBloodsplats: |
852 pGame->ToggleFlags2(0x20u); | 891 pGame->ToggleFlags2(0x20u); |
853 goto _continue; | 892 continue; |
854 case UIMSG_ToggleColoredLights: | 893 case UIMSG_ToggleColoredLights: |
855 pRenderer->bUseColoredLights = pRenderer->bUseColoredLights == 0; | 894 pRenderer->bUseColoredLights = pRenderer->bUseColoredLights == 0; |
856 goto _continue; | 895 continue; |
857 case UIMSG_ToggleTint: | 896 case UIMSG_ToggleTint: |
858 pRenderer->bTinting = pRenderer->bTinting == 0; | 897 pRenderer->bTinting = pRenderer->bTinting == 0; |
859 goto _continue; | 898 continue; |
860 case UIMSG_ChangeMusicVolume: | 899 case UIMSG_ChangeMusicVolume: |
861 if ( uMessageParam == 4 ) | 900 if ( uMessageParam == 4 ) |
862 { | 901 { |
863 --uMusicVolimeMultiplier; | 902 --uMusicVolimeMultiplier; |
864 if ( (char)uMusicVolimeMultiplier < 1 ) | 903 if ( (char)uMusicVolimeMultiplier < 1 ) |
865 uMusicVolimeMultiplier = 0; | 904 uMusicVolimeMultiplier = 0; |
866 v167 = v0; | 905 v167 = v0; |
867 v23 = 243; | 906 v23 = 243; |
868 v153 = (int)pBtn_SliderLeft; | 907 v153 = (int)pBtn_SliderLeft; |
869 LABEL_136: | 908 //LABEL_136: |
870 GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167); | 909 GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167); |
871 goto LABEL_143; | 910 //goto LABEL_143; |
911 if ( uMusicVolimeMultiplier ) | |
912 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, | |
913 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); | |
914 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0)); | |
915 continue; | |
872 } | 916 } |
873 if ( uMessageParam == 5 ) | 917 if ( uMessageParam == 5 ) |
874 { | 918 { |
875 ++uMusicVolimeMultiplier; | 919 ++uMusicVolimeMultiplier; |
876 if ( (char)uMusicVolimeMultiplier > 9 ) | 920 if ( (char)uMusicVolimeMultiplier > 9 ) |
877 uMusicVolimeMultiplier = 9; | 921 uMusicVolimeMultiplier = 9; |
878 v167 = v0; | 922 v167 = v0; |
879 v23 = 435; | 923 v23 = 435; |
880 v153 = (int)pBtn_SliderRight; | 924 v153 = (int)pBtn_SliderRight; |
881 goto LABEL_136; | 925 //goto LABEL_136; |
926 GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167); | |
927 //goto LABEL_143; | |
928 if ( uMusicVolimeMultiplier ) | |
929 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, | |
930 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); | |
931 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0)); | |
932 continue; | |
882 } | 933 } |
883 uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17; | 934 uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17; |
884 if ( (char)uMusicVolimeMultiplier > 9 ) | 935 if ( (char)uMusicVolimeMultiplier > 9 ) |
885 uMusicVolimeMultiplier = 9; | 936 uMusicVolimeMultiplier = 9; |
886 LABEL_143: | 937 //LABEL_143: |
887 if ( uMusicVolimeMultiplier ) | 938 if ( uMusicVolimeMultiplier ) |
888 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, | 939 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, |
889 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); | 940 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); |
890 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0)); | 941 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0)); |
891 goto _continue; | 942 continue; |
892 case UIMSG_ChangeSoundVolume: | 943 case UIMSG_ChangeSoundVolume: |
893 if ( uMessageParam == 4 ) | 944 if ( uMessageParam == 4 ) |
894 { | 945 { |
895 --uSoundVolumeMultiplier; | 946 --uSoundVolumeMultiplier; |
896 if ( (char)uSoundVolumeMultiplier < 1 ) | 947 if ( (char)uSoundVolumeMultiplier < 1 ) |
897 uSoundVolumeMultiplier = 0; | 948 uSoundVolumeMultiplier = 0; |
898 v168 = v0; | 949 v168 = v0; |
899 v24 = 243; | 950 v24 = 243; |
900 v154 = (int)pBtn_SliderLeft; | 951 v154 = (int)pBtn_SliderLeft; |
901 LABEL_150: | 952 //LABEL_150: |
902 GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168); | 953 GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168); |
903 goto LABEL_157; | 954 //goto LABEL_157; |
955 pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0)); | |
956 v165 = 0; | |
957 v151 = 0; | |
958 v144 = 0; | |
959 v139 = 0; | |
960 v135 = -1; | |
961 v132 = 0; | |
962 v130 = -1; | |
963 v127 = 218; | |
964 goto _play_sound_and_continue; | |
904 } | 965 } |
905 if ( uMessageParam == 5 ) | 966 if ( uMessageParam == 5 ) |
906 { | 967 { |
907 ++uSoundVolumeMultiplier; | 968 ++uSoundVolumeMultiplier; |
908 if ( (char)uSoundVolumeMultiplier > 8 ) | 969 if ( (char)uSoundVolumeMultiplier > 8 ) |
909 uSoundVolumeMultiplier = 9; | 970 uSoundVolumeMultiplier = 9; |
910 v168 = v0; | 971 v168 = v0; |
911 v24 = 435; | 972 v24 = 435; |
912 v154 = (int)pBtn_SliderRight; | 973 v154 = (int)pBtn_SliderRight; |
913 goto LABEL_150; | 974 //goto LABEL_150; |
975 GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168); | |
976 //goto LABEL_157; | |
977 pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0)); | |
978 v165 = 0; | |
979 v151 = 0; | |
980 v144 = 0; | |
981 v139 = 0; | |
982 v135 = -1; | |
983 v132 = 0; | |
984 v130 = -1; | |
985 v127 = 218; | |
986 goto _play_sound_and_continue; | |
914 } | 987 } |
915 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17; | 988 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17; |
916 if ( (char)uSoundVolumeMultiplier > 8 ) | 989 if ( (char)uSoundVolumeMultiplier > 8 ) |
917 uSoundVolumeMultiplier = 9; | 990 uSoundVolumeMultiplier = 9; |
918 LABEL_157: | 991 //LABEL_157: |
919 pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0)); | 992 pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0)); |
920 v165 = 0; | 993 v165 = 0; |
921 v151 = 0; | 994 v151 = 0; |
922 v144 = 0; | 995 v144 = 0; |
923 v139 = 0; | 996 v139 = 0; |
926 v130 = -1; | 999 v130 = -1; |
927 v127 = 218; | 1000 v127 = 218; |
928 goto _play_sound_and_continue; | 1001 goto _play_sound_and_continue; |
929 case UIMSG_ToggleFlipOnExit: | 1002 case UIMSG_ToggleFlipOnExit: |
930 bFlipOnExit = bFlipOnExit == 0; | 1003 bFlipOnExit = bFlipOnExit == 0; |
931 goto _continue; | 1004 continue; |
932 case UIMSG_ToggleAlwaysRun: | 1005 case UIMSG_ToggleAlwaysRun: |
933 bAlwaysRun = bAlwaysRun == 0; | 1006 bAlwaysRun = bAlwaysRun == 0; |
934 goto _continue; | 1007 continue; |
935 case UIMSG_ToggleWalkSound: | 1008 case UIMSG_ToggleWalkSound: |
936 bWalkSound = bWalkSound == 0; | 1009 bWalkSound = bWalkSound == 0; |
937 goto _continue; | 1010 continue; |
938 case UIMSG_ToggleShowDamage: | 1011 case UIMSG_ToggleShowDamage: |
939 bShowDamage = bShowDamage == 0; | 1012 bShowDamage = bShowDamage == 0; |
940 goto _continue; | 1013 continue; |
941 case UIMSG_ChangeVoiceVolume: | 1014 case UIMSG_ChangeVoiceVolume: |
942 if ( uMessageParam == 4 ) | 1015 if ( uMessageParam == 4 ) |
943 { | 1016 { |
944 --uVoicesVolumeMultiplier; | 1017 --uVoicesVolumeMultiplier; |
945 if ( (char)uVoicesVolumeMultiplier < 1 ) | 1018 if ( (char)uVoicesVolumeMultiplier < 1 ) |
946 uVoicesVolumeMultiplier = 0; | 1019 uVoicesVolumeMultiplier = 0; |
947 v169 = v0; | 1020 v169 = v0; |
948 v25 = 243; | 1021 v25 = 243; |
949 v155 = (int)pBtn_SliderLeft; | 1022 v155 = (int)pBtn_SliderLeft; |
950 LABEL_166: | 1023 //LABEL_166: |
951 GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169); | 1024 GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169); |
952 goto LABEL_173; | 1025 //goto LABEL_173; |
1026 if ( !uVoicesVolumeMultiplier ) | |
1027 continue; | |
1028 v165 = 0; | |
1029 v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); | |
1030 v144 = 0; | |
1031 v139 = 0; | |
1032 v135 = -1; | |
1033 v132 = 0; | |
1034 v130 = -1; | |
1035 v127 = 5788; | |
1036 goto _play_sound_and_continue; | |
953 } | 1037 } |
954 if ( uMessageParam == 5 ) | 1038 if ( uMessageParam == 5 ) |
955 { | 1039 { |
956 ++uVoicesVolumeMultiplier; | 1040 ++uVoicesVolumeMultiplier; |
957 if ( (char)uVoicesVolumeMultiplier > 8 ) | 1041 if ( (char)uVoicesVolumeMultiplier > 8 ) |
958 uVoicesVolumeMultiplier = 9; | 1042 uVoicesVolumeMultiplier = 9; |
959 v169 = v0; | 1043 v169 = v0; |
960 v25 = 435; | 1044 v25 = 435; |
961 v155 = (int)pBtn_SliderRight; | 1045 v155 = (int)pBtn_SliderRight; |
962 goto LABEL_166; | 1046 //goto LABEL_166; |
1047 GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169); | |
1048 //goto LABEL_173; | |
1049 if ( !uVoicesVolumeMultiplier ) | |
1050 continue; | |
1051 v165 = 0; | |
1052 v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); | |
1053 v144 = 0; | |
1054 v139 = 0; | |
1055 v135 = -1; | |
1056 v132 = 0; | |
1057 v130 = -1; | |
1058 v127 = 5788; | |
1059 goto _play_sound_and_continue; | |
963 } | 1060 } |
964 uVoicesVolumeMultiplier = (pMouse->GetCursorPos(&v205)->x - 263) / 17; | 1061 uVoicesVolumeMultiplier = (pMouse->GetCursorPos(&v205)->x - 263) / 17; |
965 if ( (char)uVoicesVolumeMultiplier > 8 ) | 1062 if ( (char)uVoicesVolumeMultiplier > 8 ) |
966 uVoicesVolumeMultiplier = 9; | 1063 uVoicesVolumeMultiplier = 9; |
967 LABEL_173: | 1064 //LABEL_173: |
968 if ( !uVoicesVolumeMultiplier ) | 1065 if ( !uVoicesVolumeMultiplier ) |
969 goto _continue; | 1066 continue; |
970 v165 = 0; | 1067 v165 = 0; |
971 v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); | 1068 v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); |
972 v144 = 0; | 1069 v144 = 0; |
973 v139 = 0; | 1070 v139 = 0; |
974 v135 = -1; | 1071 v135 = -1; |
978 goto _play_sound_and_continue; | 1075 goto _play_sound_and_continue; |
979 case UIMSG_SetTurnSpeed: | 1076 case UIMSG_SetTurnSpeed: |
980 if ( uMessageParam ) | 1077 if ( uMessageParam ) |
981 pParty->sRotationY = uMessageParam * pParty->sRotationY / uMessageParam; | 1078 pParty->sRotationY = uMessageParam * pParty->sRotationY / uMessageParam; |
982 uTurnSpeed = uMessageParam; | 1079 uTurnSpeed = uMessageParam; |
983 goto _continue; | 1080 continue; |
984 case UIMSG_SetGraphicsMode: | 1081 case UIMSG_SetGraphicsMode: |
985 if ( !bUseLoResSprites ) | 1082 if ( !bUseLoResSprites ) |
986 { | 1083 { |
987 byte_6BE388_graphicsmode = uMessageParam; | 1084 byte_6BE388_graphicsmode = uMessageParam; |
988 LABEL_184: | 1085 //LABEL_184: |
989 MM7Initialization(); | 1086 MM7Initialization(); |
990 goto _continue; | 1087 continue; |
991 } | 1088 } |
992 if ( uMessageParam ) | 1089 if ( uMessageParam ) |
993 { | 1090 { |
994 if ( uMessageParam == 1 ) | 1091 if ( uMessageParam == 1 ) |
995 { | 1092 { |
996 byte_6BE388_graphicsmode = 0; | 1093 byte_6BE388_graphicsmode = 0; |
997 } | 1094 } |
998 else | 1095 else |
999 { | 1096 { |
1000 if ( uMessageParam != 2 ) | 1097 if ( uMessageParam != 2 ) |
1001 goto _continue; | 1098 continue; |
1002 byte_6BE388_graphicsmode = 1; | 1099 byte_6BE388_graphicsmode = 1; |
1003 } | 1100 } |
1004 goto LABEL_184; | 1101 //goto LABEL_184; |
1102 MM7Initialization(); | |
1103 continue; | |
1005 } | 1104 } |
1006 ModalWindow(pNPCTopics[453].pText, 0); | 1105 ModalWindow(pNPCTopics[453].pText, 0); |
1007 goto _continue; | 1106 continue; |
1008 case UIMSG_SkillUp|0x2: | 1107 case UIMSG_SkillUp|0x2: |
1009 pGUIWindow_CurrentMenu->Release(); | 1108 pGUIWindow_CurrentMenu->Release(); |
1010 pEventTimer->Resume(); | 1109 pEventTimer->Resume(); |
1011 goto LABEL_188; | 1110 goto LABEL_188; |
1012 case UIMSG_OpenQuestBook: | 1111 case UIMSG_OpenQuestBook: |
1017 pEventTimer->Pause(); | 1116 pEventTimer->Pause(); |
1018 pAudioPlayer->StopChannels(-1, -1); | 1117 pAudioPlayer->StopChannels(-1, -1); |
1019 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 1118 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); |
1020 pBooksWindow = GUIWindow::Create(493u, 355u, 0, 0, (enum WindowType)99, (int)pBtn_Quests, 0); | 1119 pBooksWindow = GUIWindow::Create(493u, 355u, 0, 0, (enum WindowType)99, (int)pBtn_Quests, 0); |
1021 bFlashQuestBook = 0; | 1120 bFlashQuestBook = 0; |
1022 goto _continue; | 1121 continue; |
1023 case UIMSG_OpenAutonotes: | 1122 case UIMSG_OpenAutonotes: |
1024 if ( pMessageQueue_50CBD0->uNumMessages ) | 1123 if ( pMessageQueue_50CBD0->uNumMessages ) |
1025 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1124 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1026 if ( pCurrentScreen ) | 1125 if ( pCurrentScreen ) |
1027 pGUIWindow_CurrentMenu->Release(); | 1126 pGUIWindow_CurrentMenu->Release(); |
1028 pEventTimer->Pause(); | 1127 pEventTimer->Pause(); |
1029 pAudioPlayer->StopChannels(-1, -1); | 1128 pAudioPlayer->StopChannels(-1, -1); |
1030 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 1129 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); |
1031 pBooksWindow = GUIWindow::Create(527u, 353u, 0, 0, (enum WindowType)99, (int)pBtn_Autonotes, 0); | 1130 pBooksWindow = GUIWindow::Create(527u, 353u, 0, 0, (enum WindowType)99, (int)pBtn_Autonotes, 0); |
1032 bFlashAutonotesBook = 0; | 1131 bFlashAutonotesBook = 0; |
1033 goto _continue; | 1132 continue; |
1034 case UIMSG_OpenMapBook: | 1133 case UIMSG_OpenMapBook: |
1035 if ( pMessageQueue_50CBD0->uNumMessages ) | 1134 if ( pMessageQueue_50CBD0->uNumMessages ) |
1036 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1135 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1037 if ( pCurrentScreen ) | 1136 if ( pCurrentScreen ) |
1038 pGUIWindow_CurrentMenu->Release(); | 1137 pGUIWindow_CurrentMenu->Release(); |
1043 pWindow = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 1142 pWindow = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); |
1044 v27 = 353; | 1143 v27 = 353; |
1045 v28 = 546; | 1144 v28 = 546; |
1046 v170 = 0; | 1145 v170 = 0; |
1047 v156 = (int)pBtn_Maps; | 1146 v156 = (int)pBtn_Maps; |
1048 goto LABEL_210; | 1147 //goto LABEL_210; |
1148 pGUIWindow_CurrentMenu = pWindow; | |
1149 pBooksWindow = GUIWindow::Create(v28, v27, 0, 0, (enum WindowType)99, v156, v170); | |
1150 continue; | |
1049 case UIMSG_OpenCalendar: | 1151 case UIMSG_OpenCalendar: |
1050 if ( pMessageQueue_50CBD0->uNumMessages ) | 1152 if ( pMessageQueue_50CBD0->uNumMessages ) |
1051 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1153 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1052 if ( pCurrentScreen ) | 1154 if ( pCurrentScreen ) |
1053 pGUIWindow_CurrentMenu->Release(); | 1155 pGUIWindow_CurrentMenu->Release(); |
1056 pWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 1158 pWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); |
1057 v27 = 354; | 1159 v27 = 354; |
1058 v28 = 570; | 1160 v28 = 570; |
1059 v170 = 0; | 1161 v170 = 0; |
1060 v156 = (int)pBtn_Calendar; | 1162 v156 = (int)pBtn_Calendar; |
1061 LABEL_210: | 1163 //LABEL_210: |
1062 pGUIWindow_CurrentMenu = pWindow; | 1164 pGUIWindow_CurrentMenu = pWindow; |
1063 pBooksWindow = GUIWindow::Create(v28, v27, 0, 0, (enum WindowType)99, v156, v170); | 1165 pBooksWindow = GUIWindow::Create(v28, v27, 0, 0, (enum WindowType)99, v156, v170); |
1064 goto _continue; | 1166 continue; |
1065 case UIMSG_OpenHistoryBook: | 1167 case UIMSG_OpenHistoryBook: |
1066 if ( pMessageQueue_50CBD0->uNumMessages ) | 1168 if ( pMessageQueue_50CBD0->uNumMessages ) |
1067 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1169 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1068 if ( pCurrentScreen ) | 1170 if ( pCurrentScreen ) |
1069 pGUIWindow_CurrentMenu->Release(); | 1171 pGUIWindow_CurrentMenu->Release(); |
1070 pEventTimer->Pause(); | 1172 pEventTimer->Pause(); |
1071 pAudioPlayer->StopChannels(-1, -1); | 1173 pAudioPlayer->StopChannels(-1, -1); |
1072 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 1174 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); |
1073 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)pBtn_History, 0); | 1175 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)pBtn_History, 0); |
1074 bFlashHistoryBook = 0; | 1176 bFlashHistoryBook = 0; |
1075 goto _continue; | 1177 continue; |
1076 case UIMSG_Escape: | 1178 case UIMSG_Escape:// íàæàòèå Escape |
1077 back_to_game(); | 1179 back_to_game(); |
1078 if ( pMessageQueue_50CBD0->uNumMessages ) | 1180 if ( pMessageQueue_50CBD0->uNumMessages ) |
1079 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1181 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1080 if ( pCurrentScreen > 15 ) | 1182 if ( pCurrentScreen > 15 ) |
1081 { | 1183 { |
1082 if ( pCurrentScreen >= 17 && (pCurrentScreen <= 18 || pCurrentScreen == 104) ) | 1184 if ( pCurrentScreen >= 17 && (pCurrentScreen <= 18 || pCurrentScreen == 104) ) |
1083 { | 1185 { |
1084 LABEL_229: | 1186 //LABEL_229: |
1085 if ( dword_50CDC8 ) | 1187 if ( dword_50CDC8 ) |
1086 goto LABEL_232; | 1188 goto LABEL_232; |
1087 sub_42FC15(); | 1189 sub_42FC15(); |
1088 goto LABEL_231; | 1190 //goto LABEL_231; |
1191 uMessageParam = v0; | |
1192 goto LABEL_232; | |
1089 } | 1193 } |
1090 } | 1194 } |
1091 else | 1195 else |
1092 { | 1196 { |
1093 if ( pCurrentScreen >= 14 || pCurrentScreen == 4 || pCurrentScreen == 10 ) | 1197 if ( pCurrentScreen >= 14 || pCurrentScreen == 4 || pCurrentScreen == 10 ) |
1094 goto LABEL_229; | 1198 //goto LABEL_229; |
1199 if ( dword_50CDC8 ) | |
1200 goto LABEL_232; | |
1201 sub_42FC15(); | |
1202 //goto LABEL_231; | |
1203 uMessageParam = v0; | |
1204 goto LABEL_232; | |
1095 if ( pCurrentScreen == 13 && !dword_50CDC8 && !dword_5C35C8 ) | 1205 if ( pCurrentScreen == 13 && !dword_50CDC8 && !dword_5C35C8 ) |
1096 { | 1206 { |
1097 sub_42FC15(); | 1207 sub_42FC15(); |
1098 dword_5C35C8 = 0; | 1208 dword_5C35C8 = 0; |
1099 LABEL_231: | 1209 //LABEL_231: |
1100 uMessageParam = v0; | 1210 uMessageParam = v0; |
1101 goto LABEL_232; | 1211 goto LABEL_232; |
1102 } | 1212 } |
1103 } | 1213 } |
1104 LABEL_232: | 1214 LABEL_232: |
1137 { | 1247 { |
1138 LOBYTE(ptr_50C9A4->uAttributes) &= 0xFu; | 1248 LOBYTE(ptr_50C9A4->uAttributes) &= 0xFu; |
1139 dword_50C9A8 = 0; | 1249 dword_50C9A8 = 0; |
1140 ptr_50C9A4 = 0; | 1250 ptr_50C9A4 = 0; |
1141 } | 1251 } |
1142 goto LABEL_322; | 1252 //goto LABEL_322; |
1253 if ( pGUIWindow_Settings ) | |
1254 { | |
1255 if ( pCurrentScreen == 7 ) | |
1256 { | |
1257 pMouse->SetCursorBitmap("MICON2"); | |
1258 } | |
1259 else | |
1260 { | |
1261 pGUIWindow_Settings->Release(); | |
1262 pGUIWindow_Settings = 0; | |
1263 pMouse->SetCursorBitmap("MICON1"); | |
1264 GameUI_StatusBar_TimedStringTimeLeft = 0; | |
1265 unk_50C9A0 = 0; | |
1266 back_to_game(); | |
1267 } | |
1268 } | |
1269 if ( (signed int)uActiveCharacter < v0 || (signed int)uActiveCharacter > 4 ) | |
1270 uActiveCharacter = pParty->GetNextActiveCharacter(); | |
1271 pGUIWindow_CurrentMenu->Release(); | |
1272 if ( pGUIWindow_CurrentMenu == ptr_507BC0 ) | |
1273 ptr_507BC0 = 0; | |
1274 pGUIWindow_CurrentMenu = 0; | |
1275 pEventTimer->Resume(); | |
1276 pCurrentScreen = 0; | |
1277 viewparams->bRedrawGameUI = v0; | |
1278 pIcons_LOD->_4355F7(); | |
1279 continue; | |
1143 case 3: | 1280 case 3: |
1144 pBooksWindow->Release(); | 1281 pBooksWindow->Release(); |
1145 //crt_deconstruct_ptr_6A0118(); | 1282 //crt_deconstruct_ptr_6A0118(); |
1146 pBooksWindow = 0; | 1283 pBooksWindow = 0; |
1147 pEventTimer->Resume(); | 1284 pEventTimer->Resume(); |
1148 goto LABEL_322; | 1285 //goto LABEL_322; |
1286 if ( pGUIWindow_Settings ) | |
1287 { | |
1288 if ( pCurrentScreen == 7 ) | |
1289 { | |
1290 pMouse->SetCursorBitmap("MICON2"); | |
1291 } | |
1292 else | |
1293 { | |
1294 pGUIWindow_Settings->Release(); | |
1295 pGUIWindow_Settings = 0; | |
1296 pMouse->SetCursorBitmap("MICON1"); | |
1297 GameUI_StatusBar_TimedStringTimeLeft = 0; | |
1298 unk_50C9A0 = 0; | |
1299 back_to_game(); | |
1300 } | |
1301 } | |
1302 if ( (signed int)uActiveCharacter < v0 || (signed int)uActiveCharacter > 4 ) | |
1303 uActiveCharacter = pParty->GetNextActiveCharacter(); | |
1304 pGUIWindow_CurrentMenu->Release(); | |
1305 if ( pGUIWindow_CurrentMenu == ptr_507BC0 ) | |
1306 ptr_507BC0 = 0; | |
1307 pGUIWindow_CurrentMenu = 0; | |
1308 pEventTimer->Resume(); | |
1309 pCurrentScreen = 0; | |
1310 viewparams->bRedrawGameUI = v0; | |
1311 pIcons_LOD->_4355F7(); | |
1312 continue; | |
1149 case 11: | 1313 case 11: |
1150 case 12: | 1314 case 12: |
1151 pIcons_LOD->_4114F2(); | 1315 pIcons_LOD->_4114F2(); |
1152 //crt_deconstruct_ptr_6A0118(); | 1316 //crt_deconstruct_ptr_6A0118(); |
1153 goto LABEL_291; | 1317 //goto LABEL_291; |
1318 stru_506E40.Release(); | |
1319 break; | |
1154 case 15: | 1320 case 15: |
1155 pCurrentScreen = 10; | 1321 pCurrentScreen = 10; |
1156 goto _continue; | 1322 continue; |
1157 case 10: | 1323 case 10: |
1158 pWindow2 = pChestWindow; | 1324 pWindow2 = pChestWindow; |
1159 goto LABEL_249; | 1325 //goto LABEL_249; |
1160 case 25: | |
1161 pWindow2 = ptr_507BC8; | |
1162 LABEL_249: | |
1163 pWindow2->Release(); | 1326 pWindow2->Release(); |
1164 pIcons_LOD->_4114F2(); | 1327 pIcons_LOD->_4114F2(); |
1165 pCurrentScreen = 0; | 1328 pCurrentScreen = 0; |
1166 viewparams->bRedrawGameUI = v0; | 1329 viewparams->bRedrawGameUI = v0; |
1167 pEventTimer->Resume(); | 1330 pEventTimer->Resume(); |
1168 goto _continue; | 1331 continue; |
1332 case 25: | |
1333 pWindow2 = ptr_507BC8; | |
1334 //LABEL_249: | |
1335 pWindow2->Release(); | |
1336 pIcons_LOD->_4114F2(); | |
1337 pCurrentScreen = 0; | |
1338 viewparams->bRedrawGameUI = v0; | |
1339 pEventTimer->Resume(); | |
1340 continue; | |
1169 case 2: | 1341 case 2: |
1170 thisa = (signed int)&uTextureID_507C60; | 1342 thisa = (signed int)&uTextureID_507C60; |
1171 do | 1343 do |
1172 { | 1344 { |
1173 if ( *(int *)thisa ) | 1345 if ( *(int *)thisa ) |
1186 WriteWindowsRegistryInt("valAlwaysRun", bAlwaysRun); | 1358 WriteWindowsRegistryInt("valAlwaysRun", bAlwaysRun); |
1187 WriteWindowsRegistryInt("FlipOnExit", bFlipOnExit); | 1359 WriteWindowsRegistryInt("FlipOnExit", bFlipOnExit); |
1188 if ( !uTurnSpeed ) | 1360 if ( !uTurnSpeed ) |
1189 { | 1361 { |
1190 v171 = 3; | 1362 v171 = 3; |
1191 goto LABEL_261; | 1363 //goto LABEL_261; |
1364 v30 = v171; | |
1365 //goto LABEL_262; | |
1366 v31 = "TurnDelta"; | |
1367 WriteWindowsRegistryInt(v31, v30); | |
1368 stru_506E40.Release(); | |
1369 break; | |
1192 } | 1370 } |
1193 if ( uTurnSpeed == 64 ) | 1371 if ( uTurnSpeed == 64 ) |
1194 { | 1372 { |
1195 v171 = 2; | 1373 v171 = 2; |
1196 LABEL_261: | 1374 //LABEL_261: |
1197 v30 = v171; | 1375 v30 = v171; |
1198 goto LABEL_262; | 1376 //goto LABEL_262; |
1377 v31 = "TurnDelta"; | |
1378 WriteWindowsRegistryInt(v31, v30); | |
1379 stru_506E40.Release(); | |
1380 break; | |
1199 } | 1381 } |
1200 if ( uTurnSpeed != 128 ) | 1382 if ( uTurnSpeed != 128 ) |
1201 goto LABEL_291; | 1383 //goto LABEL_291; |
1384 { | |
1385 stru_506E40.Release(); | |
1386 break; | |
1387 } | |
1202 v30 = v0; | 1388 v30 = v0; |
1203 LABEL_262: | 1389 //LABEL_262: |
1204 v31 = "TurnDelta"; | 1390 v31 = "TurnDelta"; |
1205 LABEL_263: | 1391 //LABEL_263: |
1206 WriteWindowsRegistryInt(v31, v30); | 1392 WriteWindowsRegistryInt(v31, v30); |
1207 LABEL_291: | 1393 //LABEL_291: |
1208 stru_506E40.Release(); | 1394 stru_506E40.Release(); |
1209 break; | 1395 break; |
1210 case 1: | 1396 case 1: |
1211 pIcons_LOD->_40F9C5(); | 1397 pIcons_LOD->_40F9C5(); |
1212 pIcons_LOD->_4114F2(); | 1398 pIcons_LOD->_4114F2(); |
1213 pIcons_LOD->_40F9C5(); | 1399 pIcons_LOD->_40F9C5(); |
1214 pIcons_LOD->_4114F2(); | 1400 pIcons_LOD->_4114F2(); |
1215 goto LABEL_291; | 1401 //goto LABEL_291; |
1402 stru_506E40.Release(); | |
1403 break; | |
1216 case 28: | 1404 case 28: |
1217 if ( pRenderer->pRenderD3D ) | 1405 if ( pRenderer->pRenderD3D ) |
1218 { | 1406 { |
1219 WriteWindowsRegistryInt("Colored Lights", pRenderer->bUseColoredLights); | 1407 WriteWindowsRegistryInt("Colored Lights", pRenderer->bUseColoredLights); |
1220 WriteWindowsRegistryInt("Tinting", pRenderer->bTinting); | 1408 WriteWindowsRegistryInt("Tinting", pRenderer->bTinting); |
1221 WriteWindowsRegistryInt("Bloodsplats", (LOBYTE(pGame->uFlags2) >> 5) & 1); | 1409 WriteWindowsRegistryInt("Bloodsplats", (LOBYTE(pGame->uFlags2) >> 5) & 1); |
1222 } | 1410 } |
1223 if ( pRenderer->bWindowMode ) | 1411 if ( pRenderer->bWindowMode ) |
1224 goto LABEL_291; | 1412 //goto LABEL_291; |
1413 { | |
1414 stru_506E40.Release(); | |
1415 break; | |
1416 } | |
1225 v30 = uGammaPos; | 1417 v30 = uGammaPos; |
1226 v31 = "GammaPos"; | 1418 v31 = "GammaPos"; |
1227 goto LABEL_263; | 1419 //goto LABEL_263; |
1420 WriteWindowsRegistryInt(v31, v30); | |
1421 stru_506E40.Release(); | |
1422 break; | |
1228 case 26: | 1423 case 26: |
1229 v197 = 1; | 1424 v197 = 1; |
1230 v32 = 0; | 1425 v32 = 0; |
1231 while ( *((char *)word_506E6C + v32) != 1 ) | 1426 while ( *((char *)word_506E6C + v32) != 1 ) |
1232 { | 1427 { |
1268 pKeyActionMap->SetKeyMapping(uAction, pPrevVirtualCidesMapping[uAction], pKeyToggleType); | 1463 pKeyActionMap->SetKeyMapping(uAction, pPrevVirtualCidesMapping[uAction], pKeyToggleType); |
1269 ++uAction; | 1464 ++uAction; |
1270 } | 1465 } |
1271 while ( uAction < 28 ); | 1466 while ( uAction < 28 ); |
1272 pKeyActionMap->StoreMappings(); | 1467 pKeyActionMap->StoreMappings(); |
1273 goto LABEL_291; | 1468 //goto LABEL_291; |
1469 stru_506E40.Release(); | |
1470 break; | |
1274 } | 1471 } |
1275 } | 1472 } |
1276 goto LABEL_623; | 1473 goto LABEL_623; |
1277 case 5: | 1474 case 5: |
1278 if ( dword_506F14 ) | 1475 if ( dword_506F14 ) |
1290 pIcons_LOD->_40F9C5(); | 1487 pIcons_LOD->_40F9C5(); |
1291 pIcons_LOD->_4114F2(); | 1488 pIcons_LOD->_4114F2(); |
1292 _506F18_num_hours_to_sleep = 0; | 1489 _506F18_num_hours_to_sleep = 0; |
1293 dword_506F14 = 0; | 1490 dword_506F14 = 0; |
1294 dword_507B94 = v0; | 1491 dword_507B94 = v0; |
1295 goto LABEL_322; | 1492 //goto LABEL_322; |
1493 if ( pGUIWindow_Settings ) | |
1494 { | |
1495 if ( pCurrentScreen == 7 ) | |
1496 { | |
1497 pMouse->SetCursorBitmap("MICON2"); | |
1498 } | |
1499 else | |
1500 { | |
1501 pGUIWindow_Settings->Release(); | |
1502 pGUIWindow_Settings = 0; | |
1503 pMouse->SetCursorBitmap("MICON1"); | |
1504 GameUI_StatusBar_TimedStringTimeLeft = 0; | |
1505 unk_50C9A0 = 0; | |
1506 back_to_game(); | |
1507 } | |
1508 } | |
1509 if ( (signed int)uActiveCharacter < v0 || (signed int)uActiveCharacter > 4 ) | |
1510 uActiveCharacter = pParty->GetNextActiveCharacter(); | |
1511 pGUIWindow_CurrentMenu->Release(); | |
1512 if ( pGUIWindow_CurrentMenu == ptr_507BC0 ) | |
1513 ptr_507BC0 = 0; | |
1514 pGUIWindow_CurrentMenu = 0; | |
1515 pEventTimer->Resume(); | |
1516 pCurrentScreen = 0; | |
1517 viewparams->bRedrawGameUI = v0; | |
1518 pIcons_LOD->_4355F7(); | |
1519 continue; | |
1296 case 14: | 1520 case 14: |
1297 pGUIWindow_CurrentMenu->Release(); | 1521 pGUIWindow_CurrentMenu->Release(); |
1298 pCurrentScreen = 13; | 1522 pCurrentScreen = 13; |
1299 pIcons_LOD->_4114F2(); | 1523 pIcons_LOD->_4114F2(); |
1300 goto _continue; | 1524 continue; |
1301 case 13: | 1525 case 13: |
1302 if ( uDialogueType ) | 1526 if ( uDialogueType ) |
1303 uDialogueType = 0; | 1527 uDialogueType = 0; |
1304 if ( uGameState == 2 ) | 1528 if ( uGameState == 2 ) |
1305 { | 1529 { |
1307 ; | 1531 ; |
1308 } | 1532 } |
1309 else | 1533 else |
1310 { | 1534 { |
1311 if ( sub_4BD8B5() ) | 1535 if ( sub_4BD8B5() ) |
1312 goto _continue; | 1536 continue; |
1313 } | 1537 } |
1314 sub_4B1D27(); | 1538 sub_4B1D27(); |
1315 pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 814, 0, -1, 0, 0, 0, 0); | 1539 pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 814, 0, -1, 0, 0, 0, 0); |
1316 pVideoPlayer->Unload(); | 1540 pVideoPlayer->Unload(); |
1317 pGUIWindow_CurrentMenu = ptr_507BC0; | 1541 pGUIWindow_CurrentMenu = ptr_507BC0; |
1318 goto LABEL_322; | 1542 //goto LABEL_322; |
1543 if ( pGUIWindow_Settings ) | |
1544 { | |
1545 if ( pCurrentScreen == 7 ) | |
1546 { | |
1547 pMouse->SetCursorBitmap("MICON2"); | |
1548 } | |
1549 else | |
1550 { | |
1551 pGUIWindow_Settings->Release(); | |
1552 pGUIWindow_Settings = 0; | |
1553 pMouse->SetCursorBitmap("MICON1"); | |
1554 GameUI_StatusBar_TimedStringTimeLeft = 0; | |
1555 unk_50C9A0 = 0; | |
1556 back_to_game(); | |
1557 } | |
1558 } | |
1559 if ( (signed int)uActiveCharacter < v0 || (signed int)uActiveCharacter > 4 ) | |
1560 uActiveCharacter = pParty->GetNextActiveCharacter(); | |
1561 pGUIWindow_CurrentMenu->Release(); | |
1562 if ( pGUIWindow_CurrentMenu == ptr_507BC0 ) | |
1563 ptr_507BC0 = 0; | |
1564 pGUIWindow_CurrentMenu = 0; | |
1565 pEventTimer->Resume(); | |
1566 pCurrentScreen = 0; | |
1567 viewparams->bRedrawGameUI = v0; | |
1568 pIcons_LOD->_4355F7(); | |
1569 continue; | |
1319 case 18: | 1570 case 18: |
1320 if ( uCurrentHouse_Animation == 153 ) | 1571 if ( uCurrentHouse_Animation == 153 ) |
1321 HousePlaySomeSound(0x99u, 3); | 1572 HousePlaySomeSound(0x99u, 3); |
1322 pVideoPlayer->Unload(); | 1573 pVideoPlayer->Unload(); |
1323 goto LABEL_306; | 1574 //goto LABEL_306; |
1575 if ( dword_5B65CC ) | |
1576 { | |
1577 pParty->field_709 = 0; | |
1578 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu; | |
1579 sub_44A56A(); | |
1580 viewparams->bRedrawGameUI = v0; | |
1581 dword_5B65CC = 0; | |
1582 } | |
1583 goto LABEL_317; | |
1324 case 4: | 1584 case 4: |
1325 LABEL_306: | 1585 //LABEL_306: |
1326 if ( dword_5B65CC ) | 1586 if ( dword_5B65CC ) |
1327 { | 1587 { |
1328 pParty->field_709 = 0; | 1588 pParty->field_709 = 0; |
1329 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu; | 1589 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu; |
1330 sub_44A56A(); | 1590 sub_44A56A(); |
1346 if ( pParty->vPosition.y > 22528 ) | 1606 if ( pParty->vPosition.y > 22528 ) |
1347 pParty->vPosition.y = 22528; | 1607 pParty->vPosition.y = 22528; |
1348 goto LABEL_317; | 1608 goto LABEL_317; |
1349 case 16: | 1609 case 16: |
1350 pVideoPlayer->Unload(); | 1610 pVideoPlayer->Unload(); |
1351 goto _continue; | 1611 continue; |
1352 case 7: | 1612 case 7: |
1353 goto LABEL_319; | 1613 goto LABEL_319; |
1354 default: | 1614 default: |
1355 goto LABEL_322; | 1615 //goto LABEL_322; |
1616 if ( pGUIWindow_Settings ) | |
1617 { | |
1618 if ( pCurrentScreen == 7 ) | |
1619 { | |
1620 pMouse->SetCursorBitmap("MICON2"); | |
1621 } | |
1622 else | |
1623 { | |
1624 pGUIWindow_Settings->Release(); | |
1625 pGUIWindow_Settings = 0; | |
1626 pMouse->SetCursorBitmap("MICON1"); | |
1627 GameUI_StatusBar_TimedStringTimeLeft = 0; | |
1628 unk_50C9A0 = 0; | |
1629 back_to_game(); | |
1630 } | |
1631 } | |
1632 if ( (signed int)uActiveCharacter < v0 || (signed int)uActiveCharacter > 4 ) | |
1633 uActiveCharacter = pParty->GetNextActiveCharacter(); | |
1634 pGUIWindow_CurrentMenu->Release(); | |
1635 if ( pGUIWindow_CurrentMenu == ptr_507BC0 ) | |
1636 ptr_507BC0 = 0; | |
1637 pGUIWindow_CurrentMenu = 0; | |
1638 pEventTimer->Resume(); | |
1639 pCurrentScreen = 0; | |
1640 viewparams->bRedrawGameUI = v0; | |
1641 pIcons_LOD->_4355F7(); | |
1642 continue; | |
1356 } | 1643 } |
1357 goto LABEL_322; | 1644 //goto LABEL_322; |
1645 if ( pGUIWindow_Settings ) | |
1646 { | |
1647 if ( pCurrentScreen == 7 ) | |
1648 { | |
1649 pMouse->SetCursorBitmap("MICON2"); | |
1650 } | |
1651 else | |
1652 { | |
1653 pGUIWindow_Settings->Release(); | |
1654 pGUIWindow_Settings = 0; | |
1655 pMouse->SetCursorBitmap("MICON1"); | |
1656 GameUI_StatusBar_TimedStringTimeLeft = 0; | |
1657 unk_50C9A0 = 0; | |
1658 back_to_game(); | |
1659 } | |
1660 } | |
1661 if ( (signed int)uActiveCharacter < v0 || (signed int)uActiveCharacter > 4 ) | |
1662 uActiveCharacter = pParty->GetNextActiveCharacter(); | |
1663 pGUIWindow_CurrentMenu->Release(); | |
1664 if ( pGUIWindow_CurrentMenu == ptr_507BC0 ) | |
1665 ptr_507BC0 = 0; | |
1666 pGUIWindow_CurrentMenu = 0; | |
1667 pEventTimer->Resume(); | |
1668 pCurrentScreen = 0; | |
1669 viewparams->bRedrawGameUI = v0; | |
1670 pIcons_LOD->_4355F7(); | |
1671 continue; | |
1358 } | 1672 } |
1359 LABEL_319: | 1673 LABEL_319: |
1360 sub_4196A0(); | 1674 sub_4196A0(); |
1361 sub_419379(); | 1675 sub_419379(); |
1362 LABEL_321: | 1676 LABEL_321: |
1363 pIcons_LOD->_4114F2(); | 1677 pIcons_LOD->_4114F2(); |
1364 } | 1678 } |
1365 LABEL_322: | 1679 //LABEL_322: |
1366 if ( pGUIWindow_Settings ) | 1680 if ( pGUIWindow_Settings ) |
1367 { | 1681 { |
1368 if ( pCurrentScreen == 7 ) | 1682 if ( pCurrentScreen == 7 ) |
1369 { | 1683 { |
1370 pMouse->SetCursorBitmap("MICON2"); | 1684 pMouse->SetCursorBitmap("MICON2"); |
1387 pGUIWindow_CurrentMenu = 0; | 1701 pGUIWindow_CurrentMenu = 0; |
1388 pEventTimer->Resume(); | 1702 pEventTimer->Resume(); |
1389 pCurrentScreen = 0; | 1703 pCurrentScreen = 0; |
1390 viewparams->bRedrawGameUI = v0; | 1704 viewparams->bRedrawGameUI = v0; |
1391 pIcons_LOD->_4355F7(); | 1705 pIcons_LOD->_4355F7(); |
1392 goto _continue; | 1706 continue; |
1393 } | 1707 } |
1394 pWindow3 = pGUIWindow_Settings; | 1708 pWindow3 = pGUIWindow_Settings; |
1395 if ( !pGUIWindow_Settings )//Draw Menu | 1709 if ( !pGUIWindow_Settings )//Draw Menu |
1396 { | 1710 { |
1397 dword_6BE138 = -1; | 1711 dword_6BE138 = -1; |
1433 stru_506E40.Release(); | 1747 stru_506E40.Release(); |
1434 uNumSeconds = (unsigned int)MakeScreenshot(155, 117); | 1748 uNumSeconds = (unsigned int)MakeScreenshot(155, 117); |
1435 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117); | 1749 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117); |
1436 free((void *)uNumSeconds); | 1750 free((void *)uNumSeconds); |
1437 stru_506E40._40E55E("gamma.pcx", 0); | 1751 stru_506E40._40E55E("gamma.pcx", 0); |
1438 goto _continue; | 1752 continue; |
1439 } | 1753 } |
1440 goto LABEL_333; | 1754 goto LABEL_333; |
1441 } | 1755 } |
1442 sub_41426F(); | 1756 sub_41426F(); |
1443 _continue: | 1757 //_continue: |
1444 continue; | 1758 continue; |
1445 case UIMSG_BC: | 1759 case UIMSG_BC: |
1446 if ( uMessageParam ) | 1760 if ( uMessageParam ) |
1447 { | 1761 { |
1448 GUIWindow::Create(0x272u, 0xB3u, 0, 0, (enum WindowType)90, (int)pBtn_NPCRight, 0); | 1762 GUIWindow::Create(0x272u, 0xB3u, 0, 0, (enum WindowType)90, (int)pBtn_NPCRight, 0); |
1463 if ( pParty->field_709 < 1 ) | 1777 if ( pParty->field_709 < 1 ) |
1464 pParty->field_709 = 0; | 1778 pParty->field_709 = 0; |
1465 } | 1779 } |
1466 } | 1780 } |
1467 DrawHiredNPCs(); | 1781 DrawHiredNPCs(); |
1468 goto _continue; | 1782 continue; |
1469 case UIMSG_OpenRestUI|0x2: | 1783 case UIMSG_OpenRestUI|0x2: |
1470 if ( pMessageQueue_50CBD0->uNumMessages ) | 1784 if ( pMessageQueue_50CBD0->uNumMessages ) |
1471 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1785 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1472 dword_50CDC8 = v0; | 1786 dword_50CDC8 = v0; |
1473 sub_42FBDD(); | 1787 sub_42FBDD(); |
1524 EventProcessor(dword_5C3418, 0, v0); | 1838 EventProcessor(dword_5C3418, 0, v0); |
1525 } | 1839 } |
1526 dword_597F18 = 0; | 1840 dword_597F18 = 0; |
1527 if ( !_strcmpi(byte_6BE3B0, "d05.blv") ) | 1841 if ( !_strcmpi(byte_6BE3B0, "d05.blv") ) |
1528 pParty->uTimePlayed += 1474560i64; | 1842 pParty->uTimePlayed += 1474560i64; |
1529 goto _continue; | 1843 continue; |
1530 case 0x19C: | 1844 case 0x19C: |
1531 sub_42FC15(); | 1845 sub_42FC15(); |
1532 pVideoPlayer->Unload(); | 1846 pVideoPlayer->Unload(); |
1533 sub_44603D(); | 1847 sub_44603D(); |
1534 dword_597F18 = 0; | 1848 dword_597F18 = 0; |
1662 if ( v45 == 2 ) | 1976 if ( v45 == 2 ) |
1663 { | 1977 { |
1664 v47 = (pObjectList->pObjects[pLayingItems[v46].uObjectDescID].uFlags & 0x10) == 0; | 1978 v47 = (pObjectList->pObjects[pLayingItems[v46].uObjectDescID].uFlags & 0x10) == 0; |
1665 LABEL_400: | 1979 LABEL_400: |
1666 if ( !v47 ) | 1980 if ( !v47 ) |
1667 goto _continue; | 1981 continue; |
1668 goto LABEL_415; | 1982 goto LABEL_415; |
1669 } | 1983 } |
1670 if ( v45 == 5 ) | 1984 if ( v45 == 5 ) |
1671 { | 1985 { |
1672 v48 = pLevelDecorations[v46].field_16_event_id == 0; | 1986 v48 = pLevelDecorations[v46].field_16_event_id == 0; |
1673 } | 1987 } |
1674 else | 1988 else |
1675 { | 1989 { |
1676 if ( v45 != 6 ) | 1990 if ( v45 != 6 ) |
1677 goto _continue; | 1991 continue; |
1678 if ( uCurrentlyLoadedLevelType != v0 ) | 1992 if ( uCurrentlyLoadedLevelType != v0 ) |
1679 { | 1993 { |
1680 pODMFace = &pOutdoor->pBModels[v44 >> 9].pFaces[v46 & 0x3F]; | 1994 pODMFace = &pOutdoor->pBModels[v44 >> 9].pFaces[v46 & 0x3F]; |
1681 if ( !(pODMFace->uAttributes & 0x02000000) || !pODMFace->sCogTriggeredID ) | 1995 if ( !(pODMFace->uAttributes & 0x02000000) || !pODMFace->sCogTriggeredID ) |
1682 goto _continue; | 1996 continue; |
1683 v44 = uNumSeconds; | 1997 v44 = uNumSeconds; |
1684 goto LABEL_415; | 1998 goto LABEL_415; |
1685 } | 1999 } |
1686 pBLVFace = &pIndoor->pFaces[v46]; | 2000 pBLVFace = &pIndoor->pFaces[v46]; |
1687 if ( !(BYTE3(pBLVFace->uAttributes) & 2) ) | 2001 if ( !(BYTE3(pBLVFace->uAttributes) & 2) ) |
1688 goto _continue; | 2002 continue; |
1689 v48 = pIndoor->pFaceExtras[pBLVFace->uFaceExtraID].uEventID == 0; | 2003 v48 = pIndoor->pFaceExtras[pBLVFace->uFaceExtraID].uEventID == 0; |
1690 } | 2004 } |
1691 if ( v48 ) | 2005 if ( v48 ) |
1692 goto _continue; | 2006 continue; |
1693 LABEL_415: | 2007 LABEL_415: |
1694 v51 = pGUIWindow_Settings->ptr_1C; | 2008 v51 = pGUIWindow_Settings->ptr_1C; |
1695 *((char *)v51 + 8) &= 0xBFu; | 2009 *((char *)v51 + 8) &= 0xBFu; |
1696 LABEL_416: | 2010 LABEL_416: |
1697 *((short *)v51 + 2) = uMessageParam; | 2011 *((short *)v51 + 2) = uMessageParam; |
1703 pGUIWindow_Settings = 0; | 2017 pGUIWindow_Settings = 0; |
1704 pMouse->SetCursorBitmap("MICON1"); | 2018 pMouse->SetCursorBitmap("MICON1"); |
1705 GameUI_StatusBar_TimedStringTimeLeft = 0; | 2019 GameUI_StatusBar_TimedStringTimeLeft = 0; |
1706 unk_50C9A0 = 0; | 2020 unk_50C9A0 = 0; |
1707 back_to_game(); | 2021 back_to_game(); |
1708 goto _continue; | 2022 continue; |
1709 case UIMSG_ChangeGameState|0x40: | 2023 case UIMSG_ChangeGameState|0x40: |
1710 case 0x8D: | 2024 case 0x8D: |
1711 case 0x8F: | 2025 case 0x8F: |
1712 if ( pMessageQueue_50CBD0->uNumMessages ) | 2026 if ( pMessageQueue_50CBD0->uNumMessages ) |
1713 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2027 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1744 pMouse->SetCursorBitmap("MICON1"); | 2058 pMouse->SetCursorBitmap("MICON1"); |
1745 GameUI_StatusBar_TimedStringTimeLeft = 0; | 2059 GameUI_StatusBar_TimedStringTimeLeft = 0; |
1746 unk_50C9A0 = 0; | 2060 unk_50C9A0 = 0; |
1747 } | 2061 } |
1748 } | 2062 } |
1749 goto _continue; | 2063 continue; |
1750 case UIMSG_BF: | 2064 case UIMSG_BF: |
1751 dword_50CDC8 = v0; | 2065 dword_50CDC8 = v0; |
1752 sub_42FBDD(); | 2066 sub_42FBDD(); |
1753 SaveGame(v0, 0); | 2067 SaveGame(v0, 0); |
1754 strcpy(pCurrentMapName, pMapStats->pInfos[uHouse_ExitPic].pFilename); | 2068 strcpy(pCurrentMapName, pMapStats->pInfos[uHouse_ExitPic].pFilename); |
1755 dword_6BE364_game_settings_1 |= v0; | 2069 dword_6BE364_game_settings_1 |= v0; |
1756 uGameState = 2; | 2070 uGameState = 2; |
1757 //v53 = p2DEvents_minus1_::30[26 * (unsigned int)ptr_507BC0->ptr_1C]; | 2071 //v53 = p2DEvents_minus1_::30[26 * (unsigned int)ptr_507BC0->ptr_1C]; |
1758 v53 = p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1]._quest_related; | 2072 v53 = p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1]._quest_related; |
1759 if ( v53 < 0 ) | 2073 if ( v53 < 0 ) |
1760 { | 2074 { |
1761 v54 = abs(v53) - 1; | 2075 v54 = abs(v53) - 1; |
1762 _5B65B8_npcdata_hiword_house_or_other = 0; | 2076 _5B65B8_npcdata_hiword_house_or_other = 0; |
1763 dword_5B65BC = 0; | 2077 dword_5B65BC = 0; |
1764 v55 = dword_4E4560[v54]; | 2078 v55 = dword_4E4560[v54]; |
1783 v148 = 177; | 2097 v148 = 177; |
1784 LABEL_438: | 2098 LABEL_438: |
1785 pWindowType = (WindowType)9; | 2099 pWindowType = (WindowType)9; |
1786 LABEL_439: | 2100 LABEL_439: |
1787 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, pWindowType, v148, v162); | 2101 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, pWindowType, v148, v162); |
1788 goto _continue; | 2102 continue; |
1789 case UIMSG_B2: | 2103 case UIMSG_B2: |
1790 v165 = 0; | 2104 v165 = 0; |
1791 v151 = 0; | 2105 v151 = 0; |
1792 v144 = 0; | 2106 v144 = 0; |
1793 v139 = 0; | 2107 v139 = 0; |
1797 v130 = 0; | 2111 v130 = 0; |
1798 v127 = uMessageParam + 204; | 2112 v127 = uMessageParam + 204; |
1799 goto _play_sound_and_continue; | 2113 goto _play_sound_and_continue; |
1800 case UIMSG_B4: | 2114 case UIMSG_B4: |
1801 if ( !pGUIWindow_CurrentMenu ) | 2115 if ( !pGUIWindow_CurrentMenu ) |
1802 goto _continue; | 2116 continue; |
1803 pPlayer = pPlayers[_506348_current_lloyd_playerid + 1]; | 2117 pPlayer = pPlayers[_506348_current_lloyd_playerid + 1]; |
1804 uNumSeconds = (unsigned int)&pPlayer->pInstalledBeacons[uMessageParam]; | 2118 uNumSeconds = (unsigned int)&pPlayer->pInstalledBeacons[uMessageParam]; |
1805 if ( bRecallingBeacon ) | 2119 if ( bRecallingBeacon ) |
1806 { | 2120 { |
1807 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) ) | 2121 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) ) |
1808 goto _continue; | 2122 continue; |
1809 v173 = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(pPlayer->pInstalledBeacons[uMessageParam].field_18))].pName; | 2123 v173 = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(pPlayer->pInstalledBeacons[uMessageParam].field_18))].pName; |
1810 v157 = pGlobalTXT_LocalizationStrings[474];// "Recall to %s" | 2124 v157 = pGlobalTXT_LocalizationStrings[474];// "Recall to %s" |
1811 goto _sprintex_2args_draw_status_and_continue; | 2125 goto _sprintex_2args_draw_status_and_continue; |
1812 } | 2126 } |
1813 v59 = pMapStats->GetMapInfo(pCurrentMapName); | 2127 v59 = pMapStats->GetMapInfo(pCurrentMapName); |
1831 goto LABEL_453; | 2145 goto LABEL_453; |
1832 case UIMSG_B3: | 2146 case UIMSG_B3: |
1833 pPlayer9 = pPlayers[_506348_current_lloyd_playerid + 1]; | 2147 pPlayer9 = pPlayers[_506348_current_lloyd_playerid + 1]; |
1834 pNPCData4 = (NPCData *)&pPlayer9->pInstalledBeacons[uMessageParam]; | 2148 pNPCData4 = (NPCData *)&pPlayer9->pInstalledBeacons[uMessageParam]; |
1835 if ( !*(_QWORD *)&pNPCData4->pName && bRecallingBeacon ) | 2149 if ( !*(_QWORD *)&pNPCData4->pName && bRecallingBeacon ) |
1836 goto _continue; | 2150 continue; |
1837 byte_506360 = 1; | 2151 byte_506360 = 1; |
1838 pPlayer9->CanCastSpell(uRequiredMana); | 2152 pPlayer9->CanCastSpell(uRequiredMana); |
1839 if ( pParty->bTurnBasedModeOn ) | 2153 if ( pParty->bTurnBasedModeOn ) |
1840 { | 2154 { |
1841 v60 = sRecoveryTime; | 2155 v60 = sRecoveryTime; |
1901 pNPCData2->fame = pParty->vPosition.y; | 2215 pNPCData2->fame = pParty->vPosition.y; |
1902 pNPCData2->rep = pParty->vPosition.z; | 2216 pNPCData2->rep = pParty->vPosition.z; |
1903 LOWORD(pNPCData2->house) = LOWORD(pParty->sRotationY); | 2217 LOWORD(pNPCData2->house) = LOWORD(pParty->sRotationY); |
1904 HIWORD(pNPCData2->house) = LOWORD(pParty->sRotationX); | 2218 HIWORD(pNPCData2->house) = LOWORD(pParty->sRotationX); |
1905 if ( (signed int)pGames_LOD->uNumSubIndices / 2 <= 0 ) | 2219 if ( (signed int)pGames_LOD->uNumSubIndices / 2 <= 0 ) |
1906 goto _continue; | 2220 continue; |
1907 uAction = 0; | 2221 uAction = 0; |
1908 while ( _strcmpi((const char *)pGames_LOD->pSubIndices + uAction, pCurrentMapName) ) | 2222 while ( _strcmpi((const char *)pGames_LOD->pSubIndices + uAction, pCurrentMapName) ) |
1909 { | 2223 { |
1910 ++thisg; | 2224 ++thisg; |
1911 uAction += 32; | 2225 uAction += 32; |
1912 if ( thisg >= (signed int)pGames_LOD->uNumSubIndices / 2 ) | 2226 if ( thisg >= (signed int)pGames_LOD->uNumSubIndices / 2 ) |
1913 goto _continue; | 2227 continue; |
1914 } | 2228 } |
1915 HIWORD(pNPCData4->uProfession) = thisg; | 2229 HIWORD(pNPCData4->uProfession) = thisg; |
1916 } | 2230 } |
1917 goto _continue; | 2231 continue; |
1918 case UIMSG_B7: | 2232 case UIMSG_B7: |
1919 if ( uMessageParam ) | 2233 if ( uMessageParam ) |
1920 { | 2234 { |
1921 switch ( uMessageParam ) | 2235 switch ( uMessageParam ) |
1922 { | 2236 { |
1976 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0; | 2290 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0; |
1977 LABEL_771: | 2291 LABEL_771: |
1978 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 2292 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
1979 ++pMessageQueue_50CBD0->uNumMessages; | 2293 ++pMessageQueue_50CBD0->uNumMessages; |
1980 } | 2294 } |
1981 goto _continue; | 2295 continue; |
1982 } | 2296 } |
1983 v63 = 210; | 2297 v63 = 210; |
1984 break; | 2298 break; |
1985 } | 2299 } |
1986 } | 2300 } |
2020 v68 = 206; | 2334 v68 = 206; |
2021 } | 2335 } |
2022 if ( !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, v68) ) | 2336 if ( !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, v68) ) |
2023 { | 2337 { |
2024 pRenderer->DrawTextureRGB(0, 0x160u, pTexture_StatusBar); | 2338 pRenderer->DrawTextureRGB(0, 0x160u, pTexture_StatusBar); |
2025 goto _continue; | 2339 continue; |
2026 } | 2340 } |
2027 LABEL_506: | 2341 LABEL_506: |
2028 if ( uMessageParam ) | 2342 if ( uMessageParam ) |
2029 { | 2343 { |
2030 switch ( uMessageParam ) | 2344 switch ( uMessageParam ) |
2042 v69 = pMapStats->pInfos[7].pName; | 2356 v69 = pMapStats->pInfos[7].pName; |
2043 break; | 2357 break; |
2044 default: | 2358 default: |
2045 if ( uMessageParam != 5 ) | 2359 if ( uMessageParam != 5 ) |
2046 //goto LABEL_519; | 2360 //goto LABEL_519; |
2047 { | 2361 { |
2048 v173 = v200; | 2362 v173 = v200; |
2049 v157 = pGlobalTXT_LocalizationStrings[35]; | 2363 v157 = pGlobalTXT_LocalizationStrings[35]; |
2050 goto _sprintex_2args_draw_status_and_continue; | 2364 goto _sprintex_2args_draw_status_and_continue; |
2051 } | 2365 } |
2052 v69 = pMapStats->pInfos[8].pName; | 2366 v69 = pMapStats->pInfos[8].pName; |
2053 break; | 2367 break; |
2054 } | 2368 } |
2055 } | 2369 } |
2056 else | 2370 else |
2066 sprintf(pFinalMessage, "%s\n \n%s\n \n%s", pGlobalTXT_LocalizationStrings[151],// "Congratulations Adventurer." | 2380 sprintf(pFinalMessage, "%s\n \n%s\n \n%s", pGlobalTXT_LocalizationStrings[151],// "Congratulations Adventurer." |
2067 pGlobalTXT_LocalizationStrings[118],// "We hope that you've enjoyed playing Might and Magic VII as much as we did making it. We have saved this screen as MM7_WIN.PCX in your MM7 directory. You can print it out as proof of your accomplishment." | 2381 pGlobalTXT_LocalizationStrings[118],// "We hope that you've enjoyed playing Might and Magic VII as much as we did making it. We have saved this screen as MM7_WIN.PCX in your MM7 directory. You can print it out as proof of your accomplishment." |
2068 pGlobalTXT_LocalizationStrings[167]);// "- The Might and Magic VII Development Team." | 2382 pGlobalTXT_LocalizationStrings[167]);// "- The Might and Magic VII Development Team." |
2069 ModalWindow(pFinalMessage, 196); | 2383 ModalWindow(pFinalMessage, 196); |
2070 uGameState = GAME_STATE_FINAL_WINDOW; | 2384 uGameState = GAME_STATE_FINAL_WINDOW; |
2071 goto _continue; | 2385 continue; |
2072 case UIMSG_C4: | 2386 case UIMSG_C4: |
2073 uGameState = 0; | 2387 uGameState = 0; |
2074 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2"); | 2388 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2"); |
2075 goto LABEL_524; | 2389 goto LABEL_524; |
2076 case UIMSG_D5|0x8: | 2390 case UIMSG_D5|0x8: |
2085 { | 2399 { |
2086 LABEL_90: | 2400 LABEL_90: |
2087 v1 = ""; | 2401 v1 = ""; |
2088 LABEL_91: | 2402 LABEL_91: |
2089 v0 = 1; | 2403 v0 = 1; |
2090 goto _continue; | 2404 continue; |
2091 } | 2405 } |
2092 v71 = v70; | 2406 v71 = v70; |
2093 strcpy(Str2, pMapStats->pInfos[v70].pFilename); | 2407 strcpy(Str2, pMapStats->pInfos[v70].pFilename); |
2094 pNPCData3 = 0; | 2408 pNPCData3 = 0; |
2095 if ( (signed int)pNPCData4 > 0 ) | 2409 if ( (signed int)pNPCData4 > 0 ) |
2108 strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)pNPCData3]); | 2422 strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)pNPCData3]); |
2109 dword_6BE364_game_settings_1 |= 1u; | 2423 dword_6BE364_game_settings_1 |= 1u; |
2110 uGameState = 2; | 2424 uGameState = 2; |
2111 OnMapLeave(); | 2425 OnMapLeave(); |
2112 //goto LABEL_90; | 2426 //goto LABEL_90; |
2113 v1 = ""; | 2427 v1 = ""; |
2114 v0 = 1; | 2428 v0 = 1; |
2115 goto _continue; | 2429 continue; |
2116 } | 2430 } |
2117 } | 2431 } |
2118 sprintf(Str2, "No map found for %s", pMapStats->pInfos[v71].pName); | 2432 sprintf(Str2, "No map found for %s", pMapStats->pInfos[v71].pName); |
2119 v73 = Str2; | 2433 v73 = Str2; |
2120 } | 2434 } |
2157 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 2471 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
2158 v73 = "Can't jump to that location!"; | 2472 v73 = "Can't jump to that location!"; |
2159 } | 2473 } |
2160 ShowStatusBarString(v73, 6u); | 2474 ShowStatusBarString(v73, 6u); |
2161 //goto LABEL_90; | 2475 //goto LABEL_90; |
2162 v1 = ""; | 2476 v1 = ""; |
2163 v0 = 1; | 2477 v0 = 1; |
2164 goto _continue; | 2478 continue; |
2165 case 0x19: | 2479 case 0x19: |
2166 if ( bUnderwater == 1 ) | 2480 if ( bUnderwater == 1 ) |
2167 goto LABEL_682; | 2481 goto LABEL_682; |
2168 if ( !uActiveCharacter || (pPlayer2 = pPlayers[uActiveCharacter], pPlayer2->uTimeToRecovery) ) | 2482 if ( !uActiveCharacter || (pPlayer2 = pPlayers[uActiveCharacter], pPlayer2->uTimeToRecovery) ) |
2169 goto LABEL_90; | 2483 goto LABEL_90; |
2188 v83 = v81; | 2502 v83 = v81; |
2189 v44 = (unsigned __int16)v81; | 2503 v44 = (unsigned __int16)v81; |
2190 v84 = v83 >> 16; | 2504 v84 = v83 >> 16; |
2191 if ( (v44 & 7) != 3 || v84 >= 5120 ) | 2505 if ( (v44 & 7) != 3 || v84 >= 5120 ) |
2192 //goto LABEL_90; | 2506 //goto LABEL_90; |
2193 { | 2507 { |
2194 v1 = ""; | 2508 v1 = ""; |
2195 v0 = 1; | 2509 v0 = 1; |
2196 goto _continue; | 2510 continue; |
2197 } | 2511 } |
2198 v51 = pGUIWindow_Settings->ptr_1C; | 2512 v51 = pGUIWindow_Settings->ptr_1C; |
2199 if ( uMessage == 70 ) | 2513 if ( uMessage == 70 ) |
2200 { | 2514 { |
2201 *((char *)v51 + 8) &= 0xF7u; | 2515 *((char *)v51 + 8) &= 0xF7u; |
2202 } | 2516 } |
2209 } | 2523 } |
2210 goto LABEL_416; | 2524 goto LABEL_416; |
2211 case 0x1C: | 2525 case 0x1C: |
2212 if ( !uActiveCharacter || pCurrentScreen ) | 2526 if ( !uActiveCharacter || pCurrentScreen ) |
2213 //goto LABEL_90; | 2527 //goto LABEL_90; |
2214 { | 2528 { |
2215 v1 = ""; | 2529 v1 = ""; |
2216 v0 = 1; | 2530 v0 = 1; |
2217 goto _continue; | 2531 continue; |
2218 } | 2532 } |
2219 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)104, uMessageParam, 0); | 2533 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)104, uMessageParam, 0); |
2220 pCurrentScreen = 25; | 2534 pCurrentScreen = 25; |
2221 pEventTimer->Pause(); | 2535 pEventTimer->Pause(); |
2222 goto _continue; | 2536 continue; |
2223 case 0x1B: | 2537 case 0x1B: |
2224 if ( !uActiveCharacter ) | 2538 if ( !uActiveCharacter ) |
2225 //goto LABEL_90; | 2539 //goto LABEL_90; |
2226 { | 2540 { |
2227 v1 = ""; | 2541 v1 = ""; |
2228 v0 = 1; | 2542 v0 = 1; |
2229 goto _continue; | 2543 continue; |
2230 } | 2544 } |
2231 if ( pParty->bTurnBasedModeOn != v0 ) | 2545 if ( pParty->bTurnBasedModeOn != v0 ) |
2232 goto LABEL_569; | 2546 goto LABEL_569; |
2233 if ( pTurnEngine->field_4 == v0 || pTurnEngine->field_4 == 3 ) | 2547 if ( pTurnEngine->field_4 == v0 || pTurnEngine->field_4 == 3 ) |
2234 //goto LABEL_90; | 2548 //goto LABEL_90; |
2235 { | 2549 { |
2236 v1 = ""; | 2550 v1 = ""; |
2237 v0 = 1; | 2551 v0 = 1; |
2238 goto _continue; | 2552 continue; |
2239 } | 2553 } |
2240 if ( !(pTurnEngine->field_18 & 2) ) | 2554 if ( !(pTurnEngine->field_18 & 2) ) |
2241 { | 2555 { |
2242 LABEL_569: | 2556 LABEL_569: |
2243 if ( pActors[uMessageParam].uAIState == 5 ) | 2557 if ( pActors[uMessageParam].uAIState == 5 ) |
2244 stru_50C198.LootActor(&pActors[uMessageParam]); | 2558 stru_50C198.LootActor(&pActors[uMessageParam]); |
2245 else | 2559 else |
2246 Actor::StealFrom(uMessageParam); | 2560 Actor::StealFrom(uMessageParam); |
2247 } | 2561 } |
2248 goto _continue; | 2562 continue; |
2249 case 0x17: | 2563 case 0x17: |
2250 if ( !uActiveCharacter ) | 2564 if ( !uActiveCharacter ) |
2251 //goto LABEL_90; | 2565 //goto LABEL_90; |
2252 { | 2566 { |
2253 v1 = ""; | 2567 v1 = ""; |
2254 v0 = 1; | 2568 v0 = 1; |
2255 goto _continue; | 2569 continue; |
2256 } | 2570 } |
2257 if ( pParty->bTurnBasedModeOn != v0 ) | 2571 if ( pParty->bTurnBasedModeOn != v0 ) |
2258 goto LABEL_577; | 2572 goto LABEL_577; |
2259 if ( pTurnEngine->field_4 == v0 || pTurnEngine->field_4 == 3 ) | 2573 if ( pTurnEngine->field_4 == v0 || pTurnEngine->field_4 == 3 ) |
2260 //goto LABEL_90; | 2574 //goto LABEL_90; |
2261 { | 2575 { |
2262 v1 = ""; | 2576 v1 = ""; |
2263 v0 = 1; | 2577 v0 = 1; |
2264 goto _continue; | 2578 continue; |
2265 } | 2579 } |
2266 if ( !(pTurnEngine->field_18 & 2) ) | 2580 if ( !(pTurnEngine->field_18 & 2) ) |
2267 LABEL_577: | 2581 LABEL_577: |
2268 _42ECB5_PlayerAttacksActor(); | 2582 _42ECB5_PlayerAttacksActor(); |
2269 goto _continue; | 2583 continue; |
2270 case UIMSG_A7: | 2584 case UIMSG_A7: |
2271 v163 = (int)pGlobalTXT_LocalizationStrings[81];// "Exit Rest" | 2585 v163 = (int)pGlobalTXT_LocalizationStrings[81];// "Exit Rest" |
2272 pButton = pButton_RestUI_Exit; | 2586 pButton = pButton_RestUI_Exit; |
2273 pButton2 = pButton_RestUI_Exit; | 2587 pButton2 = pButton_RestUI_Exit; |
2274 pWindowType1 = (WindowType)96; | 2588 pWindowType1 = (WindowType)96; |
2278 goto LABEL_621; | 2592 goto LABEL_621; |
2279 GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, (enum WindowType)90, | 2593 GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, (enum WindowType)90, |
2280 (int)pButton_RestUI_Wait5Minutes, (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes" | 2594 (int)pButton_RestUI_Wait5Minutes, (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes" |
2281 dword_506F14 = v0; | 2595 dword_506F14 = v0; |
2282 _506F18_num_hours_to_sleep = 5; | 2596 _506F18_num_hours_to_sleep = 5; |
2283 goto _continue; | 2597 continue; |
2284 case 0x60: | 2598 case 0x60: |
2285 if ( dword_506F14 == 2 ) | 2599 if ( dword_506F14 == 2 ) |
2286 goto LABEL_621; | 2600 goto LABEL_621; |
2287 GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, (enum WindowType)90, | 2601 GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, (enum WindowType)90, |
2288 (int)pButton_RestUI_Wait1Hour, (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour" | 2602 (int)pButton_RestUI_Wait1Hour, (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour" |
2289 dword_506F14 = v0; | 2603 dword_506F14 = v0; |
2290 _506F18_num_hours_to_sleep = 60; | 2604 _506F18_num_hours_to_sleep = 60; |
2291 goto _continue; | 2605 continue; |
2292 case UIMSG_OpenRestUI: | 2606 case UIMSG_OpenRestUI: |
2293 dword_506F14 = 2; | 2607 dword_506F14 = 2; |
2294 RestUI_Initialize(); | 2608 RestUI_Initialize(); |
2295 v86 = 60 * (sub_494820(pParty->uCurrentHour) + 1) - pParty->uCurrentMinute; | 2609 v86 = 60 * (sub_494820(pParty->uCurrentHour) + 1) - pParty->uCurrentMinute; |
2296 _506F18_num_hours_to_sleep = v86; | 2610 _506F18_num_hours_to_sleep = v86; |
2299 goto LABEL_615; | 2613 goto LABEL_615; |
2300 case 0x68: | 2614 case 0x68: |
2301 if ( pMessageQueue_50CBD0->uNumMessages ) | 2615 if ( pMessageQueue_50CBD0->uNumMessages ) |
2302 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2616 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2303 if ( pCurrentScreen ) | 2617 if ( pCurrentScreen ) |
2304 goto _continue; | 2618 continue; |
2305 if ( sub_42F4DA() ) | 2619 if ( sub_42F4DA() ) |
2306 goto LABEL_594; | 2620 goto LABEL_594; |
2307 if ( pParty->bTurnBasedModeOn == v0 ) | 2621 if ( pParty->bTurnBasedModeOn == v0 ) |
2308 goto LABEL_595; | 2622 goto LABEL_595; |
2309 if ( !(pParty->uFlags & 0x88) ) | 2623 if ( !(pParty->uFlags & 0x88) ) |
2310 { | 2624 { |
2311 RestUI_Initialize(); | 2625 RestUI_Initialize(); |
2312 goto _continue; | 2626 continue; |
2313 } | 2627 } |
2314 LABEL_594: | 2628 LABEL_594: |
2315 if ( pParty->bTurnBasedModeOn == v0 ) | 2629 if ( pParty->bTurnBasedModeOn == v0 ) |
2316 { | 2630 { |
2317 LABEL_595: | 2631 LABEL_595: |
2323 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" | 2637 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" |
2324 ShowStatusBarString(v88, 2u); | 2638 ShowStatusBarString(v88, 2u); |
2325 v89 = uActiveCharacter; | 2639 v89 = uActiveCharacter; |
2326 if ( !uActiveCharacter ) | 2640 if ( !uActiveCharacter ) |
2327 //goto LABEL_90; | 2641 //goto LABEL_90; |
2328 { | 2642 { |
2329 v1 = ""; | 2643 v1 = ""; |
2330 v0 = 1; | 2644 v0 = 1; |
2331 goto _continue; | 2645 continue; |
2332 } | 2646 } |
2333 v176 = 0; | 2647 v176 = 0; |
2334 v160 = 13; | 2648 v160 = 13; |
2335 goto LABEL_619; | 2649 goto LABEL_619; |
2336 case 0x61: | 2650 case 0x61: |
2337 if ( dword_506F14 ) | 2651 if ( dword_506F14 ) |
2406 pParty->pPlayers[3].pConditions[2] = pParty->uTimePlayed; | 2720 pParty->pPlayers[3].pConditions[2] = pParty->uTimePlayed; |
2407 pParty->pPlayers[2].pConditions[2] = pParty->uTimePlayed; | 2721 pParty->pPlayers[2].pConditions[2] = pParty->uTimePlayed; |
2408 pParty->pPlayers[1].pConditions[2] = pParty->uTimePlayed; | 2722 pParty->pPlayers[1].pConditions[2] = pParty->uTimePlayed; |
2409 pParty->pPlayers[0].pConditions[2] = pParty->uTimePlayed; | 2723 pParty->pPlayers[0].pConditions[2] = pParty->uTimePlayed; |
2410 } | 2724 } |
2411 goto _continue; | 2725 continue; |
2412 case UIMSG_ShowStatus_Funds|0x8: | 2726 case UIMSG_ShowStatus_Funds|0x8: |
2413 if ( dword_506F14 == 2 ) | 2727 if ( dword_506F14 == 2 ) |
2414 { | 2728 { |
2415 LABEL_621: | 2729 LABEL_621: |
2416 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" | 2730 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" |
2419 GUIWindow::Create(pButton_RestUI_WaitUntilDawn->uX, pButton_RestUI_WaitUntilDawn->uY, 0, 0, (enum WindowType)90, | 2733 GUIWindow::Create(pButton_RestUI_WaitUntilDawn->uX, pButton_RestUI_WaitUntilDawn->uY, 0, 0, (enum WindowType)90, |
2420 (int)pButton_RestUI_WaitUntilDawn, (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn" | 2734 (int)pButton_RestUI_WaitUntilDawn, (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn" |
2421 v97 = sub_494820(pParty->uCurrentHour); | 2735 v97 = sub_494820(pParty->uCurrentHour); |
2422 dword_506F14 = v0; | 2736 dword_506F14 = v0; |
2423 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; | 2737 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; |
2424 goto _continue; | 2738 continue; |
2425 case 0x4E: | 2739 case 0x4E: |
2426 if ( dword_50654C && byte_506550 ) | 2740 if ( dword_50654C && byte_506550 ) |
2427 { | 2741 { |
2428 v173 = pSpellStats->pInfos[dword_50654C + 11 * pPlayers[uActiveCharacter]->pNumSpellBookPage].pName; | 2742 v173 = pSpellStats->pInfos[dword_50654C + 11 * pPlayers[uActiveCharacter]->pNumSpellBookPage].pName; |
2429 v157 = pGlobalTXT_LocalizationStrings[483]; | 2743 v157 = pGlobalTXT_LocalizationStrings[483]; |
2438 v177 = pGlobalTXT_LocalizationStrings[484];// "Select a spell then click here to set a QuickSpell" | 2752 v177 = pGlobalTXT_LocalizationStrings[484];// "Select a spell then click here to set a QuickSpell" |
2439 strcpy(pTmpBuf, v177); | 2753 strcpy(pTmpBuf, v177); |
2440 } | 2754 } |
2441 _set_status_string_pTmpBuf_and_continue: | 2755 _set_status_string_pTmpBuf_and_continue: |
2442 sub_41C0B8_set_status_string(pTmpBuf); | 2756 sub_41C0B8_set_status_string(pTmpBuf); |
2443 goto _continue; | 2757 continue; |
2444 case 0x4F: | 2758 case 0x4F: |
2445 if ( !uActiveCharacter | 2759 if ( !uActiveCharacter || (uNumSeconds = (unsigned int)pPlayers[uActiveCharacter], |
2446 || (uNumSeconds = (unsigned int)pPlayers[uActiveCharacter], | |
2447 !*(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + 6734) + uMessageParam + 402)) ) | 2760 !*(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + 6734) + uMessageParam + 402)) ) |
2448 goto _continue; | 2761 continue; |
2449 if ( sub_4637E0_is_there_popup_onscreen() ) | 2762 if ( sub_4637E0_is_there_popup_onscreen() ) |
2450 dword_507B00_spell_info_to_draw_in_popup = uMessageParam + 1; | 2763 dword_507B00_spell_info_to_draw_in_popup = uMessageParam + 1; |
2451 v98 = *(char *)(uNumSeconds + 6734); | 2764 v98 = *(char *)(uNumSeconds + 6734); |
2452 if ( dword_50654C - 1 == uMessageParam ) | 2765 if ( dword_50654C - 1 == uMessageParam ) |
2453 { | 2766 { |
2463 sub_41C0B8_set_status_string(pTmpBuf); | 2776 sub_41C0B8_set_status_string(pTmpBuf); |
2464 goto LABEL_91; | 2777 goto LABEL_91; |
2465 case 0x58: | 2778 case 0x58: |
2466 GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, (enum WindowType)90, (int)pBtn_InstallRemoveSpell, 0); | 2779 GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, (enum WindowType)90, (int)pBtn_InstallRemoveSpell, 0); |
2467 if ( !uActiveCharacter ) | 2780 if ( !uActiveCharacter ) |
2468 goto _continue; | 2781 continue; |
2469 pPlayer10 = pPlayers[uActiveCharacter]; | 2782 pPlayer10 = pPlayers[uActiveCharacter]; |
2470 if ( !byte_506550 || !dword_50654C ) | 2783 if ( !byte_506550 || !dword_50654C ) |
2471 { | 2784 { |
2472 v165 = 0; | 2785 v165 = 0; |
2473 v151 = 0; | 2786 v151 = 0; |
2485 pPlayers[uActiveCharacter]->uQuickSpell = v99; | 2798 pPlayers[uActiveCharacter]->uQuickSpell = v99; |
2486 stru_A750F8[uActiveCharacter + 3]._494836(v99, uActiveCharacter); | 2799 stru_A750F8[uActiveCharacter + 3]._494836(v99, uActiveCharacter); |
2487 if ( uActiveCharacter ) | 2800 if ( uActiveCharacter ) |
2488 pPlayer10->PlaySound(12, 0); | 2801 pPlayer10->PlaySound(12, 0); |
2489 byte_506550 = 0; | 2802 byte_506550 = 0; |
2490 goto _continue; | 2803 continue; |
2491 case 0x33: | 2804 case 0x33: |
2492 if ( !uActiveCharacter ) | 2805 if ( !uActiveCharacter ) |
2493 goto _continue; | 2806 continue; |
2494 pPlayer3 = pPlayers[uActiveCharacter]; | 2807 pPlayer3 = pPlayers[uActiveCharacter]; |
2495 pNPCData4 = 0; | 2808 pNPCData4 = 0; |
2496 uAction = 0; | 2809 uAction = 0; |
2497 v101 = 0; | 2810 v101 = 0; |
2498 thisl = (int)&pPlayer3->pActiveSkills[12]; | 2811 thisl = (int)&pPlayer3->pActiveSkills[12]; |
2527 sub_41140B(); | 2840 sub_41140B(); |
2528 pPlayers[uActiveCharacter]->pNumSpellBookPage = LOBYTE(v217[uAction]); | 2841 pPlayers[uActiveCharacter]->pNumSpellBookPage = LOBYTE(v217[uAction]); |
2529 goto LABEL_661; | 2842 goto LABEL_661; |
2530 case UIMSG_SaveGame|0x4: | 2843 case UIMSG_SaveGame|0x4: |
2531 if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->pNumSpellBookPage ) | 2844 if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->pNumSpellBookPage ) |
2532 goto _continue; | 2845 continue; |
2533 sub_41140B(); | 2846 sub_41140B(); |
2534 pPlayers[uActiveCharacter]->pNumSpellBookPage = uMessageParam; | 2847 pPlayers[uActiveCharacter]->pNumSpellBookPage = uMessageParam; |
2535 LABEL_661: | 2848 LABEL_661: |
2536 pGUIWindow_CurrentMenu->_411621(); | 2849 pGUIWindow_CurrentMenu->_411621(); |
2537 LABEL_662: | 2850 LABEL_662: |
2574 dword_50654C = uMessageParam + 1; | 2887 dword_50654C = uMessageParam + 1; |
2575 } | 2888 } |
2576 } | 2889 } |
2577 } | 2890 } |
2578 } | 2891 } |
2579 goto _continue; | 2892 continue; |
2580 case 0x8E: | 2893 case 0x8E: |
2581 if ( pTurnEngine->field_4 == 3 ) | 2894 if ( pTurnEngine->field_4 == 3 ) |
2582 goto _continue; | 2895 continue; |
2583 v175 = 0; | 2896 v175 = 0; |
2584 v159 = 0; | 2897 v159 = 0; |
2585 v147 = 0; | 2898 v147 = 0; |
2586 goto LABEL_678; | 2899 goto LABEL_678; |
2587 case 0x92: | 2900 case 0x92: |
2594 v80 = v199; | 2907 v80 = v199; |
2595 v79 = uMessageParam; | 2908 v79 = uMessageParam; |
2596 LABEL_679: | 2909 LABEL_679: |
2597 _42777D_CastSpell_UseWand_ShootArrow(v79, v80, v147, v159, v175); | 2910 _42777D_CastSpell_UseWand_ShootArrow(v79, v80, v147, v159, v175); |
2598 } | 2911 } |
2599 goto _continue; | 2912 continue; |
2600 case 0x69: | 2913 case 0x69: |
2601 if ( pTurnEngine->field_4 == 3 ) | 2914 if ( pTurnEngine->field_4 == 3 ) |
2602 goto _continue; | 2915 continue; |
2603 if ( bUnderwater == 1 ) | 2916 if ( bUnderwater == 1 ) |
2604 { | 2917 { |
2605 LABEL_682: | 2918 LABEL_682: |
2606 v96 = pGlobalTXT_LocalizationStrings[652];// "You can not do that while you are underwater!" | 2919 v96 = pGlobalTXT_LocalizationStrings[652];// "You can not do that while you are underwater!" |
2607 LABEL_622: | 2920 LABEL_622: |
2637 pCurrentScreen = 8; | 2950 pCurrentScreen = 8; |
2638 pEventTimer->Pause(); | 2951 pEventTimer->Pause(); |
2639 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0); | 2952 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0); |
2640 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); | 2953 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); |
2641 viewparams->field_48 = v0; | 2954 viewparams->field_48 = v0; |
2642 goto _continue; | 2955 continue; |
2643 } | 2956 } |
2644 } | 2957 } |
2645 } | 2958 } |
2646 goto _continue; | 2959 continue; |
2647 case 0x6A: | 2960 case 0x6A: |
2648 if ( pMessageQueue_50CBD0->uNumMessages ) | 2961 if ( pMessageQueue_50CBD0->uNumMessages ) |
2649 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2962 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2650 if ( pCurrentScreen ) | 2963 if ( pCurrentScreen ) |
2651 pGUIWindow_CurrentMenu->Release(); | 2964 pGUIWindow_CurrentMenu->Release(); |
2660 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0); | 2973 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0); |
2661 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); | 2974 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); |
2662 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, v0, 0, 0x71u, 0, 0, | 2975 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, v0, 0, 0x71u, 0, 0, |
2663 pGlobalTXT_LocalizationStrings[79],// "Exit" | 2976 pGlobalTXT_LocalizationStrings[79],// "Exit" |
2664 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0, v179); | 2977 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0, v179); |
2665 goto _continue; | 2978 continue; |
2666 case 0x6B: | 2979 case 0x6B: |
2667 if ( pCurrentScreen ) | 2980 if ( pCurrentScreen ) |
2668 { | 2981 { |
2669 pGUIWindow_CurrentMenu->Release(); | 2982 pGUIWindow_CurrentMenu->Release(); |
2670 pEventTimer->Resume(); | 2983 pEventTimer->Resume(); |
2677 free((void *)uNumSeconds); | 2990 free((void *)uNumSeconds); |
2678 stru_506E40._40E55E("gamma.pcx", 0); | 2991 stru_506E40._40E55E("gamma.pcx", 0); |
2679 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)pBtn_GameSettings, 0); | 2992 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)pBtn_GameSettings, 0); |
2680 LABEL_453: | 2993 LABEL_453: |
2681 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 2994 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
2682 goto _continue; | 2995 continue; |
2683 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 2996 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; |
2684 goto LABEL_770; | 2997 goto LABEL_770; |
2685 case UIMSG_C0: | 2998 case UIMSG_C0: |
2686 dword_50651C = v0; | 2999 dword_50651C = v0; |
2687 if ( pMouse->GetCursorPos(&v211)->y > 178 ) | 3000 if ( pMouse->GetCursorPos(&v211)->y > 178 ) |
2688 dword_50651C = -1; | 3001 dword_50651C = -1; |
2689 goto _continue; | 3002 continue; |
2690 case UIMSG_A9: | 3003 case UIMSG_A9: |
2691 GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)pBtn_Up, 0); | 3004 GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)pBtn_Up, 0); |
2692 LABEL_707: | 3005 LABEL_707: |
2693 dword_506548 = v0; | 3006 dword_506548 = v0; |
2694 goto _continue; | 3007 continue; |
2695 case UIMSG_AA: | 3008 case UIMSG_AA: |
2696 GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)pBtn_Down, 0); | 3009 GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)pBtn_Down, 0); |
2697 LABEL_709: | 3010 LABEL_709: |
2698 dword_506544 = v0; | 3011 dword_506544 = v0; |
2699 goto _continue; | 3012 continue; |
2700 case 0x55: | 3013 case 0x55: |
2701 bRingsShownInCharScreen ^= v0; | 3014 bRingsShownInCharScreen ^= v0; |
2702 GUIButton::_41D0D8(pCharacterScreen_DetalizBtn); | 3015 GUIButton::_41D0D8(pCharacterScreen_DetalizBtn); |
2703 GUIButton::_41D0D8(pCharacterScreen_DollBtn); | 3016 GUIButton::_41D0D8(pCharacterScreen_DollBtn); |
2704 if ( bRingsShownInCharScreen ) | 3017 if ( bRingsShownInCharScreen ) |
2720 0); | 3033 0); |
2721 pCharacterScreen_DollBtn = pGUIWindow_CurrentMenu->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, v0, 0, 0x85u, 0, 0, v1, 0); | 3034 pCharacterScreen_DollBtn = pGUIWindow_CurrentMenu->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, v0, 0, 0x85u, 0, 0, v1, 0); |
2722 goto LABEL_422; | 3035 goto LABEL_422; |
2723 case UIMSG_Quit|0x1: | 3036 case UIMSG_Quit|0x1: |
2724 OnPaperdollLeftClick(); | 3037 OnPaperdollLeftClick(); |
2725 goto _continue; | 3038 continue; |
2726 case UIMSG_Escape|0x2: | 3039 case UIMSG_Escape|0x2: |
2727 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100; | 3040 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100; |
2728 sub_4196A0(); | 3041 sub_4196A0(); |
2729 sub_419379(); | 3042 sub_419379(); |
2730 pButton = pCharacterScreen_StatsBtn; | 3043 pButton = pCharacterScreen_StatsBtn; |
2764 } | 3077 } |
2765 v87 = pGlobalTXT_LocalizationStrings[487];// "You have already mastered this skill!" | 3078 v87 = pGlobalTXT_LocalizationStrings[487];// "You have already mastered this skill!" |
2766 } | 3079 } |
2767 _draw_status_string_and_continue: | 3080 _draw_status_string_and_continue: |
2768 ShowStatusBarString(v87, 2u); | 3081 ShowStatusBarString(v87, 2u); |
2769 goto _continue; | 3082 continue; |
2770 case UIMSG_ChangeMusicVolume|0x4: | 3083 case UIMSG_ChangeMusicVolume|0x4: |
2771 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; | 3084 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; |
2772 sub_419379(); | 3085 sub_419379(); |
2773 sub_4196A0(); | 3086 sub_4196A0(); |
2774 pButton = pCharacterScreen_InventoryBtn; | 3087 pButton = pCharacterScreen_InventoryBtn; |
2789 sub_419220(); | 3102 sub_419220(); |
2790 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; | 3103 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; |
2791 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), | 3104 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), |
2792 (int)pCharacterScreen_AwardsBtn, 0); | 3105 (int)pCharacterScreen_AwardsBtn, 0); |
2793 sub_419100(); | 3106 sub_419100(); |
2794 goto _continue; | 3107 continue; |
2795 case 71://0x47: | 3108 case 71://0x47: |
2796 switch ( uMessageParam ) | 3109 switch ( uMessageParam ) |
2797 { | 3110 { |
2798 default: | 3111 default: |
2799 goto _continue; | 3112 continue; |
2800 case 11: | 3113 case 11: |
2801 goto LABEL_707; | 3114 goto LABEL_707; |
2802 case 10: | 3115 case 10: |
2803 goto LABEL_709; | 3116 goto LABEL_709; |
2804 case 0: | 3117 case 0: |
2810 dword_506548 = v0; | 3123 dword_506548 = v0; |
2811 break; | 3124 break; |
2812 case 2: | 3125 case 2: |
2813 dword_506540 = v0; | 3126 dword_506540 = v0; |
2814 if ( dword_506364 ) | 3127 if ( dword_506364 ) |
2815 goto _continue; | 3128 continue; |
2816 pButton = pBtn_Book_3; | 3129 pButton = pBtn_Book_3; |
2817 break; | 3130 break; |
2818 case 3: | 3131 case 3: |
2819 dword_50653C = v0; | 3132 dword_50653C = v0; |
2820 if ( dword_506364 ) | 3133 if ( dword_506364 ) |
2821 goto _continue; | 3134 continue; |
2822 pButton = pBtn_Book_4; | 3135 pButton = pBtn_Book_4; |
2823 break; | 3136 break; |
2824 case 4: | 3137 case 4: |
2825 dword_506538 = v0; | 3138 dword_506538 = v0; |
2826 if ( dword_506364 ) | 3139 if ( dword_506364 ) |
2827 goto _continue; | 3140 continue; |
2828 pButton = pBtn_Book_5; | 3141 pButton = pBtn_Book_5; |
2829 break; | 3142 break; |
2830 case 5: | 3143 case 5: |
2831 dword_506534 = v0; | 3144 dword_506534 = v0; |
2832 if ( dword_506364 ) | 3145 if ( dword_506364 ) |
2833 goto _continue; | 3146 continue; |
2834 pButton = pBtn_Book_6; | 3147 pButton = pBtn_Book_6; |
2835 break; | 3148 break; |
2836 case 6: | 3149 case 6: |
2837 pButton = pBtn_Autonotes_Misc; | 3150 pButton = pBtn_Autonotes_Misc; |
2838 dword_506530 = v0; | 3151 dword_506530 = v0; |
2851 goto LABEL_732; | 3164 goto LABEL_732; |
2852 case UIMSG_SelectCharacter: | 3165 case UIMSG_SelectCharacter: |
2853 if ( pMessageQueue_50CBD0->uNumMessages ) | 3166 if ( pMessageQueue_50CBD0->uNumMessages ) |
2854 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3167 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2855 GameUI_OnPlayerPortraitLeftClick(uMessageParam); | 3168 GameUI_OnPlayerPortraitLeftClick(uMessageParam); |
2856 goto _continue; | 3169 continue; |
2857 case UIMSG_ShowStatus_Funds: | 3170 case UIMSG_ShowStatus_Funds: |
2858 v174 = (char *)pParty->uNumGoldInBank; | 3171 v174 = (char *)pParty->uNumGoldInBank; |
2859 v158 = pParty->uNumGold + pParty->uNumGoldInBank; | 3172 v158 = pParty->uNumGold + pParty->uNumGoldInBank; |
2860 v146 = pGlobalTXT_LocalizationStrings[489];// "You have %d total gold, %d in the Bank"" | 3173 v146 = pGlobalTXT_LocalizationStrings[489];// "You have %d total gold, %d in the Bank"" |
2861 goto _sprintex_draw_status_and_continue; | 3174 goto _sprintex_draw_status_and_continue; |
2887 strcat(pTmpBuf, aCharacterConditionNames[v107]); | 3200 strcat(pTmpBuf, aCharacterConditionNames[v107]); |
2888 sub_41C0B8_set_status_string(pTmpBuf); | 3201 sub_41C0B8_set_status_string(pTmpBuf); |
2889 v108 = 8 * uMessageParam - 8; | 3202 v108 = 8 * uMessageParam - 8; |
2890 LOBYTE(v108) = v108 | 4; | 3203 LOBYTE(v108) = v108 | 4; |
2891 pMouse->uPointingObjectID = v108; | 3204 pMouse->uPointingObjectID = v108; |
2892 goto _continue; | 3205 continue; |
2893 case UIMSG_ShowStatus_ManaHP: | 3206 case UIMSG_ShowStatus_ManaHP: |
2894 v109 = pGlobalTXT_LocalizationStrings[212];// "Spell Points" | 3207 v109 = pGlobalTXT_LocalizationStrings[212];// "Spell Points" |
2895 v110 = pPlayers[uMessageParam]; | 3208 v110 = pPlayers[uMessageParam]; |
2896 v111 = v110->GetMaxMana(); | 3209 v111 = v110->GetMaxMana(); |
2897 v112 = v110->sMana; | 3210 v112 = v110->sMana; |
2901 goto _set_status_string_pTmpBuf_and_continue; | 3214 goto _set_status_string_pTmpBuf_and_continue; |
2902 case 0xC: | 3215 case 0xC: |
2903 if ( pCurrentScreen == 15 ) | 3216 if ( pCurrentScreen == 15 ) |
2904 goto LABEL_762; | 3217 goto LABEL_762; |
2905 sub_420E01(); | 3218 sub_420E01(); |
2906 goto _continue; | 3219 continue; |
2907 case UIMSG_ChangeMusicVolume|0x8: | 3220 case UIMSG_ChangeMusicVolume|0x8: |
2908 LABEL_762: | 3221 LABEL_762: |
2909 sub_421EA6_OnInventoryLeftClick(); | 3222 sub_421EA6_OnInventoryLeftClick(); |
2910 goto _continue; | 3223 continue; |
2911 case 0xA: | 3224 case 0xA: |
2912 if ( !pRenderer->pRenderD3D ) | 3225 if ( !pRenderer->pRenderD3D ) |
2913 goto LABEL_772; | 3226 goto LABEL_772; |
2914 v115 = pMessageQueue_50CBD0->uNumMessages; | 3227 v115 = pMessageQueue_50CBD0->uNumMessages; |
2915 if ( !pMessageQueue_50CBD0->uNumMessages ) | 3228 if ( !pMessageQueue_50CBD0->uNumMessages ) |
2927 v115 = 0; | 3240 v115 = 0; |
2928 pMessageQueue_50CBD0->uNumMessages = 0; | 3241 pMessageQueue_50CBD0->uNumMessages = 0; |
2929 LABEL_768: | 3242 LABEL_768: |
2930 if ( (signed int)v115 < 40 ) | 3243 if ( (signed int)v115 < 40 ) |
2931 goto LABEL_769; | 3244 goto LABEL_769; |
2932 goto _continue; | 3245 continue; |
2933 case 0xE: | 3246 case 0xE: |
2934 LABEL_772: | 3247 LABEL_772: |
2935 if ( pMessageQueue_50CBD0->uNumMessages ) | 3248 if ( pMessageQueue_50CBD0->uNumMessages ) |
2936 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3249 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2937 OnGameViewportClick(); | 3250 OnGameViewportClick(); |
2938 goto _continue; | 3251 continue; |
2939 case 0xF: | 3252 case 0xF: |
2940 if ( pRenderer->pRenderD3D ) | 3253 if ( pRenderer->pRenderD3D ) |
2941 { | 3254 { |
2942 LOWORD(v116) = pGame->pVisInstance->get_picked_object_zbuf_val(); | 3255 LOWORD(v116) = pGame->pVisInstance->get_picked_object_zbuf_val(); |
2943 } | 3256 } |
2961 LABEL_732: | 3274 LABEL_732: |
2962 v137 = 0; | 3275 v137 = 0; |
2963 v133 = 0; | 3276 v133 = 0; |
2964 LABEL_733: | 3277 LABEL_733: |
2965 GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); | 3278 GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); |
2966 goto _continue; | 3279 continue; |
2967 case 0x194: | 3280 case 0x194: |
2968 if ( pMessageQueue_50CBD0->uNumMessages ) | 3281 if ( pMessageQueue_50CBD0->uNumMessages ) |
2969 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3282 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2970 OnPressSpace(); | 3283 OnPressSpace(); |
2971 goto _continue; | 3284 continue; |
2972 case UIMSG_ChangeSoundVolume|0x100: | 3285 case UIMSG_ChangeSoundVolume|0x100: |
2973 if ( pCurrentScreen ) | 3286 if ( pCurrentScreen ) |
2974 goto _continue; | 3287 continue; |
2975 pParty->uFlags |= 2u; | 3288 pParty->uFlags |= 2u; |
2976 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A14, 0); | 3289 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A14, 0); |
2977 uNumSeconds = 131072; | 3290 uNumSeconds = 131072; |
2978 v118 = 2 * viewparams->uMinimapZoom; | 3291 v118 = 2 * viewparams->uMinimapZoom; |
2979 ++viewparams->field_28; | 3292 ++viewparams->field_28; |
2983 if ( (signed int)v118 > 4096 ) | 3296 if ( (signed int)v118 > 4096 ) |
2984 { | 3297 { |
2985 viewparams->uMinimapZoom = 4096; | 3298 viewparams->uMinimapZoom = 4096; |
2986 viewparams->field_28 = 12; | 3299 viewparams->field_28 = 12; |
2987 } | 3300 } |
2988 goto _continue; | 3301 continue; |
2989 } | 3302 } |
2990 v119 = 2048; | 3303 v119 = 2048; |
2991 if ( (signed int)v118 <= 2048 ) | 3304 if ( (signed int)v118 <= 2048 ) |
2992 goto LABEL_789; | 3305 goto LABEL_789; |
2993 viewparams->field_28 = 11; | 3306 viewparams->field_28 = 11; |
2994 goto LABEL_788; | 3307 goto LABEL_788; |
2995 case UIMSG_ChangeMusicVolume|0x100: | 3308 case UIMSG_ChangeMusicVolume|0x100: |
2996 if ( pCurrentScreen ) | 3309 if ( pCurrentScreen ) |
2997 goto _continue; | 3310 continue; |
2998 pParty->uFlags |= 2u; | 3311 pParty->uFlags |= 2u; |
2999 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A18, 0); | 3312 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A18, 0); |
3000 uNumSeconds = 32768; | 3313 uNumSeconds = 32768; |
3001 v118 = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16; | 3314 v118 = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16; |
3002 --viewparams->field_28; | 3315 --viewparams->field_28; |
3021 { | 3334 { |
3022 viewparams->uMinimapZoom = 256; | 3335 viewparams->uMinimapZoom = 256; |
3023 viewparams->field_28 = 8; | 3336 viewparams->field_28 = 8; |
3024 } | 3337 } |
3025 } | 3338 } |
3026 goto _continue; | 3339 default: |
3340 continue; | |
3027 } | 3341 } |
3028 } | 3342 } |
3029 } | 3343 } |
3030 pMessageQueue_50CBD0->uNumMessages = dword_50C9E8; | 3344 pMessageQueue_50CBD0->uNumMessages = dword_50C9E8; |
3031 memcpy(pMessageQueue_50CBD0->pMessages, dword_50C9EC, 12 * dword_50C9E8); | 3345 memcpy(pMessageQueue_50CBD0->pMessages, dword_50C9EC, 12 * dword_50C9E8); |
8349 return false; | 8663 return false; |
8350 } | 8664 } |
8351 // A750D8: using guessed type __int64 qword_A750D8; | 8665 // A750D8: using guessed type __int64 qword_A750D8; |
8352 | 8666 |
8353 //----- (0043EDB9) -------------------------------------------------------- | 8667 //----- (0043EDB9) -------------------------------------------------------- |
8354 bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this) | 8668 bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int a1) |
8355 { | 8669 { |
8356 unsigned int v1; // ebp@1 | 8670 unsigned int pNum; // ebp@1 |
8357 Player **v2; // ebx@1 | 8671 Player **pPlayer; // ebx@1 |
8358 Player *v3; // esi@2 | 8672 Player *pPlayer2; // esi@2 |
8359 enum CHARACTER_RACE v4; // edi@2 | 8673 enum CHARACTER_RACE pRace; // edi@2 |
8360 bool result; // eax@2 | 8674 bool pSex; // eax@2 |
8361 char v6; // zf@7 | 8675 char v6; // zf@7 |
8362 | 8676 |
8363 v1 = _this; | 8677 //pPlayer = &pPlayers[1]; |
8364 v2 = &pPlayers[1]; | 8678 /*pNum = a1; |
8679 | |
8365 while ( 1 ) | 8680 while ( 1 ) |
8366 { | 8681 { |
8367 v3 = *v2; | 8682 pPlayer2 = *pPlayer; |
8368 v4 = v3->GetRace(); | 8683 pRace = pPlayer2->GetRace(); |
8369 result = v3->GetSexByVoice(); | 8684 pSex = pPlayer2->GetSexByVoice(); |
8370 if ( !v4 ) | 8685 if ( !pRace ) |
8371 break; | 8686 break; |
8372 if ( v4 == 1 || v4 == 2 ) | 8687 if ( pRace == 1 || pRace == 2 ) |
8373 break; | 8688 break; |
8374 if ( !result && v1 == 2 ) | 8689 if ( !pSex && pNum == 2 )// |
8375 goto LABEL_15; | 8690 //goto LABEL_15; |
8376 v6 = v1 == 3; | 8691 { |
8692 pSex = 1; | |
8693 return pSex; | |
8694 } | |
8695 v6 = pNum == 3;// | |
8377 LABEL_11: | 8696 LABEL_11: |
8378 if ( v6 ) | 8697 if ( v6 ) |
8379 goto LABEL_15; | 8698 //goto LABEL_15; |
8380 ++v2; | 8699 { |
8381 if ( (signed int)v2 >= (signed int)&qword_A750D8 ) | 8700 pSex = 1; |
8382 { | 8701 return pSex; |
8383 LOBYTE(result) = 0; | 8702 } |
8384 return result; | 8703 ++pPlayer; |
8385 } | 8704 if ( (signed int)pPlayer >= (signed int)&qword_A750D8 )// |
8386 } | 8705 { |
8387 if ( result || v1 ) | 8706 pSex = 0; |
8388 { | 8707 return pSex; |
8389 v6 = v1 == 1; | 8708 } |
8709 } | |
8710 if ( pSex || pNum ) | |
8711 { | |
8712 v6 = pNum == 1; | |
8390 goto LABEL_11; | 8713 goto LABEL_11; |
8391 } | 8714 } |
8392 LABEL_15: | 8715 //LABEL_15: |
8393 LOBYTE(result) = 1; | 8716 pSex = 1; |
8394 return result; | 8717 return pSex;*/ |
8718 for (int i = 1; i <= 4; &pPlayers[i]) | |
8719 { | |
8720 pRace = pPlayers[i]->GetRace(); | |
8721 pSex = pPlayers[i]->GetSexByVoice(); | |
8722 if (pRace == 0 || pRace == 1 || pRace == 2 || pSex == 0 ) | |
8723 return 1; | |
8724 } | |
8725 return 0; | |
8395 } | 8726 } |
8396 // A750D8: using guessed type __int64 qword_A750D8; | 8727 // A750D8: using guessed type __int64 qword_A750D8; |
8397 | 8728 |
8398 //----- (0043EE15) -------------------------------------------------------- | 8729 //----- (0043EE15) -------------------------------------------------------- |
8399 bool __fastcall sub_43EE15_player_has_item(unsigned int uItemID, Player *pPlayer, char a3) | 8730 bool __fastcall sub_43EE15_player_has_item(unsigned int uItemID, Player *pPlayer, char a3) |
14395 int v18; // eax@61 | 14726 int v18; // eax@61 |
14396 int v19; // eax@62 | 14727 int v19; // eax@62 |
14397 void *v20; // ebp@66 | 14728 void *v20; // ebp@66 |
14398 char *pHint; // edx@66 | 14729 char *pHint; // edx@66 |
14399 GUIButton *pButtonPtr_1C; // ebp@79 | 14730 GUIButton *pButtonPtr_1C; // ebp@79 |
14400 char *v23; // edx@80 | 14731 char *pHint1; // edx@80 |
14401 char v24; // zf@81 | 14732 char v24; // zf@81 |
14402 //unsigned int v25; // eax@91 | 14733 //unsigned int v25; // eax@91 |
14403 int v26; // eax@98 | 14734 int v26; // eax@98 |
14404 unsigned int v27; // ebp@106 | 14735 unsigned int v27; // ebp@106 |
14405 GUIWindow *pGUIWindow2; // ecx@109 | 14736 GUIWindow *pGUIWindow2; // ecx@109 |
14460 if ( (signed int)pWindowType > 70 ) | 14791 if ( (signed int)pWindowType > 70 ) |
14461 { | 14792 { |
14462 if ( (signed int)pWindowType > 95 ) | 14793 if ( (signed int)pWindowType > 95 ) |
14463 { | 14794 { |
14464 v33 = pWindowType - 96; | 14795 v33 = pWindowType - 96; |
14465 if ( !v33 ) | 14796 if ( pWindowType == WINDOW_60 )//96 |
14466 { | 14797 { |
14467 if ( pWindow->Hint != (char *)1 ) | 14798 if ( pWindow->Hint != (char *)1 ) |
14468 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14799 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
14469 pGUIButton = (GUIButton *)pWindow->ptr_1C; | 14800 pGUIButton = (GUIButton *)pWindow->ptr_1C; |
14470 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pGUIButton->pTextures[0]); | 14801 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pGUIButton->pTextures[0]); |
14483 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 14814 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
14484 ++pMessageQueue_50CBD0->uNumMessages; | 14815 ++pMessageQueue_50CBD0->uNumMessages; |
14485 continue; | 14816 continue; |
14486 } | 14817 } |
14487 v34 = v33 - 1; | 14818 v34 = v33 - 1; |
14488 if ( v34 ) | 14819 if ( v34 )//pWindowType > 97 |
14489 { | 14820 { |
14490 v35 = v34 - 1; | 14821 v35 = v34 - 1; |
14491 if ( v35 ) | 14822 if ( v35 )//pWindowType > 98 |
14492 { | 14823 { |
14493 v36 = v35 - 1; | 14824 v36 = v35 - 1; |
14494 if ( v36 ) | 14825 if ( v36 )//pWindowType > 99 |
14495 { | 14826 { |
14496 v37 = v36 - 4; | 14827 v37 = v36 - 4; |
14497 if ( v37 ) | 14828 if ( v37 )//pWindowType > 103 |
14498 { | 14829 { |
14499 v38 = v37 - 2; | 14830 v38 = v37 - 2; |
14500 if ( v38 ) | 14831 if ( v38 )//pWindowType > 105 |
14501 { | 14832 { |
14502 if ( v38 == 1 ) | 14833 if ( v38 == 1 )//pWindowType == 106 |
14503 GameMenuUI_DrawVideoOptions(); | 14834 GameMenuUI_DrawVideoOptions(); |
14504 } | 14835 } |
14505 else | 14836 else//pWindowType == 105 |
14506 { | 14837 { |
14507 GameMenuUI_DrawKeyBindings(); | 14838 GameMenuUI_DrawKeyBindings(); |
14508 } | 14839 } |
14509 } | 14840 } |
14510 else | 14841 else//pWindowType == 103 |
14511 { | 14842 { |
14512 pWindow->DrawMessageBox(0); | 14843 pWindow->DrawMessageBox(0); |
14513 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); | 14844 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); |
14514 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); | 14845 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); |
14515 if ( !pKeyActionMap->field_204 ) | 14846 if ( !pKeyActionMap->field_204 ) |
14527 } | 14858 } |
14528 } | 14859 } |
14529 } | 14860 } |
14530 continue; | 14861 continue; |
14531 } | 14862 } |
14532 pTexture = (Texture *)*((_DWORD *)pWindow->ptr_1C + 15); | 14863 pTexture = (Texture *)*((_DWORD *)pWindow->ptr_1C + 15);//pWindowType == 99 |
14533 pY = pWindow->uFrameY; | 14864 pY = pWindow->uFrameY; |
14534 pX = pWindow->uFrameX; | 14865 pX = pWindow->uFrameX; |
14535 //LABEL_18: | 14866 //LABEL_18: |
14536 pRenderer->DrawTextureIndexed(pX, pY, pTexture); | 14867 pRenderer->DrawTextureIndexed(pX, pY, pTexture); |
14537 //LABEL_114: | 14868 //LABEL_114: |
14538 viewparams->bRedrawGameUI = 1; | 14869 viewparams->bRedrawGameUI = 1; |
14539 continue; | 14870 continue; |
14540 } | 14871 } |
14541 memset(&GUIButton2, 0, 0xBCu); | 14872 memset(&GUIButton2, 0, 0xBCu);//pWindowType == 98 |
14542 GUIButton2.uZ = 197; | 14873 GUIButton2.uZ = 197; |
14543 GUIButton2.uW = 197; | 14874 GUIButton2.uW = 197; |
14544 GUIButton2.uX = 27; | 14875 GUIButton2.uX = 27; |
14545 GUIButton2.uY = 161; | 14876 GUIButton2.uY = 161; |
14546 GUIButton2.uWidth = 171; | 14877 GUIButton2.uWidth = 171; |
14550 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 15)); | 14881 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 15)); |
14551 viewparams->bRedrawGameUI = 1; | 14882 viewparams->bRedrawGameUI = 1; |
14552 GUIButton2.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0);//Îòäûõ è ëå÷åíèå 8 ÷àñîâ | 14883 GUIButton2.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0);//Îòäûõ è ëå÷åíèå 8 ÷àñîâ |
14553 GUIButton2.pParent = 0; | 14884 GUIButton2.pParent = 0; |
14554 //goto LABEL_134; | 14885 //goto LABEL_134; |
14555 pGUIWindow2 = pWindow; | 14886 pGUIWindow2 = pWindow; |
14556 //goto LABEL_110; | 14887 //goto LABEL_110; |
14557 pGUIWindow2->Release(); | 14888 pGUIWindow2->Release(); |
14558 continue; | 14889 continue; |
14559 } | 14890 } |
14560 if ( pWindow->Hint != (char *)1 ) | 14891 if ( pWindow->Hint != (char *)1 )//pWindowType == 97 |
14561 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14892 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
14562 v32 = pWindow->ptr_1C; | 14893 v32 = pWindow->ptr_1C; |
14563 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 16)); | 14894 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 16)); |
14564 goto LABEL_138; | 14895 //goto LABEL_138; |
14896 pHint = pWindow->Hint; | |
14897 viewparams->bRedrawGameUI = 1; | |
14898 if ( pHint && pHint != (char *)1 ) | |
14899 ((GUIButton *)v32)->DrawLabel(pHint, pFontCreate, 0, 0); | |
14900 pWindow->Release(); | |
14901 pNumMessages = pMessageQueue_50CBD0->uNumMessages; | |
14902 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | |
14903 { | |
14904 pMessageQueue_50CBD0->pMessages[pNumMessages].eType = (UIMessageType)113; | |
14905 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | |
14906 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
14907 ++pMessageQueue_50CBD0->uNumMessages; | |
14908 continue; | |
14909 } | |
14910 continue; | |
14565 } | 14911 } |
14566 if ( pWindowType == 95 ) | 14912 |
14913 if ( pWindowType == WINDOW_5F ) | |
14567 { | 14914 { |
14568 if ( pWindow->Hint != (char *)1 ) | 14915 if ( pWindow->Hint != (char *)1 ) |
14569 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14916 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
14570 v32 = pWindow->ptr_1C; | 14917 v32 = pWindow->ptr_1C; |
14571 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 15)); | 14918 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 15)); |
14572 LABEL_138: | 14919 //LABEL_138: |
14573 pHint = pWindow->Hint; | 14920 pHint = pWindow->Hint; |
14574 viewparams->bRedrawGameUI = 1; | 14921 viewparams->bRedrawGameUI = 1; |
14575 if ( pHint && pHint != (char *)1 ) | 14922 if ( pHint && pHint != (char *)1 ) |
14576 ((GUIButton *)v32)->DrawLabel(pHint, pFontCreate, 0, 0); | 14923 ((GUIButton *)v32)->DrawLabel(pHint, pFontCreate, 0, 0); |
14577 pWindow->Release(); | 14924 pWindow->Release(); |
14578 LABEL_142: | 14925 //LABEL_142: |
14579 pNumMessages = pMessageQueue_50CBD0->uNumMessages; | 14926 pNumMessages = pMessageQueue_50CBD0->uNumMessages; |
14580 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 14927 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
14581 //goto LABEL_151; | 14928 //goto LABEL_151; |
14582 { | 14929 { |
14583 pMessageQueue_50CBD0->pMessages[pNumMessages].eType = (UIMessageType)113; | 14930 pMessageQueue_50CBD0->pMessages[pNumMessages].eType = (UIMessageType)113; |
14584 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 14931 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
14585 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 14932 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
14586 ++pMessageQueue_50CBD0->uNumMessages; | 14933 ++pMessageQueue_50CBD0->uNumMessages; |
14587 continue; | 14934 continue; |
14588 } | 14935 } |
14589 continue; | 14936 continue; |
14590 } | 14937 } |
14591 v14 = pWindowType - 80; | 14938 v14 = pWindowType - 80; |
14592 if ( v14 ) | 14939 if ( v14 )//pWindowType > 80 |
14593 { | 14940 { |
14594 v15 = v14 - 9; | 14941 v15 = v14 - 9; |
14595 if ( !v15 ) | 14942 if ( !v15 )//pWindowType == 89 |
14596 { | 14943 { |
14597 pWindow->DrawMessageBox(0); | 14944 pWindow->DrawMessageBox(0); |
14598 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); | 14945 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); |
14599 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); | 14946 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); |
14600 if ( !pKeyActionMap->field_204 ) | 14947 if ( !pKeyActionMap->field_204 ) |
14627 } | 14974 } |
14628 } | 14975 } |
14629 continue; | 14976 continue; |
14630 } | 14977 } |
14631 v16 = v15 - 1; | 14978 v16 = v15 - 1; |
14632 if ( !v16 ) | 14979 if ( !v16 )// pWindowType == 90 |
14633 { | 14980 { |
14634 if ( pWindow->Hint != (char *)1 ) | 14981 if ( pWindow->Hint != (char *)1 ) |
14635 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14982 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
14636 pButtonPtr_1C = (GUIButton *)pWindow->ptr_1C; | 14983 pButtonPtr_1C = (GUIButton *)pWindow->ptr_1C; |
14637 if ( (pButtonPtr_1C->uX /*& 0x80000000u*/) == 0 ) | 14984 if ( (pButtonPtr_1C->uX /*& 0x80000000u*/) == 0 ) |
14642 if ( (pButtonPtr_1C->uY /*& 0x80000000u*/) == 0 ) | 14989 if ( (pButtonPtr_1C->uY /*& 0x80000000u*/) == 0 ) |
14643 { | 14990 { |
14644 if ( (signed int)pButtonPtr_1C->uY <= 480 ) | 14991 if ( (signed int)pButtonPtr_1C->uY <= 480 ) |
14645 { | 14992 { |
14646 pTexture2 = pButtonPtr_1C->pTextures[0]; | 14993 pTexture2 = pButtonPtr_1C->pTextures[0]; |
14647 goto LABEL_94; | 14994 //goto LABEL_94; |
14995 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pTexture2); | |
14996 pHint1 = pWindow->Hint; | |
14997 viewparams->bRedrawGameUI = 1; | |
14998 if ( pHint1 ) | |
14999 { | |
15000 v24 = pHint1 == (char *)1; | |
15001 if ( !v24 ) | |
15002 pButtonPtr_1C->DrawLabel(pHint1, pFontCreate, 0, 0); | |
15003 } | |
15004 pGUIWindow2 = pWindow; | |
15005 pGUIWindow2->Release(); | |
15006 continue; | |
14648 } | 15007 } |
14649 } | 15008 } |
14650 } | 15009 } |
14651 } | 15010 } |
14652 v23 = pWindow->Hint; | 15011 pHint1 = pWindow->Hint; |
14653 viewparams->bRedrawGameUI = 1; | 15012 viewparams->bRedrawGameUI = 1; |
14654 if ( v23 ) | 15013 if ( pHint1 ) |
14655 { | 15014 { |
14656 v24 = v23 == (char *)1; | 15015 v24 = pHint1 == (char *)1; |
14657 goto LABEL_82; | 15016 //goto LABEL_82; |
15017 if ( !v24 ) | |
15018 pButtonPtr_1C->DrawLabel(pHint1, pFontCreate, 0, 0); | |
15019 pGUIWindow2 = pWindow; | |
15020 pGUIWindow2->Release(); | |
15021 continue; | |
14658 } | 15022 } |
14659 //LABEL_134: | 15023 //LABEL_134: |
14660 pGUIWindow2 = pWindow; | 15024 pGUIWindow2 = pWindow; |
14661 //goto LABEL_110; | 15025 //goto LABEL_110; |
14662 pGUIWindow2->Release(); | 15026 pGUIWindow2->Release(); |
14663 continue; | 15027 continue; |
14664 } | 15028 } |
14665 v17 = v16 - 1; | 15029 v17 = v16 - 1; |
14666 if ( !v17 ) | 15030 if ( !v17 )//pWindowType == 91 |
14667 { | 15031 { |
14668 if ( pWindow->Hint != (char *)1 ) | 15032 if ( pWindow->Hint != (char *)1 ) |
14669 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 15033 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
14670 pButtonPtr_1C = (GUIButton *)pWindow->ptr_1C; | 15034 pButtonPtr_1C = (GUIButton *)pWindow->ptr_1C; |
14671 pTexture2 = pButtonPtr_1C->pTextures[1]; | 15035 pTexture2 = pButtonPtr_1C->pTextures[1]; |
14672 LABEL_94: | 15036 //LABEL_94: |
14673 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pTexture2); | 15037 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pTexture2); |
14674 LABEL_80: | 15038 //LABEL_80: |
14675 v23 = pWindow->Hint; | 15039 pHint1 = pWindow->Hint; |
14676 viewparams->bRedrawGameUI = 1; | 15040 viewparams->bRedrawGameUI = 1; |
14677 if ( v23 ) | 15041 if ( pHint1 ) |
14678 { | 15042 { |
14679 v24 = v23 == (char *)1; | 15043 v24 = pHint1 == (char *)1; |
14680 LABEL_82: | 15044 //LABEL_82: |
14681 if ( !v24 ) | 15045 if ( !v24 ) |
14682 pButtonPtr_1C->DrawLabel(v23, pFontCreate, 0, 0); | 15046 pButtonPtr_1C->DrawLabel(pHint1, pFontCreate, 0, 0); |
14683 } | 15047 } |
14684 //goto LABEL_134; | 15048 //goto LABEL_134; |
14685 pGUIWindow2 = pWindow; | 15049 pGUIWindow2 = pWindow; |
14686 //goto LABEL_110; | 15050 //goto LABEL_110; |
14687 pGUIWindow2->Release(); | 15051 pGUIWindow2->Release(); |
14688 continue; | 15052 continue; |
14689 } | 15053 } |
14690 v18 = v17 - 1; | 15054 v18 = v17 - 1; |
14691 if ( !v18 ) | 15055 if ( !v18 )//pWindowType == 92 |
14692 { | 15056 { |
14693 if ( pWindow->Hint != (char *)1 ) | 15057 if ( pWindow->Hint != (char *)1 ) |
14694 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 15058 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
14695 pButtonPtr_1C = (GUIButton *)pWindow->ptr_1C; | 15059 pButtonPtr_1C = (GUIButton *)pWindow->ptr_1C; |
14696 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButtonPtr_1C->pTextures[0]); | 15060 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButtonPtr_1C->pTextures[0]); |
14697 goto LABEL_80; | 15061 //goto LABEL_80; |
15062 pHint1 = pWindow->Hint; | |
15063 viewparams->bRedrawGameUI = 1; | |
15064 if ( pHint1 ) | |
15065 { | |
15066 v24 = pHint1 == (char *)1; | |
15067 if ( !v24 ) | |
15068 pButtonPtr_1C->DrawLabel(pHint1, pFontCreate, 0, 0); | |
15069 } | |
15070 pGUIWindow2 = pWindow; | |
15071 pGUIWindow2->Release(); | |
15072 continue; | |
14698 } | 15073 } |
14699 v19 = v18 - 1; | 15074 v19 = v18 - 1; |
14700 if ( !v19 ) | 15075 if ( !v19 )//pWindowType == 93 |
14701 { | 15076 { |
14702 if ( pWindow->Hint != (char *)1 ) | 15077 if ( pWindow->Hint != (char *)1 ) |
14703 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 15078 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
14704 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 16)); | 15079 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 16)); |
14705 viewparams->bRedrawGameUI = 1; | 15080 viewparams->bRedrawGameUI = 1; |
14706 //goto LABEL_134; | 15081 //goto LABEL_134; |
14707 pGUIWindow2 = pWindow; | 15082 pGUIWindow2 = pWindow; |
14708 //goto LABEL_110; | 15083 //goto LABEL_110; |
14709 pGUIWindow2->Release(); | 15084 pGUIWindow2->Release(); |
14710 continue; | 15085 continue; |
14711 } | 15086 } |
14712 } | 15087 } |
14713 else | 15088 else//pWindowType == 80 |
14714 { | 15089 { |
14715 v27 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 15090 v27 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
14716 if ( ptr_507BD0->field_40 == 1 ) | 15091 if ( ptr_507BD0->field_40 == 1 ) |
14717 { | 15092 { |
14718 ptr_507BD0->DrawMessageBox(0); | 15093 ptr_507BD0->DrawMessageBox(0); |
14735 } | 15110 } |
14736 pEventTimer->Resume(); | 15111 pEventTimer->Resume(); |
14737 ptr_507BD0->Release(); | 15112 ptr_507BD0->Release(); |
14738 pCurrentScreen = 0; | 15113 pCurrentScreen = 0; |
14739 //goto LABEL_114; | 15114 //goto LABEL_114; |
14740 viewparams->bRedrawGameUI = 1; | 15115 viewparams->bRedrawGameUI = 1; |
14741 continue; | 15116 continue; |
14742 } | 15117 } |
14743 if ( ptr_507BD0->field_40 == 3 ) | 15118 if ( ptr_507BD0->field_40 == 3 ) |
14744 { | 15119 { |
14745 pWindow->field_40 = 0; | 15120 pWindow->field_40 = 0; |
14761 if ( (signed int)pWindowType > 18 ) | 15136 if ( (signed int)pWindowType > 18 ) |
14762 { | 15137 { |
14763 if ( (signed int)pWindowType > 25 ) | 15138 if ( (signed int)pWindowType > 25 ) |
14764 { | 15139 { |
14765 v12 = pWindowType - 26; | 15140 v12 = pWindowType - 26; |
14766 if ( v12 ) | 15141 if ( v12 )// pWindowType > 26 |
14767 { | 15142 { |
14768 v13 = v12 - 4; | 15143 v13 = v12 - 4; |
14769 if ( v13 ) | 15144 if ( v13 )//pWindowType > 30 |
14770 { | 15145 { |
14771 if ( v13 == 1 ) | 15146 if ( v13 == 1 ) //pWindowType == 31 |
14772 { | 15147 { |
14773 pRenderer->ClearZBuffer(0, 479); | 15148 pRenderer->ClearZBuffer(0, 479); |
14774 draw_leather(); | 15149 draw_leather(); |
14775 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 15150 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
14776 CharacterUI_DrawPaperdoll(uActiveCharacter); | 15151 CharacterUI_DrawPaperdoll(uActiveCharacter); |
14777 pRenderer->DrawTextureTransparent(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, | 15152 pRenderer->DrawTextureTransparent(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, |
14778 (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); | 15153 (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); |
14779 } | 15154 } |
14780 } | 15155 } |
14781 else | 15156 else// pWindowType == 30 |
14782 { | 15157 { |
14783 sub_467FB6(); | 15158 sub_467FB6(); |
14784 } | 15159 } |
14785 } | 15160 } |
14786 else | 15161 else //pWindowType == 26 |
14787 { | 15162 { |
14788 TransitionUI_Draw(); | 15163 TransitionUI_Draw(); |
14789 } | 15164 } |
14790 continue; | 15165 continue; |
14791 } | 15166 } |
14792 if ( pWindowType != 25 ) | 15167 if ( pWindowType != 25 ) |
14793 { | 15168 { |
14794 v7 = pWindowType - 19; | 15169 v7 = pWindowType - 19; |
14795 if ( v7 ) | 15170 if ( v7 )// pWindowType > 19 |
14796 { | 15171 { |
14797 v8 = v7 - 1; | 15172 v8 = v7 - 1; |
14798 if ( v8 ) | 15173 if ( v8 )// pWindowType > 20 |
14799 { | 15174 { |
14800 v9 = v8 - 3; | 15175 v9 = v8 - 3; |
14801 if ( v9 ) | 15176 if ( v9 )//pWindowType > 23 |
14802 { | 15177 { |
14803 //if ( v9 == 1 ) | 15178 //if ( v9 == 1 ) //pWindowType == 24 |
14804 // sub_4606F7(); | 15179 // sub_4606F7(); |
14805 } | 15180 } |
14806 else | 15181 else//pWindowType == 23 |
14807 { | 15182 { |
14808 sub_4606FE(); | 15183 sub_4606FE(); |
14809 } | 15184 } |
14810 } | 15185 } |
14811 else | 15186 else//pWindowType == 20 |
14812 { | 15187 { |
14813 if ( pCurrentScreen == 10 ) | 15188 if ( pCurrentScreen == 10 ) |
14814 { | 15189 { |
14815 Chest::DrawChestUI((unsigned int)pWindow->ptr_1C); | 15190 Chest::DrawChestUI((unsigned int)pWindow->ptr_1C); |
14816 } | 15191 } |
14825 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0)); | 15200 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0)); |
14826 } | 15201 } |
14827 } | 15202 } |
14828 } | 15203 } |
14829 } | 15204 } |
14830 else | 15205 else//pWindowType == 19 |
14831 { | 15206 { |
14832 DrawBranchlessDialogueUI(); | 15207 DrawBranchlessDialogueUI(); |
14833 } | 15208 } |
14834 continue; | 15209 continue; |
14835 } | 15210 } |
14850 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10] = 0; | 15225 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10] = 0; |
14851 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10 + 1] = 0; | 15226 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10 + 1] = 0; |
14852 } | 15227 } |
14853 continue; | 15228 continue; |
14854 } | 15229 } |
14855 goto LABEL_142; | 15230 //goto LABEL_142; |
15231 pNumMessages = pMessageQueue_50CBD0->uNumMessages; | |
15232 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | |
15233 { | |
15234 pMessageQueue_50CBD0->pMessages[pNumMessages].eType = (UIMessageType)113; | |
15235 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | |
15236 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
15237 ++pMessageQueue_50CBD0->uNumMessages; | |
15238 continue; | |
15239 } | |
15240 continue; | |
14856 } | 15241 } |
14857 if ( pWindowType == 18 ) | 15242 if ( pWindowType == 18 ) |
14858 { | 15243 { |
14859 sub_412B58(); | 15244 sub_412B58(); |
14860 } | 15245 } |
14861 else | 15246 else |
14862 { | 15247 { |
14863 if ( (signed int)pWindowType > 10 ) | 15248 if ( (signed int)pWindowType > 10 ) |
14864 { | 15249 { |
14865 v5 = pWindowType - 12; | 15250 v5 = pWindowType - 12; |
14866 if ( v5 ) | 15251 if ( v5 )//pWindowType >12 |
14867 { | 15252 { |
14868 v6 = v5 - 4; | 15253 v6 = v5 - 4; |
14869 if ( v6 ) | 15254 if ( v6 )//pWindowType > 16 |
14870 { | 15255 { |
14871 if ( v6 == 1 ) | 15256 if ( v6 == 1 )//pWindowType == 17 |
14872 TravelUI_Draw(); | 15257 TravelUI_Draw(); |
14873 } | 15258 } |
14874 else | 15259 else//pWindowType == 16 |
14875 { | 15260 { |
14876 RestUI_Draw(); | 15261 RestUI_Draw(); |
14877 } | 15262 } |
14878 } | 15263 } |
14879 else | 15264 else// pWindowType == 12 |
14880 { | 15265 { |
14881 QuickRefDraw(); | 15266 QuickRefDraw(); |
14882 } | 15267 } |
14883 continue; | 15268 continue; |
14884 } | 15269 } |
14885 if ( pWindowType != 10 ) | 15270 if ( pWindowType != 10 ) |
14886 { | 15271 { |
14887 v2 = pWindowType - 3; | 15272 v2 = pWindowType - 3; |
14888 if ( v2 ) | 15273 if ( v2 )//pWindowType > 3 |
14889 { | 15274 { |
14890 v3 = v2 - 1; | 15275 v3 = v2 - 1; |
14891 if ( v3 ) | 15276 if ( v3 )// pWindowType > 4 |
14892 { | 15277 { |
14893 v4 = v3 - 2; | 15278 v4 = v3 - 2; |
14894 if ( v4 ) | 15279 if ( v4 )//pWindowType > 6 |
14895 { | 15280 { |
14896 if ( v4 == 3 ) | 15281 if ( v4 == 3 )//pWindowType == 9 |
14897 DrawSpellbook((unsigned int)pWindow->ptr_1C); | 15282 DrawSpellbook((unsigned int)pWindow->ptr_1C); |
14898 } | 15283 } |
14899 else | 15284 else//pWindowType == 6 |
14900 { | 15285 { |
14901 sub_414F82_DrawGameOptions(); | 15286 sub_414F82_DrawGameOptions(); |
14902 } | 15287 } |
14903 } | 15288 } |
14904 else | 15289 else//pWindowType == 4 |
14905 { | 15290 { |
14906 CharacterUI_CharacterScreen_Draw(uActiveCharacter); | 15291 CharacterUI_CharacterScreen_Draw(uActiveCharacter); |
14907 } | 15292 } |
14908 continue; | 15293 continue; |
14909 } | 15294 } |
14910 pTexture = (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0); | 15295 pTexture = (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0);//pWindowType == 3 |
14911 pY = pViewport->uViewportY; | 15296 pY = pViewport->uViewportY; |
14912 pX = pViewport->uViewportX; | 15297 pX = pViewport->uViewportX; |
14913 //goto LABEL_18; | 15298 //goto LABEL_18; |
14914 pRenderer->DrawTextureIndexed(pX, pY, pTexture); | 15299 pRenderer->DrawTextureIndexed(pX, pY, pTexture); |
14915 viewparams->bRedrawGameUI = 1; | 15300 viewparams->bRedrawGameUI = 1; |
14916 continue; | 15301 continue; |
14917 } | 15302 } |
14918 DrawDialogueUI(); | 15303 DrawDialogueUI(); |
14919 } | 15304 } |