mode7: more optimization

This commit is contained in:
Vince Weaver 2017-12-31 17:29:21 -05:00
parent 62fba23449
commit 999cdbb6ac

View File

@ -183,10 +183,9 @@ plot_star:
; Xcoord in XPOS ; Xcoord in XPOS
; Ycoord in Y ; Ycoord in Y
tya ; 2
tya and #$fe ; mask to make it even ; 2
and #$fe tay ; 2
tay
lda gr_offsets,Y ; lookup low-res memory address ; 4 lda gr_offsets,Y ; lookup low-res memory address ; 4
clc ; 2 clc ; 2
@ -255,13 +254,13 @@ move_loop_skip:
starfield_keyboard: starfield_keyboard:
jsr get_key ; get keypress ; 6 ; jsr get_key ; get keypress ; 6
lda LASTKEY ; 3 ; lda LASTKEY ; 3
cmp #('Q') ; if quit, then return ; cmp #('Q') ; if quit, then return
bne skipskip ; bne skipskip
rts ; rts
skipskip: skipskip:
@ -313,12 +312,10 @@ random_star:
; External modules ; External modules
;=============================================== ;===============================================
;.include "../asm_routines/hlin_clearscreen.s"
.include "../asm_routines/pageflip.s" .include "../asm_routines/pageflip.s"
.include "../asm_routines/gr_setpage.s" .include "../asm_routines/gr_setpage.s"
.include "../asm_routines/keypress.s" ;.include "../asm_routines/keypress.s"
.include "../asm_routines/gr_putsprite.s" ;.include "../asm_routines/gr_putsprite.s"
.include "../asm_routines/text_print.s"
.include "../asm_routines/gr_offsets.s" .include "../asm_routines/gr_offsets.s"
.include "../asm_routines/gr_fast_clear.s" .include "../asm_routines/gr_fast_clear.s"