The Battle for Wesnoth  1.19.0-dev
Classes | Macros | Functions | Variables
movetype.cpp File Reference

Handle movement types. More...

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

Go to the source code of this file.


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


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


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...


static lg::log_domain log_config ("config")

Detailed Description

Handle movement types.

Definition in file movetype.cpp.

Macro Definition Documentation


#define ERR_CF   LOG_STREAM(err, log_config)

Definition at line 31 of file movetype.cpp.


#define WRN_CF   LOG_STREAM(warn, log_config)

Definition at line 32 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 514 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 501 of file movetype.cpp.

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

Variable Documentation

◆ log_config

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