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

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

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

revision 1.1 by leiavoia, Fri Jun 6 23:27:44 2003 UTC revision 1.2 by leiavoia, Fri Jul 25 21:17:49 2003 UTC
# Line 2  Line 2 
2  =================  =================
3  MAP.h  MAP.h
4  =================  =================
5  version 0.1.3  version 0.1.4
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.5   July 20, 2003
18            - removed "dump" since t was causing compile problems and i didn't feel like fixing it :-)
19            - Map now inserts itself into PointerHub when constructed.
20  0.1.4 - adjusted road quality interface functions. removed elevation as a variable in map tiles  0.1.4 - adjusted road quality interface functions. removed elevation as a variable in map tiles
21  0.1.3 - added tile occupations.  0.1.3 - added tile occupations.
22  0.1.2 - added road quality and fixed map intialaizer bug  0.1.2 - added road quality and fixed map intialaizer bug
# Line 24  CHANGLELOG: Line 27  CHANGLELOG:
27  TO DO  TO DO
28  -------------------  -------------------
29  - bounds and error checking  - bounds and error checking
30    - dummy class constructor with no perams. function for creating map later *after* creating object.
31            we need this to create maps in global scope before we know the perams for creating the map.
32            (maybe)
33    
34  */  */
35    
36    
37    
 #include <stdio.h>  
   
   
38    
39  #ifndef MAP_H  #ifndef MAP_H
40  #define MAP_H  #define MAP_H
41    
42    
43    
44    
45    
46    
47  // defined elsewhere  // defined elsewhere
48  class Pod;  class Pod;
49    
# Line 49  enum obstacle { Line 57  enum obstacle {
57          WATER,  // 2          WATER,  // 2
58          PIT,    // 3          PIT,    // 3
59          BARRIER,// 4          BARRIER,// 4
60          // special paint marker for tracking pathfinding or whatever:          PAINT,  // 5 - special paint marker for tracking pathfinding or whatever:
         PAINT,  // 5  
61          // axis home base tiles:          // axis home base tiles:
62          RED,    // 6          RED,    // 6
63          ORANGE, // 7          ORANGE, // 7
# Line 89  class Map { Line 96  class Map {
96                  bool IsValid (short int x, short int y);                  bool IsValid (short int x, short int y);
97    
98                  void PrintToScreen(void); // dump to screen                  void PrintToScreen(void); // dump to screen
99                  void dump(FILE* out); //dump to file                  //void dump(FILE* out); //dump to file
100          private:          private:
101                  // map tile structure - the main gig                  // map tile structure - the main gig
102                  struct maptile {                  struct maptile {
103                          enum obstacle obst; //obstacle type                          obstacle obst; //obstacle type
104                          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.
105                          Pod* occu; // the pod that accupies this tile                          Pod* occu; // the pod that accupies this tile
106                          // specials - linked list                          // specials - linked list

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

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