UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_node_geoscape.cpp File Reference
Include dependency graph for ui_node_geoscape.cpp:

Go to the source code of this file.

Macros

#define EXTRADATA_TYPE   mapExtraData_t
#define EXTRADATA(node)
#define EXTRADATACONST(node)
#define DAWN   0.03

Enumerations

enum  mapDragMode_t { MODE_NULL , MODE_SHIFT2DMAP , MODE_SHIFT3DMAP , MODE_ZOOMMAP }
 Status of the node. More...

Functions

static void UI_GeoscapeNodeZoomIn (uiNode_t *node, const uiCallContext_t *context)
static void UI_GeoscapeNodeZoomOut (uiNode_t *node, const uiCallContext_t *context)
static void UI_GeoscapeNodeZoom_f (void)
 Command binding for map zooming.
static void UI_GeoscapeNodeScroll_f (void)
 Command binding for map scrolling.
void UI_RegisterGeoscapeNode (uiBehaviour_t *behaviour)

Variables

static int oldMousePosX = 0
static int oldMousePosY = 0
static mapDragMode_t mode = MODE_NULL
static const float ROTATE_SPEED = 0.5f
static const float GLOBE_ROTATE = -90.0f
static const float SMOOTHING_STEP_2D = 0.02f
static const float SMOOTHACCELERATION = 0.06f
static cvar_tcl_3dmap
static cvar_tcl_3dmapAmbient
static cvar_tcl_mapzoommax
static cvar_tcl_mapzoommin
static uiNode_tgeoscapeNode
image_tr_dayandnightTexture
image_tr_radarTexture
image_tr_xviTexture

Macro Definition Documentation

◆ DAWN

#define DAWN   0.03

◆ EXTRADATA

#define EXTRADATA ( node)
Value:
#define EXTRADATA_TYPE
#define UI_EXTRADATA(NODE, TYPE)
Definition ui_nodes.h:185

Definition at line 43 of file ui_node_geoscape.cpp.

◆ EXTRADATA_TYPE

#define EXTRADATA_TYPE   mapExtraData_t

Definition at line 42 of file ui_node_geoscape.cpp.

◆ EXTRADATACONST

#define EXTRADATACONST ( node)
Value:
#define UI_EXTRADATACONST(NODE, TYPE)
Definition ui_nodes.h:187

Definition at line 44 of file ui_node_geoscape.cpp.

Enumeration Type Documentation

◆ mapDragMode_t

Status of the node.

Enumerator
MODE_NULL 

No interaction

MODE_SHIFT2DMAP 

Mouse captured to move the 2D geoscape

MODE_SHIFT3DMAP 

Mouse captured to move the 3D geoscape

MODE_ZOOMMAP 

Mouse captured to zoom on the geoscape

Definition at line 49 of file ui_node_geoscape.cpp.

Function Documentation

◆ UI_GeoscapeNodeScroll_f()

void UI_GeoscapeNodeScroll_f ( void )
static

Command binding for map scrolling.

Todo
convert into node method

Definition at line 611 of file ui_node_geoscape.cpp.

References Cmd_Argc(), Cmd_Argv(), Com_Printf(), geoscapeNode, i, PITCH, ROTATE_SPEED, UI_MAPEXTRADATA, UI_MAPEXTRADATACONST, VectorCopy, VectorLength(), VectorSubtract, and YAW.

Referenced by UI_RegisterGeoscapeNode().

◆ UI_GeoscapeNodeZoom_f()

void UI_GeoscapeNodeZoom_f ( void )
static

Command binding for map zooming.

Todo
convert into node method

Definition at line 561 of file ui_node_geoscape.cpp.

References Cmd_Argc(), Cmd_Argv(), Com_Printf(), geoscapeNode, UI_MAPEXTRADATA, UI_MAPEXTRADATACONST, and VectorCopy.

Referenced by UI_RegisterGeoscapeNode().

◆ UI_GeoscapeNodeZoomIn()

void UI_GeoscapeNodeZoomIn ( uiNode_t * node,
const uiCallContext_t * context )
static

◆ UI_GeoscapeNodeZoomOut()

void UI_GeoscapeNodeZoomOut ( uiNode_t * node,
const uiCallContext_t * context )
static

◆ UI_RegisterGeoscapeNode()

Variable Documentation

◆ cl_3dmap

cvar_t* cl_3dmap
static

3D geoscape or flat geoscape

Definition at line 78 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::draw(), and UI_RegisterGeoscapeNode().

◆ cl_3dmapAmbient

cvar_t* cl_3dmapAmbient
static

Definition at line 79 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::draw(), and UI_RegisterGeoscapeNode().

◆ cl_mapzoommax

cvar_t* cl_mapzoommax
static

Definition at line 80 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::draw(), and UI_RegisterGeoscapeNode().

◆ cl_mapzoommin

cvar_t* cl_mapzoommin
static

Definition at line 81 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::draw(), and UI_RegisterGeoscapeNode().

◆ geoscapeNode

uiNode_t* geoscapeNode
static

Definition at line 84 of file ui_node_geoscape.cpp.

◆ GLOBE_ROTATE

const float GLOBE_ROTATE = -90.0f
static

Definition at line 74 of file ui_node_geoscape.cpp.

◆ mode

Status of the node. It is related to a captured node (only one at a time), that why it is global.

Definition at line 72 of file ui_node_geoscape.cpp.

◆ oldMousePosX

int oldMousePosX = 0
static

Old X-location of the mouse, when the node is captured. It is related to a captured node (only one at a time), that why it is global.

Definition at line 60 of file ui_node_geoscape.cpp.

◆ oldMousePosY

int oldMousePosY = 0
static

Old y-location of the mouse, when the node is captured. It is related to a captured node (only one at a time), that why it is global.

Definition at line 66 of file ui_node_geoscape.cpp.

◆ r_dayandnightTexture

image_t* r_dayandnightTexture

this is the mask that is used to display day/night on (2d-)geoscape

Definition at line 87 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::calcAndUploadDayAndNightTexture(), uiGeoscapeNode::draw(), uiGeoscapeNode::onLoading(), and R_DrawFlatGeoscape().

◆ r_radarTexture

image_t* r_radarTexture

radar texture

Definition at line 89 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::draw(), uiGeoscapeNode::onLoading(), R_Draw3DGlobe(), and R_DrawFlatGeoscape().

◆ r_xviTexture

image_t* r_xviTexture

XVI alpha mask texture

Definition at line 90 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::draw(), uiGeoscapeNode::onLoading(), R_Draw3DGlobe(), and R_DrawFlatGeoscape().

◆ ROTATE_SPEED

const float ROTATE_SPEED = 0.5f
static

Definition at line 73 of file ui_node_geoscape.cpp.

◆ SMOOTHACCELERATION

const float SMOOTHACCELERATION = 0.06f
static

the acceleration to use during a smooth motion (This affects the speed of the smooth motion)

Definition at line 76 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::smoothRotate().

◆ SMOOTHING_STEP_2D

const float SMOOTHING_STEP_2D = 0.02f
static

Definition at line 75 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::smoothTranslate().