Changeset - r7906:fcc177c43cab
[Not reviewed]
master
0 6 0
skidd13 - 17 years ago 2007-11-18 13:55:23
skidd13@openttd.org
(svn r11457) -Fix: (r11455) Reenable the accidentaly removed one way roads option
-Change: Enable one way roads like the remove via a toolbar icon
6 files changed with 80 insertions and 37 deletions:
0 comments (0 inline, 0 general)
bin/data/openttdd.grf
Show inline comments
 
binary diff not shown
bin/data/openttdw.grf
Show inline comments
 
binary diff not shown
src/lang/english.txt
Show inline comments
 
@@ -1680,12 +1680,13 @@ STR_180E_BUILD_TRUCK_LOADING_BAY        
 
STR_180D_BUILD_PASSENGER_TRAM_STATION                           :{BLACK}Build passenger tram station
 
STR_180E_BUILD_CARGO_TRAM_STATION                               :{BLACK}Build freight tram station
 
STR_180F_BUILD_ROAD_BRIDGE                                      :{BLACK}Build road bridge
 
STR_180F_BUILD_TRAMWAY_BRIDGE                                   :{BLACK}Build tramway bridge
 
STR_1810_BUILD_ROAD_TUNNEL                                      :{BLACK}Build road tunnel
 
STR_1810_BUILD_TRAMWAY_TUNNEL                                   :{BLACK}Build tramway tunnel
 
STR_TOGGLE_ONE_WAY_ROAD                                         :{BLACK}Activate/Deactivate one way roads
 
STR_1811_TOGGLE_BUILD_REMOVE_FOR                                :{BLACK}Toggle build/remove for road construction
 
STR_1811_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS                       :{BLACK}Toggle build/remove for tramway construction
 
STR_1813_SELECT_ROAD_VEHICLE_DEPOT                              :{BLACK}Select road vehicle depot orientation
 
STR_1813_SELECT_TRAM_VEHICLE_DEPOT                              :{BLACK}Select tram vehicle depot orientation
 
STR_1814_ROAD                                                   :Road
 
STR_1815_ROAD_WITH_STREETLIGHTS                                 :Road with streetlights
src/road_gui.cpp
Show inline comments
 
@@ -26,12 +26,13 @@
 

	
 

	
 
static void ShowRVStationPicker(RoadStop::Type rs);
 
static void ShowRoadDepotPicker();
 

	
 
static bool _remove_button_clicked;
 
static bool _one_way_button_clicked;
 

	
 
/**
 
 * Define the values of the RoadFlags
 
 * @see CmdBuildLongRoad
 
 */
 
