00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #if !defined( __STARSYSTEM_H__ )
00016 #define __STARSYSTEM_H__
00017
00018 class Planet;
00019
00020 class StarSystem : public XPoint , public HPaint , public vector<Planet *> {
00021 private:
00022
00023 int sId;
00024
00025 XRect dst , ssDst;
00026
00027 Rsrc general;
00028
00029 public:
00030
00031 const int starType;
00032 const int starSize;
00033 const string ssName , starName , starNameDescr;
00034
00035 public:
00036
00037 StarSystem( const string &aStarName , const string &aStarNameDescr , const string &aSsName , const int aStarType , const int aStarSize );
00038
00039 ~StarSystem( void );
00040
00041 const int GetImageId( void ) const { return sId; }
00042 const bool DrawInGalaxy( SDL_Surface *target );
00043 const bool DrawInfluenceZones( SDL_Surface *target );
00044
00045 void DrawStarSystem( SDL_Surface *target , XRect &in , const int aSunIds );
00046 const bool InVicinity( const XPoint *p );
00047
00049 const bool ClickedOn( const XPoint *p );
00050
00051 const string GetPlanetName( const int pl );
00052 const int GetStarType( void ) const { return starType; }
00053 const int GetStarSize( void ) const { return starSize + 1; }
00054
00055 string GetStarInfo( void );
00056
00057 const bool Save( ofstream *of );
00058
00059 protected:
00060
00061 void Setup( void );
00062 };
00063
00064
00065
00066
00067 #endif