View lcov test coverage results on http://www.ufoot.org/liquidwar/v6/doc/coverage/src/lib/map/index.html.
sys_context: global system context
body: the body to initialize
w: the width
h: the height
d: the depth
noise_percent: the noise level to fill meta layers with
rules: the map rules
Sets up a default body structure.
Return value: none
sys_context: global system context
body: the structure to clear
Clears a body structure.
Return value: none.
sys_context: global system context
body: the structure to update
Updates (calculates) the checksum of a map body structure.
Return value: none.
sys_context: global system context
body: the structure to update
rules: the game rules
This (fundamental) function ensures that all playable areas in a map are connected. If isolated zones are found out, then they are marked as walls and not used any more.
Return value: none.
sys_context: global system context
level: the level to work on
body_x: the body (logical) x coord
body_y: the body (logical) y coord
texture_x: the texture x coord
texture_y: the texture y coord
Gets body (logical) coords from texture position.
Return value: 1 on success, 0 on failure (out of bounds)
sys_context: global system context
level: the level to work on
texture_x: the texture x coord
texture_y: the texture y coord
z: the z position (depth related)
Tells wether a given map position is free or not, but using texture coords.
Return value: 1 if position is playable, 0 if not (wall)
sys_context: global system context
color: the color to invert
Inverts a color couple, that is, replace fg by bg and vice-versa.
Return value: none.
sys_context: global system context
color1: 1st color to compare
color2: 2nd color to compare
Compares two colors.
Return value: 1 if equal, 0 if not.
sys_context: global system context
index: index of the color between 0 & 9
Transforms a team color index into its readable string form, which can be used in config files for instance.
Return value: a string, must *not* be freed.
sys_context: global system context
key: key of the color, for instance "red"
The index of the color, between 0 & 9
Return value: an integer.
sys_context: global system context
index: index of the color between 0 & 9
Transforms a team color index into its readable string form, which can be used to display information to players.
Return value: a string, must *not* be freed.
rules: set of rules to use
shape: shape of the map
x: x coord (in/out param)
y: y coord (in/out param)
Fixes the x and y values so that it’s always inside the map. This function will read the rules and if there’s some polarity enable, will do the right thing, for instance, a fighter too much on the right might reapper on the left side of the map.
Return value: none.
rules: set of rules to use
shape: shape of the map
z: z coord (in/out param)
Fixes the z value so that it’s always inside the map. This function will read the rules and if there’s some polarity enable, will do the right thing, for instance, a fighter too low it might reapper on top.
Return value: none.
sys_context: global system context
cursor_texture: the cursor texture to clear
Clears a cursor texture (set it all transparent).
Return value: none
sys_context: global system context
cursor_texture: the cursor texture to clear
Sets a cursor texture to the builtin defauts, that is a circle that is black on the outside and gets white/transparent in the middle.
Return value: none
sys_context: global system context
cursor_texture_layer: the cursor texture_layer to change
x: x coord
y: y coord
color: the color
Sets a pixel in the cursor texture_layer.
Return value: none
sys_context: global system context
cursor_texture_layer: the cursor texture_layer to query
x: x coord
y: y coord
Gets a pixel in the cursor texture_layer.
Return value: the color
sys_context: global system context
source: the map to copy
progress: to show advancement
Performs a deep copy of the map, all elements are newly allocated and source can safely be destroyed after it’s been duplicated.
Return value: a newly allocated map, may be NULL.
sys_context: global system context
exp: the player experience
Gets the highest color available for a given exp.
Return value: a color id
sys_context: global system context
exp: the player experience
Gets the highest weapon available for a given exp.
Return value: a weapon id
sys_context: global system context
rules: set of rules to use
team_color_id: color id to test
Tests wether a team color is allowed for a given set of rules.
Return value: 1 if allowed, 0 if not.
sys_context: global system context
rules: set of rules to use
weapon_id: weapon id to test
Tests wether a weapon is allowed for a given set of rules.
Return value: 1 if allowed, 0 if not.
sys_context: global system context
exp: exp to test
Get the unlocked team color for a given exp, if applyable.
Return value: -1 if nothing unlocked, else the team color
sys_context: global system context
exp: exp to test
Get the unlocked primary weapon for a given exp, if applyable.
Return value: -1 if nothing unlocked, else the weapon id
sys_context: global system context
Converts a map to something that is later readable by lw6map_from_hexa
to reproduce the exact same map. Just a serializer.
Return value: a newly allocated pointer, NULL if conversion failed.
sys_context: global system context
hexa: an hexadecimal ASCII string, created by lw6map_to_hexa
Constructs a map from an hexadecimal string generated
by lw6map_to_hexa
. Just an un-serializer.
Return value: a new map, might be NULL if string isn’t correct.
sys_context: global system context
layer: the layer to init
w: width
h: height
Creates a default layer. This is mostly for testing purposes, the default layer is not empty, it contains a simplified map of the world.
Return value: none
sys_context: global system context
layer: the layer to init
Clears a layer struct. This means freeing the pointer if it’s non NULL and setting everything to 0.
Return value: none
sys_context: global system context
Creates a new empty map. This object is perfectly unusable as is, since it has a 0x0 size, and many things set to "NULL". Still, it’s used internally and is the canonical way to create the object, it ensures later calls that set up default parameters, for instance, will succeed.
Return value: a newly allocated pointer.
sys_context: global system context
Creates a map, set to defaults. This is usefull mostly for testing. This builtin map has walls, paths, it’s playable.
Return value: a newly allocated map.
sys_context: global system context
percent_factor: how big the map should be, 100 is defaults 200 is double.
Creates a map, set to defaults. This is usefull mostly for testing. This builtin map has walls, paths, it’s playable, additionnally it’s scalable, that’s to say one can make it bigger if needed, using a percent factor.
Return value: a newly allocated map.
sys_context: global system context
w: the width of the map
h: the height of the map
d: the depth (number of layers) of the map
noise_percent: percentage of noise to use for metalayers
Creates a map, set to defaults. This is usefull mostly for testing.
This one, unlike lw6map_builtin_defaults
will let you give a width,
height and a depth.
Return value: a newly allocated map.
sys_context: global system context
Frees a map and releases all its internal ressources.
Return value: none.
sys_context: global system context
Reports how many bytes the map needs, in memory. Note that this is not contiguous memory, it involves a bunch of pointers, and possibly much more...
sys_context: global system context
Returns a string describing the map. This is a very short description, use it for logs, and to debug stuff. By no means it’s a complete exhaustive description. Still, the string returned should be unique.
Return value: a dynamically allocated string.
sys_context: global system context
level_a: the first level to compare
level_b: the other level to compare
Compares two level structs, the idea is to compare the content, not only the pointers and level ids.
Return value: 1 if they’re the same, 0 if not.
sys_context: global system context
level: level to get informations about
Gives the map name. This is just a simple utility/wrapper function which is meant to be exported to Guile scripts.
Return value: static string, must not be freed, can’t be NULL
level: level to get informations about
Gives the max number of colors (AKA teams) that can fit on this map. This is just a simple utility/wrapper function which is meant to be exported to Guile scripts.
Return value: number of colors, taken from rules
sys_context: global system context
level: level to get informations about
Gives the max number of cursors that can fit on this map. This is just a simple utility/wrapper function which is meant to be exported to Guile scripts.
Return value: number of cursors, taken from rules
sys_context: global system context
level: level to get informations about
Gives the max number of nodes that can fit on this map. This is just a simple utility/wrapper function which is meant to be exported to Guile scripts.
Return value: number of nodes, taken from rules
sys_context: global system context
local_info: the structure to modify
music_dir: the new music_dir value
Sets the music_dir value, in a ’safe’ manner, freeing any previous value and performing a string duplication.
Return value: 1 on success, 0 on failure.
sys_context: global system context
local_info: the structure to clear
Clears the local_info structure, before destroying a level for instance.
Return value: none
sys_context: global system context
metadata: struct to set to defaults
Sets the metadata struct to defaults, this does not set fields to NULL/empty values, but rather fills it with data claiming, for instance, that this is a default map.
Return value: none.
sys_context: global system context
metadata: struct to clear
Clears a metadata, will expect it to be in a consistent state, that is either filled with proper values or completely zeroed.
Return value: none.
sys_context: global system context
metadata_a: first item to compare
metadata_b: second item to compare
Tells wether both metadata items contain the same values.
Return value: 1 if same, 0 if different.
sys_context: global system context
meta_layer: the meta_layer structure
x: x coord
y: y coord
value: the value to set at this place
Simple setter for the meta_layer struct.
Return value: none
sys_context: global system context
meta_layer: the meta_layer structure
x: x coord
y: y coord
Simple getter for the meta_layer struct.
Return value: the value at this place
sys_context: global system context
meta_layer: the meta_layer to clear
Clears a meta_layer struct. This means freeing the pointer if it’s non NULL and setting everything to 0.
Return value: none
sys_context: global system context
meta_layer: the object to init
w: width
h: height
analog: wether to use analog mode (0-255) or boolean (0-1)
noise_percent: the quantity of noise to initialise the layer with
seed: a pseudo-random seed to feed the pseudo-random generator
Builds a custom metalyer, suitable for tests or demo, letting the choice of its size and the noise to fill it with. If noise is 100 then metalayer is "full". If noise is 0, then meta layer is empty.
Return value: 1 if OK, 0 on failure.
sys_context: global system context
param: struct to initialize
Sets a param struct to zero, simply puts zero everywhere without checking what was here before
Return value: none.
sys_context: global system context
param: the param struct to modify
Sets a param structure to its default value, note that current structured must be zeroed or correctly initialized.
Return value: none
sys_context: global system context
param: the param struct to modify
Resets a param structure to nothing. Note that current structured must be zeroed or correctly initialized. The idea is just to free member pointers before calling free.
Return value: none
sys_context: global system context
dst: the destination param struct
src: the source param struct
Copies parameters. Both structures must be zeroed or correctly initialized.
Return value: none
sys_context: global system context
param: the param struct to modify
key: the name of the parameter to modify
value: the value of the parameter to modify
Sets an entry in a param struct. All values must be submitted as strings, internally, the function will call atoi to convert to integers if needed, for instance. It will also dispatch automatically between rules, style and teams.
Return value: 1 if parameter successfully set, 0 on error.
sys_context: global system context
param: the param struct to query
key: the name of the parameter to get
Gets an entry from a param struct. All values returned as strings, do not use this in performance bottlenecks, this is just to export values to scripts, for instance.
Return value: dynamically allocated string, NULL on error, might return a string containing 0 on bad keys.
sys_context: global system context
param_a: one struct to compare
param_b: another struct to compare
Compares the contents of two param structs.
Return value: 1 if they contain the same thing, 0 if not
sys_context: global system context
rules: struct to initialize
Sets a rules struct to zero, simply puts zero everywhere without checking what was here before
Return value: none.
sys_context: global system context
rules: struct to set to defaults
Set rules to default values, as these are all integers, you can call this on any rules object.
Return value: none.
sys_context: global system context
dst: destination (out param)
src: source (in param)
Copies the data from source to destination, simple wrapper on memcpy.
Return value: none.
sys_context: global system context
rules: rules struct to check
checksum: checksum to update (in/out param)
Updates a checksum with the rules data.
Return value: none.
sys_context: global system context
key: key to query
Get the default value for a given string key. Of course you could access the member, but this function internally does the conversion between readable string and actual struct offset.
Return value: integer.
sys_context: global system context
key: key to query
Get the min value for a given string key. Of course you could access the member, but this function internally does the conversion between readable string and actual struct offset.
Return value: integer.
sys_context: global system context
key: key to query
Get the min value for a given string key. Of course you could access the member, but this function internally does the conversion between readable string and actual struct offset.
Return value: integer.
sys_context: global system context
rules: struct to use
key: key to query
Get the value for a given string key, as an integer. Of course you could access the member, but this function internally does the conversion between readable string and actual struct offset.
Return value: integer.
sys_context: global system context
rules: struct to use
key: key to set
value: new integer value for key
Set the value for a given string key, as an integer. Of course you could access the member, but this function internally does the conversion between readable string and actual struct offset.
Return value: 1 on success, 0 on failure (eg key not found)
sys_context: global system context
rules: struct to use
key: key to query
Get the value for a given string key, as a boolean. Of course you could access the member, but this function internally does the conversion between readable string and actual struct offset.
Return value: boolean.
rules: struct to use
key: key to set
value: new boolean value for key
Set the value for a given string key, as a boolean. Of course you could access the member, but this function internally does the conversion between readable string and actual struct offset.
Return value: 1 on success, 0 on failure (eg key not found)
sys_context: global system context
rules: struct to init
Set rules to 0, this is not defaults, this is 0 (probably unusable as a real-world setting).
Return value: none.
sys_context: global system context
rules_a: first item to compare
rules_b: second item to compare
Compares two rules items. Will tell if they contain the same data.
Return value: 1 if same, 0 if different.
sys_context: global system context
rules: rules to check.
Check wether the rules are within the acceptable range.
Return value: 1 if same, 0 if different.
sys_context: global system context
style: struct to initialize
Sets a style struct to zero, simply puts zero everywhere without checking what was here before
Return value: none.
sys_context: global system context
style: struct to modify
Sets a style struct to defaults values, expects the object to be in a consistent style, that’s to say either containing real data or being zeroed.
Return value: none.
sys_context: global system context
style: struct to clear
Clears a style struct. This function won’t work on an unitialized structure, structure must be zeroed by some CALLOC or something, else automatic freeing of pointers will fail.
Return value: none.
sys_context: global system context
dst: destination
src: source
Copies style data from source to destination.
Like with clear, dst
must be either initialized or
totally zeroed, else function will fail (core dump)
Return value: none.
sys_context: global system context
style: style struct to modify (out param)
key: key to use
value: value to use
Sets a style entry, takes string values and will identify the struct offset and convert the value to whatever C type is needed.
Return value: 1 on success, 0 on failure (key not found)
sys_context: global system context
style: style struct to query
key: key to use
Get a style entry, takes a string key and will identify the struct offset. The return value is converted to string, typically the cannonical representation suitable to write in an XML config file.
Return value: dynamically allocated string.
sys_context: global system context
key: key to query
Get the default value for a style entry. This is quite a cost-expensive function given what it does, indeed it will convert anything to a string, and also perform key lookup to fetch the value.
Return value: dynamically allocated string.
sys_context: global system context
color_set_a: first item to compare
color_set_b: second item to compare
Compares two color sets, telling if they contain the same data.
Return value: 1 if same, 0 if different.
sys_context: global system context
style_a: first item to compare
style_b: second item to compare
Compares two style structures, telling if they contain the same data.
Return value: 1 if same, 0 if different.
sys_context: global system context
teams: data to initialize
Zeros the teams struct, this is not the same as setting to defaults.
Return value: none.
sys_context: global system context
teams: data to initialize
Set the teams struct to its defaults.
Return value: none.
sys_context: global system context
teams: data to initialize
Clears the teams struct, this is not the same as setting to defaults. This one supposes the struct has been properly initialized, at least zeroed before usage, it might contain pointers which should be freed.
Return value: none.
sys_context: global system context
dst: destination
src: source
Copies the contents of the teams struct. It’s a real duplicate, any string is reallocated.
Return value: none.
sys_context: global system context
teams: the teams to modify
key: the key to modify
value: the value to affect to the key, as a string
Sets one single parameter in a teams structure. Value must always be passed as a string, will be converted to the right type automatically when storing it in the structure.
Return value: 1 if success, 0 if failed. Note that while 0 really means there’s a problem, some affectations can fail and return 1, needs to be worked on.
sys_context: global system context
teams: the teams to modify
key: the key to modify
Gets one single parameter in a teams structure. Value is converted as a string.
Return value: dynamically allocated string, NULL on error.
sys_context: global system context
key: the key we want informations about.
Gets the default value for a given teams key.
Return value: dynamically allocated string, NULL on error.
sys_context: global system context
teams_a: one struct to compare
teams_b: another struct to compare
Compares the contents of two teams structs.
Return value: 1 if they contain the same thing, 0 if not
sys_context: global system context
mode: test mode (bitmask)
Registers all tests for the libmap module.
Return value: 1 if test is successfull, 0 on error.
sys_context: global system context
mode: test mode (bitmask)
Runs the map
module test suite, testing most (if not all...)
functions.
Return value: 1 if test is successfull, 0 on error.
sys_context: global system context
texture: texture to load (out param)
body: body to pick data from
color: colors to use
Will create a default bicolor texture from the body data, this is in case we don’t want to use the texture or there is none. Result is not beautifull but might be very comfortable to play.
Return value: 1 on success, 0 on failure.
sys_context: global system context
texture: data to clear
Clears a texture object, expects it to be in a consitent state, either filled with real data of zeroed.
Return value: none.
sys_context: global system context
level: map to work on
texture_x: texture x coordinate (out param)
texture_y: texture y coordinate (out param)
body_x: body x coordinate (in param)
body_y: body y coordinate (in param)
Translates from body coordinate space to texture coordinate space.
Return value: 1 on success, 0 if failure.
sys_context: global system context
level: map to use
body_x: x coordinate in body space
body_y: y coordinate in body space
Get the color of a given point in the texture, using the body coordinate space.
Return value: RGBA 8-bit color.
sys_context: global system context
texture: texture object to test
Finds out if the texture is fully opaque or not. If it has an alpha layer (typically, PNG file) but this one is filled at 100% everywhere, then it will consider opaque. This is a slow function but the result is cached in the has_alpha member, so as the function is called at map loading, use the cached value instead.
Return value: 1 if has used alpha layer, 0 if opaque.
sys_context: global system context
index: index of the weapon between 0 & 19
Transforms a team weapon index into its readable string form, which can be used in config files for instance.
Return value: a string, must *not* be freed.
sys_context: global system context
key: key of the weapon, for instance "red"
The index of the weapon, between 0 & 19
Return value: an integer.
sys_context: global system context
index: index of the weapon between 0 & 19
Transforms a team weapon index into its readable string form, which can be used to display information to players.
Return value: a string, must *not* be freed.
Logical layers for the map. This is the big collection of bytes arrays containing most of the information, anything loaded from images (JPEG, PNG) from disk and having some logical (and not pure eye candy) meaning.
Type: int
Definition: int lw6map_body_s::checksum
Checksum for this map body, we could recalculate it dynamically but it’s cached here for convenience and speed.
Type: lw6sys_whd_t
Definition: lw6sys_whd_t lw6map_body_s::shape
Shape of the map, all layers need to be compatible with this.
Type: lw6map_layer_t
Definition: lw6map_layer_t lw6map_body_s::layers[LW6MAP_MAX_BODY_DEPTH]
Layers, layer 0 is the top layer, the one stored in map.png, other layers are layerN.png. Not all layers are defined, just depends on body shape.
Type: lw6map_meta_layer_t
Definition: lw6map_meta_layer_t lw6map_body_s::glue
Informations stored in glue.png.
Type: lw6map_meta_layer_t
Definition: lw6map_meta_layer_t lw6map_body_s::boost
Informations stored in boost.png.
Type: lw6map_meta_layer_t
Definition: lw6map_meta_layer_t lw6map_body_s::danger
Informations stored in danger.png.
Type: lw6map_meta_layer_t
Definition: lw6map_meta_layer_t lw6map_body_s::medicine
Informations stored in medicine.png.
Type: lw6map_meta_layer_t
Definition: lw6map_meta_layer_t lw6map_body_s::one_way_north
Informations stored in one-way-north.png.
Type: lw6map_meta_layer_t
Definition: lw6map_meta_layer_t lw6map_body_s::one_way_east
Informations stored in one-way-east.png.
Type: lw6map_meta_layer_t
Definition: lw6map_meta_layer_t lw6map_body_s::one_way_south
Informations stored in one-way-south.png.
Type: lw6map_meta_layer_t
Definition: lw6map_meta_layer_t lw6map_body_s::one_way_west
Informations stored in one-way-west.png.
Bot information, contains the relevant generic parameters for a bot.
Type: int
Definition: int lw6map_bot_info_s::color
Team/color the bot is associated to.
Type: char *
Definition: char* lw6map_bot_info_s::ai
AI engine used by bot, the name of the backend to load.
This structure simply binds 2 colors together, one being foreground and the other background. There’s a good reason to bind those together, indeed foreground and background need to be different enough so that text written in fg over bg is readable, and they need to go together well.
Type: lw6sys_color_8_t
Definition: lw6sys_color_8_t lw6map_color_couple_s::fg
Foreground color.
Type: lw6sys_color_8_t
Definition: lw6sys_color_8_t lw6map_color_couple_s::bg
Background color.
Holds the complete color set for the game, including all color couples used for background, hud, menu, view, as well as team colors.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::color_base
Base color couple.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::color_alternate
Alternate color couple.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::background_color_root
Background color couple for root image.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::background_color_stuff
Background color couple for drawn stuff.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::hud_color_frame
Hud color couple for frames.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::hud_color_text
Hud color couple for text.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::menu_color_default
Menu default color couple.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::menu_color_selected
Menu color couple for selected items.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::menu_color_disabled
Menu color couple for disabled items.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::view_color_cursor
Map view color couple for cursor.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::view_color_map
Map view color couple for map.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_color_set_s::system_color
System color couple (log messages).
Type: lw6sys_color_8_t
Definition: lw6sys_color_8_t lw6map_color_set_s::team_color_dead
Color to use for dead fighters.
Type: lw6sys_color_8_t
Definition: lw6sys_color_8_t lw6map_color_set_s::team_colors[LW6MAP_NB_TEAM_COLORS]
Team colors.
Contains a cursor texture layer, this is basically a fixed (64x64) sized array of colors.
Type: lw6sys_color_8_t
Definition: lw6sys_color_8_t lw6map_cursor_texture_layer_s::data[LW6MAP_CURSOR_TEXTURE_SIZE][LW6MAP_CURSOR_TEXTURE_SIZE]
Color for each pixel.
A cursor texture. It’s divided between a texture that will be colorized depending on the map and another texture which will be colorized depending on the team playing the cursor.
Type: lw6map_cursor_texture_layer_t
Definition: lw6map_cursor_texture_layer_t lw6map_cursor_texture_s::fg_bg_layer
Layer to be colorized using foreground and background colors.
Type: lw6map_cursor_texture_layer_t
Definition: lw6map_cursor_texture_layer_t lw6map_cursor_texture_s::color_layer
Layer to be colorized using team colors.
A layer contains the actual data for a layer.
Type: lw6sys_whd_t
Definition: lw6sys_whd_t lw6map_layer_s::shape
Shape of the layer. Z should be 1, logically.
Type: u_int8_t *
Definition: u_int8_t* lw6map_layer_s::data
Raw (byte) data.
This structure contains everything about a level, once it’s loaded from disk. It’s immutable, it cannot be changed once it’s loaded, and does not have any algorithm aware struct, this is just plain raw data, file data transformed into C struct.
Type: u_int32_t
Definition: u_int32_t lw6map_level_s::id
The id of the object, this is non-zero and unique within one run session, incremented at each object creation.
Type: lw6map_metadata_t
Definition: lw6map_metadata_t lw6map_level_s::metadata
Metadata (title, copyright, description, ...)
Type: lw6map_local_info_t
Definition: lw6map_local_info_t lw6map_level_s::local_info
Informations that depend on the host loading the map.
Type: lw6map_body_t
Definition: lw6map_body_t lw6map_level_s::body
All layers (bytes array) forming the map.
Type: lw6map_texture_t
Definition: lw6map_texture_t lw6map_level_s::texture
Texture used by the map.
Type: lw6map_cursor_texture_t
Definition: lw6map_cursor_texture_t lw6map_level_s::cursor_texture
Cursor texture.
Type: lw6map_param_t
Definition: lw6map_param_t lw6map_level_s::param
All map parameters.
Local info is for fields which can be exploited locally, but make no sense if transfered to another computer, over the network for instance. This is typically something which will be updated by the ldr module or some other external code, but it’s not directly linked to the content of the map itself.
Type: char *
Definition: char* lw6map_local_info_s::music_dir
Directory where music files can be loaded.
Content of metadata.xml stored into a C struct.
Type: char *
Definition: char* lw6map_metadata_s::title
Title of the map.
Type: char *
Definition: char* lw6map_metadata_s::author
Author of the map.
Type: char *
Definition: char* lw6map_metadata_s::description
Description of the map.
Type: char *
Definition: char* lw6map_metadata_s::license
License of the map (short, like GPLv2+ or GPLv3+).
Type: int
Definition: int lw6map_metadata_s::vanilla_exp
Exp as stored in the XML file of the map.
A meta layer is a special layer which contains, for instance, informations such as where there’s a special trick like glue.
Type: lw6sys_whd_t
Definition: lw6sys_whd_t lw6map_meta_layer_s::shape
Shape of the metalayer.
Type: u_int8_t *
Definition: u_int8_t* lw6map_meta_layer_s::data
Raw (byte) data.
All parameters in a map, indludes rules, style and teams.
Type: lw6map_rules_t
Definition: lw6map_rules_t lw6map_param_s::rules
Content of rules.xml.
Type: lw6map_style_t
Definition: lw6map_style_t lw6map_param_s::style
Content of style.xml.
Type: lw6map_teams_t
Definition: lw6map_teams_t lw6map_param_s::teams
Content of teams.xml.
Content of rules.xml stored into a C struct. This structure is used a lot, it needs to be like this for we don’t want to parse (even a hash) each time we want a param so we need it in a real C struct. In this structure, it’s important, fundamental, that floats are never ever used in map rules. In fact, we need maps to be 100,00 (lots of zeroes) predictable, given some identical user actions. Using floats could lead us to very slight differences (floats are never accurate, especially when you run calculus on different hardwares) which could, with time, become very important. Sort of a "butterfly effect". So well, we use int. Int32 to be exact.
Type: int32_t
Definition: int32_t lw6map_rules_s::total_time
total_time parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::respawn_team
respawn_team parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::respawn_position_mode
respawn_position_mode parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::respawn_delay
respawn_delay parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::moves_per_round
moves_per_round parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::spreads_per_round
spreads_per_round parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::rounds_per_sec
rounds_per_sec parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::fighter_attack
fighter_attack parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::fighter_defense
fighter_defense parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::fighter_new_health
fighter_new_health parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::fighter_regenerate
fighter_regenerate parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::side_attack_factor
side_attack_factor parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::side_defense_factor
side_defense_factor parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::nb_move_tries
nb_move_tries parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::nb_attack_tries
nb_attack_tries parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::nb_defense_tries
nb_defense_tries parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::vertical_move
vertical_move parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::spread_mode
spread_mode parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::single_army_size
single_army_size parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::total_armies_size
total_armies_size parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::max_nb_teams
max_nb_teams parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::max_nb_cursors
max_nb_cursors parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::max_nb_nodes
max_nb_nodes parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::exp
exp parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::highest_team_color_allowed
highest_team_color_allowed parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::highest_weapon_allowed
highest_weapon_allowed parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::x_polarity
x_polarity parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::y_polarity
y_polarity parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::z_polarity
z_polarity parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::max_zone_size
max_zone_size parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::round_delta
round_delta parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::max_round_delta
max_round_delta parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::max_cursor_pot
max_cursor_pot parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::cursor_pot_init
cursor_pot_init parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::max_cursor_pot_offset
max_cursor_pot_offset parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::start_x[LW6MAP_MAX_NB_TEAMS]
start_x parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::start_y[LW6MAP_MAX_NB_TEAMS]
start_y parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::start_position_mode
start_position_mode parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::color_conflict_mode
color_conflict_mode parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::spread_thread
spread_thread parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::glue_power
glue_power parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::boost_power
boost_power parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::danger_power
danger_power parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::medicine_power
medicine_power parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::frags_mode
frags_mode parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::frags_to_distribute
frags_to_distribute parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::frags_fade_out
frags_fade_out parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::use_team_profiles
use_team_profiles parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::team_profile_aggressive[LW6MAP_MAX_NB_TEAMS]
team_profile_aggressive parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::team_profile_vulnerable[LW6MAP_MAX_NB_TEAMS]
team_profile_vulnerable parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::team_profile_mobile[LW6MAP_MAX_NB_TEAMS]
team_profile_mobile parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::team_profile_fast[LW6MAP_MAX_NB_TEAMS]
team_profile_fast parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::team_profile_handicap[LW6MAP_MAX_NB_TEAMS]
team_profile_handicap parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::team_profile_weapon_id[LW6MAP_MAX_NB_TEAMS]
team_profile_weapon_id parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::team_profile_weapon_alternate_id[LW6MAP_MAX_NB_TEAMS]
team_profile_weapon_alternate_id parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::team_profile_weapon_mode[LW6MAP_MAX_NB_TEAMS]
team_profile_weapon_mode parameters, stored as a per team integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::weapon_duration
weapon_duration parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::weapon_charge_delay
weapon_charge_delay parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::weapon_charge_max
weapon_charge_max parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::weapon_tune_berzerk_power
weapon_tune_berzerk_power parameter, stored as an integer.
Type: int32_t
Definition: int32_t lw6map_rules_s::weapon_tune_turbo_power
weapon_tune_turbo_power parameter, stored as an integer.
Content of style.xml stored into a C struct.
Type: int
Definition: int lw6map_style_s::keep_ratio
Boolean, wether to keep the map ratio or not.
Type: float
Definition: float lw6map_style_s::zoom
Default zoom.
Type: float
Definition: float lw6map_style_s::zoom_min
Min zoom.
Type: float
Definition: float lw6map_style_s::zoom_max
Max zoom.
Type: int
Definition: int lw6map_style_s::x_wrap
Wether to wrap on X axis.
Type: int
Definition: int lw6map_style_s::y_wrap
Wether to wrap on Y axis.
Type: char *
Definition: char* lw6map_style_s::background_style
Background style to use (for instance, bubbles).
Type: char *
Definition: char* lw6map_style_s::hud_style
Hud style to use (for instance, floating).
Type: char *
Definition: char* lw6map_style_s::menu_style
Menu style to use (for instance, cylinder).
Type: char *
Definition: char* lw6map_style_s::view_style
View style to use (for instance, flat).
Type: float
Definition: float lw6map_style_s::animation_density
How dense animations should be (many or few sprites).
Type: float
Definition: float lw6map_style_s::animation_speed
How fast animations should be (sprites speed).
Type: float
Definition: float lw6map_style_s::cursor_size
Cursor size.
Type: int
Definition: int lw6map_style_s::colorize_cursor
Wether to colorize cursors or not.
Type: int
Definition: int lw6map_style_s::blink_cursor
Wether to make cursors blink or not.
Type: float
Definition: float lw6map_style_s::hidden_layer_alpha
Alpha value used to represent fighters hidden behind a layer.
Type: int
Definition: int lw6map_style_s::colorize
Wether to use colorization or not.
Type: int
Definition: int lw6map_style_s::pixelize
Wether to pixelize the map and fighters or not.
Type: lw6map_color_set_t
Definition: lw6map_color_set_t lw6map_style_s::color_set
All colors used by the game.
Type: char *
Definition: char* lw6map_style_s::music_file
Music file to play.
Type: char *
Definition: char* lw6map_style_s::music_filter
Music files to keep.
Type: char *
Definition: char* lw6map_style_s::music_exclude
Music files to exclude.
Type: int
Definition: int lw6map_style_s::waves
Wether to turn on the wave effect or not.
Content of teams.xml stored into a C struct.
Type: int
Definition: int lw6map_teams_s::player_color[LW6MAP_TEAMS_NB_PLAYERS]
Players colors.
Type: int
Definition: int lw6map_teams_s::nb_bots
Number of bots.
Type: float
Definition: float lw6map_teams_s::bot_speed
Bots speed.
Type: int
Definition: int lw6map_teams_s::bot_iq
Bots IQ (how strong they are)
Type: lw6map_bot_info_t
Definition: lw6map_bot_info_t lw6map_teams_s::bot[LW6MAP_TEAMS_MAX_NB_BOTS]
Per-bot parameters, including their color and the ai engine they use.
Texture information, this is a bit different from a layer, since this is RGBA data, plus some meta-informations such as guessed colors.
Type: int
Definition: int lw6map_texture_s::w
Texture width.
Type: int
Definition: int lw6map_texture_s::h
Texture height.
Type: int
Definition: int lw6map_texture_s::has_alpha
True if texture has an alpha channel. If it has an alpha channel on disk (for instance, it’s a PNG) and if in practice it has nothing else than full opaque 255 alpha values, then this will be set to 0 anyway, the idea is to detect textures that really need the engine to handle transparency.
Type: lw6sys_color_8_t *
Definition: lw6sys_color_8_t* lw6map_texture_s::data
Color for each pixel.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_texture_s::guessed_color_base
Base guessed color couple. This is typically the best or more representative color couple (fg and bg) the program was able to automatically extract from the map.
Type: lw6map_color_couple_t
Definition: lw6map_color_couple_t lw6map_texture_s::guessed_color_alternate
An alternate color couple which still comes from the map but is a bit different from the base one.