src/newgrf_canal.h
author rubidium
Sat, 17 Nov 2007 12:42:15 +0000
changeset 7898 7c6a9c9030b5
parent 6583 71d62b85d3ad
child 8360 3021c928de6c
permissions -rw-r--r--
(svn r11449) -Fix [FS#1160]: trams could deadlock themselves. As of now trams will turn as roadvehicles do when the player cannot build a tram track piece on the next tile without destroying anything. It will not turn when the player can build the before mentioned track piece on the 'next' tile.
6583
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     1
/* $Id$ */
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     2
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     3
#ifndef NEWGRF_CANAL_H
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     4
#define NEWGRF_CANAL_H
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     5
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     6
/** List of different canal 'features'.
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     7
 * Each feature gets an entry in the canal spritegroup table */
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     8
enum CanalFeature {
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     9
	CF_WATERSLOPE,
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    10
	CF_LOCKS,
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    11
	CF_DIKES,
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    12
	CF_ICON,
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    13
	CF_DOCKS,
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    14
	CF_END,
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    15
};
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    16
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    17
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    18
/** Table of canal 'feature' sprite groups */
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    19
extern const SpriteGroup *_canal_sg[CF_END];
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    20
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    21
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    22
/** Lookup the base sprite to use for a canal.
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    23
 * @param feature Which canal feature we want.
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    24
 * @param tile Tile index of canal, if appropriate.
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    25
 * @return Base sprite returned by GRF, or 0 if none.
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    26
 */
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    27
SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile);
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    28
71d62b85d3ad (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    29
#endif /* NEWGRF_CANAL_H */