Next: , Previous: , Up: C API   [Contents][Index]


5.30 libldr

5.30.1 Overview

View lcov test coverage results on http://www.ufoot.org/liquidwar/v6/doc/coverage/src/lib/ldr/index.html.

5.30.2 API

Function: int lw6ldr_body_read (lw6sys_context_t * sys_context, lw6map_body_t * body, const char * dirname, lw6map_param_t * param, const lw6ldr_hints_t * hints, int display_w, int display_h, float ratio, int bench_value, int magic_number, lw6sys_progress_t * progress)

sys_context: global system context

body: the body to read, must point to allocated memory

dirname: the directory of the map

param: map parameters

hints: map hints

display_w: the display width

display_h: the display height

ratio: wished map ratio

bench_value: the bench value (depends on computer capacity)

magic_number: arbitrary constant

progress: structure to transmit loading progress

Reads the map body, that is, all the layers.

Return value: 1 if OK, 0 if failed.

Function: void lw6ldr_auto_colors (lw6sys_context_t * sys_context, lw6map_style_t * style, const lw6ldr_hints_t * hints)

style: the style structure to process.

hints: additionnal hints to know what to set automatically

Deduces all colors from background color, if needed. The function will check color_auto parameters and replace all other colors by base and alternate colors if needed. Note that the background color itself is not changed by this function. Background can only be guessed from texture.

Return value: none.

Function: int lw6ldr_cursor_texture_read (lw6sys_context_t * sys_context, lw6map_cursor_texture_t * cursor_texture, const char * dirname)

sys_context: global system context

cursor_texture: the cursor texture (out param)

dirname: the directory we load the data form (map dir)

Reads the cursor texture information, if not available, will use defaults

Return value: 1 on success, 0 on failure.

Function: void lw6ldr_free_entry (lw6sys_context_t * sys_context, lw6ldr_entry_t * entry)

sys_context: global system context

entry: the entry to free

Frees a map entry.

Return value: none.

Function: lw6ldr_entry_t * lw6ldr_dup_entry (lw6sys_context_t * sys_context, const lw6ldr_entry_t * entry)

sys_context: global system context

entry: the entry to dup

Dup a map entry.

Return value: newly allocated object.

Function: lw6sys_list_t * lw6ldr_get_entries (lw6sys_context_t * sys_context, const char * map_path, const char * relative_path, const char * user_dir)

sys_context: global system context

map_path: the map_path environment config variable, delimited path list

relative_path: the relative path to use to find the map directory

user_dir: the user directory

Lists all maps in a given directory. Returns a list of lw6ldr_entry_t which can contain both directories with subdirs and actual maps. Maps are sorted before being returned, first directories, then maps, sorted in alphabetical order.

Return value: a list of dynamically allocated lw6ldr_entry_t.

Function: void lw6ldr_for_all_entries (lw6sys_context_t * sys_context, const char * map_path, const char * relative_path, const char * user_dir, int recursive, lw6sys_list_callback_func_t callback_func, void * func_data)

sys_context: global system context

map_path: the map_path environment config variable, delimited path list

relative_path: the relative path to use to find the map directory

user_dir: the user directory

recursive: if non-zero, map search will recurse in subdirs

callback_func: the function which will be called on each entry

func_data: an extra pointer to pass data to callback_func

Executes a given function on all maps in a given place, typically used in test programs.

Return value: none.

Function: lw6ldr_entry_t * lw6ldr_chain_entry (lw6sys_context_t * sys_context, const char * map_path, const char * relative_path, const char * user_dir)

sys_context: global system context

map_path: the map_path environment config variable, delimited path list

relative_path: the relative path to use to find the map directory

user_dir: the user directory

Gets the next entry used in test programs.

Return value: none.

Function: int lw6ldr_exp_validate (lw6sys_context_t * sys_context, const lw6map_level_t * level, const char * user_dir)

sys_context: global system context

level: the level to validate

user_dir: user directory

Validates a level, acknowledges you’ve won it. Upgrades exp.

Return value: 1 on success, 0 on failure.

Function: int lw6ldr_grease_apply (lw6sys_context_t * sys_context, lw6map_layer_t * layer, const lw6map_rules_t * rules, const lw6ldr_hints_t * hints, lw6sys_progress_t * progress)

sys_context: global system context

layer: the layer on which to apply the grease

rules: map rules

hints: map hints

