OpenTTD Source 20241224-master-gf74b0cf984
town_land.h File Reference

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

Go to the source code of this file.

Macros

#define M(s1, p1, s2, p2, sx, sy, w, h, dz, p)   { { s1, p1 }, { s2, p2 }, sx, sy, w, h, dz, p}
 Writes the data into the Town Tile Drawing Struct.
 
#define MS(mnd, mxd, p, rc, bn, rr, mg, ca1, ca2, ca3, bf, ba, cg1, cg2, cg3)
 Make sure we have the right number of elements: 4 variants * 4 build stages for each house.
 

Variables

static const DrawBuildingsTileStruct _town_draw_tile_data []
 structure of houses graphics
 
const HouseSpec _original_house_specs []
 House specifications from original data.
 

Detailed Description

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

Definition in file town_land.h.

Macro Definition Documentation

◆ M

#define M (   s1,
  p1,
  s2,
  p2,
  sx,
  sy,
  w,
  h,
  dz,
 
)    { { s1, p1 }, { s2, p2 }, sx, sy, w, h, dz, p}

Writes the data into the Town Tile Drawing Struct.

Parameters
s1The first sprite of the building, mostly the ground sprite
p1The first sprite's palette of the building, mostly the ground sprite
s2The second sprite of the building.
p2The second sprite's palette of the building.
sxThe x-position of the sprite within the tile
sythe y-position of the sprite within the tile
wthe width of the sprite
hthe height of the sprite
dzthe virtual height of the sprite
pset to 1 if a lift is present ()
See also
DrawBuildingsTileStruct

Definition at line 24 of file town_land.h.

◆ MS

#define MS (   mnd,
  mxd,
  p,
  rc,
  bn,
  rr,
  mg,
  ca1,
  ca2,
  ca3,
  bf,
  ba,
  cg1,
  cg2,
  cg3 
)
Value:
{mnd, mxd, p, rc, bn, rr, mg, \
{ca1, ca2, ca3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, \
{INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO, INVALID_CARGO}, \
bf, ba, true, GRFFileProps(INVALID_HOUSE_ID), 0, {COLOUR_BEGIN, COLOUR_BEGIN, COLOUR_BEGIN, COLOUR_BEGIN}, \
16, NO_EXTRA_FLAG, HOUSE_NO_CLASS, {0, 2, 0, 0}, 0, 0, 0, {cg1, cg2, cg3}, }
Data related to the handling of grf files.

Make sure we have the right number of elements: 4 variants * 4 build stages for each house.

Describes the data that defines each house in the game

Parameters
mndintroduction year of the house
mxdlast year it can be built
ppopulation
rccost multiplier for removing it
bnbuilding name
rrrating decrease if removed
mgmail generation multiplier
ca1acceptance for 1st CargoID
ca2acceptance for 2nd CargoID
ca3acceptance for 3rd CargoID
bfbuilding flags (size, stadium etc...)
babuilding availability (zone, climate...)
cg11st CargoID available
cg22nd CargoID available
cg33rd CargoID available
See also
HouseSpec

Definition at line 1812 of file town_land.h.

Variable Documentation

◆ _town_draw_tile_data

const DrawBuildingsTileStruct _town_draw_tile_data[]
static

structure of houses graphics

Definition at line 27 of file town_land.h.

Referenced by DrawTile_Town().