Changeset - r7273:b8bf2197226e
[Not reviewed]
master
0 3 0
peter1138 - 17 years ago 2007-07-17 06:56:09
peter1138@openttd.org
(svn r10603) -Codechange: avoid direct access to _engine_info
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -503,7 +503,7 @@ static int DrawRailEnginePurchaseInfo(in
 
/* 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);
src/roadveh_gui.cpp
Show inline comments
 
@@ -279,7 +279,7 @@ static void RoadVehViewWndProc(Window *w
 
		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);
src/vehicle.cpp
Show inline comments
 
@@ -2723,7 +2723,7 @@ const Livery *GetEngineLivery(EngineID e
 
								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();
0 comments (0 inline, 0 general)