diff options
author | Joshua Judson Rosen | 2017-03-27 00:56:11 -0400 |
---|---|---|
committer | Joshua Judson Rosen | 2017-03-28 22:07:28 -0400 |
commit | c9b09baaf566d83d19bd58ed1db095ce470ed45b (patch) | |
tree | f09ce1aeb713c02a52bd5bc469d2c2ee19369783 /src | |
parent | Consistently specify directions symbolically (diff) | |
download | gnurobots-c9b09baaf566d83d19bd58ed1db095ce470ed45b.tar.gz |
match apparent initial direction in GUI to actual direction
Diffstat (limited to 'src')
-rw-r--r-- | src/ui-arena.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui-arena.c b/src/ui-arena.c index c3f6b90..fdc66fb 100644 --- a/src/ui-arena.c +++ b/src/ui-arena.c @@ -37,6 +37,9 @@ #include <glib/gprintf.h> +#include "grobot.h" +extern GRobot *robot; + #define TILE_SIZE 16 enum @@ -198,7 +201,7 @@ void ui_arena_draw(UIArena *arena) j * TILE_SIZE); break; case ROBOT: - put_tile(arena, arena->priv->robotPix, i * TILE_SIZE, + put_tile(arena, arena->priv->robotDirs[robot->dir], i * TILE_SIZE, j * TILE_SIZE); break; default: @@ -317,7 +320,7 @@ void ui_arena_add_thing(UIArena *arena, gint x, gint y, gint thing) put_tile(arena, arena->priv->baddie, w_x, w_y); break; case ROBOT: - put_tile(arena, arena->priv->robotPix, w_x, w_y); + put_tile(arena, arena->priv->robotDirs[robot->dir], w_x, w_y); break; default: put_tile(arena, arena->priv->wall, w_x, w_y); |