The Battle for Wesnoth  1.19.5+dev
Classes | Macros | Functions | Variables
movetype.cpp File Reference

Handle movement types. More...

#include "movetype.hpp"
#include "game_config_manager.hpp"
#include "log.hpp"
#include "terrain/translation.hpp"
Include dependency graph for movetype.cpp:

Go to the source code of this file.

Classes

struct  movetype::terrain_info::parameters
 The parameters used when calculating a terrain-based value. More...
 
class  movetype::terrain_info::data
 

Macros

#define ERR_CF   LOG_STREAM(err, log_config)
 
#define WRN_CF   LOG_STREAM(warn, log_config)
 

Functions

void swap (movetype::terrain_defense &a, movetype::terrain_defense &b)
 Swap function for the terrain_defense class. More...
 
void swap (movetype &a, movetype &b)
 Swap function for the movetype class, including its terrain_info members. More...
 

Variables

static lg::log_domain log_config ("config")
 

Detailed Description

Handle movement types.

Definition in file movetype.cpp.

Macro Definition Documentation

◆ ERR_CF

#define ERR_CF   LOG_STREAM(err, log_config)

Definition at line 28 of file movetype.cpp.

◆ WRN_CF

#define WRN_CF   LOG_STREAM(warn, log_config)

Definition at line 29 of file movetype.cpp.

Function Documentation

◆ swap() [1/2]

void swap ( movetype a,
movetype b 
)

Swap function for the movetype class, including its terrain_info members.

This relies on the two sets of the terrain_infos having their movement, vision and jamming cascaded in the same way. This assumption is provided by movetype's constructors.

Definition at line 511 of file movetype.cpp.

◆ swap() [2/2]

Swap function for the terrain_defense class.

This relies on all of the terrain_infos having no fallback and no cascade, an assumption which is provided by terrain_defense's constructors.

Definition at line 498 of file movetype.cpp.

Referenced by movetype::terrain_info::swap_data().

Variable Documentation

◆ log_config

lg::log_domain log_config("config") ( "config"  )
static