naev 0.12.5
gui.c File Reference

Contains the GUI stuff for the player. More...

#include "gui.h"
#include "ai.h"
#include "array.h"
#include "camera.h"
#include "conf.h"
#include "font.h"
#include "gui_omsg.h"
#include "gui_osd.h"
#include "input.h"
#include "land.h"
#include "log.h"
#include "map_overlay.h"
#include "menu.h"
#include "ndata.h"
#include "nlua.h"
#include "nlua_gfx.h"
#include "nlua_gui.h"
#include "nlua_tk.h"
#include "nstring.h"
#include "ntracing.h"
#include "opengl.h"
#include "pause.h"
#include "pilot.h"
#include "player.h"
#include "player_gui.h"
#include "render.h"
#include "space.h"
#include "spfx.h"
#include "start.h"
#include "toolkit.h"
Include dependency graph for gui.c:

Go to the source code of this file.

Data Structures

struct  Radar
 Represents the player's radar. More...
struct  Mesg
 On screen player message. More...

Macros

#define XML_GUI_ID   "GUIs"
#define XML_GUI_TAG   "gui"
#define RADAR_BLINK_PILOT   0.5
#define RADAR_BLINK_SPOB   1.
#define RADAR_RES_MAX   300.
#define RADAR_RES_REF   100.
#define RADAR_RES_MIN   10.
#define RADAR_RES_INTERVAL    10.
#define LUA_FUNC(funcname)
#define LUA_CLEANUP(varname)

Functions

void weapon_minimap (const double res, const double w, const double h, const RadarShape shape, double alpha)
 Draws the minimap weapons (used in player.c).
static void gui_renderTargetReticles (const SimpleShader *shd, double x, double y, double radius, double angle, const glColour *c)
 Renders spob and jump point targeting reticles.
static void gui_borderIntersection (double *cx, double *cy, double rx, double ry, double hw, double hh)
 Gets the intersection with the border.
static void gui_renderPilotTarget (void)
 Renders the players pilot target.
static void gui_renderSpobTarget (void)
 Sets up rendering of spob and jump point targeting reticles.
static void gui_renderBorder (double dt)
 Renders the ships/spobs in the border.
static void gui_renderMessages (double dt)
 Renders the player's messages on screen.
static const glColour * gui_getSpobColour (int i)
 Gets the colour of a spob.
static void gui_renderRadarOutOfRange (RadarShape sh, int w, int h, int cx, int cy, const glColour *col)
 Renders an out of range marker for the spob.
static void gui_blink (double cx, double cy, double vr, const glColour *col, double blinkInterval, double blinkVar)
 Renders the spob blink around a position on the minimap.
static const glColour * gui_getPilotColour (const Pilot *p)
 Gets a pilot's colour, with a special colour for targets.
static void gui_calcBorders (void)
 Calculates and sets the GUI borders.
static int gui_doFunc (int func_ref, const char *func_name)
 Runs a GUI Lua function.
static int gui_prepFunc (int func_ref, const char *func_name)
 Prepares to run a function.
static int gui_runFunc (const char *func, int nargs, int nret)
 Runs a function.
void gui_setDefaults (void)
void gui_messageInit (int width, int x, int y)
 Initializes the message system.
void gui_messageScrollUp (int lines)
 Scrolls up the message box.
void gui_messageScrollDown (int lines)
 Scrolls down the message box.
void player_messageToggle (int enable)
 Toggles if player should receive messages.
void player_messageRaw (const char *str)
 Adds a mesg to the queue to be displayed on screen.
void player_message (const char *fmt,...)
 Adds a mesg to the queue to be displayed on screen.
int gui_onScreenPilot (double *rx, double *ry, const Pilot *pilot)
 Takes a pilot and returns whether it's on screen, plus its relative position.
int gui_onScreenSpob (double *rx, double *ry, const JumpPoint *jp, const Spob *pnt)
 Takes a spob or jump point and returns whether it's on screen, plus its relative position.
void gui_renderReticles (double dt)
 Renders the gui targeting reticles.
