From 14ec3f45fa08a0c0071693f4094fc088eb0062b5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 17 May 2006 23:52:45 +0000 Subject: - Heavily modified patch #1214784: "Disable overlay scaling" - Eriktorbjorn's patch from same tracker item for scaling sword1/2 cutscenes is applied as is. It lacks resolution switch on-the-fly. - GUI widgets are repositioned on the fly and use most space, even aspect ratio corrected screen is used without scaling - Heavy tesing is required, but works for me in all cases except for bug #1483272: "GUI: SCUMM pause dialog breaks upon scaler switch" which needs more work. - I probavly broke some backend or two svn-id: r22505 --- backends/psp/osys_psp.cpp | 13 ++++++------- backends/psp/osys_psp.h | 2 +- backends/psp/osys_psp_gu.cpp | 13 ++++++------- backends/psp/osys_psp_gu.h | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) (limited to 'backends/psp') diff --git a/backends/psp/osys_psp.cpp b/backends/psp/osys_psp.cpp index 2cb4431994..8b9242299f 100644 --- a/backends/psp/osys_psp.cpp +++ b/backends/psp/osys_psp.cpp @@ -120,18 +120,17 @@ int OSystem_PSP::getGraphicsMode() const return -1; } -void OSystem_PSP::initSize(uint width, uint height, int overlayScale) { +void OSystem_PSP::initSize(uint width, uint height) { _screenWidth = width; _screenHeight = height; _offscreen = (byte *)malloc(width * height); - if(overlayScale == -1) - overlayScale = 1; - - _overlayScale = overlayScale; - _overlayBuffer = (OverlayColor *)malloc(width * overlayScale * height * overlayScale * sizeof(OverlayColor)); + // TODO: Fixme. This is not neede anymore + _overlayScale = 1; + + _overlayBuffer = (OverlayColor *)malloc(width * height * sizeof(OverlayColor)); bzero(_offscreen, width * height); - bzero(_overlayBuffer, width * overlayScale * height * overlayScale); + bzero(_overlayBuffer, width * height); _mouseVisible = false; } diff --git a/backends/psp/osys_psp.h b/backends/psp/osys_psp.h index 8131467b0b..b5e16df86d 100644 --- a/backends/psp/osys_psp.h +++ b/backends/psp/osys_psp.h @@ -80,7 +80,7 @@ public: virtual bool setGraphicsMode(int mode); bool setGraphicsMode(const char *name); virtual int getGraphicsMode() const; - virtual void initSize(uint width, uint height, int overlayScale); + virtual void initSize(uint width, uint height); virtual int16 getHeight(); virtual int16 getWidth(); virtual void setPalette(const byte *colors, uint start, uint num); diff --git a/backends/psp/osys_psp_gu.cpp b/backends/psp/osys_psp_gu.cpp index 53add476c5..1cee404655 100644 --- a/backends/psp/osys_psp_gu.cpp +++ b/backends/psp/osys_psp_gu.cpp @@ -132,20 +132,19 @@ OSystem_PSP_GU::~OSystem_PSP_GU() sceGuTerm(); } -void OSystem_PSP_GU::initSize(uint width, uint height, int overlayScale) { +void OSystem_PSP_GU::initSize(uint width, uint height) { PSPDebugTrace("initSize\n"); _screenWidth = width; _screenHeight = height; // _offscreen = (byte *)offscreen256; _overlayBuffer = (OverlayColor *)0x44000000 + PSP_FRAME_SIZE; - if(overlayScale == -1 || width == 640) - overlayScale = 1; - - _overlayScale = overlayScale; - _offscreen = (unsigned byte *)_overlayBuffer+_screenWidth*_screenHeight*_overlayScale*_overlayScale*sizeof(OverlayColor); + // FIXME: This is not needed anymore + _overlayScale = 1; + + _offscreen = (unsigned byte *)_overlayBuffer+_screenWidth*_screenHeight*sizeof(OverlayColor); bzero(_offscreen, width * height); - bzero(_overlayBuffer, width * overlayScale * height * overlayScale); + bzero(_overlayBuffer, width * height); _kbdClut[0] = 0xffff; _kbdClut[246] = 0x4ccc; _kbdClut[247] = 0x0000; diff --git a/backends/psp/osys_psp_gu.h b/backends/psp/osys_psp_gu.h index de3e4a3e65..b1445a520e 100644 --- a/backends/psp/osys_psp_gu.h +++ b/backends/psp/osys_psp_gu.h @@ -40,7 +40,7 @@ public: OSystem_PSP_GU(); ~OSystem_PSP_GU(); void updateScreen(); - void initSize(uint width, uint height, int overlayScale); + void initSize(uint width, uint height); int getDefaultGraphicsMode() const; bool setGraphicsMode(int mode); bool setGraphicsMode(const char *name); -- cgit v1.2.3