mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-20 17:29:28 +00:00
mist: minor size optimization in the direction code
This commit is contained in:
parent
db8a45e483
commit
907cbf7add
|
@ -74,6 +74,7 @@ finger_not_special:
|
||||||
bne really_not_special
|
bne really_not_special
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
really_not_special:
|
really_not_special:
|
||||||
|
|
||||||
; check for left/right
|
; check for left/right
|
||||||
|
@ -120,38 +121,18 @@ real_finger_point:
|
||||||
jmp finger_draw
|
jmp finger_draw
|
||||||
|
|
||||||
check_cursor_left:
|
check_cursor_left:
|
||||||
lda DIRECTION
|
jsr lookup_direction
|
||||||
and #$f
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
clc
|
|
||||||
ldy #LOCATION_BGS
|
|
||||||
adc (LOCATION_STRUCT_L),Y
|
|
||||||
tay
|
|
||||||
|
|
||||||
lda direction_lookup,Y
|
|
||||||
and #$f
|
and #$f
|
||||||
beq finger_point
|
beq finger_point
|
||||||
cmp #1
|
cmp #$1
|
||||||
beq finger_left
|
beq finger_left
|
||||||
bne finger_uturn_left
|
bne finger_uturn_left
|
||||||
|
|
||||||
check_cursor_right:
|
check_cursor_right:
|
||||||
|
|
||||||
lda DIRECTION
|
jsr lookup_direction
|
||||||
and #$f
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
clc
|
|
||||||
ldy #LOCATION_BGS
|
|
||||||
adc (LOCATION_STRUCT_L),Y
|
|
||||||
tay
|
|
||||||
|
|
||||||
lda direction_lookup,Y
|
|
||||||
and #$f0
|
and #$f0
|
||||||
|
|
||||||
beq finger_point
|
beq finger_point
|
||||||
|
@ -159,6 +140,22 @@ check_cursor_right:
|
||||||
beq finger_right
|
beq finger_right
|
||||||
bne finger_uturn_right
|
bne finger_uturn_right
|
||||||
|
|
||||||
|
lookup_direction:
|
||||||
|
lda DIRECTION
|
||||||
|
and #$f
|
||||||
|
asl
|
||||||
|
asl
|
||||||
|
asl
|
||||||
|
asl
|
||||||
|
clc
|
||||||
|
ldy #LOCATION_BGS
|
||||||
|
adc (LOCATION_STRUCT_L),Y
|
||||||
|
tay
|
||||||
|
|
||||||
|
lda direction_lookup,Y
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
finger_left:
|
finger_left:
|
||||||
lda #1
|
lda #1
|
||||||
sta IN_LEFT
|
sta IN_LEFT
|
||||||
|
|
Loading…
Reference in New Issue
Block a user