|
| static void | spob_initDefaults (Spob *spob) |
| | Initializes a new spob to safe defaults.
|
| static int | spob_parse (Spob *spob, const char *filename, Commodity **stdList) |
| | Parses a spob from an xml node.
|
| static int | space_parseSaveNodes (xmlNodePtr parent, StarSystem *sys) |
| | Parses spobs in a system.
|
| static int | spob_parsePresence (xmlNodePtr node, SpobPresence *ap) |
| | Parsess an spob presence from xml.
|
| static void | system_init (StarSystem *sys) |
| | Initializes a new star system with null memory.
|
| static int | systems_load (void) |
| | Loads the entire systems, needs to be called after spobs_load.
|
| static int | system_parse (StarSystem *sys, const char *filename) |
| | Creates a system from an XML node.
|
| static int | system_parseJumpPoint (const xmlNodePtr node, StarSystem *sys) |
| | Parses a single jump point for a system.
|
| static int | system_parseJumps (StarSystem *sys) |
| | Loads the jumps into a system.
|
| static int | system_parseAsteroidField (const xmlNodePtr node, StarSystem *sys) |
| | Parses a single asteroid field for a system.
|
| static int | system_parseAsteroidExclusion (const xmlNodePtr node, StarSystem *sys) |
| | Parses a single asteroid exclusion zone for a system.
|
| static int | spob_cmp (const void *p1, const void *p2) |
| | Comparison function for qsort'ing Spob by name.
|
| static void | system_scheduler (double dt, int init) |
| | Controls fleet spawning.
|
| static SystemPresence * | system_getFactionPresenceGrow (StarSystem *sys, int faction) |
| static int | space_addMarkerSystem (int sysid, MissionMarkerType type) |
| static int | space_addMarkerSpob (int pntid, MissionMarkerType type) |
| static int | space_rmMarkerSystem (int sysid, MissionMarkerType type) |
| static int | space_rmMarkerSpob (int pntid, MissionMarkerType type) |
| static void | space_renderJumpPoint (const JumpPoint *jp, int i) |
| | Renders a jump point.
|
| static void | space_renderSpob (const Spob *p) |
| | Renders a spob.
|
| static void | space_updateSpob (const Spob *p, double dt, double real_dt) |
| | Renders a spob.
|
| static const MapShader * | mapshader_get (const char *name) |
| | Gets the map shader by name.
|
| static int | spob_lua_cmp (const void *a, const void *b) |
| static nlua_env | spob_lua_get (int *mem, const char *filename) |
| static void | spob_lua_free (spob_lua_file *lf) |
| const char * | spob_getServiceName (int service) |
| | Gets the (English) name for a service code.
|
| int | spob_getService (const char *name) |
| | Converts name to spob service flag.
|
| const char * | spob_getClassName (const char *class) |
| | Gets the long class name for a spob.
|
| credits_t | spob_commodityPrice (const Spob *p, const Commodity *c) |
| | Gets the price of a commodity at a spob.
|
| credits_t | spob_commodityPriceAtTime (const Spob *p, const Commodity *c, ntime_t t) |
| | Gets the price of a commodity at a spob at given time.
|
| void | spob_averageSeenPricesAtTime (const Spob *p, const ntime_t tupdate) |
| | Adds cost of commodities on spob p to known statistics at time t.
|
| int | spob_averageSpobPrice (const Spob *p, const Commodity *c, credits_t *mean, double *std) |
| | Gets the average price of a commodity at a spob that has been seen so far.
|
| void | system_updateAsteroids (StarSystem *sys) |
| | Updates some internal calculations about asteroids in a system.
|
| int | spob_setFaction (Spob *p, int faction) |
| | Changes the spobs faction.
|
| int | spob_addCommodity (Spob *p, Commodity *c) |
| | Adds a commodity to a spob.
|
| int | spob_addService (Spob *p, int service) |
| | Removes a service from a spob.
|
| int | spob_rmService (Spob *p, int service) |
| | Removes a service from a spob.
|
| int | spob_rename (Spob *p, char *newname) |
| | Renames a spob.
|
| int | space_jumpDistance (const Pilot *p, const JumpPoint *jp) |
| | Distance at which a pilot can jump.
|
| int | space_canHyperspace (const Pilot *p) |
| | Checks to make sure if pilot is far enough away to hyperspace.
|
| int | space_hyperspace (Pilot *p) |
| | Tries to get the pilot into hyperspace.
|
| int | space_calcJumpInPos (const StarSystem *in, const StarSystem *out, vec2 *pos, vec2 *vel, double *dir, const Pilot *p) |
| | Calculates the jump in pos for a pilot.
|
| char ** | space_getFactionSpob (const int *factions, int landable) |
| | Gets the name of all the spobs that belong to factions.
|
| const char * | space_getRndSpob (int landable, unsigned int services, int(*filter)(Spob *p)) |
| | Gets the name of a random spob.
|
| double | system_getClosest (const StarSystem *sys, int *pnt, int *jp, int *ast, int *fie, double x, double y) |
| | Gets the closest feature to a position in the system.
|
| double | system_getClosestAng (const StarSystem *sys, int *pnt, int *jp, int *ast, int *fie, double x, double y, double ang) |
| | Gets the feature nearest to directly ahead of a position in the system.
|
| int | space_sysReachable (const StarSystem *sys) |
| | Sees if a system is reachable.
|
| int | space_sysReallyReachable (const char *sysname) |
| | Sees if a system can be reached via jumping.
|
| int | space_sysReachableFromSys (const StarSystem *target, const StarSystem *sys) |
| | Sees if a system is reachable from another system.
|
| StarSystem * | system_getAll (void) |
| | Gets an array (array.h) of all star systems.
|
| const char * | system_existsCase (const char *sysname) |
| | Checks to see if a system exists case insensitively.
|
| char ** | system_searchFuzzyCase (const char *sysname, int *n) |
| | Does a fuzzy case matching. Searches translated names but returns internal names.
|
| static int | system_cmp (const void *p1, const void *p2) |
| | Comparison function for qsort'ing StarSystem by name.
|
| StarSystem * | system_get (const char *sysname) |
| | Get the system from its name.
|
| StarSystem * | system_getIndex (int id) |
| | Get the system by its index.
|
| int | system_index (const StarSystem *sys) |
| | Gets the index of a star system.
|
| int | spob_hasSystem (const Spob *spb) |
| | Get whether or not a spob has a system (i.e. is on the map).
|
| StarSystem * | spob_getSystem (const Spob *spob) |
| | Gets the system a spob is in.
|
| const char * | spob_getSystemName (const char *spobname) |
| | Get the name of a system from a spobname.
|
| Spob * | spob_get (const char *spobname) |
| | Gets a spob based on its name.
|
| Spob * | spob_getIndex (int ind) |
| | Gets spob by index.
|
| int | spob_index (const Spob *p) |
| | Gets the ID of a spob.
|
| Spob * | spob_getAll (void) |
| | Gets an array (array.h) of all spobs.
|
| void | spob_setKnown (Spob *p) |
| | Sets a spob's known status, if it's real.
|
| int | spob_exists (const char *spobname) |
| | Check to see if a spob exists.
|
| const char * | spob_existsCase (const char *spobname) |
| | Check to see if a spob exists (case insensitive).
|
| char ** | spob_searchFuzzyCase (const char *spobname, int *n) |
| | Does a fuzzy case matching. Searches spob_name() but returns internal names.
|
| VirtualSpob * | virtualspob_getAll (void) |
| | Gets all the virtual spobs.
|
| static int | virtualspob_cmp (const void *p1, const void *p2) |
| | Comparison function for qsort'ing VirtuaSpob by name.
|
| VirtualSpob * | virtualspob_get (const char *name) |
| | Gets a virtual spob by matching name.
|
| JumpPoint * | jump_get (const char *jumpname, const StarSystem *sys) |
| | Gets a jump point based on its target and system.
|
| JumpPoint * | jump_getTarget (const StarSystem *target, const StarSystem *sys) |
| | Less safe version of jump_get that works with pointers.
|
| const char * | jump_getSymbol (const JumpPoint *jp) |
| | Gets the jump point symbol.
|
| void | space_factionChange (void) |
| | Mark when a faction changes.
|
| void | space_checkLand (void) |
| | Handles landing if necessary.
|
| void | space_update (double dt, double real_dt) |
| | Controls fleet spawning.
|
| int | space_isSimulation (void) |
| | returns whether we're just simulating.
|
| int | space_needsEffects (void) |
| | returns whether or not we're simulating with effects.
|
| void | space_init (const char *sysname, int do_simulate) |
| | Initializes the system.
|
| Spob * | spob_new (void) |
| | Creates a new spob.
|
| const char * | spob_name (const Spob *p) |
| | Gets the translated name of a spob.
|
| static int | spobs_load (void) |
| | Loads all the spobs in the game.
|
| static int | virtualspobs_load (void) |
| | Loads all the virtual spobs.
|
| char | spob_getColourChar (const Spob *p) |
| | Gets the spob colour char.
|
| const char * | spob_getSymbol (const Spob *p) |
| | Gets the spob symbol.
|
| const glColour * | spob_getColour (const Spob *p) |
| | Gets the spob colour.
|
| void | spob_updateLand (Spob *p) |
| | Updates the land possibilities of a spob.
|
| void | spob_distress (Spob *spb, const Pilot *p, const Pilot *attacker) |
| | Spob is receiving distress from a pilot about an attacker.
|
| void | spob_luaInitMem (const Spob *spob) |
| | Initializes the memory fo a spob.
|
| int | spob_luaInit (Spob *spob) |
| | Updatse the spob's internal Lua stuff.
|
| void | spob_gfxLoad (Spob *spob) |
| | Loads a spob's graphics (and radius).
|
| void | space_gfxLoad (StarSystem *sys) |
| | Loads all the graphics for a star system.
|
| void | space_gfxUnload (StarSystem *sys) |
| | Unloads all the graphics for a star system.
|
| int | system_addSpob (StarSystem *sys, const char *spobname) |
| | Adds a spob to a star system.
|
| int | system_rmSpob (StarSystem *sys, const char *spobname) |
| | Removes a spob from a star system.
|
| int | system_addVirtualSpob (StarSystem *sys, const char *spobname) |
| | Adds a virtual spob to a system.
|
| int | system_rmVirtualSpob (StarSystem *sys, const char *spobname) |
| | Removes a virtual spob from a system.
|
| int | system_addJump (StarSystem *sys, StarSystem *target) |
| | Adds a jump point between two star systems.
|
| int | system_rmJump (StarSystem *sys, StarSystem *target) |
| | Removes a jump point from a star system.
|
| StarSystem * | system_new (void) |
| | Creates a new star system.
|
| const char * | system_name (const StarSystem *sys) |
| const char * | system_nameKnown (const StarSystem *sys) |
| void | system_reconstructJumps (StarSystem *sys) |
| | Reconstructs the jumps for a single system.
|
| void | systems_reconstructJumps (void) |
| | Reconstructs the jumps.
|
| void | systems_reconstructSpobs (void) |
| | Updates the system spob pointers.
|
| static int | sys_cmpSysFaction (const void *a, const void *b) |
| | Compares two system presences.
|
| void | system_setFaction (StarSystem *sys) |
| | Sets the system faction based on the spobs it has.
|
| int | space_load (void) |
| | Loads the entire universe into ram - pretty big feat eh?
|
| int | space_loadLua (void) |
| | initializes the Lua for all the spobs.
|
| void | space_render (const double dt) |
| | Renders the system.
|
| void | space_renderOverlay (const double dt) |
| | Renders the system overlay.
|
| void | spobs_render (void) |
| | Renders the current systems' spobs.
|
| void | space_exit (void) |
| | Cleans up the system.
|
| void | space_clearKnown (void) |
| | Clears all system knowledge.
|
| void | space_clearMarkers (void) |
| | Clears all system markers.
|
| void | space_clearComputerMarkers (void) |
| | Clears all the system computer markers.
|
| int | space_addMarker (int objid, MissionMarkerType type) |
| | Adds a marker to a system.
|
| int | space_rmMarker (int objid, MissionMarkerType type) |
| | Removes a marker from a system.
|
| int | space_playerSave (xmlTextWriterPtr writer) |
| | Saves what is needed to be saved for space.
|
| int | space_playerLoad (xmlNodePtr parent, const char *version) |
| | Loads player's space properties from an XML node.
|
| void | system_presenceAddSpob (StarSystem *sys, const SpobPresence *ap) |
| | Adds (or removes) some presence to a system.
|
| SystemPresence * | system_getFactionPresence (StarSystem *sys, int faction) |
| const SystemPresence * | system_getFactionPresenceConst (const StarSystem *sys, int faction) |
| double | system_getReputation (const StarSystem *sys, int faction) |
| | Gets the local reputation of the player in a system or returns 0.
|
| double | system_getReputationOrGlobal (const StarSystem *sys, int faction) |
| | Gets the local reputation of the player in a system or returns the global standing.
|
| double | system_getPresence (const StarSystem *sys, int faction) |
| | Get the presence of a faction in a system.
|
| double | system_getPresenceFull (const StarSystem *sys, int faction, double *base, double *bonus) |
| | Get the presence of a faction in a system.
|
| void | system_addAllSpobsPresence (StarSystem *sys) |
| | Go through all the spobs and call system_addPresence().
|
| void | space_reconstructPresences (void) |
| | Reset the presence of all systems.
|
| int | system_hasSpob (const StarSystem *sys) |
| | See if the system has a spob.
|
| void | system_rmCurrentPresence (StarSystem *sys, int faction, double amount) |
| | Removes active presence.
|
| void | space_queueLand (Spob *pnt) |
| | Cues a spob to be landed on. This is not done immediately, but when the engine thinks it is ok to do.
|
| const char * | space_populationStr (const Spob *spb) |
| | Gets the population in an approximated string. Note this function changes the string value each call, so be careful!
|