From dba55a574210406109408d2069c41cc783f9a519 Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 27 Jan 2005 21:18:03 +0000 Subject: (svn r1701) Style police ^^ --- engine.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'engine.c') diff --git a/engine.c b/engine.c index 93cba6351..0656f88f9 100644 --- a/engine.c +++ b/engine.c @@ -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; } - - - - -- cgit v1.2.3-54-g00ecf