Trabajando en las colisiones
This commit is contained in:
14
source/map.h
14
source/map.h
@@ -12,6 +12,13 @@
|
||||
#ifndef MAP_H
|
||||
#define MAP_H
|
||||
|
||||
enum t_tile_map
|
||||
{
|
||||
nothing,
|
||||
wall,
|
||||
travessable
|
||||
};
|
||||
|
||||
// The player
|
||||
class Map
|
||||
{
|
||||
@@ -29,6 +36,10 @@ private:
|
||||
LTexture *texture_bg; // Textura con los graficos de fondo de la habitación
|
||||
SDL_Texture *map_texture; // Textura para dibujar el mapa de la habitación
|
||||
|
||||
int tile_width; // Ancho del tile en pixels
|
||||
int map_width; // Alto del mapa en tiles
|
||||
int map_height; // Ancho del mapa en tiles
|
||||
|
||||
// Carga las variables desde un fichero
|
||||
bool load(std::string file);
|
||||
|
||||
@@ -50,6 +61,9 @@ public:
|
||||
|
||||
// Dibuja el objeto
|
||||
void render();
|
||||
|
||||
// Devuelve el tipo de tile que hay en un punto
|
||||
t_tile_map getTile(SDL_Point p);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user