From d71a601f4fef6f6e5c8c0570a0ea711b45acd127 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 11 Sep 2017 23:54:31 -0400 Subject: [PATCH] tfv: more work on flying --- gr-sim/tfv_flying.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gr-sim/tfv_flying.c b/gr-sim/tfv_flying.c index 50be7c90..f38b6e1b 100644 --- a/gr-sim/tfv_flying.c +++ b/gr-sim/tfv_flying.c @@ -597,6 +597,28 @@ int flying(void) { speed=SPEED_STOPPED; } + if (ch=='h') { + print_help(); + } + + if (ch==13) { + int landing_color,tx,ty; +#if FIXEDPT + tx=cx.i; ty=cy.i; +#else + tx=cx; ty=cy; +#endif + landing_color=lookup_map(tx,ty); + printf("Trying to land at %d %d\n",tx,ty); + printf("Color=%d\n",landing_color); + if (landing_color==12) return 0; + else { + printf("Need to land on grass!\n"); + } + } + + + if (speed!=SPEED_STOPPED) { #if FIXEDPT int ii;