progress: structure to transmit loading progress

Reads the map body, that is, all the layers.

Return value: 1 if OK, 0 if failed.

Function: void lw6ldr_hints_defaults (lw6sys_context_t * sys_context, lw6ldr_hints_t * hints)

sys_context: global system context

hints: data to initialize

Set the hints struct to its defaults.

Return value: none.

Function: void lw6ldr_hints_zero (lw6sys_context_t * sys_context, lw6ldr_hints_t * hints)

sys_context: global system context

hints: data to initialize

Zeros the hints struct, this is not the same as setting to defaults.

Return value: none.

Function: void lw6ldr_hints_clear (lw6sys_context_t * sys_context, lw6ldr_hints_t * hints)

sys_context: global system context

hints: data to initialize

Clears the hints struct, this is not the same as setting to defaults.

Return value: none.

Function: int lw6ldr_hints_read (lw6sys_context_t * sys_context, lw6ldr_hints_t * hints, const char * dirname)

sys_context: global system context

dirname: the directory of the map

Read the hints (hints.xml) of a map. Pointer to hints must be valid, and values already initialized, either zeroed or filled in with defaults or custom values.

Return value: 1 if success, 0 if failed.

Function: int lw6ldr_hints_set (lw6sys_context_t * sys_context, lw6ldr_hints_t * hints, const char * key, const char * value)

sys_context: global system context

hints: the hints to modify

key: the key to modify

value: the value to affect to the key, as a string

Sets one single parameter in a hints 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.

Function: char * lw6ldr_hints_get (lw6sys_context_t * sys_context, const lw6ldr_hints_t * hints, const char * key)

sys_context: global system context

hints: the hints to modify

key: the key to modify

Gets one single parameter in a hints structure. Value is converted as a string.

Return value: dynamically allocated string, NULL on error.

Function: char * lw6ldr_hints_get_default (lw6sys_context_t * sys_context, const char * key)

sys_context: global system context

key: the key we want informations about.

Gets the default value for a given hints key.

Return value: dynamically allocated string, NULL on error.

Function: int lw6ldr_hints_update (lw6sys_context_t * sys_context, lw6ldr_hints_t * hints, lw6sys_assoc_t * values)

sys_context: global system context

hints: the hints struct to fill with values (read/write parameter)

values: an assoc containing strings with the new values

Overrides hints with values. Pointer to hints must be valid, and values already initialized, either zeroed or filled in with defaults or custom values. Not all parameters need be defined in values. It can even be NULL. The idea is just that if something is defined in values, it will override the existing hints.

Return value: 1 if success, 0 if failed.

Function: int lw6ldr_layer_read_first (lw6sys_context_t * sys_context, lw6map_layer_t * layer, const char * filename, lw6map_param_t * param, const lw6ldr_hints_t * hints, int display_w, int display_h, float target_ratio, int bench_value, int magic_number, int expected_depth, lw6sys_progress_t * progress)

sys_context: global system context

layer: layer to update (out param)

filename: name of PNG file

param: parameters of the map

hints: hints of the map

display_w: width of display

display_h: height of display

target_ratio: width/height ratio we want

bench_value: bench for this computer

magic_number: arbitrary constant

expected_depth: depth of map according to files available

progress: progress object to provide feedback (in/out)

Reads the first layer, that is map.png. This function has many parameters since it will try and guess the final (real) resolution of the map.

Return value: 1 on success, 0 on failure.

Function: int lw6ldr_layer_read_next (lw6sys_context_t * sys_context, lw6map_layer_t * layer, const char * filename, int target_w, int target_h)

sys_context: global system context

layer: layer to update (out param)

filename: name of PNG file

target_w: width we want

target_h: height we want

Reads a layer, knowing the exact size we want. This is typically to load layer2-7.png once map.png has been loaded.

Return value: 1 on success, 0 on failure.

Function: int lw6ldr_metadata_read (lw6sys_context_t * sys_context, lw6map_metadata_t * metadata, const char * dirname)

sys_context: global system context

metadata: structure containting read data (out param)

dirname: map dirname (absolute path)

Reads the metadata, will first parse metadata.xml, and if not available read README and guess a title from map path. When function returns, all fields in structure are non-NULL.

Return value: 1 on success, 0 on failure.

Function: int lw6ldr_meta_layer_read (lw6sys_context_t * sys_context, lw6map_meta_layer_t * meta_layer, const char * filename, int target_w, int target_h, int analog)

