aboutsummaryrefslogtreecommitdiff
path: root/backends/psp
diff options
context:
space:
mode:
authorJoost Peters2006-05-29 17:53:06 +0000
committerJoost Peters2006-05-29 17:53:06 +0000
commit1b6363c7313c4e2ca7fcb35bdaea4cc2b41b249d (patch)
tree58853b69f7c7f118346406e41e11932f5d17cf7d /backends/psp
parent31413d871bb336aa4ca6d86a577074e875a05e94 (diff)
downloadscummvm-rg350-1b6363c7313c4e2ca7fcb35bdaea4cc2b41b249d.tar.gz
scummvm-rg350-1b6363c7313c4e2ca7fcb35bdaea4cc2b41b249d.tar.bz2
scummvm-rg350-1b6363c7313c4e2ca7fcb35bdaea4cc2b41b249d.zip
fix 480x272 overlay drawing, set default overlay size to 480x272
svn-id: r22751
Diffstat (limited to 'backends/psp')
-rw-r--r--backends/psp/osys_psp_gu.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/backends/psp/osys_psp_gu.cpp b/backends/psp/osys_psp_gu.cpp
index 8ba36bdc20..367f053b65 100644
--- a/backends/psp/osys_psp_gu.cpp
+++ b/backends/psp/osys_psp_gu.cpp
@@ -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