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

Singleplayer campaign game type code. More...

#include "../../cl_shared.h"
#include "../cl_game.h"
#include "cp_cgame_callbacks.h"
#include "cl_game_campaign.h"

Go to the source code of this file.

Functions

void GEO_Draw (geoscapeData_t *data)
 Draw the geoscape. More...
 
void GEO_DrawMarkers (const uiNode_t *node)
 Draws all ufos, aircraft, bases and so on to the geoscape map (2D and 3D) More...
 
bool GEO_Click (const uiNode_t *node, int x, int y, const vec2_t pos)
 Click on the map/geoscape. More...
 
CGAME_HARD_LINKED_FUNCTIONS
linkedList_t
LIST_Add (linkedList_t **listDest, void const *data, size_t length)
 
void FS_CloseFile (qFILE *f)
 
void LIST_Sort (linkedList_t **list, linkedListSort_t sorter, const void *userData)
 
linkedList_tLIST_CopyStructure (linkedList_t *src)
 
void_Mem_Alloc (size_t size, bool zeroFill, memPool_t *pool, const int tagNum, const char *fileName, const int fileLine)
 
int Com_GetMapDefNumber (void)
 
mapDef_tCom_GetMapDefByIDX (int index)
 
const cgame_export_tGetCGameAPI (const cgame_import_t *import)
 

Detailed Description

Singleplayer campaign game type code.

Definition in file cl_game_campaign.cpp.

Function Documentation

void* _Mem_Alloc ( size_t  size,
bool  zeroFill,
memPool_t pool,
const int  tagNum,
const char *  fileName,
const int  fileLine 
)

Definition at line 56 of file cl_game_campaign.cpp.

Referenced by GAME_GetImportData(), and SV_TagAlloc().

mapDef_t* Com_GetMapDefByIDX ( int  index)

Definition at line 64 of file cl_game_campaign.cpp.

Referenced by GAME_GetCurrentSelectedMap(), and UI_MapInfoGetNext().

int Com_GetMapDefNumber ( void  )

Definition at line 60 of file cl_game_campaign.cpp.

bool GEO_Click ( const uiNode_t node,
int  x,
int  y,
const vec2_t  pos 
)

Click on the map/geoscape.

Parameters
[in]nodeUI Node of the geoscape map
[in]x,yMouse click coordinates
[in]posGeoscape (longitude, latitude) coordinate of the click
Returns
True if the event is used for something
Todo:
make this a function in cp_base.c - B_BuildBaseAtPos

Definition at line 106 of file cp_geoscape.cpp.

Referenced by GetCGameAPI().

void GEO_Draw ( geoscapeData_t data)

Draw the geoscape.

Parameters
[in]dataGeoscape status data structure

Definition at line 1588 of file cp_geoscape.cpp.

Referenced by GetCGameAPI().

void GEO_DrawMarkers ( const uiNode_t node)

Draws all ufos, aircraft, bases and so on to the geoscape map (2D and 3D)

Parameters
[in]nodeThe menu node which will be used for drawing markers.
Note
This is a drawing function only, called each time a frame is drawn. Therefore you should not use this function to calculate eg. the distance between 2 items on the geoscape (you should instead calculate it just after one of the items moved – distance is not going to change when you rotate the earth around itself and the time is stopped eg.).
See also
GEO_Draw
Todo:
we should only show healthbar if aircraft is fighting but it's a slow algo

Definition at line 1431 of file cp_geoscape.cpp.

Referenced by GetCGameAPI().

const cgame_export_t* GetCGameAPI ( const cgame_import_t import)

Definition at line 69 of file cl_game_campaign.cpp.

Referenced by GAME_GetCGameAPI().

linkedList_t* LIST_CopyStructure ( linkedList_t src)

Definition at line 52 of file cl_game_campaign.cpp.

Referenced by GAME_GetImportData(), and TEST_F().

void LIST_Sort ( linkedList_t **  list,
linkedListSort_t  sorter,
const void userData 
)

Definition at line 48 of file cl_game_campaign.cpp.

Referenced by GAME_GetImportData(), and TEST_F().