/[projectaxis]/projectaxis/projectAxis/src/shapes/shape.h
ViewVC logotype

Diff of /projectaxis/projectAxis/src/shapes/shape.h

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

revision 1.1 by leiavoia, Sat Jun 7 00:13:42 2003 UTC revision 1.2 by leiavoia, Wed Aug 20 18:23:48 2003 UTC
# Line 3  Line 3 
3  ====================  ====================
4  shape.h  shape.h
5  ====================  ====================
6  version 0.0.1  version 0.0.0
7  ====================  ====================
8    
9  This is the basic class for AXIS shapes. Shapes in combat are different and should use another (probably inhererited) class.  This is the basic class for AXIS shapes. Shapes in combat are different and should use another (probably inhererited) class.
# Line 12  This is the basic class for AXIS shapes. Line 12  This is the basic class for AXIS shapes.
12    
13  TO-DO & EXPANSION LIST  TO-DO & EXPANSION LIST
14  ----------------------  ----------------------
15    everything
16    
17    
18  CHANGELOG:  CHANGELOG:
19  ----------------------  ----------------------
20    0.0.1 - June 12, 2003
21            first shape class version. includes dummy info for testing and implemented Shape Index for finding
22                    shapes from a global environment by shape ID. Class includes Get functions as well.
23    
24    
25    
26    
# Line 25  CHANGELOG: Line 29  CHANGELOG:
29    
30    
31  /*  /*
32    
33    WHAT WORKS AGAINST WHAT:
34    
35  Material (defense type) -  Material (defense type) -
36    
37          MATERIAL        GOOD    BAD          MATERIAL        GOOD            BAD
38          Wood    Electrical      Biological          Wood            Electrical      Biological
39          Chrome  Biological      Electrical          Chrome          Biological      Electrical
40          Stone   Thermo  Chemical          Stone           Thermo          Chemical
41          Glass   Chemical        Thermo          Glass           Chemical        Thermo
42    
43  Force Method (attack type) -  Force Method (attack type) -
44    
45          FORCE   GOOD    BAD          FORCE           GOOD            BAD
46          Chemical        Stone   Glass          Chemical        Stone           Glass
47          Biological      Wood    Chrome          Biological      Wood            Chrome
48          Electrical      Chrome  Wood          Electrical      Chrome          Wood
49          Thermo  Glass   Stone          Thermo          Glass           Stone
50    */
51    
52    
53    
54    #ifndef SHAPE_H
55    #define SHAPE_H
56    
57    #include <vector>
58    #include <string>
59    #include "../pods/pod.h"
60    
 enum force_type {  
         WOOD=0,  
         CHROME,  
         STONE,  
         GLASS  
         };  
61    
62  enum material {  enum material {
63          CHEM=0,          MAT_WOOD=0,
64          BIO,          MAT_CHROME,
65          ELEC,          MAT_STONE,
66          THERM          MAT_GLASS
67          };          };
68    
69  enum shape_type {  enum force_type {
70          CUBE=0,          FORCE_CHEM=0,
71          SPHERE,          FORCE_BIO,
72          PRISM,          FORCE_ELEC,
73          CYL,          FORCE_THERM
         TETRA,  
         PYRA,  
         TORUS,  
         BLOCK,  
         CONE,  
         AMORPH,  
         SENTRY  
74          };          };
75    
76    enum shape_type {
77            SHAPE_CUBE=0,
78            SHAPE_SPHERE,
79            SHAPE_PRISM,
80            SHAPE_CYL,
81            SHAPE_TETRA,
82            SHAPE_PYRAMID,
83            SHAPE_TORUS,
84            SHAPE_BLOCK,
85            SHAPE_CONE,
86            SHAPE_AMORPH,
87            SHAPE_SENTRY
88            };
89    
90    
 */  
   
91    
92    
93    
94  class Shape {  class Shape {
95  public:  public:
96          // *structors          // *STRUCTORS
97          Shape(/* some perams */);          Shape(int axis);
98            ~Shape();
99          // get functions  
100            // GET
101            int GetID();
102            string GetName();
103            shape_type GetShapeType();
104            int GetMaxHP();
105            int GetAtt();
106            int GetDef();
107            int GetSpd();
108            int GetOpac();
109            int GetAcu();
110            int GetSize();
111            int GetIntel(); // No! I want AMD :-)
112            int GetBrave();
113            int GetConst();
114            force_type GetForceType();
115            material GetMat();
116    
117            // SET TODO:
118            // void SetAxis();
119            // void SetPod();
120            // SetFormation();
121    
122            /** returns a pointer to a shape based on the shape's ID number. If no match is found, it returns NULL */
123            static Shape* GetShape(int id);
124            /** returns the total number of shapes in existence */
125            static int GetNumShapes();
126    
127  private:  private:
128          //stats          //stats
129          int id; // ID number          int id; // ID number
130          char name[20]; // cool name          string name; // cool name
131          int stype; // type of shape          shape_type stype; // type of shape
132          int hp; // max hit points          int maxhp; // max hit points
133          int att; // attack / force          int att; // attack / force
134          int def; // defense / resistence          int def; // defense / resistence
135          int spd; // speed          int spd; // speed
# Line 96  private: Line 137  private:
137          int acu; // acuity / vision          int acu; // acuity / vision
138          int size; // size          int size; // size
139          int intel; // intelligence          int intel; // intelligence
140          int ftype; // force type          int bravery; // pending
141          int mat; // material / defense type          int constancy; // pending
142          int bravery;          force_type ftype; // force type
143          int constancy;          material mat; // material / defense type
144    
145          int pod; // the pod ID this shape belongs to - pointer maybe?  
146            Pod* pod; // the pod this shape belongs to
147    
148    
149            static vector<Shape*> shape_index; // a vector of pointers to shapes. now we can look them up by ID number
150    
151          // battle formation?          // battle formation?
152          // battle objectives/orders?          // battle objectives/orders?
153            // status
154            // bonuses
155    
156            static int id_counter; // unique ID counter
157    
158          //functions          //functions
159    
160    
161            static void AddShape(Shape* s); // adds the shape to the shape index
162    
163  };  };
164    
165    
166    
167    #endif
168    
169    
170    

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