vegastrike  0.5.1.r1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
galaxy_gen.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <string>
#include "macosx_math.h"
#include <math.h>
#include <time.h>
#include <assert.h>
#include "configxml.h"
#include "vs_globals.h"
#include "xml_support.h"
#include "gfxlib.h"
#include "galaxy_xml.h"
#include "galaxy_gen.h"
#include "vs_random.h"
#include <ctype.h>
#include "vsfilesystem.h"

Go to the source code of this file.

Classes

struct  StarSystemGent::Color
 
class  StarSystemGent::Vector
 
struct  StarSystemGent::GradColor
 
struct  StarSystemGent::PlanetInfo
 
struct  StarSystemGent::StarInfo
 

Namespaces

 StarSystemGent
 

Constant Groups

 StarSystemGent
 

Macros

#define M_PI   3.1415926536
 

Functions

string getStarSystemName (const string &in)
 
float StarSystemGent::mmax (float a, float b)
 
int StarSystemGent::rnd (int lower, int upper)
 
string StarSystemGent::getGenericName (vector< string > &s)
 
string StarSystemGent::getRandName (vector< string > &s)
 
float StarSystemGent::grand ()
 
float StarSystemGent::difffunc (float inputdiffuse)
 
void StarSystemGent::WriteLight (unsigned int i)
 
void StarSystemGent::ResetGlobalVariables ()
 
void StarSystemGent::readColorGrads (vector< string > &entity, const char *file)
 
float StarSystemGent::clamp01 (float a)
 
float StarSystemGent::getcolor (float c, float var)
 
GradColor StarSystemGent::whichGradColor (float r, unsigned int &j)
 
Color StarSystemGent::StarColor (float radius, unsigned int &entityindex)
 
GFXColor StarSystemGent::getStarColorFromRadius (float radius)
 
float StarSystemGent::LengthOfYear (Vector r, Vector s)
 
void StarSystemGent::CreateLight (unsigned int i)
 
Vector StarSystemGent::generateCenter (float minradii, bool jumppoint)
 
float StarSystemGent::makeRS (Vector &r, Vector &s, float minradii, bool jumppoint)
 
void StarSystemGent::Updateradii (float orbitsize, float thisplanetradius)
 
Vector StarSystemGent::generateAndUpdateRS (Vector &r, Vector &s, float thisplanetradius, bool jumppoint)
 
vector< string > StarSystemGent::parseBigUnit (const string &input)
 
void StarSystemGent::WriteUnit (const string &tag, const string &name, const string &filename, const Vector &r, const Vector &s, const Vector &center, const string &nebfile, const string &destination, bool faction, float thisloy=0)
 
string StarSystemGent::getJumpTo (const string &s)
 
string StarSystemGent::starin (const string &input)
 
string StarSystemGent::GetNebFile (string &input)
 
string StarSystemGent::AnalyzeType (string &input, string &nebfile, float &radius)
 
void StarSystemGent::MakeSmallUnit ()
 
void StarSystemGent::MakeJump (float radius, bool forceRS=false, Vector R=Vector(0, 0, 0), Vector S=Vector(0, 0, 0), Vector center=Vector(0, 0, 0), float thisloy=0)
 
void StarSystemGent::MakeBigUnit (int callingentitytype, string name=string(), float orbitalradius=0)
 
void StarSystemGent::MakeMoons (float callingradius, int callingentitytype)
 
void StarSystemGent::MakeJumps (float callingradius, int callingentitytype, int numberofjumps)
 
void StarSystemGent::MakePlanet (float radius, int entitytype, string texturename, string unitname, string technique, int texturenum, int numberofjumps, int numberofstarbases)
 
void StarSystemGent::beginStar ()
 
void StarSystemGent::endStar ()
 
void StarSystemGent::CreateStar ()
 
void StarSystemGent::CreateFirstStar ()
 
void StarSystemGent::CreatePrimaries ()
 
void StarSystemGent::CreateStarSystem ()
 
void StarSystemGent::readentity (vector< string > &entity, const char *filename)
 
const char * StarSystemGent::noslash (const char *in)
 
string getStarSystemFileName (const string &input)
 
string getStarSystemSector (const string &in)
 
void readnames (vector< string > &entity, const char *filename)
 
void readplanetentity (vector< StarInfo > &starinfos, string planetlist, unsigned int numstars)
 
void generateStarSystem (SystemInfo &si)
 

Variables

const char StarSystemGent::nada [1] = ""
 
vector< ColorStarSystemGent::lights
 
VSFile StarSystemGent::f
 
int StarSystemGent::xmllevel
 
const int StarSystemGent::STAR = 0
 
const int StarSystemGent::PLANET = 1
 
const int StarSystemGent::MOON = 2
 
const int StarSystemGent::JUMP = 3
 
vector< string > StarSystemGent::starentities
 
vector< string > StarSystemGent::jumps
 
vector< string > StarSystemGent::gradtex
 
vector< string > StarSystemGent::naturalphenomena
 
vector< string > StarSystemGent::starbases
 
unsigned int StarSystemGent::numstarbases
 
unsigned int StarSystemGent::numnaturalphenomena
 
unsigned int StarSystemGent::numstarentities
 
vector< string > StarSystemGent::background
 
vector< string > StarSystemGent::names
 
vector< string > StarSystemGent::rings
 
const float StarSystemGent::moonofmoonprob = .01
 
string StarSystemGent::systemname
 
vector< float > StarSystemGent::radii
 
const float StarSystemGent::minspeed = .001
 
const float StarSystemGent::maxspeed = 8
 
vector< float > StarSystemGent::starradius
 
string StarSystemGent::faction
 
vector< GradColorStarSystemGent::colorGradiant
 
float StarSystemGent::compactness = 2
 
float StarSystemGent::jumpcompactness = 2
 
vector< StarInfoStarSystemGent::stars
 
unsigned int StarSystemGent::planetoffset
 
unsigned int StarSystemGent::staroffset
 
unsigned int StarSystemGent::moonlevel
 

Macro Definition Documentation

#define M_PI   3.1415926536

Definition at line 27 of file galaxy_gen.cpp.

Function Documentation

void generateStarSystem ( SystemInfo si)

Definition at line 1344 of file galaxy_gen.cpp.

string getStarSystemFileName ( const string &  input)

Definition at line 1165 of file galaxy_gen.cpp.

string getStarSystemName ( const string &  in)

Definition at line 1169 of file galaxy_gen.cpp.

string getStarSystemSector ( const string &  in)

Definition at line 1173 of file galaxy_gen.cpp.

void readnames ( vector< string > &  entity,
const char *  filename 
)

warning... obvious vulnerability

Definition at line 1182 of file galaxy_gen.cpp.

void readplanetentity ( vector< StarInfo > &  starinfos,
string  planetlist,
unsigned int  numstars 
)

Definition at line 1207 of file galaxy_gen.cpp.