aboutsummaryrefslogtreecommitdiff
path: root/backends/psp
diff options
context:
space:
mode:
authorEugene Sandulenko2006-05-17 23:52:45 +0000
committerEugene Sandulenko2006-05-17 23:52:45 +0000
commit14ec3f45fa08a0c0071693f4094fc088eb0062b5 (patch)
tree87e2af334bd1503eacc55c71cd5ccb94e5eb5751 /backends/psp
parent65091f7370ee118b8f99c6106d8cad1fd0ee719e (diff)
downloadscummvm-rg350-14ec3f45fa08a0c0071693f4094fc088eb0062b5.tar.gz
scummvm-rg350-14ec3f45fa08a0c0071693f4094fc088eb0062b5.tar.bz2
scummvm-rg350-14ec3f45fa08a0c0071693f4094fc088eb0062b5.zip
- 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
Diffstat (limited to 'backends/psp')
-rw-r--r--backends/psp/osys_psp.cpp13
-rw-r--r--backends/psp/osys_psp.h2
-rw-r--r--backends/psp/osys_psp_gu.cpp13
-rw-r--r--backends/psp/osys_psp_gu.h2
4 files changed, 14 insertions, 16 deletions
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);