From 7844a43608db391edbc254ca6285e27aff61f4b1 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 21 Oct 2017 23:48:21 -0400 Subject: [PATCH] tfv: add bird sprites --- gr-sim/tfv_sprites.c | 90 ++++++++++++++++++++++++++++++++++++++++++ gr-sim/tfv_sprites.h | 10 +++++ gr-sim/tfv_worldmap.c | 30 ++++++++------ tfv/NOTES | 2 + tfv/sprites.png | Bin 1355 -> 1369 bytes 5 files changed, 121 insertions(+), 11 deletions(-) diff --git a/gr-sim/tfv_sprites.c b/gr-sim/tfv_sprites.c index 9d42f356..87ea997e 100644 --- a/gr-sim/tfv_sprites.c +++ b/gr-sim/tfv_sprites.c @@ -48,6 +48,96 @@ unsigned char tfv_led_sword[]={ /* Bird Sprites */ +unsigned char bird_stand_right[] = { + 0x6,0x7, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xdd,0x90, + 0x00,0x00,0x00,0x00,0xdd,0x00, + 0x0d,0xdd,0xdd,0xdd,0xdd,0x00, + 0x00,0x00,0x0d,0xdd,0x0d,0x00, + 0x00,0x00,0x00,0x99,0x00,0x00, + 0x00,0x00,0x00,0x99,0x90,0x00, +}; + +unsigned char bird_stand_left[] = { + 0x6,0x7, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x90,0xdd,0x00,0x00,0x00,0x00, + 0x00,0xdd,0x00,0x00,0x00,0x00, + 0x00,0xdd,0xdd,0xdd,0xdd,0x0d, + 0x00,0x0d,0xdd,0x0d,0x00,0x00, + 0x00,0x00,0x99,0x00,0x00,0x00, + 0x00,0x90,0x99,0x00,0x00,0x00, +}; + +unsigned char bird_walk_right[] = { + 0x6,0x7, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xdd,0x90, + 0x00,0x00,0x00,0x00,0xdd,0x00, + 0x0d,0xdd,0xdd,0xdd,0xdd,0x00, + 0x00,0x00,0x0d,0xdd,0x0d,0x00, + 0x00,0x00,0x00,0x99,0x00,0x00, + 0x00,0x00,0x99,0x00,0x99,0x00, +}; + + +unsigned char bird_walk_left[] = { + 0x6,0x7, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x90,0xdd,0x00,0x00,0x00,0x00, + 0x00,0xdd,0x00,0x00,0x00,0x00, + 0x00,0xdd,0xdd,0xdd,0xdd,0x0d, + 0x00,0x0d,0xdd,0x0d,0x00,0x00, + 0x00,0x00,0x99,0x00,0x00,0x00, + 0x00,0x99,0x00,0x99,0x00,0x00, +}; + +/* with rider */ + +unsigned char bird_rider_stand_right[] = { + 0x6,0x7, + 0x00,0xdd,0xbd,0x00,0x00,0x00, + 0x00,0xdd,0xdb,0x00,0xdd,0x90, + 0x00,0x00,0x22,0x02,0xdd,0x00, + 0x0d,0xdd,0xd2,0x22,0xdd,0x00, + 0x00,0x00,0x0d,0x82,0x8d,0x00, + 0x00,0x00,0x00,0x99,0x00,0x00, + 0x00,0x00,0x00,0x99,0x90,0x00, +}; + +unsigned char bird_rider_walk_right[] = { + 0x6,0x7, + 0x00,0xdd,0xbd,0x00,0x00,0x00, + 0x00,0xdd,0xdb,0x00,0xdd,0x90, + 0x00,0x00,0x22,0x02,0xdd,0x00, + 0x0d,0xdd,0xd2,0x22,0xdd,0x00, + 0x00,0x00,0x0d,0x82,0x8d,0x00, + 0x00,0x00,0x00,0x99,0x00,0x00, + 0x00,0x00,0x99,0x00,0x99,0x00, +}; + +unsigned char bird_rider_stand_left[] = { + 0x6,0x7, + 0x00,0x00,0x00,0xbd,0xdd,0x00, + 0x90,0xdd,0x00,0xdb,0xdd,0x00, + 0x00,0xdd,0x02,0x22,0x00,0x00, + 0x00,0xdd,0x22,0xd2,0xdd,0x0d, + 0x00,0x8d,0x82,0x0d,0x00,0x00, + 0x00,0x00,0x99,0x00,0x00,0x00, + 0x00,0x90,0x99,0x00,0x00,0x00, +}; + +unsigned char bird_rider_walk_left[] = { + 0x6,0x7, + 0x00,0x00,0x00,0xbd,0xdd,0x00, + 0x90,0xdd,0x00,0xdb,0xdd,0x00, + 0x00,0xdd,0x02,0x22,0x00,0x00, + 0x00,0xdd,0x22,0xd2,0xdd,0x0d, + 0x00,0x8d,0x82,0x0d,0x00,0x00, + 0x00,0x00,0x99,0x00,0x00,0x00, + 0x00,0x99,0x00,0x99,0x00,0x00, +}; diff --git a/gr-sim/tfv_sprites.h b/gr-sim/tfv_sprites.h index 9f96bddc..6e9a955c 100644 --- a/gr-sim/tfv_sprites.h +++ b/gr-sim/tfv_sprites.h @@ -4,6 +4,16 @@ extern unsigned char tfv_stand_left[]; extern unsigned char tfv_walk_left[]; extern unsigned char tfv_led_sword[]; +extern unsigned char bird_stand_right[]; +extern unsigned char bird_walk_right[]; +extern unsigned char bird_stand_left[]; +extern unsigned char bird_walk_left[]; + +extern unsigned char bird_rider_stand_right[]; +extern unsigned char bird_rider_walk_right[]; +extern unsigned char bird_rider_stand_left[]; +extern unsigned char bird_rider_walk_left[]; + extern unsigned char ship_forward[]; extern unsigned char ship_right[]; extern unsigned char ship_left[]; diff --git a/gr-sim/tfv_worldmap.c b/gr-sim/tfv_worldmap.c index f3cc7fb6..31178777 100644 --- a/gr-sim/tfv_worldmap.c +++ b/gr-sim/tfv_worldmap.c @@ -187,6 +187,7 @@ int world_map(void) { direction=1; int odd=0; int refresh=1; + int on_bird=1; while(1) { moved=0; @@ -304,18 +305,25 @@ int world_map(void) { } } - - - - - - if (direction==-1) { - if (odd) grsim_put_sprite(tfv_walk_left,tfv_x,tfv_y); - else grsim_put_sprite(tfv_stand_left,tfv_x,tfv_y); + if (on_bird) { + if (direction==-1) { + if (odd) grsim_put_sprite(bird_rider_walk_left,tfv_x,tfv_y); + else grsim_put_sprite(bird_rider_stand_left,tfv_x,tfv_y); + } + if (direction==1) { + if (odd) grsim_put_sprite(bird_rider_walk_right,tfv_x,tfv_y); + else grsim_put_sprite(bird_rider_stand_right,tfv_x,tfv_y); + } } - if (direction==1) { - if (odd) grsim_put_sprite(tfv_walk_right,tfv_x,tfv_y); - else grsim_put_sprite(tfv_stand_right,tfv_x,tfv_y); + else { + if (direction==-1) { + if (odd) grsim_put_sprite(tfv_walk_left,tfv_x,tfv_y); + else grsim_put_sprite(tfv_stand_left,tfv_x,tfv_y); + } + if (direction==1) { + if (odd) grsim_put_sprite(tfv_walk_right,tfv_x,tfv_y); + else grsim_put_sprite(tfv_stand_right,tfv_x,tfv_y); + } } /* Draw Below Ground Scatter */ diff --git a/tfv/NOTES b/tfv/NOTES index 7775d738..d92f4a12 100644 --- a/tfv/NOTES +++ b/tfv/NOTES @@ -1,3 +1,5 @@ +Add horizontal-flipped sprite mode to save sprite table space? + Could make VLIN faster by writing in chunks of two 6502 assembly woes: diff --git a/tfv/sprites.png b/tfv/sprites.png index 9a06693e43b852ee3dd2922a9f075a6ae9acab6a..79be4ccf85386be15434b5dcdc2edc936b8086b7 100644 GIT binary patch delta 1246 zcmV<41R?v&3fT&fa0&rpOGiWihy@);k!>G;3Kjz|Bm!3ufB*mlpGibPRA}Dq+KF=G zAPfM|I`{zFHT?hAZWKjEoB?B}o0(`PbxOPKi&hp8`qO<-{7`(+U-TFKMSszsi{9?> zf#`Mp0JNJ~MDsD0`)$Kd==zuFdG?8XjOE^<*ENFHxv<~%8;Q0|cb&M0o9T6ZvMsuQ z?_+5GiIk}?A#)s+Iul(`9`Q_bvXtYPMgtk57QOA^0{u+GiwHh(1_POtc{Gug+P2zE zhiGCa(BcvHnnEiDXr-<|$J;=N7NYMf(G*vp!-|Fx{@a{Pud5JnPtrAxo@e+0!!R!P z2c3)N?Jho6UDL{m{|22a52Y~EkZYxXmJ!*0_i)KqqD4tfBbnezL6OAzG$+@iL$*7{ zDjc5hM~GI@h@snN#PdQ^o~bw}(@M3Y^GkyUG!=%WV=SYO9-dKw?mA=a+Q1lZ+0c;b zSb@aX9@UvfD$H6!7;`S#y&2*yuMsUJkk3LFtxQ|cz=k|y>#9SGNR*?GZ2~lZ{pxWP z0&Dvq8eX$VbnUiSmJdS%IE98^PF>^>dYX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