void gui_render (double dt)
 Renders the player's GUI.
void gui_cooldownEnd (void)
 Notifies GUI scripts that the player broke out of cooldown.
int gui_radarInit (int circle, int w, int h)
 Initializes the radar.
void gui_radarRender (double x, double y)
 Renders the GUI radar.
void gui_radarGetRes (double *res)
 Outputs the radar's resolution.
void gui_clearMessages (void)
 Clears the GUI messages.
void gui_renderPilot (const Pilot *p, RadarShape shape, double w, double h, double res, int overlay)
 Renders a pilot in the GUI radar.
void gui_renderAsteroid (const Asteroid *a, double w, double h, double res, int overlay)
 Renders an asteroid in the GUI radar.
void gui_renderPlayer (double res, int overlay)
 Renders the player cross on the radar or whatever.
void gui_forceBlink (void)
 Force sets the spob and pilot radar blink.
void gui_renderSpob (int ind, RadarShape shape, double w, double h, double res, double alpha, int overlay)
 Draws the spobs in the minimap.
void gui_renderJumpPoint (int ind, RadarShape shape, double w, double h, double res, double alpha, int overlay)
 Renders a jump point on the minimap.
void gui_setViewport (double x, double y, double w, double h)
 Sets the viewport.
void gui_clearViewport (void)
 Resets the viewport.
int gui_init (void)
 Initializes the GUI system.
void gui_reload (void)
 Reloads the GUI.
void gui_setCargo (void)
 Player just changed their cargo.
void gui_setNav (void)
 Player just changed their nav computer target.
void gui_setTarget (void)
 Player just changed their pilot target.
void gui_setShip (void)
 Player just upgraded their ship or modified it.
void gui_setSystem (void)
 Player just changed their system.
void gui_updateFaction (void)
 Player's relationship with a faction was modified.
void gui_updateEffects (void)
void gui_setGeneric (const Pilot *pilot)
 Calls trigger functions depending on who the pilot is.
const char * gui_pick (void)
 Determines which GUI should be used.
int gui_exists (const char *name)
 Checks to see if a GUI exists.
int gui_load (const char *name)
 Attempts to load the actual GUI.
void gui_cleanup (void)
 Cleans up the GUI.
void gui_free (void)
 Frees the gui stuff.
void gui_setRadarResolution (double res)
 Sets the radar resolution.
void gui_setRadarRel (int mod)
 Modifies the radar resolution.
void gui_getOffset (double *x, double *y)
 Gets the GUI offset.
glTexturegui_hailIcon (void)
 Gets the hail icon texture.
void gui_targetSpobGFX (const glTexture *gfx)
 Sets the spob target GFX.
void gui_targetPilotGFX (const glTexture *gfx)
 Sets the pilot target GFX.
static void gui_eventToScreenPos (int *sx, int *sy, int ex, int ey)
 Translates a mouse position from an SDL_Event to GUI coordinates.
int gui_radarClickEvent (SDL_Event *event)
 Handles a click at a position in the current system.
int gui_borderClickEvent (SDL_Event *event)
 Handles clicks on the GUI border icons.
int gui_handleEvent (SDL_Event *evt)
 Handles GUI events.
void gui_mouseClickEnable (int enable)
 Enables the mouse click callback.
void gui_mouseMoveEnable (int enable)
 Enables the mouse movement callback.

Variables

