summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Judson Rosen2017-03-27 00:56:11 -0400
committerJoshua Judson Rosen2017-03-28 22:07:28 -0400
commitc9b09baaf566d83d19bd58ed1db095ce470ed45b (patch)
treef09ce1aeb713c02a52bd5bc469d2c2ee19369783
parentConsistently specify directions symbolically (diff)
downloadgnurobots-c9b09baaf566d83d19bd58ed1db095ce470ed45b.tar.gz
match apparent initial direction in GUI to actual direction
-rw-r--r--src/ui-arena.c7
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);