/[anoncvs]/projects/roguelike/Terrain.h


UCC Code Repository

Diff of /projects/roguelike/Terrain.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by banana, Tue Apr 4 10:51:36 2006 UTC revision 1.7 by banana, Thu Apr 6 15:25:10 2006 UTC
# Line 7  Line 7 
7   */   */
8    
9  #include "Entity.h"  #include "Entity.h"
10    #define kMaxTerrainID 2
11    
12  class Terrain : public Entity {  class Terrain : public Entity {
13            bool opaque; //False if this terrain can be walked on/seen through
14  public:  public:
15            //Terrain cache, loaded at program initialisation
16            static Terrain *cache[2];
17            
18            //Constructor that copies a terrain out of the cache
19          Terrain(int id);          Terrain(int id);
 };  
20            
21            //Inline inherited basic-value constructor
22            Terrain(std::wstring n, wchar_t s, bool o) : Entity(n, s) {
23                    opaque = o;
24            }
25            
26            bool traversable() {
27                    return !opaque;
28            }
29    };

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.7

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26