static double blink_pilot = 0.
static double blink_spob = 0.
static double animation_dt = 0.
static gl_vbo * gui_radar_select_vbo = NULL
static int gui_getMessage
static char * gui_name = NULL
static IntList gui_qtquery
unsigned int land_wid
static nlua_env gui_env = LUA_NOREF
static int gui_L_mclick = 0
static int gui_L_mmove = 0
static double gui_viewport_x = 0.
static double gui_viewport_y = 0.
static double gui_viewport_w = 0.
static double gui_viewport_h = 0.
static Radar gui_radar
static double gui_xoff = 0.
static double gui_yoff = 0.
static const int mesg_max = 128
static int mesg_pointer
static int mesg_viewpoint = -1
static const double mesg_timeout = 15.
static Mesgmesg_stack
static int gui_mesg_w = 0
static int gui_mesg_x = 0
static int gui_mesg_y = 0
static double gui_tr = 0.
static double gui_br = 0.
static double gui_tl = 0.
static double gui_bl = 0.
static glTexturegui_ico_hail = NULL
static glTexturegui_target_spob = NULL
static glTexturegui_target_pilot = NULL
static int gui_lua_create = LUA_NOREF
static int gui_lua_render = LUA_NOREF
static int gui_lua_render_cooldown = LUA_NOREF
static int gui_lua_cooldown_end = LUA_NOREF
static int gui_lua_mouse_move = LUA_NOREF
static int gui_lua_mouse_click = LUA_NOREF
static int gui_lua_update_cargo = LUA_NOREF
static int gui_lua_update_nav = LUA_NOREF
static int gui_lua_update_target = LUA_NOREF
static int gui_lua_update_ship = LUA_NOREF
static int gui_lua_update_system = LUA_NOREF
static int gui_lua_update_faction = LUA_NOREF
static int gui_lua_update_effects = LUA_NOREF
static int can_jump

Detailed Description

Contains the GUI stuff for the player.

Definition in file gui.c.

Macro Definition Documentation

◆ LUA_CLEANUP

#define LUA_CLEANUP ( varname)
Value:
if ( varname != LUA_NOREF ) \
luaL_unref( naevL, LUA_REGISTRYINDEX, varname ); \
varname = LUA_NOREF
lua_State * naevL
Definition nlua.c:54

◆ LUA_FUNC

#define LUA_FUNC ( funcname)
Value:
gui_lua_##funcname = nlua_refenvtype( gui_env, #funcname, LUA_TFUNCTION );
static nlua_env gui_env
Definition gui.c:73
int nlua_refenvtype(nlua_env env, const char *name, int type)
Gets the reference of a global in a lua environment if it matches a type.
Definition nlua.c:1047

◆ RADAR_BLINK_PILOT

#define RADAR_BLINK_PILOT   0.5

Blink rate of the pilot target on radar.

Definition at line 52 of file gui.c.

◆ RADAR_BLINK_SPOB

#define RADAR_BLINK_SPOB   1.

Blink rate of the spob target on radar.

Definition at line 53 of file gui.c.

◆ RADAR_RES_INTERVAL

#define RADAR_RES_INTERVAL    10.

Steps used to increase/decrease resolution.

Definition at line 102 of file gui.c.

◆ RADAR_RES_MAX

#define RADAR_RES_MAX   300.

Maximum radar resolution.

Definition at line 99 of file gui.c.

◆ RADAR_RES_MIN

#define RADAR_RES_MIN   10.

Minimum radar resolution.

Definition at line 101 of file gui.c.

◆ RADAR_RES_REF

#define RADAR_RES_REF   100.

Reference radar resolution.

Definition at line 100 of file gui.c.

◆ XML_GUI_ID

#define XML_GUI_ID   "GUIs"

XML section identifier for GUI document.

Definition at line 49 of file gui.c.

◆ XML_GUI_TAG

#define XML_GUI_TAG   "gui"

XML Section identifier for GUI tags.

Definition at line 50 of file gui.c.

Function Documentation

◆ gui_blink()

void gui_blink ( double cx,
double cy,
double vr,
const glColour * col,
double blinkInterval,
double blinkVar )
static

Renders the spob blink around a position on the minimap.

Definition at line 1404 of file gui.c.

◆ gui_borderClickEvent()

int gui_borderClickEvent ( SDL_Event * event)

Handles clicks on the GUI border icons.

event The click event.

Returns
Whether the click was used to trigger an action.

Definition at line 2236 of file gui.c.

◆ gui_borderIntersection()

void gui_borderIntersection ( double * cx,
double * cy,
double rx,
double ry,
double hw,
double hh )
static

Gets the intersection with the border.

