The Battle for Wesnoth  1.15.1+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)
 Whether we are looking for highest or lowest (unless inverted by the underlying terrain). More...
 

Public Attributes

int min_value
 
int max_value
 The smallest allowable value. More...
 
int default_value
 The largest allowable value. More...
 
int(* eval )(int)
 The default value (if no data is available). More...
 
bool use_move
 Converter for values taken from a config. May be nullptr. More...
 
bool high_is_good
 Whether to look at underlying movement or defense terrains. More...
 

Detailed Description

The parameters used when calculating a terrain-based value.

Definition at line 55 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

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

Definition at line 66 of file movetype.cpp.

References movetype::mvj_params_, movetype::terrain_defense::params_max_, movetype::terrain_defense::params_min_, and movetype::UNREACHABLE.

Member Data Documentation

◆ default_value

int movetype::terrain_info::parameters::default_value

The largest allowable value.

Definition at line 59 of file movetype.cpp.

◆ eval

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

The default value (if no data is available).

Definition at line 61 of file movetype.cpp.

◆ high_is_good

bool movetype::terrain_info::parameters::high_is_good

Whether to look at underlying movement or defense terrains.

Definition at line 64 of file movetype.cpp.

◆ max_value

int movetype::terrain_info::parameters::max_value

The smallest allowable value.

Definition at line 58 of file movetype.cpp.

◆ min_value

int movetype::terrain_info::parameters::min_value

Definition at line 57 of file movetype.cpp.

◆ use_move

bool movetype::terrain_info::parameters::use_move

Converter for values taken from a config. May be nullptr.

Definition at line 63 of file movetype.cpp.


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