enum RoadFlags {
 
@@ -241,12 +242,13 @@ enum RoadToolbarWidgets {
 
	RTW_ROAD_Y,
 
	RTW_AUTOROAD,
 
	RTW_DEMOLISH,
 
	RTW_DEPOT,
 
	RTW_BUS_STATION,
 
	RTW_TRUCK_STATION,
 
	RTW_ONE_WAY,
 
	RTW_BUILD_BRIDGE,
 
	RTW_BUILD_TUNNEL,
 
	RTW_REMOVE,
 
};
 

	
 
typedef void OnButtonClick(Window *w);
 
@@ -304,12 +306,25 @@ static void BuildRoadClick_BusStation(Wi
 
static void BuildRoadClick_TruckStation(Window *w)
 
{
 
	if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
 
	if (HandlePlacePushButton(w, RTW_TRUCK_STATION, SPR_CURSOR_TRUCK_STATION, VHM_RECT, PlaceRoad_TruckStation)) ShowRVStationPicker(RoadStop::TRUCK);
 
}
 

	
 
/**
 
 * Function that handles the click on the
 
 *  one way road button.
 
 *
 
 * @param w The current window
 
 */
 
static void BuildRoadClick_OneWay(Window *w)
 
{
 
	if (IsWindowWidgetDisabled(w, RTW_ONE_WAY)) return;
 
	SetWindowDirty(w);
 
	ToggleWidgetLoweredState(w, RTW_ONE_WAY);
 
}
 

	
 
static void BuildRoadClick_Bridge(Window *w)
 
{
 
	HandlePlacePushButton(w, RTW_BUILD_BRIDGE, SPR_CURSOR_BRIDGE, VHM_RECT, PlaceRoad_Bridge);
 
}
 

	
 
static void BuildRoadClick_Tunnel(Window *w)
 
@@ -332,12 +347,13 @@ static OnButtonClick* const _build_road_
 
	BuildRoadClick_Y_Dir,
 
	BuildRoadClick_AutoRoad,
 
	BuildRoadClick_Demolish,
 
	BuildRoadClick_Depot,
 
	BuildRoadClick_BusStation,
 
	BuildRoadClick_TruckStation,
 
	BuildRoadClick_OneWay,
 
	BuildRoadClick_Bridge,
 
	BuildRoadClick_Tunnel,
 
	BuildRoadClick_Remove
 
};
 

	
 
/** Array with the keycode of the button-clicks for the road-toolbar */
 
@@ -346,54 +362,73 @@ static const uint16 _road_keycodes[] = {
 
	'2',
 
	'3',
 
	'4',
 
	'5',
 
	'6',
 
	'7',
 
	'8',
 
	'B',
 
	'T',
 
	'R',
 
};
 

	
 
/**
 
 * Update the remove button lowered state of the road toolbar
 
 *
 
 * @param w The toolbar window
 
 * @param clicked_widget The widget which the player clicked just now
 
 */
 
static void UpdateRemoveWidgetStatus(Window *w, int clicked_widget)
 
static void UpdateOptionWidgetStatus(Window *w, int clicked_widget)
 
{
 
	/* The remove and the one way button state is driven
 
	 * by the other buttons so they don't act on themselfs.
 
	 * Both are only valid if they are able to apply as options. */
 
	switch (clicked_widget) {
 
		case RTW_REMOVE:
 
			/* If it is the removal button that has been clicked, do nothing,
 
			 * as it is up to the other buttons to drive removal status */
 
			return;
 
			RaiseWindowWidget(w, RTW_ONE_WAY);
 
			break;
 
		case RTW_ONE_WAY:
 
			RaiseWindowWidget(w, RTW_REMOVE);
 
			break;
 
		case RTW_BUS_STATION:
 
		case RTW_TRUCK_STATION:
 
			DisableWindowWidget(w, RTW_ONE_WAY);
 
			SetWindowWidgetDisabledState(w, RTW_REMOVE, !IsWindowWidgetLowered(w, clicked_widget));
 
			break;
 
		case RTW_ROAD_X:
 
		case RTW_ROAD_Y:
 
		case RTW_AUTOROAD:
 
		case RTW_BUS_STATION:
 
		case RTW_TRUCK_STATION:
 
			/* Removal button is enabled only if the road/station
 
			 * button is still lowered.  Once raised, it has to be disabled */
 
			SetWindowWidgetDisabledState(w, RTW_REMOVE, !IsWindowWidgetLowered(w, clicked_widget));
 
			SetWindowWidgetsDisabledState(w, !IsWindowWidgetLowered(w, clicked_widget),
 
				RTW_REMOVE,
 
				RTW_ONE_WAY,
 
				WIDGET_LIST_END);
 
			break;
 

	
 
		default:
 
			/* When any other buttons than road/station, raise and
 
			 * disable the removal button */
 
			DisableWindowWidget(w, RTW_REMOVE);
 
			RaiseWindowWidget(w, RTW_REMOVE);
 
			SetWindowWidgetsDisabledState(w, true,
 
				RTW_REMOVE,
 
				RTW_ONE_WAY,
 
				WIDGET_LIST_END);
 
			SetWindowWidgetsLoweredState (w, false,
 
				RTW_REMOVE,
 
				RTW_ONE_WAY,
 
				WIDGET_LIST_END);
 
			break;
 
	}
 
}
 

	
 
static void BuildRoadToolbWndProc(Window *w, WindowEvent *e)
 
{
 
	switch (e->event) {
 
	case WE_CREATE: DisableWindowWidget(w, RTW_REMOVE); break;
 
	case WE_CREATE:
 
		SetWindowWidgetsDisabledState(w, true,
 
			RTW_REMOVE,
 
			RTW_ONE_WAY,
 
			WIDGET_LIST_END);
 
		break;
 

	
 
	case WE_PAINT:
 
		SetWindowWidgetsDisabledState(w, !CanBuildVehicleInfrastructure(VEH_ROAD),
 
			RTW_DEPOT,
 
			RTW_BUS_STATION,
 
			RTW_TRUCK_STATION,
 
@@ -401,32 +436,35 @@ static void BuildRoadToolbWndProc(Window
 
		DrawWindowWidgets(w);
 
		break;
 

	
 
	case WE_CLICK:
 
		if (e->we.click.widget >= RTW_ROAD_X) {
 
			_remove_button_clicked = false;
 
			_one_way_button_clicked = false;
 
			_build_road_button_proc[e->we.click.widget - RTW_ROAD_X](w);
 
		}
 
		UpdateRemoveWidgetStatus(w, e->we.click.widget);
 
		UpdateOptionWidgetStatus(w, e->we.click.widget);
 
		break;
 

	
 
	case WE_KEYPRESS:
 
		for (uint8 i = 0; i != lengthof(_road_keycodes); i++) {
 
			if (e->we.keypress.keycode == _road_keycodes[i]) {
 
				e->we.keypress.cont = false;
 
				_remove_button_clicked = false;
 
				_one_way_button_clicked = false;
 
				_build_road_button_proc[i](w);
 
				UpdateRemoveWidgetStatus(w, i + RTW_ROAD_X);
 
				UpdateOptionWidgetStatus(w, i + RTW_ROAD_X);
 
				break;
 
			}
 
		}
 
		MarkTileDirty(_thd.pos.x, _thd.pos.y); // redraw tile selection
 
		break;
 

	
 
	case WE_PLACE_OBJ:
 
		_remove_button_clicked = IsWindowWidgetLowered(w, RTW_REMOVE);
 
		_one_way_button_clicked = IsWindowWidgetLowered(w, RTW_ONE_WAY);
 
		_place_proc(e->we.place.tile);
 
		break;
 

	
 
	case WE_ABORT_PLACE_OBJ:
 
		RaiseWindowButtons(w);
 
		DisableWindowWidget(w, RTW_REMOVE);
 
@@ -500,13 +538,13 @@ static void BuildRoadToolbWndProc(Window
 
					/* Flag description:
 
					 * Use the first three bits (0x07) if dir == Y
 
					 * else use the last 2 bits (X dir has
 
					 * not the 3rd bit set) */
 
					_place_road_flag = (RoadFlags)((_place_road_flag & RF_DIR_Y) ? (_place_road_flag & 0x07) : (_place_road_flag >> 3));
 

	
 
					DoCommandP(end_tile, start_tile, _place_road_flag | (_cur_roadtype << 3) | _ctrl_pressed << 5, CcPlaySound1D,
 
					DoCommandP(end_tile, start_tile, _place_road_flag | (_cur_roadtype << 3) | (_one_way_button_clicked << 5), CcPlaySound1D,
 
						(_ctrl_pressed || _remove_button_clicked) ?
 
						CMD_REMOVE_LONG_ROAD | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_road) :
 
						CMD_BUILD_LONG_ROAD | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_road));
 
					break;
 
			}
 
		}
 
@@ -526,59 +564,61 @@ static void BuildRoadToolbWndProc(Window
 
	}
 
}
 

	
 
/** Widget definition of the build road toolbar */
 
static const Widget _build_road_widgets[] = {
 
{   WWT_CLOSEBOX,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,                   STR_018B_CLOSE_WINDOW},             // RTW_CLOSEBOX
 
{    WWT_CAPTION,   RESIZE_NONE,     7,    11,   227,     0,    13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},   // RTW_CAPTION
 
{  WWT_STICKYBOX,   RESIZE_NONE,     7,   228,   239,     0,    13, 0x0,                        STR_STICKY_BUTTON},                 // RTW_STICKY
 
{    WWT_CAPTION,   RESIZE_NONE,     7,    11,   250,     0,    13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},   // RTW_CAPTION
 
{  WWT_STICKYBOX,   RESIZE_NONE,     7,   251,   262,     0,    13, 0x0,                        STR_STICKY_BUTTON},                 // RTW_STICKY
 

	
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,     0,    21,    14,    35, SPR_IMG_ROAD_X_DIR,         STR_180B_BUILD_ROAD_SECTION},       // RTW_ROAD_X
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    22,    43,    14,    35, SPR_IMG_ROAD_Y_DIR,         STR_180B_BUILD_ROAD_SECTION},       // RTW_ROAD_Y
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    44,    65,    14,    35, SPR_IMG_AUTOROAD,           STR_BUILD_AUTOROAD_TIP},            // RTW_AUTOROAD
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    66,    87,    14,    35, SPR_IMG_DYNAMITE,           STR_018D_DEMOLISH_BUILDINGS_ETC},   // RTW_DEMOLISH
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    88,   109,    14,    35, SPR_IMG_ROAD_DEPOT,         STR_180C_BUILD_ROAD_VEHICLE_DEPOT}, // RTW_DEPOT
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   110,   131,    14,    35, SPR_IMG_BUS_STATION,        STR_180D_BUILD_BUS_STATION},        // RTW_BUS_STATION
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   132,   153,    14,    35, SPR_IMG_TRUCK_BAY,          STR_180E_BUILD_TRUCK_LOADING_BAY},  // RTW_TRUCK_STATION
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   153,   195,    14,    35, SPR_IMG_BRIDGE,             STR_180F_BUILD_ROAD_BRIDGE},        // RTW_BUILD_BRIDGE
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   196,   217,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_ROAD_TUNNEL},        // RTW_BUILD_TUNNEL
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   218,   239,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR},  // RTW_REMOVE
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   154,   175,    14,    35, SPR_IMG_ROAD_ONE_WAY,       STR_TOGGLE_ONE_WAY_ROAD},           // RTW_ONE_WAY
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   176,   218,    14,    35, SPR_IMG_BRIDGE,             STR_180F_BUILD_ROAD_BRIDGE},        // RTW_BUILD_BRIDGE
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   219,   240,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_ROAD_TUNNEL},        // RTW_BUILD_TUNNEL
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   241,   262,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR},  // RTW_REMOVE
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_road_desc = {
 
	WDP_ALIGN_TBR, 22, 240, 36, 240, 36,
 
	WDP_ALIGN_TBR, 22, 263, 36, 263, 36,
 
	WC_BUILD_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
 
	_build_road_widgets,
 
	BuildRoadToolbWndProc
 
};
 

	
 
