diff options
author | Marcus Comstedt | 2003-07-30 21:44:43 +0000 |
---|---|---|
committer | Marcus Comstedt | 2003-07-30 21:44:43 +0000 |
commit | 12f9de02b49160714080580037bd6d24456b6565 (patch) | |
tree | 28291fd03a85908d37d964736265c89e3462cd40 /backends/dc | |
parent | f64a8793f36e101a923f4648b77ffb68f03bd369 (diff) | |
download | scummvm-rg350-12f9de02b49160714080580037bd6d24456b6565.tar.gz scummvm-rg350-12f9de02b49160714080580037bd6d24456b6565.tar.bz2 scummvm-rg350-12f9de02b49160714080580037bd6d24456b6565.zip |
Merged fixes from branch-0-5-0:
* Max's "adjustment" was incomplete, fixed.
* Initialize shake_pos to 0 (fixes Sky, which never sets the shake_pos).
* Changed sematics of X button to allow boxing in Indy (I hope...)
svn-id: r9307
Diffstat (limited to 'backends/dc')
-rw-r--r-- | backends/dc/dcmain.cpp | 4 | ||||
-rw-r--r-- | backends/dc/input.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/backends/dc/dcmain.cpp b/backends/dc/dcmain.cpp index 3b7b1e584c..46cdc7b9ab 100644 --- a/backends/dc/dcmain.cpp +++ b/backends/dc/dcmain.cpp @@ -44,7 +44,7 @@ OSystem *OSystem_Dreamcast::create() { OSystem_Dreamcast::OSystem_Dreamcast() : screen(NULL), mouse(NULL), overlay(NULL), _ms_buf(NULL), - _sound_proc(NULL), _timer_active(false) + _sound_proc(NULL), _timer_active(false), _current_shake_pos(0) { memset(screen_tx, 0, sizeof(screen_tx)); memset(mouse_tx, 0, sizeof(screen_tx)); @@ -85,7 +85,7 @@ void OSystem_Dreamcast::play_cdrom(int track, int num_loops, int start_frame, in else if(num_loops<0) num_loops=15; // infinity if(!find_track(track, first_sec, last_sec)) return; - if(end_frame) + if(duration) last_sec = first_sec + start_frame + duration; first_sec += start_frame; play_cdda_sectors(first_sec, last_sec, num_loops); diff --git a/backends/dc/input.cpp b/backends/dc/input.cpp index efa8abcc0c..868f6c1fe0 100644 --- a/backends/dc/input.cpp +++ b/backends/dc/input.cpp @@ -29,6 +29,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, byte &shiftFlags) { + static const char numpadmap[] = "0000039601740285"; int lmb=0, rmb=0, newkey=0; static int lastkey = 0; static byte lastlmb = 0, lastrmb = 0; @@ -44,7 +45,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, if(!(buttons & 8)) newkey = 319; else if(!(buttons & 512)) newkey = ' '; - else if(!(buttons & 1024)) newkey = '0'; + else if(!(buttons & 1024)) newkey = numpadmap[(buttons>>4)&15]; if(!(buttons & 128)) mouse_x++; if(!(buttons & 64)) mouse_x--; |