[Scummvm-cvs-logs] CVS: scummvm/dc dc.h,1.6,1.7 dcmain.cpp,1.10,1.11 display.cpp,1.6,1.7 input.cpp,1.6,1.7
Marcus Comstedt
marcus_c at users.sourceforge.net
Tue May 14 04:33:02 CEST 2002
Update of /cvsroot/scummvm/scummvm/dc
In directory usw-pr-cvs1:/tmp/cvs-serv2279/dc
Modified Files:
dc.h dcmain.cpp display.cpp input.cpp
Log Message:
0.2.0 release fix. Variable screen height implemented, and configfile fix.
Index: dc.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/dc/dc.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dc.h 4 May 2002 09:55:10 -0000 1.6
+++ dc.h 14 May 2002 11:32:16 -0000 1.7
@@ -73,7 +73,7 @@
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;
Index: dcmain.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/dc/dcmain.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- dcmain.cpp 4 May 2002 09:55:10 -0000 1.10
+++ dcmain.cpp 14 May 2002 11:32:16 -0000 1.11
@@ -171,11 +171,8 @@
}
*/
-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 @@
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;
}
Index: display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/dc/display.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- display.cpp 18 Apr 2002 23:21:40 -0000 1.6
+++ display.cpp 14 May 2002 11:32:16 -0000 1.7
@@ -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::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 @@
// 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 @@
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;
Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/dc/input.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- input.cpp 18 Apr 2002 23:21:40 -0000 1.6
+++ input.cpp 14 May 2002 11:32:16 -0000 1.7
@@ -147,7 +147,7 @@
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;
More information about the Scummvm-git-logs
mailing list