diff options
author | tron <tron@openttd.org> | 2005-01-27 21:18:03 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-27 21:18:03 +0000 |
commit | 3e0dcfd47fede1060313de42ee75c9f882ae3400 (patch) | |
tree | 1b0995dede73063087b7c888a7149b0ea4eace31 /engine.c | |
parent | 99338d278da52e2f71fe8c4d3f05449a1ad24144 (diff) | |
download | openttd-3e0dcfd47fede1060313de42ee75c9f882ae3400.tar.xz |
(svn r1701) Style police ^^
Diffstat (limited to 'engine.c')
-rw-r--r-- | engine.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -906,17 +906,20 @@ const ChunkHandler _engine_chunk_handlers[] = { { 'ENGS', LoadSave_ENGS, LoadSave_ENGS, CH_RIFF | CH_LAST}, }; + /* - * returns true if an engine is valid, and it is of the specified type, and buildable by the current player, false otherwise + * returns true if an engine is valid, of the specified type, and buildable by + * the current player, false otherwise * * engine = index of the engine to check * type = the type the engine should be of (VEH_xxx) */ -bool IsEngineBuildable(int engine, byte type) { - Engine *e; +bool IsEngineBuildable(uint engine, byte type) +{ + const Engine *e; // check if it's an engine that is in the engine array - if (0 > engine || engine >= TOTAL_NUM_ENGINES ) return false; + if (engine >= TOTAL_NUM_ENGINES) return false; e = DEREF_ENGINE(engine); @@ -928,7 +931,3 @@ bool IsEngineBuildable(int engine, byte type) { return true; } - - - - |