peasant: have ESCAPE quit the intro

This commit is contained in:
Vince Weaver 2021-08-15 00:02:13 -04:00
parent 5f2ba6bf38
commit 4b1674a492
9 changed files with 49 additions and 6 deletions

View File

@ -90,7 +90,7 @@ peasant.o: peasant.s graphics/graphics.inc sprites/peasant_sprite.inc \
title.s directions.s \
intro_cottage.s intro_lake_w.s intro_lake_e.s \
intro_river.s intro_knight.s
ca65 -o peasant.o peasant.s -l intro.lst
ca65 -o peasant.o peasant.s -l peasant.lst
###

View File

@ -13,6 +13,9 @@
peasant_quest_intro:
lda #0
sta ESC_PRESSED
jsr hgr_make_tables
jsr HGR2 ; Hi-res graphics, no text at bottom
@ -41,24 +44,36 @@ peasant_quest_intro:
jsr cottage
lda ESC_PRESSED
bne escape_handler
;************************
; Lake West
;************************
jsr lake_west
lda ESC_PRESSED
bne escape_handler
;************************
; Lake East
;************************
jsr lake_east
lda ESC_PRESSED
bne escape_handler
;************************
; River
;************************
jsr river
lda ESC_PRESSED
bne escape_handler
;************************
; Knight
;************************
@ -69,15 +84,19 @@ peasant_quest_intro:
; Start actual game
;************************
; wait a bit
lda #10
jsr wait_a_bit
escape_handler:
sei ; turn off music
jsr clear_ay_both ; clear AY state
jsr draw_peasant
; wait a bit
lda #10
jsr wait_a_bit
; start game

View File

@ -140,6 +140,9 @@ regular_wait:
now_wait:
jsr wait_a_bit
lda ESC_PRESSED
bne done_cottage
inc FRAME
jmp cottage_walk_loop

View File

@ -116,6 +116,9 @@ done_knight_action:
lda #3
jsr wait_a_bit
lda ESC_PRESSED
bne done_knight
inc FRAME
jmp knight_walk_loop

View File

@ -103,6 +103,9 @@ done_lake_e_action:
lda #3
jsr wait_a_bit
lda ESC_PRESSED
bne done_lake_e
inc FRAME
jmp lake_e_walk_loop

View File

@ -104,6 +104,9 @@ done_lake_w_action:
lda #3
jsr wait_a_bit
lda ESC_PRESSED
bne done_lake_w
inc FRAME
jmp lake_w_walk_loop

View File

@ -107,6 +107,9 @@ done_river_action:
lda #3
jsr wait_a_bit
lda ESC_PRESSED
bne done_river
inc FRAME
jmp river_walk_loop

View File

@ -17,9 +17,19 @@ keyloop:
dex
bne keyloop
beq no_escape
done_keyloop:
and #$7f
cmp #27
bne no_escape
lda #1
sta ESC_PRESSED
no_escape:
bit KEYRESET
rts

View File

@ -62,8 +62,7 @@ MB_ADDR_H = $89
DONE_PLAYING = $8A
DONE_SONG = $8B
APPLEII_MODEL = $8C
ESC_PRESSED = $8D
; D0-D? used by HGR?