src/newgrf_canal.h
author Tero Marttila <terom@fixme.fi>
Tue, 22 Jul 2008 23:20:33 +0300
changeset 11184 88c967f1422b
parent 10429 1b99254f9607
permissions -rw-r--r--
add an empty bin/cache dir
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
10429
1b99254f9607 (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents: 8868
diff changeset
     3
/** @file newgrf_canal.h Handling of NewGRF canals. */
1b99254f9607 (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents: 8868
diff changeset
     4
7079
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     5
#ifndef NEWGRF_CANAL_H
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     6
#define NEWGRF_CANAL_H
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     7
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     8
/** List of different canal 'features'.
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
     9
 * 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
    10
enum CanalFeature {
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    11
	CF_WATERSLOPE,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    12
	CF_LOCKS,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    13
	CF_DIKES,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    14
	CF_ICON,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    15
	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
    16
	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
    17
	CF_RIVER_EDGE,
7079
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    18
	CF_END,
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    19
};
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    20
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    21
8868
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    22
struct WaterFeature {
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    23
	const SpriteGroup *group;
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    24
	uint8 callbackmask;
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    25
	uint8 flags;
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    26
};
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    27
822816ce1fcb (svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents: 8856
diff changeset
    28
7079
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    29
/** 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
    30
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
    31
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    32
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    33
/** 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
    34
 * @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
    35
 * @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
    36
 * @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
    37
 */
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    38
SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile);
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    39
35743c461482 (svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff changeset
    40
#endif /* NEWGRF_CANAL_H */