Mercurial > mm7
comparison mm7_5.cpp @ 712:e7c86528a2b3
Merge
author | Gloval |
---|---|
date | Thu, 21 Mar 2013 23:11:54 +0400 |
parents | a5e587c8e30e 735dab8d3c9a |
children | 9d13d2ec35a6 |
comparison
equal
deleted
inserted
replaced
711:a5e587c8e30e | 712:e7c86528a2b3 |
---|---|
212 unsigned __int8 v143; // [sp-8h] [bp-604h]@86 | 212 unsigned __int8 v143; // [sp-8h] [bp-604h]@86 |
213 int v144; // [sp-8h] [bp-604h]@107 | 213 int v144; // [sp-8h] [bp-604h]@107 |
214 enum WindowType pWindowType2; // [sp-8h] [bp-604h]@121 | 214 enum WindowType pWindowType2; // [sp-8h] [bp-604h]@121 |
215 const char *v146; // [sp-8h] [bp-604h]@449 | 215 const char *v146; // [sp-8h] [bp-604h]@449 |
216 unsigned int v147; // [sp-8h] [bp-604h]@550 | 216 unsigned int v147; // [sp-8h] [bp-604h]@550 |
217 int v148; // [sp-4h] [bp-600h]@56 | 217 //int v148; // [sp-4h] [bp-600h]@56 |
218 GUIButton *pButton2; // [sp-4h] [bp-600h]@59 | 218 GUIButton *pButton2; // [sp-4h] [bp-600h]@59 |
219 const char *v150; // [sp-4h] [bp-600h]@86 | 219 const char *v150; // [sp-4h] [bp-600h]@86 |
220 unsigned int v151; // [sp-4h] [bp-600h]@107 | 220 unsigned int v151; // [sp-4h] [bp-600h]@107 |
221 int v152; // [sp-4h] [bp-600h]@121 | 221 int v152; // [sp-4h] [bp-600h]@121 |
222 int v153; // [sp-4h] [bp-600h]@135 | 222 int v153; // [sp-4h] [bp-600h]@135 |
226 const char *v157; // [sp-4h] [bp-600h]@444 | 226 const char *v157; // [sp-4h] [bp-600h]@444 |
227 unsigned int v158; // [sp-4h] [bp-600h]@449 | 227 unsigned int v158; // [sp-4h] [bp-600h]@449 |
228 __int16 v159; // [sp-4h] [bp-600h]@550 | 228 __int16 v159; // [sp-4h] [bp-600h]@550 |
229 int v160; // [sp-4h] [bp-600h]@599 | 229 int v160; // [sp-4h] [bp-600h]@599 |
230 const char *v161; // [sp-4h] [bp-600h]@637 | 230 const char *v161; // [sp-4h] [bp-600h]@637 |
231 int v162; // [sp+0h] [bp-5FCh]@56 | 231 //int v162; // [sp+0h] [bp-5FCh]@56 |
232 int v163; // [sp+0h] [bp-5FCh]@59 | 232 int v163; // [sp+0h] [bp-5FCh]@59 |
233 Texture *pTexture; // [sp+0h] [bp-5FCh]@86 | 233 Texture *pTexture; // [sp+0h] [bp-5FCh]@86 |
234 int v165; // [sp+0h] [bp-5FCh]@107 | 234 int v165; // [sp+0h] [bp-5FCh]@107 |
235 int v166; // [sp+0h] [bp-5FCh]@121 | 235 int v166; // [sp+0h] [bp-5FCh]@121 |
236 int v167; // [sp+0h] [bp-5FCh]@135 | 236 int v167; // [sp+0h] [bp-5FCh]@135 |
459 case UIMSG_80: | 459 case UIMSG_80: |
460 pIcons_LOD->_40F9C5(); | 460 pIcons_LOD->_40F9C5(); |
461 pIcons_LOD->_4114F2(); | 461 pIcons_LOD->_4114F2(); |
462 pGUIWindow_CurrentMenu->Release(); | 462 pGUIWindow_CurrentMenu->Release(); |
463 pCurrentScreen = SCREEN_OPTIONS; | 463 pCurrentScreen = SCREEN_OPTIONS; |
464 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (WindowType)8, 0, 0); | 464 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_8, 0, 0); |
465 continue; | 465 continue; |
466 case UIMSG_ArrowUp: | 466 case UIMSG_ArrowUp: |
467 --pSaveListPosition; | 467 --pSaveListPosition; |
468 if ( pSaveListPosition < 0 ) | 468 if ( pSaveListPosition < 0 ) |
469 pSaveListPosition = 0; | 469 pSaveListPosition = 0; |
470 GUIWindow::Create(215, 199, 17, 17, (WindowType)90, (int)pBtnArrowUp, 0); | 470 GUIWindow::Create(215, 199, 17, 17, WINDOW_5A, (int)pBtnArrowUp, 0); |
471 continue; | 471 continue; |
472 case UIMSG_DownArrow: | 472 case UIMSG_DownArrow: |
473 ++pSaveListPosition; | 473 ++pSaveListPosition; |
474 if ( pSaveListPosition >= uMessageParam ) | 474 if ( pSaveListPosition >= uMessageParam ) |
475 pSaveListPosition = uMessageParam - 1; | 475 pSaveListPosition = uMessageParam - 1; |
476 GUIWindow::Create(215, 323, 17, 17, (WindowType)90, (int)pBtnDownArrow, 0); | 476 GUIWindow::Create(215, 323, 17, 17, WINDOW_5A, (int)pBtnDownArrow, 0); |
477 continue; | 477 continue; |
478 case UIMSG_Cancel: | 478 case UIMSG_Cancel: |
479 GUIWindow::Create(350, 302, 106, 42, (WindowType)96, (int)pBtnCancel, 0); | 479 GUIWindow::Create(350, 302, 106, 42, WINDOW_60, (int)pBtnCancel, 0); |
480 continue; | 480 continue; |
481 case UIMSG_LoadSlot: | 481 case UIMSG_LoadSlot: |
482 GUIWindow::Create(241, 302, 106, 42, (WindowType)94, (int)pBtnLoadSlot, 0); | 482 GUIWindow::Create(241, 302, 106, 42, WINDOW_5E, (int)pBtnLoadSlot, 0); |
483 continue; | 483 continue; |
484 case UIMSG_SelectLoadSlot: | 484 case UIMSG_SelectLoadSlot: |
485 if ( pGUIWindow_CurrentMenu->field_40 == v0 ) | 485 if ( pGUIWindow_CurrentMenu->field_40 == v0 ) |
486 pKeyActionMap->_459ED1(0); | 486 pKeyActionMap->_459ED1(0); |
487 if ( pCurrentScreen != SCREEN_SAVEGAME || uLoadGameUI_SelectedSlot != pSaveListPosition + uMessageParam ) | 487 if ( pCurrentScreen != SCREEN_SAVEGAME || uLoadGameUI_SelectedSlot != pSaveListPosition + uMessageParam ) |
761 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0); | 761 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0); |
762 continue; | 762 continue; |
763 } | 763 } |
764 v19 = (double)(signed int)uGammaPos * 0.1 + 0.6; | 764 v19 = (double)(signed int)uGammaPos * 0.1 + 0.6; |
765 pGame->pGammaController->Initialize(v19); | 765 pGame->pGammaController->Initialize(v19); |
766 GUIWindow::Create(21, 161, 0, 0, (WindowType)90, (int)pBtn_SliderLeft, v0); | 766 GUIWindow::Create(21, 161, 0, 0, WINDOW_5A, (int)pBtn_SliderLeft, v0); |
767 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0); | 767 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0); |
768 continue; | 768 continue; |
769 } | 769 } |
770 if ( uMessageParam == 5 ) | 770 if ( uMessageParam == 5 ) |
771 { | 771 { |
772 ++uGammaPos; | 772 ++uGammaPos; |
773 if ( (signed int)uGammaPos <= 9 ) | 773 if ( (signed int)uGammaPos <= 9 ) |
774 { | 774 { |
775 v21 = (double)(signed int)uGammaPos * 0.1 + 0.6; | 775 v21 = (double)(signed int)uGammaPos * 0.1 + 0.6; |
776 pGame->pGammaController->Initialize(v21); | 776 pGame->pGammaController->Initialize(v21); |
777 GUIWindow::Create(213, 161, 0, 0, (WindowType)90, (int)pBtn_SliderRight, v0); | 777 GUIWindow::Create(213, 161, 0, 0, WINDOW_5A, (int)pBtn_SliderRight, v0); |
778 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0); | 778 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0); |
779 continue; | 779 continue; |
780 } | 780 } |
781 uGammaPos = 9; | 781 uGammaPos = 9; |
782 } | 782 } |
801 if ( uMessageParam == 4 ) | 801 if ( uMessageParam == 4 ) |
802 { | 802 { |
803 --uMusicVolimeMultiplier; | 803 --uMusicVolimeMultiplier; |
804 if ( (char)uMusicVolimeMultiplier < 1 ) | 804 if ( (char)uMusicVolimeMultiplier < 1 ) |
805 uMusicVolimeMultiplier = 0; | 805 uMusicVolimeMultiplier = 0; |
806 GUIWindow::Create(243, 0xD8u, 0, 0, (enum WindowType)90, (int)pBtn_SliderLeft, v0); | 806 GUIWindow::Create(243, 0xD8u, 0, 0, WINDOW_5A, (int)pBtn_SliderLeft, v0); |
807 if ( uMusicVolimeMultiplier ) | 807 if ( uMusicVolimeMultiplier ) |
808 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0); | 808 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0); |
809 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f); | 809 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f); |
810 continue; | 810 continue; |
811 } | 811 } |
812 if ( uMessageParam == 5 ) | 812 if ( uMessageParam == 5 ) |
813 { | 813 { |
814 ++uMusicVolimeMultiplier; | 814 ++uMusicVolimeMultiplier; |
815 if ( (char)uMusicVolimeMultiplier > 9 ) | 815 if ( (char)uMusicVolimeMultiplier > 9 ) |
816 uMusicVolimeMultiplier = 9; | 816 uMusicVolimeMultiplier = 9; |
817 GUIWindow::Create(435, 0xD8u, 0, 0, (enum WindowType)90, (int)pBtn_SliderRight, v0); | 817 GUIWindow::Create(435, 0xD8u, 0, 0, WINDOW_5A, (int)pBtn_SliderRight, v0); |
818 if ( uMusicVolimeMultiplier ) | 818 if ( uMusicVolimeMultiplier ) |
819 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0); | 819 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0); |
820 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f); | 820 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f); |
821 continue; | 821 continue; |
822 } | 822 } |
831 if ( uMessageParam == 4 )//reduce sound level button left | 831 if ( uMessageParam == 4 )//reduce sound level button left |
832 { | 832 { |
833 --uSoundVolumeMultiplier; | 833 --uSoundVolumeMultiplier; |
834 if ( (char)uSoundVolumeMultiplier < 1 ) | 834 if ( (char)uSoundVolumeMultiplier < 1 ) |
835 uSoundVolumeMultiplier = 0; | 835 uSoundVolumeMultiplier = 0; |
836 GUIWindow::Create(243, 162, 0, 0, (enum WindowType)90, (int)pBtn_SliderLeft, v0); | 836 GUIWindow::Create(243, 162, 0, 0, WINDOW_5A, (int)pBtn_SliderLeft, v0); |
837 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f); | 837 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f); |
838 pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0); | 838 pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0); |
839 continue; | 839 continue; |
840 } | 840 } |
841 if ( uMessageParam == 5 )//Increase sound level button right | 841 if ( uMessageParam == 5 )//Increase sound level button right |
844 if ( (char)uSoundVolumeMultiplier > 8 ) | 844 if ( (char)uSoundVolumeMultiplier > 8 ) |
845 uSoundVolumeMultiplier = 9; | 845 uSoundVolumeMultiplier = 9; |
846 v168 = v0; | 846 v168 = v0; |
847 v24 = 435; | 847 v24 = 435; |
848 v154 = (int)pBtn_SliderRight; | 848 v154 = (int)pBtn_SliderRight; |
849 GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168); | 849 GUIWindow::Create(v24, 0xA2u, 0, 0, WINDOW_5A, v154, v168); |
850 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f); | 850 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f); |
851 pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0); | 851 pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0); |
852 continue; | 852 continue; |
853 } | 853 } |
854 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17; | 854 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17; |
873 if ( uMessageParam == 4 ) | 873 if ( uMessageParam == 4 ) |
874 { | 874 { |
875 --uVoicesVolumeMultiplier; | 875 --uVoicesVolumeMultiplier; |
876 if ( (char)uVoicesVolumeMultiplier < 1 ) | 876 if ( (char)uVoicesVolumeMultiplier < 1 ) |
877 uVoicesVolumeMultiplier = 0; | 877 uVoicesVolumeMultiplier = 0; |
878 GUIWindow::Create(243, 270, 0, 0, (enum WindowType)90, (int)pBtn_SliderLeft, v0); | 878 GUIWindow::Create(243, 270, 0, 0, WINDOW_5A, (int)pBtn_SliderLeft, v0); |
879 if ( !uVoicesVolumeMultiplier ) | 879 if ( !uVoicesVolumeMultiplier ) |
880 continue; | 880 continue; |
881 pAudioPlayer->PlaySound((SoundID)5788, -1, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0); | 881 pAudioPlayer->PlaySound((SoundID)5788, -1, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0); |
882 continue; | 882 continue; |
883 } | 883 } |
884 if ( uMessageParam == 5 ) | 884 if ( uMessageParam == 5 ) |
885 { | 885 { |
886 ++uVoicesVolumeMultiplier; | 886 ++uVoicesVolumeMultiplier; |
887 if ( (char)uVoicesVolumeMultiplier > 8 ) | 887 if ( (char)uVoicesVolumeMultiplier > 8 ) |
888 uVoicesVolumeMultiplier = 9; | 888 uVoicesVolumeMultiplier = 9; |
889 GUIWindow::Create(435, 270, 0, 0, (enum WindowType)90, (int)pBtn_SliderRight, v0); | 889 GUIWindow::Create(435, 270, 0, 0, WINDOW_5A, (int)pBtn_SliderRight, v0); |
890 if ( !uVoicesVolumeMultiplier ) | 890 if ( !uVoicesVolumeMultiplier ) |
891 continue; | 891 continue; |
892 pAudioPlayer->PlaySound((SoundID)5788, -1, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0); | 892 pAudioPlayer->PlaySound((SoundID)5788, -1, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0); |
893 continue; | 893 continue; |
894 } | 894 } |
941 if ( pCurrentScreen ) | 941 if ( pCurrentScreen ) |
942 pGUIWindow_CurrentMenu->Release(); | 942 pGUIWindow_CurrentMenu->Release(); |
943 pEventTimer->Pause(); | 943 pEventTimer->Pause(); |
944 pAudioPlayer->StopChannels(-1, -1); | 944 pAudioPlayer->StopChannels(-1, -1); |
945 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 945 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); |
946 pBooksWindow = GUIWindow::Create(493u, 355u, 0, 0, (enum WindowType)99, (int)pBtn_Quests, 0); | 946 pBooksWindow = GUIWindow::Create(493u, 355u, 0, 0, WINDOW_63, (int)pBtn_Quests, 0); |
947 bFlashQuestBook = 0; | 947 bFlashQuestBook = 0; |
948 continue; | 948 continue; |
949 case UIMSG_OpenAutonotes: | 949 case UIMSG_OpenAutonotes: |
950 if ( pMessageQueue_50CBD0->uNumMessages ) | 950 if ( pMessageQueue_50CBD0->uNumMessages ) |
951 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 951 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
952 if ( pCurrentScreen ) | 952 if ( pCurrentScreen ) |
953 pGUIWindow_CurrentMenu->Release(); | 953 pGUIWindow_CurrentMenu->Release(); |
954 pEventTimer->Pause(); | 954 pEventTimer->Pause(); |
955 pAudioPlayer->StopChannels(-1, -1); | 955 pAudioPlayer->StopChannels(-1, -1); |
956 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 956 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); |
957 pBooksWindow = GUIWindow::Create(527u, 353u, 0, 0, (enum WindowType)99, (int)pBtn_Autonotes, 0); | 957 pBooksWindow = GUIWindow::Create(527u, 353u, 0, 0, WINDOW_63, (int)pBtn_Autonotes, 0); |
958 bFlashAutonotesBook = 0; | 958 bFlashAutonotesBook = 0; |
959 continue; | 959 continue; |
960 case UIMSG_OpenMapBook: | 960 case UIMSG_OpenMapBook: |
961 if ( pMessageQueue_50CBD0->uNumMessages ) | 961 if ( pMessageQueue_50CBD0->uNumMessages ) |
962 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 962 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
975 if ( pCurrentScreen ) | 975 if ( pCurrentScreen ) |
976 pGUIWindow_CurrentMenu->Release(); | 976 pGUIWindow_CurrentMenu->Release(); |
977 pEventTimer->Pause(); | 977 pEventTimer->Pause(); |
978 pAudioPlayer->StopChannels(-1, -1); | 978 pAudioPlayer->StopChannels(-1, -1); |
979 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 979 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); |
980 pBooksWindow = GUIWindow::Create(570, 354, 0, 0, (enum WindowType)99, (int)pBtn_Calendar, 0); | 980 pBooksWindow = GUIWindow::Create(570, 354, 0, 0, WINDOW_63, (int)pBtn_Calendar, 0); |
981 continue; | 981 continue; |
982 case UIMSG_OpenHistoryBook: | 982 case UIMSG_OpenHistoryBook: |
983 if ( pMessageQueue_50CBD0->uNumMessages ) | 983 if ( pMessageQueue_50CBD0->uNumMessages ) |
984 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 984 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
985 if ( pCurrentScreen ) | 985 if ( pCurrentScreen ) |
986 pGUIWindow_CurrentMenu->Release(); | 986 pGUIWindow_CurrentMenu->Release(); |
987 pEventTimer->Pause(); | 987 pEventTimer->Pause(); |
988 pAudioPlayer->StopChannels(-1, -1); | 988 pAudioPlayer->StopChannels(-1, -1); |
989 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 989 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); |
990 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)pBtn_History, 0); | 990 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, WINDOW_63, (int)pBtn_History, 0); |
991 bFlashHistoryBook = 0; | 991 bFlashHistoryBook = 0; |
992 continue; | 992 continue; |
993 case UIMSG_Escape:// нажатие Escape and return to game | 993 case UIMSG_Escape:// нажатие Escape and return to game |
994 back_to_game(); | 994 back_to_game(); |
995 if ( pMessageQueue_50CBD0->uNumMessages ) | 995 if ( pMessageQueue_50CBD0->uNumMessages ) |
1494 } | 1494 } |
1495 pWindow3 = pGUIWindow_Settings; | 1495 pWindow3 = pGUIWindow_Settings; |
1496 if ( !pGUIWindow_Settings )//Draw Menu | 1496 if ( !pGUIWindow_Settings )//Draw Menu |
1497 { | 1497 { |
1498 dword_6BE138 = -1; | 1498 dword_6BE138 = -1; |
1499 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)pBtn_GameSettings, v0); | 1499 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, WINDOW_5A, (int)pBtn_GameSettings, v0); |
1500 pEventTimer->Pause(); | 1500 pEventTimer->Pause(); |
1501 pAudioPlayer->StopChannels(-1, -1); | 1501 pAudioPlayer->StopChannels(-1, -1); |
1502 ++pIcons_LOD->uTexturePacksCount; | 1502 ++pIcons_LOD->uTexturePacksCount; |
1503 pCurrentScreen = v0; | 1503 pCurrentScreen = v0; |
1504 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | 1504 if ( !pIcons_LOD->uNumPrevLoadedFiles ) |
1505 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | 1505 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; |
1506 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)3, 0, 0); | 1506 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_3, 0, 0); |
1507 uTextureID_Options = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); | 1507 uTextureID_Options = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); |
1508 uTextureID_New1 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); | 1508 uTextureID_New1 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); |
1509 uTextureID_Load1 = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE); | 1509 uTextureID_Load1 = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE); |
1510 uTextureID_Save1 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE); | 1510 uTextureID_Save1 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE); |
1511 uTextureID_Controls1 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE); | 1511 uTextureID_Controls1 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE); |
1512 uTextureID_Resume1 = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); | 1512 uTextureID_Resume1 = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); |
1513 uTextureID_Quit1 = pIcons_LOD->LoadTexture("quit1", TEXTURE_16BIT_PALETTE); | 1513 uTextureID_Quit1 = pIcons_LOD->LoadTexture("quit1", TEXTURE_16BIT_PALETTE); |
1514 pBtn_NewGame = pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x9Bu, 0xD6u, 0x28u, v0, 0, 0x7Cu, 0, 0x4Eu, | 1514 pBtn_NewGame = pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x9Bu, 0xD6u, 0x28u, v0, 0, 0x7Cu, 0, 0x4Eu, |
1515 pGlobalTXT_LocalizationStrings[614],// "New Game" | 1515 pGlobalTXT_LocalizationStrings[614],// "New Game" |
1516 (Texture *)(uTextureID_New1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_New1] : 0), 0); | 1516 pIcons_LOD->GetTexture(uTextureID_New1), 0); |
1517 pBtn_SaveGame = pGUIWindow_CurrentMenu->CreateButton(0x13u, 0xD1u, 0xD6u, 0x28u, v0, 0, 0x7Eu, 0, 0x53u, | 1517 pBtn_SaveGame = pGUIWindow_CurrentMenu->CreateButton(0x13u, 0xD1u, 0xD6u, 0x28u, v0, 0, 0x7Eu, 0, 0x53u, |
1518 pGlobalTXT_LocalizationStrings[615],// "Save Game" | 1518 pGlobalTXT_LocalizationStrings[615],// "Save Game" |
1519 (Texture *)(uTextureID_Save1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Save1] : 0), 0); | 1519 pIcons_LOD->GetTexture(uTextureID_Save1), 0); |
1520 pBtn_LoadGame = pGUIWindow_CurrentMenu->CreateButton(19, 263, 0xD6u, 0x28u, v0, 0, 0x7Du, 0, 0x4Cu, | 1520 pBtn_LoadGame = pGUIWindow_CurrentMenu->CreateButton(19, 263, 0xD6u, 0x28u, v0, 0, 0x7Du, 0, 0x4Cu, |
1521 pGlobalTXT_LocalizationStrings[616],// "Load Game" | 1521 pGlobalTXT_LocalizationStrings[616],// "Load Game" |
1522 (Texture *)(uTextureID_Load1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Load1] : 0), 0); | 1522 pIcons_LOD->GetTexture(uTextureID_Load1), 0); |
1523 pBtn_GameControls = pGUIWindow_CurrentMenu->CreateButton(241, 155, 214, 40, v0, 0, 0x7Fu, 0, 0x43u, | 1523 pBtn_GameControls = pGUIWindow_CurrentMenu->CreateButton(241, 155, 214, 40, v0, 0, 0x7Fu, 0, 0x43u, |
1524 pGlobalTXT_LocalizationStrings[617],// ""Sound, Keyboard, Game Options:"" | 1524 pGlobalTXT_LocalizationStrings[617],// ""Sound, Keyboard, Game Options:"" |
1525 (Texture *)(uTextureID_Controls1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Controls1] : 0), 0); | 1525 pIcons_LOD->GetTexture(uTextureID_Controls1), 0); |
1526 pBtn_QuitGame = pGUIWindow_CurrentMenu->CreateButton(241, 209, 214, 40, v0, 0, 0x84u, 0, 0x51u, | 1526 pBtn_QuitGame = pGUIWindow_CurrentMenu->CreateButton(241, 209, 214, 40, v0, 0, 0x84u, 0, 0x51u, |
1527 pGlobalTXT_LocalizationStrings[618],// "Quit" | 1527 pGlobalTXT_LocalizationStrings[618],// "Quit" |
1528 (Texture *)(uTextureID_Quit1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Quit1] : 0), 0); | 1528 pIcons_LOD->GetTexture(uTextureID_Quit1), 0); |
1529 pBtn_Resume = pGUIWindow_CurrentMenu->CreateButton(241, 263, 214, 40, v0, 0, 0x7Bu, 0, 0x52u, | 1529 pBtn_Resume = pGUIWindow_CurrentMenu->CreateButton(241, 263, 214, 40, v0, 0, 0x7Bu, 0, 0x52u, |
1530 pGlobalTXT_LocalizationStrings[619],// "Return to Game" | 1530 pGlobalTXT_LocalizationStrings[619],// "Return to Game" |
1531 (Texture *)(uTextureID_Resume1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Resume1] : 0), 0); | 1531 pIcons_LOD->GetTexture(uTextureID_Resume1), 0); |
1532 pGUIWindow_CurrentMenu->_41D08F(6, v0, 0, 0); | 1532 pGUIWindow_CurrentMenu->_41D08F(6, v0, 0, 0); |
1533 viewparams->field_48 = v0; | 1533 viewparams->field_48 = v0; |
1534 stru_506E40.Release(); | 1534 stru_506E40.Release(); |
1535 uNumSeconds = (unsigned int)MakeScreenshot(155, 117); | 1535 uNumSeconds = (unsigned int)MakeScreenshot(155, 117); |
1536 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117); | 1536 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117); |
1549 sub_41426F(); | 1549 sub_41426F(); |
1550 continue; | 1550 continue; |
1551 case UIMSG_ScrollNPCPanel://Right and Left button for NPCPanel | 1551 case UIMSG_ScrollNPCPanel://Right and Left button for NPCPanel |
1552 if ( uMessageParam ) | 1552 if ( uMessageParam ) |
1553 { | 1553 { |
1554 GUIWindow::Create(626, 179, 0, 0, (enum WindowType)90, (int)pBtn_NPCRight, 0); | 1554 GUIWindow::Create(626, 179, 0, 0, WINDOW_5A, (int)pBtn_NPCRight, 0); |
1555 v37 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + (unsigned __int8)pParty->field_70A - 2; | 1555 v37 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + (unsigned __int8)pParty->field_70A - 2; |
1556 if ( (unsigned __int8)pParty->field_709 < v37 ) | 1556 if ( (unsigned __int8)pParty->field_709 < v37 ) |
1557 { | 1557 { |
1558 ++pParty->field_709;//??? maybe number of the first cell??? | 1558 ++pParty->field_709;//??? maybe number of the first cell??? |
1559 if ( (unsigned __int8)pParty->field_709 >= v37 ) | 1559 if ( (unsigned __int8)pParty->field_709 >= v37 ) |
1560 pParty->field_709 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + pParty->field_70A - 2; | 1560 pParty->field_709 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + pParty->field_70A - 2; |
1561 } | 1561 } |
1562 } | 1562 } |
1563 else | 1563 else |
1564 { | 1564 { |
1565 GUIWindow::Create(469, 179, 0, 0, (enum WindowType)90, (int)pBtn_NPCLeft, 0); | 1565 GUIWindow::Create(469, 179, 0, 0, WINDOW_5A, (int)pBtn_NPCLeft, 0); |
1566 if ( pParty->field_709 ) | 1566 if ( pParty->field_709 ) |
1567 { | 1567 { |
1568 --pParty->field_709; | 1568 --pParty->field_709; |
1569 if ( pParty->field_709 < 1 ) | 1569 if ( pParty->field_709 < 1 ) |
1570 pParty->field_709 = 0; | 1570 pParty->field_709 = 0; |
1927 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 1927 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
1928 ++pMessageQueue_50CBD0->uNumMessages; | 1928 ++pMessageQueue_50CBD0->uNumMessages; |
1929 }*/ | 1929 }*/ |
1930 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v0, 0); | 1930 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v0, 0); |
1931 continue; | 1931 continue; |
1932 case UIMSG_C3: | 1932 |
1933 case UIMSG_OnCastTownPortal: | |
1933 pAudioPlayer->StopChannels(-1, -1); | 1934 pAudioPlayer->StopChannels(-1, -1); |
1934 v162 = uMessageParam; | 1935 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, WINDOW_TownPortal, uMessageParam); |
1935 v148 = 195; | 1936 continue; |
1936 //goto LABEL_438; | 1937 |
1937 pWindowType = (WindowType)9; | |
1938 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, pWindowType, v148, v162); | |
1939 continue; | |
1940 case UIMSG_B1: | 1938 case UIMSG_B1: |
1941 pAudioPlayer->StopChannels(-1, -1); | 1939 pAudioPlayer->StopChannels(-1, -1); |
1942 v162 = 0; | 1940 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, 117, 0); |
1943 v148 = 177; | 1941 continue; |
1944 //LABEL_438: | 1942 |
1945 pWindowType = (WindowType)9; | |
1946 //LABEL_439: | |
1947 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, pWindowType, v148, v162); | |
1948 continue; | |
1949 case UIMSG_B2: | 1943 case UIMSG_B2: |
1950 v165 = 0; | 1944 v165 = 0; |
1951 v151 = 0; | 1945 v151 = 0; |
1952 v144 = 0; | 1946 v144 = 0; |
1953 v139 = 0; | 1947 v139 = 0; |
2136 } | 2130 } |
2137 v67 = pGUIWindow_CurrentMenu->Hint; | 2131 v67 = pGUIWindow_CurrentMenu->Hint; |
2138 if ( v67 ) | 2132 if ( v67 ) |
2139 *((int *)v67 + 17) = v0; | 2133 *((int *)v67 + 17) = v0; |
2140 else | 2134 else |
2141 pParty->pPlayers[(unsigned __int8)byte_50C0C0].CanCastSpell(0x14u); | 2135 pParty->pPlayers[(unsigned __int8)town_portal_caster_id].CanCastSpell(0x14u); |
2142 //LABEL_434: | 2136 //LABEL_434: |
2143 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 2137 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
2144 { | 2138 { |
2145 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 2139 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; |
2146 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0; | 2140 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0; |
2456 { | 2450 { |
2457 v1 = ""; | 2451 v1 = ""; |
2458 v0 = 1; | 2452 v0 = 1; |
2459 continue; | 2453 continue; |
2460 } | 2454 } |
2461 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)104, uMessageParam, 0); | 2455 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, WINDOW_68, uMessageParam, 0); |
2462 pCurrentScreen = SCREEN_19; | 2456 pCurrentScreen = SCREEN_19; |
2463 pEventTimer->Pause(); | 2457 pEventTimer->Pause(); |
2464 continue; | 2458 continue; |
2465 case UIMSG_1B: | 2459 case UIMSG_1B: |
2466 if ( !uActiveCharacter ) | 2460 if ( !uActiveCharacter ) |
2541 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" | 2535 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" |
2542 ShowStatusBarString(v96, 2); | 2536 ShowStatusBarString(v96, 2); |
2543 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); | 2537 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); |
2544 continue; | 2538 continue; |
2545 } | 2539 } |
2546 GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, (enum WindowType)90, | 2540 GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, WINDOW_5A, |
2547 (int)pButton_RestUI_Wait5Minutes, (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes" | 2541 (int)pButton_RestUI_Wait5Minutes, (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes" |
2548 dword_506F14 = v0; | 2542 dword_506F14 = v0; |
2549 _506F18_num_hours_to_sleep = 5; | 2543 _506F18_num_hours_to_sleep = 5; |
2550 continue; | 2544 continue; |
2551 case UIMSG_Wait1Hour: | 2545 case UIMSG_Wait1Hour: |
2555 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" | 2549 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" |
2556 ShowStatusBarString(v96, 2); | 2550 ShowStatusBarString(v96, 2); |
2557 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); | 2551 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); |
2558 continue; | 2552 continue; |
2559 } | 2553 } |
2560 GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, (enum WindowType)90, | 2554 GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, WINDOW_5A, |
2561 (int)pButton_RestUI_Wait1Hour, (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour" | 2555 (int)pButton_RestUI_Wait1Hour, (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour" |
2562 dword_506F14 = v0; | 2556 dword_506F14 = v0; |
2563 _506F18_num_hours_to_sleep = 60; | 2557 _506F18_num_hours_to_sleep = 60; |
2564 continue; | 2558 continue; |
2565 case UIMSG_OpenRestUI: | 2559 case UIMSG_OpenRestUI: |
2733 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" | 2727 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" |
2734 ShowStatusBarString(v96, 2); | 2728 ShowStatusBarString(v96, 2); |
2735 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); | 2729 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); |
2736 continue; | 2730 continue; |
2737 } | 2731 } |
2738 GUIWindow::Create(pButton_RestUI_WaitUntilDawn->uX, pButton_RestUI_WaitUntilDawn->uY, 0, 0, (enum WindowType)90, | 2732 GUIWindow::Create(pButton_RestUI_WaitUntilDawn->uX, pButton_RestUI_WaitUntilDawn->uY, 0, 0, WINDOW_5A, |
2739 (int)pButton_RestUI_WaitUntilDawn, (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn" | 2733 (int)pButton_RestUI_WaitUntilDawn, (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn" |
2740 v97 = sub_494820(pParty->uCurrentHour); | 2734 v97 = sub_494820(pParty->uCurrentHour); |
2741 dword_506F14 = v0; | 2735 dword_506F14 = v0; |
2742 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; | 2736 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; |
2743 continue; | 2737 continue; |
2781 sub_41C0B8_set_status_string(pTmpBuf); | 2775 sub_41C0B8_set_status_string(pTmpBuf); |
2782 //goto LABEL_91; | 2776 //goto LABEL_91; |
2783 v0 = 1; | 2777 v0 = 1; |
2784 continue; | 2778 continue; |
2785 case UIMSG_58: | 2779 case UIMSG_58: |
2786 GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, (enum WindowType)90, (int)pBtn_InstallRemoveSpell, 0); | 2780 GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, WINDOW_5A, (int)pBtn_InstallRemoveSpell, 0); |
2787 if ( !uActiveCharacter ) | 2781 if ( !uActiveCharacter ) |
2788 continue; | 2782 continue; |
2789 pPlayer10 = pPlayers[uActiveCharacter]; | 2783 pPlayer10 = pPlayers[uActiveCharacter]; |
2790 if ( !byte_506550 || !quick_spell_at_page ) | 2784 if ( !byte_506550 || !quick_spell_at_page ) |
2791 { | 2785 { |
2960 if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery ) | 2954 if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery ) |
2961 { | 2955 { |
2962 if ( !pCurrentScreen ) | 2956 if ( !pCurrentScreen ) |
2963 //goto LABEL_693; | 2957 //goto LABEL_693; |
2964 { | 2958 { |
2965 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)pBtn_CastSpell, 0); | 2959 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, WINDOW_5A, (int)pBtn_CastSpell, 0); |
2966 pCurrentScreen = SCREEN_SPELL_BOOK; | 2960 pCurrentScreen = SCREEN_SPELL_BOOK; |
2967 pEventTimer->Pause(); | 2961 pEventTimer->Pause(); |
2968 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0); | 2962 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); |
2969 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); | 2963 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); |
2970 viewparams->field_48 = v0; | 2964 viewparams->field_48 = v0; |
2971 continue; | 2965 continue; |
2972 } | 2966 } |
2973 if ( pCurrentScreen != SCREEN_REST | 2967 if ( pCurrentScreen != SCREEN_REST |
2975 && (pCurrentScreen <= SCREEN_63 | 2969 && (pCurrentScreen <= SCREEN_63 |
2976 || pCurrentScreen > SCREEN_67) ) | 2970 || pCurrentScreen > SCREEN_67) ) |
2977 { | 2971 { |
2978 pGUIWindow_CurrentMenu->Release(); | 2972 pGUIWindow_CurrentMenu->Release(); |
2979 //LABEL_693: | 2973 //LABEL_693: |
2980 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)pBtn_CastSpell, 0); | 2974 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, WINDOW_5A, (int)pBtn_CastSpell, 0); |
2981 pCurrentScreen = SCREEN_SPELL_BOOK; | 2975 pCurrentScreen = SCREEN_SPELL_BOOK; |
2982 pEventTimer->Pause(); | 2976 pEventTimer->Pause(); |
2983 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0); | 2977 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); |
2984 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); | 2978 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); |
2985 viewparams->field_48 = v0; | 2979 viewparams->field_48 = v0; |
2986 continue; | 2980 continue; |
2987 } | 2981 } |
2988 } | 2982 } |
2999 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, WINDOW_5A, (int)pBtn_QuickReference, 0); | 2993 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, WINDOW_5A, (int)pBtn_QuickReference, 0); |
3000 viewparams->bRedrawGameUI = v0; | 2994 viewparams->bRedrawGameUI = v0; |
3001 pEventTimer->Pause(); | 2995 pEventTimer->Pause(); |
3002 pAudioPlayer->StopChannels(-1, -1); | 2996 pAudioPlayer->StopChannels(-1, -1); |
3003 pCurrentScreen = SCREEN_QUICK_REFERENCE; | 2997 pCurrentScreen = SCREEN_QUICK_REFERENCE; |
3004 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0); | 2998 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_QuickReference, 5, 0); |
3005 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); | 2999 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); |
3006 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, v0, 0, 0x71u, 0, 0, | 3000 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, v0, 0, 0x71u, 0, 0, |
3007 pGlobalTXT_LocalizationStrings[79],// "Exit" | 3001 pGlobalTXT_LocalizationStrings[79],// "Exit" |
3008 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); //, v179); | 3002 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); //, v179); |
3009 continue; | 3003 continue; |
3036 dword_50651C = v0; | 3030 dword_50651C = v0; |
3037 if ( pMouse->GetCursorPos(&v211)->y > 178 ) | 3031 if ( pMouse->GetCursorPos(&v211)->y > 178 ) |
3038 dword_50651C = -1; | 3032 dword_50651C = -1; |
3039 continue; | 3033 continue; |
3040 case UIMSG_A9: | 3034 case UIMSG_A9: |
3041 GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)pBtn_Up, 0); | 3035 GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, WINDOW_5B, (int)pBtn_Up, 0); |
3042 //LABEL_707: | 3036 //LABEL_707: |
3043 dword_506548 = v0; | 3037 dword_506548 = v0; |
3044 continue; | 3038 continue; |
3045 case UIMSG_AA: | 3039 case UIMSG_AA: |
3046 GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)pBtn_Down, 0); | 3040 GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, WINDOW_5B, (int)pBtn_Down, 0); |
3047 //LABEL_709: | 3041 //LABEL_709: |
3048 dword_506544 = v0; | 3042 dword_506544 = v0; |
3049 continue; | 3043 continue; |
3050 case UIMSG_55: | 3044 case UIMSG_55: |
3051 bRingsShownInCharScreen ^= v0; | 3045 bRingsShownInCharScreen ^= v0; |
10177 v9 = pZBuffer; | 10171 v9 = pZBuffer; |
10178 v11 = pTex->uTextureHeight; | 10172 v11 = pTex->uTextureHeight; |
10179 if ( pIcons_LOD->dword_011BA4 && pTex->uDecompressedSize ) | 10173 if ( pIcons_LOD->dword_011BA4 && pTex->uDecompressedSize ) |
10180 v3 = pTex->UnzipPalette(); | 10174 v3 = pTex->UnzipPalette(); |
10181 else | 10175 else |
10182 v3 = pTex->pLevelOfDetail0; | 10176 v3 = pTex->pLevelOfDetail0_prolly_alpha_mask; |
10183 v12 = v3; | 10177 v12 = v3; |
10184 v4 = v3; | 10178 v4 = v3; |
10185 v5 = v9; | 10179 v5 = v9; |
10186 v6 = 0; | 10180 v6 = 0; |
10187 do | 10181 do |
10225 v8 = a2->uTextureWidth; | 10219 v8 = a2->uTextureWidth; |
10226 v9 = a2->uTextureHeight; | 10220 v9 = a2->uTextureHeight; |
10227 if ( pIcons_LOD->dword_011BA4 && a2->uDecompressedSize ) | 10221 if ( pIcons_LOD->dword_011BA4 && a2->uDecompressedSize ) |
10228 v4 = a2->UnzipPalette(); | 10222 v4 = a2->UnzipPalette(); |
10229 else | 10223 else |
10230 v4 = a2->pLevelOfDetail0; | 10224 v4 = a2->pLevelOfDetail0_prolly_alpha_mask; |
10231 v5 = v7; | 10225 v5 = v7; |
10232 do | 10226 do |
10233 { | 10227 { |
10234 v6 = v8; | 10228 v6 = v8; |
10235 do | 10229 do |
10480 return result; | 10474 return result; |
10481 } | 10475 } |
10482 | 10476 |
10483 | 10477 |
10484 //----- (00411150) -------------------------------------------------------- | 10478 //----- (00411150) -------------------------------------------------------- |
10485 char *__cdecl DrawTownPortalScreen() | 10479 void DrawTownPortalScreen() |
10486 { | 10480 { |
10487 signed int v0; // edi@1 | 10481 //signed int v0; // edi@1 |
10488 __int16 v1; // dx@8 | 10482 //__int16 v1; // dx@8 |
10489 POINT *v2; // edi@17 | 10483 //POINT *v2; // edi@17 |
10490 int v3; // edi@17 | 10484 int v3; // edi@17 |
10491 __int16 v4; // dx@24 | 10485 //__int16 v4; // dx@24 |
10492 GUIWindow v6; // [sp+Ch] [bp-64h]@1 | 10486 GUIWindow v6; // [sp+Ch] [bp-64h]@1 |
10493 POINT v7; // [sp+60h] [bp-10h]@17 | 10487 //POINT v7; // [sp+60h] [bp-10h]@17 |
10494 POINT a2; // [sp+68h] [bp-8h]@17 | 10488 POINT a2; // [sp+68h] [bp-8h]@17 |
10495 | 10489 |
10496 pRenderer->ClearZBuffer(0, 479); | 10490 pRenderer->ClearZBuffer(0, 479); |
10497 pRenderer->DrawTextureTransparent(8u, 8u, pTexture_CurrentBook); | 10491 pRenderer->DrawTextureTransparent(8, 8, pTexture_CurrentBook); |
10498 pRenderer->DrawTextureTransparent( | 10492 pRenderer->DrawTextureTransparent(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); |
10499 0x1D7u, | 10493 |
10500 0x1BDu, | |
10501 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0)); | |
10502 v6.uFrameX = 8; | 10494 v6.uFrameX = 8; |
10503 v6.uFrameY = 8; | 10495 v6.uFrameY = 8; |
10504 v6.uFrameWidth = 460; | 10496 v6.uFrameWidth = 460; |
10505 v6.uFrameHeight = 344; | 10497 v6.uFrameHeight = 344; |
10506 v6.uFrameZ = 467; | 10498 v6.uFrameZ = 467; |
10507 v6.uFrameW = 351; | 10499 v6.uFrameW = 351; |
10508 v0 = 0; | 10500 |
10501 const uint fountain_bits_lut[] = {PARTY_QUEST_FOUNTAIN_HARMONDALE, | |
10502 PARTY_QUEST_FOUNTAIN_PIERPONT, | |
10503 PARTY_QUEST_FOUNTAIN_NIGHON, | |
10504 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE, | |
10505 PARTY_QUEST_FOUNTAIN_CELESTIA, | |
10506 PARTY_QUEST_FOUNTAIN_THE_PIT}; | |
10507 for (uint i = 0; i < 6; ++i) | |
10508 { | |
10509 | |
10510 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[i])) | |
10511 pRenderer->DrawMaskToZBuffer(pTownPortalBook_xs[i], | |
10512 pTownPortalBook_ys[i], | |
10513 pTexture_TownPortalIcons[i], i + 1); | |
10514 } | |
10515 | |
10516 /* v0 = 0; | |
10509 do | 10517 do |
10510 { | 10518 { |
10511 if ( !v0 ) | 10519 if ( !v0 ) |
10512 { | 10520 { |
10513 v1 = 206; | 10521 v1 = 206; |
10540 { | 10548 { |
10541 v1 = 210; | 10549 v1 = 210; |
10542 goto LABEL_14; | 10550 goto LABEL_14; |
10543 } | 10551 } |
10544 LABEL_15: | 10552 LABEL_15: |
10545 pRenderer->_4A612A( | 10553 pRenderer->DrawMaskToZBuffer( |
10546 pTownPortalBook_xs[v0], | 10554 pTownPortalBook_xs[v0], |
10547 pTownPortalBook_ys[v0], | 10555 pTownPortalBook_ys[v0], |
10548 *(&pTexture_TownPortalHarmn + v0), | 10556 *(&pTexture_TownPortalHarmn + v0), |
10549 v0 + 1); | 10557 v0 + 1); |
10550 LABEL_16: | 10558 LABEL_16: |
10551 ++v0; | 10559 ++v0; |
10552 } | 10560 } |
10553 while ( v0 < 6 ); | 10561 while ( v0 < 6 );*/ |
10554 v2 = pMouse->GetCursorPos(&a2); | 10562 |
10555 v3 = pRenderer->pActiveZBuffer[v2->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v7)->y]] & 0xFFFF; | 10563 pMouse->GetCursorPos(&a2); |
10556 if ( !v3 ) // Town Portal | 10564 //v2 = pMouse->GetCursorPos(&a2); |
10557 return v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u); | 10565 v3 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF; |
10566 | |
10567 if (v3) | |
10568 { | |
10569 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[v3 - 1])) | |
10570 pRenderer->DrawTextureIndexed(pTownPortalBook_xs[v3 - 1], pTownPortalBook_ys[v3 - 1], pTexture_TownPortalIcons[v3 - 1]); | |
10571 } | |
10572 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u); | |
10573 | |
10574 | |
10575 /* if ( !v3 ) // Town Portal | |
10576 { | |
10577 v6.DrawTitleText(pBook2Font, 0, 22, 0, pGlobalTXT_LocalizationStrings[10], 3); // "Town Portal" | |
10578 return; | |
10579 } | |
10558 if ( v3 == 1 ) | 10580 if ( v3 == 1 ) |
10559 { | 10581 { |
10560 v4 = 206; | 10582 v4 = 206; |
10561 LABEL_30: | 10583 LABEL_30: |
10562 if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v4) ) | 10584 if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v4) ) |
10563 goto LABEL_31; | 10585 goto LABEL_31; |
10564 return v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u); | 10586 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u); // "Town Portal" |
10587 return; | |
10565 } | 10588 } |
10566 if ( v3 == 2 ) | 10589 if ( v3 == 2 ) |
10567 { | 10590 { |
10568 v4 = 208; | 10591 v4 = 208; |
10569 goto LABEL_30; | 10592 goto LABEL_30; |
10588 v4 = 210; | 10611 v4 = 210; |
10589 goto LABEL_30; | 10612 goto LABEL_30; |
10590 } | 10613 } |
10591 LABEL_31: | 10614 LABEL_31: |
10592 pRenderer->DrawTextureIndexed(word_4E1D3A[v3], pTownPortalBook_xs[v3 + 5], *(&pTex_tab_an_6b__zoom_on + v3)); | 10615 pRenderer->DrawTextureIndexed(word_4E1D3A[v3], pTownPortalBook_xs[v3 + 5], *(&pTex_tab_an_6b__zoom_on + v3)); |
10593 return v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u); | 10616 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);*/ |
10594 } | 10617 } |
10595 // 4E1D3A: using guessed type __int16 word_4E1D3A[]; | 10618 // 4E1D3A: using guessed type __int16 word_4E1D3A[]; |
10596 | 10619 |
10597 | 10620 |
10598 //----- (00413D3C) -------------------------------------------------------- | 10621 //----- (00413D3C) -------------------------------------------------------- |