Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SimRegion Class Reference

#include <Sim.h>

List of all members.

Public Types

enum  { REAL_SPACE, AIR_SPACE }

Public Member Functions

 SimRegion (Sim *sim, const char *name, int type)
 SimRegion (Sim *sim, OrbitalRegion *rgn)
virtual ~SimRegion ()
int operator== (const SimRegion &r) const
int operator< (const SimRegion &r) const
int operator<= (const SimRegion &r) const
virtual void Activate ()
virtual void Deactivate ()
virtual void ExecFrame (double seconds)
void ShowGrid (int show=true)
void NextView ()
ShipFindShip (const char *name)
ShipGetPlayerShip ()
void SetPlayerShip (Ship *ship)
OrbitalRegionGetOrbitalRegion ()
TerrainGetTerrain ()
bool IsActive () const
bool IsAirSpace () const
bool IsOrbital () const
bool CanTimeSkip () const
virtual ShipFindShipByObjID (DWORD objid)
virtual ShotFindShotByObjID (DWORD objid)
virtual void InsertObject (Ship *ship)
virtual void InsertObject (Shot *shot)
virtual void InsertObject (Explosion *explosion)
virtual void InsertObject (Debris *debris)
virtual void InsertObject (Asteroid *asteroid)
const char * Name () const
int Type () const
int NumShips ()
List< Ship > & Ships ()
List< Ship > & Carriers ()
List< Shot > & Shots ()
List< Drone > & Drones ()
List< Debris > & Rocks ()
List< Asteroid > & Roids ()
List< Explosion > & Explosions ()
List< SimRegion > & Links ()
StarSystemSystem ()
Point Location () const
void SetSelection (Ship *s)
bool IsSelected (Ship *s)
ListIter< ShipGetSelection ()
void ClearSelection ()
void AddSelection (Ship *s)
List< Contact > & TrackList (int iff)
void ResolveTimeSkip (double seconds)

Static Public Member Functions

static const char * TYPENAME ()

Protected Member Functions

void CommitMission ()
void TranslateObject (SimObject *object)
void AttachPlayerShip (int index)
void DestroyShips ()
void DestroyShip (Ship *ship)
void NetDockShip (Ship *ship, Ship *carrier, FlightDeck *deck)
void UpdateSky (double seconds, const Point &ref)
void UpdateShips (double seconds)
void UpdateShots (double seconds)
void UpdateExplosions (double seconds)
void UpdateTracks (double seconds)
void DamageShips ()
void CollideShips ()
void CrashShips ()
void DockShips ()

Protected Attributes

Simsim
Text name
int type
StarSystemstar_system
OrbitalRegionorbital_region
Point location
Gridgrid
Terrainterrain
bool active
Shipplayer_ship
int current_view
List< Shipships
List< Shipcarriers
List< Shipselection
List< Shipdead_ships
List< Shotshots
List< Dronedrones
List< Explosionexplosions
List< Debrisdebris
List< Asteroidasteroids
List< Contacttrack_database [5]
List< SimRegionlinks
DWORD sim_time
int ai_index

Friends

class Sim

Detailed Description

Definition at line 215 of file Sim.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
REAL_SPACE 
AIR_SPACE 

Definition at line 222 of file Sim.h.


Constructor & Destructor Documentation

SimRegion::SimRegion ( Sim sim,
const char *  name,
int  type 
)

Definition at line 2229 of file Sim.cpp.

SimRegion::SimRegion ( Sim sim,
OrbitalRegion rgn 
)

Definition at line 2239 of file Sim.cpp.

SimRegion::~SimRegion ( )
virtual

Definition at line 2277 of file Sim.cpp.


Member Function Documentation

void SimRegion::Activate ( )
virtual

Definition at line 2428 of file Sim.cpp.

void SimRegion::AddSelection ( Ship s)

Definition at line 2414 of file Sim.cpp.

void SimRegion::AttachPlayerShip ( int  index)
protected

Definition at line 2337 of file Sim.cpp.

bool SimRegion::CanTimeSkip ( ) const

Definition at line 3580 of file Sim.cpp.

List<Ship>& SimRegion::Carriers ( )
inline

