CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
map_tile_flags Struct Reference

#include <th_map.h>

Public Types

enum class  key : uint32_t {
  passable_mask = 1 << 0 , can_travel_n_mask = 1 << 1 , can_travel_e_mask = 1 << 2 , can_travel_s_mask = 1 << 3 ,
  can_travel_w_mask = 1 << 4 , hospital_mask = 1 << 5 , buildable_mask = 1 << 6 , passable_if_not_for_blueprint_mask = 1 << 7 ,
  room_mask = 1 << 8 , shadow_half_mask = 1 << 9 , shadow_full_mask = 1 << 10 , shadow_wall_mask = 1 << 11 ,
  door_north_mask = 1 << 12 , door_west_mask = 1 << 13 , do_not_idle_mask = 1 << 14 , tall_north_mask = 1 << 15 ,
  tall_west_mask = 1 << 16 , buildable_n_mask = 1 << 17 , buildable_e_mask = 1 << 18 , buildable_s_mask = 1 << 19 ,
  buildable_w_mask = 1 << 20
}
 

Public Member Functions

map_tile_flagsoperator= (uint32_t raw)
 
booloperator[] (map_tile_flags::key key)
 Get/set the flag with the given key.
 
const booloperator[] (map_tile_flags::key key) const
 Get the flag with the given key.
 
 operator uint32_t () const
 Convert map_tile_flags into it's uint32_t representation.
 

Public Attributes

bool passable
 Pathfinding: Can walk on this tile.
 
bool can_travel_n
 Pathfinding: Can walk to the north.
 
bool can_travel_e
 Pathfinding: Can walk to the east.
 
bool can_travel_s
 Pathfinding: Can walk to the south.
 
bool can_travel_w
 Pathfinding: Can walk to the west.
 
bool hospital
 World: Tile is inside a hospital building.
 
bool buildable
 Player: Can build on this tile.
 
bool passable_if_not_for_blueprint
 
bool room
 World: Tile is inside a room.
 
bool shadow_half
 Rendering: Put block 75 over floor.
 
bool shadow_full
 Rendering: Put block 74 over floor.
 
bool shadow_wall
 Rendering: Put block 156 over east wall.
 
bool door_north
 World: Door on north wall of tile.
 
bool door_west
 World: Door on west wall of tile.
 
bool do_not_idle
 World: Humanoids should not idle on tile.
 
bool tall_north
 Shadows: Wall-like object on north wall.
 
bool tall_west
 Shadows: Wall-like object on west wall.
 
bool buildable_n
 Can build on the north side of the tile.
 
bool buildable_e
 Can build on the east side of the tile.
 
bool buildable_s
 Can build on the south side of the tile.
 
bool buildable_w
 Can build on the west side of the tile.
 

Detailed Description

Map flags and object type The point of storing the object type here is to allow pathfinding code to use object types as pathfinding goals.

Member Enumeration Documentation

◆ key

enum class map_tile_flags::key : uint32_t
strong
Enumerator
passable_mask 
can_travel_n_mask 
can_travel_e_mask 
can_travel_s_mask 
can_travel_w_mask 
hospital_mask 
buildable_mask 
passable_if_not_for_blueprint_mask 
room_mask 
shadow_half_mask 
shadow_full_mask 
shadow_wall_mask 
door_north_mask 
door_west_mask 
do_not_idle_mask 
tall_north_mask 
tall_west_mask 
buildable_n_mask 
buildable_e_mask 
buildable_s_mask 
buildable_w_mask 

Member Function Documentation

◆ operator uint32_t()

map_tile_flags::operator uint32_t ( ) const

Convert map_tile_flags into it's uint32_t representation.

◆ operator=()

map_tile_flags & map_tile_flags::operator= ( uint32_t  raw)

Convert the given uint32_t representation of the map_tile flags to a map_tile_flags instance.

◆ operator[]() [1/2]

bool & map_tile_flags::operator[] ( map_tile_flags::key  key)

Get/set the flag with the given key.

◆ operator[]() [2/2]

const bool & map_tile_flags::operator[] ( map_tile_flags::key  key) const

Get the flag with the given key.

Member Data Documentation

◆ buildable

bool map_tile_flags::buildable

Player: Can build on this tile.

◆ buildable_e

bool map_tile_flags::buildable_e

Can build on the east side of the tile.

◆ buildable_n

bool map_tile_flags::buildable_n

Can build on the north side of the tile.

◆ buildable_s

bool map_tile_flags::buildable_s

Can build on the south side of the tile.

◆ buildable_w

bool map_tile_flags::buildable_w

Can build on the west side of the tile.

◆ can_travel_e

bool map_tile_flags::can_travel_e

Pathfinding: Can walk to the east.

◆ can_travel_n

bool map_tile_flags::can_travel_n

Pathfinding: Can walk to the north.

◆ can_travel_s

bool map_tile_flags::can_travel_s

Pathfinding: Can walk to the south.

◆ can_travel_w

bool map_tile_flags::can_travel_w

Pathfinding: Can walk to the west.

◆ do_not_idle

bool map_tile_flags::do_not_idle

World: Humanoids should not idle on tile.

◆ door_north

bool map_tile_flags::door_north

World: Door on north wall of tile.

◆ door_west

bool map_tile_flags::door_west

World: Door on west wall of tile.

◆ hospital

bool map_tile_flags::hospital

World: Tile is inside a hospital building.

◆ passable

bool map_tile_flags::passable

Pathfinding: Can walk on this tile.

◆ passable_if_not_for_blueprint

bool map_tile_flags::passable_if_not_for_blueprint

◆ room

bool map_tile_flags::room

World: Tile is inside a room.

◆ shadow_full

bool map_tile_flags::shadow_full

Rendering: Put block 74 over floor.

◆ shadow_half

bool map_tile_flags::shadow_half

Rendering: Put block 75 over floor.

◆ shadow_wall

bool map_tile_flags::shadow_wall

Rendering: Put block 156 over east wall.

◆ tall_north

bool map_tile_flags::tall_north

Shadows: Wall-like object on north wall.

◆ tall_west

bool map_tile_flags::tall_west

Shadows: Wall-like object on west wall.


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