From 9ad08b1b9dae3f84c3f36540132d181f758416cc Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 7 Jul 2018 16:24:06 -0400 Subject: [PATCH] tfv: hookup credits --- gr-sim/gr-sim.c | 4 ++ gr-sim/gr-sim.h | 1 + gr-sim/tfv/KATC.BIN | Bin 0 -> 8192 bytes gr-sim/tfv/tfv.c | 2 +- gr-sim/tfv/tfv_credits.c | 123 +++++++++++++-------------------------- 5 files changed, 47 insertions(+), 83 deletions(-) create mode 100644 gr-sim/tfv/KATC.BIN diff --git a/gr-sim/gr-sim.c b/gr-sim/gr-sim.c index 144f46e5..61f74589 100644 --- a/gr-sim/gr-sim.c +++ b/gr-sim/gr-sim.c @@ -71,6 +71,10 @@ void set_plaid(void) { plaid_mode=1; } +void clear_plaid(void) { + plaid_mode=0; +} + void soft_switch(unsigned short address) { switch(address) { diff --git a/gr-sim/gr-sim.h b/gr-sim/gr-sim.h index 170c8c3c..d3aa9324 100644 --- a/gr-sim/gr-sim.h +++ b/gr-sim/gr-sim.h @@ -35,6 +35,7 @@ int vlin(int y1, int y2, int at); int collision(int xx, int yy, int ground_color); void set_plaid(void); +void clear_plaid(void); //void clear_top_a(void); //void clear_top(int page); diff --git a/gr-sim/tfv/KATC.BIN b/gr-sim/tfv/KATC.BIN new file mode 100644 index 0000000000000000000000000000000000000000..d0cf6985a19492c09b49568d8f03c11d49027558 GIT binary patch literal 8192 zcmdU!e`p)m9l+PJ453kIN^dM3gP@Xe`N~sV-p|i_cklb-eRbeK`yV5`;9Js>1+Ru)ADDS-$8^3jQF(#8XXY#O z+}r**R?9El{2jgJ7Q$7 zO>^-ftoPww0fcVxU&1hYacFnAPV+#BY_Wa?haa8<{I_*aDWj5Z@y){W`|asb*X;o#ia|C7nDbj9d385 zFVb!m{#wK6{7tSKwQ`O#W4^q&yH*9oJ=?ROFSD^sCHaT7`Zv|v<--(7J|h{|t6=8J zEU0mvatsRtEXYjwTDq#y223?U?vb&}52H&63!4MKMfZb%Vn9U4dcZ?6JSdJEBM-?x zICktE_$uV@fo!U>%eS#A)Z9w{pg4R7mI2(D!GbLNt}#kH;%eS)yZLL zc)i-^x(BkU$}YdDa|bea@lP68FI^kFS+Bo*?tEtO!eEN0Uh4p-)ev{_TQ&Tw{Ny4i z$>79z5;cYFZe?PI?6ARZ{Nsj4*n;^Rf8xhKYuZj~m+#wzjOSZH`Wky4ed|C1bod|fgXDOZB=Q|V&y$es7Jsuq zTq3&AiEcjx;U{6ihvLI-$xR-CPjX9-4Ge{R*e(A4z)(ZV??-3p^hKJ>eeB)(ZnF2K z{iF&0^&dC>=xF@C`q^&rNz*e!d-zeAakWpCoW+DJD(YxdQROI46d?naB0cIQ*YG=CuVGpX{Y&}{5AWYMIc$zEbDJc8(t@SOtNUQ zP`XN<_nf<2v*WPXXF5W)6xVoP#PvX=qaxG9B((U%ZC8qcO(e8h(tW{`+fNHkVkkiVrc?O zu}A2|p-|WOwBB&x-JxHhT>V%Q1GMuQS##isT zYN=g52;vlHCfR_jR?Nj;i61Gt*1NM>3AjE+zCZ5|Lb+!{*X*y$59ITUWPc&(3OFex zYj5d-5S3UK8QmoRuxZuBu2N`w{V0-@L%Ad{a`FV60XhZH{{VFI7pU$TN-<0tp!E}MuCcp*(mvRO+XL{!Myw5; z#G{ipTH3(U1dVt+l{8aY=j`%tk*2%+{rFC^@Z1}m)#0KoGko z|EG^9ww|8);EmJd^=C&UR}9GhJAb7rs-PaaKc;4fv*ZIz4zDb5jT^h`Z>-!}{TkOA z*p=#5{L3HL>-)CNrJ7<{zh3Fqv77(pUrzC4HMQq))Te!wCoY{)GG%Q~ayHCA!d%ll KI!6CI{{3I++SOJ7 literal 0 HcmV?d00001 diff --git a/gr-sim/tfv/tfv.c b/gr-sim/tfv/tfv.c index 7db4cdd3..32fa30d1 100644 --- a/gr-sim/tfv/tfv.c +++ b/gr-sim/tfv/tfv.c @@ -60,7 +60,7 @@ int main(int argc, char **argv) { title_loop: result=title(); if (result==0) goto play_game; - if (result==1) credits(); + if (result==2) credits(); goto title_loop; diff --git a/gr-sim/tfv/tfv_credits.c b/gr-sim/tfv/tfv_credits.c index 4bd7a97d..48a3a831 100644 --- a/gr-sim/tfv/tfv_credits.c +++ b/gr-sim/tfv/tfv_credits.c @@ -9,72 +9,65 @@ #include "gr-sim.h" -static int letter_index=0,letter_x=39,letter_y=2,destination=16,which_string=0; +static int letter_index=0,letter_x=39,letter_y=1,destination=15; -static char strings[12][32]= { - "T A L B O T", - "F A N T A S Y", - "S E V E N", - "", - "BY", - "VINCE WEAVER", - "", - "MUSIC BY", - "HIROKAZU TANAKA", - "", - "CYCLE COUNTING IS HARD", - "", -}; - -static int destinations[12]={ - 15,14,16,255, - 19,14,255, - 16,12,255, - 9,0, -}; - -static int ys[12]={ - 2,3,4,255, - 2,3,255, - 2,3,255, - 2,0, +static unsigned char string[]= { + "T A L B O T" "\x80" + "\x2\xE" "F A N T A S Y" "\x80" + "\x3\x10" "S E V E N" "\x80" + "\x1\xF" " " "\x80" + "\x2\xE" " " "\x80" + "\x3\x10" " " "\x80" + "\x1\x13" "BY" "\x80" + "\x3\xE" "VINCE WEAVER" "\x80" + "\x1\x13" " " "\x80" + "\x3\xE" " " "\x80" + "\x1\x10" "MUSIC BY" "\x80" + "\x3\xC" "HIROKAZU TANAKA" "\x80" + "\x1\x10" " " "\x80" + "\x3\xC" " " "\x80" + "\x2\xD" "CYCLE COUNTING" "\x80" + "\x3\x10" "IS HARD!" "\xff" }; static void letter_slide(void) { char out[BUFSIZ]; - char ch; + unsigned char ch; - if (destinations[which_string]==0) return; // at end + ch=string[letter_index]; + if (ch==0xff) return; - ch=strings[which_string][letter_index]; - if (ch==0) { - which_string++; - letter_index=0; - destination=destinations[which_string]; - letter_x=39; - letter_y=ys[which_string]; + if (ch==0x80) { + letter_index++; + letter_y=string[letter_index]; + letter_index++; + destination=string[letter_index]; + letter_index++; return; } - vtab(letter_y); - htab(letter_x); + vtab(letter_y+1); + htab(letter_x+1); + move_cursor(); + out[0]=' '; out[1]=0; + print(out); + + letter_x--; + vtab(letter_y+1); + htab(letter_x+1); move_cursor(); out[0]=ch; out[1]=0; print(out); - letter_x--; - if (letter_x