Mission.h

Go to the documentation of this file.
00001 #ifndef MISSION_H
00002 #define MISSION_H
00003 
00004 #include <list>
00005 #include "Player.h"
00006 
00007 class MissionDef{
00008  public:
00009   /* Mission information*/
00010   char *name;
00011   char *wincond;
00012   
00013   /*Player information*/
00014   int  players;
00015   char **vehicle_specs;
00016   char **winbool;
00017   
00018   /* Terrain information*/
00019   char *terrain_specs;
00020   int size_x;
00021   int size_y;
00022   float *heightmap;
00023   float spacing;
00024   float scale;
00025   float detail_threshold;
00026   float offset;
00027   float noise;
00028   char *overall_texture;
00029   char *detail_texture;
00030   float detail_texture_size;
00031   //char *sprites;
00032   std::list<std::string> sprites;
00033   char *overlays;
00034   
00035   /* Additional sprites not strongly linked to the terrain*/
00036   char *extra_sprites;
00037   
00038   MissionDef(): name(NULL), wincond(NULL),players(0), vehicle_specs(NULL),
00039           terrain_specs(NULL), size_x(0), size_y(0), heightmap(NULL), 
00040           spacing(1.0), scale(1.0), detail_threshold(6.0), offset(0.0), 
00041           noise(0.0), overall_texture(NULL), detail_texture(NULL),
00042           detail_texture_size(0.0), overlays(NULL),
00043           extra_sprites(NULL) {}
00044   ~MissionDef();
00045 };
00046 
00047 MissionDef *LoadMissionSpec(char *mission_path);
00048 bool LoadTerrainSpec(MissionDef *new_mission);
00049 int LoadVehicleSpec(std::vector<VehicleSprite*> *vehicles,
00050               std::vector<VehicleGroup*> *platoons,
00051               int id,
00052               char *spec);
00053 int LoadSprites(char *spec);
00054 int SplitString(std::string str, std::list<std::string> *slist,
00055           char splitchar = ' ');
00056 #endif /*MISSION_H*/

Generated on Sun Mar 11 15:33:23 2007 for MetalWarriors by  doxygen 1.4.7