2021-08-15 03:31:00 +00:00
|
|
|
; Peasant's Quest Intro Sequence
|
2021-08-09 05:21:58 +00:00
|
|
|
|
|
|
|
; by Vince `deater` Weaver vince@deater.net
|
|
|
|
|
|
|
|
; with apologies to everyone
|
|
|
|
|
|
|
|
.include "hardware.inc"
|
2021-08-12 01:45:31 +00:00
|
|
|
.include "zp.inc"
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-08-14 20:01:36 +00:00
|
|
|
.include "qload.inc"
|
2021-09-26 02:44:07 +00:00
|
|
|
.include "music.inc"
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-08-15 03:31:00 +00:00
|
|
|
peasant_quest_intro:
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-08-15 04:02:13 +00:00
|
|
|
lda #0
|
|
|
|
sta ESC_PRESSED
|
2021-12-29 06:27:37 +00:00
|
|
|
sta LEVEL_OVER
|
2021-08-15 04:02:13 +00:00
|
|
|
|
2021-08-12 02:07:33 +00:00
|
|
|
jsr hgr_make_tables
|
|
|
|
|
2021-09-26 02:44:07 +00:00
|
|
|
jsr hgr2
|
2021-08-09 05:21:58 +00:00
|
|
|
|
|
|
|
|
2021-12-29 06:27:37 +00:00
|
|
|
;===============================
|
2021-08-13 01:01:05 +00:00
|
|
|
; restart music, only drum loop
|
2021-12-29 06:27:37 +00:00
|
|
|
;===============================
|
2021-08-13 01:01:05 +00:00
|
|
|
|
2021-09-30 04:57:00 +00:00
|
|
|
lda SOUND_STATUS
|
|
|
|
and #SOUND_MOCKINGBOARD
|
|
|
|
beq mockingboard_notfound
|
|
|
|
|
2021-08-13 01:01:05 +00:00
|
|
|
; hack! modify the PT3 file to ignore the latter half
|
|
|
|
|
|
|
|
lda #$ff ; end after 4 patterns
|
|
|
|
sta PT3_LOC+$C9+$4
|
|
|
|
|
|
|
|
lda #$0 ; set LOOP to 0
|
|
|
|
sta PT3_LOC+$66
|
|
|
|
|
|
|
|
jsr pt3_init_song
|
|
|
|
|
|
|
|
cli
|
2021-09-30 04:57:00 +00:00
|
|
|
mockingboard_notfound:
|
2021-08-13 01:01:05 +00:00
|
|
|
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
; Cottage
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-12-30 05:46:21 +00:00
|
|
|
jsr intro_cottage
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-08-15 04:02:13 +00:00
|
|
|
lda ESC_PRESSED
|
|
|
|
bne escape_handler
|
|
|
|
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
; Lake West
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-12-30 05:46:21 +00:00
|
|
|
jsr intro_lake_west
|
2021-08-10 18:05:41 +00:00
|
|
|
|
2021-08-15 04:02:13 +00:00
|
|
|
lda ESC_PRESSED
|
|
|
|
bne escape_handler
|
|
|
|
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
; Lake East
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-12-30 05:46:21 +00:00
|
|
|
jsr intro_lake_east
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-08-15 04:02:13 +00:00
|
|
|
lda ESC_PRESSED
|
|
|
|
bne escape_handler
|
|
|
|
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
; River
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-12-30 05:46:21 +00:00
|
|
|
jsr intro_river
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-08-15 04:02:13 +00:00
|
|
|
lda ESC_PRESSED
|
|
|
|
bne escape_handler
|
|
|
|
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
; Knight
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-12-30 05:46:21 +00:00
|
|
|
jsr intro_knight
|
2021-08-09 05:21:58 +00:00
|
|
|
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-15 03:31:00 +00:00
|
|
|
; Start actual game
|
2021-12-29 06:27:37 +00:00
|
|
|
;========================
|
2021-08-11 23:29:47 +00:00
|
|
|
|
2021-08-16 05:31:49 +00:00
|
|
|
jsr draw_peasant
|
|
|
|
|
2021-08-15 04:02:13 +00:00
|
|
|
; wait a bit
|
|
|
|
|
|
|
|
lda #10
|
|
|
|
jsr wait_a_bit
|
|
|
|
|
|
|
|
escape_handler:
|
|
|
|
|
2021-09-30 04:57:00 +00:00
|
|
|
;==========================
|
|
|
|
; disable music
|
|
|
|
|
|
|
|
lda SOUND_STATUS
|
|
|
|
and #SOUND_MOCKINGBOARD
|
|
|
|
beq mockingboard_notfound2
|
|
|
|
|
2021-08-15 03:31:00 +00:00
|
|
|
sei ; turn off music
|
|
|
|
jsr clear_ay_both ; clear AY state
|
|
|
|
|
2021-09-17 23:18:38 +00:00
|
|
|
jsr mockingboard_disable_interrupt
|
2021-09-30 04:57:00 +00:00
|
|
|
mockingboard_notfound2:
|
2021-08-15 03:31:00 +00:00
|
|
|
|
2021-10-04 02:46:24 +00:00
|
|
|
|
|
|
|
|
2021-08-18 04:29:23 +00:00
|
|
|
;=============================
|
|
|
|
; start new game
|
|
|
|
;=============================
|
2021-08-11 23:29:47 +00:00
|
|
|
|
2021-10-17 23:58:14 +00:00
|
|
|
jmp start_new_game
|
2021-08-18 04:29:23 +00:00
|
|
|
|
2021-10-17 23:58:14 +00:00
|
|
|
.include "new_game.s"
|
2021-08-18 04:29:23 +00:00
|
|
|
|
2021-08-14 19:01:59 +00:00
|
|
|
.include "intro_cottage.s"
|
|
|
|
.include "intro_lake_w.s"
|
|
|
|
.include "intro_lake_e.s"
|
|
|
|
.include "intro_river.s"
|
|
|
|
.include "intro_knight.s"
|
2021-08-10 18:05:41 +00:00
|
|
|
|
2021-08-14 17:48:02 +00:00
|
|
|
.include "draw_peasant.s"
|
|
|
|
|
2021-08-12 18:07:19 +00:00
|
|
|
.include "hgr_1x5_sprite.s"
|
2021-09-26 19:41:43 +00:00
|
|
|
|
2021-12-29 06:27:37 +00:00
|
|
|
.include "hgr_sprite.s"
|
2021-08-13 00:36:32 +00:00
|
|
|
|
2021-10-02 18:43:58 +00:00
|
|
|
.include "gr_copy.s"
|
2021-12-29 06:27:37 +00:00
|
|
|
.include "hgr_copy.s"
|
2021-10-02 18:43:58 +00:00
|
|
|
|
2021-09-26 02:44:07 +00:00
|
|
|
.include "wait.s"
|
2021-08-12 19:41:39 +00:00
|
|
|
.include "wait_a_bit.s"
|
2021-08-10 05:09:35 +00:00
|
|
|
|
2021-10-13 01:18:40 +00:00
|
|
|
.include "graphics_peasantry/graphics_intro.inc"
|
2021-09-17 23:18:38 +00:00
|
|
|
|
2021-10-13 01:18:40 +00:00
|
|
|
.include "graphics_peasantry/priority_intro.inc"
|
2021-10-07 04:43:44 +00:00
|
|
|
|
2021-11-16 17:42:28 +00:00
|
|
|
.include "text/intro.inc"
|
|
|
|
|
2021-12-31 05:18:29 +00:00
|
|
|
.include "animate_bubbles.s"
|
|
|
|
|
2021-10-07 04:43:44 +00:00
|
|
|
skip_text:
|
|
|
|
.byte 0,2,"ESC Skips",0
|
|
|
|
|
|
|
|
;===================
|
|
|
|
; print title
|
|
|
|
intro_print_title:
|
|
|
|
lda #<peasant_text
|
|
|
|
sta OUTL
|
|
|
|
lda #>peasant_text
|
|
|
|
sta OUTH
|
|
|
|
|
|
|
|
jsr hgr_put_string
|
|
|
|
|
|
|
|
lda #<skip_text
|
|
|
|
sta OUTL
|
|
|
|
lda #>skip_text
|
|
|
|
sta OUTH
|
|
|
|
|
|
|
|
jmp hgr_put_string ; tail call
|
|
|
|
|
|
|
|
|