sys_context: global system context

meta_layer: the meta layer to read

filename: the file to open

target_w: the wanted width

target_h: the wanted height

analog: wether to use analog info (0-255) or boolean (0-1)

Reads a meta-layer from the disj, resampling is done according to the given parameters.

Return value: 1 on success, 0 on failure

Function: int lw6ldr_meta_layer_read_if_exists (lw6sys_context_t * sys_context, lw6map_meta_layer_t * meta_layer, const char * dirname, const char * file_only, int target_w, int target_h, int analog)

sys_context: global system context

meta_layer: the meta layer to read

dirname: the map directory

file_only: the meta-layer file name only (without the path)

target_w: the wanted width

target_h: the wanted height

analog: wether to use analog info (0-255) or boolean (0-1)

Reads a meta-layer from the disj, resampling is done according to the given parameters. This function is different from lw6ldr_meta_layer_read for it will 1) concatenate dirname and file_only and 2) return OK (1) if file does not exist.

Return value: 1 on success, 0 on failure

Function: int lw6ldr_process_non_run_options (lw6sys_context_t * sys_context, int argc, const char * [] argv, int * run_game)

sys_context: global system context

argc: the number of command-line args, as passed to main

argv: an array of strings containing command-line args, as passed to main

run_game: a pointer to a boolean which will contain true (1) if the game must be launched, or false (0) if the option is such that game must be skipped. Example: –copyright, –help, ...

Will interpret the command-line arguments, and trap those who are related to xml files, this is usefull when building the game, we want to have an extra binary to do this without being linked to SDL, for instance.

Return value: non-zero if success, 0 if error. The error can be, for instance, the test suite returning "no, tests were not OK".

Function: int lw6ldr_param_read (lw6sys_context_t * sys_context, lw6map_param_t * param, const char * dirname)

sys_context: global system context

param: the parameter struct to fill with values (read/write parameter)

dirname: the directory of the map

Read the parameters associated to a map. Pointer to param must be valid, and values already initialized, either zeroed or filled in with defaults or custom values.

Return value: 1 if success, 0 if failed.

Function: int lw6ldr_param_update (lw6sys_context_t * sys_context, lw6map_param_t * param, lw6sys_assoc_t * values)

sys_context: global system context

param: the parameter struct to fill with values (read/write parameter)

values: an assoc containing strings with the new values

Overrides param with values. Pointer to param must be valid, and values already initialized, either zeroed or filled in with defaults or custom values. Not all parameters need be defined in values. It can even be NULL. The idea is just that if something is defined in values, it will override the existing param.

Return value: 1 if success, 0 if failed.

Function: void lw6ldr_print_example_rules_xml (lw6sys_context_t * sys_context, FILE * f)

sys_context: global system context

f: file to output content to

Print to a file a typical map rules.xml file.

Return value: none.

Function: void lw6ldr_print_example_hints_xml (lw6sys_context_t * sys_context, FILE * f)

sys_context: global system context

f: file to output content to

Print to a file a typical map hints.xml file.

Return value: none.

Function: void lw6ldr_print_example_style_xml (lw6sys_context_t * sys_context, FILE * f)

sys_context: global system context

f: file to output content to

Print to a file a typical map style.xml file.

Return value: none.

Function: void lw6ldr_print_example_teams_xml (lw6sys_context_t * sys_context, FILE * f)

sys_context: global system context

f: file to output content to

Print to a file a typical map teams.xml file.

Return value: none.

Function: int lw6ldr_print_examples (lw6sys_context_t * sys_context, char * user_dir)

sys_context: global system context

user_dir: the user directory or at least, a writable one

Writes all example XML files in ’user_dir/example/’, will create the directory if needed.

Return value: 1 if success, 0 if failed.

Function: lw6map_level_t * lw6ldr_read (lw6sys_context_t * sys_context, const char * dirname, lw6sys_assoc_t * default_param, lw6sys_assoc_t * forced_param, int display_w, int display_h, int bench_value, int magic_number, const char * user_dir, lw6sys_progress_t * progress)

sys_context: global system context

dirname: the directory containing the map

default_param: default parameters, as strings

forced_param: forced parameters, as strings

display_w: the width of the display output (resolution)

display_h: the height of the display output (resolution)

bench_value: the bench value (depends on computer capacity)

magic_number: arbitrary constant

user_dir: the user directory

