#ifndef __MAP_H
#define __MAP_H

/* %10 */
#define WALKABLE  1 // can walk through
#define BLOKING   2 // can't walk through

/* %100 */
#define FIXED     10 // can't be picked up
#define MOVABLE   20 // can be picked up

/* %1000 */
#define SOLID         100 // can't throw through it
#define TRESPASSABLE  200 // can throw through it
#define SEATABLE      300 // can sit on it

#define ZONE_W 550
#define ZONE_H 550

typedef struct tile {
  int num;
	int icon;
	int passable;
	char *name;
	char *prefix;
} tile;

typedef struct fringe {
	int num;
	int passable;
	char *name;
	char *prefix;
} fringe;

typedef struct object {
  int num;
	int icon;
	int passable;   // CAN DELETE?!?
	int weight;
	int price;
	int flag;       // object flags
	struct object *next;   // for creating a list of objects
} object;

// the 3 layered zone map
typedef struct map {
  tile tiles[ZONE_W][ZONE_H];     // map tiles
	fringe fringes[ZONE_W][ZONE_H]; // tables, chairs, etc
	object objects[ZONE_W][ZONE_H]; // players, monsters, items
} map;

int map_load();
void map_save();
void map_saveObjects();
void map_loadObjects();
void map_draw(int x, int y, int zoom);
void map_drawTiles(int x, int y, int zoom);
void map_drawFringe(int x, int y, int zoom);
void map_drawObjects(int x, int y, int zoom);

#endif
