diff options
author | Marcus Comstedt | 2003-07-14 21:44:01 +0000 |
---|---|---|
committer | Marcus Comstedt | 2003-07-14 21:44:01 +0000 |
commit | 28e6e05025a7ff4aba54e0d4bc1bcac4df875a03 (patch) | |
tree | 3ad095c1815e62504b645ba320658ab1020601cf /backends | |
parent | bb87787314d90487d5c4762f94abd944cca196bb (diff) | |
download | scummvm-rg350-28e6e05025a7ff4aba54e0d4bc1bcac4df875a03.tar.gz scummvm-rg350-28e6e05025a7ff4aba54e0d4bc1bcac4df875a03.tar.bz2 scummvm-rg350-28e6e05025a7ff4aba54e0d4bc1bcac4df875a03.zip |
Hires mouse pointer (CoMI).
svn-id: r9026
Diffstat (limited to 'backends')
-rw-r--r-- | backends/dc/dc.h | 2 | ||||
-rw-r--r-- | backends/dc/display.cpp | 56 |
2 files changed, 42 insertions, 16 deletions
diff --git a/backends/dc/dc.h b/backends/dc/dc.h index 8be53db2fd..77513c14e0 100644 --- a/backends/dc/dc.h +++ b/backends/dc/dc.h @@ -108,7 +108,7 @@ class OSystem_Dreamcast : public OSystem { void *_sound_proc_param; bool _overlay_visible, _overlay_dirty, _screen_dirty; int _screen_buffer, _overlay_buffer, _mouse_buffer; - bool _hires; + bool _hires, _hires_mouse; float _overlay_fade; uint32 _timer_duration, _timer_next_expiry; diff --git a/backends/dc/display.cpp b/backends/dc/display.cpp index faf5e2a9ea..6ac642a37b 100644 --- a/backends/dc/display.cpp +++ b/backends/dc/display.cpp @@ -154,6 +154,7 @@ void OSystem_Dreamcast::init_size(uint w, uint h) _overlay_y = (h-OVL_H)/2; if(_overlay_x<0) _overlay_x = 0; if(_overlay_y<0) _overlay_y = 0; + _hires_mouse = _hires; ta_sync(); if(!screen) screen = new unsigned char[SCREEN_W*SCREEN_H]; @@ -469,24 +470,49 @@ void OSystem_Dreamcast::drawMouse(int xdraw, int ydraw, int w, int h, myvertex.u = 0.0; myvertex.v = 0.0; - myvertex.x = (xdraw-_ms_hotspot_y)*2.0; - myvertex.y = (ydraw-_ms_hotspot_x)*2.0 + TOP_OFFSET; - ta_commit_list(&myvertex); + if(_hires_mouse) { - myvertex.x += w*2.0; - myvertex.u = w*(1.0/MOUSE_W); - ta_commit_list(&myvertex); + myvertex.x = xdraw*2.0-_ms_hotspot_x; + myvertex.y = ydraw*2.0-_ms_hotspot_y + TOP_OFFSET; + ta_commit_list(&myvertex); - myvertex.x = (xdraw-_ms_hotspot_y)*2.0; - myvertex.y += h*2.0; - myvertex.u = 0.0; - myvertex.v = h*(1.0/MOUSE_H); - ta_commit_list(&myvertex); + myvertex.x += w; + myvertex.u = w*(1.0/MOUSE_W); + ta_commit_list(&myvertex); - myvertex.x += w*2.0; - myvertex.u = w*(1.0/MOUSE_W); - myvertex.cmd |= TA_CMD_VERTEX_EOS; - ta_commit_list(&myvertex); + myvertex.x = xdraw*2.0-_ms_hotspot_x; + myvertex.y += h; + myvertex.u = 0.0; + myvertex.v = h*(1.0/MOUSE_H); + ta_commit_list(&myvertex); + + myvertex.x += w; + myvertex.u = w*(1.0/MOUSE_W); + myvertex.cmd |= TA_CMD_VERTEX_EOS; + ta_commit_list(&myvertex); + + } else { + + myvertex.x = (xdraw-_ms_hotspot_x)*2.0; + myvertex.y = (ydraw-_ms_hotspot_y)*2.0 + TOP_OFFSET; + ta_commit_list(&myvertex); + + myvertex.x += w*2.0; + myvertex.u = w*(1.0/MOUSE_W); + ta_commit_list(&myvertex); + + myvertex.x = (xdraw-_ms_hotspot_x)*2.0; + myvertex.y += h*2.0; + myvertex.u = 0.0; + myvertex.v = h*(1.0/MOUSE_H); + ta_commit_list(&myvertex); + + myvertex.x += w*2.0; + myvertex.u = w*(1.0/MOUSE_W); + myvertex.cmd |= TA_CMD_VERTEX_EOS; + ta_commit_list(&myvertex); + + } } |