progress: information used to handle the progress bar

Loads a map from dist. The default_param and forced_param can contain values corresponding to rules.xml and style.xml entries. Parameters are read in 4 steps. 1st, a default value is picked by the program. 2nd, any value in default_param replaces previous values. 3rd, any value in rules.xml or style.xml replaces previous values. 4th, any value in forced_param replaces previous values. In practice, the default_param allows the user to set defaults which can still be overwritten by the map, while forced_param is a definitive ’ignore what is is defined in the map’ way of doing things. See also lw6ldr_read_relative.

Return value: 1 if success, 0 if failed.

Function: lw6map_level_t * lw6ldr_read_relative (lw6sys_context_t * sys_context, const char * map_path, const char * relative_path, lw6sys_assoc_t * default_param, lw6sys_assoc_t * forced_param, int display_w, int display_h, int bench_value, int magic_number, const char * user_dir, lw6sys_progress_t * progress)

sys_context: global system context

map_path: a collection of paths where to find maps

relative_path: something which will be appended to a map_path member

default_param: default parameters, as strings

forced_param: forced parameters, as strings

display_w: the width of the display output (resolution)

display_h: the height of the display output (resolution)

bench_value: the bench value (depends on computer capacity)

magic_number: arbitrary constant

user_dir: the user directory

progress: information used to handle the progress bar

Reads a map from disk, using the map-path value, which is a collection of paths defined by the command-line, the environment variables, and the config file. default_param and forced_param work as in the function lw6ldr_read.

Return value: 1 if success, 0 if failure.

Function: void lw6ldr_resampler_init (lw6sys_context_t * sys_context, lw6ldr_resampler_t * resampler, lw6map_param_t * param, const lw6ldr_hints_t * hints, int source_w, int source_h, int display_w, int display_h, float target_ratio, int bench_value, int magic_number, int expected_depth, float gray_level)

sys_context: global system context

resampler: resampler object to init

param: map parameters to use

hints: loading hints

source_w: width of source map

source_h: height of source map

display_w: width of source display

display_h: height of source display

target_ratio: ratio, that is width/height of the target

bench_value: rough estimation of this computer power

magic_number: arbitrary constant, needed to calibrate speed

expected_depth: how thick the map could be (in practice, looks like d in whd)

gray_level: used to estimate capacity, 1.0f is white and means many slots

Initializes a resampler. There is wizardry based on the bench, magic number map size, gray level. This is bot bullet proof, but has been experience driven and is the result of many tries / failures and hopefully successes. Might need tuning as the algorithm evolves. This is the very function that chooses the actual logical map size.

Return value: none.

Function: void lw6ldr_resampler_use_for_gen (lw6sys_context_t * sys_context, int * map_w, int * map_h, int display_w, int display_h, int bench_value, int magic_number)

sys_context: global system context

map_w: target map width (out param)

map_h: target map height (out param)

display_w: screen width (pixels)

display_h: screen height (pixels)

bench_value: rough estimation of this computer power

magic_number: arbitrary constant, needed to calibrate speed

Builds a resampler and does all the calculus so that one gets the correct map width and height for the gen module. The idea is that when generating a pseudo-random map, one can not really know what size to give it, so this function gives a hint, relying on bench and magic values, which are computer/runtime dependant.

Return value: none

Function: void lw6ldr_resampler_force (lw6sys_context_t * sys_context, lw6ldr_resampler_t * resampler, int source_w, int source_h, int target_w, int target_h)

sys_context: global system context

resampler: resampler to set

source_w: source map width

source_h: source map height

target_w: target map width

target_h: target map height

Initializes a resampler with hardcoded values, does not calibrate according to context, simply set it to rescale the size you want.

Return value: none.

Function: void lw6ldr_resampler_source2target (lw6sys_context_t * sys_context, const lw6ldr_resampler_t * resampler, int * target_x, int * target_y, int source_x, int source_y)

sys_context: global system context

target_x: target x coordinate (out param)

target_y: target y coordinate (out param)

source_x: source x coordinate (in param)

source_y: source y coordinate (in param)

Transforms from source coordinate to target coordinates. Does rounding fine-tuning, it’s not a simple integer division.

Return value: none.

Function: void lw6ldr_resampler_target2source (lw6sys_context_t * sys_context, const lw6ldr_resampler_t * resampler, int * source_x, int * source_y, int target_x, int target_y)

