mirror of
https://github.com/zoriya/Gamacon.git
synced 2026-06-04 12:26:23 +00:00
Generizing tile's type
This commit is contained in:
+1
-4
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user