/** Widget definition of the build tram toolbar */
 
static const Widget _build_tramway_widgets[] = {
 
{   WWT_CLOSEBOX,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,                   STR_018B_CLOSE_WINDOW},                     // RTW_CLOSEBOX
 
{    WWT_CAPTION,   RESIZE_NONE,     7,    11,   227,     0,    13, STR_1802_TRAMWAY_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},        // RTW_CAPTION
 
{  WWT_STICKYBOX,   RESIZE_NONE,     7,   228,   239,     0,    13, 0x0,                        STR_STICKY_BUTTON},                         // RTW_STICKY
 
{    WWT_CAPTION,   RESIZE_NONE,     7,    11,   228,     0,    13, STR_1802_TRAMWAY_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},        // RTW_CAPTION
 
{  WWT_STICKYBOX,   RESIZE_NONE,     7,   229,   240,     0,    13, 0x0,                        STR_STICKY_BUTTON},                         // RTW_STICKY
 

	
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,     0,    21,    14,    35, SPR_IMG_TRAMWAY_X_DIR,      STR_180B_BUILD_TRAMWAY_SECTION},            // RTW_ROAD_X
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    22,    43,    14,    35, SPR_IMG_TRAMWAY_Y_DIR,      STR_180B_BUILD_TRAMWAY_SECTION},            // RTW_ROAD_Y
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    44,    65,    14,    35, SPR_IMG_AUTOTRAM,           STR_BUILD_AUTOTRAM_TIP},                    // RTW_AUTOROAD
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    66,    87,    14,    35, SPR_IMG_DYNAMITE,           STR_018D_DEMOLISH_BUILDINGS_ETC},           // RTW_DEMOLISH
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    88,   109,    14,    35, SPR_IMG_ROAD_DEPOT,         STR_180C_BUILD_TRAM_VEHICLE_DEPOT},         // RTW_DEPOT
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   110,   131,    14,    35, SPR_IMG_BUS_STATION,        STR_180D_BUILD_PASSENGER_TRAM_STATION},     // RTW_BUS_STATION
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   132,   153,    14,    35, SPR_IMG_TRUCK_BAY,          STR_180E_BUILD_CARGO_TRAM_STATION},         // RTW_TRUCK_STATION
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   153,   195,    14,    35, SPR_IMG_BRIDGE,             STR_180F_BUILD_TRAMWAY_BRIDGE},             // RTW_BUILD_BRIDGE
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   196,   217,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_TRAMWAY_TUNNEL},             // RTW_BUILD_TUNNEL
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   218,   239,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS}, // RTW_REMOVE
 