sys_context: global system context

source_x: source x coordinate (out param)

source_y: source y coordinate (out param)

target_x: target x coordinate (in param)

target_y: target y coordinate (in param)

Transforms from target coordinate to source coordinates. Yes, target to source. Target is our final logical map, source is what we loaded from disk, here we want to know, given a point in the target, where to fetch its data from source. Does rounding fine-tuning, it’s not a simple integer division.

Return value: none.

Function: int lw6ldr_rules_read (lw6sys_context_t * sys_context, lw6map_rules_t * rules, const char * dirname)

sys_context: global system context

dirname: the directory of the map

Read the rules (rules.xml) of a map. Pointer to rules must be valid, and values already initialized, either zeroed or filled in with defaults or custom values.

Return value: 1 if success, 0 if failed.

Function: int lw6ldr_rules_update (lw6sys_context_t * sys_context, lw6map_rules_t * rules, lw6sys_assoc_t * values)

sys_context: global system context

rules: the rules struct to fill with values (read/write parameter)

values: an assoc containing strings with the new values

Overrides rules with values. Pointer to rules must be valid, and values already initialized, either zeroed or filled in with defaults or custom values. Not all parameters need be defined in values. It can even be NULL. The idea is just that if something is defined in values, it will override the existing rules.

Return value: 1 if success, 0 if failed.

Function: int lw6ldr_style_read (lw6sys_context_t * sys_context, lw6map_style_t * style, const char * dirname)

sys_context: global system context

dirname: the directory of the map

Read the style (style.xml) of a map. Pointer to style must be valid, and values already initialized, either zeroed or filled in with defaults or custom values.

Return value: 1 if success, 0 if failed.

Function: int lw6ldr_style_set (lw6sys_context_t * sys_context, lw6map_style_t * style, const char * key, const char * value)

sys_context: global system context

style: the style to modify

key: the key to modify

value: the value to affect to the key, as a string

Sets one single parameter in a style 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.

Function: int lw6ldr_style_update (lw6sys_context_t * sys_context, lw6map_style_t * style, lw6sys_assoc_t * values)

sys_context: global system context

style: the style struct to fill with values (read/write parameter)

values: an assoc containing strings with the new values

Overrides style with values. Pointer to style must be valid, and values already initialized, either zeroed or filled in with defaults or custom values. Not all parameters need be defined in values. It can even be NULL. The idea is just that if something is defined in values, it will override the existing style.

Return value: 1 if success, 0 if failed.

Function: int lw6ldr_teams_read (lw6sys_context_t * sys_context, lw6map_teams_t * teams, const char * dirname)

sys_context: global system context

dirname: the directory of the map

Read the teams (teams.xml) of a map. Pointer to teams must be valid, and values already initialized, either zeroed or filled in with defaults or custom values.

Return value: 1 if success, 0 if failed.

Function: int lw6ldr_teams_update (lw6sys_context_t * sys_context, lw6map_teams_t * teams, lw6sys_assoc_t * values)

sys_context: global system context

teams: the teams struct to fill with values (read/write parameter)

values: an assoc containing strings with the new values

Overrides teams with values. Pointer to teams must be valid, and values already initialized, either zeroed or filled in with defaults or custom values. Not all parameters need be defined in values. It can even be NULL. The idea is just that if something is defined in values, it will override the existing teams.

Return value: 1 if success, 0 if failed.

Function: int lw6ldr_test_register (lw6sys_context_t * sys_context, int mode)

sys_context: global system context

mode: test mode (bitmask)

Registers all tests for the libldr module.

Return value: 1 if test is successfull, 0 on error.

Function: int lw6ldr_test_run (lw6sys_context_t * sys_context, int mode)

sys_context: global system context

mode: test mode (bitmask)

Runs the ldr module test suite, testing most (if not all...) functions.

Return value: 1 if test is successfull, 0 on error.

Function: int lw6ldr_texture_read (lw6sys_context_t * sys_context, lw6map_texture_t * texture, const char * dirname, const lw6map_param_t * param, const lw6ldr_hints_t * hints, int use_texture, int display_w, int display_h, float * ratio, int * texture_exists, lw6sys_progress_t * progress)

sys_context: global system context

texture: structure to hold read data

dirname: map dirname (absolute path)

param: parameters to use

hints: loading hints to use

use_texture: wether to use texture.png

display_w: display width

display_h: display height