http://en.wikipedia.org/wiki/Intercept_theorem

Parameters
[out]cxX intersection.
[out]cyY intersection.
rxCenter X position of intersection.
ryCenter Y position of intersection.
hwScreen half-width.
hhScreen half-height.

Definition at line 516 of file gui.c.

◆ gui_calcBorders()

void gui_calcBorders ( void )
static

Calculates and sets the GUI borders.

Definition at line 1684 of file gui.c.

◆ gui_cleanup()

void gui_cleanup ( void )

Cleans up the GUI.

Definition at line 2047 of file gui.c.

◆ gui_clearMessages()

void gui_clearMessages ( void )

Clears the GUI messages.

Definition at line 1037 of file gui.c.

◆ gui_clearViewport()

void gui_clearViewport ( void )

Resets the viewport.

Definition at line 1675 of file gui.c.

◆ gui_cooldownEnd()

void gui_cooldownEnd ( void )

Notifies GUI scripts that the player broke out of cooldown.

Definition at line 898 of file gui.c.

◆ gui_doFunc()

int gui_doFunc ( int func_ref,
const char * func_name )
static

Runs a GUI Lua function.

Parameters
func_refReference of the functionn to run.
func_nameName of the function to run.
Returns
0 on success.

Definition at line 1771 of file gui.c.

◆ gui_eventToScreenPos()

void gui_eventToScreenPos ( int * sx,
int * sy,
int ex,
int ey )
static

Translates a mouse position from an SDL_Event to GUI coordinates.

Definition at line 2194 of file gui.c.

◆ gui_exists()

int gui_exists ( const char * name)

Checks to see if a GUI exists.

Returns
non-zero if filename exists. zero otherwise.

Definition at line 1952 of file gui.c.

◆ gui_forceBlink()

void gui_forceBlink ( void )

Force sets the spob and pilot radar blink.

Definition at line 1395 of file gui.c.

◆ gui_free()

void gui_free ( void )

Frees the gui stuff.

Definition at line 2107 of file gui.c.

◆ gui_getOffset()

void gui_getOffset ( double * x,
double * y )

Gets the GUI offset.

Parameters
xX offset.
yY offset.

Definition at line 2159 of file gui.c.

◆ gui_getPilotColour()

const glColour * gui_getPilotColour ( const Pilot * p)
static

Gets a pilot's colour, with a special colour for targets.

Parameters
pPilot to get colour of.
Returns
The colour of the pilot.
See also
pilot_getColour

Definition at line 1158 of file gui.c.

◆ gui_getSpobColour()

const glColour * gui_getSpobColour ( int i)
static

Gets the colour of a spob.

Parameters
iIndex of the spob to get colour of.
Returns
Colour of the spob.

Definition at line 1379 of file gui.c.

◆ gui_hailIcon()

glTexture * gui_hailIcon ( void )

Gets the hail icon texture.

Definition at line 2168 of file gui.c.

◆ gui_handleEvent()

int gui_handleEvent ( SDL_Event * evt)

Handles GUI events.

Definition at line 2295 of file gui.c.

◆ gui_init()

int gui_init ( void )

Initializes the GUI system.

Returns
0 on success;

Definition at line 1714 of file gui.c.

◆ gui_load()

int gui_load ( const char * name)

Attempts to load the actual GUI.

Parameters
nameName of the GUI to load.
Returns
0 on success.

Definition at line 1965 of file gui.c.

◆ gui_messageInit()

void gui_messageInit ( int width,
int x,
int y )

Initializes the message system.

Parameters
widthMessage width.
xX position to set at.
yY position to set at.

Definition at line 211 of file gui.c.

◆ gui_messageScrollDown()

void gui_messageScrollDown ( int lines)

Scrolls down the message box.

Parameters
linesNumber of lines to scroll down.

Definition at line 254 of file gui.c.

◆ gui_messageScrollUp()

void gui_messageScrollUp ( int lines)

Scrolls up the message box.

Parameters
linesNumber of lines to scroll up.

Definition at line 223 of file gui.c.

