summaryrefslogtreecommitdiffstats
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/map.c16
-rw-r--r--src/resources/map.h20
2 files changed, 14 insertions, 22 deletions
diff --git a/src/resources/map.c b/src/resources/map.c
index 514129d..3fbf12e 100644
--- a/src/resources/map.c
+++ b/src/resources/map.c
@@ -144,21 +144,15 @@ struct layer *
map_get_layer(struct map *m, const char *name)
{
if (strcmp(name, "ground") == 0) {
- return &m->layers[LAYER_GROUND];
+ return &m->layers[MAP_LAYER_GROUND];
} else if (strcmp(name, "obj-low") == 0) {
- return &m->layers[LAYER_OBJ_LOW];
- } else if (strcmp(name, "char-bot") == 0) {
- return &m->layers[LAYER_CHAR_BOT];
+ return &m->layers[MAP_LAYER_OBJ_LOW];
} else if (strcmp(name, "obj-mid") == 0) {
- return &m->layers[LAYER_OBJ_MID];
- } else if (strcmp(name, "char-top") == 0) {
- return &m->layers[LAYER_CHAR_TOP];
+ return &m->layers[MAP_LAYER_OBJ_MID];
} else if (strcmp(name, "obj-high") == 0) {
- return &m->layers[LAYER_OBJ_HIGH];
+ return &m->layers[MAP_LAYER_OBJ_HIGH];
} else if (strcmp(name, "collision") == 0) {
- return &m->layers[LAYER_COLLISION];
- } else if (strcmp(name, "weather") == 0) {
- return &m->layers[LAYER_WEATHER];
+ return &m->layers[MAP_LAYER_COLLISION];
} else {
return NULL;
}
diff --git a/src/resources/map.h b/src/resources/map.h
index 02733bc..6d1d789 100644
--- a/src/resources/map.h
+++ b/src/resources/map.h
@@ -5,16 +5,14 @@
#include "resource.h"
#include "image.h"
-enum layer_id {
- LAYER_GROUND = 0,
- LAYER_OBJ_LOW,
- LAYER_CHAR_BOT,
- LAYER_OBJ_MID,
- LAYER_CHAR_TOP,
- LAYER_OBJ_HIGH,
- LAYER_COLLISION,
- LAYER_WEATHER,
- LAYERS_MAX
+enum map_layer_id {
+ MAP_LAYER_GROUND = 0,
+ MAP_LAYER_OBJ_LOW,
+ MAP_LAYER_OBJ_MID,
+ MAP_LAYER_OBJ_HIGH,
+ MAP_LAYER_COLLISION,
+ MAP_LAYER_WEATHER,
+ MAP_LAYERS_MAX
};
struct tileset {
struct resource res;
@@ -90,7 +88,7 @@ struct map {
int tileheight;
struct map_tileset *tilesets_head;
struct map_tileset *tilesets_tail;
- struct layer layers[LAYERS_MAX];
+ struct layer layers[MAP_LAYERS_MAX];
struct map_collision *collisions;
struct map_exit *map_exits_head;
struct map_exit *map_exits_tail;