24 PLAYER_CINEMATICS_GUI,
46typedef char PlayerFlags[PLAYER_FLAGS_MAX];
49#define player_isFlag( f ) ( player.flags[f] )
50#define player_setFlag( f ) ( player.flags[f] = 1 )
51#define player_rmFlag( f ) ( player.flags[f] = 0 )
64typedef struct PlayerOutfit_s {
72typedef struct PlayerShip_s {
100typedef struct Player_s {
173 const char *acquired,
int noname );
191NONNULL( 1 ) PRINTF_FORMAT( 1, 2 )
void player_message( const
char *fmt, ... );
235 int ( *filter )( const
Outfit *o ),
317void player_scan(
void );
void player_messageRaw(const char *str)
Adds a mesg to the queue to be displayed on screen.
void player_message(const char *fmt,...)
Adds a mesg to the queue to be displayed on screen.
void player_messageToggle(int enable)
Toggles if player should receive messages.
void player_hailStart(void)
Starts the hail sounds and aborts autoNav.
void player_stealth(void)
Input binding for toggling stealth for the player.
void player_weapSetPress(int id, double value, int repeat)
Handles keyboard events involving the player's weapon-set keys. It's valid to call this while gamepla...
int player_eventAlreadyDone(int id)
Checks to see if player has already completed a event.
int player_nships(void)
Gets the amount of ships player has in storage.
void player_soundResume(void)
Resumes the ship's sounds.
int player_rmOutfit(const Outfit *o, int quantity)
Remove an outfit from the player's outfit stack.
void player_runHooks(void)
Runs hooks for the player.
void player_updateSpecific(Pilot *pplayer, const double dt)
Does a player specific update.
int player_getOutfitsFiltered(const Outfit ***outfits, int(*filter)(const Outfit *o), const char *name)
Prepares two arrays for displaying in an image array.
int player_hasLicense(const char *license)
Checks to see if player has license.
void player_autohail(void)
Automatically tries to hail a pilot that hailed the player.
void player_dead(void)
Player got pwned.
void player_swapShip(const char *shipname, int move_cargo)
Swaps player's current ship with their ship named shipname.
void player_cooldownBrake(void)
Starts braking or active cooldown.
void player_accel(double acc)
Start accelerating.
int player_ships(char **sships, glTexture **tships)
Returns a buffer with all the player's ships names.
void player_targetEscort(int prev)
Targets the pilot.
void player_targetAsteroidSet(int field, int id)
Sets the player's target asteroid.
int player_addOutfit(const Outfit *o, int quantity)
Adds an outfit to the player outfit stack.
void player_soundPlay(int sound, int once)
Plays a sound at the player.
void player_new(void)
Creates a new player.
void player_warp(double x, double y)
Warps the player to the new position.
void player_checkLandAck(void)
Revokes landing authorization if the player's reputation is too low.
int player_numOutfits(void)
Gets the amount of different outfits in the player outfit stack.
void player_targetSet(unsigned int id)
Sets the player's target.
void player_render(double dt)
Renders the player.
void player_hailSpob(void)
Opens communication with the player's spob target.
credits_t player_shipPrice(const char *shipname, int count_unique)
Calculates the price of one of the player's ships.
void player_resetSpeed(void)
Resets the player speed stuff.
const PlayerShip_t * player_getShipStack(void)
Gets the array (array.h) of the player's ships.
void player_targetHyperspaceSet(int id, int nomsg)
Sets the player's hyperspace target.
void player_cleanup(void)
Cleans up player stuff like player_stack.
void player_targetHyperspace(void)
Gets a hyperspace target.
PlayerShip_t * player_newShip(const Ship *ship, const char *def_name, int trade, const char *acquired, int noname)
Creates a new ship for player.
void player_rmShip(const char *shipname)
Removes one of the player's ships.
int player_outfitOwnedTotal(const Outfit *o)
void player_hyperspacePreempt(int preempt)
Enables or disables jump points preempting spobs in autoface and target clearing.
PlayerShip_t * player_getPlayerShip(const char *shipname)
Gets a specific ship.
void player_toggleMouseFly(void)
Toggles mouse flying.
void player_targetNearest(void)
Player targets nearest pilot.
double player_dt_default(void)
Returns the player's total default time delta based on time dilation stuff.
void player_update(Pilot *pplayer, const double dt)
Player update function.
const char ** player_getLicenses()
Gets the array (array.h) of license names in the player's inventory.
void player_brokeHyperspace(void)
Player actually broke hyperspace (entering new system).
int player_getHypPreempt(void)
Returns whether the jump point target should preempt the spob target.
int player_missionAlreadyDone(int id)
Checks to see if player has already completed a mission.
void player_renderUnderlay(double dt)
Renders the player underlay.
int player_addEscorts(void)
Adds the player's escorts.
void player_soundStop(void)
Stops playing player sounds.
void player_restoreControl(int reason, const char *str)
Aborts autonav and other states that take control of the ship.
void player_addLicense(const char *license)
Gives the player a license.
credits_t player_modCredits(credits_t amount)
Modifies the amount of credits the player has.
int * player_eventsDoneList(void)
Gets a list of all the events the player has done.
int player_jump(void)
Actually attempts to jump in hyperspace.
void player_targetSpobSet(int id)
Sets the player's target spob.
void player_clear(void)
Clears the targets.
int player_hasShip(const char *shipname)
Sees if player has a ship of a name.
void player_accelOver(void)
Done accelerating.
void player_think(Pilot *pplayer, const double dt)
Basically uses keyboard input instead of AI input. Used in pilot.c.
int player_land(int loud)
Try to land or target closest spob if no land target.
void player_soundPause(void)
Pauses the ship's sounds.
int player_hasCredits(credits_t amount)
Checks to see if the player has enough credits.
void player_shipsSort(void)
Sorts the players ships.
void player_missionFinished(int id)
Marks a mission as completed.
int player_outfitOwned(const Outfit *o)
Gets how many of the outfit the player owns.
void player_targetClearAll(void)
Clears all player targets: hyperspace, spob, asteroid, etc...
void player_nolandMsg(const char *str)
Sets the no land message.
void player_targetPrev(int mode)
Cycles to previous target.
const PlayerOutfit_t * player_getOutfits(void)
Gets an array (array.h) of the player's outfits.
void player_soundPlayGUI(int sound, int once)
Plays a GUI sound (unaffected by time accel).
void player_targetClear(void)
Clears the player's ship, spob or hyperspace target, in that order.
void player_targetHostile(void)
Targets the nearest hostile enemy to the player.
void player_eventFinished(int id)
Marks a event as completed.
void player_screenshot(void)
Takes a screenshot.
void player_approach(void)
Logic to make the player approach a target pilot to board or spob to land on.
void player_destroyed(void)
Player blew up in a fireball.
void player_targetSpob(void)
Cycle through spob targets.
int player_init(void)
Initializes player stuff.
int * player_missionsDoneList(void)
Gets a list of all the missions the player has done.
Pilot * player_getShip(const char *shipname)
Gets a specific ship.
void player_targetNext(int mode)
Cycles to next target.
void player_hail(void)
Opens communication with the player's target.
A ship outfit, depends radically on the type.
A weapon set represents a set of weapons that have an action.
The representation of an in-game pilot.
unsigned int death_counter
unsigned int landed_times
unsigned int ships_destroyed[SHIP_CLASS_TOTAL]
unsigned int jumped_times
PilotWeaponSet weapon_sets[PILOT_WEAPON_SETS]
unsigned int jumped_times
unsigned int ships_destroyed[SHIP_CLASS_TOTAL]
unsigned int death_counter
unsigned int landed_times
Abstraction for rendering sprite sheets.