15#define SHIP_NOPLAYER \
18#define SHIP_NOESCORT \
22#define SHIP_NEEDSGFX ( 1 << 3 )
23#define SHIP_3DTRAILS ( 1 << 4 )
24#define SHIP_3DMOUNTS ( 1 << 5 )
25#define ship_isFlag( s, f ) ( ( s )->flags & ( f ) )
26#define ship_setFlag( s, f ) ( ( s )->flags |= ( f ) )
27#define ship_rmFlag( s, f ) \
28 ( ( s )->flags &= ~( f ) )
38typedef enum ShipClass_ {
44 SHIP_CLASS_ARMOURED_TRANSPORT,
46 SHIP_CLASS_BULK_FREIGHTER,
49 SHIP_CLASS_INTERCEPTOR,
55 SHIP_CLASS_BATTLESHIP,
64typedef struct ShipMount_ {
71typedef struct ShipOutfitSlot_ {
82#define SHIP_TRAIL_ALWAYS_UNDER \
88typedef struct ShipTrailEmitter_ {
225 double dir,
double engine_glow,
double tilt,
226 double r,
int sx,
int sy,
const glColour *
c,
229 double dir,
const Lighting *Lscene );
230void ship_renderGfxStore( GLuint fbo,
const Ship *s,
int size,
double dir,
231 double updown,
double glow );
233 double updown,
double glow );
239void ships_resize(
void );
int ship_size(const Ship *s)
Gets the size of the ship.
ShipClass ship_classFromString(const char *str)
Gets the machine ship class identifier from a human readable string.
const char * ship_class(const Ship *s)
Gets the ship's class name in human readable form.
const char * ship_classDisplay(const Ship *s)
Gets the ship's display class in human readable form.
credits_t ship_basePrice(const Ship *s)
Gets the ship's base price (no outfits).
credits_t ship_buyPrice(const Ship *s)
The ship buy price, includes default outfits.
double ship_maxSize(void)
Gets the maximum size of a ship.
const Ship * ship_getW(const char *name)
Gets a ship based on its name without warning.
int ships_load(void)
Loads all the ships in the data files.
const Ship * ship_getAll(void)
Gets the array (array.h) of all ships.
int ship_gfxLoadNeeded(void)
Tries to load the graphics for all ships that need it.
void ships_free(void)
Frees all the ships.
glTexture * ship_gfxComm(const Ship *s, int size, double tilt, double dir, const Lighting *Lscene)
Loads the ship's comm graphic.
int ship_compareTech(const void *arg1, const void *arg2)
Comparison function for qsort().
const char * ship_classToString(ShipClass class)
Gets the ship class name in human readable form.
int ship_gfxLoaded(const Ship *s)
Checks to see if a ship has loaded graphics.
int ship_gfxAnimated(const Ship *s)
Returns whether or not the ship has animated graphics.
void ship_renderFramebuffer(const Ship *s, GLuint fbo, double fw, double fh, double dir, double engine_glow, double tilt, double r, int sx, int sy, const glColour *c, const Lighting *L)
Renders a ship to a framebuffer.
glTexture * ship_gfxStore(const Ship *s, int size, double dir, double updown, double glow)
Get the store gfx.
const Ship * ship_get(const char *name)
Gets a ship based on its name.
const char * ship_existsCase(const char *name)
Checks to see if an ship exists matching name (case insensitive).
int ship_gfxLoad(Ship *s)
Loads the graphics for a ship if necessary.
Defines a complete object.
Pilot slot that can contain outfits.
A ship outfit, depends radically on the type.
Represents a ship weapon mount point.
Represents relative ship statistics as a linked list.
Represents ship statistics, properties ship can use.
const TrailSpec * trail_spec
ShipOutfitSlot * outfit_utility
Outfit const ** outfit_intrinsic
ShipOutfitSlot * outfit_weapon
ShipTrailEmitter * trail_emitters
glTexture ** gfx_overlays
ShipOutfitSlot * outfit_structure
represents a set of styles for trails.
Abstraction for rendering sprite sheets.