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

OpenTTD Source 14.1

Data Structures | Macros | Variables
industry_land.h File Reference

Go to the source code of this file.

## Data Structures
struct | DrawIndustryAnimationStruct
| This is used to gather some data about animation drawing in the industry code Image_1-2-3 are in fact only offset in the sprites used by the industry. More...
struct | DrawIndustryCoordinates
| Simple structure gathering x,y coordinates for industries animations. More...

## Macros
#define | M(s1, p1, s2, p2, sx, sy, w, h, dz, p) { { s1, p1 }, { s2, p2 }, sx, sy, w, h, dz, p }
| Macro to ease the declaration of the array. More...
#define | MD(img1, img2, img3) { (50 - img1 * 2), img1, img2, img3 }
| this is ONLY used for Toy Factory. More...

## Variables
static const DrawBuildingsTileStruct | _industry_draw_tile_data [NEW_INDUSTRYTILEOFFSET *4]
| Structure for industry tiles drawing.
static const DrawIndustryAnimationStruct | _draw_industry_spec1 [96]
static const DrawIndustryCoordinates | _drawtile_proc1 [5]
static const DrawIndustryAnimationStruct | _industry_anim_offs_toys []
static const byte | _industry_anim_offs_toffee []
static const byte | _industry_anim_offs_bubbles []
static const DrawIndustryCoordinates | _coal_plant_sparks []
| Movement of the sparks , only used for Power Station. More...

## Detailed Description

Information about the behaviour of the default industry tiles.

Definition in file industry_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 }

Macro to ease the declaration of the array.

Parameters

  s1 | sprite ID of ground sprite
  p1 | palette ID of ground sprite
  s2 | sprite ID of building sprite
  p2 | palette ID of building sprite
  sx | coordinate x of the sprite
  sy | coordinate y of the sprite
  w | width of the sprite
  h | height of the sprite
  dz | virtual height of the sprite
  p | this allows to specify a special drawing procedure.

See also
  DrawBuildingsTileStruct

Definition at line 48 of file industry_land.h.

## ◆ MD

#define MD | ( |  | img1,
|  |  | img2,
|  |  | img3
| ) |  | { (50 - img1 * 2), img1, img2, img3 }

this is ONLY used for Toy Factory.

255 means no drawing

Parameters

  img1 | offset from base sprite SPR_IT_SUGAR_MINE_SIEVE
  img2 | offset from base sprite SPR_IT_SUGAR_MINE_CLOUDS
  img3 | offset from base sprite SPR_IT_SUGAR_MINE_PILE

Definition at line 871 of file industry_land.h.

## Variable Documentation

## ◆ _coal_plant_sparks

const DrawIndustryCoordinates _coal_plant_sparks[]
| static

Initial value:
= {
{11, 23},
{11, 11},
{14, 6},
{13, 3},
{18, 1},
{15, 0},
}

Movement of the sparks , only used for Power Station.

Definition at line 948 of file industry_land.h.

## ◆ _drawtile_proc1

const DrawIndustryCoordinates _drawtile_proc1[5]
| static

Initial value:
= {
{22, 73},
{17, 70},
{14, 69},
{10, 66},
{ 8, 41},
}

Definition at line 856 of file industry_land.h.

## ◆ _industry_anim_offs_bubbles

const byte _industry_anim_offs_bubbles[]
| static

Initial value:
= {
68, 69, 71, 74, 77, 80, 83, 85, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 85, 84, 83, 82, 81, 80, 79, 78,
77, 76, 75, 74, 73, 72, 71, 70, 69, 68,
}

Definition at line 938 of file industry_land.h.

## ◆ _industry_anim_offs_toffee

const byte _industry_anim_offs_toffee[]
| static

Initial value:
= {
255, 0, 0, 0, 2, 4, 6, 8, 10, 9,
7, 5, 3, 1, 255, 0, 0, 0, 2, 4,
6, 8, 10, 9, 7, 5, 3, 1, 255, 0,
0, 0, 2, 4, 6, 8, 10, 9, 7, 5,
3, 1, 255, 0, 0, 0, 2, 4, 6, 8,
10, 9, 7, 5, 3, 1, 255, 0, 0, 0,
2, 4, 6, 8, 10, 9, 7, 5, 3, 1
}

Definition at line 927 of file industry_land.h.