annotate MMT.cpp @ 2294:815d9ecf9881

Merge
author Grumpy7
date Sun, 16 Mar 2014 19:43:28 +0100
parents d65414f65bd4
children 6fd03869f65c
rev   line source
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
1 #define _CRT_SECURE_NO_WARNINGS
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
2
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
3 #include "MMT.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
4 #include "GUIWindow.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
5 #include "mm7_unsorted_subs.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
6 #include "mm7_data.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
7 #include "AudioPlayer.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
8 #include "Mouse.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
9 #include "LOD.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
10 #include "Render.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
11 #include "VideoPlayer.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
12 #include "CShow.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
13 #include "GUIFont.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
14
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
15 void ShowLogoVideo()
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
16 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
17 RGBTexture tex; // [sp+Ch] [bp-30h]@1
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
18 //unsigned int uTrackStartMS; // [sp+34h] [bp-8h]@8
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
19 //unsigned int uTrackEndMS; // [sp+38h] [bp-4h]@8
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
20
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
21 pVideoPlayer->bStopBeforeSchedule = false;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
22 pVideoPlayer->pResetflag = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
23 bGameoverLoop = 1;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
24 if (!bNoVideo)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
25 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
26 pRenderer->PresentBlackScreen();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
27 PlayFullscreenMovie(MOVIE_3DOLogo, true);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
28 if ( !pVideoPlayer->bStopBeforeSchedule )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
29 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
30 PlayFullscreenMovie(MOVIE_NWCLogo, true);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
31 if ( !pVideoPlayer->bStopBeforeSchedule )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
32 PlayFullscreenMovie(MOVIE_JVC, true);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
33 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
34 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
35 char pContainerName[64];
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
36
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
37 sprintf(pContainerName, "data\\New_Icons/%s", "MMTTITLE.pcx");
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
38 tex.LoadPCXFile(pContainerName, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
39
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
40 pRenderer->BeginScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
41 pRenderer->DrawTextureRGB(0, 0, &tex);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
42 free(tex.pPixels);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
43 tex.pPixels = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
44 MainMenuUI_LoadFontsAndSomeStuff();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
45 DrawMMTCopyrightWindow();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
46
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
47 pRenderer->EndScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
48 pRenderer->Present();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
49
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
50 #ifndef _DEBUG
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
51 Sleep(1500); // let the copyright window stay for a while
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
52 #endif
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
53
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
54 /*if (!bNoSound && pAudioPlayer->hAILRedbook )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
55 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
56 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0));
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
57 AIL_redbook_stop(pAudioPlayer->hAILRedbook);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
58 AIL_redbook_track_info(pAudioPlayer->hAILRedbook, 14, &uTrackStartMS, &uTrackEndMS);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
59 AIL_redbook_play(pAudioPlayer->hAILRedbook, uTrackStartMS + 1, uTrackEndMS);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
60 } */
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
61 bGameoverLoop = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
62 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
63
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
64 void MMT_MainMenu_Loop()
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
65 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
66 GUIButton *pButton; // eax@27
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
67 unsigned int pControlParam; // ecx@35
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
68 int v10; // ecx@36
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
69 int v11; // ecx@37
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
70 unsigned int pX;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
71 unsigned int pY; // [sp-18h] [bp-54h]@39
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
72 Texture *pTexture; // [sp-14h] [bp-50h]@39
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
73 GUIButton *pButton2; // [sp+0h] [bp-3Ch]@27
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
74
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
75 pCurrentScreen = SCREEN_GAME;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
76
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
77 pGUIWindow2 = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
78 pAudioPlayer->StopChannels(-1, -1);//остановить/подготовить канал
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
79 pMouse->RemoveHoldingItem();//избавить курсор от вещи
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
80
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
81 pIcons_LOD->_inlined_sub2();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
82
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
83 pWindow_MMT_MainMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_MainMenu, 0, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
84 Texture* MMT_MM6 = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
85 Texture* MMT_MM7 = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
86 Texture* MMT_MM8 = pIcons_LOD->LoadTexturePtr("title_cred", TEXTURE_16BIT_PALETTE);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
87 Texture* MMT_Continue = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
88 Texture* MMT_Exit = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
89
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
90 pMMT_MainMenu_BtnMM6 = pWindow_MMT_MainMenu->CreateButton((window->GetWidth() / 4) - 100, window->GetHeight() / 4, MMT_MM6->uTextureWidth, MMT_MM6->uTextureHeight, 1, 0, UIMSG_MMT_MainMenu_MM6, 0, 0, "", MMT_MM6, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
91 pMMT_MainMenu_BtnMM7 = pWindow_MMT_MainMenu->CreateButton(window->GetWidth() - (window->GetWidth() / 4), window->GetHeight() / 4, MMT_MM7->uTextureWidth, MMT_MM7->uTextureHeight, 1, 0, UIMSG_MMT_MainMenu_MM7, 1, 0, "", MMT_MM7, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
92 pMMT_MainMenu_BtnMM8 = pWindow_MMT_MainMenu->CreateButton(window->GetWidth() - (window->GetWidth() / 4), window->GetHeight() - ((window->GetHeight() / 4) + 50), MMT_MM8->uTextureWidth, MMT_MM8->uTextureHeight, 1, 0, UIMSG_MMT_MainMenu_MM8, 2, 0, "", MMT_MM8, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
93 pMMT_MainMenu_BtnContinue = pWindow_MMT_MainMenu->CreateButton((window->GetWidth() / 4) - 100, window->GetHeight() - ((window->GetHeight() / 4) + 50), MMT_Continue->uTextureWidth, MMT_Continue->uTextureHeight, 1, 0, UIMSG_MMT_MainMenu_Continue, 3, 0, "", MMT_Continue, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
94 pMMT_MainMenu_BtnExit = pWindow_MMT_MainMenu->CreateButton(window->GetWidth() - 130, window->GetHeight() - 35, MMT_Exit->uTextureWidth, MMT_Exit->uTextureHeight, 1, 0, UIMSG_ExitToWindows, 4, 0, "", MMT_Exit, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
95
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
96 pTexture_PCX.Release();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
97
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
98 char pContainerName[64];
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
99
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
100 sprintf(pContainerName, "data\\New_Icons/%s", "MMTTITLE.pcx");
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
101 pTexture_PCX.LoadPCXFile(pContainerName, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
102 SetCurrentMenuID(MENU_MMT_MAIN_MENU);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
103 SetForegroundWindow(window->GetApiHandle());
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
104 SendMessageW(window->GetApiHandle(), WM_ACTIVATEAPP, 1, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
105 while (GetCurrentMenuID() == MENU_MMT_MAIN_MENU )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
106 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
107 POINT cursor;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
108 pMouse->GetCursorPos(&cursor);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
109
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
110 for (MSG msg; PeekMessageW(&msg, 0, 0, 0, PM_REMOVE);)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
111 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
112 if (msg.message == WM_QUIT)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
113 Game_DeinitializeAndTerminate(0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
114 TranslateMessage(&msg);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
115 DispatchMessageW(&msg);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
116 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
117
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
118 if (dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
119 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
120 WaitMessage();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
121 continue;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
122 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
123
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
124 pRenderer->BeginScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
125 pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
126
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
127 MMT_MenuMessageProc();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
128 GUI_UpdateWindows();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
129
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
130 if ( !pModalWindow )// ???
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
131 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
132 pButton = pWindow_MMT_MainMenu->pControlsHead;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
133 for ( pButton = pWindow_MMT_MainMenu->pControlsHead; pButton; pButton = pButton->pNext )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
134 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
135 if ( cursor.x >= (signed int)pButton->uX && cursor.x <= (signed int)pButton->uZ
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
136 && cursor.y >= (signed int)pButton->uY && cursor.y <= (signed int)pButton->uW )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
137 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
138 pControlParam = pButton->msg_param;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
139 switch (pControlParam) // подсветка кнопок
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
140 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
141 case 0:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
142 pTexture = MMT_MM6;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
143 pX = (window->GetWidth() / 4) - 100;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
144 pY = window->GetHeight() / 4;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
145 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
146 case 1:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
147 pTexture = MMT_MM7;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
148 pX = window->GetWidth() - (window->GetWidth() / 4);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
149 pY = window->GetHeight() / 4;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
150 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
151 case 2:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
152 pTexture = MMT_MM8;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
153 pX = window->GetWidth() - (window->GetWidth() / 4);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
154 pY = window->GetHeight() - ((window->GetHeight() / 4) + 50);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
155 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
156 case 3:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
157 pTexture = MMT_Continue;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
158 pX = (window->GetWidth() / 4) - 100;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
159 pY = window->GetHeight() - ((window->GetHeight() / 4) + 50);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
160 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
161 case 4:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
162 pTexture = MMT_Exit;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
163 pX = window->GetWidth() - 130;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
164 pY = window->GetHeight() - 35;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
165 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
166 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
167 pRenderer->DrawTextureIndexed(pX, pY, pTexture); //подсветка кнопок
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
168 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
169 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
170 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
171 //}
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
172 pRenderer->EndScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
173 pRenderer->Present();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
174 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
175 MMT_MenuMessageProc();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
176 pRenderer->BeginScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
177 GUI_UpdateWindows();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
178 pRenderer->EndScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
179 pRenderer->Present();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
180 pTexture_PCX.Release();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
181 if ( pGUIWindow2 )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
182 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
183 pGUIWindow2->Release();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
184 pGUIWindow2 = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
185 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
186 pWindow_MMT_MainMenu->Release();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
187 pIcons_LOD->RemoveTexturesPackFromTextureList();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
188 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
189
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
190 void MMT_MenuMessageProc()
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
191 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
192 int pParam;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
193 int pParam2;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
194 UIMessageType pUIMessageType;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
195
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
196 if ( pMessageQueue_50CBD0->uNumMessages )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
197 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
198 do
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
199 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
200
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
201 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &pParam, &pParam2);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
202
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
203 switch (pUIMessageType)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
204 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
205 case UIMSG_MMT_MainMenu_MM7: //кнопка игры ММ7
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
206 //GUIWindow::Create(495, 172, 0, 0, WINDOW_PressedButton2, (int)pMainMenu_BtnNew, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
207 ShowMM7IntroVideo_and_LoadingScreen();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
208 SetCurrentMenuID(MENU_MAIN);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
209 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
210
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
211 default:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
212 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
213 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
214 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
215 while ( pMessageQueue_50CBD0->uNumMessages );
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
216 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
217 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
218 void DrawMMTCopyrightWindow()
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
219 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
220 GUIWindow Dst; // [sp+8h] [bp-54h]@1
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
221
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
222 memset(&Dst, 0, 0x54u);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
223 Dst.uFrameWidth = 624;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
224 Dst.uFrameHeight = 256;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
225 Dst.uFrameX = 8;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
226 Dst.uFrameY = 30;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
227 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight("Text Verification: Here we can write an explanation of the project", &Dst, 24, 0)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
228 + 2 * LOBYTE(pFontSmallnum->uFontHeight)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
229 + 24;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
230 Dst.uFrameY = 470 - Dst.uFrameHeight;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
231 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
232 Dst.uFrameW = 469;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
233 //Dst.Hint = "abcagfdsgsg ljsrengvlkjesnfkjwnef";
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
234 Dst.DrawMessageBox(0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
235
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
236 Dst.uFrameWidth -= 24;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
237 Dst.uFrameX += 12;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
238 Dst.uFrameY += 12;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
239 Dst.uFrameHeight -= 12;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
240 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
241 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
242 Dst.DrawTitleText(pFontSmallnum, 0, 0xCu, ui_mainmenu_copyright_color, "Text Verification: Here we can write an explanation of the project", 3);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
243 }