OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
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)
| Describes the data that defines each house in the game.

## Functions
| assert_compile (lengthof(_town_draw_tile_data)==(NEW_HOUSE_OFFSET)*4 *4)
| Make sure we have the right number of elements: 4 variants * 4 build stages for each house.
| assert_compile (lengthof(_original_house_specs)==NEW_HOUSE_OFFSET)
| Make sure we have the right number of elements: one entry for each house.

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

#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 26 of file town_land.h.

#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}, {cg1, cg2, cg3}, 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}

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 1814 of file town_land.h.