◆ gui_mouseClickEnable()

void gui_mouseClickEnable ( int enable)

Enables the mouse click callback.

Definition at line 2349 of file gui.c.

◆ gui_mouseMoveEnable()

void gui_mouseMoveEnable ( int enable)

Enables the mouse movement callback.

Definition at line 2357 of file gui.c.

◆ gui_onScreenPilot()

int gui_onScreenPilot ( double * rx,
double * ry,
const Pilot * pilot )

Takes a pilot and returns whether it's on screen, plus its relative position.

Parameters
[out]rxRelative X position (factoring in viewport offset)
[out]ryRelative Y position (factoring in viewport offset)
pilotPilot to determine the visibility and position of
Returns
Whether or not the pilot is on-screen.

Definition at line 651 of file gui.c.

◆ gui_onScreenSpob()

int gui_onScreenSpob ( double * rx,
double * ry,
const JumpPoint * jp,
const Spob * pnt )

Takes a spob or jump point and returns whether it's on screen, plus its relative position.

Parameters
[out]rxRelative X position (factoring in viewport offset)
[out]ryRelative Y position (factoring in viewport offset)
jpJump point to determine the visibility and position of
pntSpob to determine the visibility and position of
Returns
Whether or not the given spob is on-screen.

Definition at line 690 of file gui.c.

◆ gui_pick()

const char * gui_pick ( void )

Determines which GUI should be used.

Definition at line 1933 of file gui.c.

◆ gui_prepFunc()

int gui_prepFunc ( int func_ref,
const char * func_name )
static

Prepares to run a function.

Parameters
func_refReference of the functionn to prepare.
func_nameName of the function to prepare.
Returns
0 on success.

Definition at line 1790 of file gui.c.

◆ gui_radarClickEvent()

int gui_radarClickEvent ( SDL_Event * event)

Handles a click at a position in the current system.

event The click event.

Returns
Whether the click was used to trigger an action.

Definition at line 2205 of file gui.c.

◆ gui_radarGetRes()

void gui_radarGetRes ( double * res)

Outputs the radar's resolution.

Parameters
[out]resCurrent zoom ratio.

Definition at line 1029 of file gui.c.

◆ gui_radarInit()

int gui_radarInit ( int circle,
int w,
int h )

Initializes the radar.

Parameters
circleWhether or not the radar is circular.
wRadar width.
hRadar height.

Definition at line 910 of file gui.c.

◆ gui_radarRender()

void gui_radarRender ( double x,
double y )

Renders the GUI radar.

Parameters
xX position to render at.
yY position to render at.

Definition at line 925 of file gui.c.

◆ gui_reload()

void gui_reload ( void )

Reloads the GUI.

Definition at line 1845 of file gui.c.

◆ gui_render()

void gui_render ( double dt)

Renders the player's GUI.

Parameters
dtCurrent delta tick.

Definition at line 755 of file gui.c.

◆ gui_renderAsteroid()

void gui_renderAsteroid ( const Asteroid * a,
double w,
double h,
double res,
int overlay )

Renders an asteroid in the GUI radar.

Parameters
aAsteroid to render.
wWidth.
hHeight.
resRadar resolution.
overlayWhether to render onto the overlay.

Definition at line 1280 of file gui.c.

◆ gui_renderBorder()

void gui_renderBorder ( double dt)
static

Renders the ships/spobs in the border.

Parameters
dtCurrent delta tick.

Definition at line 556 of file gui.c.

◆ gui_renderJumpPoint()

void gui_renderJumpPoint ( int ind,
RadarShape shape,
double w,
double h,
double res,
double alpha,
int overlay )

Renders a jump point on the minimap.

Parameters
indJump point to render.
shapeShape of the radar (RADAR_RECT or RADAR_CIRCLE).
wWidth.
hHeight.
resRadar resolution.
alphaAlpha to use.
overlayWhether to render onto the overlay.

Definition at line 1563 of file gui.c.

◆ gui_renderMessages()

void gui_renderMessages ( double dt)
static

Renders the player's messages on screen.

