sprintf(keyname, "(unknown)");
return keyname; }
-char is_passable (struct World * world, int y, int x) {
+char is_passable (struct World * world, int x, int y) {
// Check if coordinate on (or beyond) map is accessible to movement.
char passable = 0;
if (0 <= x && x < world->map->width && 0 <= y && y < world->map->height)
if (is_passable(world, world->player->x + 1, world->player->y)) {
world->player->x++;
success = 1; } }
- if (prev == d)
+ if (success * d == prev)
update_log (world, ".");
else {
char * msg = calloc(25, sizeof(char));