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 |
|
|
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[] = { |
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 |
|
|
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) |
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 |