Definition at line 260 of file Sim.h.

void SimRegion::ClearSelection ( )

Definition at line 2408 of file Sim.cpp.

void SimRegion::CollideShips ( )
protected

Definition at line 2927 of file Sim.cpp.

void SimRegion::CommitMission ( )
protected

Definition at line 3749 of file Sim.cpp.

void SimRegion::CrashShips ( )
protected

Definition at line 3114 of file Sim.cpp.

void SimRegion::DamageShips ( )
protected

Definition at line 2695 of file Sim.cpp.

void SimRegion::Deactivate ( )
virtual

Definition at line 2465 of file Sim.cpp.

void SimRegion::DestroyShip ( Ship ship)
protected

Definition at line 3184 of file Sim.cpp.

void SimRegion::DestroyShips ( )
protected

Definition at line 3166 of file Sim.cpp.

void SimRegion::DockShips ( )
protected

Definition at line 3346 of file Sim.cpp.

List<Drone>& SimRegion::Drones ( )
inline

Definition at line 262 of file Sim.h.

void SimRegion::ExecFrame ( double  seconds)
virtual

Definition at line 2505 of file Sim.cpp.

List<Explosion>& SimRegion::Explosions ( )
inline

Definition at line 265 of file Sim.h.

Ship * SimRegion::FindShip ( const char *  name)

Definition at line 3276 of file Sim.cpp.

Ship * SimRegion::FindShipByObjID ( DWORD  objid)
virtual

Definition at line 3305 of file Sim.cpp.

Shot * SimRegion::FindShotByObjID ( DWORD  objid)
virtual

Definition at line 3320 of file Sim.cpp.

OrbitalRegion* SimRegion::GetOrbitalRegion ( )
inline

Definition at line 240 of file Sim.h.

Ship* SimRegion::GetPlayerShip ( )
inline

Definition at line 238 of file Sim.h.

ListIter< Ship > SimRegion::GetSelection ( )

Definition at line 2395 of file Sim.cpp.

Terrain* SimRegion::GetTerrain ( )
inline

Definition at line 241 of file Sim.h.

void SimRegion::InsertObject ( Ship ship)
virtual

Definition at line 3400 of file Sim.cpp.

void SimRegion::InsertObject ( Shot shot)
virtual

Definition at line 3430 of file Sim.cpp.

void SimRegion::InsertObject ( Explosion explosion)
virtual

Definition at line 3453 of file Sim.cpp.

void SimRegion::InsertObject ( Debris debris)
virtual

Definition at line 3473 of file Sim.cpp.

void SimRegion::InsertObject ( Asteroid asteroid)
virtual

Definition at line 3493 of file Sim.cpp.

bool SimRegion::IsActive ( ) const
inline

Definition at line 242 of file Sim.h.

bool SimRegion::IsAirSpace ( ) const
inline

Definition at line 243 of file Sim.h.

bool SimRegion::IsOrbital ( ) const
inline

Definition at line 244 of file Sim.h.

bool SimRegion::IsSelected ( Ship s)

Definition at line 2389 of file Sim.cpp.

List<SimRegion>& SimRegion::Links ( )
inline

Definition at line 266 of file Sim.h.

Point SimRegion::Location ( ) const
inline

Definition at line 269 of file Sim.h.

const char* SimRegion::Name ( ) const
inline

Definition at line 256 of file Sim.h.

void SimRegion::NetDockShip ( Ship ship,
Ship carrier,
FlightDeck deck 
)
protected

Definition at line 3266 of file Sim.cpp.

void SimRegion::NextView ( )

Definition at line 2361 of file Sim.cpp.

int SimRegion::NumShips ( )
inline

Definition at line 258 of file Sim.h.

int SimRegion::operator< ( const SimRegion r) const

Definition at line 2293 of file Sim.cpp.

int SimRegion::operator<= ( const SimRegion r) const

Definition at line 2299 of file Sim.cpp.

int SimRegion::operator== ( const SimRegion r) const
inline

Definition at line 228 of file Sim.h.

void SimRegion::ResolveTimeSkip ( double  seconds)