{      WWT_EMPTY,   RESIZE_NONE,     0,     0,     0,     0,     0, 0x0,                        STR_NULL},                                  // RTW_ONE_WAY
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   154,   196,    14,    35, SPR_IMG_BRIDGE,             STR_180F_BUILD_TRAMWAY_BRIDGE},             // RTW_BUILD_BRIDGE
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   197,   218,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_TRAMWAY_TUNNEL},             // RTW_BUILD_TUNNEL
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   219,   240,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS}, // RTW_REMOVE
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_tramway_desc = {
 
	WDP_ALIGN_TBR, 22, 240, 36, 240, 36,
 
	WDP_ALIGN_TBR, 22, 241, 36, 241, 36,
 
	WC_BUILD_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
 
	_build_tramway_widgets,
 
	BuildRoadToolbWndProc
 
};
 

	
 
@@ -592,30 +632,31 @@ void ShowBuildRoadToolbar(RoadType roadt
 
	if (_patches.link_terraform_toolbar) ShowTerraformToolbar(w);
 
}
 

	
 
/** Widget definition of the build road toolbar in the scenario editor */
 
static const Widget _build_road_scen_widgets[] = {
 
{   WWT_CLOSEBOX,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,                   STR_018B_CLOSE_WINDOW},            // RTW_CLOSEBOX
 
{    WWT_CAPTION,   RESIZE_NONE,     7,    11,   161,     0,    13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},  // RTW_CAPTION
 
{  WWT_STICKYBOX,   RESIZE_NONE,     7,   162,   173,     0,    13, 0x0,                        STR_STICKY_BUTTON},                // RTW_STICKY
 
{    WWT_CAPTION,   RESIZE_NONE,     7,    11,   184,     0,    13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},  // RTW_CAPTION
 
{  WWT_STICKYBOX,   RESIZE_NONE,     7,   185,   196,     0,    13, 0x0,                        STR_STICKY_BUTTON},                // RTW_STICKY
 

	
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,     0,    21,    14,    35, SPR_IMG_ROAD_X_DIR,         STR_180B_BUILD_ROAD_SECTION},      // RTW_ROAD_X
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    22,    43,    14,    35, SPR_IMG_ROAD_Y_DIR,         STR_180B_BUILD_ROAD_SECTION},      // RTW_ROAD_Y
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    44,    65,    14,    35, SPR_IMG_AUTOROAD,           STR_BUILD_AUTOROAD_TIP},           // RTW_AUTOROAD
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    66,    87,    14,    35, SPR_IMG_DYNAMITE,           STR_018D_DEMOLISH_BUILDINGS_ETC},  // RTW_DEMOLISH
 