ratio: target width/height factor (out param)

texture_exists: true if texture.png is here (out param)

progress: progress indicator (in/out param)

Read the texture associated to a map. Pointer to texture must be valid, it’s modified in-place. The function will automatically figure out if texture.png exists or if we must use foreground.png/background.png.

Return value: 1 on success, 0 on failure.

Function: void lw6ldr_use_defaults (lw6sys_context_t * sys_context, lw6ldr_use_t * use)

sys_context: global system context

use: struct to initialize

Sets the use structure to its defaults, this structure being used to now wether we should use texture, cursor textures, rules, hints, style, teams and music.

Return value: none.

Function: void lw6ldr_use_clear (lw6sys_context_t * sys_context, lw6ldr_use_t * use)

sys_context: global system context

use: struct to clear

Clears the use structure, set it to the use nothing mode.

Return value: none.

Function: int lw6ldr_use_set (lw6sys_context_t * sys_context, lw6ldr_use_t * use, const char * key, const char * value)

sys_context: global system context

use: struct to modify

key: key to change (as a string)

value: value to set (as a string)

Sets a key to the given value, OK all fields are integer, this is just a convenient function to be called in more general functions which are fed with those string pointers, typically coming from an XML file.

Return value: 1 on success, 0 on failure (key not found).

Function: int lw6ldr_use_update (lw6sys_context_t * sys_context, lw6ldr_use_t * use, lw6sys_assoc_t * values)

sys_context: global system context

use: the use struct to fill with values (read/write parameter)

values: an assoc containing strings with the new values

Overrides use with values. Pointer to use must be valid, and values already initialized, either zeroed or filled in with defaults or custom values. Not all parameters need be defined in values. It can even be NULL. The idea is just that if something is defined in values, it will override the existing use.

Return value: 1 if success, 0 if failed.

Struct: lw6ldr_entry_s

Contains informations about a map, but just the minimum to, for instance, display it in a menu entry.

Member of lw6ldr_entry_s: metadata

Type: lw6map_metadata_t

Definition: lw6map_metadata_t lw6ldr_entry_s::metadata

The map metadata.

Member of lw6ldr_entry_s: absolute_path

Type: char *

Definition: char* lw6ldr_entry_s::absolute_path

The map absolute path, use this to load it.

Member of lw6ldr_entry_s: relative_path

Type: char *

Definition: char* lw6ldr_entry_s::relative_path

The map relative path, store this in config file.

Member of lw6ldr_entry_s: has_subdirs

Type: int

Definition: int lw6ldr_entry_s::has_subdirs

Wether the entry has subdirs (and consequently, isn’t a map)

Member of lw6ldr_entry_s: nb_submaps

Type: int

Definition: int lw6ldr_entry_s::nb_submaps

Number of sub mpas within this map.

Member of lw6ldr_entry_s: forbidden

Type: int

Definition: int lw6ldr_entry_s::forbidden

Wether it is forbidden (eg, not enough exp).

Struct: lw6ldr_hints_s

Content of hints.xml stored into a C struct.

Member of lw6ldr_hints_s: resample

Type: int

Definition: int lw6ldr_hints_s::resample

Wether to resample the map on the fly when loaded.

Member of lw6ldr_hints_s: min_map_width

Type: int

Definition: int lw6ldr_hints_s::min_map_width

Minimum map width.

Member of lw6ldr_hints_s: max_map_width

Type: int

Definition: int lw6ldr_hints_s::max_map_width

Maximum map width.

Member of lw6ldr_hints_s: min_map_height

Type: int

Definition: int lw6ldr_hints_s::min_map_height

Minimum map height.

Member of lw6ldr_hints_s: max_map_height

Type: int

Definition: int lw6ldr_hints_s::max_map_height

Maximum map height.

Member of lw6ldr_hints_s: min_map_surface

Type: int

Definition: int lw6ldr_hints_s::min_map_surface

Minimum map surface.

Member of lw6ldr_hints_s: max_map_surface

Type: int

Definition: int lw6ldr_hints_s::max_map_surface

Maximum map surface.

Member of lw6ldr_hints_s: fighter_scale

Type: float

Definition: float lw6ldr_hints_s::fighter_scale

Use greater or smaller fighters.

Member of lw6ldr_hints_s: downsize_using_fighter_scale

Type: int

Definition: int lw6ldr_hints_s::downsize_using_fighter_scale

