aboutsummaryrefslogtreecommitdiff
path: root/backends/ps2/Gs2dScreen.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2006-06-07 06:07:05 +0000
committerRobert Göffringmann2006-06-07 06:07:05 +0000
commita01d5c139357217c2c3b7a8c485b99de4055fe2b (patch)
treec81bdaf431ebe50d3f5f6aee304b56a549e6919b /backends/ps2/Gs2dScreen.cpp
parent6aaafb47ebc10fcc88d9d140bcc5c70eab417160 (diff)
downloadscummvm-rg350-a01d5c139357217c2c3b7a8c485b99de4055fe2b.tar.gz
scummvm-rg350-a01d5c139357217c2c3b7a8c485b99de4055fe2b.tar.bz2
scummvm-rg350-a01d5c139357217c2c3b7a8c485b99de4055fe2b.zip
various PS2 changes
svn-id: r22969
Diffstat (limited to 'backends/ps2/Gs2dScreen.cpp')
-rw-r--r--backends/ps2/Gs2dScreen.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/backends/ps2/Gs2dScreen.cpp b/backends/ps2/Gs2dScreen.cpp
index 0c706e6ea3..7cf82ae5a0 100644
--- a/backends/ps2/Gs2dScreen.cpp
+++ b/backends/ps2/Gs2dScreen.cpp
@@ -31,6 +31,8 @@
#include "GsDefs.h"
#include "graphics/surface.h"
+extern void *_gp;
+
enum Buffers {
SCREEN = 0,
MOUSE,
@@ -61,7 +63,7 @@ static bool g_RunAnim = false;
static GsVertex kFullScreen[2];
static TexVertex kMouseTex[2] = {
{ SCALE(1), SCALE(1) },
- { SCALE(M_SIZE), SCALE(M_SIZE) }
+ { SCALE(M_SIZE - 1), SCALE(M_SIZE - 1) }
};
static TexVertex kPrintTex[2] = {
{ SCALE(1), SCALE(1) },
@@ -137,17 +139,17 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
if (tvMode == TV_DONT_CARE) {
if (PAL_NTSC_FLAG == 'E')
- _videoMode = TV_NTSC;
- else
_videoMode = TV_PAL;
+ else
+ _videoMode = TV_NTSC;
} else
_videoMode = tvMode;
printf("Setting up %s mode\n", (_videoMode == TV_PAL) ? "PAL" : "NTSC");
-
+
// set screen size, 640x544 for pal, 640x448 for ntsc
_tvWidth = 640;
- _tvHeight = ((_videoMode == TV_PAL) ? 544 : 448); // PAL => 512?
+ _tvHeight = ((_videoMode == TV_PAL) ? 544 : 448);
kFullScreen[0].z = kFullScreen[1].z = 0;
kFullScreen[0].x = ORIGIN_X;
kFullScreen[0].y = ORIGIN_Y;
@@ -226,10 +228,10 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_animStack = malloc(ANIM_STACK_SIZE);
animThread.initial_priority = thisThread.current_priority - 3;
- animThread.stack = _animStack;
+ animThread.stack = _animStack;
animThread.stack_size = ANIM_STACK_SIZE;
- animThread.func = (void *)runAnimThread;
- asm("move %0, $gp\n": "=r"(animThread.gp_reg));
+ animThread.func = (void *)runAnimThread;
+ animThread.gp_reg = &_gp;
_animTid = CreateThread(&animThread);
assert(_animTid >= 0);