Definition at line 3607 of file Sim.cpp.

List<Debris>& SimRegion::Rocks ( )
inline

Definition at line 263 of file Sim.h.

List<Asteroid>& SimRegion::Roids ( )
inline

Definition at line 264 of file Sim.h.

void SimRegion::SetPlayerShip ( Ship ship)

Definition at line 2307 of file Sim.cpp.

void SimRegion::SetSelection ( Ship s)

Definition at line 2401 of file Sim.cpp.

List<Ship>& SimRegion::Ships ( )
inline

Definition at line 259 of file Sim.h.

List<Shot>& SimRegion::Shots ( )
inline

Definition at line 261 of file Sim.h.

void SimRegion::ShowGrid ( int  show = true)

Definition at line 2564 of file Sim.cpp.

StarSystem* SimRegion::System ( )
inline

Definition at line 267 of file Sim.h.

List< Contact > & SimRegion::TrackList ( int  iff)

Definition at line 3533 of file Sim.cpp.

void SimRegion::TranslateObject ( SimObject object)
protected

Definition at line 3515 of file Sim.cpp.

int SimRegion::Type ( ) const
inline

Definition at line 257 of file Sim.h.

static const char* SimRegion::TYPENAME ( )
inlinestatic

Definition at line 220 of file Sim.h.

void SimRegion::UpdateExplosions ( double  seconds)
protected

Definition at line 2665 of file Sim.cpp.

void SimRegion::UpdateShips ( double  seconds)
protected

Definition at line 2606 of file Sim.cpp.

void SimRegion::UpdateShots ( double  seconds)
protected

Definition at line 2633 of file Sim.cpp.

void SimRegion::UpdateSky ( double  seconds,
const Point ref 
)
protected

Definition at line 2577 of file Sim.cpp.

void SimRegion::UpdateTracks ( double  seconds)
protected

Definition at line 3543 of file Sim.cpp.


Friends And Related Function Documentation

friend class Sim
friend

Definition at line 217 of file Sim.h.


Member Data Documentation

bool SimRegion::active
protected

Definition at line 309 of file Sim.h.

int SimRegion::ai_index
protected

Definition at line 326 of file Sim.h.

List<Asteroid> SimRegion::asteroids
protected

Definition at line 321 of file Sim.h.

List<Ship> SimRegion::carriers
protected

Definition at line 314 of file Sim.h.

int SimRegion::current_view
protected

Definition at line 312 of file Sim.h.

List<Ship> SimRegion::dead_ships
protected

Definition at line 316 of file Sim.h.

List<Debris> SimRegion::debris
protected

Definition at line 320 of file Sim.h.

List<Drone> SimRegion::drones
protected

Definition at line 318 of file Sim.h.

List<Explosion> SimRegion::explosions
protected

Definition at line 319 of file Sim.h.

Grid* SimRegion::grid
protected

Definition at line 307 of file Sim.h.

List<SimRegion> SimRegion::links
protected

Definition at line 323 of file Sim.h.

Point SimRegion::location
protected

Definition at line 306 of file Sim.h.

Text SimRegion::name
protected

Definition at line 302 of file Sim.h.

OrbitalRegion* SimRegion::orbital_region
protected

Definition at line 305 of file Sim.h.

Ship* SimRegion::player_ship
protected

Definition at line 311 of file Sim.h.

List<Ship> SimRegion::selection
protected

Definition at line 315 of file Sim.h.

List<Ship> SimRegion::ships
protected

Definition at line 313 of file Sim.h.

List<Shot> SimRegion::shots
protected

Definition at line 317 of file Sim.h.

Sim* SimRegion::sim
protected

Definition at line 301 of file Sim.h.

DWORD SimRegion::sim_time
protected

Definition at line 325 of file Sim.h.

StarSystem* SimRegion::star_system
protected

Definition at line 304 of file Sim.h.

Terrain* SimRegion::terrain
protected

Definition at line 308 of file Sim.h.

List<Contact> SimRegion::track_database[5]
protected

Definition at line 322 of file Sim.h.

int SimRegion::type
protected

Definition at line 303 of file Sim.h.


The documentation for this class was generated from the following files: