Harmonized interface between mouse drivers and callbacks.

The Apple2 doesn't have sprites so the Apple2 mouse callbacks place a special character on the text screen to indicate the mouse position. In order to support the necessary character removing and redrawing the Apple2 mouse driver called the Apple2 mouse callbacks in an "unusual way". So far so (sort of) good.

However the upcoming Atari mouse driver aims to support both "sprite-type" mouse callbacks as well as "text-char-type" mouse callbacks. Therefore the interface between mouse drivers and callbacks needs to be extended to allow the mouse callbacks to hide their different types from the mouse driver.

The nature of this change can be seen best by looking at the Apple2 file modifications. The CBM drivers and callbacks (at least the current ones) don't benefit from this change.
This commit is contained in:
Oliver Schmidt
2014-01-15 22:47:59 +01:00
parent b1c8f8e714
commit 4065cb1983
16 changed files with 158 additions and 46 deletions

View File

@@ -78,6 +78,10 @@
.byte
CSHOW .addr
.byte
CDRAW .addr
.byte
CMOVE .addr
.byte
CMOVEX .addr
.byte
CMOVEY .addr
@@ -90,14 +94,16 @@
.struct MOUSE_CALLBACKS
HIDE .addr ; Hide the mouse cursor
SHOW .addr ; Show the mouse cursor
MOVEX .addr ; Move the mouse cursor
MOVEY .addr ; Dito for Y
DRAW .addr ; Draw the mouse cursor
MOVE .addr ; Prepare to move the mouse cursor
MOVEX .addr ; Move the mouse cursor to X coord
MOVEY .addr ; Move the mouse cursor to Y coord
.endstruct
;------------------------------------------------------------------------------
; The mouse API version, stored in MOUSE_HDR::VERSION
MOUSE_API_VERSION = $04
MOUSE_API_VERSION = $05
;------------------------------------------------------------------------------
; Bitmapped mouse driver flags, stored in MOUSE_HDR::FLAGS.
@@ -169,12 +175,10 @@ MOUSE_BTN_RIGHT = $01
.global mouse_uninstall
.global mouse_hide
.global mouse_show
.global mouse_setbox
.global mouse_setbox
.global mouse_getbox
.global mouse_move
.global mouse_buttons
.global mouse_pos
.global mouse_info
.global mouse_ioctl