From 945937b53799459f03e3d31de3850ac1d34e812b Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 14 Dec 2020 23:53:15 -0500 Subject: [PATCH] duke: clean up help printing also get rid of stripes at beginning --- duke/TODO | 1 - duke/duke.s | 4 +++ duke/duke_title.s | 62 ++++++++++++++++++++++++++++++++--------------- duke/print_help.s | 4 +++ 4 files changed, 51 insertions(+), 20 deletions(-) diff --git a/duke/TODO b/duke/TODO index 8c264c9c..e9010d74 100644 --- a/duke/TODO +++ b/duke/TODO @@ -10,7 +10,6 @@ collision detection up (hit head on jump) * when land from jump, stop walking walking right into objects, stand back one more can keep walking in collision, just don't move -shooting animation update clear screen to be black not stripes enemies exit door, blue pillar, red key (all in basement?) diff --git a/duke/duke.s b/duke/duke.s index cf1a3ed4..afd05cff 100644 --- a/duke/duke.s +++ b/duke/duke.s @@ -23,6 +23,10 @@ duke_start: bit LORES bit TEXTGR +; lda #$00 +; sta clear_all_color+1 + jsr clear_top + ;===================== ; init vars ;===================== diff --git a/duke/duke_title.s b/duke/duke_title.s index 87b597d3..f191f11d 100644 --- a/duke/duke_title.s +++ b/duke/duke_title.s @@ -196,10 +196,14 @@ done_intro: .include "gr_pageflip.s" .include "gr_copy.s" - .include "wait_a_bit.s" +; .include "wait_a_bit.s" .include "gr_offsets.s" .include "decompress_fast_v2.s" + .include "print_help.s" + .include "gr_fast_clear.s" + .include "text_print.s" + ; .include "init_state.s" ; .include "graphics_title/title_graphics.inc" ; .include "lc_detect.s" @@ -212,37 +216,57 @@ done_intro: ; .include "pt3_lib_mockingboard_detect.s" ; .include "pt3_lib_mockingboard_setup.s" - -; .include "wait_a_bit.s" - - new_title: .incbin "title/new_title.lzsa" + ;==================================== - ; draw a screen and wait + ; wait for keypress or a few seconds ;==================================== - ; X = low of lzsa - ; Y = high of lzsa - ; A = pause delay -draw_and_wait: - pha - stx getsrc_smc+1 - sty getsrc_smc+2 - lda #$c ; load to page $c00 - jsr decompress_lzsa2_fast +wait_a_bit: + + bit KEYRESET + tax + +keyloop: + lda #200 ; delay a bit + jsr WAIT + + lda KEYPRESS + bmi done_keyloop + +; bmi keypress_exit + + dex + bne keyloop + +done_keyloop: + bit KEYRESET + + cmp #'H'|$80 + bne really_done_keyloop + + bit SET_TEXT + jsr print_help + bit SET_GR + bit PAGE0 + + ldx #100 + + jmp keyloop + +really_done_keyloop: - jsr gr_copy_to_current - jsr page_flip - pla - jsr wait_a_bit rts + + + ;PT3_LOC = theme_music ;.align $100 diff --git a/duke/print_help.s b/duke/print_help.s index 1f262600..969c58ec 100644 --- a/duke/print_help.s +++ b/duke/print_help.s @@ -4,6 +4,10 @@ print_help: bit KEYRESET ; clear keyboard bit SET_TEXT + jsr normal_text + + lda #' '|$80 + sta clear_all_color+1 jsr clear_all lda #