ootw: add text to continue screen

This commit is contained in:
Vince Weaver 2019-01-16 00:28:23 -05:00
parent c7901d575c
commit 2bbf7bdd45
2 changed files with 74 additions and 3 deletions

View File

@ -307,6 +307,17 @@ quit_level:
jsr HOME
lda KEYRESET ; clear strobe
lda #0
sta DRAW_PAGE
lda #<end_message
sta OUTL
lda #>end_message
sta OUTH
jsr move_and_print
jsr move_and_print
wait_loop:
lda KEYPRESS
bpl wait_loop
@ -316,9 +327,11 @@ wait_loop:
jmp ootw
.byte "PRESS RETURN TO CONTINUE"
.byte "ACCESS CODE: IH8S"
end_message:
.byte 8,10,"PRESS RETURN TO CONTINUE",0
.byte 11,20,"ACCESS CODE: IH8S",0
.include "text_print.s"
.include "gr_pageflip.s"
.include "gr_unrle.s"
.include "gr_fast_clear.s"
@ -327,4 +340,3 @@ wait_loop:
.include "gr_offsets.s"
.include "ootw_backgrounds.inc"
.include "ootw_sprites.inc"

59
ootw/text_print.s Normal file
View File

@ -0,0 +1,59 @@
;================================
; move_and_print
;================================
; get X,Y from OUTL/OUTH
; then print following string to that address
; stop at NUL
; convert to APPLE ASCII (or with 0x80)
; leave OUTL/OUTH pointing to next string
move_and_print:
ldy #0
lda (OUTL),Y
sta CH
iny
lda (OUTL),Y
asl
tay
lda gr_offsets,Y ; lookup low-res memory address
clc
adc CH ; add in xpos
sta BASL ; store out low byte of addy
lda gr_offsets+1,Y ; look up high byte
adc DRAW_PAGE ;
sta BASH ; and store it out
; BASH:BASL now points at right place
clc
lda OUTL
adc #2
sta OUTL
lda OUTH
adc #0
sta OUTH
;================================
; print_string
;================================
print_string:
ldy #0
print_string_loop:
lda (OUTL),Y
beq done_print_string
ora #$80
sta (BASL),Y
iny
bne print_string_loop
done_print_string:
iny
clc
tya
adc OUTL
sta OUTL
lda OUTH
adc #0
sta OUTH
rts