OpenTTD Source 20241224-master-gf74b0cf984
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, 0, CalendarTime::MAX_DATE + 1, flags, 0, height, 1, gen_amount}
 
#define T   1
 
#define A   2
 
#define S   4
 
#define Y   8
 

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   2

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, 0, CalendarTime::MAX_DATE + 1, flags, 0, height, 1, gen_amount}

Definition at line 124 of file object_land.h.

◆ S

#define S   4

Definition at line 133 of file object_land.h.

◆ T

#define T   1

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   8

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, T|A|S , 15, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT),
M(STR_LAI_OBJECT_DESCRIPTION_LIGHTHOUSE, 0x11, 0, 0, 8, T|A , 8, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT | OBJECT_FLAG_SCALE_BY_WATER),
M(STR_TOWN_BUILDING_NAME_STATUE_1, 0x11, 0, 0, 5, T|S|A|Y, 0, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_ONLY_IN_SCENEDIT),
M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND, 0x11, 10, 10, 0, T|S|A|Y, 0, OBJECT_FLAG_AUTOREMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_CLEAR_INCOME | OBJECT_FLAG_HAS_NO_FOUNDATION ),
M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS, 0x22, 0, 0, 7, T|S|A|Y, 0, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME),
}
@ OBJECT_FLAG_CLEAR_INCOME
When object is cleared a positive income is generated instead of a cost.
@ OBJECT_FLAG_HAS_NO_FOUNDATION
Do not display foundations when on a slope.
@ OBJECT_FLAG_AUTOREMOVE
Object get automatically removed (like "owned land").
@ OBJECT_FLAG_SCALE_BY_WATER
Object count is roughly scaled by water amount at edges.
@ OBJECT_FLAG_CANNOT_REMOVE
Object can not be removed.
@ OBJECT_FLAG_ONLY_IN_GAME
Object can only be built in game.
@ OBJECT_FLAG_ONLY_IN_SCENEDIT
Object can only be constructed in the scenario editor.
#define M(x)
Helper for creating a bitset of slopes.
Definition slope_type.h:84

Specification of the original object structures.