The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Public Attributes | List of all members
movetype::terrain_info::parameters Struct Reference

The parameters used when calculating a terrain-based value. More...

Public Member Functions

 parameters (int min, int max, int(*eval_fun)(int)=nullptr, bool move=true, bool high=false)
 

Public Attributes

int min_value
 The smallest allowable value. More...
 
int max_value
 The largest allowable value. More...
 
int default_value
 The default value (if no data is available). More...
 
int(* eval )(int)
 Converter for values taken from a config. More...
 
bool use_move
 Whether to look at underlying movement or defense terrains. More...
 
bool high_is_good
 Whether we are looking for highest or lowest (unless inverted by the underlying terrain). More...
 

Detailed Description

The parameters used when calculating a terrain-based value.

Definition at line 52 of file movetype.cpp.

Constructor & Destructor Documentation

◆ parameters()

movetype::terrain_info::parameters::parameters ( int  min,
int  max,
int(*)(int)  eval_fun = nullptr,
bool  move = true,
bool  high = false 
)
inline

Definition at line 69 of file movetype.cpp.

Member Data Documentation

◆ default_value

int movetype::terrain_info::parameters::default_value

The default value (if no data is available).

Definition at line 59 of file movetype.cpp.

◆ eval

int(* movetype::terrain_info::parameters::eval) (int)

Converter for values taken from a config.

May be nullptr.

Definition at line 62 of file movetype.cpp.

◆ high_is_good

bool movetype::terrain_info::parameters::high_is_good

Whether we are looking for highest or lowest (unless inverted by the underlying terrain).

Definition at line 67 of file movetype.cpp.

◆ max_value

int movetype::terrain_info::parameters::max_value

The largest allowable value.

Definition at line 57 of file movetype.cpp.

◆ min_value

int movetype::terrain_info::parameters::min_value

The smallest allowable value.

Definition at line 55 of file movetype.cpp.

◆ use_move

bool movetype::terrain_info::parameters::use_move

Whether to look at underlying movement or defense terrains.

Definition at line 65 of file movetype.cpp.


The documentation for this struct was generated from the following file: