/[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.2 by banana, Wed Apr 5 03:43:59 2006 UTC revision 1.6 by banana, Thu Apr 6 15:03:46 2006 UTC
# Line 10  Line 10 
10  #define kMaxTerrainID 1  #define kMaxTerrainID 1
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          //Terrain cache, loaded at program initialisation
16          static Terrain cache[2];          static Terrain *cache[2];
17                    
18          //Constructor that copies a terrain out of the cache          //Constructor that copies a terrain out of the cache
19          Terrain(int id);          Terrain(int id);
20                    
21          //Inline inherited basic-value constructor          //Inline inherited basic-value constructor
22          Terrain(std::wstring n, unichar s) : Entity(n, s) {          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.2  
changed lines
  Added in v.1.6

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26