dungeon_crawler
annotate 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 |
rev | line source |
---|---|
nuclear@1 | 1 #ifndef TILE_H_ |
nuclear@1 | 2 #define TILE_H_ |
nuclear@1 | 3 |
nuclear@2 | 4 #include <vector> |
nuclear@7 | 5 #include <map> |
nuclear@7 | 6 #include <assimp/scene.h> |
nuclear@2 | 7 #include "mesh.h" |
nuclear@4 | 8 #include "light.h" |
nuclear@2 | 9 |
nuclear@3 | 10 enum { |
nuclear@3 | 11 TILE_NORTH = 1, |
nuclear@3 | 12 TILE_SOUTH = 2, |
nuclear@3 | 13 TILE_EAST = 4, |
nuclear@3 | 14 TILE_WEST = 8, |
nuclear@7 | 15 TILE_ALL = 0xffff |
nuclear@3 | 16 }; |
nuclear@3 | 17 |
nuclear@11 | 18 class TileSet; |
nuclear@11 | 19 |
nuclear@1 | 20 class Tile { |
nuclear@2 | 21 private: |
nuclear@11 | 22 TileSet *tset; |
nuclear@11 | 23 |
nuclear@2 | 24 std::vector<Mesh*> meshes; |
nuclear@4 | 25 std::vector<unsigned int> mesh_side; |
nuclear@3 | 26 std::vector<Light*> lights; |
nuclear@2 | 27 |
nuclear@4 | 28 int load_lights(const aiScene *scn); |
nuclear@7 | 29 int load_meshes(const aiScene *scn, const std::map<aiMesh*, aiNode*> &nmap); |
nuclear@4 | 30 |
nuclear@1 | 31 public: |
nuclear@11 | 32 Tile(TileSet *tileset = 0); |
nuclear@11 | 33 |
nuclear@1 | 34 bool load(const char *fname); |
nuclear@1 | 35 |
nuclear@3 | 36 void draw(unsigned int drawmask) const; |
nuclear@1 | 37 }; |
nuclear@1 | 38 |
nuclear@5 | 39 |
nuclear@1 | 40 #endif // TILE_H_ |