Mercurial > mm7
comparison UI/UIMainMenu.cpp @ 1583:75fafd8ced59
Allocator (CMemory) bye-bye
author | Nomad |
---|---|
date | Tue, 10 Sep 2013 21:07:07 +0200 |
parents | 19f1735fca80 |
children | 8094f1706b1f d17247968bd6 |
comparison
equal
deleted
inserted
replaced
1577:1b6217e07b26 | 1583:75fafd8ced59 |
---|---|
8 #include "..\GUIWindow.h" | 8 #include "..\GUIWindow.h" |
9 #include "..\GUIFont.h" | 9 #include "..\GUIFont.h" |
10 #include "..\AudioPlayer.h" | 10 #include "..\AudioPlayer.h" |
11 #include "..\Render.h" | 11 #include "..\Render.h" |
12 #include "..\LOD.h" | 12 #include "..\LOD.h" |
13 #include "..\Allocator.h" | |
14 #include "..\PaletteManager.h" | 13 #include "..\PaletteManager.h" |
15 #include "..\IconFrameTable.h" | 14 #include "..\IconFrameTable.h" |
16 #include "..\texts.h" | 15 #include "..\texts.h" |
17 | 16 |
18 #include "..\mm7_data.h" | 17 #include "..\mm7_data.h" |
288 | 287 |
289 pTexture2.uWidth = 250; | 288 pTexture2.uWidth = 250; |
290 pHeight = pFont2->GetStringHeight2(pFont, v1, &a2, 0, 1); | 289 pHeight = pFont2->GetStringHeight2(pFont, v1, &a2, 0, 1); |
291 pTexture2.uHeight = pHeight + 2 * a2.uFrameHeight; | 290 pTexture2.uHeight = pHeight + 2 * a2.uFrameHeight; |
292 pTexture2.uNumPixels = (signed __int16)pTexture2.uWidth * (signed __int16)pTexture2.uHeight; | 291 pTexture2.uNumPixels = (signed __int16)pTexture2.uWidth * (signed __int16)pTexture2.uHeight; |
293 v7 = pAllocator->AllocNamedChunk(pTexture2.pPixels, 2 * pTexture2.uNumPixels, "scrollermap"); | 292 v7 = malloc(2 * pTexture2.uNumPixels);//, "scrollermap"); |
294 pNumPixels = pTexture2.uNumPixels; | 293 pNumPixels = pTexture2.uNumPixels; |
295 pTexture2.pPixels = (unsigned __int16 *)v7; | 294 pTexture2.pPixels = (unsigned __int16 *)v7; |
296 teal = TargetColor(0, 0xFFu, 0xFFu); | 295 teal = TargetColor(0, 0xFFu, 0xFFu); |
297 fill_pixels_fast(teal, pTexture2.pPixels, pNumPixels); | 296 fill_pixels_fast(teal, pTexture2.pPixels, pNumPixels); |
298 pTexture2.field_20 = 0; | 297 pTexture2._allocation_flags = 0; |
299 pTexture2.field_22 = 0; | |
300 pColor1 = TargetColor(0x70u, 0x8Fu, 0xFEu); | 298 pColor1 = TargetColor(0x70u, 0x8Fu, 0xFEu); |
301 pColor2 = TargetColor(0xECu, 0xE6u, 0x9Cu); | 299 pColor2 = TargetColor(0xECu, 0xE6u, 0x9Cu); |
302 pString = (char *)operator new(2 * pSize); | 300 pString = (char *)operator new(2 * pSize); |
303 strncpy(pString, ptr, pSize); | 301 strncpy(pString, ptr, pSize); |
304 pString[pSize]=0; | 302 pString[pSize]=0; |
338 GUI_MainMenuMessageProc(); | 336 GUI_MainMenuMessageProc(); |
339 } | 337 } |
340 } | 338 } |
341 while ( GetCurrentMenuID() == MENU_CREDITSPROC ); | 339 while ( GetCurrentMenuID() == MENU_CREDITSPROC ); |
342 pAudioPlayer->_4AA258(1); | 340 pAudioPlayer->_4AA258(1); |
343 pAllocator->FreeChunk(ptr); | 341 free(ptr); |
344 pAllocator->FreeChunk(pFontQuick); | 342 free(pFontQuick); |
345 pAllocator->FreeChunk(pFontCChar); | 343 free(pFontCChar); |
346 pWindow_MainMenu->Release(); | 344 pWindow_MainMenu->Release(); |
347 pIcons_LOD->RemoveTexturesPackFromTextureList(); | 345 pIcons_LOD->RemoveTexturesPackFromTextureList(); |
348 pTexture.Release(); | 346 pTexture.Release(); |
349 pTexture2.Release(); | 347 pTexture2.Release(); |
350 return MENU_MAIN; // return MENU_Main | 348 return MENU_MAIN; // return MENU_Main |