d2_hgr: more inlining

This commit is contained in:
Vince Weaver 2021-11-11 21:08:35 -05:00
parent 2d44b76a59
commit 0169619c28
4 changed files with 38 additions and 34 deletions

View File

@ -9,4 +9,4 @@ cbloop:
sta $B00,X sta $B00,X
dex dex
bne cbloop bne cbloop
rts ; rts

View File

@ -79,10 +79,24 @@ sin_done:
;===================== ;=====================
; setup credits ; setup credits
; TODO: inline?
jsr print_message ;===================
; print message
;===================
print_message:
.include "clear_bottom.s"
ldx #12
print_message_loop:
lda message1,X
sta $6d2,X
sta $Ad2,X
lda message2,X
sta $6ea,X
sta $Aea,X
dex
bpl print_message_loop
;========================== ;==========================
@ -90,7 +104,7 @@ sin_done:
;========================== ;==========================
jsr dsr_spin .include "dsr_shape.s"
; start music, no music for spin ; start music, no music for spin
@ -127,11 +141,17 @@ forever:
;===================== ;=====================
; repeat ; repeat
; switch things up for the second round
lda #$7f lda #$7f
sta color_smc+1 sta color_smc+1
lda #159 lda #159
sta moving_size_smc+1 sta moving_size_smc+1
sta oval_size_smc+1 sta oval_size_smc+1
lda #<colorlookup2
sta colorlookup_smc+1
; make split screen so credits are visible
bit TEXTGR bit TEXTGR
@ -156,27 +176,7 @@ done_flip_page:
rts rts
;===================
; print message
;===================
print_message:
; TODO: inline?
jsr clear_both_bottoms
ldx #12
print_message_loop:
lda message1,X
sta $6d2,X
sta $Ad2,X
lda message2,X
sta $6ea,X
sta $Aea,X
dex
bpl print_message_loop
rts
; 01234567890123456789012345678901234567890" ; 01234567890123456789012345678901234567890"
@ -196,18 +196,21 @@ hiasc "CODE: DEATER"
message2: message2:
hiasc "MUSIC: MA2E " hiasc "MUSIC: MA2E "
.include "dsr_shape.s"
;.include "oval.s"
.include "clear_bottom.s"
colorlookup2:
.byte $11,$55,$5d,$7f,$5d,$55,$11,$00 shape_dsr:
.byte $2d,$36,$ff,$3f
.byte $24,$ad,$22,$24,$94,$21,$2c,$4d
.byte $91,$3f,$36,$00
even_lookup: even_lookup:
.byte $D7,$DD,$F5, $D5,$D5,$D5,$D5 .byte $D7,$DD,$F5, $D5,$D5,$D5,$D5
odd_lookup: odd_lookup:
.byte $AA,$AA,$AA, $AB,$AE,$BA,$EA .byte $AA,$AA,$AA, $AB,$AE,$BA,$EA
colorlookup2:
.byte $11,$55,$5d,$7f,$5d,$55,$11,$00
colorlookup: colorlookup:
.byte $22,$aa,$ba,$ff,$ba,$aa,$22 ; use 00 from sinetable .byte $22,$aa,$ba,$ff,$ba,$aa,$22 ; use 00 from sinetable

View File

@ -77,9 +77,9 @@ hclr_smc:
and #$1f and #$1f
bne hclr_outer bne hclr_outer
rts ; rts
shape_dsr: ;shape_dsr:
.byte $2d,$36,$ff,$3f ;.byte $2d,$36,$ff,$3f
.byte $24,$ad,$22,$24,$94,$21,$2c,$4d ;.byte $24,$ad,$22,$24,$94,$21,$2c,$4d
.byte $91,$3f,$36,$00 ;.byte $91,$3f,$36,$00

View File

@ -65,6 +65,7 @@ row_sum_smc:
; which helps proper color gen ; which helps proper color gen
and #$7 ; 2 and #$7 ; 2
tax ; 2 tax ; 2
colorlookup_smc:
lda colorlookup,X ; lookup in table ; 5 lda colorlookup,X ; lookup in table ; 5
ror_nop_smc: ror_nop_smc: