diff --git a/gr-sim/split_screen/split_screen.c b/gr-sim/split_screen/split_screen.c index d8843e85..3848c17a 100644 --- a/gr-sim/split_screen/split_screen.c +++ b/gr-sim/split_screen/split_screen.c @@ -10,6 +10,73 @@ #include "gr-sim.h" +static int letter_index=0,letter_x=39,letter_y=2,destination=16,which_string=0; + + +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 void letter_slide(void) { + + + char out[BUFSIZ]; + char ch; + + if (destinations[which_string]==0) return; // at end + + 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]; + return; + } + + vtab(letter_y); + htab(letter_x); + move_cursor(); + out[0]=ch; out[1]=0; + print(out); + + letter_x--; + if (letter_x31) frame=0; @@ -158,6 +225,8 @@ int main(int argc, char **argv) { if (tree1_x<0) tree1_x=37; } + letter_slide(); + }