Parameters
dtCurrent delta tick.

Definition at line 1051 of file gui.c.

◆ gui_renderPilot()

void gui_renderPilot ( const Pilot * p,
RadarShape shape,
double w,
double h,
double res,
int overlay )

Renders a pilot in the GUI radar.

Parameters
pPilot to render.
shapeShape of the radar (RADAR_RECT or RADAR_CIRCLE).
wWidth.
hHeight.
resRadar resolution.
overlayWhether to render onto the overlay.

Definition at line 1180 of file gui.c.

◆ gui_renderPilotTarget()

void gui_renderPilotTarget ( void )
static

Renders the players pilot target.

Definition at line 460 of file gui.c.

◆ gui_renderPlayer()

void gui_renderPlayer ( double res,
int overlay )

Renders the player cross on the radar or whatever.

Definition at line 1349 of file gui.c.

◆ gui_renderRadarOutOfRange()

void gui_renderRadarOutOfRange ( RadarShape sh,
int w,
int h,
int cx,
int cy,
const glColour * col )
static

Renders an out of range marker for the spob.

Definition at line 1416 of file gui.c.

◆ gui_renderReticles()

void gui_renderReticles ( double dt)

Renders the gui targeting reticles.

Parameters
dtCurrent deltatick.

Definition at line 732 of file gui.c.

◆ gui_renderSpob()

void gui_renderSpob ( int ind,
RadarShape shape,
double w,
double h,
double res,
double alpha,
int overlay )

Draws the spobs in the minimap.

Matrix mode is already displaced to center of the minimap.

Definition at line 1456 of file gui.c.

◆ gui_renderSpobTarget()

void gui_renderSpobTarget ( void )
static

Sets up rendering of spob and jump point targeting reticles.

Definition at line 374 of file gui.c.

◆ gui_renderTargetReticles()

void gui_renderTargetReticles ( const SimpleShader * shd,
double x,
double y,
double radius,
double angle,
const glColour * c )
static

Renders spob and jump point targeting reticles.

Parameters
shdShader to use to render.
xX position of reticle segment.
yY position of reticle segment.
radiusRadius.
angleAngle to rotate.
cColour.

Definition at line 439 of file gui.c.

◆ gui_runFunc()

int gui_runFunc ( const char * func,
int nargs,
int nret )
static

Runs a function.

Note
Function must be prepared beforehand.
Parameters
funcName of the function to run.
nargsArguments to the function.
nretParameters to get returned from the function.

Definition at line 1826 of file gui.c.

◆ gui_setCargo()

void gui_setCargo ( void )

Player just changed their cargo.

Definition at line 1856 of file gui.c.

◆ gui_setDefaults()

void gui_setDefaults ( void )

Sets the GUI to defaults.

Definition at line 198 of file gui.c.

◆ gui_setGeneric()

void gui_setGeneric ( const Pilot * pilot)

Calls trigger functions depending on who the pilot is.

Parameters
pilotThe pilot to act based upon.

Definition at line 1913 of file gui.c.

◆ gui_setNav()

void gui_setNav ( void )

Player just changed their nav computer target.

Definition at line 1864 of file gui.c.

◆ gui_setRadarRel()

void gui_setRadarRel ( int mod)

Modifies the radar resolution.

Parameters
modNumber of intervals to jump (up or down).

Definition at line 2146 of file gui.c.

◆ gui_setRadarResolution()

void gui_setRadarResolution ( double res)

Sets the radar resolution.

Parameters
resResolution to set to.

Definition at line 2136 of file gui.c.

◆ gui_setShip()

void gui_setShip ( void )

Player just upgraded their ship or modified it.

Definition at line 1880 of file gui.c.

◆ gui_setSystem()

void gui_setSystem ( void )

Player just changed their system.

Definition at line 1888 of file gui.c.

◆ gui_setTarget()

void gui_setTarget ( void )

Player just changed their pilot target.

Definition at line 1872 of file gui.c.

◆ gui_setViewport()

