diff -ur ScummVM-cvs20030108/scummvm/backends/sdl/sdl-common.cpp ScummVM-cvs20030108+hack/scummvm/backends/sdl/sdl-common.cpp
old
|
new
|
|
398 | 398 | undraw_mouse(); |
399 | 399 | } |
400 | 400 | } |
| 401 | |
| 402 | void OSystem_SDL_Common::warp_mouse(int x, int y) { |
| 403 | // FIXME: For whatever reason, I can't get CMI's cannon scene to work |
| 404 | // properly in fullscreen mode unless I temporarily show the mouse |
| 405 | // cursor here. |
| 406 | if (_full_screen) SDL_ShowCursor(SDL_ENABLE); |
| 407 | SDL_WarpMouse(x * _scaleFactor, y * _scaleFactor); |
| 408 | if (_full_screen) SDL_ShowCursor(SDL_DISABLE); |
| 409 | set_mouse_pos(x, y); |
| 410 | } |
401 | 411 | |
402 | 412 | void OSystem_SDL_Common::set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { |
403 | 413 | |
diff -ur ScummVM-cvs20030108/scummvm/backends/sdl/sdl-common.h ScummVM-cvs20030108+hack/scummvm/backends/sdl/sdl-common.h
old
|
new
|
|
52 | 52 | |
53 | 53 | // Set the position of the mouse cursor |
54 | 54 | void set_mouse_pos(int x, int y); |
| 55 | |
| 56 | // Warp the mouse cursor. Where set_mouse_pos() only informs the |
| 57 | // backend of the mouse cursor's current position, this function |
| 58 | // actually moves the cursor to the specified position. |
| 59 | void warp_mouse(int x, int y); |
55 | 60 | |
56 | 61 | // Set the bitmap that's used when drawing the cursor. |
57 | 62 | void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); |
diff -ur ScummVM-cvs20030108/scummvm/common/system.h ScummVM-cvs20030108+hack/scummvm/common/system.h
old
|
new
|
|
109 | 109 | |
110 | 110 | // Set the position of the mouse cursor |
111 | 111 | virtual void set_mouse_pos(int x, int y) = 0; |
| 112 | |
| 113 | // Warp the mouse cursor. Where set_mouse_pos() only informs the |
| 114 | // backend of the mouse cursor's current position, this function |
| 115 | // actually moves the cursor to the specified position. |
| 116 | virtual void warp_mouse(int x, int y) = 0; |
112 | 117 | |
113 | 118 | // Set the bitmap that's used when drawing the cursor. |
114 | 119 | virtual void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) = 0; |
diff -ur ScummVM-cvs20030108/scummvm/scumm/script_v8.cpp ScummVM-cvs20030108+hack/scummvm/scumm/script_v8.cpp
old
|
new
|
|
801 | 801 | _charsetColorMap[i] = _charsetData[_string[1].t_charset][i] = (unsigned char)args[i]; |
802 | 802 | break; |
803 | 803 | case 0xE9: // SO_CURSOR_PUT |
804 | | _virtual_mouse_x = pop(); |
805 | 804 | _virtual_mouse_y = pop(); |
| 805 | _virtual_mouse_x = pop(); |
806 | 806 | |
807 | 807 | mouse.x = _virtual_mouse_x - virtscr[0].xstart; |
808 | 808 | mouse.y = _virtual_mouse_y - camera._cur.y + (_realHeight / 2); |
809 | | mouse.y += 16; |
| 809 | mouse.y += virtscr[0].topline; |
810 | 810 | |
811 | | _system->set_mouse_pos(mouse.x, mouse.y); |
| 811 | _system->warp_mouse(mouse.x, mouse.y); |
812 | 812 | _system->update_screen(); |
813 | 813 | // warning("warped mouse to (%d, %d) from %d-%d", _virtual_mouse_x, _virtual_mouse_y, _roomResource, vm.slot[_currentScript].number); |
814 | 814 | break; |