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 | d2364f1d51ed868d6c9f0336c57dde46aef5fc3c (patch) | |
tree | 918dadd86e83f26d5de3c32831397bc35434bfa7 /aircraft_gui.c | |
parent | f723540fbb69d32f1ca9d5487657f39e69efc239 (diff) | |
download | openttd-d2364f1d51ed868d6c9f0336c57dde46aef5fc3c.tar.xz |
(svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[]
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r-- | aircraft_gui.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c index e22102482..3515d0c24 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -24,7 +24,7 @@ void DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number) { const AircraftVehicleInfo *avi = AircraftVehInfo(engine_number); - Engine *e = &_engines[engine_number]; + const Engine* e = GetEngine(engine_number); YearMonthDay ymd; ConvertDayToYMD(&ymd, e->intro_date); @@ -97,7 +97,8 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e) { int count = 0; int num = NUM_AIRCRAFT_ENGINES; - Engine *e = &_engines[AIRCRAFT_ENGINES_INDEX]; + const Engine* e = GetEngine(AIRCRAFT_ENGINES_INDEX); + do { if (HASBIT(e->player_avail, _local_player)) count++; @@ -109,7 +110,7 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e) { int num = NUM_AIRCRAFT_ENGINES; - Engine *e = &_engines[AIRCRAFT_ENGINES_INDEX]; + const Engine* e = GetEngine(AIRCRAFT_ENGINES_INDEX); int x = 2; int y = 15; int sel = WP(w,buildtrain_d).sel_index; |