OpenTTD Source: src/table/object_land.h File Reference

OpenTTD Source 15.0-RC2

Macros | Variables
object_land.h File Reference

Sprites to use and how to display them for object tiles. More...

`#include "table/strings.h"`

Go to the source code of this file.

## Macros
#define | TILE_SEQ_LINE(sz, img) { 0, 0, 0, 16, 16, sz, {img, PAL_NONE} },
#define | TILE_SPRITE_LINE(img, dtss) { {img | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE}, dtss },
#define | TILE_SPRITE_LINE_NOTHING(img) { {img | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE} },
#define | M(name, size, build_cost_multiplier, clear_cost_multiplier, height, climate, gen_amount, flags) {{INVALID_OBJECT_CLASS, 0}, StandardGRFFileProps{}, AnimationInfo<ObjectAnimationTriggers>{}, name, climate, size, build_cost_multiplier, clear_cost_multiplier, TimerGameCalendar::Date{}, CalendarTime::MAX_DATE + 1, flags, ObjectCallbackMasks{}, height, 1, gen_amount, {}}
#define | T LandscapeType::Temperate
#define | A LandscapeType::Arctic
#define | S LandscapeType::Tropic
#define | Y LandscapeType::Toyland

## Variables
static const DrawTileSeqStruct | _object_transmitter_seq []
static const DrawTileSeqStruct | _object_lighthouse_seq []
static const DrawTileSeqStruct | _object_statue_seq []
static const DrawTileSeqStruct | _object_owned_land_seq []
const DrawTileSpriteSpan | _objects []
static const DrawTileSeqStruct | _object_hq_medium_north []
static const DrawTileSeqStruct | _object_hq_medium_east []
static const DrawTileSeqStruct | _object_hq_medium_west []
static const DrawTileSeqStruct | _object_hq_large_north []
static const DrawTileSeqStruct | _object_hq_large_east []
static const DrawTileSeqStruct | _object_hq_large_west []
static const DrawTileSeqStruct | _object_hq_huge_north []
static const DrawTileSeqStruct | _object_hq_huge_east []
static const DrawTileSeqStruct | _object_hq_huge_west []
static const DrawTileSpriteSpan | _object_hq []
const ObjectSpec | _original_objects []
| Specification of the original object structures.

## Detailed Description

Sprites to use and how to display them for object tiles.

Definition in file object_land.h.

## Macro Definition Documentation

## ◆ A

#define A LandscapeType::Arctic

Definition at line 117 of file object_land.h.

## ◆ M

#define M | ( |  | name,
|  |  | size,
|  |  | build_cost_multiplier,
|  |  | clear_cost_multiplier,
|  |  | height,
|  |  | climate,
|  |  | gen_amount,
|  |  | flags
| ) |  | {{INVALID_OBJECT_CLASS, 0}, StandardGRFFileProps{}, AnimationInfo<ObjectAnimationTriggers>{}, name, climate, size, build_cost_multiplier, clear_cost_multiplier, TimerGameCalendar::Date{}, CalendarTime::MAX_DATE + 1, flags, ObjectCallbackMasks{}, height, 1, gen_amount, {}}

Definition at line 109 of file object_land.h.

## ◆ S

#define S LandscapeType::Tropic

Definition at line 118 of file object_land.h.

## ◆ T

#define T LandscapeType::Temperate

Definition at line 116 of file object_land.h.

## ◆ TILE_SEQ_LINE

#define TILE_SEQ_LINE | ( |  | sz,
|  |  | img
| ) |  | { 0, 0, 0, 16, 16, sz, {img, PAL_NONE} },

Definition at line 12 of file object_land.h.

## ◆ TILE_SPRITE_LINE

#define TILE_SPRITE_LINE | ( |  | img,
|  |  | dtss
| ) |  | { {img | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE}, dtss },

Definition at line 76 of file object_land.h.

## ◆ TILE_SPRITE_LINE_NOTHING

#define TILE_SPRITE_LINE_NOTHING | ( |  | img | ) | { {img | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE} },

Definition at line 77 of file object_land.h.

## ◆ Y

#define Y LandscapeType::Toyland

Definition at line 119 of file object_land.h.

## Variable Documentation

## ◆ _object_hq

const DrawTileSpriteSpan _object_hq[]
| static

Initial value:
= {
}

Definition at line 79 of file object_land.h.

## ◆ _object_hq_huge_east

const DrawTileSeqStruct _object_hq_huge_east[]
| static

Initial value:
= {
}

Definition at line 66 of file object_land.h.

## ◆ _object_hq_huge_north

const DrawTileSeqStruct _object_hq_huge_north[]
| static

Initial value:
= {
}

Definition at line 62 of file object_land.h.

## ◆ _object_hq_huge_west

const DrawTileSeqStruct _object_hq_huge_west[]
| static

Initial value:
= {
}

Definition at line 70 of file object_land.h.

## ◆ _object_hq_large_east

const DrawTileSeqStruct _object_hq_large_east[]
| static

Initial value:
= {
}

Definition at line 54 of file object_land.h.

## ◆ _object_hq_large_north