void gui_setViewport ( double x,
double y,
double w,
double h )

Sets the viewport.

Definition at line 1656 of file gui.c.

◆ gui_targetPilotGFX()

void gui_targetPilotGFX ( const glTexture * gfx)

Sets the pilot target GFX.

Definition at line 2185 of file gui.c.

◆ gui_targetSpobGFX()

void gui_targetSpobGFX ( const glTexture * gfx)

Sets the spob target GFX.

Definition at line 2176 of file gui.c.

◆ gui_updateEffects()

void gui_updateEffects ( void )

Definition at line 1902 of file gui.c.

◆ gui_updateFaction()

void gui_updateFaction ( void )

Player's relationship with a faction was modified.

Definition at line 1896 of file gui.c.

◆ player_message()

void player_message ( const char * fmt,
... )

Adds a mesg to the queue to be displayed on screen.

Parameters
fmtString with formatting like printf.

Definition at line 353 of file gui.c.

◆ player_messageRaw()

void player_messageRaw ( const char * str)

Adds a mesg to the queue to be displayed on screen.

Parameters
strMessage to add.

Definition at line 293 of file gui.c.

◆ player_messageToggle()

void player_messageToggle ( int enable)

Toggles if player should receive messages.

Parameters
enableWhether or not to enable player receiving messages.

Definition at line 283 of file gui.c.

◆ weapon_minimap()

void weapon_minimap ( double res,
double w,
double h,
const RadarShape shape,
double alpha )
extern

Draws the minimap weapons (used in player.c).

from weapon.c

Parameters
resMinimap resolution.
wWidth of minimap.
hHeight of minimap.
shapeShape of the minimap.
alphaAlpha to draw points at.

Definition at line 226 of file weapon.c.

Variable Documentation

◆ animation_dt

double animation_dt = 0.
static

Used for animations.

Definition at line 58 of file gui.c.

◆ blink_pilot

double blink_pilot = 0.
static

Timer on target blinking on radar.

Definition at line 56 of file gui.c.

◆ blink_spob

double blink_spob = 0.
static

Timer on spob blinking on radar.

Definition at line 57 of file gui.c.

◆ can_jump

int can_jump
static
Initial value:
=
0

Stores whether or not the player is able to jump.

Definition at line 748 of file gui.c.

◆ gui_bl

double gui_bl = 0.
static

Border bottom-left.

Definition at line 138 of file gui.c.

◆ gui_br

double gui_br = 0.
static

Border bottom-right.

Definition at line 136 of file gui.c.

◆ gui_env

nlua_env gui_env = LUA_NOREF
static

GUI Lua stuff. Current GUI Lua environment.

Definition at line 73 of file gui.c.

◆ gui_getMessage

int gui_getMessage
static
Initial value:
=
1

Whether or not the player should receive messages.

Definition at line 63 of file gui.c.

◆ gui_ico_hail

glTexture* gui_ico_hail = NULL
static

Hailing icon.

Definition at line 141 of file gui.c.

◆ gui_L_mclick

int gui_L_mclick = 0
static

Use mouse click callback.

Definition at line 74 of file gui.c.

◆ gui_L_mmove

int gui_L_mmove = 0
static

Use mouse movement callback.

Definition at line 75 of file gui.c.

◆ gui_lua_cooldown_end

int gui_lua_cooldown_end = LUA_NOREF
static

Definition at line 149 of file gui.c.

◆ gui_lua_create

int gui_lua_create = LUA_NOREF
static

Definition at line 146 of file gui.c.

◆ gui_lua_mouse_click

int gui_lua_mouse_click = LUA_NOREF
static

Definition at line 151 of file gui.c.

◆ gui_lua_mouse_move

int gui_lua_mouse_move = LUA_NOREF
static

Definition at line 150 of file gui.c.

◆ gui_lua_render

int gui_lua_render = LUA_NOREF
static

Definition at line 147 of file gui.c.

◆ gui_lua_render_cooldown

int gui_lua_render_cooldown = LUA_NOREF
static

Definition at line 148 of file gui.c.

