Mercurial > mm7
diff GUI/UI/UISaveLoad.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 | fed97f15d1e1 |
children | 0c67be4ec900 |
line wrap: on
line diff
--- a/GUI/UI/UISaveLoad.cpp Mon Oct 05 00:19:13 2015 +0200 +++ b/GUI/UI/UISaveLoad.cpp Sat Mar 05 01:51:54 2016 +0200 @@ -76,7 +76,7 @@ fread(&pSavegameHeader[i], 100, 1, pLODFile.FindContainer("header.bin", 1)); if (pLODFile.FindContainer("image.pcx", 1)) { - pSavegameThumbnails[i].LoadFromFILE(pLODFile.FindContainer("image.pcx", 1), 0, 1); + //pSavegameThumbnails[i].LoadFromFILE(pLODFile.FindContainer("image.pcx", 1), 0, 1); pLODFile.CloseWriteFile(); pSavegameUsedSlots[i] = 1; } @@ -137,7 +137,7 @@ pIcons_LOD->_inlined_sub2(); memset(pSavegameUsedSlots.data(), 0, sizeof(pSavegameUsedSlots)); - memset(pSavegameThumbnails.data(), 0, 45 * sizeof(RGBTexture)); + memset(pSavegameThumbnails.data(), 0, 45 * sizeof(Image *)); uTextureID_loadsave = pIcons_LOD->LoadTexture("loadsave", TEXTURE_16BIT_PALETTE); uTextureID_load_up = pIcons_LOD->LoadTexture("load_up", TEXTURE_16BIT_PALETTE); uTextureID_save_up = pIcons_LOD->LoadTexture("save_up", TEXTURE_16BIT_PALETTE); @@ -160,7 +160,7 @@ pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u)); } else - pRenderer->DrawTextureNew(0, 0, &main_menu_background); + pRenderer->DrawTextureNew(0, 0, main_menu_background); /*pGUIWindow_CurrentMenu = new GUIWindow_Load( @@ -210,7 +210,7 @@ } else { - pSavegameThumbnails[i].LoadFromFILE(pLODFile.FindContainer("image.pcx", true), 0, true); + //pSavegameThumbnails[i].LoadFromFILE(pLODFile.FindContainer("image.pcx", true), 0, true); pLODFile.CloseWriteFile(); pSavegameUsedSlots[i] = 1; } @@ -299,8 +299,8 @@ save_load_window.uFrameZ = save_load_window.uFrameX + 219; save_load_window.uFrameHeight = pFontSmallnum->uFontHeight; save_load_window.uFrameW = pFontSmallnum->uFontHeight + save_load_window.uFrameY - 1; - if ( pSavegameThumbnails[uLoadGameUI_SelectedSlot].pPixels ) - pRenderer->DrawTextureRGB(pGUIWindow_CurrentMenu->uFrameX + 276, pGUIWindow_CurrentMenu->uFrameY + 171, &pSavegameThumbnails[uLoadGameUI_SelectedSlot]); + if ( pSavegameThumbnails[uLoadGameUI_SelectedSlot] ) + pRenderer->DrawTextureNew((pGUIWindow_CurrentMenu->uFrameX + 276)/640.0f, (pGUIWindow_CurrentMenu->uFrameY + 171)/480.0f, pSavegameThumbnails[uLoadGameUI_SelectedSlot]); //Draw map name save_load_window.DrawTitleText(pFontSmallnum, 0, 0, 0, pMapStats->pInfos[pMapStats->GetMapInfo(pSavegameHeader[uLoadGameUI_SelectedSlot].pLocationName)].pName, 3); //Draw date