Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <star_system.h>
Public Member Functions | |
virtual | ~GameStarSystem () |
GameStarSystem (const char *filename, const Vector ¢r=Vector(0, 0, 0), const float timeofyear=0) | |
Background * | getBackground () |
void | activateLightMap (int stage=1) |
activates the light map texture More... | |
Texture * | getLightMap () |
Terrain * | getTerrain (unsigned int which) |
unsigned int | numTerrain () |
activates the light map texture More... | |
ContinuousTerrain * | getContTerrain (unsigned int which) |
unsigned int | numContTerrain () |
ClickList * | getClickList () |
void | Draw (bool DrawCockpit=true) |
void | Update (float priority, bool executeDirector) |
update a simulation atom ExecuteDirector must be false if star system is just loaded before mission is loaded More... | |
void | SwapIn () |
re-enables the included lights and terrains More... | |
void | SwapOut () |
Disables included lights and terrains. More... | |
virtual void | VolitalizeJumpAnimation (const int ani) |
virtual void | DoJumpingComeSightAndSound (Unit *un) |
virtual int | DoJumpingLeaveSightAndSound (Unit *un) |
void | createBackground (StarSystem::StarXML *xml) |
![]() | |
StarSystem () | |
StarSystem (const char *filename, const Vector ¢roid=Vector(0, 0, 0), const float timeofyear=0) | |
virtual | ~StarSystem () |
void | SetZone (unsigned int zonenum) |
unsigned int | GetZone () |
virtual void | AddMissileToQueue (class MissileEffect *) |
virtual void | UpdateMissiles () |
void | UpdateUnitPhysics (bool firstframe) |
void | RequestPhysics (Unit *un, unsigned int queue) |
Requeues the unit so that it is simulated ASAP. More... | |
void | Update (float priority, bool executeDirector) |
update a simulation atom ExecuteDirector must be false if star system is just loaded before mission is loaded More... | |
void | Update (float priority) |
unsigned int | getCurrentSimFrame () const |
Gets the current simulation frame. More... | |
void | ExecuteUnitAI () |
std::string | getFileName () const |
std::string | getName () |
UnitCollection & | getUnitList () |
Loads the star system from an XML file. More... | |
UnitCollection & | gravitationalUnits () |
Unit * | nextSignificantUnit () |
void | AddUnit (Unit *unit) |
bool | RemoveUnit (Unit *unit) |
Removes from draw list. More... | |
bool | JumpTo (Unit *unit, Unit *jumppoint, const std::string &system, bool force=false, bool save_coordinates=false) |
Static Public Member Functions | |
static void | DrawJumpStars () |
![]() | |
static void | beginElement (void *userData, const XML_Char *name, const XML_Char **atts) |
static void | endElement (void *userData, const XML_Char *name) |
static void | ProcessPendingJumps () |
Friends | |
class | Atmosphere |
Additional Inherited Members | |
![]() | |
struct StarSystem::Statistics | stats |
std::multimap< Unit *, Unit * > | last_collisions |
class CollideTable * | collidetable |
CollideMap * | collidemap [2] |
class bolt_draw * | bolts |
![]() | |
enum | PHYSICS_STAGE { MISSION_SIMULATION, PROCESS_UNIT, PHY_NUM } |
Physics is divided into 3 stages spread over 3 frames. More... | |
![]() | |
void | LoadXML (const char *, const Vector ¢roid, const float timeofyear) |
void | beginElement (const std::string &name, const AttributeList &attributes) |
void | endElement (const std::string &name) |
void | AddStarsystemToUniverse (const std::string &filename) |
The Light Map corresponding for the BP for spheremapping. More... | |
void | RemoveStarsystemFromUniverse () |
![]() | |
struct StarSystem::StarXML * | xml |
enum StarSystem::PHYSICS_STAGE | current_stage |
std::vector< Terrain * > | terrains |
Stars, planets, etc. Orbital mechanics precalculated. More... | |
std::vector< ContinuousTerrain * > | contterrains |
UnitCollection | drawList |
Everything to be drawn. Folded missiles in here oneday. More... | |
UnitCollection | GravitationalUnits |
UnitCollection | physics_buffer [SIM_QUEUE_SIZE+1] |
unsigned int | current_sim_location |
unsigned char | no_collision_time |
Objects subject to global gravitron physics (disabled) More... | |
char * | name |
system name More... | |
std::string | filename |
un_iter | sigIter |
double | time |
to track the next given physics frame More... | |
Stars * | stars |
The background associated with this system. More... | |
int | lightcontext |
std::vector< class MissileEffect * > | dischargedMissiles |
unsigned int | zone |
Star System Scene management for a star system Per-Frame Drawing & Physics simulation
Definition at line 21 of file star_system.h.
|
virtual |
Definition at line 115 of file star_system.cpp.
References _Universe, StarSystem::bolts, Universe::popActiveStarSystem(), Universe::pushActiveStarSystem(), StarSystem::RemoveStarsystemFromUniverse(), and StarSystem::stars.
GameStarSystem::GameStarSystem | ( | const char * | filename, |
const Vector & | centr = Vector( 0, 0, 0 ) , |
||
const float | timeofyear = 0 |
||
) |
adds to jumping table;
Definition at line 46 of file star_system.cpp.
References _Universe, StarSystem::AddStarsystemToUniverse(), StarSystem::bolts, StarSystem::collidetable, StarSystem::current_stage, GFXCreateLightContext(), Atmosphere::Parameters::high_ambient_color, Atmosphere::Parameters::high_color, StarSystem::lightcontext, StarSystem::LoadXML(), Atmosphere::Parameters::low_ambient_color, Atmosphere::Parameters::low_color, StarSystem::MISSION_SIMULATION, StarSystem::name, StarSystem::no_collision_time, Universe::popActiveStarSystem(), Universe::pushActiveStarSystem(), Atmosphere::Parameters::radius, Atmosphere::Parameters::scattering, StarSystem::time, and UpdateTime().
|
virtual |
activates the light map texture
Reimplemented from StarSystem.
Definition at line 95 of file star_system.cpp.
References CUBE_MAP_GEN, CUBEMAP, GFXActiveTexture(), GFXADDTEXTURE, GFXTextureCoordGenMode(), GFXTextureEnv(), GFXToggleTexture(), Texture::MakeActive(), SPHERE_MAP_GEN, and TEXTURE2D.
|
virtual |
Reimplemented from StarSystem.
Definition at line 422 of file star_system.cpp.
References StarSystem::StarXML::backgroundColor, StarSystem::StarXML::backgroundDegamma, StarSystem::StarXML::backgroundname, VSFileSystem::VSFile::Close(), CUBEMAP, CUBEMAP_NEGATIVE_X, CUBEMAP_NEGATIVE_Y, CUBEMAP_NEGATIVE_Z, CUBEMAP_POSITIVE_X, CUBEMAP_POSITIVE_Y, CUBEMAP_POSITIVE_Z, DEFAULT_ADDRESS_MODE, EnvironmentMapGeneratorMain(), f, StarSystem::filename, g_game, VegaConfig::getVariable(), GFXFALSE, GFXTRUE, MIPMAP, StarSystem::StarXML::numnearstars, StarSystem::StarXML::numstars, VSFileSystem::Ok, VSFileSystem::VSFile::OpenReadOnly(), XMLSupport::parse_int(), StarSystem::StarXML::reflectivity, vs_options::starblend, StarSystem::stars, StarSystem::StarXML::starsp, BaseUtil::Texture(), TEXTURE2D, TEXTURE_2D, VSFileSystem::TextureFile, TRILINEAR, vs_config, and game_data_t::zfar.
|
virtual |
Reimplemented from StarSystem.
Definition at line 124 of file star_system_jump.cpp.
References AddJumpAnimation(), Unit::GetOrientation(), vs_options::jumpgatesize, Unit::LocalPosition(), q, Unit::rSize(), Vector, and VolatileJumpAnimations.
Reimplemented from StarSystem.
Definition at line 132 of file star_system_jump.cpp.
References AddJumpAnimation(), AUDCreateSound(), AUDPlay(), Unit::UnitJump::delay, Unit::GetJumpStatus(), Unit::GetOrientation(), Unit::GetVelocity(), vs_options::jumpleave, Unit::LocalPosition(), Unit::Position(), q, Unit::rSize(), and Vector.
|
virtual |
Adds to draw list Draws a frame of action, interpolating between physics frames
this is the final, smoothly calculated cam
Reimplemented from StarSystem.
Definition at line 228 of file star_system.cpp.
References _Universe, Universe::AccessCamera(), Universe::AccessCockpit(), UnitWithinRangeLocator< T >::action, Universe::activeStarSystem(), UnitCollection::UnitIterator::advance(), calc_blend_factor(), cam_setup_phase, StarSystem::collidemap, ConditionalCursorDraw(), StarSystem::contterrains, UnitCollection::createIterator(), Unit::cumulative_transformation, Unit::cur_sim_queue_slot, Unit::curr_physical_state, UnitCollection::UnitIterator::current(), StarSystem::current_stage, DEPTHTEST, DEPTHWRITE, Bolt::Draw(), Background::Draw(), Stars::Draw(), UnitDrawer::draw(), Cockpit::Draw(), vs_options::draw_near_stars_in_front_of_planets, ParticleTrail::DrawAndUpdate(), DrawJumpStars(), UnitDrawer::drawParents(), findObjectsFromPosition(), FOG_OFF, StarSystem::getCurrentSimFrame(), Camera::GetNebula(), Cockpit::GetParent(), Camera::GetPosition(), Cockpit::GetSaveParent(), GFXColor4f(), GFXDisable(), GFXEnable(), GFXFogMode(), GFXGetLightContextAmbient(), GFXLightContextAmbient(), GFXPopGlobalEffects(), GFXTRUE, UnitDrawer::grav_acquire(), StarSystem::GravitationalUnits, i, Identity(), interpolation_blend_factor, Unit::isSubUnit(), LIGHTING, linear_interpolate(), CollideArray::lower_bound(), Magnitude(), UnitDrawer::parent, UnitDrawer::parenttarget, particleTrail, StarSystem::PHY_NUM, StarSystem::physics_buffer, Unit::Position(), vs_options::precull_dist, Unit::prev_physical_state, Halo::ProcessDrawQueue(), Animation::ProcessDrawQueue(), Beam::ProcessDrawQueue(), GamePlanet::ProcessTerrains(), Mesh::ProcessUndrawnMeshes(), Mesh::ProcessZFarMeshes(), queryTime(), QVector, Terrain::RenderAll(), Unit::rSize(), saved_interpolation_blend_factor, Nebula::SetFogState(), Cockpit::SetupViewPort(), Unit::sim_atom_multiplier, SIM_QUEUE_SIZE, SIMULATION_ATOM, StarSystem::stars, Unit::Target(), StarSystem::time, Unit::UNIT_ONLY, AnimatedTexture::UpdateAllFrame(), MeshAnimation::UpdateFrames(), Camera::UpdateGFX(), and WarpTrailDraw().
|
static |
Definition at line 86 of file star_system_jump.cpp.
References a, Unit::UnitJump::delay, Unit::GetJumpStatus(), Unit::GetOrientation(), i, JumpAnimations, vs_options::jumpgatesize, k, pendingjump, Unit::Position(), q, Unit::rSize(), Vector, and VolatileJumpAnimations.
Referenced by Draw().
|
inlinevirtual |
|
virtual |
Loads the star system from an XML file returns xy sorted bounding spheres of all units in current view
Reimplemented from StarSystem.
Definition at line 138 of file star_system.cpp.
References StarSystem::drawList.
|
inlinevirtual |
Reimplemented from StarSystem.
Definition at line 52 of file star_system.h.
References StarSystem::contterrains.
|
virtual |
Reimplemented from StarSystem.
Definition at line 90 of file star_system.cpp.
Reimplemented from StarSystem.
Definition at line 44 of file star_system.h.
References StarSystem::terrains.
|
inlinevirtual |
Reimplemented from StarSystem.
Definition at line 56 of file star_system.h.
References StarSystem::contterrains.
|
inlinevirtual |
activates the light map texture
Reimplemented from StarSystem.
Definition at line 48 of file star_system.h.
References StarSystem::terrains.
|
virtual |
re-enables the included lights and terrains
Reimplemented from StarSystem.
Definition at line 149 of file star_system.cpp.
References GFXSetLightContext(), and StarSystem::lightcontext.
|
virtual |
Disables included lights and terrains.
Reimplemented from StarSystem.
Definition at line 154 of file star_system.cpp.
update a simulation atom ExecuteDirector must be false if star system is just loaded before mission is loaded
|
virtual |
Reimplemented from StarSystem.
Definition at line 77 of file star_system_jump.cpp.
References a, AnimationNulls, JumpAnimations, vs_options::jumpanimationshrink, and VolatileJumpAnimations.
|
friend |
Definition at line 76 of file star_system.h.