naev 0.11.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 weapons;
24/*
25 * Main.
26 */
27void equipment_open( unsigned int wid );
28void equipment_cleanup (void);
29
30/*
31 * Misc.
32 */
33int equipment_canSwapPlayerShip( const char *shipname );
34int equipment_canSellPlayerShip( const char *shipname );
35void equipment_addAmmo (void);
36void equipment_regenLists( unsigned int wid, int outfits, int ships );
37void equipment_updateShips( unsigned int wid, const char* str );
38void equipment_updateOutfits( unsigned int wid, const char* str );
39int equipment_shipStats( char *buf, int max_len, const Pilot *s, int dpseps, int name );
40void equipment_slotWidget( unsigned int wid,
41 double x, double y, double w, double h,
42 CstSlotWidget *data );
void equipment_slotDeselect(CstSlotWidget *wgt)
Deselects equipment stuff.
Definition equipment.c:2542
void equipment_regenLists(unsigned int wid, int outfits, int ships)
Regenerates the equipment window lists.
Definition equipment.c:1261
void equipment_cleanup(void)
Cleans up after the equipment stuff.
Definition equipment.c:2529
void equipment_updateOutfits(unsigned int wid, const char *str)
Updates the player's outfit list.
Definition equipment.c:2041
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:429
void equipment_updateShips(unsigned int wid, const char *str)
Updates the player's ship window.
Definition equipment.c:1801
int equipment_canSwapPlayerShip(const char *shipname)
Makes sure it's valid to change ships in the equipment view.
Definition equipment.c:1348
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:1426
void equipment_addAmmo(void)
Adds all the ammo it can to the player.
Definition equipment.c:1400
int equipment_canSellPlayerShip(const char *shipname)
Makes sure it's valid to sell a ship.
Definition equipment.c:1332
void equipment_open(unsigned int wid)
Opens the player's equipment window.
Definition equipment.c:299
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:328
The representation of an in-game pilot.
Definition pilot.h:217
Player ship.
Definition player.h:73