diff --git a/games/peasant/Makefile b/games/peasant/Makefile index 0d7fd01a..4053e122 100644 --- a/games/peasant/Makefile +++ b/games/peasant/Makefile @@ -9,7 +9,7 @@ EMPTY_DISK = ../../empty_disk all: peasant.dsk peasant_side2.dsk peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK \ - PEASANT1 PEASANT2 PEASANT3 PEASANT4 ENDING + PEASANT1 PEASANT2 PEASANT3 PEASANT4 ENDING TROGDOR cp $(EMPTY_DISK)/empty.dsk peasant.dsk # $(DOS33) -y peasant.dsk BSAVE -a 0x6000 INTRO $(DOS33_RAW) peasant.dsk 0 0 QBOOT 0 1 @@ -22,13 +22,15 @@ peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK \ $(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 ENDING 0 0 - $(DOS33_RAW) peasant.dsk 24 0 PEASANT3 0 0 + $(DOS33_RAW) peasant.dsk 19 0 TROGDOR 0 0 +# $(DOS33_RAW) peasant.dsk 24 0 PEASANT3 0 0 + $(DOS33_RAW) peasant.dsk 24 0 ENDING 0 0 $(DOS33_RAW) peasant.dsk 29 0 PEASANT4 0 0 -peasant_side2.dsk: ENDING +peasant_side2.dsk: TROGDOR ENDING cp $(EMPTY_DISK)/empty.dsk peasant_side2.dsk - $(DOS33_RAW) peasant.dsk 14 0 ENDING 0 0 + $(DOS33_RAW) peasant.dsk 19 0 TROGDOR 0 0 + $(DOS33_RAW) peasant.dsk 24 0 ENDING 0 0 ### @@ -154,6 +156,22 @@ peasant4.o: peasant4.s zp.inc \ ### +TROGDOR: trogdor.o + ld65 -o TROGDOR trogdor.o -C $(LINKER_SCRIPTS)/apple2_6000.inc + +trogdor.o: trogdor.s zp.inc \ + graphics_trogdor/trogdor_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 trogdor.o trogdor.s -l trogdor.lst + +### + ENDING: ending.o ld65 -o ENDING ending.o -C $(LINKER_SCRIPTS)/apple2_6000.inc @@ -205,6 +223,9 @@ graphics/graphics_peasant1.inc: graphics_copy/copy_graphics.inc: cd graphics_copy && make +graphics_trogdor/trogdor_graphics.inc: + cd graphics_trogdor && make + graphics_end/ending_graphics.inc: cd graphics_end && make @@ -217,5 +238,5 @@ sprites/inventory_sprites.inc: clean: rm -f *~ *.o *.lst HELLO VID_LOGO TITLE INTRO COPY_CHECK \ PEASANT1 PEASANT2 PEASANT3 PEASANT4 \ - ENDING + TROGDOR ENDING diff --git a/games/peasant/ending.s b/games/peasant/ending.s index a4bf68b8..253c0492 100644 --- a/games/peasant/ending.s +++ b/games/peasant/ending.s @@ -29,19 +29,6 @@ ending: ; start music? -trogdor_cave: - - lda #trogdor_cave_lzsa - sta getsrc_smc+2 - - lda #$40 - - jsr decompress_lzsa2_fast - - jsr wait_until_keypress - boat: lda # ending_graphics.inc - echo "lake_e_boat_lzsa: .incbin \"lake_e_boat.lzsa\"" >> ending_graphics.inc + echo "lake_e_boat_lzsa: .incbin \"lake_e_boat.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 - ### lake_e_boat.lzsa: lake_e_boat.hgr @@ -79,5 +68,5 @@ the_end.hgr: the_end.png clean: - rm -f *~ copy_graphics.inc *.lzsa *.gr *.hgr + rm -f *~ ending_graphics.inc *.lzsa *.gr *.hgr diff --git a/games/peasant/graphics_trogdor/Makefile b/games/peasant/graphics_trogdor/Makefile new file mode 100644 index 00000000..fca279c7 --- /dev/null +++ b/games/peasant/graphics_trogdor/Makefile @@ -0,0 +1,59 @@ + +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: trogdor_graphics.inc + + +trogdor_graphics.inc: \ + trogdor_cave.lzsa \ + trogdor_open.lzsa \ + trogdor_flame1.lzsa \ + trogdor_flame2.lzsa + echo "trogdor_cave_lzsa: .incbin \"trogdor_cave.lzsa\"" > trogdor_graphics.inc + echo "trogdor_open_lzsa: .incbin \"trogdor_open.lzsa\"" >> trogdor_graphics.inc + echo "trogdor_flame1_lzsa: .incbin \"trogdor_flame1.lzsa\"" >> trogdor_graphics.inc + echo "trogdor_flame2_lzsa: .incbin \"trogdor_flame2.lzsa\"" >> trogdor_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 + +### + +trogdor_open.lzsa: trogdor_open.hgr + $(LZSA) -r -f2 trogdor_open.hgr trogdor_open.lzsa + +trogdor_open.hgr: trogdor_open.png + $(PNG2HGR) trogdor_open.png > trogdor_open.hgr + +### + +trogdor_flame1.lzsa: trogdor_flame1.hgr + $(LZSA) -r -f2 trogdor_flame1.hgr trogdor_flame1.lzsa + +trogdor_flame1.hgr: trogdor_flame1.png + $(PNG2HGR) trogdor_flame1.png > trogdor_flame1.hgr + +### + +trogdor_flame2.lzsa: trogdor_flame2.hgr + $(LZSA) -r -f2 trogdor_flame2.hgr trogdor_flame2.lzsa + +trogdor_flame2.hgr: trogdor_flame2.png + $(PNG2HGR) trogdor_flame2.png > trogdor_flame2.hgr + + +### + + +clean: + rm -f *~ trogdor_graphics.inc *.lzsa *.gr *.hgr + diff --git a/games/peasant/graphics_end/trogdor_cave.png b/games/peasant/graphics_trogdor/trogdor_cave.png similarity index 100% rename from games/peasant/graphics_end/trogdor_cave.png rename to games/peasant/graphics_trogdor/trogdor_cave.png diff --git a/games/peasant/graphics_trogdor/trogdor_flame1.png b/games/peasant/graphics_trogdor/trogdor_flame1.png new file mode 100644 index 00000000..b863d6e0 Binary files /dev/null and b/games/peasant/graphics_trogdor/trogdor_flame1.png differ diff --git a/games/peasant/graphics_trogdor/trogdor_flame2.png b/games/peasant/graphics_trogdor/trogdor_flame2.png new file mode 100644 index 00000000..77954a15 Binary files /dev/null and b/games/peasant/graphics_trogdor/trogdor_flame2.png differ diff --git a/games/peasant/graphics_trogdor/trogdor_open.png b/games/peasant/graphics_trogdor/trogdor_open.png new file mode 100644 index 00000000..7d5a8a04 Binary files /dev/null and b/games/peasant/graphics_trogdor/trogdor_open.png differ diff --git a/games/peasant/trogdor.s b/games/peasant/trogdor.s new file mode 100644 index 00000000..32ec00e0 --- /dev/null +++ b/games/peasant/trogdor.s @@ -0,0 +1,141 @@ +; 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" + +trogdor: + 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 + +trogdor_open: + + lda #trogdor_open_lzsa + sta getsrc_smc+2 + + lda #$40 + + jsr decompress_lzsa2_fast + + jsr wait_until_keypress + + +trogdor_flame1: + + lda #trogdor_flame1_lzsa + sta getsrc_smc+2 + + lda #$40 + + jsr decompress_lzsa2_fast + + jsr wait_until_keypress + +trogdor_flame2: + + lda #trogdor_flame2_lzsa + sta getsrc_smc+2 + + lda #$40 + + jsr decompress_lzsa2_fast + + jsr wait_until_keypress + + +game_over: + +; jsr game_over + + jsr trogdor_cave + + +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_trogdor/trogdor_graphics.inc" + +trogdor_string: + .byte 34,"I can honestly say it'll",13 + .byte "be a pleasure and an honor",13 + .byte "to burninate you, Rather",13 + .byte "Dashing.",0 + +trogdor_string2: + .byte "Aw that sure was nice of",13 + .byte "him!",0 + +trogdor_string3: + .byte "Congratulations! You've",13 + .byte "won! No one can kill",13 + .byte "Trogdor but you came closer",13 + .byte "than anybody ever! Way to",13 + .byte "go!",0 +