nuclear@1: #ifndef TILE_H_ nuclear@1: #define TILE_H_ nuclear@1: nuclear@2: #include nuclear@7: #include nuclear@7: #include nuclear@38: #include nuclear@2: #include "mesh.h" nuclear@4: #include "light.h" nuclear@2: nuclear@3: enum { nuclear@3: TILE_NORTH = 1, nuclear@3: TILE_SOUTH = 2, nuclear@3: TILE_EAST = 4, nuclear@3: TILE_WEST = 8, nuclear@7: TILE_ALL = 0xffff nuclear@3: }; nuclear@3: nuclear@11: class TileSet; nuclear@11: nuclear@1: class Tile { nuclear@2: private: nuclear@11: TileSet *tset; nuclear@11: nuclear@2: std::vector meshes; nuclear@21: std::vector mesh_side, light_side; nuclear@3: std::vector lights; nuclear@38: std::vector psattr; nuclear@2: nuclear@4: int load_lights(const aiScene *scn); nuclear@7: int load_meshes(const aiScene *scn, const std::map &nmap); nuclear@4: nuclear@1: public: nuclear@11: Tile(TileSet *tileset = 0); nuclear@38: ~Tile(); nuclear@11: nuclear@1: bool load(const char *fname); nuclear@1: nuclear@38: void update(unsigned long msec, float dt); nuclear@38: nuclear@3: void draw(unsigned int drawmask) const; nuclear@23: void draw_lights(unsigned int drawmask) const; nuclear@1: }; nuclear@1: nuclear@5: nuclear@1: #endif // TILE_H_