◆ gui_lua_update_cargo

int gui_lua_update_cargo = LUA_NOREF
static

Definition at line 152 of file gui.c.

◆ gui_lua_update_effects

int gui_lua_update_effects = LUA_NOREF
static

Definition at line 158 of file gui.c.

◆ gui_lua_update_faction

int gui_lua_update_faction = LUA_NOREF
static

Definition at line 157 of file gui.c.

◆ gui_lua_update_nav

int gui_lua_update_nav = LUA_NOREF
static

Definition at line 153 of file gui.c.

◆ gui_lua_update_ship

int gui_lua_update_ship = LUA_NOREF
static

Definition at line 155 of file gui.c.

◆ gui_lua_update_system

int gui_lua_update_system = LUA_NOREF
static

Definition at line 156 of file gui.c.

◆ gui_lua_update_target

int gui_lua_update_target = LUA_NOREF
static

Definition at line 154 of file gui.c.

◆ gui_mesg_w

int gui_mesg_w = 0
static

Width of messages.

Definition at line 130 of file gui.c.

◆ gui_mesg_x

int gui_mesg_x = 0
static

X positioning of messages.

Definition at line 131 of file gui.c.

◆ gui_mesg_y

int gui_mesg_y = 0
static

Y positioning of messages.

Definition at line 132 of file gui.c.

◆ gui_name

char* gui_name = NULL
static

Name of the GUI (for errors and such).

Definition at line 65 of file gui.c.

◆ gui_qtquery

IntList gui_qtquery
static

For querying collisions.

Definition at line 66 of file gui.c.

◆ gui_radar

Radar gui_radar
static

Definition at line 104 of file gui.c.

◆ gui_radar_select_vbo

gl_vbo* gui_radar_select_vbo = NULL
static

Definition at line 61 of file gui.c.

◆ gui_target_pilot

glTexture* gui_target_pilot = NULL
static

Pilot targeting icon.

Definition at line 143 of file gui.c.

◆ gui_target_spob

glTexture* gui_target_spob = NULL
static

Spob targeting icon.

Definition at line 142 of file gui.c.

◆ gui_tl

double gui_tl = 0.
static

Border top-left.

Definition at line 137 of file gui.c.

◆ gui_tr

double gui_tr = 0.
static

Border top-right.

Definition at line 135 of file gui.c.

◆ gui_viewport_h

double gui_viewport_h = 0.
static

GUI Viewport height.

Definition at line 83 of file gui.c.

◆ gui_viewport_w

double gui_viewport_w = 0.
static

GUI Viewport width.

Definition at line 82 of file gui.c.

◆ gui_viewport_x

double gui_viewport_x = 0.
static

Cropping. GUI Viewport X offset.

Definition at line 80 of file gui.c.

◆ gui_viewport_y

double gui_viewport_y = 0.
static

GUI Viewport Y offset.

Definition at line 81 of file gui.c.

◆ gui_xoff

double gui_xoff = 0.
static

X Offset that GUI introduces.

Definition at line 107 of file gui.c.

◆ gui_yoff

double gui_yoff = 0.
static

Y offset that GUI introduces.

Definition at line 108 of file gui.c.

◆ land_wid

unsigned int land_wid
extern

From land.c

Land window ID, also used in gui.c

Definition at line 83 of file land.c.

◆ mesg_max

const int mesg_max = 128
static

Maximum messages onscreen

Definition at line 111 of file gui.c.

◆ mesg_pointer

int mesg_pointer
static
Initial value:
=
0

Current pointer message is at (for when scrolling).

Definition at line 112 of file gui.c.

◆ mesg_stack

Mesg* mesg_stack
static
Initial value:
=
NULL

Stack of messages, will be of mesg_max size.

Definition at line 128 of file gui.c.

◆ mesg_timeout

const double mesg_timeout = 15.
static

Timeout length.

Definition at line 115 of file gui.c.

◆ mesg_viewpoint

int mesg_viewpoint = -1
static

Position of viewing.

Definition at line 114 of file gui.c.