![]() |
naev 0.11.5
|
Handles all the landing menus and actions. More...
#include "land.h"#include "array.h"#include "camera.h"#include "conf.h"#include "dialogue.h"#include "economy.h"#include "equipment.h"#include "escort.h"#include "event.h"#include "gui.h"#include "gui_omsg.h"#include "hook.h"#include "land_outfits.h"#include "land_shipyard.h"#include "land_trade.h"#include "log.h"#include "map.h"#include "menu.h"#include "mission.h"#include "music.h"#include "ndata.h"#include "news.h"#include "nlua.h"#include "nlua_tk.h"#include "nluadef.h"#include "npc.h"#include "nstring.h"#include "ntime.h"#include "player.h"#include "player_fleet.h"#include "rng.h"#include "render.h"#include "save.h"#include "shiplog.h"#include "toolkit.h"Go to the source code of this file.
Macros | |
| #define | VISITED_LAND (1<<0) |
| #define | VISITED_COMMODITY (1<<1) |
| #define | VISITED_BAR (1<<2) |
| #define | VISITED_OUTFITS (1<<3) |
| #define | VISITED_SHIPYARD (1<<4) |
| #define | VISITED_EQUIPMENT (1<<5) |
| #define | VISITED_MISSION (1<<6) |
| #define | visited(f) |
| #define | has_visited(f) |
| #define | should_open(s, w) |
Functions | |
| static void | land_stranded (void) |
| Runs the rescue script if players are stuck. | |
| static int | land_gc (void *unused) |
| Runs Lua garbage collection. | |
| static int | land_hasLocalMap (void) |
| static void | land_createMainTab (unsigned int wid) |
| Creates the main tab. | |
| static void | land_setupTabs (void) |
| Sets up the tabs for the window. | |
| static void | land_cleanupWindow (unsigned int wid, const char *name) |
| Cleans up the land window. | |
| static void | land_changeTab (unsigned int wid, const char *wgt, int old, int tab) |
| Saves the last place the player was. | |
| static void | bar_getDim (int wid, int *w, int *h, int *iw, int *ih, int *bw, int *bh) |
| Gets the dimensions of the spaceport bar window. | |
| static void | bar_open (unsigned int wid) |
| Opens the spaceport bar window. | |
| static int | bar_genList (unsigned int wid) |
| Generates the mission list for the bar. | |
| static void | bar_update (unsigned int wid, const char *str) |
| Updates the missions in the spaceport bar. | |
| static void | bar_close (unsigned int wid, const char *name) |
| Closes the mission computer window. | |
| static void | bar_approach (unsigned int wid, const char *str) |
| Approaches guy in mission computer. | |
| static int | news_load (void) |
| Loads the news. | |
| static void | misn_open (unsigned int wid) |
| Opens the mission computer window. | |
| static void | misn_autonav (unsigned int wid, const char *str) |
| Autonav to selected mission. | |
| static void | misn_accept (unsigned int wid, const char *str) |
| Accepts the selected mission. | |
| static void | misn_genList (unsigned int wid, int first) |
| Generates the mission list. | |
| static void | misn_update (unsigned int wid, const char *str) |
| Updates the mission list. | |
| void | land_queueTakeoff (void) |
| Queue a takeoff. | |
| void | land_needsTakeoff (int delay) |
| int | land_canSave (void) |
| Whether or not the player can save. | |
| int | land_doneLoading (void) |
| Check to see if finished loading. | |
| void | land_errClear (void) |
| Clear error dialogues. | |
| void | land_errDialogueBuild (const char *fmt,...) |
| Generates error dialogues used by several landing tabs. | |
| int | land_errDisplay (void) |
| Displays an error if applicable. | |
| void | bar_regen (void) |
| Regenerates the bar list. | |
| void | land_refuel (void) |
| Refuels the player's current ship, if possible. | |
| static void | spaceport_buyMap (unsigned int wid, const char *str) |
| Buys a local system map. | |
| void | land_updateMainTab (void) |
| Adds the "Buy Local Map" button if needed and updates info. | |
| void | land_buttonTakeoff (unsigned int wid, const char *unused) |
| Wrapper for takeoff mission button. | |
| unsigned int | land_getWid (int window) |
| Gets the WID of a window by type. | |
| void | land_genWindows (int load) |
| Recreates the land windows. | |
| int | land_setWindow (int window) |
| Sets the land window tab. | |
| void | land (Spob *p, int load) |
| Opens up all the land dialogue stuff. | |
| void | takeoff (int delay, int nosave) |
| Makes the player take off if landed. | |
| void | land_cleanup (void) |
| Cleans up some land-related variables. | |
| void | land_exit (void) |
| Exits all the landing stuff. | |
Variables | |
| static unsigned int | land_visited = 0 |
| unsigned int | land_generated = 0 |
| int | landed = 0 |
| int | land_loaded = 0 |
| static int | land_takeoff = 0 |
| static int | land_takeoff_nosave = 0 |
| unsigned int | land_wid = 0 |
| static int | land_regen = 0 |
| static int | land_windowsMap [LAND_NUMWINDOWS] |
| static unsigned int * | land_windows = NULL |
| Spob * | land_spob = NULL |
| static glTexture * | gfx_exterior = NULL |
| static Mission * | mission_computer = NULL |
| static int | mission_ncomputer = 0 |
| static glTexture * | mission_portrait = NULL |
| static int | last_window = 0 |
| static char | errorlist [STRMAX_SHORT] |
| static char | errorreason [STRMAX_SHORT] |
| static int | errorappend |
| static char * | errorlist_ptr |
| static nlua_env | rescue_env = LUA_NOREF |
Handles all the landing menus and actions.
Definition in file land.c.
| #define has_visited | ( | f | ) |
Check if player has visited.
| #define should_open | ( | s, | |
| w ) |
| #define visited | ( | f | ) |
| #define VISITED_COMMODITY (1<<1) |
| #define VISITED_EQUIPMENT (1<<5) |
| #define VISITED_MISSION (1<<6) |
| #define VISITED_OUTFITS (1<<3) |
| #define VISITED_SHIPYARD (1<<4) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void land | ( | Spob * | p, |
| int | load ) |
| void land_buttonTakeoff | ( | unsigned int | wid, |
| const char * | unused ) |
| int land_canSave | ( | void | ) |
|
static |
| void land_cleanup | ( | void | ) |
|
static |
|
static |
| int land_doneLoading | ( | void | ) |
| void land_errDialogueBuild | ( | const char * | fmt, |
| ... ) |
| int land_errDisplay | ( | void | ) |
|
static |
| void land_genWindows | ( | int | load | ) |
| unsigned int land_getWid | ( | int | window | ) |
| void land_refuel | ( | void | ) |
|
static |
| int land_setWindow | ( | int | window | ) |
|
static |
| void land_updateMainTab | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void takeoff | ( | int | delay, |
| int | nosave ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |