author | rubidium |
Sun, 25 May 2008 19:17:03 +0000 | |
changeset 9354 | 845e07db4549 |
parent 9111 | 48ce04029fe4 |
child 9750 | 7114408dd1fa |
permissions | -rw-r--r-- |
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 |
|
9111
48ce04029fe4
(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:
8372
diff
changeset
|
3 |
/** @file newgrf_canal.h Handling of NewGRF canals. */ |
48ce04029fe4
(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:
8372
diff
changeset
|
4 |
|
6583
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
5 |
#ifndef NEWGRF_CANAL_H |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
6 |
#define NEWGRF_CANAL_H |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
7 |
|
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
8 |
/** List of different canal 'features'. |
71d62b85d3ad
(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 */ |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
10 |
enum CanalFeature { |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
11 |
CF_WATERSLOPE, |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
12 |
CF_LOCKS, |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
13 |
CF_DIKES, |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
14 |
CF_ICON, |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
15 |
CF_DOCKS, |
8360
3021c928de6c
(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:
6583
diff
changeset
|
16 |
CF_RIVER_SLOPE, |
3021c928de6c
(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:
6583
diff
changeset
|
17 |
CF_RIVER_EDGE, |
6583
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
18 |
CF_END, |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
19 |
}; |
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 |
|
8372
49f8ca06527d
(svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents:
8360
diff
changeset
|
22 |
struct WaterFeature { |
49f8ca06527d
(svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents:
8360
diff
changeset
|
23 |
const SpriteGroup *group; |
49f8ca06527d
(svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents:
8360
diff
changeset
|
24 |
uint8 callbackmask; |
49f8ca06527d
(svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents:
8360
diff
changeset
|
25 |
uint8 flags; |
49f8ca06527d
(svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents:
8360
diff
changeset
|
26 |
}; |
49f8ca06527d
(svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents:
8360
diff
changeset
|
27 |
|
49f8ca06527d
(svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents:
8360
diff
changeset
|
28 |
|
6583
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
29 |
/** Table of canal 'feature' sprite groups */ |
8372
49f8ca06527d
(svn r11938) -Codechange: support loading of canal/river properties (though still ignored)
peter1138
parents:
8360
diff
changeset
|
30 |
extern WaterFeature _water_feature[CF_END]; |
6583
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
31 |
|
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
32 |
|
71d62b85d3ad
(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. |
71d62b85d3ad
(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. |
71d62b85d3ad
(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. |
71d62b85d3ad
(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. |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
37 |
*/ |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
38 |
SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile); |
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
39 |
|
71d62b85d3ad
(svn r9797) -Feature: [NewGRF] Add action 1, 2 and 3 support for canals.
peter1138
parents:
diff
changeset
|
40 |
#endif /* NEWGRF_CANAL_H */ |