OpenTTD Source 20250205-master-gfd85ab1e2c
object_land.h File Reference

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

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_SEQ_END()   { (int8_t)0x80, 0, 0, 0, 0, 0, {0, 0} }
 
#define TILE_SPRITE_LINE(img, dtss)   { {img | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE}, dtss },
 
#define M(name, size, build_cost_multiplier, clear_cost_multiplier, height, climate, gen_amount, flags)   {{INVALID_OBJECT_CLASS, 0}, GRFFilePropsBase<2>(), {0, 0, 0, 0}, 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_nothing []
 
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 DrawTileSprites _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 DrawTileSprites _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 132 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}, GRFFilePropsBase<2>(), {0, 0, 0, 0}, name, climate, size, build_cost_multiplier, clear_cost_multiplier, TimerGameCalendar::Date{}, CalendarTime::MAX_DATE + 1, flags, ObjectCallbackMasks{}, height, 1, gen_amount}

Definition at line 124 of file object_land.h.

◆ S

#define S   LandscapeType::Tropic

Definition at line 133 of file object_land.h.

◆ T

#define T   LandscapeType::Temperate

Definition at line 131 of file object_land.h.

◆ TILE_SEQ_END

#define TILE_SEQ_END ( )    { (int8_t)0x80, 0, 0, 0, 0, 0, {0, 0} }

Definition at line 11 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 10 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 93 of file object_land.h.

◆ Y

#define Y   LandscapeType::Toyland

Definition at line 134 of file object_land.h.

Variable Documentation

◆ _object_hq

const DrawTileSprites _object_hq[]
static
Initial value:
= {
}

Definition at line 95 of file object_land.h.

◆ _object_hq_huge_east

const DrawTileSeqStruct _object_hq_huge_east[]
static
Initial value:
= {
}

Definition at line 80 of file object_land.h.

◆ _object_hq_huge_north

const DrawTileSeqStruct _object_hq_huge_north[]
static
Initial value:
= {
}

Definition at line 75 of file object_land.h.

◆ _object_hq_huge_west

const DrawTileSeqStruct _object_hq_huge_west[]
static
Initial value:
= {
}

Definition at line 85 of file object_land.h.

◆ _object_hq_large_east

const DrawTileSeqStruct _object_hq_large_east[]
static
Initial value:
= {
}

Definition at line 65 of file object_land.h.

◆ _object_hq_large_north

const DrawTileSeqStruct _object_hq_large_north[]
static
Initial value:
= {
}

Definition at line 60 of file object_land.h.

◆ _object_hq_large_west

const DrawTileSeqStruct _object_hq_large_west[]
static
Initial value:
= {
}

Definition at line 70 of file object_land.h.

◆ _object_hq_medium_east

const DrawTileSeqStruct _object_hq_medium_east[]
static
Initial value:
= {
}

Definition at line 50 of file object_land.h.

◆ _object_hq_medium_north

const DrawTileSeqStruct _object_hq_medium_north[]
static
Initial value:
= {
}

Definition at line 45 of file object_land.h.

◆ _object_hq_medium_west

const DrawTileSeqStruct _object_hq_medium_west[]
static
Initial value:
= {
}

Definition at line 55 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 22 of file object_land.h.

◆ _object_nothing

const DrawTileSeqStruct _object_nothing[]
static
Initial value:
= {
}

Definition at line 13 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}},
}
static constexpr uint8_t PALETTE_MODIFIER_COLOUR
this bit is set when a recolouring process is in action
Definition sprites.h:1548

Definition at line 32 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 27 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 17 of file object_land.h.

◆ _objects

const DrawTileSprites _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})),
}
@ Autoremove
Object get automatically removed (like "owned land").
@ CannotRemove
Object can not be removed.
@ OnlyInScenedit
Object can only be constructed in the scenario editor.
@ OnlyInGame
Object can only be built in game.
@ HasNoFoundation
Do not display foundations when on a slope.
@ ScaleByWater
Object count is roughly scaled by water amount at edges.
@ ClearIncome
When object is cleared a positive income is generated instead of a cost.
#define M(x)
Helper for creating a bitset of slopes.
Definition slope_type.h:84

Specification of the original object structures.