From 83e61fb41dd8162f55090106d4714594044d60eb Mon Sep 17 00:00:00 2001 From: Richard Wossal Date: Fri, 10 Mar 2017 15:36:27 +0100 Subject: [PATCH] gti pull just reversed @qiang-bi's gti push :) --- gti.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gti.c b/gti.c index f22c992..da0bbed 100644 --- a/gti.c +++ b/gti.c @@ -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; @@ -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; @@ -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();