mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
added mousemem constructor
git-svn-id: svn://svn.cc65.org/cc65/trunk@535 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
ed08b2f772
commit
86e8c03001
@ -14,8 +14,9 @@
|
||||
.export _mouse_init, _mouse_done, _mouse_box
|
||||
.export _mouse_show, _mouse_hide, _mouse_move
|
||||
.export _mouse_buttons
|
||||
.constructor mousemem
|
||||
|
||||
.import popa,popax,mouse_pm0
|
||||
.import popa,popax
|
||||
|
||||
.include "atari.inc"
|
||||
|
||||
@ -35,6 +36,23 @@ pmsize = 16 ; y size pm shape
|
||||
xinit = defxmin ; init. x pos.
|
||||
yinit = defymin ; init. y pos.
|
||||
|
||||
;--------------------------------------------------------------------
|
||||
; reserve memory for the mouse pointer
|
||||
|
||||
mousemem:
|
||||
lda APPMHI+1
|
||||
and #%11111000 ; make 2k aligned
|
||||
sec
|
||||
sbc #%00001000 ; reserve 2k
|
||||
tax
|
||||
adc #3 ; add 4 (C = 1)
|
||||
sta mouse_pm0
|
||||
lda #0
|
||||
sta APPMHI
|
||||
stx APPMHI+1
|
||||
rts
|
||||
|
||||
|
||||
;--------------------------------------------------------------------
|
||||
; Initialize mouse routines
|
||||
; void __fastcall__ mouse_init (unsigned char port, unsigned char sprite, unsigned char type);
|
||||
@ -533,3 +551,5 @@ mouse_on:
|
||||
.res 1
|
||||
port_nr:
|
||||
.res 1
|
||||
mouse_pm0:
|
||||
.res 1
|
||||
|
Loading…
Reference in New Issue
Block a user