naev 0.12.5
equipment.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "outfit.h"
7#include "pilot.h"
8#include "player.h"
9
13typedef struct CstSlotWidget_ {
16 int slot;
18 double altx;
19 double alty;
21 int
24
25/*
26 * Main.
27 */
28void equipment_open( unsigned int wid );
29void equipment_cleanup( void );
30
31/*
32 * Misc.
33 */
34int equipment_canSwapPlayerShip( const char *shipname );
35int equipment_canSellPlayerShip( const char *shipname );
36void equipment_addAmmo( void );
37void equipment_regenLists( unsigned int wid, int outfits, int ships );
38void equipment_updateShips( unsigned int wid, const char *str );
39void equipment_updateOutfits( unsigned int wid, const char *str );
40int equipment_shipStats( char *buf, int max_len, const Pilot *s, int dpseps,
41 int name );
42void equipment_slotWidget( unsigned int wid, double x, double y, double w,
43 double h, CstSlotWidget *data );
45void equipment_slotSelect( CstSlotWidget *wgt, PlayerShip_t *p );
void equipment_slotDeselect(CstSlotWidget *wgt)
Deselects equipment stuff.
Definition equipment.c:2823
void equipment_regenLists(unsigned int wid, int outfits, int ships)
Regenerates the equipment window lists.
Definition equipment.c:1429
void equipment_cleanup(void)
Cleans up after the equipment stuff.
Definition equipment.c:2810
void equipment_updateOutfits(unsigned int wid, const char *str)
Updates the player's outfit list.
Definition equipment.c:2307
void equipment_slotWidget(unsigned int wid, double x, double y, double w, double h, CstSlotWidget *data)
Creates the slot widget and initializes it.
Definition equipment.c:462
void equipment_updateShips(unsigned int wid, const char *str)
Updates the player's ship window.
Definition equipment.c:1992
int equipment_canSwapPlayerShip(const char *shipname)
Makes sure it's valid to change ships in the equipment view.
Definition equipment.c:1516
int equipment_shipStats(char *buf, int max_len, const Pilot *s, int dpseps, int name)
Creates and allocates a string containing the ship stats.
Definition equipment.c:1604
void equipment_addAmmo(void)
Adds all the ammo it can to the player.
Definition equipment.c:1578
int equipment_canSellPlayerShip(const char *shipname)
Makes sure it's valid to sell a ship.
Definition equipment.c:1500
void equipment_open(unsigned int wid)
Opens the player's equipment window.
Definition equipment.c:329
Outfit * outfit
Definition equipment.h:15
double altx
Definition equipment.h:18
PlayerShip_t * selected
Definition equipment.h:14
double alty
Definition equipment.h:19
A ship outfit, depends radically on the type.
Definition outfit.h:372
The representation of an in-game pilot.
Definition pilot.h:263
Player ship.
Definition player.h:72