diff --git a/games/peasant/Makefile b/games/peasant/Makefile index 531d45d3..319e0a5e 100644 --- a/games/peasant/Makefile +++ b/games/peasant/Makefile @@ -6,10 +6,10 @@ TOKENIZE = ../../utils/asoft_basic-utils/tokenize_asoft LINKER_SCRIPTS = ../../linker_scripts EMPTY_DISK = ../../empty_disk -all: peasant.dsk +all: peasant.dsk peasant_side2.dsk peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK \ - PEASANT1 PEASANT2 PEASANT3 PEASANT4 + PEASANT1 PEASANT2 PEASANT3 PEASANT4 ENDING cp $(EMPTY_DISK)/empty.dsk peasant.dsk # $(DOS33) -y peasant.dsk BSAVE -a 0x6000 INTRO $(DOS33_RAW) peasant.dsk 0 0 QBOOT 0 1 @@ -21,14 +21,20 @@ peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK \ $(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 PEASANT1 0 0 - $(DOS33_RAW) peasant.dsk 19 0 PEASANT2 0 0 +# $(DOS33_RAW) peasant.dsk 19 0 PEASANT2 0 0 + $(DOS33_RAW) peasant.dsk 19 0 ENDING 0 0 $(DOS33_RAW) peasant.dsk 24 0 PEASANT3 0 0 $(DOS33_RAW) peasant.dsk 29 0 PEASANT4 0 0 +peasant_side2.dsk: ENDING + cp $(EMPTY_DISK)/empty.dsk peasant_side2.dsk + $(DOS33_RAW) peasant.dsk 14 0 ENDING 0 0 + + ### -HELLO: hello.bas - $(TOKENIZE) < hello.bas > HELLO +#HELLO: hello.bas +# $(TOKENIZE) < hello.bas > HELLO ### @@ -148,6 +154,23 @@ peasant4.o: peasant4.s zp.inc \ ### +ENDING: ending.o + ld65 -o ENDING ending.o -C $(LINKER_SCRIPTS)/apple2_6000.inc + +ending.o: ending.s zp.inc \ + graphics_end/ending_graphics.inc sprites/peasant_sprite.inc \ + sprites/inventory_sprites.inc \ + draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ + hgr_7x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ + wait_a_bit.s draw_peasant.s hgr_text_box.s \ + keyboard.s parse_input.s new_map_location.s \ + peasant_move.s score.s inventory.s + + ca65 -o ending.o ending.s -l ending.lst + + +### + COPY_CHECK: copy_check.o ld65 -o COPY_CHECK copy_check.o -C $(LINKER_SCRIPTS)/apple2_6000.inc @@ -190,5 +213,6 @@ sprites/inventory_sprites.inc: clean: rm -f *~ *.o *.lst HELLO VID_LOGO TITLE INTRO COPY_CHECK \ - PEASANT1 PEASANT2 PEASANT3 PEASANT4 + PEASANT1 PEASANT2 PEASANT3 PEASANT4 \ + ENDING diff --git a/games/peasant/ending.s b/games/peasant/ending.s new file mode 100644 index 00000000..8389198d --- /dev/null +++ b/games/peasant/ending.s @@ -0,0 +1,132 @@ +; Peasant's Quest Ending + +; From when the sword hits Trogdor on + +; by Vince `deater` Weaver vince@deater.net + +.include "hardware.inc" +.include "zp.inc" + +.include "qload.inc" + +ending: + lda #0 + sta GAME_OVER + + jsr hgr_make_tables + + jsr HGR2 ; Hi-res graphics, no text at bottom + ; Y=0, A=0 after this called + + + lda #0 + sta FRAME + + ; update score + + jsr update_score + + ; start music? + + +trogdor_cave: + + lda #trogdor_cave_lzsa + sta getsrc_smc+2 + + lda #$40 + + jsr decompress_lzsa2_fast + + jsr wait_until_keypress + +waterfall: + + lda #waterfall_lzsa + sta getsrc_smc+2 + + lda #$40 + + jsr decompress_lzsa2_fast + + jsr wait_until_keypress + +jhonka: + + lda #jhonka_lzsa + sta getsrc_smc+2 + + lda #$40 + + jsr decompress_lzsa2_fast + + jsr wait_until_keypress + +cottage: + + lda #cottage_lzsa + sta getsrc_smc+2 + + lda #$40 + + jsr decompress_lzsa2_fast + + jsr wait_until_keypress + + + +final_screen: + + lda #the_end_lzsa + sta getsrc_smc+2 + + lda #$40 + + jsr decompress_lzsa2_fast + +game_over: + + jsr game_over + + +peasant_text: + .byte 25,2,"Peasant's Quest",0 + + +.include "decompress_fast_v2.s" +.include "wait_keypress.s" + +;.include "draw_peasant.s" + +.include "hgr_font.s" +.include "draw_box.s" +.include "hgr_rectangle.s" +;.include "hgr_7x28_sprite_mask.s" +.include "hgr_1x5_sprite.s" +;.include "hgr_save_restore.s" +.include "hgr_partial_save.s" +.include "hgr_input.s" +.include "hgr_tables.s" +.include "hgr_text_box.s" +.include "clear_bottom.s" +.include "gr_offsets.s" + +.include "gr_copy.s" + +.include "score.s" + +.include "wait_a_bit.s" + +.include "version.inc" + +.include "graphics_end/ending_graphics.inc" diff --git a/games/peasant/graphics_end/Makefile b/games/peasant/graphics_end/Makefile new file mode 100644 index 00000000..4047ee4b --- /dev/null +++ b/games/peasant/graphics_end/Makefile @@ -0,0 +1,73 @@ + +PNG2RLE = ../../../utils/gr-utils/png2rle +PNG2GR = ../../../utils/gr-utils/png2gr +PNG2HGR = ../../../utils/hgr-utils/png2hgr +LZSA = ~/research/lzsa/lzsa/lzsa +B2D = ../../../utils/bmp2dhr/b2d + +all: ending_graphics.inc + + +ending_graphics.inc: \ + trogdor_cave.lzsa \ + waterfall.lzsa \ + jhonka.lzsa \ + cottage.lzsa \ + the_end.lzsa + echo "trogdor_cave_lzsa: .incbin \"trogdor_cave.lzsa\"" > ending_graphics.inc + echo "waterfall_lzsa: .incbin \"waterfall.lzsa\"" >> ending_graphics.inc + echo "jhonka_lzsa: .incbin \"jhonka.lzsa\"" >> ending_graphics.inc + echo "cottage_lzsa: .incbin \"cottage.lzsa\"" >> ending_graphics.inc + echo "the_end_lzsa: .incbin \"the_end.lzsa\"" >> ending_graphics.inc + + +### + +trogdor_cave.lzsa: trogdor_cave.hgr + $(LZSA) -r -f2 trogdor_cave.hgr trogdor_cave.lzsa + +trogdor_cave.hgr: trogdor_cave.png + $(PNG2HGR) trogdor_cave.png > trogdor_cave.hgr + +### + +waterfall.lzsa: waterfall.hgr + $(LZSA) -r -f2 waterfall.hgr waterfall.lzsa + +waterfall.hgr: waterfall.png + $(PNG2HGR) waterfall.png > waterfall.hgr + +### + +jhonka.lzsa: jhonka.hgr + $(LZSA) -r -f2 jhonka.hgr jhonka.lzsa + +jhonka.hgr: jhonka.png + $(PNG2HGR) jhonka.png > jhonka.hgr + +### + +cottage.lzsa: cottage.hgr + $(LZSA) -r -f2 cottage.hgr cottage.lzsa + +cottage.hgr: cottage.png + $(PNG2HGR) cottage.png > cottage.hgr + + +### + +the_end.lzsa: the_end.hgr + $(LZSA) -r -f2 the_end.hgr the_end.lzsa + +the_end.hgr: the_end.png + $(PNG2HGR) the_end.png > the_end.hgr + + + + +### + + +clean: + rm -f *~ copy_graphics.inc *.lzsa *.gr *.hgr + diff --git a/games/peasant/graphics_end/cottage.png b/games/peasant/graphics_end/cottage.png new file mode 100644 index 00000000..e7a12d08 Binary files /dev/null and b/games/peasant/graphics_end/cottage.png differ diff --git a/games/peasant/graphics_end/jhonka.png b/games/peasant/graphics_end/jhonka.png new file mode 100644 index 00000000..0888c96d Binary files /dev/null and b/games/peasant/graphics_end/jhonka.png differ diff --git a/games/peasant/graphics_end/the_end.png b/games/peasant/graphics_end/the_end.png new file mode 100644 index 00000000..9ec5664e Binary files /dev/null and b/games/peasant/graphics_end/the_end.png differ diff --git a/games/peasant/graphics_end/trogdor_cave.png b/games/peasant/graphics_end/trogdor_cave.png new file mode 100644 index 00000000..e157f3ab Binary files /dev/null and b/games/peasant/graphics_end/trogdor_cave.png differ diff --git a/games/peasant/graphics_end/waterfall.png b/games/peasant/graphics_end/waterfall.png new file mode 100644 index 00000000..4a9307e6 Binary files /dev/null and b/games/peasant/graphics_end/waterfall.png differ