dungeon_crawler

view prototype/src/tile.h @ 14:67ae9fcb802c

loading normal map
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 19 Aug 2012 06:30:18 +0300
parents 8fb37db44fd8
children 0588f8a1a351
line source
1 #ifndef TILE_H_
2 #define TILE_H_
4 #include <vector>
5 #include <map>
6 #include <assimp/scene.h>
7 #include "mesh.h"
8 #include "light.h"
10 enum {
11 TILE_NORTH = 1,
12 TILE_SOUTH = 2,
13 TILE_EAST = 4,
14 TILE_WEST = 8,
15 TILE_ALL = 0xffff
16 };
18 class TileSet;
20 class Tile {
21 private:
22 TileSet *tset;
24 std::vector<Mesh*> meshes;
25 std::vector<unsigned int> mesh_side;
26 std::vector<Light*> lights;
28 int load_lights(const aiScene *scn);
29 int load_meshes(const aiScene *scn, const std::map<aiMesh*, aiNode*> &nmap);
31 public:
32 Tile(TileSet *tileset = 0);
34 bool load(const char *fname);
36 void draw(unsigned int drawmask) const;
37 };
40 #endif // TILE_H_