Freeciv-3.3
|
#include <stddef.h>
Go to the source code of this file.
Enumerations | |
enum | attr_object_type_start_keys { ATTR_UNIT_START = 0 * 100 * 1000 * 1000 , ATTR_CITY_START = 1 * 100 * 1000 * 1000 , ATTR_PLAYER_START = 2 * 100 * 1000 * 1000 , ATTR_TILE_START = 3 * 100 * 1000 * 1000 } |
enum | attr_unit { ATTR_UNIT_DUMMY = ATTR_UNIT_START } |
enum | attr_city { ATTR_CITY_CMA_PARAMETER = ATTR_CITY_START , ATTR_CITY_CMAFE_PARAMETER } |
enum | attr_player { ATTR_PLAYER_DUMMY = ATTR_PLAYER_START } |
enum | attr_tile { ATTR_TILE_DUMMY = ATTR_TILE_START } |
Enumerator | |
---|---|
ATTR_CITY_CMA_PARAMETER | |
ATTR_CITY_CMAFE_PARAMETER |
Definition at line 37 of file attribute.h.
Enumerator | |
---|---|
ATTR_UNIT_START | |
ATTR_CITY_START | |
ATTR_PLAYER_START | |
ATTR_TILE_START |
Definition at line 26 of file attribute.h.
Enumerator | |
---|---|
ATTR_PLAYER_DUMMY |
Definition at line 42 of file attribute.h.
Enumerator | |
---|---|
ATTR_TILE_DUMMY |
Definition at line 46 of file attribute.h.
Enumerator | |
---|---|
ATTR_UNIT_DUMMY |
Definition at line 33 of file attribute.h.
Get city related attribute
Definition at line 498 of file attribute.c.
Referenced by attr_city_get_int(), and cma_get_parameter().
Get city related integer attribute
Definition at line 515 of file attribute.c.
Set city related attribute
Definition at line 489 of file attribute.c.
Referenced by attr_city_set_int(), city_remove(), cma_set_parameter(), and release_city().
Set city related integer attribute
Definition at line 507 of file attribute.c.
size_t attr_player_get | ( | enum attr_player | what, |
int | player_id, | ||
size_t | max_data_length, | ||
void * | data | ||
) |
Get player related attribute
Definition at line 532 of file attribute.c.
void attr_player_set | ( | enum attr_player | what, |
int | player_id, | ||
size_t | data_length, | ||
const void *const | data | ||
) |
Set player related attribute
Definition at line 523 of file attribute.c.
Get tile related attribute
Definition at line 550 of file attribute.c.
void attr_tile_set | ( | enum attr_tile | what, |
int | x, | ||
int | y, | ||
size_t | data_length, | ||
const void *const | data | ||
) |
Set tile related attribute
Definition at line 541 of file attribute.c.
Get unit related attribute
Definition at line 464 of file attribute.c.
Referenced by attr_unit_get_int().
Get unit related integer attribute
Definition at line 481 of file attribute.c.
Set unit related attribute
Definition at line 455 of file attribute.c.
Referenced by attr_unit_set_int().
Set unit related integer attribute
Definition at line 473 of file attribute.c.
Send current state to the server. Note that the current implementation will send all attributes to the server.
Definition at line 333 of file attribute.c.
Referenced by client_exit(), disconnect_from_server(), send_save_game(), and send_turn_done().
Frees the attribute module.
Definition at line 123 of file attribute.c.
Referenced by client_game_free(), and client_game_reset().
Low-level function to get an attribute. If data hasn't enough space to hold the attribute data isn't set to the attribute. Returns the actual size of the attribute. Can be zero if the attribute is unset. To get the size of an attribute use size = attribute_get(key, id, x, y, 0, NULL)
Definition at line 422 of file attribute.c.
Referenced by attr_city_get(), attr_player_get(), attr_tile_get(), and attr_unit_get().
Initializes the attribute module.
Definition at line 114 of file attribute.c.
Referenced by client_game_init(), and client_game_reset().
Recreate the attribute set from the player's attribute_block. Shouldn't be used by normal code.
Definition at line 361 of file attribute.c.
Referenced by handle_player_attribute_chunk().
Low-level function to set an attribute. If data_length is zero the attribute is removed.
Definition at line 390 of file attribute.c.
Referenced by attr_city_set(), attr_player_set(), attr_tile_set(), and attr_unit_set().