mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
fix 480x272 overlay drawing, set default overlay size to 480x272
svn-id: r22751
This commit is contained in:
@@ -137,8 +137,8 @@ void OSystem_PSP_GU::initSize(uint width, uint height) {
|
||||
_screenWidth = width;
|
||||
_screenHeight = height;
|
||||
|
||||
_overlayWidth = width; //PSP_SCREEN_WIDTH
|
||||
_overlayHeight = height; //PSP_SCREEN_HEIGHT
|
||||
_overlayWidth = PSP_SCREEN_WIDTH; //width;
|
||||
_overlayHeight = PSP_SCREEN_HEIGHT; //height;
|
||||
|
||||
// _offscreen = (byte *)offscreen256;
|
||||
_overlayBuffer = (OverlayColor *)0x44000000 + PSP_FRAME_SIZE;
|
||||
@@ -346,7 +346,7 @@ OSystem_PSP_GU::updateScreen()
|
||||
sceGuTexMode(GU_PSM_5551, 0, 0, 0); // 16-bit image
|
||||
sceGuAlphaFunc(GU_GREATER,0,0xff);
|
||||
sceGuEnable(GU_ALPHA_TEST);
|
||||
if (_overlayWidth == 640)
|
||||
if (_overlayWidth > 320)
|
||||
sceGuTexImage(0, 512, 512, _overlayWidth, _overlayBuffer);
|
||||
else
|
||||
sceGuTexImage(0, 512, 256, _overlayWidth, _overlayBuffer);
|
||||
@@ -354,14 +354,13 @@ OSystem_PSP_GU::updateScreen()
|
||||
sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
|
||||
sceGuDrawArray(GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,vertices);
|
||||
// need to render twice for textures > 512
|
||||
if( _overlayWidth == 640)
|
||||
if( _overlayWidth > 512)
|
||||
{
|
||||
sceGuTexImage(0, 512, 512, _overlayWidth, _overlayBuffer+512);
|
||||
vertices[0].u = 512 + 0.5; vertices[1].v = _overlayHeight - 0.5;
|
||||
vertices[0].x = PSP_SCREEN_WIDTH*512/640; vertices[0].y = 0; vertices[0].z = 0;
|
||||
sceGuDrawArray(GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,vertices);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// draw mouse
|
||||
|
||||
Reference in New Issue
Block a user