mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
Removed the port parameter from mouse_init
git-svn-id: svn://svn.cc65.org/cc65/trunk@906 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
40aa38a6fd
commit
3d85621819
@ -16,7 +16,7 @@
|
||||
.export _mouse_buttons, _mouse_pos, _mouse_info
|
||||
.constructor initmouse,27
|
||||
|
||||
.import popa,popax
|
||||
.import popax
|
||||
.importzp ptr1
|
||||
|
||||
.include "atari.inc"
|
||||
@ -56,15 +56,10 @@ initmouse:
|
||||
|
||||
;--------------------------------------------------------------------
|
||||
; Initialize mouse routines
|
||||
; void __fastcall__ mouse_init (unsigned char port, unsigned char type);
|
||||
; void __fastcall__ mouse_init (unsigned char type);
|
||||
|
||||
_mouse_init:
|
||||
pha ; remember mouse type
|
||||
jsr popa
|
||||
sta port_nr
|
||||
pla ; get mouse type again
|
||||
|
||||
cmp #MAX_TYPE+1
|
||||
cmp #MAX_TYPE+1 ; Check for a valid type
|
||||
bcc setup
|
||||
|
||||
ifail: lda #0 ; init. failed
|
||||
@ -203,16 +198,14 @@ _mouse_hide:
|
||||
; unsigned char mouse_buttons(void)
|
||||
|
||||
_mouse_buttons:
|
||||
ldx port_nr
|
||||
lda STRIG0,x
|
||||
ldx #0
|
||||
lda STRIG0
|
||||
bne nobut
|
||||
; lda #14
|
||||
;??? sta COLOR1
|
||||
ldx #0
|
||||
lda #1
|
||||
rts
|
||||
nobut: ldx #0
|
||||
txa
|
||||
nobut: txa
|
||||
rts
|
||||
|
||||
;--------------------------------------------------------------------
|
||||
@ -386,21 +379,8 @@ t1_vec: tya
|
||||
sta COLBK ; debug
|
||||
.endif
|
||||
|
||||
lda port_nr
|
||||
lsr ; even number 0/2
|
||||
lda PORTA
|
||||
tay
|
||||
lda PORTA,y
|
||||
ldy port_nr
|
||||
cpy #0
|
||||
beq oddp
|
||||
cpy #2
|
||||
beq oddp
|
||||
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
oddp: tay
|
||||
|
||||
mouse_vec:
|
||||
jsr st_check ; will be modified; won't be ROMmable
|
||||
@ -592,7 +572,5 @@ omy: .res 1 ; old y pos
|
||||
|
||||
mouse_off:
|
||||
.res 1
|
||||
port_nr:
|
||||
.res 1
|
||||
mouse_pm0:
|
||||
.res 1
|
||||
|
@ -12,7 +12,7 @@
|
||||
.export _mouse_buttons, _mouse_info
|
||||
|
||||
.import _readjoy
|
||||
.import popa, popax, addysp1
|
||||
.import popax, addysp1
|
||||
.importzp ptr1, sp, sreg
|
||||
|
||||
.include "c64.inc"
|
||||
@ -35,13 +35,10 @@ XCORR = SPRITE_WIDTH
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
; unsigned char __fastcall__ mouse_init (unsigned char port,
|
||||
; unsigned char type);
|
||||
; unsigned char __fastcall__ mouse_init (unsigned char type);
|
||||
;
|
||||
|
||||
_mouse_init:
|
||||
jsr popa ; Ignore type and port
|
||||
|
||||
lda OldIRQ+1 ; Already initialized?
|
||||
bne AlreadyInitialized ; Jump if yes
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
.export _mouse_pos, _mouse_info
|
||||
.export _mouse_move, _mouse_buttons
|
||||
|
||||
.import popa, popsreg, addysp1
|
||||
.import popsreg, addysp1
|
||||
.importzp sp, sreg, ptr1
|
||||
|
||||
.include "../inc/const.inc"
|
||||
@ -24,13 +24,10 @@
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
; unsigned char __fastcall__ mouse_init (unsigned char port,
|
||||
; unsigned char type);
|
||||
; unsigned char __fastcall__ mouse_init (unsigned char type);
|
||||
;
|
||||
|
||||
_mouse_init:
|
||||
jsr popa ; ignore all parameters
|
||||
|
||||
jsr StartMouseMode
|
||||
jsr MouseOff
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user