{      WWT_EMPTY,   RESIZE_NONE,     0,     0,     0,     0,     0, 0x0,                        STR_NULL},                         // RTW_DEPOT
 
{      WWT_EMPTY,   RESIZE_NONE,     0,     0,     0,     0,     0, 0x0,                        STR_NULL},                         // RTW_BUS_STATION
 
{      WWT_EMPTY,   RESIZE_NONE,     0,     0,     0,     0,     0, 0x0,                        STR_NULL},                         // RTW_TRUCK_STATION
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    88,   130,    14,    35, SPR_IMG_BRIDGE,             STR_180F_BUILD_ROAD_BRIDGE},       // RTW_BUILD_BRIDGE
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   131,   151,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_ROAD_TUNNEL},       // RTW_BUILD_TUNNEL
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   152,   173,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR}, // RTW_REMOVE
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,    88,   109,    14,    35, SPR_IMG_ROAD_ONE_WAY,       STR_TOGGLE_ONE_WAY_ROAD},          // RTW_ONE_WAY
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   110,   152,    14,    35, SPR_IMG_BRIDGE,             STR_180F_BUILD_ROAD_BRIDGE},       // RTW_BUILD_BRIDGE
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   153,   174,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_ROAD_TUNNEL},       // RTW_BUILD_TUNNEL
 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   175,   196,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR}, // RTW_REMOVE
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_road_scen_desc = {
 
	WDP_AUTO, WDP_AUTO, 174, 36, 174, 36,
 
	WDP_AUTO, WDP_AUTO, 197, 36, 197, 36,
 
	WC_SCEN_BUILD_ROAD, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
 
	_build_road_scen_widgets,
 
	BuildRoadToolbWndProc
 
};
 

	
src/table/files.h
Show inline comments
 
