Freeciv-3.2
Loading...
Searching...
No Matches
Functions
unitselect_common.c File Reference
#include "fc_types.h"
#include "game.h"
#include "player.h"
#include "unit.h"
#include "unitlist.h"
#include "unittype.h"
#include "client_main.h"
#include "control.h"
#include "unitselect_common.h"

Go to the source code of this file.

Functions

static void usdlg_data_add_unit (struct usdata_hash *ushash, const struct tile *ptile, struct unit *punit)
 
static bool usdlg_check_unit_activity (const struct unit *punit, enum unit_activity act)
 
static bool usdlg_check_unit_location (const struct unit *punit, const struct tile *ptile, enum unit_select_location_mode loc)
 
static struct usdatausdata_new (void)
 
static void usdata_destroy (struct usdata *data)
 
struct usdata_hashusdlg_data_new (const struct tile *ptile)
 
void usdlg_data_destroy (struct usdata_hash *ushash)
 

Function Documentation

◆ usdata_destroy()

static void usdata_destroy ( struct usdata data)
static

Destroy a unit selection struct.

Definition at line 72 of file unitselect_common.c.

Referenced by usdlg_data_destroy().

◆ usdata_new()

static struct usdata * usdata_new ( void  )
static

Create a unit selection data struct.

Definition at line 48 of file unitselect_common.c.

Referenced by usdlg_data_add_unit(), and usdlg_data_new().

◆ usdlg_check_unit_activity()

static bool usdlg_check_unit_activity ( const struct unit punit,
enum unit_activity  act 
)
static

Returns TRUE if the unit activity is equal to 'act'.

Definition at line 186 of file unitselect_common.c.

Referenced by usdlg_data_add_unit().

◆ usdlg_check_unit_location()

static bool usdlg_check_unit_location ( const struct unit punit,
const struct tile ptile,
enum unit_select_location_mode  loc 
)
static

Returns TRUE if the unit locations corresponds to 'loc'.

Definition at line 197 of file unitselect_common.c.

Referenced by usdlg_data_add_unit().

◆ usdlg_data_add_unit()

static void usdlg_data_add_unit ( struct usdata_hash ushash,
const struct tile ptile,
struct unit punit 
)
static

Add a unit into the unit selection data hash.

Definition at line 149 of file unitselect_common.c.

Referenced by usdlg_data_new().

◆ usdlg_data_destroy()

void usdlg_data_destroy ( struct usdata_hash ushash)

Destroy a unit selection data set.

Definition at line 138 of file unitselect_common.c.

Referenced by usdlg_cmd_exec(), and usdlg_refresh().

◆ usdlg_data_new()

struct usdata_hash * usdlg_data_new ( const struct tile ptile)

Create a unit selection data set.

Definition at line 94 of file unitselect_common.c.

Referenced by usdlg_cmd_exec(), and usdlg_refresh().