![]() |
naev 0.12.5
|
Handles the Trading Center at land. More...
#include "land_trade.h"#include "array.h"#include "commodity.h"#include "economy.h"#include "hook.h"#include "land.h"#include "nstring.h"#include "player.h"#include "player_fleet.h"#include "space.h"#include "toolkit.h"
Go to the source code of this file.
Functions | |
| static void | commodity_exchange_genList (unsigned int wid) |
| static void | commodity_exchange_modifiers (unsigned int wid) |
| static int | commodity_exchange_events (unsigned int wid, SDL_Event *evt) |
| void | commodity_exchange_open (unsigned int wid) |
| Opens the local market window. | |
| void | commodity_exchange_cleanup (void) |
| void | commodity_update (unsigned int wid, const char *str) |
| Updates the commodity window. | |
| int | commodity_canBuy (const Commodity *com) |
| Checks to see if the player can buy a commodity. | |
| int | commodity_canSell (const Commodity *com) |
| Checks to see if a player can sell a commodity. | |
| void | commodity_buy (unsigned int wid, const char *str) |
| Buys the selected commodity. | |
| void | commodity_sell (unsigned int wid, const char *str) |
| Attempts to sell a commodity. | |
| int | commodity_getMod (void) |
| Gets the current modifier status. | |
| void | commodity_renderMod (double bx, double by, double w, double h, void *data) |
| Renders the commodity buying modifier. | |
Variables | |
| static int | commodity_mod |
| static Commodity ** | commodity_list = NULL |
Handles the Trading Center at land.
Definition in file land_trade.c.
| void commodity_buy | ( | unsigned int | wid, |
| const char * | str ) |
Buys the selected commodity.
| wid | Window buying from. |
| str | Unused. |
Definition at line 401 of file land_trade.c.
| int commodity_canBuy | ( | const Commodity * | com | ) |
Checks to see if the player can buy a commodity.
Definition at line 346 of file land_trade.c.
| int commodity_canSell | ( | const Commodity * | com | ) |
Checks to see if a player can sell a commodity.
Definition at line 385 of file land_trade.c.
| void commodity_exchange_cleanup | ( | void | ) |
Definition at line 231 of file land_trade.c.
|
static |
Definition at line 53 of file land_trade.c.
|
static |
Definition at line 141 of file land_trade.c.
|
static |
Definition at line 39 of file land_trade.c.
| void commodity_exchange_open | ( | unsigned int | wid | ) |
Opens the local market window.
Definition at line 63 of file land_trade.c.
| int commodity_getMod | ( | void | ) |
Gets the current modifier status.
Definition at line 491 of file land_trade.c.
| void commodity_renderMod | ( | double | bx, |
| double | by, | ||
| double | w, | ||
| double | h, | ||
| void * | data ) |
Renders the commodity buying modifier.
| bx | Base X position to render at. |
| by | Base Y position to render at. |
| w | Width to render at. |
| h | Height to render at. |
| data | Unused. |
Definition at line 513 of file land_trade.c.
| void commodity_sell | ( | unsigned int | wid, |
| const char * | str ) |
Attempts to sell a commodity.
| wid | Window selling commodity from. |
| str | Unused. |
Definition at line 446 of file land_trade.c.
| void commodity_update | ( | unsigned int | wid, |
| const char * | str ) |
Updates the commodity window.
| wid | Window to update. |
| str | Unused. |
Definition at line 242 of file land_trade.c.
|
static |
Definition at line 34 of file land_trade.c.
|
static |
Amount you can buy or sell in a single click.
Definition at line 32 of file land_trade.c.