/[projectaxis]/projectaxis/projectAxis/src/pods/pod.cpp
ViewVC logotype

Diff of /projectaxis/projectAxis/src/pods/pod.cpp

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

revision 1.6 by leiavoia, Fri Jul 25 21:27:02 2003 UTC revision 1.7 by leiavoia, Fri Aug 8 02:13:36 2003 UTC
# Line 36  pod.cpp Line 36  pod.cpp
36    
37    
38  // constants  // constants
39  const long TIMING_LOOP_DELAY = 80000; // ticks per re-display for *UNIX only* in shell debug output  const long TIMING_LOOP_DELAY = 50000; // ticks per re-display for *UNIX only* in shell debug output
40  const int MAX_POD_SIZE = 500; // the number the combined size of all shapes in the pod must not exceed.  const int MAX_POD_SIZE = 500; // the number the combined size of all shapes in the pod must not exceed.
41  const int MAX_NUM_SHAPES = 12; // even if the MAX_POD_SIZE should allow it, number of shapes in the pod should not exceed this.  const int MAX_NUM_SHAPES = 12; // even if the MAX_POD_SIZE should allow it, number of shapes in the pod should not exceed this.
42  const int ROAD_TRAMPLE_DIVISOR = 15; // road trample = pod size / trample divisor  const int ROAD_TRAMPLE_DIVISOR = 20; // road trample = pod size / trample divisor
43    
44    
45    
# Line 52  vector<Pod*> Pod::pod_index; // a vector Line 52  vector<Pod*> Pod::pod_index; // a vector
52  // declared elsewhere:  // declared elsewhere:
53  //extern RenderMan* rm;  //extern RenderMan* rm;
54    
55    
56  // list of fun names:  // list of fun names:
57  // TODO: put these in a config file someday. someday....  // TODO: put these in a config file someday. someday....
58  string pod_names[] = {  string pod_names[] = {
# Line 151  Pod::~Pod(){ Line 151  Pod::~Pod(){
151          // remove from map - unset occupation          // remove from map - unset occupation
152          themap->UnsetOccu(x_pos, y_pos);          themap->UnsetOccu(x_pos, y_pos);
153    
154          // destroy all shapes inside (if any - there shouldn't really be any)          // FIXME destroy all shapes inside (if any - there shouldn't really be any)
155          }          }
156    
157    
# Line 505  bool Pod::Walk() { Line 505  bool Pod::Walk() {
505  // moves the pod across the map along the specified path until it runs out of juice.  // moves the pod across the map along the specified path until it runs out of juice.
506  // return zero if goal was not hit, 1 if success  // return zero if goal was not hit, 1 if success
507    
508          // ERROR: got path?          // FIXME ERROR: got path?
   
509    
510            // FIXME - is this the best place to do this?
511          xp++; // inc pod's own experience          xp++; // inc pod's own experience
512    
513          // the working node (our current position)          // the working node (our current position)
# Line 562  bool Pod::Walk() { Line 562  bool Pod::Walk() {
562                  while ( (clock() - s) < TIMING_LOOP_DELAY) {continue;} // NOTE: unix dependent time ticks                  while ( (clock() - s) < TIMING_LOOP_DELAY) {continue;} // NOTE: unix dependent time ticks
563                  //system("clear");                  //system("clear");
564                  //map->PrintToScreen();                  //map->PrintToScreen();
565          rm->GetActiveScreen()->MovePod(was->x, was->y, is->x, is->y);                  
566          //cout << rm->GetTileSize();           rm->MovePod(was->x, was->y, is->x, is->y);
567    
568                  // Engagement Prompt (will you marry me? :-)                  // Engagement Prompt (will you marry me? :-)
569                  // check for enemy occupations in each adjascent tile                  // check for enemy occupations in each adjascent tile

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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