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

OpenTTD Source 13.1

Macros | Variables
town_land.h File Reference

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. More...
#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. More...

## Variables
static const DrawBuildingsTileStruct | _town_draw_tile_data []
| structure of houses graphics
static 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,
|  |  | p
| ) |  | { { s1, p1 }, { s2, p2 }, sx, sy, w, h, dz, p}

Writes the data into the Town Tile Drawing Struct.

Parameters

  s1 | The first sprite of the building, mostly the ground sprite
  p1 | The first sprite's palette of the building, mostly the ground sprite
  s2 | The second sprite of the building.
  p2 | The second sprite's palette of the building.
  sx | The x-position of the sprite within the tile
  sy | the y-position of the sprite within the tile
  w | the width of the sprite
  h | the height of the sprite
  dz | the virtual height of the sprite
  p | set 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}, \
{cg1, cg2, cg3, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \
bf, ba, true, GRFFileProps(INVALID_HOUSE_ID), 0, {0, 0, 0, 0}, \
16, NO_EXTRA_FLAG, HOUSE_NO_CLASS, {0, 2, 0, 0}, 0, 0, 0}

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

  mnd | introduction year of the house
  mxd | last year it can be built
  p | population
  rc | cost multiplier for removing it
  bn | building name
  rr | rating decrease if removed
  mg | mail generation multiplier
  ca1 | acceptance for 1st CargoID
  ca2 | acceptance for 2nd CargoID
  ca3 | acceptance for 3rd CargoID
  bf | building flags (size, stadium etc...)
  ba | building availability (zone, climate...)
  cg1 | 1st CargoID available
  cg2 | 2nd CargoID available
  cg3 | 3rd CargoID available

See also
  HouseSpec

Definition at line 1812 of file town_land.h.

GRFFileProps
Data related to the handling of grf files.
Definition: newgrf_commons.h:325
CT_INVALID
@ CT_INVALID
Invalid cargo type.
Definition: cargo_type.h:69