diff options
author | tron <tron@openttd.org> | 2005-06-07 18:13:49 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-06-07 18:13:49 +0000 |
commit | fa8f46c0b7f4723c12ddefd77d619ca98b6c7c6c (patch) | |
tree | 918dadd86e83f26d5de3c32831397bc35434bfa7 /engine.c | |
parent | d0cdb45b6c634b4b7238f9b8b8cd9344cb7b1ac3 (diff) | |
download | openttd-fa8f46c0b7f4723c12ddefd77d619ca98b6c7c6c.tar.xz |
(svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[]
Diffstat (limited to 'engine.c')
-rw-r--r-- | engine.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -839,7 +839,7 @@ int32 CmdWantEnginePreview(int x, int y, uint32 flags, uint32 p1, uint32 p2) Engine *e; if (!IsEngineIndex(p1)) return CMD_ERROR; - e = DEREF_ENGINE(p1); + e = GetEngine(p1); if (GetBestPlayer(e->preview_player) != _current_player) return CMD_ERROR; if (flags & DC_EXEC) @@ -1028,7 +1028,7 @@ static void Load_ENGN(void) { int index; while ((index = SlIterateArray()) != -1) { - SlObject(&_engines[index], _engine_desc); + SlObject(GetEngine(index), _engine_desc); } } @@ -1057,7 +1057,7 @@ bool IsEngineBuildable(uint engine, byte type) // check if it's an engine that is in the engine array if (!IsEngineIndex(engine)) return false; - e = DEREF_ENGINE(engine); + e = GetEngine(engine); // check if it's an engine of specified type if (e->type != type) return false; |