comparison UI/UIMainMenu.cpp @ 2069:259df09dfb50

32bits almost there
author Nomad
date Tue, 03 Dec 2013 20:18:17 +0200
parents b2a434d65344
children d44b7775fc06
comparison
equal deleted inserted replaced
2061:b2a434d65344 2069:259df09dfb50
18 18
19 19
20 //----- (0041B578) -------------------------------------------------------- 20 //----- (0041B578) --------------------------------------------------------
21 void MainMenuUI_LoadFontsAndSomeStuff() 21 void MainMenuUI_LoadFontsAndSomeStuff()
22 { 22 {
23 pIcons_LOD->SetupPalettes(pRenderer->uTargetRBits, pRenderer->uTargetGBits, pRenderer->uTargetBBits); 23 //pIcons_LOD->SetupPalettes(pRenderer->uTargetRBits, pRenderer->uTargetGBits, pRenderer->uTargetBBits);
24 pPaletteManager->SetColorChannelInfo(pRenderer->uTargetRBits, pRenderer->uTargetGBits, pRenderer->uTargetBBits); 24 pIcons_LOD->SetupPalettes(5, 6, 5);
25 //pPaletteManager->SetColorChannelInfo(pRenderer->uTargetRBits, pRenderer->uTargetGBits, pRenderer->uTargetBBits);
26 pPaletteManager->SetColorChannelInfo(5, 6, 5);
25 pPaletteManager->RecalculateAll(); 27 pPaletteManager->RecalculateAll();
26 28
27 for (uint i = 0; i < 480; ++i) 29 for (uint i = 0; i < 480; ++i)
28 pSRZBufferLineOffsets[i] = 640 * i; 30 pSRZBufferLineOffsets[i] = 640 * i;
29 31
242 244
243 cred_texture.uWidth = 250; 245 cred_texture.uWidth = 250;
244 cred_texture.uHeight = pFontQuick->GetStringHeight2(pFontCChar, cred_texturet, &credit_window, 0, 1) + 2 * credit_window.uFrameHeight; 246 cred_texture.uHeight = pFontQuick->GetStringHeight2(pFontCChar, cred_texturet, &credit_window, 0, 1) + 2 * credit_window.uFrameHeight;
245 cred_texture.uNumPixels = cred_texture.uWidth * cred_texture.uHeight; 247 cred_texture.uNumPixels = cred_texture.uWidth * cred_texture.uHeight;
246 cred_texture.pPixels = (unsigned __int16 *)malloc(2 * cred_texture.uNumPixels); 248 cred_texture.pPixels = (unsigned __int16 *)malloc(2 * cred_texture.uNumPixels);
247 fill_pixels_fast(TargetColor(0, 0xFFu, 0xFFu), cred_texture.pPixels, cred_texture.uNumPixels); 249 fill_pixels_fast(Color16(0, 0xFFu, 0xFFu), cred_texture.pPixels, cred_texture.uNumPixels);
248 cred_texture._allocation_flags = 0; 250 cred_texture._allocation_flags = 0;
249 251
250 //дать шрифт и цвета тексту 252 //дать шрифт и цвета тексту
251 pString = (char *)malloc(2 * pSize); 253 pString = (char *)malloc(2 * pSize);
252 strncpy(pString, cred_texturet, pSize); 254 strncpy(pString, cred_texturet, pSize);
253 pString[pSize] = 0; 255 pString[pSize] = 0;
254 pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 0, credit_window.uFrameHeight, cred_texture.uWidth, 256 pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 0, credit_window.uFrameHeight, cred_texture.uWidth,
255 cred_texture.uHeight, TargetColor(0x70u, 0x8Fu, 0xFEu), TargetColor(0xECu, 0xE6u, 0x9Cu), pString, cred_texture.pPixels, cred_texture.uWidth); 257 cred_texture.uHeight, Color16(0x70u, 0x8Fu, 0xFEu), Color16(0xECu, 0xE6u, 0x9Cu), pString, cred_texture.pPixels, cred_texture.uWidth);
256 free(pString); 258 free(pString);
257 259
258 pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, cred_texturet); 260 pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, cred_texturet);
259 pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_Escape, 0, 27, "", 0); 261 pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_Escape, 0, 27, "", 0);
260 pCurrentScreen = SCREEN_CREATORS; 262 pCurrentScreen = SCREEN_CREATORS;