Skip to content

Commit

Permalink
Added a ton of new sprite options
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgrew committed Jul 30, 2018
1 parent edc3ea7 commit 593b523
Show file tree
Hide file tree
Showing 5 changed files with 2,496 additions and 89 deletions.
6 changes: 5 additions & 1 deletion cli/main.c
Expand Up @@ -48,7 +48,11 @@ static void print_usage(const char *command, char *default_flags)
printf("\n");
printf("Sprite should be one of: ");
for(i=0; i < sizeof(dwr_sprite_names) / sizeof(char *); i++) {
printf("%s ", dwr_sprite_names[i]);
if (i) {
printf(", %s", dwr_sprite_names[i]);
} else {
printf("%s", dwr_sprite_names[i]);
}
}
printf("\n");
}
Expand Down
2 changes: 1 addition & 1 deletion common/build.h
@@ -1,2 +1,2 @@
/* This file is generated by git */
#define BUILD "346"
#define BUILD "347"
8 changes: 4 additions & 4 deletions common/map.c
Expand Up @@ -407,16 +407,16 @@ static uint8_t place_tantegel(dw_map *map, int largest, int next)

map->love_calc->x = x;
map->love_calc->y = y;
if (tile_is_walkable(map->tiles[x][y+1])) {
if (y < 119 && tile_is_walkable(map->tiles[x][y+1])) {
map->return_point->x = x;
map->return_point->y = y+1;
} else if (tile_is_walkable(map->tiles[x][y-1])) {
} else if (y > 0 && tile_is_walkable(map->tiles[x][y-1])) {
map->return_point->x = x;
map->return_point->y = y-1;
} else if (tile_is_walkable(map->tiles[x-1][y])) {
} else if (x > 0 && tile_is_walkable(map->tiles[x-1][y])) {
map->return_point->x = x-1;
map->return_point->y = y;
} else if (tile_is_walkable(map->tiles[x+1][y])) {
} else if (x < 119 && tile_is_walkable(map->tiles[x+1][y])) {
map->return_point->x = x+1;
map->return_point->y = y;
}
Expand Down

0 comments on commit 593b523

Please sign in to comment.