annotate MMT.cpp @ 2428:c99c99439f6c

Merge
author a.parshin
date Wed, 23 Jul 2014 13:32:09 +0300
parents 94393b73d333 d922225a6081
children 90349b8048a5
rev   line source
2415
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2375
diff changeset
1 #define _CRTDBG_MAP_ALLOC
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2375
diff changeset
2 #include <stdlib.h>
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2375
diff changeset
3 #include <crtdbg.h>
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2375
diff changeset
4
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
5 #define _CRT_SECURE_NO_WARNINGS
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
6
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
7 #include "MMT.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
8 #include "GUIWindow.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
9 #include "mm7_unsorted_subs.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
10 #include "mm7_data.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
11 #include "AudioPlayer.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
12 #include "Mouse.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
13 #include "LOD.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
14 #include "Render.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
15 #include "VideoPlayer.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
16 #include "CShow.h"
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
17 #include "GUIFont.h"
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
18 #include "lib/libpng/png.h"
2315
58be29479e75 add files
Ritor1
parents: 2314
diff changeset
19 #include "MediaPlayer.h"
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
20
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
21 void ShowLogoVideo()
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
22 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
23 RGBTexture tex; // [sp+Ch] [bp-30h]@1
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
24 //unsigned int uTrackStartMS; // [sp+34h] [bp-8h]@8
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
25 //unsigned int uTrackEndMS; // [sp+38h] [bp-4h]@8
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
26
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
27 pVideoPlayer->bStopBeforeSchedule = false;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
28 pVideoPlayer->pResetflag = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
29 bGameoverLoop = 1;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
30 if (!bNoVideo)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
31 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
32 pRenderer->PresentBlackScreen();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
33 PlayFullscreenMovie(MOVIE_3DOLogo, true);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
34 if ( !pVideoPlayer->bStopBeforeSchedule )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
35 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
36 PlayFullscreenMovie(MOVIE_NWCLogo, true);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
37 if ( !pVideoPlayer->bStopBeforeSchedule )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
38 PlayFullscreenMovie(MOVIE_JVC, true);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
39 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
40 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
41 char pContainerName[64];
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
42
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
43 sprintf(pContainerName, "data\\New_Icons/%s", "MMTTITLE.pcx");
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
44 tex.LoadPCXFile(pContainerName, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
45
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
46 pRenderer->BeginScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
47 pRenderer->DrawTextureRGB(0, 0, &tex);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
48 free(tex.pPixels);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
49 tex.pPixels = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
50 MainMenuUI_LoadFontsAndSomeStuff();
2375
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
51 DrawMMTCopyrightWindow();//Текстовое сообщение ММТ меню
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
52
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
53 pRenderer->EndScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
54 pRenderer->Present();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
55
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
56 #ifndef _DEBUG
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
57 Sleep(1500); // let the copyright window stay for a while
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
58 #endif
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
59
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
60 /*if (!bNoSound && pAudioPlayer->hAILRedbook )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
61 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
62 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0));
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
63 AIL_redbook_stop(pAudioPlayer->hAILRedbook);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
64 AIL_redbook_track_info(pAudioPlayer->hAILRedbook, 14, &uTrackStartMS, &uTrackEndMS);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
65 AIL_redbook_play(pAudioPlayer->hAILRedbook, uTrackStartMS + 1, uTrackEndMS);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
66 } */
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
67 bGameoverLoop = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
68 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
69
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
70 void abort_(const char * s, ...)
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
71 {
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
72 va_list args;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
73 va_start(args, s);
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
74 vfprintf(stderr, s, args);
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
75 fprintf(stderr, "\n");
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
76 va_end(args);
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
77 abort();
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
78 }
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
79
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
80 Texture *LoadPNG(const char *name)
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
81 {
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
82 int x, y;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
83 int width, height;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
84 png_byte color_type;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
85 png_byte bit_depth;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
86 png_structp png_ptr;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
87 png_infop info_ptr;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
88 int number_of_passes;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
89 png_bytep * row_pointers;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
90 uint i = 0;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
91 Texture *tex;
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
92
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
93 char header[8]; // 8 is the maximum size that can be checked
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
94
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
95 /* open file and test for it being a png */
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
96 FILE *fp = fopen(name, "rb");
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
97 if (!fp)
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
98 abort_("[read_png_file] File %s could not be opened for reading", name);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
99 fread(header, 1, 8, fp);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
100 if (png_sig_cmp((png_bytep)header, 0, 8))
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
101 abort_("[read_png_file] File %s is not recognized as a PNG file", name);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
102 /* initialize stuff */
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
103 png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
104
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
105 if (!png_ptr)
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
106 abort_("[read_png_file] png_create_read_struct failed");
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
107 info_ptr = png_create_info_struct(png_ptr);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
108 if (!info_ptr)
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
109 abort_("[read_png_file] png_create_info_struct failed");
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
110
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
111 if (setjmp(png_jmpbuf(png_ptr)))
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
112 abort_("[read_png_file] Error during init_io");
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
113
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
114 png_init_io(png_ptr, fp);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
115 png_set_sig_bytes(png_ptr, 8);
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
116
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
117 png_read_info(png_ptr, info_ptr);
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
118
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
119 width = png_get_image_width(png_ptr, info_ptr);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
120 height = png_get_image_height(png_ptr, info_ptr);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
121 color_type = png_get_color_type(png_ptr, info_ptr);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
122 bit_depth = png_get_bit_depth(png_ptr, info_ptr);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
123
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
124 number_of_passes = png_set_interlace_handling(png_ptr);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
125 png_read_update_info(png_ptr, info_ptr);
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
126
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
127 /* read file */
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
128 if (setjmp(png_jmpbuf(png_ptr)))
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
129 abort_("[read_png_file] Error during read_image");
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
130 row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * height);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
131 for (y=0; y<height; y++)
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
132 row_pointers[y] = (png_byte*) malloc(png_get_rowbytes(png_ptr,info_ptr));
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
133
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
134 png_read_image(png_ptr, row_pointers);
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
135
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
136 fclose(fp);
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
137
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
138 tex = new Texture;
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
139 tex->uTextureHeight = height;
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
140 tex->uTextureWidth = width;
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
141 tex->uSizeOfMaxLevelOfDetail = png_get_rowbytes(png_ptr, info_ptr);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
142 tex->uTextureSize = png_get_rowbytes(png_ptr, info_ptr);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
143 tex->uDecompressedSize = png_get_rowbytes(png_ptr, info_ptr);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
144 tex->pPalette16 = (unsigned __int16 *) malloc(sizeof(unsigned __int16) * width * height);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
145 tex->pLevelOfDetail0_prolly_alpha_mask = (unsigned __int8 *) malloc(sizeof(unsigned __int8) * width * height);
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
146
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
147 for (y=0; y<height; y++)
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
148 {
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
149 png_byte* row = row_pointers[y];
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
150 for (x=0; x<width; x++)
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
151 {
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
152 png_byte* ptr = &(row[x*4]);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
153 //Log::Warning(L"Pixel at position [ %d - %d ] has RGBA values: %d - %d - %d - %d\n",
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
154 // x, y, ptr[0], ptr[1], ptr[2], ptr[3]);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
155 png_byte tmp = ptr[2];
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
156 ptr[2] = ptr[0];
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
157 ptr[0] = ptr[3];
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
158 ptr[3] = 255 - tmp;
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
159 tex->pPalette16[i] = Color16(ptr[0], ptr[1], ptr[2]);
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
160 tex->pLevelOfDetail0_prolly_alpha_mask[i] = ptr[3];
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
161 i++;
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
162 }
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
163 }
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
164 //Ritor1: temporarily stopped, needed change RGBTexture structure/Пока приостановлено в связи с необходимостью внести изменения в структуру(создать)RGBTexture
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
165 /*for (int i = 0; i < width * height; ++i)
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
166 tex->pPalette16[i] = 0x7FF;
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
167 memset(tex->pLevelOfDetail0_prolly_alpha_mask, 1, sizeof(unsigned __int8) * width * height);*/
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
168 return tex;
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
169 }
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
170
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
171 void MMT_MainMenu_Loop()
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
172 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
173 GUIButton *pButton; // eax@27
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
174 unsigned int pControlParam; // ecx@35
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
175 unsigned int pX;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
176 unsigned int pY; // [sp-18h] [bp-54h]@39
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
177 Texture *pTexture; // [sp-14h] [bp-50h]@39
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
178 char pContainerName[64];
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
179
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
180 pCurrentScreen = SCREEN_GAME;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
181
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
182 pGUIWindow2 = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
183 pAudioPlayer->StopChannels(-1, -1);//остановить/подготовить канал
2312
4b052671da98 MediaPlayer.cpp
Ritor1
parents: 2308
diff changeset
184
2425
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2415
diff changeset
185 //if (!bNoSound )
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2415
diff changeset
186 //PlayAudio(L"Sounds\\New_Sounds/Stronghold_Theme.mp3");//воспроизводим мп3
2345
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2334
diff changeset
187 //if (!bNoVideo )
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2334
diff changeset
188 //pVideoPlayer->PlayMovie(L"Anims\\New_Video/3DOLOGO.smk");
2312
4b052671da98 MediaPlayer.cpp
Ritor1
parents: 2308
diff changeset
189
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
190 pMouse->RemoveHoldingItem();//избавить курсор от вещи
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
191
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
192 pIcons_LOD->_inlined_sub2();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
193
2375
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
194 //Создание нового окна
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
195 //WINDOW_MainMenu добавлено в GUIWindow.h
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
196 pWindow_MMT_MainMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_MainMenu, 0, 0);
2375
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
197
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
198 //Загрузка кнопок
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
199 //Texture* MMT_MM6 = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE);
2295
6fd03869f65c LoadTexture cleaned and add ConvertPNG function
Ritor1
parents: 2290
diff changeset
200
2375
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
201 sprintf(pContainerName, "data\\New_Icons/%s", "mm6_button_oval.png");//загружаем png из папки
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
202 Texture* MMT_MM6 = LoadPNG(pContainerName);
2347
d57505d3c70c VideoPlayer cleaning
Ritor1
parents: 2345
diff changeset
203
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
204 Texture* MMT_MM7 = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
205 Texture* MMT_MM8 = pIcons_LOD->LoadTexturePtr("title_cred", TEXTURE_16BIT_PALETTE);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
206 Texture* MMT_Continue = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
207 Texture* MMT_Exit = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
208
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
209 pMMT_MainMenu_BtnMM6 = pWindow_MMT_MainMenu->CreateButton(0, 0, MMT_MM6->uTextureWidth, MMT_MM6->uTextureHeight, 1, 0, UIMSG_MMT_MainMenu_MM6, 0, 0, "", MMT_MM6, 0);
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
210 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
211 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
212 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
213 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
214
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
215 pTexture_PCX.Release();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
216
2375
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
217 sprintf(pContainerName, "data\\New_Icons/%s", "MMTTITLE.pcx");//загружаем pcx из папки
2427
94393b73d333 * Some initialization stuff
a.parshin
parents: 2415
diff changeset
218 if (pTexture_PCX.LoadPCXFile(pContainerName, 0) == 1)
94393b73d333 * Some initialization stuff
a.parshin
parents: 2415
diff changeset
219 Error("File not found: %s", pContainerName);
94393b73d333 * Some initialization stuff
a.parshin
parents: 2415
diff changeset
220
2375
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
221 SetCurrentMenuID(MENU_MMT_MAIN_MENU);//Добавлено в enum MENU_STATE в GUIWindows.h
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
222 SetForegroundWindow(window->GetApiHandle());
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
223 SendMessageW(window->GetApiHandle(), WM_ACTIVATEAPP, 1, 0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
224 while (GetCurrentMenuID() == MENU_MMT_MAIN_MENU )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
225 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
226 POINT cursor;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
227 pMouse->GetCursorPos(&cursor);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
228
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
229 for (MSG msg; PeekMessageW(&msg, 0, 0, 0, PM_REMOVE);)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
230 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
231 if (msg.message == WM_QUIT)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
232 Game_DeinitializeAndTerminate(0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
233 TranslateMessage(&msg);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
234 DispatchMessageW(&msg);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
235 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
236
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
237 if (dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
238 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
239 WaitMessage();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
240 continue;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
241 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
242
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
243 pRenderer->BeginScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
244 pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
245
2375
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
246 MMT_MenuMessageProc();//отдельный для ММТ меню обработчик сообщений
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
247 GUI_UpdateWindows();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
248
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
249 if ( !pModalWindow )// ???
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
250 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
251 pButton = pWindow_MMT_MainMenu->pControlsHead;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
252 for ( pButton = pWindow_MMT_MainMenu->pControlsHead; pButton; pButton = pButton->pNext )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
253 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
254 if ( cursor.x >= (signed int)pButton->uX && cursor.x <= (signed int)pButton->uZ
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
255 && cursor.y >= (signed int)pButton->uY && cursor.y <= (signed int)pButton->uW )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
256 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
257 pControlParam = pButton->msg_param;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
258 switch (pControlParam) // подсветка кнопок
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
259 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
260 case 0:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
261 pTexture = MMT_MM6;
2308
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
262 pX = 0;
8a62bd4d51e2 button for MMT_Menu
Ritor1
parents: 2299
diff changeset
263 pY = 0;
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
264 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
265 case 1:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
266 pTexture = MMT_MM7;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
267 pX = window->GetWidth() - (window->GetWidth() / 4);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
268 pY = window->GetHeight() / 4;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
269 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
270 case 2:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
271 pTexture = MMT_MM8;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
272 pX = window->GetWidth() - (window->GetWidth() / 4);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
273 pY = window->GetHeight() - ((window->GetHeight() / 4) + 50);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
274 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
275 case 3:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
276 pTexture = MMT_Continue;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
277 pX = (window->GetWidth() / 4) - 100;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
278 pY = window->GetHeight() - ((window->GetHeight() / 4) + 50);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
279 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
280 case 4:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
281 pTexture = MMT_Exit;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
282 pX = window->GetWidth() - 130;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
283 pY = window->GetHeight() - 35;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
284 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
285 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
286 pRenderer->DrawTextureIndexed(pX, pY, pTexture); //подсветка кнопок
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
287 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
288 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
289 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
290 //}
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
291 pRenderer->EndScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
292 pRenderer->Present();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
293 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
294 MMT_MenuMessageProc();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
295 pRenderer->BeginScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
296 GUI_UpdateWindows();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
297 pRenderer->EndScene();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
298 pRenderer->Present();
2375
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
299
14c05b876218 sqrt(float, double)
Ritor1
parents: 2359
diff changeset
300 //освобождаем ресурсы
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
301 pTexture_PCX.Release();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
302 if ( pGUIWindow2 )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
303 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
304 pGUIWindow2->Release();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
305 pGUIWindow2 = 0;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
306 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
307 pWindow_MMT_MainMenu->Release();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
308 pIcons_LOD->RemoveTexturesPackFromTextureList();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
309 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
310
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
311 void MMT_MenuMessageProc()
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
312 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
313 int pParam;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
314 int pParam2;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
315 UIMessageType pUIMessageType;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
316
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
317 if ( pMessageQueue_50CBD0->uNumMessages )
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
318 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
319 do
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
320 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
321
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
322 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &pParam, &pParam2);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
323
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
324 switch (pUIMessageType)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
325 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
326 case UIMSG_MMT_MainMenu_MM7: //кнопка игры ММ7
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
327 //GUIWindow::Create(495, 172, 0, 0, WINDOW_PressedButton2, (int)pMainMenu_BtnNew, 0);
2359
5b9fb75b6f54 alSourceStop(mSourceID);
Ritor1
parents: 2356
diff changeset
328 alSourceStop(mSourceID);
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
329 ShowMM7IntroVideo_and_LoadingScreen();
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
330 SetCurrentMenuID(MENU_MAIN);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
331 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
332
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
333 default:
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
334 break;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
335 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
336 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
337 while ( pMessageQueue_50CBD0->uNumMessages );
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
338 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
339 }
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
340 void DrawMMTCopyrightWindow()
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
341 {
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
342 GUIWindow Dst; // [sp+8h] [bp-54h]@1
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
343
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
344 memset(&Dst, 0, 0x54u);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
345 Dst.uFrameWidth = 624;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
346 Dst.uFrameHeight = 256;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
347 Dst.uFrameX = 8;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
348 Dst.uFrameY = 30;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
349 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
350 + 2 * LOBYTE(pFontSmallnum->uFontHeight)
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
351 + 24;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
352 Dst.uFrameY = 470 - Dst.uFrameHeight;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
353 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
354 Dst.uFrameW = 469;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
355 //Dst.Hint = "abcagfdsgsg ljsrengvlkjesnfkjwnef";
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
356 Dst.DrawMessageBox(0);
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
357
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
358 Dst.uFrameWidth -= 24;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
359 Dst.uFrameX += 12;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
360 Dst.uFrameY += 12;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
361 Dst.uFrameHeight -= 12;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
362 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
363 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents:
diff changeset
364 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
365 }