aboutsummaryrefslogtreecommitdiff
path: root/dc
diff options
context:
space:
mode:
authorMarcus Comstedt2002-05-14 11:32:16 +0000
committerMarcus Comstedt2002-05-14 11:32:16 +0000
commit787571c752262046a6864c052906d899a4b74d48 (patch)
treeba670aef767adb0b4540277ff6abdbdce705d2cc /dc
parentd3ef1bdced2961158ff7c71648475ea54e658f2a (diff)
downloadscummvm-rg350-787571c752262046a6864c052906d899a4b74d48.tar.gz
scummvm-rg350-787571c752262046a6864c052906d899a4b74d48.tar.bz2
scummvm-rg350-787571c752262046a6864c052906d899a4b74d48.zip
0.2.0 release fix. Variable screen height implemented, and configfile fix.
svn-id: r4316
Diffstat (limited to 'dc')
-rw-r--r--dc/dc.h2
-rw-r--r--dc/dcmain.cpp15
-rw-r--r--dc/display.cpp13
-rw-r--r--dc/input.cpp2
4 files changed, 18 insertions, 14 deletions
diff --git a/dc/dc.h b/dc/dc.h
index 258c2ecc63..4a2b78cfb7 100644
--- a/dc/dc.h
+++ b/dc/dc.h
@@ -73,7 +73,7 @@ class OSystem_Dreamcast : public OSystem {
int _ms_cur_x, _ms_cur_y, _ms_cur_w, _ms_cur_h, _ms_old_x, _ms_old_y;
int _ms_hotspot_x, _ms_hotspot_y, _ms_visible, _devpoll;
- int _current_shake_pos;
+ int _current_shake_pos, _screen_h;
unsigned char *_ms_buf;
SoundProc *_sound_proc;
void *_sound_proc_param;
diff --git a/dc/dcmain.cpp b/dc/dcmain.cpp
index 0f98f4ecfc..a64643a004 100644
--- a/dc/dcmain.cpp
+++ b/dc/dcmain.cpp
@@ -171,11 +171,8 @@ void waitForTimer(Scumm *s, int time)
}
*/
-int dc_setup(GameDetector &detector)
+void dc_init_hardware(void)
{
- static char *argv[] = { "scummvm", NULL, NULL, NULL };
- static int argc = 3;
-
#ifndef NOSERIAL
serial_init(57600);
usleep(2000000);
@@ -186,13 +183,19 @@ int dc_setup(GameDetector &detector)
maple_init();
dc_setup_ta();
init_arm();
+}
+
+int dc_setup(GameDetector &detector)
+{
+ static char *argv[] = { "scummvm", NULL, NULL, NULL };
+ static int argc = 3;
initSound();
if(!selectGame(&detector, argv[2], argv[1], icon))
exit(0);
- // sound.initialize(&scumm, &snd_driv);
-
detector.parseCommandLine(argc, argv);
+
+ return 0;
}
diff --git a/dc/display.cpp b/dc/display.cpp
index aeda52e754..97c7f2aed5 100644
--- a/dc/display.cpp
+++ b/dc/display.cpp
@@ -25,11 +25,11 @@
#include "dc.h"
#define SCREEN_W 320
-#define SCREEN_H 200
+#define SCREEN_H 240
#define MOUSE_W 64
#define MOUSE_H 64
-#define TOP_OFFSET 40.0
+#define TOP_OFFSET (240.0-_screen_h)
#define QACR0 (*(volatile unsigned int *)(void *)0xff000038)
#define QACR1 (*(volatile unsigned int *)(void *)0xff00003c)
@@ -104,8 +104,9 @@ void OSystem_Dreamcast::set_palette(const byte *colors, uint start, uint num)
void OSystem_Dreamcast::init_size(uint w, uint h)
{
- assert(w == SCREEN_W && h == SCREEN_H);
+ assert(w == SCREEN_W && h <= SCREEN_H);
+ _screen_h = h;
ta_sync();
if(!screen)
screen = new unsigned char[SCREEN_W*SCREEN_H];
@@ -173,7 +174,7 @@ void OSystem_Dreamcast::update_screen(void)
// while((*((volatile unsigned int *)(void*)0xa05f810c) & 0x3ff) != 200);
// *((volatile unsigned int *)(void*)0xa05f8040) = 0xff0000;
- for( int y = 0; y<SCREEN_H; y++ )
+ for( int y = 0; y<_screen_h; y++ )
{
texture_memcpy64_pal( dst, src, SCREEN_W>>5, palette );
src += SCREEN_W;
@@ -214,9 +215,9 @@ void OSystem_Dreamcast::update_screen(void)
ta_commit_list(&myvertex);
myvertex.x = 0.0;
- myvertex.y += SCREEN_H*2.0;
+ myvertex.y += _screen_h*2.0;
myvertex.u = 0.0;
- myvertex.v = SCREEN_H/512.0;
+ myvertex.v = _screen_h*(1/512.0);
ta_commit_list(&myvertex);
myvertex.x = SCREEN_W*2.0;
diff --git a/dc/input.cpp b/dc/input.cpp
index 89e9d186f6..ed7289e463 100644
--- a/dc/input.cpp
+++ b/dc/input.cpp
@@ -147,7 +147,7 @@ bool OSystem_Dreamcast::poll_event(Event *event)
if (_ms_cur_x<0) _ms_cur_x=0;
if (_ms_cur_x>319) _ms_cur_x=319;
if (_ms_cur_y<0) _ms_cur_y=0;
- if (_ms_cur_y>199) _ms_cur_y=199;
+ if (_ms_cur_y>=_screen_h) _ms_cur_y=_screen_h-1;
event->mouse.x = _ms_cur_x;
event->mouse.y = _ms_cur_y;
event->kbd.ascii = event->kbd.keycode = 0;