Mercurial > mm7
diff GUI/UI/UIMainMenu.cpp @ 2572:d87bfbd3bb3b
Step towards unification of Texture and RGBTexture (class Image)
author | a.parshin |
---|---|
date | Sat, 05 Mar 2016 01:51:54 +0200 |
parents | f9bdfe26d03d |
children | 0c67be4ec900 |
line wrap: on
line diff
--- a/GUI/UI/UIMainMenu.cpp Mon Oct 05 00:19:13 2015 +0200 +++ b/GUI/UI/UIMainMenu.cpp Sat Mar 05 01:51:54 2016 +0200 @@ -4,6 +4,7 @@ #include <crtdbg.h> #include "Engine/Engine.h" +#include "Engine/AssetsManager.h" #include "Engine/LOD.h" #include "Engine/MMT.h" #include "Engine/texts.h" @@ -325,7 +326,6 @@ char *pString; // [sp+12Ch] [bp-10h]@9 GUIFont *pFontQuick; // [sp+134h] [bp-8h]@1 GUIFont *pFontCChar; // [sp+138h] [bp-4h]@1 - RGBTexture mm6title_texture; // [sp+54h] [bp-E8h]@1 RGBTexture cred_texture; // [sp+100h] [bp-3Ch]@1 Texture pTemporaryTexture; // [sp+Ch] [bp-130h]@5 @@ -344,7 +344,9 @@ PlayAudio(L"Music\\15.mp3"); else pAudioPlayer->PlayMusicTrack(MUSIC_Credits); - mm6title_texture.Load("mm6title.pcx", 0); + + Image *mm6title = assets->GetImage_PCXFromIconsLOD(L"mm6title.pcx"); + cred_texturet = (char *)pEvents_LOD->LoadRaw("credits.txt", 0); pFile = pEvents_LOD->FindContainer("credits.txt", 0); if ( !pFile ) @@ -402,7 +404,7 @@ else { pRenderer->BeginScene(); - pRenderer->DrawTextureRGB(0, 0, &mm6title_texture); + pRenderer->DrawTextureNew(0, 0, mm6title); pRenderer->SetUIClipRect(credit_window.uFrameX, credit_window.uFrameY, credit_window.uFrameX + credit_window.uFrameWidth, credit_window.uFrameY + credit_window.uFrameHeight); pRenderer->CreditsTextureScroll(credit_window.uFrameX, credit_window.uFrameY, 0, move_Y, &cred_texture); @@ -425,7 +427,13 @@ free(pFontCChar); pWindow_MainMenu->Release(); pIcons_LOD->RemoveTexturesPackFromTextureList(); - mm6title_texture.Release(); + + if (mm6title) + { + mm6title->Release(); + mm6title = nullptr; + } + cred_texture.Release(); return MENU_MAIN; // return MENU_Main }