/[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.10 by banana, Thu Apr 13 06:18:15 2006 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Terrain - A part of the world   *  Terrain - the details of a location on the map
  *  
  * Some common ids:  
  * 0: floor  
  * 1: wall  
3   */   */
4    #pragma once
5    
6    //Includes
7  #include "Entity.h"  #include "Entity.h"
8    
9  class Terrain : public Entity {  //This is a hack :/
10    #define kMaxTerrainID 2
11    
12    //Class definition
13    class Terrain : public Entity {
14            bool opaque; //False if this terrain can be walked on/seen through
15  public:  public:
16            //Terrain cache, loaded at program initialisation
17            static Terrain *cache[2];
18            
19            //Constructor that copies a terrain out of the cache
20          Terrain(int id);          Terrain(int id);
 };  
21            
22            //Inline inherited basic-value constructor
23            Terrain(std::wstring n, wchar_t s, unsigned int c, bool o) : Entity(n, s, c) {
24                    opaque = o;
25            }
26            
27            bool traversable();
28            bool transparent();
29            bool memorable();
30    };

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

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26