diff --git a/games/peasant/Makefile b/games/peasant/Makefile index e923f313..9903429b 100644 --- a/games/peasant/Makefile +++ b/games/peasant/Makefile @@ -212,6 +212,7 @@ GAME_OVER: game_over.o game_over.o: game_over.s zp.inc \ graphics_over/game_over_graphics.inc \ + graphics_over/game_over_animation.inc \ draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ hgr_1x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ wait_a_bit.s draw_peasant.s hgr_text_box.s \ diff --git a/games/peasant/game_over.s b/games/peasant/game_over.s index c506a855..eeedb75c 100644 --- a/games/peasant/game_over.s +++ b/games/peasant/game_over.s @@ -1,4 +1,6 @@ -; Game Over Screen +; IT'S OVER!!!!!!!! + +; game over screen for peasant's quest ; by Vince `deater` Weaver vince@deater.net @@ -53,7 +55,61 @@ game_over: ;===================== ; animate ending - ; TODO + ; pause a bit at first + + lda #10 + jsr wait_a_bit + + ; loop through + + lda #0 + sta FRAME +animate_loop: + + lda #19 + sta CURSOR_X + lda #116 + sta CURSOR_Y + + ldx FRAME + lda animation_steps_l,X + sta INL + + ldx FRAME + lda animation_steps_h,X + sta INH + + jsr hgr_draw_sprite + + ; play tone + ldx FRAME + lda animation_notes,X + bne make_beep + + ; delay instead + lda #2 + jsr wait_a_bit + jmp done_beep + +make_beep: + + sta speaker_frequency + lda animation_note_lens,X + sta speaker_duration + jsr speaker_beep + + ldx FRAME + lda animation_pause_lens,X + jsr wait_a_bit + +done_beep: +; jsr wait_until_keypress + + inc FRAME + lda FRAME + cmp #15 + bne animate_loop + ;===================== ; play music @@ -98,33 +154,22 @@ game_over: ;forever: ; jmp forever +.include "hgr_sprite.s" +.include "speaker_beeps.s" + .include "wait_keypress.s" -;.include "draw_peasant.s" - -;.include "gr_copy.s" - -;.include "new_map_location.s" - -;.include "peasant_move.s" - -;.include "parse_input.s" - -;.include "inventory.s" - .include "score.s" -;.include "keyboard.s" - .include "wait.s" .include "wait_a_bit.s" -;.include "version.inc" - .include "loadsave_menu.s" .include "graphics_over/game_over_graphics.inc" +.include "graphics_over/game_over_animation.inc" + game_over_text: .byte 34,"Thanks so much for playing",13 .byte "this game here! Don't get too",13 @@ -134,3 +179,89 @@ game_over_text: .byte "and try again maybe!",34,13 .byte " -The Videlectrix Guys",0 + +animation_steps_l: + .byte over_anim0 ; face + .byte >over_anim1 ; shoulders + .byte >over_anim2 ; waist + .byte >over_anim3 ; thighs + .byte >over_anim4 ; ankles + .byte >over_anim5 ; all + .byte >over_anim6 ; fall1 + .byte >over_anim7 ; fall2 + .byte >over_anim8 ; skull float + .byte >over_anim8 ; skull float + .byte >over_anim8 ; skull float + .byte >over_anim8 ; skull float + .byte >over_anim9 ; skull fall + .byte >over_anim10 ; skull mostly + .byte >over_anim11 ; skull down + +animation_notes: + .byte NOTE_G4 ; 0 + .byte NOTE_F4 ; 1 + .byte NOTE_F4 ; 2 + .byte NOTE_E4 ; 3 + .byte NOTE_E4 ; 4 + .byte NOTE_D4 ; 5 + .byte NOTE_C4 ; 6 + .byte 0 ; 7 + .byte 0 ; 8 + .byte 0 ; 8 + .byte 0 ; 8 + .byte 0 ; 8 + .byte 0 ; 9 + .byte NOTE_C3 ; 10 + .byte 0 ; 11 + +animation_note_lens: + .byte 150 ; NOTE_G4 ; 0 + .byte 50 ; NOTE_F4 ; 1 + .byte 100 ; NOTE_F4 ; 2 + .byte 50 ; NOTE_E4 ; 3 + .byte 100 ; NOTE_E4 ; 4 + .byte 50 ; NOTE_D4 ; 5 + .byte 150 ; NOTE_C4 ; 6 + .byte 0 ; 7 + .byte 0 ; 8 + .byte 0 ; 8 + .byte 0 ; 8 + .byte 0 ; 8 + .byte 0 ; 9 + .byte 150 ; NOTE_C3 ; 10 + .byte 0 ; 11 + +animation_pause_lens: + .byte 1 ; NOTE_G4 ; 0 + .byte 1 ; NOTE_F4 ; 1 + .byte 1 ; NOTE_F4 ; 2 + .byte 1 ; NOTE_E4 ; 3 + .byte 1 ; NOTE_E4 ; 4 + .byte 1 ; NOTE_D4 ; 5 + .byte 1 ; NOTE_C4 ; 6 + .byte 0 ; 7 + .byte 0 ; 8 + .byte 0 ; 8 + .byte 0 ; 8 + .byte 0 ; 8 + .byte 0 ; 9 + .byte 1 ; NOTE_C3 ; 10 + .byte 0 ; 11 + diff --git a/games/peasant/graphics_over/Makefile b/games/peasant/graphics_over/Makefile index bf17405d..61a71403 100644 --- a/games/peasant/graphics_over/Makefile +++ b/games/peasant/graphics_over/Makefile @@ -4,9 +4,23 @@ PNG2GR = ../../../utils/gr-utils/png2gr PNG2HGR = ../../../utils/hgr-utils/png2hgr LZSA = ~/research/lzsa/lzsa/lzsa B2D = ../../../utils/bmp2dhr/b2d +HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite -all: game_over_graphics.inc +all: game_over_graphics.inc game_over_animation.inc +game_over_animation.inc: progression.png + $(HGR_SPRITE) -s -l over_anim0 progression.png 35 4 48 33 > game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim1 progression.png 63 4 76 33 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim2 progression.png 91 4 104 33 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim3 progression.png 119 4 132 33 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim4 progression.png 147 4 160 33 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim5 progression.png 175 4 188 33 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim6 progression.png 35 36 48 65 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim7 progression.png 63 36 76 65 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim8 progression.png 91 36 104 65 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim9 progression.png 119 36 132 65 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim10 progression.png 147 36 160 65 >> game_over_animation.inc + $(HGR_SPRITE) -s -l over_anim11 progression.png 175 36 188 65 >> game_over_animation.inc game_over_graphics.inc: \ game_over.lzsa \ @@ -38,5 +52,5 @@ game_over.hgr: game_over.png clean: - rm -f *~ game_over_graphics.inc *.lzsa *.gr *.hgr + rm -f *~ game_over_graphics.inc game_over_animation.inc *.lzsa *.gr *.hgr diff --git a/games/peasant/graphics_over/videlectrix.png b/games/peasant/graphics_over/videlectrix.png index 3b1fbce9..1ae29aed 100644 Binary files a/games/peasant/graphics_over/videlectrix.png and b/games/peasant/graphics_over/videlectrix.png differ