mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 21:06:58 +00:00
(svn r10603) -Codechange: avoid direct access to _engine_info
This commit is contained in:
parent
3dd6362bb8
commit
306c21d6c9
@ -503,7 +503,7 @@ static int DrawRailEnginePurchaseInfo(int x, int y, EngineID engine_number, cons
|
||||
/* Draw road vehicle specific details */
|
||||
static int DrawRoadVehPurchaseInfo(int x, int y, EngineID engine_number, const RoadVehicleInfo *rvi)
|
||||
{
|
||||
bool refittable = (_engine_info[engine_number].refit_mask != 0);
|
||||
bool refittable = (EngInfo(engine_number)->refit_mask != 0);
|
||||
|
||||
/* Purchase cost - Max speed */
|
||||
SetDParam(0, GetEngineProperty(engine_number, 0x11, rvi->base_cost) * (_price.roadveh_base >> 3) >> 5);
|
||||
|
@ -279,7 +279,7 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e)
|
||||
SetWindowWidgetDisabledState(w, 11, !is_localplayer);
|
||||
/* Disable refit button if vehicle not refittable */
|
||||
SetWindowWidgetDisabledState(w, 12, !is_localplayer ||
|
||||
_engine_info[v->engine_type].refit_mask == 0);
|
||||
EngInfo(v->engine_type)->refit_mask == 0);
|
||||
|
||||
/* draw widgets & caption */
|
||||
SetDParam(0, v->index);
|
||||
|
@ -2723,7 +2723,7 @@ const Livery *GetEngineLivery(EngineID engine_type, PlayerID player, EngineID pa
|
||||
scheme = LS_FREIGHT_WAGON;
|
||||
}
|
||||
} else {
|
||||
bool is_mu = HASBIT(_engine_info[engine_type].misc_flags, EF_RAIL_IS_MU);
|
||||
bool is_mu = HASBIT(EngInfo(engine_type)->misc_flags, EF_RAIL_IS_MU);
|
||||
|
||||
switch (rvi->engclass) {
|
||||
default: NOT_REACHED();
|
||||
|
Loading…
Reference in New Issue
Block a user