From 00d6bbd5f576ac56563e20c57343d9564ce46834 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 17 Jul 2018 01:27:09 -0400 Subject: [PATCH] tfv: add more animations to ending --- gr-sim/tfv/TODO | 13 +++-- gr-sim/tfv/tfv_ending.c | 106 ++++++++++++++++++++++++++++++++++++--- gr-sim/tfv/tfv_mapinfo.h | 2 +- gr-sim/tfv/tfv_sprites.c | 17 +++++++ gr-sim/tfv/tfv_sprites.h | 4 ++ 5 files changed, 131 insertions(+), 11 deletions(-) diff --git a/gr-sim/tfv/TODO b/gr-sim/tfv/TODO index 4616b4d9..8b34c394 100644 --- a/gr-sim/tfv/TODO +++ b/gr-sim/tfv/TODO @@ -8,20 +8,26 @@ Known bugs: Soon: + Battle Sequence ---> Die if HP hits 0. On ground sprite --> Sound effects --> enemy uses magic --> Enemy more likely to spawn on appropriate territory --> green background on anti-damage printing ---> pick up vortex cannon from someone +--> Disable vortex cannon until you get it from Ken --> Balance the battles --> Do something with experience/leveling up ++ Ending: +--> Boss battle w susie +--> Puzzle. Warn if not have all parts +--> Erase door once solve puzzle +--> Light goes on when solve puzzle? Draw LED light going to sensor + + Worldmap --> Make location inverse text to offset it from dialog? --> Make actions inverse to highlight --> Start with 0 money --> Face proper way when entering/leaving certain places (fountain?) +--> Play with female hero + Game over screen --> Pause 2 seconds @@ -30,9 +36,8 @@ Soon: + Enable getting back on spaceship (with better animation) + Better collision detection on Spaceship land + Better collision detection/walk on+off in College Park -+ Working conversation + Riding animals -+ End sequence + + Make transparent color grey2 rather than black diff --git a/gr-sim/tfv/tfv_ending.c b/gr-sim/tfv/tfv_ending.c index 6001dd2b..ee3b45ef 100644 --- a/gr-sim/tfv/tfv_ending.c +++ b/gr-sim/tfv/tfv_ending.c @@ -17,23 +17,110 @@ int do_ending(void) { - int i; + int i,ch; int saved_drawpage; - boss_battle(); + + /*********************************/ + /* Do the puzzle */ + /*********************************/ + grsim_unrle(puzzle_rle,0xc00); + gr_copy_to_current(0xc00); saved_drawpage=ram[DRAW_PAGE]; - - grsim_unrle(harfco_rle,0xc00); - ram[DRAW_PAGE]=PAGE0; clear_bottom(); ram[DRAW_PAGE]=PAGE1; clear_bottom(); - ram[DRAW_PAGE]=saved_drawpage; + ram[CH]=0; + ram[CV]=20; + move_and_print("TO UNLOCK THE DOOR THE LED MUST HAVE:"); + ram[CH]=0; + ram[CV]=21; + move_and_print("* 660 NANOMETER LIGHT"); + ram[CH]=0; + ram[CV]=22; + move_and_print("* 9 MILIAMPS OF CURRENT"); + + page_flip(); + + while(1) { + ch=grsim_input(); + if (ch!=0) break; + } + + /*********************************/ + /* Animate the boss arrival */ + /*********************************/ + + + saved_drawpage=ram[DRAW_PAGE]; + ram[DRAW_PAGE]=PAGE0; + clear_bottom(); + ram[DRAW_PAGE]=PAGE1; + clear_bottom(); + ram[DRAW_PAGE]=saved_drawpage; + + grsim_unrle(jc_office_rle,0xc00); + + for(i=0;i<20;i++) { + + gr_copy_to_current(0xc00); + + grsim_put_sprite(roboknee1,2,i); + + grsim_put_sprite(tfv_stand_left,12,24); + + ram[CH]=0; + ram[CV]=20; + move_and_print("NOT SO FAST"); + + page_flip(); + usleep(100000); + } + + + ram[CH]=0; + ram[CV]=21; + move_and_print(" SINCE WE HAVE NO ELECTRICITY"); + ram[CH]=0; + ram[CV]=22; + move_and_print(" WE HAVE NO LIGHTS"); + + page_flip(); + + while(1) { + ch=grsim_input(); + if (ch!=0) break; + } + + + /*********************************/ + /* Do the boss battle */ + /*********************************/ + + boss_battle(); + + + /*********************************/ + /* Draw the sky beam */ + /*********************************/ + + + + grsim_unrle(harfco_rle,0xc00); gr_copy_to_current(0xc00); + + saved_drawpage=ram[DRAW_PAGE]; + ram[DRAW_PAGE]=PAGE0; + clear_bottom(); + ram[DRAW_PAGE]=PAGE1; + clear_bottom(); + ram[DRAW_PAGE]=saved_drawpage; + + page_flip(); for(i=0;i<10;i++) { @@ -69,6 +156,13 @@ int do_ending(void) { usleep(3400000); + /* clear keyboard buffer */ + while(grsim_input()!=0) ; + + /*********************************/ + /* Run the credits */ + /*********************************/ + credits(); return 0; diff --git a/gr-sim/tfv/tfv_mapinfo.h b/gr-sim/tfv/tfv_mapinfo.h index cd5e6307..03302ec2 100644 --- a/gr-sim/tfv/tfv_mapinfo.h +++ b/gr-sim/tfv/tfv_mapinfo.h @@ -653,7 +653,7 @@ struct map_info_type map_info[34] = { .location[0] = { .name="Door Lock", .x0 = 15, .x1 = 30, - .y0 = 28, .y1 = 36, + .y0 = 28, .y1 = 38, .type = LOCATION_PUZZLE, }, diff --git a/gr-sim/tfv/tfv_sprites.c b/gr-sim/tfv/tfv_sprites.c index 520e2844..f4624086 100644 --- a/gr-sim/tfv/tfv_sprites.c +++ b/gr-sim/tfv/tfv_sprites.c @@ -371,6 +371,23 @@ unsigned char evil_penguin[]={ 0x00,0x00,0x00,0xcc,0xc0,0x00,0x00,0x00,0x00, }; +unsigned char roboknee1[]={ + 0x9,0xb, + 0x55,0x55,0xb5,0x00,0x00,0x00,0x00,0x00,0x00, + 0x55,0xbb,0xbb,0x0b,0x00,0x50,0xd5,0x05,0x50, + 0x05,0xb5,0x0b,0x00,0x00,0x55,0xd0,0x0d,0x55, + 0x88,0x88,0x88,0x00,0x00,0x50,0x05,0x05,0x00, + 0x88,0x88,0x88,0x08,0x0b,0x05,0x00,0x00,0x00, + 0x88,0x88,0x88,0x80,0xb0,0x00,0x00,0x00,0x00, + 0x58,0x78,0x78,0x00,0x00,0x00,0x00,0x00,0x00, + 0x55,0xe1,0xe7,0x00,0x00,0x00,0x00,0x00,0x00, + 0x55,0x7e,0x4e,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0x07,0xf7,0x00,0x00,0x00,0x00,0x00,0x00, + 0x88,0x88,0x88,0x88,0x00,0x00,0x00,0x00,0x00, +}; + + + /* Summons */ unsigned char metrocat[]={ diff --git a/gr-sim/tfv/tfv_sprites.h b/gr-sim/tfv/tfv_sprites.h index 8e79eceb..f7e6aa5f 100644 --- a/gr-sim/tfv/tfv_sprites.h +++ b/gr-sim/tfv/tfv_sprites.h @@ -43,6 +43,10 @@ extern unsigned char procrastinon[]; extern unsigned char ice_fish[]; extern unsigned char evil_penguin[]; +/* boss */ +extern unsigned char roboknee1[]; +extern unsigned char roboknee2[]; + /* summons */ extern unsigned char metrocat[]; extern unsigned char vortex_cannon[];