/[projectaxis]/projectaxis/projectAxis/src/blotchmaker/map.h
ViewVC logotype

Diff of /projectaxis/projectAxis/src/blotchmaker/map.h

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

revision 1.3 by leiavoia, Sun Jun 1 04:01:28 2003 UTC revision 1.4 by leiavoia, Wed Jun 4 03:14:05 2003 UTC
# Line 2  Line 2 
2  =================  =================
3  MAP.h  MAP.h
4  =================  =================
5  version 0.1.2  version 0.1.3
6  =================  =================
7    
8  This is the main data structure for the game map.  This is the main data structure for the game map.
# Line 14  with Map class, then create the BlotchMa Line 14  with Map class, then create the BlotchMa
14    
15  CHANGLELOG:  CHANGLELOG:
16  --------------------  --------------------
17    0.1.4 - adjusted road quality interface functions. removed elevation as a variable in map tiles
18    0.1.3 - added tile occupations.
19  0.1.2 - added road quality and fixed map intialaizer bug  0.1.2 - added road quality and fixed map intialaizer bug
20  0.1.1 - added additional obst. type enums and capitalized them as well. change code accordingly.  0.1.1 - added additional obst. type enums and capitalized them as well. change code accordingly.
21    
# Line 77  class Map { Line 79  class Map {
79                  void SetObst(short int x, short int y, short int type); // sets the obstacle type for a specific map cell at x,y coords                  void SetObst(short int x, short int y, short int type); // sets the obstacle type for a specific map cell at x,y coords
80                  short int GetObst(short int x, short int y);  // gets the obstacle type for a specific map cell at x,y coords                  short int GetObst(short int x, short int y);  // gets the obstacle type for a specific map cell at x,y coords
81    
82                  void SetOccu(int x, int y, Pod& pod);                  bool SetOccu(int x, int y, Pod& pod);
83                  void UnsetOccu(int x, int y);                  void UnsetOccu(int x, int y);
84                  Pod* GetOccu(int x, int y);                  Pod* GetOccu(int x, int y);
85    
86                  void TrampleRoad(int x, int y, int a=1); //reduces "roadness" by a, where a=1 unless otherwise specified                  void TrampleRoad(int x, int y, int a=1); // reduces "roadness" by a, where a=1 unless otherwise specified
87                  int GetRoadQ(int x, int y); // get road quality                  int GetRoadQ(int x, int y); // get road quality
88    
89                  bool IsValid (short int x, short int y);                  bool IsValid (short int x, short int y);
# Line 92  class Map { Line 94  class Map {
94                  // map tile structure - the main gig                  // map tile structure - the main gig
95                  struct maptile {                  struct maptile {
96                          enum obstacle obst; //obstacle type                          enum obstacle obst; //obstacle type
                         short int elev; // land elevation  
97                          short int road_q; // road quality. 0-10, 10 = rough new terrain, 0 = well traveled road / fast.                          short int road_q; // road quality. 0-10, 10 = rough new terrain, 0 = well traveled road / fast.
98                          Pod* occu; // the pod that accupies this tile                          Pod* occu; // the pod that accupies this tile
99                          // specials - linked list                          // specials - linked list

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26