[Scummvm-cvs-logs] SF.net SVN: scummvm: [22751] scummvm/trunk/backends/psp/osys_psp_gu.cpp
joostp at users.sourceforge.net
joostp at users.sourceforge.net
Mon May 29 10:54:05 CEST 2006
Revision: 22751
Author: joostp
Date: 2006-05-29 10:53:06 -0700 (Mon, 29 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22751&view=rev
Log Message:
-----------
fix 480x272 overlay drawing, set default overlay size to 480x272
Modified Paths:
--------------
scummvm/trunk/backends/psp/osys_psp_gu.cpp
Modified: scummvm/trunk/backends/psp/osys_psp_gu.cpp
===================================================================
--- scummvm/trunk/backends/psp/osys_psp_gu.cpp 2006-05-29 17:40:31 UTC (rev 22750)
+++ scummvm/trunk/backends/psp/osys_psp_gu.cpp 2006-05-29 17:53:06 UTC (rev 22751)
@@ -137,8 +137,8 @@
_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 @@
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 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list