1
0
Fork 0
Collab_RPG-affichage-dialogues/src/map.h

40 lines
1.0 KiB
C

#ifndef MAP_H
#define MAP_H
#define BACKGROUND 0
#define FOREGROUND 1
#define MAP_OUTSIDE -2 /* Returned by get_tile_at_pos if the point is outside of
* the map. */
#include "game.h"
#include "player.h"
/* Structure 'Map' has been moved to game.h */
/* to avoid circular references between map.h, game.h and player.h */
/* only methods propotypes are now in dedicated header files */
/* Draws the map map on the entire screen to be viewed by the player player. */
void render_map(Game *game);
/* Draws the map layer on the entire screen to be viewed by the player player.
*/
void render_map_by_layer(Game *game, int layer);
/* Get the tile at (x, y) of the map map. If the tile is located outside of the
* screen, MAP_OUTSIDE is returned. */
short int get_tile(Game *game, int x, int y, int l);
/* Returns what is in the walkable layer at (x, y). */
short int get_walkable(Game *game, int x, int y);
/* return the pointer to the map containing the given position */
Map* get_map_for_coordinates(Game *game, int x, int y );
#endif