@@ -31,13 +31,13 @@ static FileList files_dos = {
 
		{ "TRGC.GRF",      {0xed, 0x44, 0x66, 0x37, 0xe0, 0x34, 0x10, 0x4c, 0x55, 0x59, 0xb3, 0x2c, 0x18, 0xaf, 0xe7, 0x8d} },
 
		{ "TRGH.GRF",      {0xee, 0x66, 0x16, 0xfb, 0x0e, 0x6e, 0xf6, 0xb2, 0x48, 0x92, 0xc5, 0x8c, 0x93, 0xd8, 0x6f, 0xc9} },
 
		{ "TRGT.GRF",      {0xfc, 0xde, 0x1d, 0x7e, 0x8a, 0x74, 0x19, 0x7d, 0x72, 0xa6, 0x26, 0x95, 0x88, 0x4b, 0x90, 0x9e} }
 
	},
 
	{ "SAMPLE.CAT",    {0x42, 0x2e, 0xa3, 0xdd, 0x07, 0x4d, 0x28, 0x59, 0xbb, 0x51, 0x63, 0x9a, 0x6e, 0x0e, 0x85, 0xda} },
 
	{ "CHARS.GRF",     {0x5f, 0x2e, 0xbf, 0x05, 0xb6, 0x12, 0x65, 0x81, 0xd2, 0x10, 0xa9, 0x19, 0x62, 0x41, 0x70, 0x64} },
 
	{ "OPENTTDD.GRF",  {0x85, 0x5f, 0x38, 0xa6, 0xb2, 0xc9, 0xd7, 0x51, 0xaa, 0xca, 0x0d, 0xae, 0xd9, 0x8d, 0x71, 0x98} }
 
	{ "OPENTTDD.GRF",  {0x4a, 0x9e, 0x0d, 0x41, 0x9e, 0x66, 0x13, 0x17, 0xb9, 0x61, 0x81, 0xc7, 0xca, 0xef, 0x6b, 0xdc} }
 
};
 

	
 
