![]() |
naev 0.11.5
|
Handles the shipyard at land. More...
#include "land_shipyard.h"#include "array.h"#include "cond.h"#include "dialogue.h"#include "hook.h"#include "log.h"#include "map_find.h"#include "ndata.h"#include "nstring.h"#include "player.h"#include "player_fleet.h"#include "space.h"#include "slots.h"#include "tk/toolkit_priv.h"#include "toolkit.h"Go to the source code of this file.
Data Structures | |
| struct | CstShipSlotWidget |
Macros | |
| #define | SHIP_GFX_W 256 |
| #define | SHIP_GFX_H 256 |
Functions | |
| static int | shipyard_canAcquire (const Ship *ship, const Spob *spob, credits_t price) |
| static void | shipyard_buy (unsigned int wid, const char *str) |
| Player attempts to buy a ship. | |
| static void | shipyard_trade (unsigned int wid, const char *str) |
| Player attempts to buy a ship, trading the current ship in. | |
| static void | shipyard_rmouse (unsigned int wid, const char *widget_name) |
| Player right-clicks on a ship. | |
| static void | shipyard_renderSlots (double bx, double by, double bw, double bh, void *data) |
| Custom widget render function for the slot widget. | |
| static void | shipyard_renderSlotsRow (double bx, double by, double bw, const char *str, ShipOutfitSlot *s) |
| Renders a row of ship slots. | |
| static int | shipyard_mouseSlots (unsigned int wid, const SDL_Event *event, double x, double y, double w, double h, double rx, double ry, void *data) |
| static void | shipyard_renderSlotsOver (double bx, double by, double bw, double bh, void *data) |
| static void | shipyard_find (unsigned int wid, const char *str) |
| Starts the map find with ship search selected. | |
| void | shipyard_open (unsigned int wid) |
| Opens the shipyard window. | |
| void | shipyard_update (unsigned int wid, const char *str) |
| Updates the ships in the shipyard window. | |
| void | shipyard_cleanup (void) |
| Cleans up shipyard data. | |
| int | shipyard_canBuy (const Ship *ship, const Spob *spob) |
| Makes sure it's valid to buy a ship. | |
| int | shipyard_canTrade (const Ship *ship, const Spob *spob) |
| Makes sure it's valid to buy a ship, trading the old one in simultaneously. | |
Variables | |
| static Ship ** | shipyard_list = NULL |
| static Ship * | shipyard_selected = NULL |
| static glTexture * | shipyard_comm = NULL |
Handles the shipyard at land.
Definition in file land_shipyard.c.
| #define SHIP_GFX_H 256 |
Definition at line 36 of file land_shipyard.c.
| #define SHIP_GFX_W 256 |
Definition at line 35 of file land_shipyard.c.
|
static |
Player attempts to buy a ship.
| wid | Window player is buying ship from. |
| str | Unused. |
Definition at line 416 of file land_shipyard.c.
Definition at line 461 of file land_shipyard.c.
Makes sure it's valid to buy a ship.
| ship | Ship being bought. |
| spob | Where the player is shopping. |
Definition at line 494 of file land_shipyard.c.
Makes sure it's valid to buy a ship, trading the old one in simultaneously.
| ship | Ship being bought. |
| spob | Where the player is shopping. |
Definition at line 505 of file land_shipyard.c.
| void shipyard_cleanup | ( | void | ) |
Cleans up shipyard data.
Definition at line 381 of file land_shipyard.c.
|
static |
Starts the map find with ship search selected.
| wid | Window buying outfit from. |
| str | Unused. |
Definition at line 395 of file land_shipyard.c.
|
static |
Definition at line 676 of file land_shipyard.c.
| void shipyard_open | ( | unsigned int | wid | ) |
Opens the shipyard window.
Definition at line 72 of file land_shipyard.c.
|
static |
Custom widget render function for the slot widget.
Definition at line 589 of file land_shipyard.c.
|
static |
Definition at line 727 of file land_shipyard.c.
|
static |
Renders a row of ship slots.
Definition at line 624 of file land_shipyard.c.
|
static |
Player right-clicks on a ship.
| wid | Window player is buying ship from. |
| widget_name | Name of the window. (unused) |
Definition at line 406 of file land_shipyard.c.
|
static |
Player attempts to buy a ship, trading the current ship in.
| wid | Window player is buying ship from. |
| str | Unused. |
Definition at line 522 of file land_shipyard.c.
| void shipyard_update | ( | unsigned int | wid, |
| const char * | str ) |
Updates the ships in the shipyard window.
| wid | Window to update the ships in. |
| str | Unused. |
Definition at line 190 of file land_shipyard.c.
|
static |
Current comm image.
Definition at line 53 of file land_shipyard.c.
|
static |
Array (array.h): Available ships, valid when the shipyard image-array widget is.
Definition at line 51 of file land_shipyard.c.
|
static |
Currently selected shipyard ship.
Definition at line 52 of file land_shipyard.c.