src/newgrf_canal.h
author rubidium
Mon, 31 Mar 2008 22:09:27 +0000
branch0.6
changeset 9357 bafe57f3402a
parent 8868 822816ce1fcb
child 10429 1b99254f9607
permissions -rw-r--r--
(svn r12524) [0.6] -Update: some documentation.
7079
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     1
/* $Id$ */
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     2
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     3
#ifndef NEWGRF_CANAL_H
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     4
#define NEWGRF_CANAL_H
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     5
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     6
/** List of different canal 'features'.
35743c461482 (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 */
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     8
enum CanalFeature {
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     9
	CF_WATERSLOPE,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    10
	CF_LOCKS,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    11
	CF_DIKES,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    12
	CF_ICON,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    13
	CF_DOCKS,
8856
7f8b5c11bea6 (svn r11926) -Feature: Rivers. Graphics must be provided by NewGRF else rivers are drawn as canals. Rivers can currently only be placed with-in the scenario editor.
peter1138
parents: 7079
diff changeset
    14
	CF_RIVER_SLOPE,
7f8b5c11bea6 (svn r11926) -Feature: Rivers. Graphics must be provided by NewGRF else rivers are drawn as canals. Rivers can currently only be placed with-in the scenario editor.
peter1138
parents: 7079
diff changeset
    15
	CF_RIVER_EDGE,
7079
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    16
	CF_END,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    17
};
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    18
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    19
8868
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    20
struct WaterFeature {
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    21
	const SpriteGroup *group;
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    22
	uint8 callbackmask;
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    23
	uint8 flags;
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    24
};
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    25
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    26
7079
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    27
/** Table of canal 'feature' sprite groups */
8868
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    28
extern WaterFeature _water_feature[CF_END];
7079
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    29
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    30
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    31
/** Lookup the base sprite to use for a canal.
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    32
 * @param feature Which canal feature we want.
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    33
 * @param tile Tile index of canal, if appropriate.
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    34
 * @return Base sprite returned by GRF, or 0 if none.
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    35
 */
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    36
SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile);
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    37
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    38
#endif /* NEWGRF_CANAL_H */