Merge branch 'master' into jgrpp
# Conflicts: # src/core/strong_typedef_type.hpp # src/gfx.cpp # src/group_cmd.cpp # src/industry_cmd.cpp # src/map_func.h # src/newgrf_debug_gui.cpp # src/order_cmd.cpp # src/pathfinder/follow_track.hpp # src/rail_cmd.cpp # src/road_cmd.cpp # src/road_gui.cpp # src/saveload/saveload.cpp # src/screenshot.cpp # src/smallmap_gui.cpp # src/station_cmd.cpp # src/strings.cpp # src/tile_type.h # src/timetable_gui.cpp # src/town_cmd.cpp # src/train_cmd.cpp # src/viewport.cpp
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
/** @file roadveh_gui.cpp GUI for road vehicles. */
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "core/backup_type.hpp"
|
||||
#include "roadveh.h"
|
||||
#include "window_gui.h"
|
||||
#include "strings_func.h"
|
||||
@@ -136,13 +137,12 @@ void DrawRoadVehImage(const Vehicle *v, const Rect &r, VehicleID selection, Engi
|
||||
Direction dir = rtl ? DIR_E : DIR_W;
|
||||
const RoadVehicle *u = RoadVehicle::From(v);
|
||||
|
||||
DrawPixelInfo tmp_dpi, *old_dpi;
|
||||
DrawPixelInfo tmp_dpi;
|
||||
int max_width = r.Width();
|
||||
|
||||
if (!FillDrawPixelInfo(&tmp_dpi, r.left, r.top, r.Width(), r.Height())) return;
|
||||
|
||||
old_dpi = _cur_dpi;
|
||||
_cur_dpi = &tmp_dpi;
|
||||
AutoRestoreBackup dpi_backup(_cur_dpi, &tmp_dpi);
|
||||
|
||||
int px = rtl ? max_width + skip : -skip;
|
||||
int y = r.Height() / 2;
|
||||
@@ -161,8 +161,6 @@ void DrawRoadVehImage(const Vehicle *v, const Rect &r, VehicleID selection, Engi
|
||||
px += rtl ? -width : width;
|
||||
}
|
||||
|
||||
_cur_dpi = old_dpi;
|
||||
|
||||
if (v->index == selection) {
|
||||
int height = ScaleSpriteTrad(12);
|
||||
Rect hr = {(rtl ? px : 0), 0, (rtl ? max_width : px) - 1, height - 1};
|
||||
|
Reference in New Issue
Block a user