Skip to content

Commit

Permalink
gti pull
Browse files Browse the repository at this point in the history
just reversed @qiang-bi's gti push :)
  • Loading branch information
rwos committed Mar 10, 2017
1 parent 5e68d0e commit 83e61fb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions gti.c
Expand Up @@ -72,6 +72,7 @@ void clear_car(int x);
typedef void (*draw_fn_t) (int x);
void draw_std(int x);
void draw_push(int x);
void draw_pull(int x);
draw_fn_t select_command(int argc, char **argv);

FILE *TERM_FH;
Expand Down Expand Up @@ -123,6 +124,8 @@ draw_fn_t select_command(int argc, char **argv)
continue;
if (!strcmp(argv[i], "push"))
return draw_push;
if (!strcmp(argv[i], "pull"))
return draw_pull;
break;
}
return draw_std;
Expand Down Expand Up @@ -249,6 +252,27 @@ void draw_push(int x)
usleep(FRAME_TIME * 10);
}

void draw_pull(int x)
{
/* *INDENT-OFF* */
move_to_top();
line_at(x, " ,---------------. __");
line_at(x, " / /``````|``````\\\\ /--\\");
line_at(x, " / /_______|_______\\\\________ \\__/");
line_at(x, "|] GTI |' | |] >-||");
if (x % 2) {
line_at(x, "= .-:-. |________| .-:-. = >-||");
line_at(x, " ` -+- -------------- -+- ' || ");
line_at(x, " '-:-' '-:-' || ");
} else {
line_at(x, "= .:-:. |________| .:-:. = >-||");
line_at(x, " ` X -------------- X ' / \\");
line_at(x, " ':-:' ':-:' / \\");
}
/* *INDENT-ON* */
usleep(FRAME_TIME * 8);
}

void clear_car(int x)
{
move_to_top();
Expand Down

0 comments on commit 83e61fb

Please sign in to comment.