Additional tweak for issue 693: reduce the size of some background images. I think the visual result is still ok. The images go from 480x272 to 450x255, and end up taking twice as less space in ram (512x256 instead of 512x512).
This helps a lot in the deck selection menus (duel and deck editor). That, added to my previous fix, fixes issue 693 for me. In general, we should try to avoid 512x512 32bits textures on the PSP. That happens with a 480x272 png image. One solution is to convert the file to a jpeg, and load it in 551 mode whenever possible. Another solution is what I did: use a 450x255 image instead. The best is of course to cumulate both, which divides the size in Ram by 4 on the PSP. I'm ok with distributing lower res graphics on the psp, and higher res on other platforms, if that helps. Main culprits are 480x272 images (when there's too many of them)
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 60 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 70 KiB |
@@ -139,9 +139,14 @@ void DeckMenu::RenderBackground()
|
||||
static bool loadBackground = true;
|
||||
if (loadBackground)
|
||||
{
|
||||
//Erwan 2010/07/11 the TEXTURE_SUB_5551 below is useless, JGE doesn't support it for png. I'm letting it here to avoid causing a bug, but it should be removed
|
||||
JQuadPtr background = WResourceManager::Instance()->RetrieveTempQuad(bgFilename.str(), TEXTURE_SUB_5551);
|
||||
if (background.get())
|
||||
JRenderer::GetInstance()->RenderQuad(background.get(), 0, 0);
|
||||
{
|
||||
float scaleX = SCREEN_WIDTH_F / background.get()->mWidth;
|
||||
float scaleY = SCREEN_HEIGHT_F / background.get()->mHeight;
|
||||
JRenderer::GetInstance()->RenderQuad(background.get(), 0, 0,0,scaleX, scaleY);
|
||||
}
|
||||
else
|
||||
loadBackground = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user