From 83bb87e12c21f1a82435112729a2b2795d1898a3 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 30 Jun 2018 22:37:33 -0400 Subject: [PATCH] tfv: improve victory dance --- gr-sim/tfv/tfv_battle.c | 8 +++++--- gr-sim/tfv/tfv_sprites.c | 11 +++++++++++ gr-sim/tfv/tfv_sprites.h | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/gr-sim/tfv/tfv_battle.c b/gr-sim/tfv/tfv_battle.c index 4c5f6dbc..aa5e7760 100644 --- a/gr-sim/tfv/tfv_battle.c +++ b/gr-sim/tfv/tfv_battle.c @@ -293,20 +293,22 @@ static int victory_dance(void) { ram[DRAW_PAGE]=saved_drawpage; - for(i=0;i<50;i++) { + for(i=0;i<25;i++) { gr_copy_to_current(0xc00); if (i&1) { grsim_put_sprite(tfv_stand_left,ax,20); + grsim_put_sprite(tfv_led_sword,ax-5,20); } else { - grsim_put_sprite(tfv_walk_left,ax,20); + grsim_put_sprite(tfv_victory,ax,20); + grsim_put_sprite(tfv_led_sword,ax-2,14); } page_flip(); - usleep(100000); + usleep(200000); } return 0; diff --git a/gr-sim/tfv/tfv_sprites.c b/gr-sim/tfv/tfv_sprites.c index 69c8e2e1..a38d11a5 100644 --- a/gr-sim/tfv/tfv_sprites.c +++ b/gr-sim/tfv/tfv_sprites.c @@ -39,6 +39,17 @@ unsigned char tfv_walk_left[]={ 0x00,0x82,0x00,0x82, }; +unsigned char tfv_victory[]={ + 0x4,0x6, + 0x00,0xBD,0x2b,0x00, + 0x0B,0xDB,0x22,0x00, + 0x00,0x00,0x22,0x00, + 0x00,0x00,0x22,0x00, + 0x00,0x20,0x02,0x22, + 0x00,0x82,0x00,0x82, +}; + + unsigned char tfv_led_sword[]={ 0x5,0x3, 0x10,0x00,0x10,0x00,0x00, diff --git a/gr-sim/tfv/tfv_sprites.h b/gr-sim/tfv/tfv_sprites.h index 17d3024d..bb5839c5 100644 --- a/gr-sim/tfv/tfv_sprites.h +++ b/gr-sim/tfv/tfv_sprites.h @@ -2,6 +2,7 @@ extern unsigned char tfv_stand_right[]; extern unsigned char tfv_walk_right[]; extern unsigned char tfv_stand_left[]; extern unsigned char tfv_walk_left[]; +extern unsigned char tfv_victory[]; extern unsigned char tfv_led_sword[]; extern unsigned char bird_stand_right[];