|
| static int | spob_parse (Spob *spob, const char *filename, Commodity **stdList) |
| | Parses a spob from an xml node. More...
|
| |
| static int | space_parseSpobs (xmlNodePtr parent, StarSystem *sys) |
| | Parses spobs in a system. More...
|
| |
| static int | spob_parsePresence (xmlNodePtr node, SpobPresence *ap) |
| | Parsess an spob presence from xml. More...
|
| |
| static void | system_init (StarSystem *sys) |
| | Initializes a new star system with null memory. More...
|
| |
| static int | systems_load (void) |
| | Loads the entire systems, needs to be called after spobs_load. More...
|
| |
| static int | system_parse (StarSystem *sys, const char *filename) |
| | Creates a system from an XML node. More...
|
| |
| static int | system_parseJumpPoint (const xmlNodePtr node, StarSystem *sys) |
| | Parses a single jump point for a system. More...
|
| |
| static int | system_parseJumpPointDiff (const xmlNodePtr node, StarSystem *sys) |
| | Parses a single jump point for a system, from unidiff. More...
|
| |
| static int | system_parseJumps (StarSystem *sys) |
| | Loads the jumps into a system. More...
|
| |
| static int | system_parseAsteroidField (const xmlNodePtr node, StarSystem *sys) |
| | Parses a single asteroid field for a system. More...
|
| |
| static int | system_parseAsteroidExclusion (const xmlNodePtr node, StarSystem *sys) |
| | Parses a single asteroid exclusion zone for a system. More...
|
| |
| static int | getPresenceIndex (StarSystem *sys, int faction) |
| | Gets the index of the presence element for a faction. Creates one if it doesn't exist. More...
|
| |
| static void | system_scheduler (double dt, int init) |
| | Controls fleet spawning. More...
|
| |
| 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. More...
|
| |
| static void | space_renderSpob (const Spob *p) |
| | Renders a spob. More...
|
| |
| static void | space_updateSpob (const Spob *p, double dt, double real_dt) |
| | Renders a spob. More...
|
| |
| static const MapShader * | mapshader_get (const char *name) |
| | Gets the map shader by name. More...
|
| |
| 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) |
| |
| int | space_sysSave (xmlTextWriterPtr writer) |
| | Saves what is needed to be saved for space. More...
|
| |
| int | space_sysLoad (xmlNodePtr parent) |
| | Loads player's space properties from an XML node. More...
|
| |
| const char * | spob_getServiceName (int service) |
| | Gets the (English) name for a service code. More...
|
| |
| int | spob_getService (const char *name) |
| | Converts name to spob service flag. More...
|
| |
| const char * | spob_getClassName (const char *class) |
| | Gets the long class name for a spob. More...
|
| |
| credits_t | spob_commodityPrice (const Spob *p, const Commodity *c) |
| | Gets the price of a commodity at a spob. More...
|
| |
| 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. More...
|
| |
| void | spob_averageSeenPricesAtTime (const Spob *p, const ntime_t tupdate) |
| | Adds cost of commodities on spob p to known statistics at time t. More...
|
| |
| 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. More...
|
| |
| void | system_updateAsteroids (StarSystem *sys) |
| | Updates some internal calculations about asteroids in a system. More...
|
| |
| int | spob_setFaction (Spob *p, int faction) |
| | Changes the spobs faction. More...
|
| |
| int | spob_addCommodity (Spob *p, Commodity *c) |
| | Adds a commodity to a spob. More...
|
| |
| int | spob_addService (Spob *p, int service) |
| | Removes a service from a spob. More...
|
| |
| int | spob_rmService (Spob *p, int service) |
| | Removes a service from a spob. More...
|
| |
| int | space_jumpDistance (const Pilot *p, const JumpPoint *jp) |
| | Distance at which a pilot can jump. More...
|
| |
| int | space_canHyperspace (const Pilot *p) |
| | Checks to make sure if pilot is far enough away to hyperspace. More...
|
| |
| int | space_hyperspace (Pilot *p) |
| | Tries to get the pilot into hyperspace. More...
|
| |
| 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. More...
|
| |
| char ** | space_getFactionSpob (int *factions, int landable) |
| | Gets the name of all the spobs that belong to factions. More...
|
| |
| const char * | space_getRndSpob (int landable, unsigned int services, int(*filter)(Spob *p)) |
| | Gets the name of a random spob. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| int | space_sysReachable (const StarSystem *sys) |
| | Sees if a system is reachable. More...
|
| |
| int | space_sysReallyReachable (char *sysname) |
| | Sees if a system can be reached via jumping. More...
|
| |
| int | space_sysReachableFromSys (const StarSystem *target, const StarSystem *sys) |
| | Sees if a system is reachable from another system. More...
|
| |
| StarSystem * | system_getAll (void) |
| | Gets an array (array.h) of all star systems. More...
|
| |
| const char * | system_existsCase (const char *sysname) |
| | Checks to see if a system exists case insensitively. More...
|
| |
| char ** | system_searchFuzzyCase (const char *sysname, int *n) |
| | Does a fuzzy case matching. Searches translated names but returns internal names. More...
|
| |
| static int | system_cmp (const void *p1, const void *p2) |
| | Comparison function for qsort'ing StarSystem by name. More...
|
| |
| StarSystem * | system_get (const char *sysname) |
| | Get the system from its name. More...
|
| |
| StarSystem * | system_getIndex (int id) |
| | Get the system by its index. More...
|
| |
| int | system_index (const StarSystem *sys) |
| | Gets the index of a star system. More...
|
| |
| int | spob_hasSystem (const Spob *spb) |
| | Get whether or not a spob has a system (i.e. is on the map). More...
|
| |
| char * | spob_getSystem (const char *spobname) |
| | Get the name of a system from a spobname. More...
|
| |
| static int | spob_cmp (const void *p1, const void *p2) |
| | Comparison function for qsort'ing Spob by name. More...
|
| |
| Spob * | spob_get (const char *spobname) |
| | Gets a spob based on its name. More...
|
| |
| Spob * | spob_getIndex (int ind) |
| | Gets spob by index. More...
|
| |
| int | spob_index (const Spob *p) |
| | Gets the ID of a spob. More...
|
| |
| Spob * | spob_getAll (void) |
| | Gets an array (array.h) of all spobs. More...
|
| |
| void | spob_setKnown (Spob *p) |
| | Sets a spob's known status, if it's real. More...
|
| |
| int | spob_exists (const char *spobname) |
| | Check to see if a spob exists. More...
|
| |
| const char * | spob_existsCase (const char *spobname) |
| | Check to see if a spob exists (case insensitive). More...
|
| |
| char ** | spob_searchFuzzyCase (const char *spobname, int *n) |
| | Does a fuzzy case matching. Searches spob_name() but returns internal names. More...
|
| |
| VirtualSpob * | virtualspob_getAll (void) |
| | Gets all the virtual spobs. More...
|
| |
| static int | virtualspob_cmp (const void *p1, const void *p2) |
| | Comparison function for qsort'ing VirtuaSpob by name. More...
|
| |
| VirtualSpob * | virtualspob_get (const char *name) |
| | Gets a virtual spob by matching name. More...
|
| |
| JumpPoint * | jump_get (const char *jumpname, const StarSystem *sys) |
| | Gets a jump point based on its target and system. More...
|
| |
| JumpPoint * | jump_getTarget (const StarSystem *target, const StarSystem *sys) |
| | Less safe version of jump_get that works with pointers. More...
|
| |
| const char * | jump_getSymbol (const JumpPoint *jp) |
| | Gets the jump point symbol. More...
|
| |
| void | space_factionChange (void) |
| | Mark when a faction changes. More...
|
| |
| void | space_checkLand (void) |
| | Handles landing if necessary. More...
|
| |
| void | space_update (double dt, double real_dt) |
| | Controls fleet spawning. More...
|
| |
| int | space_isSimulation (void) |
| | returns whether we're just simulating. More...
|
| |
| int | space_isSimulationEffects (void) |
| | returns whether or not we're simulating with effects. More...
|
| |
| void | space_init (const char *sysname, int do_simulate) |
| | Initializes the system. More...
|
| |
| Spob * | spob_new (void) |
| | Creates a new spob. More...
|
| |
| const char * | spob_name (const Spob *p) |
| | Gets the translated name of a spob. More...
|
| |
| static int | spobs_load (void) |
| | Loads all the spobs in the game. More...
|
| |
| static int | virtualspobs_load (void) |
| | Loads all the virtual spobs. More...
|
| |
| char | spob_getColourChar (const Spob *p) |
| | Gets the spob colour char. More...
|
| |
| const char * | spob_getSymbol (const Spob *p) |
| | Gets the spob symbol. More...
|
| |
| const glColour * | spob_getColour (const Spob *p) |
| | Gets the spob colour. More...
|
| |
| void | spob_updateLand (Spob *p) |
| | Updates the land possibilities of a spob. More...
|
| |
| void | spob_luaInitMem (const Spob *spob) |
| | Initializes the memory fo a spob. More...
|
| |
| int | spob_luaInit (Spob *spob) |
| | Updatse the spob's internal Lua stuff. More...
|
| |
| void | spob_gfxLoad (Spob *spob) |
| | Loads a spob's graphics (and radius). More...
|
| |
| void | space_gfxLoad (StarSystem *sys) |
| | Loads all the graphics for a star system. More...
|
| |
| void | space_gfxUnload (StarSystem *sys) |
| | Unloads all the graphics for a star system. More...
|
| |
| int | system_addSpob (StarSystem *sys, const char *spobname) |
| | Adds a spob to a star system. More...
|
| |
| int | system_rmSpob (StarSystem *sys, const char *spobname) |
| | Removes a spob from a star system. More...
|
| |
| int | system_addVirtualSpob (StarSystem *sys, const char *spobname) |
| | Adds a virtual spob to a system. More...
|
| |
| int | system_rmVirtualSpob (StarSystem *sys, const char *spobname) |
| | Removes a virtual spob from a system. More...
|
| |
| int | system_addJumpDiff (StarSystem *sys, xmlNodePtr node) |
| | Adds a jump point to a star system from a diff. More...
|
| |
| int | system_rmJump (StarSystem *sys, const char *jumpname) |
| | Removes a jump point from a star system. More...
|
| |
| StarSystem * | system_new (void) |
| | Creates a new star system. More...
|
| |
| void | system_reconstructJumps (StarSystem *sys) |
| | Reconstructs the jumps for a single system. More...
|
| |
| void | systems_reconstructJumps (void) |
| | Reconstructs the jumps. More...
|
| |
| void | systems_reconstructSpobs (void) |
| | Updates the system spob pointers. More...
|
| |
| static int | sys_cmpSysFaction (const void *a, const void *b) |
| | Compares two system presences. More...
|
| |
| void | system_setFaction (StarSystem *sys) |
| | Sets the system faction based on the spobs it has. More...
|
| |
| int | space_load (void) |
| | Loads the entire universe into ram - pretty big feat eh? More...
|
| |
| int | space_loadLua (void) |
| | initializes the Lua for all the spobs. More...
|
| |
| void | space_render (const double dt) |
| | Renders the system. More...
|
| |
| void | space_renderOverlay (const double dt) |
| | Renders the system overlay. More...
|
| |
| void | spobs_render (void) |
| | Renders the current systems' spobs. More...
|
| |
| void | space_exit (void) |
| | Cleans up the system. More...
|
| |
| void | space_clearKnown (void) |
| | Clears all system knowledge. More...
|
| |
| void | space_clearMarkers (void) |
| | Clears all system markers. More...
|
| |
| void | space_clearComputerMarkers (void) |
| | Clears all the system computer markers. More...
|
| |
| int | space_addMarker (int objid, MissionMarkerType type) |
| | Adds a marker to a system. More...
|
| |
| int | space_rmMarker (int objid, MissionMarkerType type) |
| | Removes a marker from a system. More...
|
| |
| void | system_presenceAddSpob (StarSystem *sys, const SpobPresence *ap) |
| | Adds (or removes) some presence to a system. More...
|
| |
| double | system_getPresence (const StarSystem *sys, int faction) |
| | Get the presence of a faction in a system. More...
|
| |
| double | system_getPresenceFull (const StarSystem *sys, int faction, double *base, double *bonus) |
| | Get the presence of a faction in a system. More...
|
| |
| void | system_addAllSpobsPresence (StarSystem *sys) |
| | Go through all the spobs and call system_addPresence(). More...
|
| |
| void | space_reconstructPresences (void) |
| | Reset the presence of all systems. More...
|
| |
| int | system_hasSpob (const StarSystem *sys) |
| | See if the system has a spob. More...
|
| |
| void | system_rmCurrentPresence (StarSystem *sys, int faction, double amount) |
| | Removes active presence. More...
|
| |
| 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. More...
|
| |
| const char * | space_populationStr (uint64_t population) |
| | Gets the population in an approximated string. Note this function changes the string value each call, so be careful! More...
|
| |