Generizing tile's type

This commit is contained in:
Anonymus Raccoon
2020-04-01 17:31:55 +02:00
parent 3f2e56dd88
commit 5483805a16
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -12,9 +12,6 @@
#include <stdbool.h>
#include "entity.h"
enum tile_type {
TILE_TYPE_NONE
};
struct tile
{
@@ -23,7 +20,7 @@ struct tile
char data;
struct gc_entity *entity;
bool solid;
enum tile_type type;
char *type;
};
#endif //MY_RPG_TILE_H
+1 -1
View File
@@ -75,7 +75,7 @@ bool init_data(struct tile *tile, gc_vector2i c, node *n, gc_scene *scene)
tmp = xml_gettmpstring(n, "texture", NULL);
tile->texture = scene->get_data(scene, "sprite", tmp);
tile->solid = xml_getbool(n, "solid", false);
tile->type = TILE_TYPE_NONE;
tile->type = xml_getproperty(n, "type");
return (true);
}