UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ui_node_geoscape.cpp File Reference

Go to the source code of this file.

Macros

#define EXTRADATA_TYPE   mapExtraData_t
 
#define EXTRADATA(node)   UI_EXTRADATA(node, EXTRADATA_TYPE)
 
#define EXTRADATACONST(node)   UI_EXTRADATACONST(node, EXTRADATA_TYPE)
 
#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. More...
 
static void UI_GeoscapeNodeScroll_f (void)
 Command binding for map scrolling. More...
 
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

#define DAWN   0.03
#define EXTRADATA (   node)    UI_EXTRADATA(node, EXTRADATA_TYPE)

Definition at line 42 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::onLoading().

#define EXTRADATA_TYPE   mapExtraData_t

Definition at line 41 of file ui_node_geoscape.cpp.

Referenced by UI_RegisterGeoscapeNode().

#define EXTRADATACONST (   node)    UI_EXTRADATACONST(node, EXTRADATA_TYPE)

Definition at line 43 of file ui_node_geoscape.cpp.

Enumeration Type Documentation

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 48 of file ui_node_geoscape.cpp.

Function Documentation

static 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().

static 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().

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

Variable Documentation

cvar_t* cl_3dmap
static

3D geoscape or flat geoscape

Definition at line 77 of file ui_node_geoscape.cpp.

cvar_t* cl_3dmapAmbient
static

Definition at line 78 of file ui_node_geoscape.cpp.

cvar_t* cl_mapzoommax
static

Definition at line 79 of file ui_node_geoscape.cpp.

cvar_t* cl_mapzoommin
static

Definition at line 80 of file ui_node_geoscape.cpp.

uiNode_t* geoscapeNode
static

Definition at line 83 of file ui_node_geoscape.cpp.

Referenced by UI_GeoscapeNodeScroll_f(), and UI_GeoscapeNodeZoom_f().

const float GLOBE_ROTATE = -90.0f
static

Definition at line 73 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::onLoading().

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

Definition at line 71 of file ui_node_geoscape.cpp.

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 59 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::onCapturedMouseMove(), uiGeoscapeNode::onStartDragging(), and uiGeoscapeNode::startMouseShifting().

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 65 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::onCapturedMouseMove(), uiGeoscapeNode::onStartDragging(), and uiGeoscapeNode::startMouseShifting().

image_t* r_dayandnightTexture

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

Definition at line 86 of file ui_node_geoscape.cpp.

image_t* r_radarTexture

radar texture

Definition at line 88 of file ui_node_geoscape.cpp.

Referenced by R_Draw3DGlobe().

image_t* r_xviTexture

XVI alpha mask texture

Definition at line 89 of file ui_node_geoscape.cpp.

Referenced by R_Draw3DGlobe().

const float ROTATE_SPEED = 0.5f
static
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 75 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::smoothRotate().

const float SMOOTHING_STEP_2D = 0.02f
static

Definition at line 74 of file ui_node_geoscape.cpp.

Referenced by uiGeoscapeNode::smoothTranslate().