static FileList files_win = {
 
	{
 
		{ "TRG1R.GRF",     {0xb0, 0x4c, 0xe5, 0x93, 0xd8, 0xc5, 0x01, 0x6e, 0x07, 0x47, 0x3a, 0x74, 0x3d, 0x7d, 0x33, 0x58} }, //    0 - 4792 inclusive
 
		{ "TRGIR.GRF",     {0x0c, 0x24, 0x84, 0xff, 0x6b, 0xe4, 0x9f, 0xc6, 0x3a, 0x83, 0xbe, 0x6a, 0xb5, 0xc3, 0x8f, 0x32} }  // 4793 - 4895 inclusive
 
@@ -45,8 +45,8 @@ static FileList files_win = {
 
		{ "TRGCR.GRF",     {0x36, 0x68, 0xf4, 0x10, 0xc7, 0x61, 0xa0, 0x50, 0xb5, 0xe7, 0x09, 0x5a, 0x2b, 0x14, 0x87, 0x9b} },
 
		{ "TRGHR.GRF",     {0x06, 0xbf, 0x2b, 0x7a, 0x31, 0x76, 0x6f, 0x04, 0x8b, 0xaa, 0xc2, 0xeb, 0xe4, 0x34, 0x57, 0xb1} },
 
		{ "TRGTR.GRF",     {0xde, 0x53, 0x65, 0x05, 0x17, 0xfe, 0x66, 0x1c, 0xea, 0xa3, 0x13, 0x8c, 0x6e, 0xdb, 0x0e, 0xb8} }
 
	},
 
	{ "SAMPLE.CAT",    {0x92, 0x12, 0xe8, 0x1e, 0x72, 0xba, 0xdd, 0x4b, 0xbe, 0x1e, 0xae, 0xae, 0x66, 0x45, 0x8e, 0x10} },
 
	{ "CHARS.GRF",     {0x5f, 0x2e, 0xbf, 0x05, 0xb6, 0x12, 0x65, 0x81, 0xd2, 0x10, 0xa9, 0x19, 0x62, 0x41, 0x70, 0x64} },
 
	{ "OPENTTDW.GRF",  {0x3e, 0xff, 0xe8, 0x43, 0xc9, 0x31, 0xf6, 0x9d, 0x0b, 0x40, 0xb1, 0x64, 0xbf, 0x16, 0xde, 0x5a} }
 
	{ "OPENTTDW.GRF",  {0xe7, 0xe5, 0x4a, 0x12, 0x5c, 0xec, 0x46, 0x53, 0x1d, 0x37, 0x0a, 0xf4, 0x69, 0xf7, 0x4a, 0x9c} }
 
};
src/table/sprites.h
Show inline comments
 
@@ -44,13 +44,13 @@ enum Sprites {
 
	SPR_ASCII_SPACE_BIG   = 450,
 

	
 
	SPR_LARGE_SMALL_WINDOW = 682,
 

	
 
	/* Extra graphic spritenumbers */
 
	SPR_OPENTTD_BASE     = 4896,
 
	OPENTTD_SPRITE_COUNT = 134,
 
	OPENTTD_SPRITE_COUNT = 135,
 

	
 
	/* Halftile-selection sprites */
 
	SPR_HALFTILE_SELECTION_FLAT = SPR_OPENTTD_BASE,
 
	SPR_HALFTILE_SELECTION_DOWN = SPR_OPENTTD_BASE + 4,
 
	SPR_HALFTILE_SELECTION_UP   = SPR_OPENTTD_BASE + 8,
 

	
 
@@ -1235,12 +1235,13 @@ enum Sprites {
 
	SPR_IMG_ROAD_DEPOT    = 1295,
 
	SPR_IMG_BUS_STATION   = 749,
 
	SPR_IMG_TRUCK_BAY     = 750,
 
	SPR_IMG_BRIDGE        = 2594,
 
	SPR_IMG_ROAD_TUNNEL   = 2429,
 
	SPR_IMG_REMOVE        = 714,
 
	SPR_IMG_ROAD_ONE_WAY  = SPR_OPENTTD_BASE + 134,
 
	SPR_IMG_TRAMWAY_Y_DIR = SPR_TRAMWAY_BASE + 0,
 
	SPR_IMG_TRAMWAY_X_DIR = SPR_TRAMWAY_BASE + 1,
 
	SPR_IMG_AUTOTRAM      = SPR_OPENTTD_BASE + 84,
 

	
 
	/* rail_gui.c */
 
	SPR_IMG_RAIL_NS    = 1251,
0 comments (0 inline, 0 general)