/[projectaxis]/projectaxis/projectAxis/src/visual/pgtest3.cpp
ViewVC logotype

Diff of /projectaxis/projectAxis/src/visual/pgtest3.cpp

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

revision 1.2 by leiavoia, Fri Aug 8 01:49:15 2003 UTC revision 1.3 by leiavoia, Wed Aug 20 18:25:14 2003 UTC
# Line 11  from A to B using the best possible rout Line 11  from A to B using the best possible rout
11  */  */
12    
13    
14  #include "../map/pathfinding/stlastar.h"  //#include "../map/pathfinding/stlastar.h"
15  #include "../map/pathfinding/mapsearch_pod.h"  //#include "../map/pathfinding/mapsearch_pod.h"
16  #include "../map/blotchmaker.h"  //#include "../map/blotchmaker.h"
17  #include "../map/map.h"  #include "../map/map.h"
18  #include "../pods/pod.h"  #include "../axis/axis.h"
19  #include "../pods/missions.h"  //#include "../pods/pod.h"
20  #include "../shapes/shape.h"  //#include "../pods/missions.h"
21  #include "../misc/bonus.h"  //#include "../shapes/shape.h"
22    //#include "../misc/bonus.h"
23    
24  #include "renderman.h"  #include "renderman.h"
25    #include "../core/turn_mgr.h"
26  #include <stdlib.h>  //#include <stdlib.h>
27  #include <iostream>  //#include <iostream>
28  #include <stdio.h>  //#include <stdio.h>
29  #include <time.h>  //#include <time.h>
   
 #include <SDL/SDL.h>  
 #include <SDL/SDL_image.h>  
   
30    
31    
32    
33    
34  using namespace std;  using namespace std;
35    
36    Map* themap;
   
   
   
   
 Map* themap;// = new Map(30,30);  
37  RenderMan* rm;  RenderMan* rm;
38    Axis* a1;
39    Axis* a2;
40    Axis* a3;
41    Axis* a4;
42    
43  /////////// MAIN ///////////  /////////// MAIN ///////////
44  int main( int argc, char *argv[] ) { // not that we actually have any command line args, but just in case...  int main( int argc, char *argv[] ) { // not that we actually have any command line args, but just in case...
# Line 54  int main( int argc, char *argv[] ) { // Line 47  int main( int argc, char *argv[] ) { //
47  //Seed the random numbers:  //Seed the random numbers:
48  srand(time(NULL));  srand(time(NULL));
49    
50    // get some teams to play with
51    Axis* a1 = new Axis(AXISCOLOR_R, 0);
52    Axis* a2 = new Axis(AXISCOLOR_BL, 0);
53    Axis* a3 = new Axis(AXISCOLOR_Y, 0);
54    Axis* a4 = new Axis(AXISCOLOR_G, 0);
55    
56  // MAKE THE MAP  // create a turn manager
57    TurnMgr* turnmgr = new TurnMgr();
   
 //Map* themap;  
   
   
   
   
 //Blotchmaker* blotchmaker;  
 //blotchmaker = new Blotchmaker();  
   
   
   
 /*  
 // SAMPLE CONFIG  
   
 // Group vars:  
 blotchmaker->SetHBSize(1);  
 blotchmaker->SetMaxBlotches(7);  
 blotchmaker->SetTypeChances(1,1);  
 blotchmaker->SetAxisPalette(5,7,8,9);  
   
 // SLOT 0  
 blotchmaker->SetBlotchType(0, 1);  
 blotchmaker->SetTilesPerBlotch(0, 12);  
 blotchmaker->SetModeChances(0, 0, 1, 0, 0);  
 blotchmaker->SetTurnChances(0, 6, 1, 1, 0);  
 blotchmaker->SetBlankShotChance(0, 5);  
 blotchmaker->SetEdgeGrav(0, 0);  
 blotchmaker->SetEdgeDet(0, 0);  
 blotchmaker->SetBrush(0, SS);  
 blotchmaker->SetStep(0, 1);  
   
 // SLOT 1  
 blotchmaker->SetBlotchType(1, 1);  
 blotchmaker->SetTilesPerBlotch(1, 1);  
 blotchmaker->SetModeChances(1, 0, 1, 0, 0);  
 blotchmaker->SetTurnChances(1, 6, 1, 1, 0);  
 blotchmaker->SetBlankShotChance(1, 5);  
 blotchmaker->SetEdgeGrav(1, 0);  
 blotchmaker->SetEdgeDet(1, 5);  
 blotchmaker->SetBrush(1, MP);  
 blotchmaker->SetStep(1, 1);  
   
   
   
 // make blotches on the map  
 bool good = blotchmaker->StartBlotching();  
   
 if (!good) {  
         cout << "BAD MAP - TRY AGAIN\n";  
         return 1;  
         }  
   
 */  
   
   
   
   
   
 // set themap pointers  
 //Pod::SetMapPointer(*themap);  
   
 //PG_MapWindow::SetMapPointer(*themap);  
 //RenderMan::SetMapPointer(*themap);  
   
   
   
   
   
   
   
 /*  
 // set Quarterback with movement  
 Pod* a_pod = new Pod(0);  
 a_pod->Place(29,29);  
 a_pod->SetAvoid(6);  
 a_pod->AddMove(0,0);  
   
 // set opponants  
 Pod* another_pod = new Pod(1);  
 another_pod->Place(14,3);  
 another_pod->AddMission(PATROL, 0);  
   
 Pod* another_pod2 = new Pod(1);  
 another_pod2->Place(8,9);  
 another_pod2->AddMission(PATROL, 0);  
   
 Pod* another_pod3 = new Pod(1);  
 another_pod3->Place(6,11);  
 another_pod3->AddMission(PATROL, 0);  
 */  
   
   
 //------------------------------  
   
   
   
58    
59  // this starts and runs everything by itself. ignore unused variable warning  // this starts and runs everything by itself. ignore unused variable warning
60  rm = new RenderMan(1024, 768);  rm = new RenderMan(1024, 768);
61    
 /*  
 // run the main loop  
 for(int i=0; i<10; i++) {  
         a_pod->Move();  
         another_pod->Misn(0)->Exe();  
         another_pod2->Misn(0)->Exe();  
         another_pod3->Misn(0)->Exe();  
         }  
 */  
   
   
62  //delete themap;  //delete themap;
63  //delete blotchmaker;  //delete blotchmaker;
64    
# Line 177  return 0; Line 68  return 0;
68    
69    
70    
   
   
   
   
   
   
   
   
   
   
71    
72    
73    

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

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