const DrawTileSeqStruct _object_hq_large_north[]
| static

Initial value:
= {
}

Definition at line 50 of file object_land.h.

## ◆ _object_hq_large_west

const DrawTileSeqStruct _object_hq_large_west[]
| static

Initial value:
= {
}

Definition at line 58 of file object_land.h.

## ◆ _object_hq_medium_east

const DrawTileSeqStruct _object_hq_medium_east[]
| static

Initial value:
= {
}

Definition at line 42 of file object_land.h.

## ◆ _object_hq_medium_north

const DrawTileSeqStruct _object_hq_medium_north[]
| static

Initial value:
= {
}

Definition at line 38 of file object_land.h.

## ◆ _object_hq_medium_west

const DrawTileSeqStruct _object_hq_medium_west[]
| static

Initial value:
= {
}

Definition at line 46 of file object_land.h.

## ◆ _object_lighthouse_seq

const DrawTileSeqStruct _object_lighthouse_seq[]
| static

Initial value:
= {
{ 4, 4, 0, 7, 7, 61, {SPR_LIGHTHOUSE, PAL_NONE}},
}

Definition at line 18 of file object_land.h.

## ◆ _object_owned_land_seq

const DrawTileSeqStruct _object_owned_land_seq[]
| static

Initial value:
= {
{ 8, 8, 0, 1, 1, 6, {SPR_BOUGHT_LAND | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE}},
}
PALETTE_MODIFIER_COLOUR
static constexpr uint8_t PALETTE_MODIFIER_COLOUR
this bit is set when a recolouring process is in action
Definition sprites.h:1562

Definition at line 26 of file object_land.h.

## ◆ _object_statue_seq

const DrawTileSeqStruct _object_statue_seq[]
| static

Initial value:
= {
{ 0, 0, 0, 16, 16, 25, {SPR_STATUE_COMPANY | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE}},
}

Definition at line 22 of file object_land.h.

## ◆ _object_transmitter_seq

const DrawTileSeqStruct _object_transmitter_seq[]
| static

Initial value:
= {
{ 7, 7, 0, 2, 2, 70, {SPR_TRANSMITTER, PAL_NONE}},
}

Definition at line 14 of file object_land.h.

## ◆ _objects

const DrawTileSpriteSpan _objects[]
| extern

Initial value:
= {
{ { SPR_FLAT_2_THIRD_GRASS_TILE, PAL_NONE }, _object_transmitter_seq },
{ { SPR_FLAT_2_THIRD_GRASS_TILE, PAL_NONE }, _object_lighthouse_seq },
{ { SPR_CONCRETE_GROUND, PAL_NONE }, _object_statue_seq },
{ { SPR_FLAT_BARE_LAND, PAL_NONE }, _object_owned_land_seq },
}

## ◆ _original_objects

const ObjectSpec _original_objects[]
| extern

Initial value:
= {
M(STR_LAI_OBJECT_DESCRIPTION_TRANSMITTER, 0x11, 0, 0, 10, LandscapeTypes({T,A,S }), 15, ObjectFlags({ObjectFlag::CannotRemove, ObjectFlag::OnlyInScenedit})),
M(STR_LAI_OBJECT_DESCRIPTION_LIGHTHOUSE, 0x11, 0, 0, 8, LandscapeTypes({T,A }), 8, ObjectFlags({ObjectFlag::CannotRemove, ObjectFlag::OnlyInScenedit, ObjectFlag::ScaleByWater})),
M(STR_TOWN_BUILDING_NAME_STATUE_1, 0x11, 0, 0, 5, LandscapeTypes({T,S,A,Y}), 0, ObjectFlags({ObjectFlag::CannotRemove, ObjectFlag::OnlyInGame, ObjectFlag::OnlyInScenedit})),
M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND, 0x11, 10, 10, 0, LandscapeTypes({T,S,A,Y}), 0, ObjectFlags({ObjectFlag::Autoremove, ObjectFlag::OnlyInGame, ObjectFlag::ClearIncome, ObjectFlag::HasNoFoundation})),
M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS, 0x22, 0, 0, 7, LandscapeTypes({T,S,A,Y}), 0, ObjectFlags({ObjectFlag::CannotRemove, ObjectFlag::OnlyInGame})),
}
EnumBitSet< LandscapeType, uint8_t >
ObjectFlag::Autoremove
@ Autoremove
Object get automatically removed (like "owned land").
ObjectFlag::CannotRemove
@ CannotRemove
Object can not be removed.
ObjectFlag::OnlyInScenedit
@ OnlyInScenedit
Object can only be constructed in the scenario editor.
ObjectFlag::OnlyInGame
@ OnlyInGame
Object can only be built in game.
ObjectFlag::HasNoFoundation
@ HasNoFoundation
Do not display foundations when on a slope.
ObjectFlag::ScaleByWater
@ ScaleByWater
Object count is roughly scaled by water amount at edges.
ObjectFlag::ClearIncome
@ ClearIncome
When object is cleared a positive income is generated instead of a cost.
M
#define M(x)
Helper for creating a bitset of slopes.
Definition slope_type.h:84

Specification of the original object structures.