Wether to downsize the map, if needed, using fighter scale.

Member of lw6ldr_hints_s: upsize_using_fighter_scale

Type: int

Definition: int lw6ldr_hints_s::upsize_using_fighter_scale

Wether to upsize the map, if needed, using fighter scale.

Member of lw6ldr_hints_s: downsize_using_bench_value

Type: int

Definition: int lw6ldr_hints_s::downsize_using_bench_value

Wether to downsize the map, if needed, using bench value.

Member of lw6ldr_hints_s: upsize_using_bench_value

Type: int

Definition: int lw6ldr_hints_s::upsize_using_bench_value

Wether to upsize the map, if needed, using bench value.

Member of lw6ldr_hints_s: guess_colors

Type: int

Definition: int lw6ldr_hints_s::guess_colors

Wether to guess colors from the map.

Member of lw6ldr_hints_s: background_color_auto

Type: int

Definition: int lw6ldr_hints_s::background_color_auto

Wether to set up background colors automatically.

Member of lw6ldr_hints_s: hud_color_auto

Type: int

Definition: int lw6ldr_hints_s::hud_color_auto

Wether to set up hud colors automatically.

Member of lw6ldr_hints_s: menu_color_auto

Type: int

Definition: int lw6ldr_hints_s::menu_color_auto

Wether to set up menu colors automatically.

Member of lw6ldr_hints_s: view_color_auto

Type: int

Definition: int lw6ldr_hints_s::view_color_auto

Wether to set up view colors automatically.

Member of lw6ldr_hints_s: system_color_auto

Type: int

Definition: int lw6ldr_hints_s::system_color_auto

Wether to set up system colors automatically.

Member of lw6ldr_hints_s: wall_grease

Type: int

Definition: int lw6ldr_hints_s::wall_grease

Wall grease used when rescaling.

Member of lw6ldr_hints_s: guess_moves_per_sec

Type: int

Definition: int lw6ldr_hints_s::guess_moves_per_sec

Guess the moves per sec value automatically.

Member of lw6ldr_hints_s: speed

Type: float

Definition: float lw6ldr_hints_s::speed

Global speed.

Struct: lw6ldr_resampler_s

Almost internal struct use to handler the resampling process. It has informations about the source, the target, and the ratio between them. It basically contains informations about how to scale.

Member of lw6ldr_resampler_s: target_w

Type: int

Definition: int lw6ldr_resampler_s::target_w

Target width.

Member of lw6ldr_resampler_s: target_h

Type: int

Definition: int lw6ldr_resampler_s::target_h

Target height.

Member of lw6ldr_resampler_s: source_w

Type: int

Definition: int lw6ldr_resampler_s::source_w

Source width.

Member of lw6ldr_resampler_s: source_h

Type: int

Definition: int lw6ldr_resampler_s::source_h

Source height.

Member of lw6ldr_resampler_s: scale_x

Type: float

Definition: float lw6ldr_resampler_s::scale_x

Ratio for the X axis (target_w/source_w).

Member of lw6ldr_resampler_s: scale_y

Type: float

Definition: float lw6ldr_resampler_s::scale_y

Ratio for the Y axis (target_h/source_h).

Struct: lw6ldr_use_s

What files to use when loading a map.

Member of lw6ldr_use_s: use_texture

Type: int

Definition: int lw6ldr_use_s::use_texture

Wether to use texture.jpeg.

Member of lw6ldr_use_s: use_cursor_texture

Type: int

Definition: int lw6ldr_use_s::use_cursor_texture

Wether to use cursor-texture.jpeg.

Member of lw6ldr_use_s: use_rules_xml

Type: int

Definition: int lw6ldr_use_s::use_rules_xml

Wether to use rules.xml.

Member of lw6ldr_use_s: use_hints_xml

Type: int

Definition: int lw6ldr_use_s::use_hints_xml

Wether to use hints.xml.

Member of lw6ldr_use_s: use_style_xml

Type: int

Definition: int lw6ldr_use_s::use_style_xml

Wether to use style.xml.

Member of lw6ldr_use_s: use_teams_xml

Type: int

Definition: int lw6ldr_use_s::use_teams_xml

Wether to use teams.xml.

Member of lw6ldr_use_s: use_music_file

Type: int

Definition: int lw6ldr_use_s::use_music_file

Wether to use the map specific music file.


Next: , Previous: , Up: C API   [Contents][Index]