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

#include <th_map.h>

Public Member Functions

 map_tile ()=default
 
 ~map_tile ()=default
 

Public Attributes

link_list entities
 
link_list oEarlyEntities
 Linked list for entities rendered in an early (right-to-left) pass.
 
uint16_t tile_layers [tile_layer::num_tile_layers] {}
 
uint16_t iParcelId {0}
 
uint16_t iRoomId {0}
 Rooms have an ID, with room #0 being the corridor (and the outside).
 
uint16_t aiTemperature [2] {8192, 8192}
 
map_tile_flags flags {}
 Flags for information and object type.
 
std::list< object_typeobjects
 objects in this tile
 
std::uint8_t raw [raw_length] {}
 raw data from map file for debugging
 

Static Public Attributes

static constexpr int raw_length = 8
 

Constructor & Destructor Documentation

◆ map_tile()

map_tile::map_tile ( )
default

◆ ~map_tile()

map_tile::~map_tile ( )
default

Member Data Documentation

◆ aiTemperature

uint16_t map_tile::aiTemperature[2] {8192, 8192}

A value between 0 (extreme cold) and 65535 (extreme heat) representing the temperature of the tile. To allow efficient calculation of a tile's heat based on the previous tick's heat of the surrounding tiles, the previous temperature is also stored, with the array indices switching every tick.

◆ entities

link_list map_tile::entities

◆ flags

map_tile_flags map_tile::flags {}

Flags for information and object type.

◆ iParcelId

uint16_t map_tile::iParcelId {0}

Parcels (plots) of land have an ID, with each tile in the plot having that ID. Parcel 0 is the outside.

◆ iRoomId

uint16_t map_tile::iRoomId {0}

Rooms have an ID, with room #0 being the corridor (and the outside).

◆ objects

std::list<object_type> map_tile::objects

objects in this tile

◆ oEarlyEntities

link_list map_tile::oEarlyEntities

Linked list for entities rendered in an early (right-to-left) pass.

◆ raw

std::uint8_t map_tile::raw[raw_length] {}

raw data from map file for debugging

◆ raw_length

constexpr int map_tile::raw_length = 8
staticconstexpr

◆ tile_layers

uint16_t map_tile::tile_layers[tile_layer::num_tile_layers] {}

Tile layers for rendering. For each layer, the lower byte is the index in the sprite sheet, and the upper byte is for the drawing flags. Layer 0 is for the floor Layer 1 is for the north wall Layer 2 is for the west wall Layer 3 is for the UI NB: In Lua, layers are numbered 1 - 4 rather than 0 - 3


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