1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00

Remove duplicate code

This commit is contained in:
Karri Kaksonen 2022-04-09 07:37:07 +03:00 committed by mrdudz
parent 7e7f9ffa58
commit 770b22e14d

View File

@ -23,7 +23,6 @@
; definitely not allow direct access to the variables. ; definitely not allow direct access to the variables.
; ;
.export _setcursor
.export gotoxy, _gotoxy, _gotox, _gotoy, _wherex, _wherey .export gotoxy, _gotoxy, _gotox, _gotoy, _wherex, _wherey
.export CURS_X, CURS_Y .export CURS_X, CURS_Y
.constructor init_cursor .constructor init_cursor
@ -31,6 +30,7 @@
.importzp sp .importzp sp
.import _zones .import _zones
.import cursor
.import pusha, incsp1, pusha0, pushax, popax .import pusha, incsp1, pusha0, pushax, popax
.include "atari7800.inc" .include "atari7800.inc"
.include "extzp.inc" .include "extzp.inc"
@ -46,8 +46,6 @@ CURS_X:
.byte 0 .byte 0
CURS_Y: CURS_Y:
.byte 0 .byte 0
_cursor_visible:
.byte 1
blink_time: blink_time:
.byte 140 .byte 140
@ -79,18 +77,6 @@ umula0:
lda ptr7800 ; Load the result lda ptr7800 ; Load the result
rts rts
;-----------------------------------------------------------------------------
; Enable/disable cursor
;
.proc _setcursor
ldx _cursor_visible
sta _cursor_visible
txa
rts
.endproc
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
; Calculate cursorzone address ; Calculate cursorzone address
; You also need to set the cursorzone to point to the correct cursor Header ; You also need to set the cursorzone to point to the correct cursor Header
@ -147,7 +133,7 @@ umula0:
pla pla
sta CURS_Y sta CURS_Y
jsr calccursorzone jsr calccursorzone
lda _cursor_visible lda cursor
beq @L1 beq @L1
lda #30 ; enable cursor lda #30 ; enable cursor
@L1: ldy #1 @L1: ldy #1