From 5f2ba6bf3837a3e81c03c31c6b89579b3daadee3 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 14 Aug 2021 23:31:00 -0400 Subject: [PATCH] peasant: split game off from intro --- games/peasant/Makefile | 18 +++++++++- games/peasant/intro.s | 20 ++++++++--- games/peasant/intro_knight.s | 65 ------------------------------------ games/peasant/qload.s | 4 +-- 4 files changed, 35 insertions(+), 72 deletions(-) diff --git a/games/peasant/Makefile b/games/peasant/Makefile index d6a18acd..2702e6a7 100644 --- a/games/peasant/Makefile +++ b/games/peasant/Makefile @@ -8,7 +8,7 @@ EMPTY_DISK = ../../empty_disk all: peasant.dsk -peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK +peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK PEASANT cp $(EMPTY_DISK)/empty.dsk peasant.dsk # $(DOS33) -y peasant.dsk BSAVE -a 0x6000 INTRO $(DOS33_RAW) peasant.dsk 0 0 QBOOT 0 1 @@ -19,6 +19,7 @@ peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK $(DOS33_RAW) peasant.dsk 5 0 TITLE 0 0 $(DOS33_RAW) peasant.dsk 8 0 INTRO 0 0 $(DOS33_RAW) peasant.dsk 12 0 COPY_CHECK 0 0 + $(DOS33_RAW) peasant.dsk 14 0 PEASANT 0 0 ### @@ -79,6 +80,21 @@ intro.o: intro.s graphics/graphics.inc sprites/peasant_sprite.inc \ ### +PEASANT: peasant.o + ld65 -o PEASANT peasant.o -C $(LINKER_SCRIPTS)/apple2_6000.inc + +peasant.o: peasant.s graphics/graphics.inc sprites/peasant_sprite.inc \ + draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ + hgr_7x30_sprite.s hgr_1x5_sprite.s hgr_save_restore.s \ + wait_a_bit.s draw_peasant.s hgr_text_box.s \ + 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 + + +### + COPY_CHECK: copy_check.o ld65 -o COPY_CHECK copy_check.o -C $(LINKER_SCRIPTS)/apple2_6000.inc diff --git a/games/peasant/intro.s b/games/peasant/intro.s index 68ebc8a3..22ab745b 100644 --- a/games/peasant/intro.s +++ b/games/peasant/intro.s @@ -1,4 +1,4 @@ -; A Peasant's Quest???? +; Peasant's Quest Intro Sequence ; by Vince `deater` Weaver vince@deater.net @@ -11,7 +11,7 @@ -peasant_quest: +peasant_quest_intro: jsr hgr_make_tables @@ -66,10 +66,22 @@ peasant_quest: jsr knight ;************************ - ; Ending + ; Start actual game ;************************ - lda #LOAD_COPY_CHECK + 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 + + lda #LOAD_PEASANT sta WHICH_LOAD rts diff --git a/games/peasant/intro_knight.s b/games/peasant/intro_knight.s index df7c7073..dca97cf7 100644 --- a/games/peasant/intro_knight.s +++ b/games/peasant/intro_knight.s @@ -126,71 +126,6 @@ done_knight_action: done_knight: - ; after OK stuff goes on here - - sei ; turn off music - jsr clear_ay_both - - jsr draw_peasant - - ; wait a bit - - lda #10 - jsr wait_a_bit - - ; restore bg - - jsr hgr_restore - - ; put score - - lda #score_text - sta OUTH - - jsr hgr_put_string - - ; draw peasant - - jsr draw_peasant - - ; draw rectangle on bottom - -; draw rectangle - - lda #$00 ; color is black1 - sta VGI_RCOLOR - - lda #0 - sta VGI_RX1 - lda #183 - sta VGI_RY1 - lda #140 - sta VGI_RXRUN - lda #9 - sta VGI_RYRUN - - jsr vgi_simple_rectangle - - lda #140 - sta VGI_RX1 - lda #183 - sta VGI_RY1 - lda #140 - sta VGI_RXRUN - lda #9 - sta VGI_RYRUN - - jsr vgi_simple_rectangle - - - - - ; fake get text - - jsr hgr_input - rts diff --git a/games/peasant/qload.s b/games/peasant/qload.s index 89eb1181..3e09fa2a 100644 --- a/games/peasant/qload.s +++ b/games/peasant/qload.s @@ -208,7 +208,7 @@ load_address_array: track_array: .byte 3, 5, 8,12 ; VID_LOGO, TITLE, INTRO, COPY_CHECK - .byte 18,31,11, 1 ; PEASANT + .byte 14,31,11, 1 ; PEASANT .byte 27,26,10,20 ; .byte 30,32,28,30 ; .byte 0 ; @@ -217,7 +217,7 @@ track_array: sector_array: .byte 0, 0, 0, 0 ; VID_LOGO, TITLE, INTRO, COPY_CHECK - .byte 0, 8, 0, 0 ; PEASANT + .byte 0, 0, 0, 0 ; PEASANT .byte 0, 0, 0, 0 ; .byte 0,13, 0, 1 ; .byte 6 ;