From 03018a499dd14d3383e6e926d4ba0d38a4388925 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 13 Oct 2021 16:19:24 -0400 Subject: [PATCH] peasant: hook up game over animation/music not happy with much of it --- games/peasant/Makefile | 1 + games/peasant/game_over.s | 167 +++++++++++++++++--- games/peasant/graphics_over/Makefile | 18 ++- games/peasant/graphics_over/videlectrix.png | Bin 1041 -> 7092 bytes 4 files changed, 166 insertions(+), 20 deletions(-) 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 3b1fbce9057154bd4a5ad97dedb6fc2bdee534ca..1ae29aeda82f71500022fefc94186b65ccdd306d 100644 GIT binary patch literal 7092 zcmeHMcTiJn(+|BV3Mh!eHH0b{QYnda2oQQlia`?C=+%aZG%tt-5e1|OBGMHF zEPxP0>`qSFSea}V+$jhG zfi~k!jqE@mjvc`L9d0h*8(K%egFu2_;ST#*c7zbHKa=4@^&^8>Vg6(=Ih5)H0)_T| zJm-=jdvh~x?WQ2?u$ZYoCd)rLtgJa=V41mUAMfF2?k`%rB|NNI!^~FmXP% z`#vrBdA4C-g3GQ3-)X}rso9&vK_*P6@!;(UzdxeiwhSGuZIRT#1P%KZz?-I+-9?KVedTh;U2RVKV}g;QT`blm); zT%zhi`;vd?n3~4>%887D;Gwz)*@_pLN;6$ny5TKsjRSV?dsJ!%qQ4~XOLD06?rzHb z;&t%;JIeDx!pgvswGp&FFXN)=Ler|GnsLP1eh4Nj{y}2=+f4pY#e+tPO<&L9EUSG| zvL0;G$yJskUJmuQ`V=p6H{4#_{9<{8iR$a-HS>Oh7mDSFZgvp1e)Wyoa;?Bn{c8P_A)%G}C%Zi@g>fqC<}b1~@n%k3JL>J; zCJ!3FG@kI(ykYoQwQN)Ll2S;kemV%-*W7kpG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