diff options
author | rubidium <rubidium@openttd.org> | 2006-08-22 14:38:37 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2006-08-22 14:38:37 +0000 |
commit | 480af9c9171badb7db906d2cc05856f4c2d87b73 (patch) | |
tree | 2a3621a92a3d30384ea51e0898d08f035a559915 | |
parent | 5f4dbbd52264b986efc248a6ccb02dbde4ca6c0e (diff) | |
download | openttd-480af9c9171badb7db906d2cc05856f4c2d87b73.tar.xz |
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
-rw-r--r-- | ai/default/default.c | 89 | ||||
-rw-r--r-- | aircraft_cmd.c | 50 | ||||
-rw-r--r-- | aircraft_gui.c | 150 | ||||
-rw-r--r-- | airport.h | 84 | ||||
-rw-r--r-- | airport_gui.c | 12 | ||||
-rw-r--r-- | airport_movement.h | 1276 | ||||
-rw-r--r-- | bridge_gui.c | 16 | ||||
-rw-r--r-- | clear_cmd.c | 26 | ||||
-rw-r--r-- | command.h | 216 | ||||
-rw-r--r-- | date.c | 24 | ||||
-rw-r--r-- | depot.c | 6 | ||||
-rw-r--r-- | disaster_cmd.c | 32 | ||||
-rw-r--r-- | dock_gui.c | 46 | ||||
-rw-r--r-- | dummy_land.c | 26 | ||||
-rw-r--r-- | economy.c | 126 | ||||
-rw-r--r-- | engine.c | 58 | ||||
-rw-r--r-- | engine.h | 20 | ||||
-rw-r--r-- | engine_gui.c | 8 | ||||
-rw-r--r-- | fios.h | 22 | ||||
-rw-r--r-- | genworld_gui.c | 150 | ||||
-rw-r--r-- | gfx.c | 10 | ||||
-rw-r--r-- | graph_gui.c | 144 | ||||
-rw-r--r-- | gui.h | 4 | ||||
-rw-r--r-- | industry.h | 76 | ||||
-rw-r--r-- | industry_cmd.c | 92 | ||||
-rw-r--r-- | industry_gui.c | 228 | ||||
-rw-r--r-- | intro_gui.c | 36 | ||||
-rw-r--r-- | landscape.c | 12 | ||||
-rw-r--r-- | main_gui.c | 282 | ||||
-rw-r--r-- | map.h | 2 | ||||
-rw-r--r-- | misc.c | 72 | ||||
-rw-r--r-- | misc_gui.c | 232 | ||||
-rw-r--r-- | music_gui.c | 58 | ||||
-rw-r--r-- | network.h | 60 | ||||
-rw-r--r-- | network_gui.c | 108 | ||||
-rw-r--r-- | network_udp.c | 14 | ||||
-rw-r--r-- | newgrf_cargo.c | 40 | ||||
-rw-r--r-- | newgrf_engine.h | 6 | ||||
-rw-r--r-- | news.h | 42 | ||||
-rw-r--r-- | news_gui.c | 70 | ||||
-rw-r--r-- | openttd.c | 32 | ||||
-rw-r--r-- | openttd.h | 328 | ||||
-rw-r--r-- | order.h | 2 | ||||
-rw-r--r-- | order_cmd.c | 8 | ||||
-rw-r--r-- | order_gui.c | 76 | ||||
-rw-r--r-- | pathfind.c | 60 | ||||
-rw-r--r-- | player.h | 40 | ||||
-rw-r--r-- | player_gui.c | 100 | ||||
-rw-r--r-- | players.c | 184 | ||||
-rw-r--r-- | rail.h | 66 | ||||
-rw-r--r-- | rail_cmd.c | 26 | ||||
-rw-r--r-- | rail_gui.c | 176 | ||||
-rw-r--r-- | rail_map.h | 24 | ||||
-rw-r--r-- | road_cmd.c | 26 | ||||
-rw-r--r-- | road_gui.c | 96 | ||||
-rw-r--r-- | roadveh_cmd.c | 2 | ||||
-rw-r--r-- | roadveh_gui.c | 134 | ||||
-rw-r--r-- | saveload.h | 104 | ||||
-rw-r--r-- | settings.c | 16 | ||||
-rw-r--r-- | settings.h | 2 | ||||
-rw-r--r-- | settings_gui.c | 150 | ||||
-rw-r--r-- | ship_cmd.c | 16 | ||||
-rw-r--r-- | ship_gui.c | 144 | ||||
-rw-r--r-- | signs.c | 14 | ||||
-rw-r--r-- | slope.h | 40 | ||||
-rw-r--r-- | smallmap_gui.c | 324 | ||||
-rw-r--r-- | spritecache.c | 4 | ||||
-rw-r--r-- | station.h | 38 | ||||
-rw-r--r-- | station_cmd.c | 90 | ||||
-rw-r--r-- | station_gui.c | 52 | ||||
-rw-r--r-- | strgen/strgen.c | 30 | ||||
-rw-r--r-- | table/ai_rail.h | 396 | ||||
-rw-r--r-- | table/clear_land.h | 16 | ||||
-rw-r--r-- | table/elrail_data.h | 20 | ||||
-rw-r--r-- | table/files.h | 30 | ||||
-rw-r--r-- | table/genland.h | 300 | ||||
-rw-r--r-- | table/industry_land.h | 104 | ||||
-rw-r--r-- | table/road_land.h | 82 | ||||
-rw-r--r-- | table/roadveh.h | 1824 | ||||
-rw-r--r-- | table/train_cmd.h | 18 | ||||
-rw-r--r-- | table/unmovable_land.h | 4 | ||||
-rw-r--r-- | tile.h | 4 | ||||
-rw-r--r-- | town.h | 34 | ||||
-rw-r--r-- | town_cmd.c | 162 | ||||
-rw-r--r-- | town_gui.c | 68 | ||||
-rw-r--r-- | train_cmd.c | 24 | ||||
-rw-r--r-- | train_gui.c | 134 | ||||
-rw-r--r-- | tree_cmd.c | 26 | ||||
-rw-r--r-- | tunnelbridge_cmd.c | 52 | ||||
-rw-r--r-- | variables.h | 216 | ||||
-rw-r--r-- | vehicle.c | 558 | ||||
-rw-r--r-- | vehicle.h | 106 | ||||
-rw-r--r-- | vehicle_gui.c | 40 | ||||
-rw-r--r-- | viewport.h | 48 | ||||
-rw-r--r-- | water_cmd.c | 28 | ||||
-rw-r--r-- | waypoint.c | 22 | ||||
-rw-r--r-- | window.h | 218 |
97 files changed, 5481 insertions, 5482 deletions
diff --git a/ai/default/default.c b/ai/default/default.c index ebd964319..cd04bae21 100644 --- a/ai/default/default.c +++ b/ai/default/default.c @@ -34,30 +34,30 @@ static uint _ai_service_interval; typedef void AiStateAction(Player *p); enum { - AIS_0 = 0, - AIS_1 = 1, - AIS_VEH_LOOP = 2, - AIS_VEH_CHECK_REPLACE_VEHICLE = 3, - AIS_VEH_DO_REPLACE_VEHICLE = 4, - AIS_WANT_NEW_ROUTE = 5, - AIS_BUILD_DEFAULT_RAIL_BLOCKS = 6, - AIS_BUILD_RAIL = 7, - AIS_BUILD_RAIL_VEH = 8, - AIS_DELETE_RAIL_BLOCKS = 9, - AIS_BUILD_DEFAULT_ROAD_BLOCKS = 10, - AIS_BUILD_ROAD = 11, - AIS_BUILD_ROAD_VEHICLES = 12, - AIS_DELETE_ROAD_BLOCKS = 13, - AIS_AIRPORT_STUFF = 14, + AIS_0 = 0, + AIS_1 = 1, + AIS_VEH_LOOP = 2, + AIS_VEH_CHECK_REPLACE_VEHICLE = 3, + AIS_VEH_DO_REPLACE_VEHICLE = 4, + AIS_WANT_NEW_ROUTE = 5, + AIS_BUILD_DEFAULT_RAIL_BLOCKS = 6, + AIS_BUILD_RAIL = 7, + AIS_BUILD_RAIL_VEH = 8, + AIS_DELETE_RAIL_BLOCKS = 9, + AIS_BUILD_DEFAULT_ROAD_BLOCKS = 10, + AIS_BUILD_ROAD = 11, + AIS_BUILD_ROAD_VEHICLES = 12, + AIS_DELETE_ROAD_BLOCKS = 13, + AIS_AIRPORT_STUFF = 14, AIS_BUILD_DEFAULT_AIRPORT_BLOCKS = 15, - AIS_BUILD_AIRCRAFT_VEHICLES = 16, - AIS_CHECK_SHIP_STUFF = 17, - AIS_BUILD_DEFAULT_SHIP_BLOCKS = 18, - AIS_DO_SHIP_STUFF = 19, - AIS_SELL_VEHICLE = 20, - AIS_REMOVE_STATION = 21, - AIS_REMOVE_TRACK = 22, - AIS_REMOVE_SINGLE_RAIL_TILE = 23 + AIS_BUILD_AIRCRAFT_VEHICLES = 16, + AIS_CHECK_SHIP_STUFF = 17, + AIS_BUILD_DEFAULT_SHIP_BLOCKS = 18, + AIS_DO_SHIP_STUFF = 19, + AIS_SELL_VEHICLE = 20, + AIS_REMOVE_STATION = 21, + AIS_REMOVE_TRACK = 22, + AIS_REMOVE_SINGLE_RAIL_TILE = 23 }; @@ -1668,24 +1668,24 @@ static int AiBuildDefaultRailTrack(TileIndex tile, byte p0, byte p1, byte p2, by static const byte _terraform_up_flags[] = { 14, 13, 12, 11, - 10, 9, 8, 7, - 6, 5, 4, 3, - 2, 1, 0, 1, - 2, 1, 4, 1, - 2, 1, 8, 1, - 2, 1, 4, 2, - 2, 1 + 10, 9, 8, 7, + 6, 5, 4, 3, + 2, 1, 0, 1, + 2, 1, 4, 1, + 2, 1, 8, 1, + 2, 1, 4, 2, + 2, 1 }; static const byte _terraform_down_flags[] = { - 1, 2, 3, 4, - 5, 6, 1, 8, + 1, 2, 3, 4, + 5, 6, 1, 8, 9, 10, 8, 12, - 4, 2, 0, 0, - 1, 2, 3, 4, - 5, 6, 2, 8, + 4, 2, 0, 0, + 1, 2, 3, 4, + 5, 6, 2, 8, 9, 10, 1, 12, - 8, 4 + 8, 4 }; static void AiDoTerraformLand(TileIndex tile, int dir, int unk, int mode) @@ -1865,14 +1865,14 @@ typedef struct AiRailFinder { } AiRailFinder; static const byte _ai_table_15[4][8] = { - {0, 0, 4, 3, 3, 1, 128+0, 64}, - {1, 1, 2, 0, 4, 2, 128+1, 65}, - {0, 2, 2, 3, 5, 1, 128+2, 66}, - {1, 3, 5, 0, 3, 2, 128+3, 67} + {0, 0, 4, 3, 3, 1, 128 + 0, 64}, + {1, 1, 2, 0, 4, 2, 128 + 1, 65}, + {0, 2, 2, 3, 5, 1, 128 + 2, 66}, + {1, 3, 5, 0, 3, 2, 128 + 3, 67} }; -static const byte _dir_table_1[] = {3, 9, 12, 6}; -static const byte _dir_table_2[] = {12, 6, 3, 9}; +static const byte _dir_table_1[] = { 3, 9, 12, 6}; +static const byte _dir_table_2[] = {12, 6, 3, 9}; static bool AiIsTileBanned(const Player* p, TileIndex tile, byte val) @@ -2729,8 +2729,9 @@ typedef struct AiRoadEnum { } AiRoadEnum; static const byte _dir_by_track[] = { - 0,1,0,1,2,1, 0,0, - 2,3,3,2,3,0, + 0, 1, 0, 1, 2, 1, + 0, 0, + 2, 3, 3, 2, 3, 0, }; static void AiBuildRoadRecursive(AiRoadFinder *arf, TileIndex tile, int dir); diff --git a/aircraft_cmd.c b/aircraft_cmd.c index 5cbc503ec..12468ee9e 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -1703,36 +1703,36 @@ static void AircraftEventHandler_HeliEndLanding(Vehicle *v, const AirportFTAClas typedef void AircraftStateHandler(Vehicle *v, const AirportFTAClass *Airport); static AircraftStateHandler * const _aircraft_state_handlers[] = { - AircraftEventHandler_General, // TO_ALL = 0 - AircraftEventHandler_InHangar, // HANGAR = 1 - AircraftEventHandler_AtTerminal, // TERM1 = 2 - AircraftEventHandler_AtTerminal, // TERM2 = 3 - AircraftEventHandler_AtTerminal, // TERM3 = 4 - AircraftEventHandler_AtTerminal, // TERM4 = 5 - AircraftEventHandler_AtTerminal, // TERM5 = 6 - AircraftEventHandler_AtTerminal, // TERM6 = 7 - AircraftEventHandler_AtTerminal, // HELIPAD1 = 8 - AircraftEventHandler_AtTerminal, // HELIPAD2 = 9 - AircraftEventHandler_TakeOff, // TAKEOFF = 10 - AircraftEventHandler_StartTakeOff, // STARTTAKEOFF = 11 - AircraftEventHandler_EndTakeOff, // ENDTAKEOFF = 12 - AircraftEventHandler_HeliTakeOff, // HELITAKEOFF = 13 - AircraftEventHandler_Flying, // FLYING = 14 - AircraftEventHandler_Landing, // LANDING = 15 - AircraftEventHandler_EndLanding, // ENDLANDING = 16 - AircraftEventHandler_HeliLanding, // HELILANDING = 17 - AircraftEventHandler_HeliEndLanding,// HELIENDLANDING = 18 - AircraftEventHandler_AtTerminal, // TERM7 = 19 - AircraftEventHandler_AtTerminal, // TERM8 = 20 - AircraftEventHandler_AtTerminal, // HELIPAD3 = 21 - AircraftEventHandler_AtTerminal, // HELIPAD4 = 22 + AircraftEventHandler_General, // TO_ALL = 0 + AircraftEventHandler_InHangar, // HANGAR = 1 + AircraftEventHandler_AtTerminal, // TERM1 = 2 + AircraftEventHandler_AtTerminal, // TERM2 = 3 + AircraftEventHandler_AtTerminal, // TERM3 = 4 + AircraftEventHandler_AtTerminal, // TERM4 = 5 + AircraftEventHandler_AtTerminal, // TERM5 = 6 + AircraftEventHandler_AtTerminal, // TERM6 = 7 + AircraftEventHandler_AtTerminal, // HELIPAD1 = 8 + AircraftEventHandler_AtTerminal, // HELIPAD2 = 9 + AircraftEventHandler_TakeOff, // TAKEOFF = 10 + AircraftEventHandler_StartTakeOff, // STARTTAKEOFF = 11 + AircraftEventHandler_EndTakeOff, // ENDTAKEOFF = 12 + AircraftEventHandler_HeliTakeOff, // HELITAKEOFF = 13 + AircraftEventHandler_Flying, // FLYING = 14 + AircraftEventHandler_Landing, // LANDING = 15 + AircraftEventHandler_EndLanding, // ENDLANDING = 16 + AircraftEventHandler_HeliLanding, // HELILANDING = 17 + AircraftEventHandler_HeliEndLanding, // HELIENDLANDING = 18 + AircraftEventHandler_AtTerminal, // TERM7 = 19 + AircraftEventHandler_AtTerminal, // TERM8 = 20 + AircraftEventHandler_AtTerminal, // HELIPAD3 = 21 + AircraftEventHandler_AtTerminal, // HELIPAD4 = 22 }; -static void AirportClearBlock(const Vehicle* v, const AirportFTAClass* Airport) +static void AirportClearBlock(const Vehicle *v, const AirportFTAClass *Airport) { // we have left the previous block, and entered the new one. Free the previous block if (Airport->layout[v->u.air.previous_pos].block != Airport->layout[v->u.air.pos].block) { - Station* st = GetStation(v->u.air.targetairport); + Station *st = GetStation(v->u.air.targetairport); CLRBITS(st->airport_flags, Airport->layout[v->u.air.previous_pos].block); } diff --git a/aircraft_gui.c b/aircraft_gui.c index 41710c10f..1bb138e0b 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -224,14 +224,14 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e) } static const Widget _new_aircraft_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_A005_NEW_AIRCRAFT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 227, 14, 109, 0x401, STR_A025_AIRCRAFT_SELECTION_LIST}, -{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 228, 239, 14, 109, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_IMGBTN, RESIZE_TB, 14, 0, 239, 110, 181, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 114, 182, 193, STR_A006_BUILD_AIRCRAFT, STR_A026_BUILD_THE_HIGHLIGHTED_AIRCRAFT}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 115, 227, 182, 193, STR_A037_RENAME, STR_A038_RENAME_AIRCRAFT_TYPE}, -{ WWT_RESIZEBOX, RESIZE_TB, 14, 228, 239, 182, 193, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_A005_NEW_AIRCRAFT, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 227, 14, 109, 0x401, STR_A025_AIRCRAFT_SELECTION_LIST }, +{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 228, 239, 14, 109, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST }, +{ WWT_IMGBTN, RESIZE_TB, 14, 0, 239, 110, 181, 0x0, STR_NULL }, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 114, 182, 193, STR_A006_BUILD_AIRCRAFT, STR_A026_BUILD_THE_HIGHLIGHTED_AIRCRAFT }, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 115, 227, 182, 193, STR_A037_RENAME, STR_A038_RENAME_AIRCRAFT_TYPE }, +{ WWT_RESIZEBOX, RESIZE_TB, 14, 228, 239, 182, 193, 0x0, STR_RESIZE_BUTTON }, { WIDGETS_END}, }; @@ -311,11 +311,11 @@ static void AircraftRefitWndProc(Window *w, WindowEvent *e) } static const Widget _aircraft_refit_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_A03C_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 145, 0x0, STR_A03E_SELECT_TYPE_OF_CARGO_FOR}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 146, 167, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 168, 179, STR_A03D_REFIT_AIRCRAFT, STR_A03F_REFIT_AIRCRAFT_TO_CARRY}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_A03C_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 145, 0x0, STR_A03E_SELECT_TYPE_OF_CARGO_FOR }, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 146, 167, 0x0, STR_NULL }, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 168, 179, STR_A03D_REFIT_AIRCRAFT, STR_A03F_REFIT_AIRCRAFT_TO_CARRY }, { WIDGETS_END}, }; @@ -467,20 +467,20 @@ do_change_service_int: static const Widget _aircraft_details_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 349, 0, 13, STR_A00C_DETAILS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 350, 389, 0, 13, STR_01AA_NAME, STR_A032_NAME_AIRCRAFT}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 389, 14, 55, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 389, 56, 101, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 102, 107, STR_0188, STR_884D_INCREASE_SERVICING_INTERVAL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 108, 113, STR_0189, STR_884E_DECREASE_SERVICING_INTERVAL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 11, 389, 102, 113, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 349, 0, 13, STR_A00C_DETAILS, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 350, 389, 0, 13, STR_01AA_NAME, STR_A032_NAME_AIRCRAFT }, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 389, 14, 55, 0x0, STR_NULL }, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 389, 56, 101, 0x0, STR_NULL }, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 102, 107, STR_0188, STR_884D_INCREASE_SERVICING_INTERVAL }, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 108, 113, STR_0189, STR_884E_DECREASE_SERVICING_INTERVAL }, +{ WWT_IMGBTN, RESIZE_NONE, 14, 11, 389, 102, 113, 0x0, STR_NULL }, { WIDGETS_END}, }; static const WindowDesc _aircraft_details_desc = { - -1,-1, 390, 114, - WC_VEHICLE_DETAILS,WC_VEHICLE_VIEW, + -1, -1, 390, 114, + WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, _aircraft_details_widgets, AircraftDetailsWndProc @@ -505,21 +505,21 @@ static void ShowAircraftDetailsWindow(const Vehicle *v) static const Widget _aircraft_view_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 237, 0, 13, STR_A00A, STR_018C_WINDOW_TITLE_DRAG_THIS }, -{ WWT_STICKYBOX, RESIZE_LR, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON }, -{ WWT_IMGBTN, RESIZE_RB, 14, 0, 231, 14, 103, 0x0, STR_NULL }, -{ WWT_6, RESIZE_RB, 14, 2, 229, 16, 101, 0x0, STR_NULL }, -{ WWT_PUSHIMGBTN, RESIZE_RTB, 14, 0, 237, 104, 115, 0x0, STR_A027_CURRENT_AIRCRAFT_ACTION }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 14, 31, 0x2AB, STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, 0x2AF, STR_A02A_SEND_AIRCRAFT_TO_HANGAR }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2B4, STR_A03B_REFIT_AIRCRAFT_TO_CARRY }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2B2, STR_A028_SHOW_AIRCRAFT_S_ORDERS }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 86, 103, 0x2B3, STR_A02B_SHOW_AIRCRAFT_DETAILS }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, SPR_CLONE_AIRCRAFT, STR_CLONE_AIRCRAFT_INFO }, -{ WWT_PANEL, RESIZE_LRB, 14, 232, 249, 104, 103, 0x0, STR_NULL }, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 238, 249, 104, 115, 0x0, STR_NULL }, -{ WIDGETS_END } +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 237, 0, 13, STR_A00A, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_STICKYBOX, RESIZE_LR, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON }, +{ WWT_IMGBTN, RESIZE_RB, 14, 0, 231, 14, 103, 0x0, STR_NULL }, +{ WWT_6, RESIZE_RB, 14, 2, 229, 16, 101, 0x0, STR_NULL }, +{ WWT_PUSHIMGBTN, RESIZE_RTB, 14, 0, 237, 104, 115, 0x0, STR_A027_CURRENT_AIRCRAFT_ACTION }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 14, 31, 0x2AB, STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, 0x2AF, STR_A02A_SEND_AIRCRAFT_TO_HANGAR }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2B4, STR_A03B_REFIT_AIRCRAFT_TO_CARRY }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2B2, STR_A028_SHOW_AIRCRAFT_S_ORDERS }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 86, 103, 0x2B3, STR_A02B_SHOW_AIRCRAFT_DETAILS }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, SPR_CLONE_AIRCRAFT, STR_CLONE_AIRCRAFT_INFO }, +{ WWT_PANEL, RESIZE_LRB, 14, 232, 249, 104, 103, 0x0, STR_NULL }, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 238, 249, 104, 115, 0x0, STR_NULL }, +{ WIDGETS_END}, }; @@ -907,19 +907,19 @@ static void AircraftDepotWndProc(Window *w, WindowEvent *e) } static const Widget _aircraft_depot_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 318, 0, 13, STR_A002_AIRCRAFT_HANGAR, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 319, 330, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_LRB, 14, 296, 318, 14, 13, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_LRTB, 14, 296, 318, 14, 61, 0x2A9, STR_A023_DRAG_AIRCRAFT_TO_HERE_TO}, - -{ WWT_MATRIX, RESIZE_RB, 14, 0, 295, 14, 61, 0x204, STR_A021_AIRCRAFT_CLICK_ON_AIRCRAFT}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 319, 330, 14, 61, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 105, 62, 73, STR_A003_NEW_AIRCRAFT, STR_A022_BUILD_NEW_AIRCRAFT}, -{WWT_NODISTXTBTN, RESIZE_TB, 14, 106, 212, 62, 73, STR_CLONE_AIRCRAFT, STR_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 213, 318, 62, 73, STR_00E4_LOCATION, STR_A024_CENTER_MAIN_VIEW_ON_HANGAR}, -{ WWT_PANEL, RESIZE_RTB, 14, 319, 318, 62, 73, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 319, 330, 62, 73, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 318, 0, 13, STR_A002_AIRCRAFT_HANGAR, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_STICKYBOX, RESIZE_LR, 14, 319, 330, 0, 13, 0x0, STR_STICKY_BUTTON }, +{ WWT_PANEL, RESIZE_LRB, 14, 296, 318, 14, 13, 0x0, STR_NULL }, +{ WWT_IMGBTN, RESIZE_LRTB, 14, 296, 318, 14, 61, 0x2A9, STR_A023_DRAG_AIRCRAFT_TO_HERE_TO }, + +{ WWT_MATRIX, RESIZE_RB, 14, 0, 295, 14, 61, 0x204, STR_A021_AIRCRAFT_CLICK_ON_AIRCRAFT }, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 319, 330, 14, 61, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST }, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 105, 62, 73, STR_A003_NEW_AIRCRAFT, STR_A022_BUILD_NEW_AIRCRAFT }, +{WWT_NODISTXTBTN, RESIZE_TB, 14, 106, 212, 62, 73, STR_CLONE_AIRCRAFT, STR_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW }, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 213, 318, 62, 73, STR_00E4_LOCATION, STR_A024_CENTER_MAIN_VIEW_ON_HANGAR }, +{ WWT_PANEL, RESIZE_RTB, 14, 319, 318, 62, 73, 0x0, STR_NULL }, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 319, 330, 62, 73, 0x0, STR_RESIZE_BUTTON }, { WIDGETS_END}, }; @@ -971,34 +971,34 @@ static void DrawSmallOrderList(const Vehicle *v, int x, int y) static const Widget _player_aircraft_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_A009_AIRCRAFT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, -{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 169, 0x401, STR_A01F_AIRCRAFT_CLICK_ON_AIRCRAFT}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 124, 170, 181, STR_A003_NEW_AIRCRAFT, STR_A020_BUILD_NEW_AIRCRAFT_REQUIRES}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 125, 247, 170, 181, STR_REPLACE_VEHICLES, STR_REPLACE_HELP}, -{ WWT_PANEL, RESIZE_RTB, 14, 248, 247, 170, 181, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 170, 181, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_A009_AIRCRAFT, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON }, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP }, +{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP }, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP }, +{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL }, +{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 169, 0x401, STR_A01F_AIRCRAFT_CLICK_ON_AIRCRAFT }, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST }, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 124, 170, 181, STR_A003_NEW_AIRCRAFT, STR_A020_BUILD_NEW_AIRCRAFT_REQUIRES }, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 125, 247, 170, 181, STR_REPLACE_VEHICLES, STR_REPLACE_HELP }, +{ WWT_PANEL, RESIZE_RTB, 14, 248, 247, 170, 181, 0x0, STR_NULL }, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 170, 181, 0x0, STR_RESIZE_BUTTON }, { WIDGETS_END}, }; static const Widget _other_player_aircraft_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_A009_AIRCRAFT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, -{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 169, 0x401, STR_A01F_AIRCRAFT_CLICK_ON_AIRCRAFT}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_RTB, 14, 0, 247, 170, 181, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 170, 181, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_A009_AIRCRAFT, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON }, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP }, +{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP }, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP }, +{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL }, +{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 169, 0x401, STR_A01F_AIRCRAFT_CLICK_ON_AIRCRAFT }, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST }, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 247, 170, 181, 0x0, STR_NULL }, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 170, 181, 0x0, STR_RESIZE_BUTTON }, { WIDGETS_END}, }; @@ -3,22 +3,22 @@ #ifndef AIRPORT_H #define AIRPORT_H -enum {MAX_TERMINALS = 10}; -enum {MAX_HELIPADS = 4}; +enum {MAX_TERMINALS = 10}; +enum {MAX_HELIPADS = 4}; enum {MAX_ELEMENTS = 255}; -enum {MAX_HEADINGS = 22}; +enum {MAX_HEADINGS = 22}; // Airport types enum { - AT_SMALL = 0, - AT_LARGE = 1, - AT_HELIPORT = 2, - AT_METROPOLITAN = 3, - AT_INTERNATIONAL = 4, - AT_COMMUTER = 5, - AT_HELIDEPOT = 6, - AT_INTERCON = 7, - AT_HELISTATION = 8, + AT_SMALL = 0, + AT_LARGE = 1, + AT_HELIPORT = 2, + AT_METROPOLITAN = 3, + AT_INTERNATIONAL = 4, + AT_COMMUTER = 5, + AT_HELIDEPOT = 6, + AT_INTERCON = 7, + AT_HELISTATION = 8, AT_OILRIG = 15 }; @@ -30,28 +30,28 @@ enum { }; enum { - AMED_NOSPDCLAMP = 1<<0, - AMED_TAKEOFF = 1<<1, - AMED_SLOWTURN = 1<<2, - AMED_LAND = 1<<3, - AMED_EXACTPOS = 1<<4, - AMED_BRAKE = 1<<5, - AMED_HELI_RAISE = 1<<6, - AMED_HELI_LOWER = 1<<7, + AMED_NOSPDCLAMP = 1 << 0, + AMED_TAKEOFF = 1 << 1, + AMED_SLOWTURN = 1 << 2, + AMED_LAND = 1 << 3, + AMED_EXACTPOS = 1 << 4, + AMED_BRAKE = 1 << 5, + AMED_HELI_RAISE = 1 << 6, + AMED_HELI_LOWER = 1 << 7, }; /* Movement States on Airports (headings target) */ enum { - TO_ALL = 0, - HANGAR = 1, - TERM1 = 2, - TERM2 = 3, - TERM3 = 4, - TERM4 = 5, - TERM5 = 6, - TERM6 = 7, - HELIPAD1 = 8, - HELIPAD2 = 9, + TO_ALL = 0, + HANGAR = 1, + TERM1 = 2, + TERM2 = 3, + TERM3 = 4, + TERM4 = 5, + TERM5 = 6, + TERM6 = 7, + HELIPAD1 = 8, + HELIPAD2 = 9, TAKEOFF = 10, STARTTAKEOFF = 11, ENDTAKEOFF = 12, @@ -75,18 +75,18 @@ static const byte _airport_terminal_flag[] = {0, 1, 2, 3, 4, 5, 22, 23, 0, 0, 6 /* Movement Blocks on Airports */ // blocks (eg_airport_flags) enum { - TERM1_block = 1 << 0, - TERM2_block = 1 << 1, - TERM3_block = 1 << 2, - TERM4_block = 1 << 3, - TERM5_block = 1 << 4, - TERM6_block = 1 << 5, - HELIPAD1_block = 1 << 6, - HELIPAD2_block = 1 << 7, - RUNWAY_IN_OUT_block = 1 << 8, - RUNWAY_IN_block = 1 << 8, - AIRPORT_BUSY_block = 1 << 8, - RUNWAY_OUT_block = 1 << 9, + TERM1_block = 1 << 0, + TERM2_block = 1 << 1, + TERM3_block = 1 << 2, + TERM4_block = 1 << 3, + TERM5_block = 1 << 4, + TERM6_block = 1 << 5, + HELIPAD1_block = 1 << 6, + HELIPAD2_block = 1 << 7, + RUNWAY_IN_OUT_block = 1 << 8, + RUNWAY_IN_block = 1 << 8, + AIRPORT_BUSY_block = 1 << 8, + RUNWAY_OUT_block = 1 << 9, TAXIWAY_BUSY_block = 1 << 10, OUT_WAY_block = 1 << 11, IN_WAY_block = 1 << 12, diff --git a/airport_gui.c b/airport_gui.c index 08fe9bbd3..259119f9c 100644 --- a/airport_gui.c +++ b/airport_gui.c @@ -113,12 +113,12 @@ static void BuildAirToolbWndProc(Window *w, WindowEvent *e) } static const Widget _air_toolbar_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 73, 0, 13, STR_A000_AIRPORTS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 7, 74, 85, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 41, 14, 35, 0x2E8, STR_A01E_BUILD_AIRPORT}, -{ WWT_PANEL, RESIZE_NONE, 7, 42, 63, 14, 35, 0x2BF, STR_018D_DEMOLISH_BUILDINGS_ETC}, -{ WWT_PANEL, RESIZE_NONE, 7, 64, 85, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 73, 0, 13, STR_A000_AIRPORTS, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_STICKYBOX, RESIZE_NONE, 7, 74, 85, 0, 13, 0x0, STR_STICKY_BUTTON }, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 41, 14, 35, 0x2E8, STR_A01E_BUILD_AIRPORT }, +{ WWT_PANEL, RESIZE_NONE, 7, 42, 63, 14, 35, 0x2BF, STR_018D_DEMOLISH_BUILDINGS_ETC }, +{ WWT_PANEL, RESIZE_NONE, 7, 64, 85, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP }, { WIDGETS_END}, }; diff --git a/airport_movement.h b/airport_movement.h index 8b41b19f9..2fa728509 100644 --- a/airport_movement.h +++ b/airport_movement.h @@ -7,364 +7,364 @@ // state machine input struct (from external file, etc.) // Finite sTate mAchine --> FTA typedef struct AirportFTAbuildup { - byte position; // the position that an airplane is at - byte heading; // the current orders (eg. TAKEOFF, HANGAR, ENDLANDING, etc.) - uint32 block; // the block this position is on on the airport (st->airport_flags) - byte next_in_chain; // next position from this position + byte position; // the position that an airplane is at + byte heading; // the current orders (eg. TAKEOFF, HANGAR, ENDLANDING, etc.) + uint32 block; // the block this position is on on the airport (st->airport_flags) + byte next_in_chain; // next position from this position } AirportFTAbuildup; /////////////////////////////////////////////////////////////////////// /////*********Movement Positions on Airports********************/////// // Country Airfield (small) 4x3 static const AirportMovingData _airport_moving_data_country[22] = { - { 53, 3,AMED_EXACTPOS,3}, // 00 In Hangar - { 53, 27,0,0}, // 01 Taxi to right outside depot - { 32, 23,AMED_EXACTPOS,7}, // 02 Terminal 1 - { 10, 23,AMED_EXACTPOS,7}, // 03 Terminal 2 - { 43, 37,0,0}, // 04 Going towards terminal 2 - { 24, 37,0,0}, // 05 Going towards terminal 2 - { 53, 37,0,0}, // 06 Going for takeoff - { 61, 40,AMED_EXACTPOS,1}, // 07 Taxi to start of runway (takeoff) - { 3, 40,AMED_NOSPDCLAMP,0}, // 08 Accelerate to end of runway - {-79, 40,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 09 Take off - {177, 40,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 10 Fly to landing position in air - { 56, 40,AMED_NOSPDCLAMP | AMED_LAND,0}, // 11 Going down for land - { 3, 40,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 12 Just landed, brake until end of runway - { 7, 40,0,0}, // 13 Just landed, turn around and taxi 1 square - { 53, 40,0,0}, // 14 Taxi from runway to crossing - {-31,193,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 15 Fly around waiting for a landing spot (north-east) - { 1, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 16 Fly around waiting for a landing spot (north-west) - {257, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 17 Fly around waiting for a landing spot (south-west) - {273, 49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 18 Fly around waiting for a landing spot (south) - { 44, 37,AMED_HELI_RAISE,0}, // 19 Helicopter takeoff - { 44, 40,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 20 In position above landing spot helicopter - { 44, 40,AMED_HELI_LOWER,0} // 21 Helicopter landing + { 53, 3, AMED_EXACTPOS, 3 }, // 00 In Hangar + { 53, 27, 0, 0 }, // 01 Taxi to right outside depot + { 32, 23, AMED_EXACTPOS, 7 }, // 02 Terminal 1 + { 10, 23, AMED_EXACTPOS, 7 }, // 03 Terminal 2 + { 43, 37, 0, 0 }, // 04 Going towards terminal 2 + { 24, 37, 0, 0 }, // 05 Going towards terminal 2 + { 53, 37, 0, 0 }, // 06 Going for takeoff + { 61, 40, AMED_EXACTPOS, 1 }, // 07 Taxi to start of runway (takeoff) + { 3, 40, AMED_NOSPDCLAMP, 0 }, // 08 Accelerate to end of runway + { -79, 40, AMED_NOSPDCLAMP | AMED_TAKEOFF, 0 }, // 09 Take off + { 177, 40, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 10 Fly to landing position in air + { 56, 40, AMED_NOSPDCLAMP | AMED_LAND, 0 }, // 11 Going down for land + { 3, 40, AMED_NOSPDCLAMP | AMED_BRAKE, 0 }, // 12 Just landed, brake until end of runway + { 7, 40, 0, 0 }, // 13 Just landed, turn around and taxi 1 square + { 53, 40, 0, 0 }, // 14 Taxi from runway to crossing + { -31, 193, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 15 Fly around waiting for a landing spot (north-east) + { 1, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 16 Fly around waiting for a landing spot (north-west) + { 257, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 17 Fly around waiting for a landing spot (south-west) + { 273, 49, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 18 Fly around waiting for a landing spot (south) + { 44, 37, AMED_HELI_RAISE, 0 }, // 19 Helicopter takeoff + { 44, 40, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 20 In position above landing spot helicopter + { 44, 40, AMED_HELI_LOWER, 0 }, // 21 Helicopter landing }; // Commuter Airfield (small) 5x4 static const AirportMovingData _airport_moving_data_commuter[37] = { - { 69, 3, AMED_EXACTPOS,3}, // 00 In Hangar - { 72, 22,0,0}, // 01 Taxi to right outside depot - { 8, 22, AMED_EXACTPOS,5}, // 01 Taxi to right outside depot - { 24, 36,AMED_EXACTPOS,3}, // 03 Terminal 1 - { 40, 36,AMED_EXACTPOS,3}, // 04 Terminal 2 - { 56, 36,AMED_EXACTPOS,3}, // 05 Terminal 3 - { 40, 8,AMED_EXACTPOS,1}, // 06 Helipad 1 - { 56, 8,AMED_EXACTPOS,1}, // 07 Helipad 2 - { 24, 22,0,5}, // 08 Taxiing - { 40, 22,0,5}, // 09 Taxiing - { 56, 22,0,5}, // 10 Taxiing - { 72, 40,0,3}, // 11 Airport OUTWAY - { 72, 54,AMED_EXACTPOS,1}, // 12 Accelerate to end of runway - { 7, 54,AMED_NOSPDCLAMP,0}, // 13 Release control of runway, for smoother movement - { 5, 54,AMED_NOSPDCLAMP,0}, // 14 End of runway - {-79, 54,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 15 Take off - {145, 54,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 16 Fly to landing position in air - { 73, 54,AMED_NOSPDCLAMP | AMED_LAND,0}, // 17 Going down for land - { 3, 54,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 18 Just landed, brake until end of runway - { 12, 54,0,7}, // 19 Just landed, turn around and taxi - { 8, 32,0,7}, // 20 Taxi from runway to crossing - {-31,149,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 21 Fly around waiting for a landing spot (north-east) - { 1, 6,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 22 Fly around waiting for a landing spot (north-west) - {193, 6,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 23 Fly around waiting for a landing spot (south-west) - {225, 81,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 24 Fly around waiting for a landing spot (south) + { 69, 3, AMED_EXACTPOS, 3 }, // 00 In Hangar + { 72, 22, 0, 0 }, // 01 Taxi to right outside depot + { 8, 22, AMED_EXACTPOS, 5 }, // 01 Taxi to right outside depot + { 24, 36, AMED_EXACTPOS, 3 }, // 03 Terminal 1 + { 40, 36, AMED_EXACTPOS, 3 }, // 04 Terminal 2 + { 56, 36, AMED_EXACTPOS, 3 }, // 05 Terminal 3 + { 40, 8, AMED_EXACTPOS, 1 }, // 06 Helipad 1 + { 56, 8, AMED_EXACTPOS, 1 }, // 07 Helipad 2 + { 24, 22, 0, 5 }, // 08 Taxiing + { 40, 22, 0, 5 }, // 09 Taxiing + { 56, 22, 0, 5 }, // 10 Taxiing + { 72, 40, 0, 3 }, // 11 Airport OUTWAY + { 72, 54, AMED_EXACTPOS, 1 }, // 12 Accelerate to end of runway + { 7, 54, AMED_NOSPDCLAMP, 0 }, // 13 Release control of runway, for smoother movement + { 5, 54, AMED_NOSPDCLAMP, 0 }, // 14 End of runway + { -79, 54, AMED_NOSPDCLAMP | AMED_TAKEOFF, 0 }, // 15 Take off + { 145, 54, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 16 Fly to landing position in air + { 73, 54, AMED_NOSPDCLAMP | AMED_LAND, 0 }, // 17 Going down for land + { 3, 54, AMED_NOSPDCLAMP | AMED_BRAKE, 0 }, // 18 Just landed, brake until end of runway + { 12, 54, 0, 7 }, // 19 Just landed, turn around and taxi + { 8, 32, 0, 7 }, // 20 Taxi from runway to crossing + { -31, 149, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 21 Fly around waiting for a landing spot (north-east) + { 1, 6, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 22 Fly around waiting for a landing spot (north-west) + { 193, 6, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 23 Fly around waiting for a landing spot (south-west) + { 225, 81, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 24 Fly around waiting for a landing spot (south) // Helicopter - { 80, 0,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 25 Bufferspace before helipad - { 80, 0,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 26 Bufferspace before helipad - { 32, 8,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 27 Get in position for Helipad1 - { 48, 8,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 28 Get in position for Helipad2 - { 32, 8,AMED_HELI_LOWER,0}, // 29 Land at Helipad1 - { 48, 8,AMED_HELI_LOWER,0}, // 30 Land at Helipad2 - { 32, 8,AMED_HELI_RAISE,0}, // 31 Takeoff Helipad1 - { 48, 8,AMED_HELI_RAISE,0}, // 32 Takeoff Helipad2 - { 64, 22,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 33 Go to position for Hangarentrance in air - { 64, 22,AMED_HELI_LOWER,0}, // 34 Land in front of hangar - { 40, 8,AMED_EXACTPOS,0}, // pre-helitakeoff helipad 1 - { 56, 8,AMED_EXACTPOS,0} // pre-helitakeoff helipad 2 + { 80, 0, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 25 Bufferspace before helipad + { 80, 0, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 26 Bufferspace before helipad + { 32, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 27 Get in position for Helipad1 + { 48, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 28 Get in position for Helipad2 + { 32, 8, AMED_HELI_LOWER, 0 }, // 29 Land at Helipad1 + { 48, 8, AMED_HELI_LOWER, 0 }, // 30 Land at Helipad2 + { 32, 8, AMED_HELI_RAISE, 0 }, // 31 Takeoff Helipad1 + { 48, 8, AMED_HELI_RAISE, 0 }, // 32 Takeoff Helipad2 + { 64, 22, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 33 Go to position for Hangarentrance in air + { 64, 22, AMED_HELI_LOWER, 0 }, // 34 Land in front of hangar + { 40, 8, AMED_EXACTPOS, 0 }, // pre-helitakeoff helipad 1 + { 56, 8, AMED_EXACTPOS, 0 }, // pre-helitakeoff helipad 2 }; // City Airport (large) 6x6 static const AirportMovingData _airport_moving_data_town[25] = { - { 85, 3,AMED_EXACTPOS,3}, // 00 In Hangar - { 85, 27,0,0}, // 01 Taxi to right outside depot - { 26, 41,AMED_EXACTPOS,5}, // 02 Terminal 1 - { 56, 20,AMED_EXACTPOS,3}, // 03 Terminal 2 - { 38, 8,AMED_EXACTPOS,5}, // 04 Terminal 3 - { 65, 6,0,0}, // 05 Taxi to right in infront of terminal 2/3 - { 80, 27,0,0}, // 06 Taxiway terminals 2-3 - { 44, 63,0,0}, // 07 Taxi to Airport center - { 58, 71,0,0}, // 08 Towards takeoff - { 72, 85,0,0}, // 09 Taxi to runway (takeoff) - { 89, 85,AMED_EXACTPOS,1}, // 10 Taxi to start of runway (takeoff) - { 3, 85,AMED_NOSPDCLAMP,0}, // 11 Accelerate to end of runway - {-79, 85,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 12 Take off - {177, 85,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 13 Fly to landing position in air - { 89, 85,AMED_NOSPDCLAMP | AMED_LAND,0}, // 14 Going down for land - { 3, 85,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 15 Just landed, brake until end of runway - { 20, 87,0,0}, // 16 Just landed, turn around and taxi 1 square - { 36, 71,0,0}, // 17 Taxi from runway to crossing - {-31,193,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 18 Fly around waiting for a landing spot (north-east) - { 1, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 19 Fly around waiting for a landing spot (north-west) - {257, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 20 Fly around waiting for a landing spot (south-west) - {273, 49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 21 Fly around waiting for a landing spot (south) - { 44, 63,AMED_HELI_RAISE,0}, // 22 Helicopter takeoff - { 28, 74,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 23 In position above landing spot helicopter - { 28, 74,AMED_HELI_LOWER,0} // 24 Helicopter landing + { 85, 3, AMED_EXACTPOS, 3 }, // 00 In Hangar + { 85, 27, 0, 0 }, // 01 Taxi to right outside depot + { 26, 41, AMED_EXACTPOS, 5 }, // 02 Terminal 1 + { 56, 20, AMED_EXACTPOS, 3 }, // 03 Terminal 2 + { 38, 8, AMED_EXACTPOS, 5 }, // 04 Terminal 3 + { 65, 6, 0, 0 }, // 05 Taxi to right in infront of terminal 2/3 + { 80, 27, 0, 0 }, // 06 Taxiway terminals 2-3 + { 44, 63, 0, 0 }, // 07 Taxi to Airport center + { 58, 71, 0, 0 }, // 08 Towards takeoff + { 72, 85, 0, 0 }, // 09 Taxi to runway (takeoff) + { 89, 85, AMED_EXACTPOS, 1 }, // 10 Taxi to start of runway (takeoff) + { 3, 85, AMED_NOSPDCLAMP, 0 }, // 11 Accelerate to end of runway + { -79, 85, AMED_NOSPDCLAMP | AMED_TAKEOFF, 0 }, // 12 Take off + { 177, 85, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 13 Fly to landing position in air + { 89, 85, AMED_NOSPDCLAMP | AMED_LAND, 0 }, // 14 Going down for land + { 3, 85, AMED_NOSPDCLAMP | AMED_BRAKE, 0 }, // 15 Just landed, brake until end of runway + { 20, 87, 0, 0 }, // 16 Just landed, turn around and taxi 1 square + { 36, 71, 0, 0 }, // 17 Taxi from runway to crossing + { -31, 193, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 18 Fly around waiting for a landing spot (north-east) + { 1, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 19 Fly around waiting for a landing spot (north-west) + { 257, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 20 Fly around waiting for a landing spot (south-west) + { 273, 49, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 21 Fly around waiting for a landing spot (south) + { 44, 63, AMED_HELI_RAISE, 0 }, // 22 Helicopter takeoff + { 28, 74, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 23 In position above landing spot helicopter + { 28, 74, AMED_HELI_LOWER, 0 }, // 24 Helicopter landing }; // Metropolitan Airport (metropolitan) - 2 runways static const AirportMovingData _airport_moving_data_metropolitan[27] = { - { 85, 3,AMED_EXACTPOS,3}, // 00 In Hangar - { 85, 27,0,0}, // 01 Taxi to right outside depot - { 26, 41,AMED_EXACTPOS,5}, // 02 Terminal 1 - { 56, 20,AMED_EXACTPOS,3}, // 03 Terminal 2 - { 38, 8,AMED_EXACTPOS,5}, // 04 Terminal 3 - { 65, 6,0,0}, // 05 Taxi to right in infront of terminal 2/3 - { 70, 33,0,0}, // 06 Taxiway terminals 2-3 - { 44, 58,0,0}, // 07 Taxi to Airport center - { 72, 58,0,0}, // 08 Towards takeoff - { 72, 69,0,0}, // 09 Taxi to runway (takeoff) - { 89, 69,AMED_EXACTPOS,1}, // 10 Taxi to start of runway (takeoff) - { 3, 69,AMED_NOSPDCLAMP,0}, // 11 Accelerate to end of runway - {-79, 69,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 12 Take off - {177, 85,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 13 Fly to landing position in air - { 89, 85,AMED_NOSPDCLAMP | AMED_LAND,0}, // 14 Going down for land - { 3, 85,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 15 Just landed, brake until end of runway - { 21, 85,0,0}, // 16 Just landed, turn around and taxi 1 square - { 21, 69,0,0}, // 17 On Runway-out taxiing to In-Way - { 21, 54,AMED_EXACTPOS,5}, // 18 Taxi from runway to crossing - {-31,193,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 19 Fly around waiting for a landing spot (north-east) - { 1, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 20 Fly around waiting for a landing spot (north-west) - {257, 1,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 21 Fly around waiting for a landing spot (south-west) - {273, 49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 22 Fly around waiting for a landing spot (south) - { 44, 58,0,0}, // 23 Helicopter takeoff spot on ground (to clear airport sooner) - { 44, 63,AMED_HELI_RAISE,0}, // 24 Helicopter takeoff - { 15, 54,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 25 Get in position above landing spot helicopter - { 15, 54,AMED_HELI_LOWER,0} // 26 Helicopter landing + { 85, 3, AMED_EXACTPOS, 3 }, // 00 In Hangar + { 85, 27, 0, 0 }, // 01 Taxi to right outside depot + { 26, 41, AMED_EXACTPOS, 5 }, // 02 Terminal 1 + { 56, 20, AMED_EXACTPOS, 3 }, // 03 Terminal 2 + { 38, 8, AMED_EXACTPOS, 5 }, // 04 Terminal 3 + { 65, 6, 0, 0 }, // 05 Taxi to right in infront of terminal 2/3 + { 70, 33, 0, 0 }, // 06 Taxiway terminals 2-3 + { 44, 58, 0, 0 }, // 07 Taxi to Airport center + { 72, 58, 0, 0 }, // 08 Towards takeoff + { 72, 69, 0, 0 }, // 09 Taxi to runway (takeoff) + { 89, 69, AMED_EXACTPOS, 1 }, // 10 Taxi to start of runway (takeoff) + { 3, 69, AMED_NOSPDCLAMP, 0 }, // 11 Accelerate to end of runway + { -79, 69, AMED_NOSPDCLAMP | AMED_TAKEOFF, 0 }, // 12 Take off + { 177, 85, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 13 Fly to landing position in air + { 89, 85, AMED_NOSPDCLAMP | AMED_LAND, 0 }, // 14 Going down for land + { 3, 85, AMED_NOSPDCLAMP | AMED_BRAKE, 0 }, // 15 Just landed, brake until end of runway + { 21, 85, 0, 0 }, // 16 Just landed, turn around and taxi 1 square + { 21, 69, 0, 0 }, // 17 On Runway-out taxiing to In-Way + { 21, 54, AMED_EXACTPOS, 5 }, // 18 Taxi from runway to crossing + { -31, 193, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 19 Fly around waiting for a landing spot (north-east) + { 1, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 20 Fly around waiting for a landing spot (north-west) + { 257, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 21 Fly around waiting for a landing spot (south-west) + { 273, 49, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 22 Fly around waiting for a landing spot (south) + { 44, 58, 0, 0 }, // 23 Helicopter takeoff spot on ground (to clear airport sooner) + { 44, 63, AMED_HELI_RAISE, 0 }, // 24 Helicopter takeoff + { 15, 54, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 25 Get in position above landing spot helicopter + { 15, 54, AMED_HELI_LOWER, 0 }, // 26 Helicopter landing }; // International Airport (international) - 2 runways, 6 terminals, dedicated helipod static const AirportMovingData _airport_moving_data_international[51] = { - { 7, 55,AMED_EXACTPOS,3}, // 00 In Hangar 1 - {100, 21,AMED_EXACTPOS,3}, // 01 In Hangar 2 - { 7, 70,0,0}, // 02 Taxi to right outside depot - {100, 36,0,0}, // 03 Taxi to right outside depot - { 38, 70,AMED_EXACTPOS,5}, // 04 Terminal 1 - { 38, 54,AMED_EXACTPOS,5}, // 05 Terminal 2 - { 38, 38,AMED_EXACTPOS,5}, // 06 Terminal 3 - { 70, 70,AMED_EXACTPOS,1}, // 07 Terminal 4 - { 70, 54,AMED_EXACTPOS,1}, // 08 Terminal 5 - { 70, 38,AMED_EXACTPOS,1}, // 09 Terminal 6 - {104, 71,AMED_EXACTPOS,1}, // 10 Helipad 1 - {104, 55,AMED_EXACTPOS,1}, // 11 Helipad 2 - { 22, 87,0,0}, // 12 Towards Terminals 4/5/6, Helipad 1/2 - { 60, 87,0,0}, // 13 Towards Terminals 4/5/6, Helipad 1/2 - { 66, 87,0,0}, // 14 Towards Terminals 4/5/6, Helipad 1/2 - { 86, 87,AMED_EXACTPOS,7}, // 15 Towards Terminals 4/5/6, Helipad 1/2 - { 86, 70,0,0}, // 16 In Front of Terminal 4 / Helipad 1 - { 86, 54,0,0}, // 17 In Front of Terminal 5 / Helipad 2 - { 86, 38,0,0}, // 18 In Front of Terminal 6 - { 86, 22,0,0}, // 19 Towards Terminals Takeoff (Taxiway) - { 66, 22,0,0}, // 20 Towards Terminals Takeoff (Taxiway) - { 60, 22,0,0}, // 21 Towards Terminals Takeoff (Taxiway) - { 38, 22,0,0}, // 22 Towards Terminals Takeoff (Taxiway) - { 22, 70,0,0}, // 23 In Front of Terminal 1 - { 22, 58,0,0}, // 24 In Front of Terminal 2 - { 22, 38,0,0}, // 25 In Front of Terminal 3 - { 22, 22,AMED_EXACTPOS,7}, // 26 Going for Takeoff - { 22, 6,0,0}, // 27 On Runway-out, prepare for takeoff - { 3, 6,AMED_EXACTPOS,5}, // 28 Accelerate to end of runway - { 60, 6,AMED_NOSPDCLAMP,0}, // 29 Release control of runway, for smoother movement - {105, 6,AMED_NOSPDCLAMP,0}, // 30 End of runway - {190, 6,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 31 Take off - {193,104,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 32 Fly to landing position in air - {105,104,AMED_NOSPDCLAMP | AMED_LAND,0}, // 33 Going down for land - { 3,104,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 34 Just landed, brake until end of runway - { 12,104,0,0}, // 35 Just landed, turn around and taxi 1 square - { 7, 84,0,0}, // 36 Taxi from runway to crossing - {-31,209,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 37 Fly around waiting for a landing spot (north-east) - { 1, 6,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 38 Fly around waiting for a landing spot (north-west) - {273, 6,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 39 Fly around waiting for a landing spot (south-west) - {305, 81,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 40 Fly around waiting for a landing spot (south) + { 7, 55, AMED_EXACTPOS, 3 }, // 00 In Hangar 1 + { 100, 21, AMED_EXACTPOS, 3 }, // 01 In Hangar 2 + { 7, 70, 0, 0 }, // 02 Taxi to right outside depot + { 100, 36, 0, 0 }, // 03 Taxi to right outside depot + { 38, 70, AMED_EXACTPOS, 5 }, // 04 Terminal 1 + { 38, 54, AMED_EXACTPOS, 5 }, // 05 Terminal 2 + { 38, 38, AMED_EXACTPOS, 5 }, // 06 Terminal 3 + { 70, 70, AMED_EXACTPOS, 1 }, // 07 Terminal 4 + { 70, 54, AMED_EXACTPOS, 1 }, // 08 Terminal 5 + { 70, 38, AMED_EXACTPOS, 1 }, // 09 Terminal 6 + { 104, 71, AMED_EXACTPOS, 1 }, // 10 Helipad 1 + { 104, 55, AMED_EXACTPOS, 1 }, // 11 Helipad 2 + { 22, 87, 0, 0 }, // 12 Towards Terminals 4/5/6, Helipad 1/2 + { 60, 87, 0, 0 }, // 13 Towards Terminals 4/5/6, Helipad 1/2 + { 66, 87, 0, 0 }, // 14 Towards Terminals 4/5/6, Helipad 1/2 + { 86, 87, AMED_EXACTPOS, 7 }, // 15 Towards Terminals 4/5/6, Helipad 1/2 + { 86, 70, 0, 0 }, // 16 In Front of Terminal 4 / Helipad 1 + { 86, 54, 0, 0 }, // 17 In Front of Terminal 5 / Helipad 2 + { 86, 38, 0, 0 }, // 18 In Front of Terminal 6 + { 86, 22, 0, 0 }, // 19 Towards Terminals Takeoff (Taxiway) + { 66, 22, 0, 0 }, // 20 Towards Terminals Takeoff (Taxiway) + { 60, 22, 0, 0 }, // 21 Towards Terminals Takeoff (Taxiway) + { 38, 22, 0, 0 }, // 22 Towards Terminals Takeoff (Taxiway) + { 22, 70, 0, 0 }, // 23 In Front of Terminal 1 + { 22, 58, 0, 0 }, // 24 In Front of Terminal 2 + { 22, 38, 0, 0 }, // 25 In Front of Terminal 3 + { 22, 22, AMED_EXACTPOS, 7 }, // 26 Going for Takeoff + { 22, 6, 0, 0 }, // 27 On Runway-out, prepare for takeoff + { 3, 6, AMED_EXACTPOS, 5 }, // 28 Accelerate to end of runway + { 60, 6, AMED_NOSPDCLAMP, 0 }, // 29 Release control of runway, for smoother movement + { 105, 6, AMED_NOSPDCLAMP, 0 }, // 30 End of runway + { 190, 6, AMED_NOSPDCLAMP | AMED_TAKEOFF, 0 }, // 31 Take off + { 193, 104, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 32 Fly to landing position in air + { 105, 104, AMED_NOSPDCLAMP | AMED_LAND, 0 }, // 33 Going down for land + { 3, 104, AMED_NOSPDCLAMP | AMED_BRAKE, 0 }, // 34 Just landed, brake until end of runway + { 12, 104, 0, 0 }, // 35 Just landed, turn around and taxi 1 square + { 7, 84, 0, 0 }, // 36 Taxi from runway to crossing + { -31, 209, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 37 Fly around waiting for a landing spot (north-east) + { 1, 6, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 38 Fly around waiting for a landing spot (north-west) + { 273, 6, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 39 Fly around waiting for a landing spot (south-west) + { 305, 81, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 40 Fly around waiting for a landing spot (south) // Helicopter - {128, 80,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 41 Bufferspace before helipad - {128, 80,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 42 Bufferspace before helipad - { 96, 71,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 43 Get in position for Helipad1 - { 96, 55,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 44 Get in position for Helipad2 - { 96, 71,AMED_HELI_LOWER,0}, // 45 Land at Helipad1 - { 96, 55,AMED_HELI_LOWER,0}, // 46 Land at Helipad2 - {104, 71,AMED_HELI_RAISE,0}, // 47 Takeoff Helipad1 - {104, 55,AMED_HELI_RAISE,0}, // 48 Takeoff Helipad2 - {104, 32,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 49 Go to position for Hangarentrance in air - {104, 32,AMED_HELI_LOWER,0} // 50 Land in HANGAR2_AREA to go to hangar + { 128, 80, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 41 Bufferspace before helipad + { 128, 80, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 42 Bufferspace before helipad + { 96, 71, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 43 Get in position for Helipad1 + { 96, 55, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 44 Get in position for Helipad2 + { 96, 71, AMED_HELI_LOWER, 0 }, // 45 Land at Helipad1 + { 96, 55, AMED_HELI_LOWER, 0 }, // 46 Land at Helipad2 + { 104, 71, AMED_HELI_RAISE, 0 }, // 47 Takeoff Helipad1 + { 104, 55, AMED_HELI_RAISE, 0 }, // 48 Takeoff Helipad2 + { 104, 32, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 49 Go to position for Hangarentrance in air + { 104, 32, AMED_HELI_LOWER, 0} // 50 Land in HANGAR2_AREA to go to hangar }; // Intercontinental Airport - 4 runways, 8 terminals, 2 dedicated helipads static const AirportMovingData _airport_moving_data_intercontinental[77] = { - { 7, 87, AMED_EXACTPOS,3}, // 00 In Hangar 1 - {135, 72, AMED_EXACTPOS,3}, // 01 In Hangar 2 - { 7,104,0,0}, // 02 Taxi to right outside depot 1 - {135, 88,0,0}, // 03 Taxi to right outside depot 2 - { 56,120,AMED_EXACTPOS,6}, // 04 Terminal 1 - { 56,104,AMED_EXACTPOS,5}, // 05 Terminal 2 - { 56, 88,AMED_EXACTPOS,5}, // 06 Terminal 3 - { 56, 72,AMED_EXACTPOS,5}, // 07 Terminal 4 - { 88,120,AMED_EXACTPOS,0}, // 08 Terminal 5 - { 88,104,AMED_EXACTPOS,1}, // 09 Terminal 6 - { 88, 88,AMED_EXACTPOS,1}, // 10 Terminal 7 - { 88, 72,AMED_EXACTPOS,1}, // 11 Terminal 8 - { 88, 56,AMED_EXACTPOS,3}, // 12 Helipad 1 - { 72, 56,AMED_EXACTPOS,1}, // 13 Helipad 2 - { 40,136,0,0}, // 14 Term group 2 enter 1 a - { 56,136,0,0}, // 15 Term group 2 enter 1 b - { 88,136,0,0}, // 16 Term group 2 enter 2 a - {104,136,0,0}, // 17 Term group 2 enter 2 b - {104,120,0,0}, // 18 Term group 2 - opp term 5 - {104,104,0,0}, // 19 Term group 2 - opp term 6 & exit2 - {104, 88,0,0}, // 20 Term group 2 - opp term 7 & hangar area 2 - {104, 72,0,0}, // 21 Term group 2 - opp term 8 - {104, 56,0,0}, // 22 Taxi Term group 2 exit a - {104, 40,0,0}, // 23 Taxi Term group 2 exit b - { 56, 40,0,0}, // 24 Term group 2 exit 2a - { 40, 40,0,0}, // 25 Term group 2 exit 2b - { 40,120,0,0}, // 26 Term group 1 - opp term 1 - { 40,104,0,0}, // 27 Term group 1 - opp term 2 & hangar area 1 - { 40, 88,0,0}, // 28 Term group 1 - opp term 3 - { 40, 72,0,0}, // 29 Term group 1 - opp term 4 - { 18, 72,0,7}, // 30 Outway 1 - { 8, 40,0,7}, // 31 Airport OUTWAY - { 8, 24,AMED_EXACTPOS,5}, // 32 Accelerate to end of runway - {119, 24,AMED_NOSPDCLAMP,0}, // 33 Release control of runway, for smoother movement - {117, 24,AMED_NOSPDCLAMP,0}, // 34 End of runway - {197, 24,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 35 Take off - {254, 84,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 36 Flying to landing position in air - {117,168,AMED_NOSPDCLAMP | AMED_LAND,0}, // 37 Going down for land - { 3,168,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 38 Just landed, brake until end of runway - { 8,168,0,0}, // 39 Just landed, turn around and taxi - { 8,144,0,7}, // 40 Taxi from runway - { 8,128,0,7}, // 41 Taxi from runway - { 8,120,AMED_EXACTPOS,5}, // 42 Airport entrance - { 56,344,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 43 Fly around waiting for a landing spot (north-east) - {-200,88,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 44 Fly around waiting for a landing spot (north-west) - { 56,-168,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 45 Fly around waiting for a landing spot (south-west) - {312, 88,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 46 Fly around waiting for a landing spot (south) + { 7, 87, AMED_EXACTPOS, 3 }, // 00 In Hangar 1 + { 135, 72, AMED_EXACTPOS, 3 }, // 01 In Hangar 2 + { 7, 104, 0, 0 }, // 02 Taxi to right outside depot 1 + { 135, 88, 0, 0 }, // 03 Taxi to right outside depot 2 + { 56, 120, AMED_EXACTPOS, 6 }, // 04 Terminal 1 + { 56, 104, AMED_EXACTPOS, 5 }, // 05 Terminal 2 + { 56, 88, AMED_EXACTPOS, 5 }, // 06 Terminal 3 + { 56, 72, AMED_EXACTPOS, 5 }, // 07 Terminal 4 + { 88, 120, AMED_EXACTPOS, 0 }, // 08 Terminal 5 + { 88, 104, AMED_EXACTPOS, 1 }, // 09 Terminal 6 + { 88, 88, AMED_EXACTPOS, 1 }, // 10 Terminal 7 + { 88, 72, AMED_EXACTPOS, 1 }, // 11 Terminal 8 + { 88, 56, AMED_EXACTPOS, 3 }, // 12 Helipad 1 + { 72, 56, AMED_EXACTPOS, 1 }, // 13 Helipad 2 + { 40, 136, 0, 0 }, // 14 Term group 2 enter 1 a + { 56, 136, 0, 0 }, // 15 Term group 2 enter 1 b + { 88, 136, 0, 0 }, // 16 Term group 2 enter 2 a + { 104, 136, 0, 0 }, // 17 Term group 2 enter 2 b + { 104, 120, 0, 0 }, // 18 Term group 2 - opp term 5 + { 104, 104, 0, 0 }, // 19 Term group 2 - opp term 6 & exit2 + { 104, 88, 0, 0 }, // 20 Term group 2 - opp term 7 & hangar area 2 + { 104, 72, 0, 0 }, // 21 Term group 2 - opp term 8 + { 104, 56, 0, 0 }, // 22 Taxi Term group 2 exit a + { 104, 40, 0, 0 }, // 23 Taxi Term group 2 exit b + { 56, 40, 0, 0 }, // 24 Term group 2 exit 2a + { 40, 40, 0, 0 }, // 25 Term group 2 exit 2b + { 40, 120, 0, 0 }, // 26 Term group 1 - opp term 1 + { 40, 104, 0, 0 }, // 27 Term group 1 - opp term 2 & hangar area 1 + { 40, 88, 0, 0 }, // 28 Term group 1 - opp term 3 + { 40, 72, 0, 0 }, // 29 Term group 1 - opp term 4 + { 18, 72, 0, 7 }, // 30 Outway 1 + { 8, 40, 0, 7 }, // 31 Airport OUTWAY + { 8, 24, AMED_EXACTPOS, 5 }, // 32 Accelerate to end of runway + { 119, 24, AMED_NOSPDCLAMP, 0 }, // 33 Release control of runway, for smoother movement + { 117, 24, AMED_NOSPDCLAMP, 0 }, // 34 End of runway + { 197, 24, AMED_NOSPDCLAMP | AMED_TAKEOFF, 0 }, // 35 Take off + { 254, 84, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 36 Flying to landing position in air + { 117, 168, AMED_NOSPDCLAMP | AMED_LAND, 0 }, // 37 Going down for land + { 3, 168, AMED_NOSPDCLAMP | AMED_BRAKE, 0 }, // 38 Just landed, brake until end of runway + { 8, 168, 0, 0 }, // 39 Just landed, turn around and taxi + { 8, 144, 0, 7 }, // 40 Taxi from runway + { 8, 128, 0, 7 }, // 41 Taxi from runway + { 8, 120, AMED_EXACTPOS, 5 }, // 42 Airport entrance + { 56, 344, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 43 Fly around waiting for a landing spot (north-east) + { -200, 88, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 44 Fly around waiting for a landing spot (north-west) + { 56, -168, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 45 Fly around waiting for a landing spot (south-west) + { 312, 88, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 46 Fly around waiting for a landing spot (south) // Helicopter - { 96,40,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 47 Bufferspace before helipad - { 96,40,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 48 Bufferspace before helipad - { 82,54,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 49 Get in position for Helipad1 - { 64,56,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 50 Get in position for Helipad2 - { 81,55,AMED_HELI_LOWER,0}, // 51 Land at Helipad1 - { 64,56,AMED_HELI_LOWER,0}, // 52 Land at Helipad2 - { 80,56,AMED_HELI_RAISE,0}, // 53 Takeoff Helipad1 - { 64,56,AMED_HELI_RAISE,0}, // 54 Takeoff Helipad2 - {136,96,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 55 Go to position for Hangarentrance in air - {136,96,AMED_HELI_LOWER,0}, // 56 Land in front of hangar2 - {126,104,0,3}, // 57 Outway 2 - {136,136,0,1}, // 58 Airport OUTWAY 2 - {136,152,AMED_EXACTPOS,5}, // 59 Accelerate to end of runway2 - { 16,152,AMED_NOSPDCLAMP,0}, // 60 Release control of runway2, for smoother movement - { 20,152,AMED_NOSPDCLAMP,0}, // 61 End of runway2 - {-56,152,AMED_NOSPDCLAMP | AMED_TAKEOFF,0}, // 62 Take off2 - { 24, 8,AMED_NOSPDCLAMP | AMED_LAND,0}, // 63 Going down for land2 - {136, 8,AMED_NOSPDCLAMP | AMED_BRAKE,0}, // 64 Just landed, brake until end of runway2in - {136, 8,0,0}, // 65 Just landed, turn around and taxi - {136, 24,0,3}, // 66 Taxi from runway 2in - {136, 40,0,3}, // 67 Taxi from runway 2in - {136, 56,AMED_EXACTPOS,1}, // 68 Airport entrance2 - {-56, 8,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 69 Fly to landing position in air2 - { 88, 40,0,0}, // 70 Taxi Term group 2 exit - opp heli1 - { 72, 40,0,0}, // 71 Taxi Term group 2 exit - opp heli2 - { 88, 57,AMED_EXACTPOS,3}, // 72 pre-helitakeoff helipad 1 - { 71, 56,AMED_EXACTPOS,1}, // 73 pre-helitakeoff helipad 2 - { 8,120,AMED_HELI_RAISE,0}, // 74 Helitakeoff outside depot 1 - {136,104,AMED_HELI_RAISE,0}, // 75 Helitakeoff outside depot 2 - {197,168,AMED_NOSPDCLAMP | AMED_SLOWTURN,0} // 76 Fly to landing position in air1 + { 96, 40, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 47 Bufferspace before helipad + { 96, 40, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 48 Bufferspace before helipad + { 82, 54, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 49 Get in position for Helipad1 + { 64, 56, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 50 Get in position for Helipad2 + { 81, 55, AMED_HELI_LOWER, 0 }, // 51 Land at Helipad1 + { 64, 56, AMED_HELI_LOWER, 0 }, // 52 Land at Helipad2 + { 80, 56, AMED_HELI_RAISE, 0 }, // 53 Takeoff Helipad1 + { 64, 56, AMED_HELI_RAISE, 0 }, // 54 Takeoff Helipad2 + { 136, 96, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 55 Go to position for Hangarentrance in air + { 136, 96, AMED_HELI_LOWER, 0 }, // 56 Land in front of hangar2 + { 126, 104, 0, 3 }, // 57 Outway 2 + { 136, 136, 0, 1 }, // 58 Airport OUTWAY 2 + { 136, 152, AMED_EXACTPOS, 5 }, // 59 Accelerate to end of runway2 + { 16, 152, AMED_NOSPDCLAMP, 0 }, // 60 Release control of runway2, for smoother movement + { 20, 152, AMED_NOSPDCLAMP, 0 }, // 61 End of runway2 + { -56, 152, AMED_NOSPDCLAMP | AMED_TAKEOFF, 0 }, // 62 Take off2 + { 24, 8, AMED_NOSPDCLAMP | AMED_LAND, 0 }, // 63 Going down for land2 + { 136, 8, AMED_NOSPDCLAMP | AMED_BRAKE, 0 }, // 64 Just landed, brake until end of runway2in + { 136, 8, 0, 0 }, // 65 Just landed, turn around and taxi + { 136, 24, 0, 3 }, // 66 Taxi from runway 2in + { 136, 40, 0, 3 }, // 67 Taxi from runway 2in + { 136, 56, AMED_EXACTPOS, 1 }, // 68 Airport entrance2 + { -56, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 69 Fly to landing position in air2 + { 88, 40, 0, 0 }, // 70 Taxi Term group 2 exit - opp heli1 + { 72, 40, 0, 0 }, // 71 Taxi Term group 2 exit - opp heli2 + { 88, 57, AMED_EXACTPOS, 3 }, // 72 pre-helitakeoff helipad 1 + { 71, 56, AMED_EXACTPOS, 1 }, // 73 pre-helitakeoff helipad 2 + { 8, 120, AMED_HELI_RAISE, 0 }, // 74 Helitakeoff outside depot 1 + { 136, 104, AMED_HELI_RAISE, 0 }, // 75 Helitakeoff outside depot 2 + { 197, 168, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0} // 76 Fly to landing position in air1 }; // Heliport (heliport) static const AirportMovingData _airport_moving_data_heliport[9] = { - { 5, 9,AMED_EXACTPOS,1}, // 0 - At heliport terminal - { 2, 9,AMED_HELI_RAISE,0}, // 1 - Take off (play sound) - { -3, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 2 - In position above landing spot helicopter - { -3, 9,AMED_HELI_LOWER,0}, // 3 - Land - { 2, 9,0,0}, // 4 - Goto terminal on ground - {-31, 59,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 5 - Circle #1 (north-east) - {-31,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 6 - Circle #2 (north-west) - { 49,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 7 - Circle #3 (south-west) - { 70, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 8 - Circle #4 (south) + { 5, 9, AMED_EXACTPOS, 1 }, // 0 - At heliport terminal + { 2, 9, AMED_HELI_RAISE, 0 }, // 1 - Take off (play sound) + { -3, 9, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 2 - In position above landing spot helicopter + { -3, 9, AMED_HELI_LOWER, 0 }, // 3 - Land + { 2, 9, 0, 0 }, // 4 - Goto terminal on ground + { -31, 59, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 5 - Circle #1 (north-east) + { -31, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 6 - Circle #2 (north-west) + { 49, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 7 - Circle #3 (south-west) + { 70, 9, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 8 - Circle #4 (south) }; // HeliDepot 2x2 (heliport) static const AirportMovingData _airport_moving_data_helidepot[18] = { - { 24, 4,AMED_EXACTPOS,1}, // 0 - At depot - { 24, 28,0,0}, // 1 Taxi to right outside depot - { 5, 38,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 2 Flying - {-15,-15,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 3 - Circle #1 (north-east) - {-15,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 4 - Circle #2 (north-west) - { 49,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 5 - Circle #3 (south-west) - { 49,-15,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 6 - Circle #4 (south-east) - { 8, 32,AMED_NOSPDCLAMP | AMED_SLOWTURN,7}, // 7 - PreHelipad - { 8, 32,AMED_NOSPDCLAMP | AMED_SLOWTURN,7}, // 8 - Helipad - { 8, 16,AMED_NOSPDCLAMP | AMED_SLOWTURN,7}, // 9 - Land - { 8, 16,AMED_HELI_LOWER,7}, // 10 - Land - { 8, 24,AMED_HELI_RAISE,0}, // 11 - Take off (play sound) - { 32, 24,AMED_NOSPDCLAMP | AMED_SLOWTURN,7}, // 12 Air to above hangar area - { 32, 24,AMED_HELI_LOWER,7}, // 13 Taxi to right outside depot - { 8, 24,AMED_EXACTPOS,7}, // 14 - on helipad1 - { 24, 28,AMED_HELI_RAISE,0}, // 15 Takeoff right outside depot - { 8, 24,AMED_HELI_RAISE,5}, // 16 - Take off (play sound) - { 8, 24,AMED_SLOWTURN | AMED_EXACTPOS,2}, // 17 - turn on helipad1 for takeoff + { 24, 4, AMED_EXACTPOS, 1 }, // 0 - At depot + { 24, 28, 0, 0 }, // 1 Taxi to right outside depot + { 5, 38, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 2 Flying + { -15, -15, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 3 - Circle #1 (north-east) + { -15, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 4 - Circle #2 (north-west) + { 49, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 5 - Circle #3 (south-west) + { 49, -15, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 6 - Circle #4 (south-east) + { 8, 32, AMED_NOSPDCLAMP | AMED_SLOWTURN, 7 }, // 7 - PreHelipad + { 8, 32, AMED_NOSPDCLAMP | AMED_SLOWTURN, 7 }, // 8 - Helipad + { 8, 16, AMED_NOSPDCLAMP | AMED_SLOWTURN, 7 }, // 9 - Land + { 8, 16, AMED_HELI_LOWER, 7 }, // 10 - Land + { 8, 24, AMED_HELI_RAISE, 0 }, // 11 - Take off (play sound) + { 32, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, 7 }, // 12 Air to above hangar area + { 32, 24, AMED_HELI_LOWER, 7 }, // 13 Taxi to right outside depot + { 8, 24, AMED_EXACTPOS, 7 }, // 14 - on helipad1 + { 24, 28, AMED_HELI_RAISE, 0 }, // 15 Takeoff right outside depot + { 8, 24, AMED_HELI_RAISE, 5 }, // 16 - Take off (play sound) + { 8, 24, AMED_SLOWTURN | AMED_EXACTPOS, 2 }, // 17 - turn on helipad1 for takeoff }; // HeliDepot 2x2 (heliport) static const AirportMovingData _airport_moving_data_helistation[33] = { - {8, 3,AMED_EXACTPOS,3}, // 00 In Hangar2 - {8, 22,0,0}, // 01 outside hangar 2 - {116,24,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 02 Fly to landing position in air - {14, 22,AMED_HELI_RAISE,0}, // 03 Helitakeoff outside hangar1(play sound) - {24, 22,0,0}, // 04 taxiing - {40, 22,0,0}, // 05 taxiing - {40, 8,AMED_EXACTPOS,1}, // 06 Helipad 1 - {56, 8,AMED_EXACTPOS,1}, // 07 Helipad 2 - {56, 24,AMED_EXACTPOS,1}, // 08 Helipad 3 - {40, 8,AMED_EXACTPOS,0}, // 09 pre-helitakeoff helipad 1 - {56, 8,AMED_EXACTPOS,0}, // 10 pre-helitakeoff helipad 2 - {56, 24,AMED_EXACTPOS,0}, // 11 pre-helitakeoff helipad 3 - {32, 8,AMED_HELI_RAISE,0}, // 12 Takeoff Helipad1 - {48, 8,AMED_HELI_RAISE,0}, // 13 Takeoff Helipad2 - {48, 24,AMED_HELI_RAISE,0}, // 14 Takeoff Helipad3 - {84, 24,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 15 Bufferspace before helipad - {68, 24,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 16 Bufferspace before helipad - {32, 8,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 17 Get in position for Helipad1 - {48, 8,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 18 Get in position for Helipad2 - {48, 24,AMED_NOSPDCLAMP | AMED_SLOWTURN,1}, // 19 Get in position for Helipad3 - {40, 8,AMED_HELI_LOWER,0}, // 20 Land at Helipad1 - {48, 8,AMED_HELI_LOWER,0}, // 21 Land at Helipad2 - {48, 24,AMED_HELI_LOWER,0}, // 22 Land at Helipad3 - {0, 22,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 23 Go to position for Hangarentrance in air - {0, 22,AMED_HELI_LOWER,0}, // 24 Land in front of hangar - {148,-8,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 25 Fly around waiting for a landing spot (south-east) - {148,8,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 26 Fly around waiting for a landing spot (south-west) - {132,24,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 27 Fly around waiting for a landing spot (south-west) - {100,24,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 28 Fly around waiting for a landing spot (north-east) - {84, 8,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 29 Fly around waiting for a landing spot (south-east) - {84,-8,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 30 Fly around waiting for a landing spot (south-west) - {100,-24,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 31 Fly around waiting for a landing spot (north-west) - {132,-24,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 32 Fly around waiting for a landing spot (north-east) + { 8, 3, AMED_EXACTPOS, 3 }, // 00 In Hangar2 + { 8, 22, 0, 0 }, // 01 outside hangar 2 + { 116, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 02 Fly to landing position in air + { 14, 22, AMED_HELI_RAISE, 0 }, // 03 Helitakeoff outside hangar1(play sound) + { 24, 22, 0, 0 }, // 04 taxiing + { 40, 22, 0, 0 }, // 05 taxiing + { 40, 8, AMED_EXACTPOS, 1 }, // 06 Helipad 1 + { 56, 8, AMED_EXACTPOS, 1 }, // 07 Helipad 2 + { 56, 24, AMED_EXACTPOS, 1 }, // 08 Helipad 3 + { 40, 8, AMED_EXACTPOS, 0 }, // 09 pre-helitakeoff helipad 1 + { 56, 8, AMED_EXACTPOS, 0 }, // 10 pre-helitakeoff helipad 2 + { 56, 24, AMED_EXACTPOS, 0 }, // 11 pre-helitakeoff helipad 3 + { 32, 8, AMED_HELI_RAISE, 0 }, // 12 Takeoff Helipad1 + { 48, 8, AMED_HELI_RAISE, 0 }, // 13 Takeoff Helipad2 + { 48, 24, AMED_HELI_RAISE, 0 }, // 14 Takeoff Helipad3 + { 84, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 15 Bufferspace before helipad + { 68, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 16 Bufferspace before helipad + { 32, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 17 Get in position for Helipad1 + { 48, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 18 Get in position for Helipad2 + { 48, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, 1 }, // 19 Get in position for Helipad3 + { 40, 8, AMED_HELI_LOWER, 0 }, // 20 Land at Helipad1 + { 48, 8, AMED_HELI_LOWER, 0 }, // 21 Land at Helipad2 + { 48, 24, AMED_HELI_LOWER, 0 }, // 22 Land at Helipad3 + { 0, 22, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 23 Go to position for Hangarentrance in air + { 0, 22, AMED_HELI_LOWER, 0 }, // 24 Land in front of hangar + { 148, -8, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 25 Fly around waiting for a landing spot (south-east) + { 148, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 26 Fly around waiting for a landing spot (south-west) + { 132, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 27 Fly around waiting for a landing spot (south-west) + { 100, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 28 Fly around waiting for a landing spot (north-east) + { 84, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 29 Fly around waiting for a landing spot (south-east) + { 84, -8, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 30 Fly around waiting for a landing spot (south-west) + { 100, -24, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 31 Fly around waiting for a landing spot (north-west) + { 132, -24, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 32 Fly around waiting for a landing spot (north-east) }; // Oilrig static const AirportMovingData _airport_moving_data_oilrig[9] = { - { 31, 9,AMED_EXACTPOS,1}, // 0 - At oilrig terminal - { 28, 9,AMED_HELI_RAISE,0}, // 1 - Take off (play sound) - { 23, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 2 - In position above landing spot helicopter - { 23, 9,AMED_HELI_LOWER,0}, // 3 - Land - { 28, 9,0,0}, // 4 - Goto terminal on ground - {-31, 69,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 5 - circle #1 (north-east) - {-31,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 6 - circle #2 (north-west) - { 69,-49,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 7 - circle #3 (south-west) - { 70, 9,AMED_NOSPDCLAMP | AMED_SLOWTURN,0}, // 8 - circle #4 (south) + { 31, 9, AMED_EXACTPOS, 1 }, // 0 - At oilrig terminal + { 28, 9, AMED_HELI_RAISE, 0 }, // 1 - Take off (play sound) + { 23, 9, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 2 - In position above landing spot helicopter + { 23, 9, AMED_HELI_LOWER, 0 }, // 3 - Land + { 28, 9, 0, 0 }, // 4 - Goto terminal on ground + { -31, 69, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 5 - circle #1 (north-east) + { -31, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 6 - circle #2 (north-west) + { 69, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 7 - circle #3 (south-west) + { 70, 9, AMED_NOSPDCLAMP | AMED_SLOWTURN, 0 }, // 8 - circle #4 (south) }; /////////////////////////////////////////////////////////////////////// @@ -375,401 +375,401 @@ static const AirportMovingData _airport_moving_data_oilrig[9] = { static const TileIndexDiffC _airport_depots_country[] = {{3, 0}}; static const byte _airport_terminal_country[] = {1, 2}; static const AirportFTAbuildup _airport_fta_country[] = { - { 0,HANGAR,NOTHING_block,1}, - { 1,255,AIRPORT_BUSY_block,0}, {1,HANGAR,0,0}, {1,TERM1,TERM1_block,2}, {1,TERM2,0,4}, {1,HELITAKEOFF,0,19}, {1,0,0,6}, - { 2,TERM1,TERM1_block,1}, - { 3,TERM2,TERM2_block,5}, - { 4,255,AIRPORT_BUSY_block,0}, {4,TERM2,0,5}, {4,HANGAR,0,1}, {4,TAKEOFF,0,6}, {4,HELITAKEOFF,0,1}, - { 5,255,AIRPORT_BUSY_block,0}, {5,TERM2,TERM2_block,3}, {5,0,0,4}, - { 6,0,AIRPORT_BUSY_block,7}, + { 0, HANGAR, NOTHING_block, 1 }, + { 1, 255, AIRPORT_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM1, TERM1_block, 2 }, { 1, TERM2, 0, 4 }, { 1, HELITAKEOFF, 0, 19 }, { 1, 0, 0, 6 }, + { 2, TERM1, TERM1_block, 1 }, + { 3, TERM2, TERM2_block, 5 }, + { 4, 255, AIRPORT_BUSY_block, 0 }, { 4, TERM2, 0, 5 }, { 4, HANGAR, 0, 1 }, { 4, TAKEOFF, 0, 6 }, { 4, HELITAKEOFF, 0, 1 }, + { 5, 255, AIRPORT_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, 0, 0, 4 }, + { 6, 0, AIRPORT_BUSY_block, 7 }, // takeoff - { 7,TAKEOFF,AIRPORT_BUSY_block,8}, - { 8,STARTTAKEOFF,NOTHING_block,9}, - { 9,ENDTAKEOFF,NOTHING_block,0}, + { 7, TAKEOFF, AIRPORT_BUSY_block, 8 }, + { 8, STARTTAKEOFF, NOTHING_block, 9 }, + { 9, ENDTAKEOFF, NOTHING_block, 0 }, // landing - {10,FLYING,NOTHING_block,15}, {10,LANDING,0,11}, {10,HELILANDING,0,20}, - {11,LANDING,AIRPORT_BUSY_block,12}, - {12,0,AIRPORT_BUSY_block,13}, - {13,ENDLANDING,AIRPORT_BUSY_block,14}, {13,TERM2,0,5}, {13,0,0,14}, - {14,0,AIRPORT_BUSY_block,1}, + { 10, FLYING, NOTHING_block, 15 }, { 10, LANDING, 0, 11 }, { 10, HELILANDING, 0, 20 }, + { 11, LANDING, AIRPORT_BUSY_block, 12 }, + { 12, 0, AIRPORT_BUSY_block, 13 }, + { 13, ENDLANDING, AIRPORT_BUSY_block, 14 }, { 13, TERM2, 0, 5 }, { 13, 0, 0, 14 }, + { 14, 0, AIRPORT_BUSY_block, 1 }, // In air - {15,0,NOTHING_block,16}, - {16,0,NOTHING_block,17}, - {17,0,NOTHING_block,18}, - {18,0,NOTHING_block,10}, - {19,HELITAKEOFF,NOTHING_block,0}, - {20,HELILANDING,AIRPORT_BUSY_block,21}, - {21,HELIENDLANDING,AIRPORT_BUSY_block,1}, - {MAX_ELEMENTS,0,0,0} // end marker. DO NOT REMOVE + { 15, 0, NOTHING_block, 16 }, + { 16, 0, NOTHING_block, 17 }, + { 17, 0, NOTHING_block, 18 }, + { 18, 0, NOTHING_block, 10 }, + { 19, HELITAKEOFF, NOTHING_block, 0 }, + { 20, HELILANDING, AIRPORT_BUSY_block, 21 }, + { 21, HELIENDLANDING, AIRPORT_BUSY_block, 1 }, + { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE }; -static const TileIndexDiffC _airport_depots_commuter[] = {{4, 0}}; -static const byte _airport_terminal_commuter[] = {1, 3}; -static const byte _airport_helipad_commuter[] = {1, 2}; +static const TileIndexDiffC _airport_depots_commuter[] = { { 4, 0 } }; +static const byte _airport_terminal_commuter[] = { 1, 3 }; +static const byte _airport_helipad_commuter[] = { 1, 2 }; static const AirportFTAbuildup _airport_fta_commuter[] = { - { 0,HANGAR,NOTHING_block,1}, {0,HELITAKEOFF,HELIPAD2_block,1}, {0,0,0,1}, - { 1,255,TAXIWAY_BUSY_block,0}, {1,HANGAR,0,0}, {1,TAKEOFF,0,11}, {1,TERM1,TAXIWAY_BUSY_block,10}, {1,TERM2,TAXIWAY_BUSY_block,10}, {1,TERM3,TAXIWAY_BUSY_block,10}, {1,HELIPAD1,TAXIWAY_BUSY_block,10}, {1,HELIPAD2,TAXIWAY_BUSY_block,10}, {1,HELITAKEOFF,TAXIWAY_BUSY_block,10}, {1,0,0,0}, - { 2,255,AIRPORT_ENTRANCE_block,2}, {2,HANGAR,0,8}, {2,TERM1,0,8}, {2,TERM2,0,8}, {2,TERM3,0,8}, {2,HELIPAD1,0,8}, {2,HELIPAD2,0,8}, {2,HELITAKEOFF,0,8}, {2,0,0,2}, - { 3,TERM1,TERM1_block,8}, {3,HANGAR,0,8}, {3,TAKEOFF,0,8}, {3,0,0,3}, - { 4,TERM2,TERM2_block,9}, {4,HANGAR,0,9}, {4,TAKEOFF,0,9}, {4,0,0,4}, - { 5,TERM3,TERM3_block,10}, {5,HANGAR,0,10}, {5,TAKEOFF,0,10}, {5,0,0,5}, - { 6,HELIPAD1,HELIPAD1_block,6}, {6,HANGAR,TAXIWAY_BUSY_block,9}, {6,HELITAKEOFF,0,35}, - { 7,HELIPAD2,HELIPAD2_block,7}, {7,HANGAR,TAXIWAY_BUSY_block,10}, {7,HELITAKEOFF,0,36}, - { 8,255,TAXIWAY_BUSY_block,8}, {8,TAKEOFF,TAXIWAY_BUSY_block,9}, {8,HANGAR,TAXIWAY_BUSY_block,9}, {8,TERM1,TERM1_block,3}, {8,0,TAXIWAY_BUSY_block,9}, - { 9,255,TAXIWAY_BUSY_block,9}, {9,TAKEOFF,TAXIWAY_BUSY_block,10}, {9,HANGAR,TAXIWAY_BUSY_block,10}, {9,TERM2,TERM2_block,4}, {9,HELIPAD1,HELIPAD1_block,6}, {9,HELITAKEOFF,HELIPAD1_block,6}, {9,TERM1,TAXIWAY_BUSY_block,8}, {9,0,TAXIWAY_BUSY_block,10}, - {10,255,TAXIWAY_BUSY_block,10}, {10,TERM3,TERM3_block,5}, {10,HELIPAD1,0,9}, {10,HELIPAD2,HELIPAD2_block,7}, {10,HELITAKEOFF,HELIPAD2_block,7}, {10,TAKEOFF,TAXIWAY_BUSY_block,1}, {10,HANGAR,TAXIWAY_BUSY_block,1}, {10,0,TAXIWAY_BUSY_block,9}, - {11,0,OUT_WAY_block,12}, + { 0, HANGAR, NOTHING_block, 1 }, { 0, HELITAKEOFF, HELIPAD2_block, 1 }, { 0, 0, 0, 1 }, + { 1, 255, TAXIWAY_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TAKEOFF, 0, 11 }, { 1, TERM1, TAXIWAY_BUSY_block, 10 }, { 1, TERM2, TAXIWAY_BUSY_block, 10 }, { 1, TERM3, TAXIWAY_BUSY_block, 10 }, { 1, HELIPAD1, TAXIWAY_BUSY_block, 10 }, { 1, HELIPAD2, TAXIWAY_BUSY_block, 10 }, { 1, HELITAKEOFF, TAXIWAY_BUSY_block, 10 }, { 1, 0, 0, 0 }, + { 2, 255, AIRPORT_ENTRANCE_block, 2 }, { 2, HANGAR, 0, 8 }, { 2, TERM1, 0, 8 }, { 2, TERM2, 0, 8 }, { 2, TERM3, 0, 8 }, { 2, HELIPAD1, 0, 8 }, { 2, HELIPAD2, 0, 8 }, { 2, HELITAKEOFF, 0, 8 }, { 2, 0, 0, 2 }, + { 3, TERM1, TERM1_block, 8 }, { 3, HANGAR, 0, 8 }, { 3, TAKEOFF, 0, 8 }, { 3, 0, 0, 3 }, + { 4, TERM2, TERM2_block, 9 }, { 4, HANGAR, 0, 9 }, { 4, TAKEOFF, 0, 9 }, { 4, 0, 0, 4 }, + { 5, TERM3, TERM3_block, 10 }, { 5, HANGAR, 0, 10 }, { 5, TAKEOFF, 0, 10 }, { 5, 0, 0, 5 }, + { 6, HELIPAD1, HELIPAD1_block, 6 }, { 6, HANGAR, TAXIWAY_BUSY_block, 9 }, { 6, HELITAKEOFF, 0, 35 }, + { 7, HELIPAD2, HELIPAD2_block, 7 }, { 7, HANGAR, TAXIWAY_BUSY_block, 10 }, { 7, HELITAKEOFF, 0, 36 }, + { 8, 255, TAXIWAY_BUSY_block, 8 }, { 8, TAKEOFF, TAXIWAY_BUSY_block, 9 }, { 8, HANGAR, TAXIWAY_BUSY_block, 9 }, { 8, TERM1, TERM1_block, 3 }, { 8, 0, TAXIWAY_BUSY_block, 9 }, + { 9, 255, TAXIWAY_BUSY_block, 9 }, { 9, TAKEOFF, TAXIWAY_BUSY_block, 10 }, { 9, HANGAR, TAXIWAY_BUSY_block, 10 }, { 9, TERM2, TERM2_block, 4 }, { 9, HELIPAD1, HELIPAD1_block, 6 }, { 9, HELITAKEOFF, HELIPAD1_block, 6 }, { 9, TERM1, TAXIWAY_BUSY_block, 8 }, { 9, 0, TAXIWAY_BUSY_block, 10 }, + { 10, 255, TAXIWAY_BUSY_block, 10 }, { 10, TERM3, TERM3_block, 5 }, { 10, HELIPAD1, 0, 9 }, { 10, HELIPAD2, HELIPAD2_block, 7 }, { 10, HELITAKEOFF, HELIPAD2_block, 7 }, { 10, TAKEOFF, TAXIWAY_BUSY_block, 1 }, { 10, HANGAR, TAXIWAY_BUSY_block, 1 }, { 10, 0, TAXIWAY_BUSY_block, 9 }, + { 11, 0, OUT_WAY_block, 12 }, // takeoff - {12,TAKEOFF,RUNWAY_IN_OUT_block,13}, - {13,0,RUNWAY_IN_OUT_block,14}, - {14,STARTTAKEOFF,RUNWAY_IN_OUT_block,15}, - {15,ENDTAKEOFF,NOTHING_block,0}, + { 12, TAKEOFF, RUNWAY_IN_OUT_block, 13 }, + { 13, 0, RUNWAY_IN_OUT_block, 14 }, + { 14, STARTTAKEOFF, RUNWAY_IN_OUT_block, 15 }, + { 15, ENDTAKEOFF, NOTHING_block, 0 }, // landing - {16,FLYING,NOTHING_block,21}, {16,LANDING,IN_WAY_block,17}, {16,HELILANDING,0,25}, - {17,LANDING,RUNWAY_IN_OUT_block,18}, - {18,0,RUNWAY_IN_OUT_block,19}, - {19,0,RUNWAY_IN_OUT_block,20}, - {20,ENDLANDING,IN_WAY_block,20}, {20,255,IN_WAY_block,2}, {20,TERM1,0,2}, {20,TERM2,0,2}, {20,TERM3,0,2}, {20,HANGAR,0,2}, {20,0,0,2}, + { 16, FLYING, NOTHING_block, 21 }, { 16, LANDING, IN_WAY_block, 17 }, { 16, HELILANDING, 0, 25 }, + { 17, LANDING, RUNWAY_IN_OUT_block, 18 }, + { 18, 0, RUNWAY_IN_OUT_block, 19 }, + { 19, 0, RUNWAY_IN_OUT_block, 20 }, + { 20, ENDLANDING, IN_WAY_block, 20 }, { 20, 255, IN_WAY_block, 2 }, { 20, TERM1, 0, 2 }, { 20, TERM2, 0, 2 }, { 20, TERM3, 0, 2 }, { 20, HANGAR, 0, 2 }, { 20, 0, 0, 2 }, // In Air - {21,0,NOTHING_block,22}, - {22,0,NOTHING_block,23}, - {23,0,NOTHING_block,24}, - {24,0,NOTHING_block,16}, + { 21, 0, NOTHING_block, 22 }, + { 22, 0, NOTHING_block, 23 }, + { 23, 0, NOTHING_block, 24 }, + { 24, 0, NOTHING_block, 16 }, // Helicopter -- stay in air in special place as a buffer to choose from helipads - {25,HELILANDING,PRE_HELIPAD_block,26}, - {26,HELIENDLANDING,PRE_HELIPAD_block,26}, {26,HELIPAD1,0,27}, {26,HELIPAD2,0,28}, {26,HANGAR,0,33}, - {27,0,NOTHING_block,29}, //helipad1 approach - {28,0,NOTHING_block,30}, + { 25, HELILANDING, PRE_HELIPAD_block, 26 }, + { 26, HELIENDLANDING, PRE_HELIPAD_block, 26 }, { 26, HELIPAD1, 0, 27 }, { 26, HELIPAD2, 0, 28 }, { 26, HANGAR, 0, 33 }, + { 27, 0, NOTHING_block, 29 }, //helipad1 approach + { 28, 0, NOTHING_block, 30 }, // landing - {29,255,NOTHING_block,0}, {29,HELIPAD1,HELIPAD1_block,6}, - {30,255,NOTHING_block,0}, {30,HELIPAD2,HELIPAD2_block,7}, + { 29, 255, NOTHING_block, 0 }, { 29, HELIPAD1, HELIPAD1_block, 6 }, + { 30, 255, NOTHING_block, 0 }, { 30, HELIPAD2, HELIPAD2_block, 7 }, // Helicopter -- takeoff - {31,HELITAKEOFF,NOTHING_block,0}, - {32,HELITAKEOFF,NOTHING_block,0}, - {33,0,TAXIWAY_BUSY_block,34}, // need to go to hangar when waiting in air - {34,0,TAXIWAY_BUSY_block,1}, - {35,0,HELIPAD1_block,31}, - {36,0,HELIPAD2_block,32}, - {MAX_ELEMENTS,0,0,0} // end marker. DO NOT REMOVE + { 31, HELITAKEOFF, NOTHING_block, 0 }, + { 32, HELITAKEOFF, NOTHING_block, 0 }, + { 33, 0, TAXIWAY_BUSY_block, 34 }, // need to go to hangar when waiting in air + { 34, 0, TAXIWAY_BUSY_block, 1 }, + { 35, 0, HELIPAD1_block, 31 }, + { 36, 0, HELIPAD2_block, 32 }, + { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE }; -static const TileIndexDiffC _airport_depots_city[] = {{5, 0}}; -static const byte _airport_terminal_city[] = {1, 3}; +static const TileIndexDiffC _airport_depots_city[] = { { 5, 0 } }; +static const byte _airport_terminal_city[] = { 1, 3 }; static const AirportFTAbuildup _airport_fta_city[] = { - { 0,HANGAR,NOTHING_block,1}, {0,TAKEOFF,OUT_WAY_block,1}, {0,0,0,1}, - { 1,255,TAXIWAY_BUSY_block,0}, {1,HANGAR,0,0}, {1,TERM2,0,6}, {1,TERM3,0,6}, {1,0,0,7}, // for all else, go to 7 - { 2,TERM1,TERM1_block,7}, {2,TAKEOFF,OUT_WAY_block,7}, {2,0,0,7}, - { 3,TERM2,TERM2_block,5}, {3,TAKEOFF,OUT_WAY_block,5}, {3,0,0,5}, - { 4,TERM3,TERM3_block,5}, {4,TAKEOFF,OUT_WAY_block,5}, {4,0,0,5}, - { 5,255,TAXIWAY_BUSY_block,0}, {5,TERM2,TERM2_block,3}, {5,TERM3,TERM3_block,4}, {5,0,0,6}, - { 6,255,TAXIWAY_BUSY_block,0}, {6,TERM2,0,5}, {6,TERM3,0,5}, {6,HANGAR,0,1}, {6,0,0,7}, - { 7,255,TAXIWAY_BUSY_block,0}, {7,TERM1,TERM1_block,2}, {7,TAKEOFF,OUT_WAY_block,8}, {7,HELITAKEOFF,0,22}, {7,HANGAR,0,1}, {7,0,0,6}, - { 8,0,OUT_WAY_block,9}, - { 9,0,RUNWAY_IN_OUT_block,10}, + { 0, HANGAR, NOTHING_block, 1 }, { 0, TAKEOFF, OUT_WAY_block, 1 }, { 0, 0, 0, 1 }, + { 1, 255, TAXIWAY_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM2, 0, 6 }, { 1, TERM3, 0, 6 }, { 1, 0, 0, 7 }, // for all else, go to 7 + { 2, TERM1, TERM1_block, 7 }, { 2, TAKEOFF, OUT_WAY_block, 7 }, { 2, 0, 0, 7 }, + { 3, TERM2, TERM2_block, 5 }, { 3, TAKEOFF, OUT_WAY_block, 5 }, { 3, 0, 0, 5 }, + { 4, TERM3, TERM3_block, 5 }, { 4, TAKEOFF, OUT_WAY_block, 5 }, { 4, 0, 0, 5 }, + { 5, 255, TAXIWAY_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, TERM3, TERM3_block, 4 }, { 5, 0, 0, 6 }, + { 6, 255, TAXIWAY_BUSY_block, 0 }, { 6, TERM2, 0, 5 }, { 6, TERM3, 0, 5 }, { 6, HANGAR, 0, 1 }, { 6, 0, 0, 7 }, + { 7, 255, TAXIWAY_BUSY_block, 0 }, { 7, TERM1, TERM1_block, 2 }, { 7, TAKEOFF, OUT_WAY_block, 8 }, { 7, HELITAKEOFF, 0, 22 }, { 7, HANGAR, 0, 1 }, { 7, 0, 0, 6 }, + { 8, 0, OUT_WAY_block, 9 }, + { 9, 0, RUNWAY_IN_OUT_block, 10 }, // takeoff - {10,TAKEOFF,RUNWAY_IN_OUT_block,11}, - {11,STARTTAKEOFF,NOTHING_block,12}, - {12,ENDTAKEOFF,NOTHING_block,0}, + { 10, TAKEOFF, RUNWAY_IN_OUT_block, 11 }, + { 11, STARTTAKEOFF, NOTHING_block, 12 }, + { 12, ENDTAKEOFF, NOTHING_block, 0 }, // landing - {13,FLYING,NOTHING_block,18}, {13,LANDING,0,14}, {13,HELILANDING,0,23}, - {14,LANDING,RUNWAY_IN_OUT_block,15}, - {15,0,RUNWAY_IN_OUT_block,16}, - {16,0,RUNWAY_IN_OUT_block,17}, - {17,ENDLANDING,IN_WAY_block,7}, + { 13, FLYING, NOTHING_block, 18 }, { 13, LANDING, 0, 14 }, { 13, HELILANDING, 0, 23 }, + { 14, LANDING, RUNWAY_IN_OUT_block, 15 }, + { 15, 0, RUNWAY_IN_OUT_block, 16 }, + { 16, 0, RUNWAY_IN_OUT_block, 17 }, + { 17, ENDLANDING, IN_WAY_block, 7 }, // In Air - {18,0,NOTHING_block,19}, - {19,0,NOTHING_block,20}, - {20,0,NOTHING_block,21}, - {21,0,NOTHING_block,13}, + { 18, 0, NOTHING_block, 19 }, + { 19, 0, NOTHING_block, 20 }, + { 20, 0, NOTHING_block, 21 }, + { 21, 0, NOTHING_block, 13 }, // helicopter - {22,HELITAKEOFF,NOTHING_block,0}, - {23,HELILANDING,IN_WAY_block,24}, - {24,HELIENDLANDING,IN_WAY_block,17}, - {MAX_ELEMENTS,0,0,0} // end marker. DO NOT REMOVE + { 22, HELITAKEOFF, NOTHING_block, 0 }, + { 23, HELILANDING, IN_WAY_block, 24 }, + { 24, HELIENDLANDING, IN_WAY_block, 17 }, + { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE }; -static const TileIndexDiffC _airport_depots_metropolitan[] = {{5, 0}}; -static const byte _airport_terminal_metropolitan[] = {1, 3}; +static const TileIndexDiffC _airport_depots_metropolitan[] = { { 5, 0 } }; +static const byte _airport_terminal_metropolitan[] = { 1, 3 }; static const AirportFTAbuildup _airport_fta_metropolitan[] = { - { 0,HANGAR,NOTHING_block,1}, - { 1,255,TAXIWAY_BUSY_block,0}, {1,HANGAR,0,0}, {1,TERM2,0,6}, {1,TERM3,0,6}, {1,0,0,7}, // for all else, go to 7 - { 2,TERM1,TERM1_block,7}, - { 3,TERM2,TERM2_block,5}, - { 4,TERM3,TERM3_block,5}, - { 5,255,TAXIWAY_BUSY_block,0}, {5,TERM2,TERM2_block,3}, {5,TERM3,TERM3_block,4}, {5,0,0,6}, - { 6,255,TAXIWAY_BUSY_block,0}, {6,TERM2,0,5}, {6,TERM3,0,5}, {6,HANGAR,0,1}, {6,0,0,7}, - { 7,255,TAXIWAY_BUSY_block,0}, {7,TERM1,TERM1_block,2}, {7,TAKEOFF,0,8}, {7,HELITAKEOFF,0,23}, {7,HANGAR,0,1}, {7,0,0,6}, - { 8,0,OUT_WAY_block,9}, - { 9,0,RUNWAY_OUT_block,10}, + { 0, HANGAR, NOTHING_block, 1 }, + { 1, 255, TAXIWAY_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM2, 0, 6 }, { 1, TERM3, 0, 6 }, { 1, 0, 0, 7 }, // for all else, go to 7 + { 2, TERM1, TERM1_block, 7 }, + { 3, TERM2, TERM2_block, 5 }, + { 4, TERM3, TERM3_block, 5 }, + { 5, 255, TAXIWAY_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, TERM3, TERM3_block, 4 }, { 5, 0, 0, 6 }, + { 6, 255, TAXIWAY_BUSY_block, 0 }, { 6, TERM2, 0, 5 }, { 6, TERM3, 0, 5 }, { 6, HANGAR, 0, 1 }, { 6, 0, 0, 7 }, + { 7, 255, TAXIWAY_BUSY_block, 0 }, { 7, TERM1, TERM1_block, 2 }, { 7, TAKEOFF, 0, 8 }, { 7, HELITAKEOFF, 0, 23 }, { 7, HANGAR, 0, 1 }, { 7, 0, 0, 6 }, + { 8, 0, OUT_WAY_block, 9 }, + { 9, 0, RUNWAY_OUT_block, 10 }, // takeoff - {10,TAKEOFF,RUNWAY_OUT_block,11}, - {11,STARTTAKEOFF,NOTHING_block,12}, - {12,ENDTAKEOFF,NOTHING_block,0}, + { 10, TAKEOFF, RUNWAY_OUT_block, 11 }, + { 11, STARTTAKEOFF, NOTHING_block, 12 }, + { 12, ENDTAKEOFF, NOTHING_block, 0 }, // landing - {13,FLYING,NOTHING_block,19}, {13,LANDING,0,14}, {13,HELILANDING,0,25}, - {14,LANDING,RUNWAY_IN_block,15}, - {15,0,RUNWAY_IN_block,16}, - {16,255,RUNWAY_IN_block,0}, {16,ENDLANDING,IN_WAY_block,17}, - {17,255,RUNWAY_OUT_block,0}, {17,ENDLANDING,IN_WAY_block,18}, - {18,ENDLANDING,IN_WAY_block,7}, + { 13, FLYING, NOTHING_block, 19 }, { 13, LANDING, 0, 14 }, { 13, HELILANDING, 0, 25 }, + { 14, LANDING, RUNWAY_IN_block, 15 }, + { 15, 0, RUNWAY_IN_block, 16 }, + { 16, 255, RUNWAY_IN_block, 0 }, { 16, ENDLANDING, IN_WAY_block, 17 }, + { 17, 255, RUNWAY_OUT_block, 0 }, { 17, ENDLANDING, IN_WAY_block, 18 }, + { 18, ENDLANDING, IN_WAY_block, 7 }, // In Air - {19,0,NOTHING_block,20}, - {20,0,NOTHING_block,21}, - {21,0,NOTHING_block,22}, - {22,0,NOTHING_block,13}, + { 19, 0, NOTHING_block, 20 }, + { 20, 0, NOTHING_block, 21 }, + { 21, 0, NOTHING_block, 22 }, + { 22, 0, NOTHING_block, 13 }, // helicopter - {23,0,NOTHING_block,24}, - {24,HELITAKEOFF,NOTHING_block,0}, - {25,HELILANDING,IN_WAY_block,26}, - {26,HELIENDLANDING,IN_WAY_block,18}, - {MAX_ELEMENTS,0,0,0} // end marker. DO NOT REMOVE + { 23, 0, NOTHING_block, 24 }, + { 24, HELITAKEOFF, NOTHING_block, 0 }, + { 25, HELILANDING, IN_WAY_block, 26 }, + { 26, HELIENDLANDING, IN_WAY_block, 18 }, + { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE }; -static const TileIndexDiffC _airport_depots_international[] = {{0, 3}, {6, 1}}; -static const byte _airport_terminal_international[] = {2, 3, 3}; -static const byte _airport_helipad_international[] = {1, 2}; +static const TileIndexDiffC _airport_depots_international[] = { { 0, 3 }, { 6, 1 } }; +static const byte _airport_terminal_international[] = { 2, 3, 3 }; +static const byte _airport_helipad_international[] = { 1, 2 }; static const AirportFTAbuildup _airport_fta_international[] = { - { 0,HANGAR,NOTHING_block,2}, {0,255,TERM_GROUP1_block,0}, {0,255,TERM_GROUP2_ENTER1_block,1}, {0,HELITAKEOFF,HELIPAD1_block,2}, {0,0,0,2}, - { 1,HANGAR,NOTHING_block,3}, {1,255,HANGAR2_AREA_block,1}, {1,HELITAKEOFF,HELIPAD2_block,3}, {1,0,0,3}, - { 2,255,AIRPORT_ENTRANCE_block,0}, {2,HANGAR,0,0}, {2,TERM4,0,12}, {2,TERM5,0,12}, {2,TERM6,0,12}, {2,HELIPAD1,0,12}, {2,HELIPAD2,0,12}, {2,HELITAKEOFF,0,12}, {2,0,0,23}, - { 3,255,HANGAR2_AREA_block,0}, {3,HANGAR,0,1}, {3,0,0,18}, - { 4,TERM1,TERM1_block,23}, {4,HANGAR,AIRPORT_ENTRANCE_block,23}, {4,0,0,23}, - { 5,TERM2,TERM2_block,24}, {5,HANGAR,AIRPORT_ENTRANCE_block,24}, {5,0,0,24}, - { 6,TERM3,TERM3_block,25}, {6,HANGAR,AIRPORT_ENTRANCE_block,25}, {6,0,0,25}, - { 7,TERM4,TERM4_block,16}, {7,HANGAR,HANGAR2_AREA_block,16}, {7,0,0,16}, - { 8,TERM5,TERM5_block,17}, {8,HANGAR,HANGAR2_AREA_block,17}, {8,0,0,17}, - { 9,TERM6,TERM6_block,18}, {9,HANGAR,HANGAR2_AREA_block,18}, {9,0,0,18}, - {10,HELIPAD1,HELIPAD1_block,10}, {10,HANGAR,HANGAR2_AREA_block,16}, {10,HELITAKEOFF,0,47}, - {11,HELIPAD2,HELIPAD2_block,11}, {11,HANGAR,HANGAR2_AREA_block,17}, {11,HELITAKEOFF,0,48}, - {12,0,TERM_GROUP2_ENTER1_block,13}, - {13,0,TERM_GROUP2_ENTER1_block,14}, - {14,0,TERM_GROUP2_ENTER2_block,15}, - {15,0,TERM_GROUP2_ENTER2_block,16}, - {16,255,TERM_GROUP2_block,0}, {16,TERM4,TERM4_block,7}, {16,HELIPAD1,HELIPAD1_block,10}, {16,HELITAKEOFF,HELIPAD1_block,10}, {16,0,0,17}, - {17,255,TERM_GROUP2_block,0}, {17,TERM5,TERM5_block,8}, {17,TERM4,0,16}, {17,HELIPAD1,0,16}, {17,HELIPAD2,HELIPAD2_block,11}, {17,HELITAKEOFF,HELIPAD2_block,11}, {17,0,0,18}, - {18,255,TERM_GROUP2_block,0}, {18,TERM6,TERM6_block,9}, {18,TAKEOFF,0,19}, {18,HANGAR,HANGAR2_AREA_block,3}, {18,0,0,17}, - {19,0,TERM_GROUP2_EXIT1_block,20}, - {20,0,TERM_GROUP2_EXIT1_block,21}, - {21,0,TERM_GROUP2_EXIT2_block,22}, - {22,0,TERM_GROUP2_EXIT2_block,26}, - {23,255,TERM_GROUP1_block,0}, {23,TERM1,TERM1_block,4}, {23,HANGAR,AIRPORT_ENTRANCE_block,2}, {23,0,0,24}, - {24,255,TERM_GROUP1_block,0}, {24,TERM2,TERM2_block,5}, {24,TERM1,0,23}, {24,HANGAR,0,23}, {24,0,0,25}, - {25,255,TERM_GROUP1_block,0}, {25,TERM3,TERM3_block,6}, {25,TAKEOFF,0,26}, {25,0,0,24}, - {26,255,TAXIWAY_BUSY_block,0}, {26,TAKEOFF,0,27}, {26,0,0,25}, - {27,0,OUT_WAY_block,28}, + { 0, HANGAR, NOTHING_block, 2 }, { 0, 255, TERM_GROUP1_block, 0 }, { 0, 255, TERM_GROUP2_ENTER1_block, 1 }, { 0, HELITAKEOFF, HELIPAD1_block, 2 }, { 0, 0, 0, 2 }, + { 1, HANGAR, NOTHING_block, 3 }, { 1, 255, HANGAR2_AREA_block, 1 }, { 1, HELITAKEOFF, HELIPAD2_block, 3 }, { 1, 0, 0, 3 }, + { 2, 255, AIRPORT_ENTRANCE_block, 0 }, { 2, HANGAR, 0, 0 }, { 2, TERM4, 0, 12 }, { 2, TERM5, 0, 12 }, { 2, TERM6, 0, 12 }, { 2, HELIPAD1, 0, 12 }, { 2, HELIPAD2, 0, 12 }, { 2, HELITAKEOFF, 0, 12 }, { 2, 0, 0, 23 }, + { 3, 255, HANGAR2_AREA_block, 0 }, { 3, HANGAR, 0, 1 }, { 3, 0, 0, 18 }, + { 4, TERM1, TERM1_block, 23 }, { 4, HANGAR, AIRPORT_ENTRANCE_block, 23 }, { 4, 0, 0, 23 }, + { 5, TERM2, TERM2_block, 24 }, { 5, HANGAR, AIRPORT_ENTRANCE_block, 24 }, { 5, 0, 0, 24 }, + { 6, TERM3, TERM3_block, 25 }, { 6, HANGAR, AIRPORT_ENTRANCE_block, 25 }, { 6, 0, 0, 25 }, + { 7, TERM4, TERM4_block, 16 }, { 7, HANGAR, HANGAR2_AREA_block, 16 }, { 7, 0, 0, 16 }, + { 8, TERM5, TERM5_block, 17 }, { 8, HANGAR, HANGAR2_AREA_block, 17 }, { 8, 0, 0, 17 }, + { 9, TERM6, TERM6_block, 18 }, { 9, HANGAR, HANGAR2_AREA_block, 18 }, { 9, 0, 0, 18 }, + { 10, HELIPAD1, HELIPAD1_block, 10 }, { 10, HANGAR, HANGAR2_AREA_block, 16 }, { 10, HELITAKEOFF, 0, 47 }, + { 11, HELIPAD2, HELIPAD2_block, 11 }, { 11, HANGAR, HANGAR2_AREA_block, 17 }, { 11, HELITAKEOFF, 0, 48 }, + { 12, 0, TERM_GROUP2_ENTER1_block, 13 }, + { 13, 0, TERM_GROUP2_ENTER1_block, 14 }, + { 14, 0, TERM_GROUP2_ENTER2_block, 15 }, + { 15, 0, TERM_GROUP2_ENTER2_block, 16 }, + { 16, 255, TERM_GROUP2_block, 0 }, { 16, TERM4, TERM4_block, 7 }, { 16, HELIPAD1, HELIPAD1_block, 10 }, { 16, HELITAKEOFF, HELIPAD1_block, 10 }, { 16, 0, 0, 17 }, + { 17, 255, TERM_GROUP2_block, 0 }, { 17, TERM5, TERM5_block, 8 }, { 17, TERM4, 0, 16 }, { 17, HELIPAD1, 0, 16 }, { 17, HELIPAD2, HELIPAD2_block, 11 }, { 17, HELITAKEOFF, HELIPAD2_block, 11 }, { 17, 0, 0, 18 }, + { 18, 255, TERM_GROUP2_block, 0 }, { 18, TERM6, TERM6_block, 9 }, { 18, TAKEOFF, 0, 19 }, { 18, HANGAR, HANGAR2_AREA_block, 3 }, { 18, 0, 0, 17 }, + { 19, 0, TERM_GROUP2_EXIT1_block, 20 }, + { 20, 0, TERM_GROUP2_EXIT1_block, 21 }, + { 21, 0, TERM_GROUP2_EXIT2_block, 22 }, + { 22, 0, TERM_GROUP2_EXIT2_block, 26 }, + { 23, 255, TERM_GROUP1_block, 0 }, { 23, TERM1, TERM1_block, 4 }, { 23, HANGAR, AIRPORT_ENTRANCE_block, 2 }, { 23, 0, 0, 24 }, + { 24, 255, TERM_GROUP1_block, 0 }, { 24, TERM2, TERM2_block, 5 }, { 24, TERM1, 0, 23 }, { 24, HANGAR, 0, 23 }, { 24, 0, 0, 25 }, + { 25, 255, TERM_GROUP1_block, 0 }, { 25, TERM3, TERM3_block, 6 }, { 25, TAKEOFF, 0, 26 }, { 25, 0, 0, 24 }, + { 26, 255, TAXIWAY_BUSY_block, 0 }, { 26, TAKEOFF, 0, 27 }, { 26, 0, 0, 25 }, + { 27, 0, OUT_WAY_block, 28 }, // takeoff - {28,TAKEOFF,OUT_WAY_block,29}, - {29,0,RUNWAY_OUT_block,30}, - {30,STARTTAKEOFF,NOTHING_block,31}, - {31,ENDTAKEOFF,NOTHING_block,0}, + { 28, TAKEOFF, OUT_WAY_block, 29 }, + { 29, 0, RUNWAY_OUT_block, 30 }, + { 30, STARTTAKEOFF, NOTHING_block, 31 }, + { 31, ENDTAKEOFF, NOTHING_block, 0 }, // landing - {32,FLYING,NOTHING_block,37}, {32,LANDING,0,33}, {32,HELILANDING,0,41}, - {33,LANDING,RUNWAY_IN_block,34}, - {34,0,RUNWAY_IN_block,35}, - {35,0,RUNWAY_IN_block,36}, - {36,ENDLANDING,IN_WAY_block,36}, {36,255,TERM_GROUP1_block,0}, {36,255,TERM_GROUP2_ENTER1_block,1}, {36,TERM4,0,12}, {36,TERM5,0,12}, {36,TERM6,0,12}, {36,0,0,2}, + { 32, FLYING, NOTHING_block, 37 }, { 32, LANDING, 0, 33 }, { 32, HELILANDING, 0, 41 }, + { 33, LANDING, RUNWAY_IN_block, 34 }, + { 34, 0, RUNWAY_IN_block, 35 }, + { 35, 0, RUNWAY_IN_block, 36 }, + { 36, ENDLANDING, IN_WAY_block, 36 }, { 36, 255, TERM_GROUP1_block, 0 }, { 36, 255, TERM_GROUP2_ENTER1_block, 1 }, { 36, TERM4, 0, 12 }, { 36, TERM5, 0, 12 }, { 36, TERM6, 0, 12 }, { 36, 0, 0, 2 }, // In Air - {37,0,NOTHING_block,38}, - {38,0,NOTHING_block,39}, - {39,0,NOTHING_block,40}, - {40,0,NOTHING_block,32}, + { 37, 0, NOTHING_block, 38 }, + { 38, 0, NOTHING_block, 39 }, + { 39, 0, NOTHING_block, 40 }, + { 40, 0, NOTHING_block, 32 }, // Helicopter -- stay in air in special place as a buffer to choose from helipads - {41,HELILANDING,PRE_HELIPAD_block,42}, - {42,HELIENDLANDING,PRE_HELIPAD_block,42}, {42,HELIPAD1,0,43}, {42,HELIPAD2,0,44}, {42,HANGAR,0,49}, - {43,0,NOTHING_block,45}, - {44,0,NOTHING_block,46}, + { 41, HELILANDING, PRE_HELIPAD_block, 42 }, + { 42, HELIENDLANDING, PRE_HELIPAD_block, 42 }, { 42, HELIPAD1, 0, 43 }, { 42, HELIPAD2, 0, 44 }, { 42, HANGAR, 0, 49 }, + { 43, 0, NOTHING_block, 45 }, + { 44, 0, NOTHING_block, 46 }, // landing - {45,255,NOTHING_block,0}, {45,HELIPAD1,HELIPAD1_block,10}, - {46,255,NOTHING_block,0}, {46,HELIPAD2,HELIPAD2_block,11}, + { 45, 255, NOTHING_block, 0 }, { 45, HELIPAD1, HELIPAD1_block, 10 }, + { 46, 255, NOTHING_block, 0 }, { 46, HELIPAD2, HELIPAD2_block, 11 }, // Helicopter -- takeoff - {47,HELITAKEOFF,NOTHING_block,0}, - {48,HELITAKEOFF,NOTHING_block,0}, - {49,0,HANGAR2_AREA_block,50}, // need to go to hangar when waiting in air - {50,0,HANGAR2_AREA_block,3}, - {MAX_ELEMENTS,0,0,0} // end marker. DO NOT REMOVE + { 47, HELITAKEOFF, NOTHING_block, 0 }, + { 48, HELITAKEOFF, NOTHING_block, 0 }, + { 49, 0, HANGAR2_AREA_block, 50 }, // need to go to hangar when waiting in air + { 50, 0, HANGAR2_AREA_block, 3 }, + { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE }; // intercontinental -static const TileIndexDiffC _airport_depots_intercontinental[] = {{0, 5}, {8, 4}}; -static const byte _airport_terminal_intercontinental[] = {2, 4, 4}; -static const byte _airport_helipad_intercontinental[] = {1, 2}; +static const TileIndexDiffC _airport_depots_intercontinental[] = { { 0, 5 }, { 8, 4 } }; +static const byte _airport_terminal_intercontinental[] = { 2, 4, 4 }; +static const byte _airport_helipad_intercontinental[] = { 1, 2 }; static const AirportFTAbuildup _airport_fta_intercontinental[] = { - { 0,HANGAR,NOTHING_block,2}, {0,255,HANGAR1_AREA_block | TERM_GROUP1_block,0}, {0,255,HANGAR1_AREA_block | TERM_GROUP1_block,1}, {0,TAKEOFF,HANGAR1_AREA_block | TERM_GROUP1_block,2}, {0,0,0,2}, - { 1,HANGAR,NOTHING_block,3}, {1,255,HANGAR2_AREA_block,1}, {1,255,HANGAR2_AREA_block,0}, {1,0,0,3}, - { 2,255,HANGAR1_AREA_block,0}, {2,255,TERM_GROUP1_block,0}, {2,255,TERM_GROUP1_block,1}, {2,HANGAR,0,0}, {2,TAKEOFF,TERM_GROUP1_block,27}, {2,TERM5,0,26}, {2,TERM6,0,26}, {2,TERM7,0,26}, {2,TERM8,0,26}, {2,HELIPAD1,0,26}, {2,HELIPAD2,0,26}, {2,HELITAKEOFF,0,74}, {2,0,0,27}, - { 3,255,HANGAR2_AREA_block,0}, {3,HANGAR,0,1}, {3,HELITAKEOFF,0,75}, {3,0,0,20}, - { 4,TERM1,TERM1_block,26}, {4,HANGAR,HANGAR1_AREA_block | TERM_GROUP1_block,26}, {4,0,0,26}, - { 5,TERM2,TERM2_block,27}, {5,HANGAR,HANGAR1_AREA_block | TERM_GROUP1_block,27}, {5,0,0,27}, - { 6,TERM3,TERM3_block,28}, {6,HANGAR,HANGAR1_AREA_block | TERM_GROUP1_block,28}, {6,0,0,28}, - { 7,TERM4,TERM4_block,29}, {7,HANGAR,HANGAR1_AREA_block | TERM_GROUP1_block,29}, {7,0,0,29}, - { 8,TERM5,TERM5_block,18}, {8,HANGAR,HANGAR2_AREA_block,18}, {8,0,0,18}, - { 9,TERM6,TERM6_block,19}, {9,HANGAR,HANGAR2_AREA_block,19}, {9,0,0,19}, - {10,TERM7,TERM7_block,20}, {10,HANGAR,HANGAR2_AREA_block,20}, {10,0,0,20}, - {11,TERM8,TERM8_block,21}, {11,HANGAR,HANGAR2_AREA_block,21}, {11,0,0,21}, - {12,HELIPAD1,HELIPAD1_block,12}, {12,HANGAR,0,70}, {12,HELITAKEOFF,0,72}, - {13,HELIPAD2,HELIPAD2_block,13}, {13,HANGAR,0,71}, {13,HELITAKEOFF,0,73}, - {14,0,TERM_GROUP2_ENTER1_block,15}, - {15,0,TERM_GROUP2_ENTER1_block,16}, - {16,0,TERM_GROUP2_ENTER2_block,17}, - {17,0,TERM_GROUP2_ENTER2_block,18}, - {18,255,TERM_GROUP2_block,0}, {18,TERM5,TERM5_block,8}, {18,TAKEOFF,0,19}, {18,HELITAKEOFF,HELIPAD1_block,19}, {18,0,TERM_GROUP2_EXIT1_block,19}, - {19,255,TERM_GROUP2_block,0}, {19,TERM6,TERM6_block,9}, {19,TERM5,0,18}, {19,TAKEOFF,0,57}, {19,HELITAKEOFF,HELIPAD1_block,20}, {19,0,TERM_GROUP2_EXIT1_block,20}, // add exit to runway out 2 - {20,255,TERM_GROUP2_block,0}, {20,TERM7,TERM7_block,10}, {20,TERM5,0,19}, {20,TERM6,0,19}, {20,HANGAR,HANGAR2_AREA_block,3}, {20,TAKEOFF,0,19}, {20,0,TERM_GROUP2_EXIT1_block,21}, - {21,255,TERM_GROUP2_block,0}, {21,TERM8,TERM8_block,11}, {21,HANGAR,HANGAR2_AREA_block,20}, {21,TERM5,0,20}, {21,TERM6,0,20}, {21,TERM7,0,20}, {21,TAKEOFF,0,20}, {21,0,TERM_GROUP2_EXIT1_block,22}, - {22,255,TERM_GROUP2_block,0}, {22,HANGAR,0,21}, {22,TERM5,0,21}, {22,TERM6,0,21}, {22,TERM7,0,21}, {22,TERM8,0,21}, {22,TAKEOFF,0,21}, {22,0,0,23}, - {23,255,TERM_GROUP2_EXIT1_block,0}, {23,0,0,70}, - {24,0,TERM_GROUP2_EXIT2_block,25}, - {25,255,TERM_GROUP2_EXIT2_block,0}, {25,HANGAR,HANGAR1_AREA_block | TERM_GROUP1_block,29}, {25,0,0,29}, - {26,255,TERM_GROUP1_block,0}, {26,TERM1,TERM1_block,4}, {26,HANGAR,HANGAR1_AREA_block,27}, {26,TERM5,TERM_GROUP2_ENTER1_block,14}, {26,TERM6,TERM_GROUP2_ENTER1_block,14}, {26,TERM7,TERM_GROUP2_ENTER1_block,14}, {26,TERM8,TERM_GROUP2_ENTER1_block,14}, {26,HELIPAD1,TERM_GROUP2_ENTER1_block,14}, {26,HELIPAD2,TERM_GROUP2_ENTER1_block,14}, {26,HELITAKEOFF,TERM_GROUP2_ENTER1_block,14}, {26,0,0,27}, - {27,255,TERM_GROUP1_block,0}, {27,TERM2,TERM2_block,5}, {27,HANGAR,HANGAR1_AREA_block,2}, {27,TERM1,0,26}, {27,TERM5,0,26}, {27,TERM6,0,26}, {27,TERM7,0,26}, {27,TERM8,0,26}, {27,HELIPAD1,0,14}, {27,HELIPAD2,0,14}, {27,0,0,28}, - {28,255,TERM_GROUP1_block,0}, {28,TERM3,TERM3_block,6}, {28,HANGAR,HANGAR1_AREA_block,27}, {28,TERM1,0,27}, {28,TERM2,0,27}, {28,TERM4,0,29}, {28,TERM5,0,14}, {28,TERM6,0,14}, {28,TERM7,0,14}, {28,TERM8,0,14}, {28,HELIPAD1,0,14}, {28,HELIPAD2,0,14}, {28,0,0,29}, - {29,255,TERM_GROUP1_block,0}, {29,TERM4,TERM4_block,7}, {29,HANGAR,HANGAR1_AREA_block,27}, {29,TAKEOFF,0,30}, {29,0,0,28}, - {30,255,OUT_WAY_block2,0}, {30,0,0,31}, - {31,255,OUT_WAY_block,32}, + { 0, HANGAR, NOTHING_block, 2 }, { 0, 255, HANGAR1_AREA_block | TERM_GROUP1_block, 0 }, { 0, 255, HANGAR1_AREA_block | TERM_GROUP1_block, 1 }, { 0, TAKEOFF, HANGAR1_AREA_block | TERM_GROUP1_block, 2 }, { 0, 0, 0, 2 }, + { 1, HANGAR, NOTHING_block, 3 }, { 1, 255, HANGAR2_AREA_block, 1 }, { 1, 255, HANGAR2_AREA_block, 0 }, { 1, 0, 0, 3 }, + { 2, 255, HANGAR1_AREA_block, 0 }, { 2, 255, TERM_GROUP1_block, 0 }, { 2, 255, TERM_GROUP1_block, 1 }, { 2, HANGAR, 0, 0 }, { 2, TAKEOFF, TERM_GROUP1_block, 27 }, { 2, TERM5, 0, 26 }, { 2, TERM6, 0, 26 }, { 2, TERM7, 0, 26 }, { 2, TERM8, 0, 26 }, { 2, HELIPAD1, 0, 26 }, { 2, HELIPAD2, 0, 26 }, { 2, HELITAKEOFF, 0, 74 }, { 2, 0, 0, 27 }, + { 3, 255, HANGAR2_AREA_block, 0 }, { 3, HANGAR, 0, 1 }, { 3, HELITAKEOFF, 0, 75 }, { 3, 0, 0, 20 }, + { 4, TERM1, TERM1_block, 26 }, { 4, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 26 }, { 4, 0, 0, 26 }, + { 5, TERM2, TERM2_block, 27 }, { 5, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 27 }, { 5, 0, 0, 27 }, + { 6, TERM3, TERM3_block, 28 }, { 6, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 28 }, { 6, 0, 0, 28 }, + { 7, TERM4, TERM4_block, 29 }, { 7, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 29 }, { 7, 0, 0, 29 }, + { 8, TERM5, TERM5_block, 18 }, { 8, HANGAR, HANGAR2_AREA_block, 18 }, { 8, 0, 0, 18 }, + { 9, TERM6, TERM6_block, 19 }, { 9, HANGAR, HANGAR2_AREA_block, 19 }, { 9, 0, 0, 19 }, + { 10, TERM7, TERM7_block, 20 }, { 10, HANGAR, HANGAR2_AREA_block, 20 }, { 10, 0, 0, 20 }, + { 11, TERM8, TERM8_block, 21 }, { 11, HANGAR, HANGAR2_AREA_block, 21 }, { 11, 0, 0, 21 }, + { 12, HELIPAD1, HELIPAD1_block, 12 }, { 12, HANGAR, 0, 70 }, { 12, HELITAKEOFF, 0, 72 }, + { 13, HELIPAD2, HELIPAD2_block, 13 }, { 13, HANGAR, 0, 71 }, { 13, HELITAKEOFF, 0, 73 }, + { 14, 0, TERM_GROUP2_ENTER1_block, 15 }, + { 15, 0, TERM_GROUP2_ENTER1_block, 16 }, + { 16, 0, TERM_GROUP2_ENTER2_block, 17 }, + { 17, 0, TERM_GROUP2_ENTER2_block, 18 }, + { 18, 255, TERM_GROUP2_block, 0 }, { 18, TERM5, TERM5_block, 8 }, { 18, TAKEOFF, 0, 19 }, { 18, HELITAKEOFF, HELIPAD1_block, 19 }, { 18, 0, TERM_GROUP2_EXIT1_block, 19 }, + { 19, 255, TERM_GROUP2_block, 0 }, { 19, TERM6, TERM6_block, 9 }, { 19, TERM5, 0, 18 }, { 19, TAKEOFF, 0, 57 }, { 19, HELITAKEOFF, HELIPAD1_block, 20 }, { 19, 0, TERM_GROUP2_EXIT1_block, 20 }, // add exit to runway out 2 + { 20, 255, TERM_GROUP2_block, 0 }, { 20, TERM7, TERM7_block, 10 }, { 20, TERM5, 0, 19 }, { 20, TERM6, 0, 19 }, { 20, HANGAR, HANGAR2_AREA_block, 3 }, { 20, TAKEOFF, 0, 19 }, { 20, 0, TERM_GROUP2_EXIT1_block, 21 }, + { 21, 255, TERM_GROUP2_block, 0 }, { 21, TERM8, TERM8_block, 11 }, { 21, HANGAR, HANGAR2_AREA_block, 20 }, { 21, TERM5, 0, 20 }, { 21, TERM6, 0, 20 }, { 21, TERM7, 0, 20 }, { 21, TAKEOFF, 0, 20 }, { 21, 0, TERM_GROUP2_EXIT1_block, 22 }, + { 22, 255, TERM_GROUP2_block, 0 }, { 22, HANGAR, 0, 21 }, { 22, TERM5, 0, 21 }, { 22, TERM6, 0, 21 }, { 22, TERM7, 0, 21 }, { 22, TERM8, 0, 21 }, { 22, TAKEOFF, 0, 21 }, { 22, 0, 0, 23 }, + { 23, 255, TERM_GROUP2_EXIT1_block, 0 }, { 23, 0, 0, 70 }, + { 24, 0, TERM_GROUP2_EXIT2_block, 25 }, + { 25, 255, TERM_GROUP2_EXIT2_block, 0 }, { 25, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 29 }, { 25, 0, 0, 29 }, + { 26, 255, TERM_GROUP1_block, 0 }, { 26, TERM1, TERM1_block, 4 }, { 26, HANGAR, HANGAR1_AREA_block, 27 }, { 26, TERM5, TERM_GROUP2_ENTER1_block, 14 }, { 26, TERM6, TERM_GROUP2_ENTER1_block, 14 }, { 26, TERM7, TERM_GROUP2_ENTER1_block, 14 }, { 26, TERM8, TERM_GROUP2_ENTER1_block, 14 }, { 26, HELIPAD1, TERM_GROUP2_ENTER1_block, 14 }, { 26, HELIPAD2, TERM_GROUP2_ENTER1_block, 14 }, { 26, HELITAKEOFF, TERM_GROUP2_ENTER1_block, 14 }, { 26, 0, 0, 27 }, + { 27, 255, TERM_GROUP1_block, 0 }, { 27, TERM2, TERM2_block, 5 }, { 27, HANGAR, HANGAR1_AREA_block, 2 }, { 27, TERM1, 0, 26 }, { 27, TERM5, 0, 26 }, { 27, TERM6, 0, 26 }, { 27, TERM7, 0, 26 }, { 27, TERM8, 0, 26 }, { 27, HELIPAD1, 0, 14 }, { 27, HELIPAD2, 0, 14 }, { 27, 0, 0, 28 }, + { 28, 255, TERM_GROUP1_block, 0 }, { 28, TERM3, TERM3_block, 6 }, { 28, HANGAR, HANGAR1_AREA_block, 27 }, { 28, TERM1, 0, 27 }, { 28, TERM2, 0, 27 }, { 28, TERM4, 0, 29 }, { 28, TERM5, 0, 14 }, { 28, TERM6, 0, 14 }, { 28, TERM7, 0, 14 }, { 28, TERM8, 0, 14 }, { 28, HELIPAD1, 0, 14 }, { 28, HELIPAD2, 0, 14 }, { 28, 0, 0, 29 }, + { 29, 255, TERM_GROUP1_block, 0 }, { 29, TERM4, TERM4_block, 7 }, { 29, HANGAR, HANGAR1_AREA_block, 27 }, { 29, TAKEOFF, 0, 30 }, { 29, 0, 0, 28 }, + { 30, 255, OUT_WAY_block2, 0 }, { 30, 0, 0, 31 }, + { 31, 255, OUT_WAY_block, 32 }, // takeoff - {32,TAKEOFF,RUNWAY_OUT_block,33}, - {33,0,RUNWAY_OUT_block,34}, - {34,STARTTAKEOFF,NOTHING_block,35}, - {35,ENDTAKEOFF,NOTHING_block,0}, + { 32, TAKEOFF, RUNWAY_OUT_block, 33 }, + { 33, 0, RUNWAY_OUT_block, 34 }, + { 34, STARTTAKEOFF, NOTHING_block, 35 }, + { 35, ENDTAKEOFF, NOTHING_block, 0 }, // landing - {36,0,0,0}, - {37,LANDING,RUNWAY_IN_block,38}, - {38,0,RUNWAY_IN_block,39}, - {39,0,RUNWAY_IN_block,40}, - {40,ENDLANDING,RUNWAY_IN_block,41}, - {41,0,IN_WAY_block,42}, - {42,255,IN_WAY_block,0}, {42,255,TERM_GROUP1_block,0}, {42,255,TERM_GROUP1_block,1}, {42,HANGAR,0,2}, {42,0,0,26}, + { 36, 0, 0, 0 }, + { 37, LANDING, RUNWAY_IN_block, 38 }, + { 38, 0, RUNWAY_IN_block, 39 }, + { 39, 0, RUNWAY_IN_block, 40 }, + { 40, ENDLANDING, RUNWAY_IN_block, 41 }, + { 41, 0, IN_WAY_block, 42 }, + { 42, 255, IN_WAY_block, 0 }, { 42, 255, TERM_GROUP1_block, 0 }, { 42, 255, TERM_GROUP1_block, 1 }, { 42, HANGAR, 0, 2 }, { 42, 0, 0, 26 }, // In Air - {43,0,0,44}, - {44,FLYING,0,45}, {44,HELILANDING,0,47}, {44,LANDING,0,69}, {44,0,0,45}, - {45,0,0,46}, - {46,FLYING,0,43}, {46,LANDING,0,76}, {46,0,0,43}, + { 43, 0, 0, 44 }, + { 44, FLYING, 0, 45 }, { 44, HELILANDING, 0, 47 }, { 44, LANDING, 0, 69 }, { 44, 0, 0, 45 }, + { 45, 0, 0, 46 }, + { 46, FLYING, 0, 43 }, { 46, LANDING, 0, 76 }, { 46, 0, 0, 43 }, // Helicopter -- stay in air in special place as a buffer to choose from helipads - {47,HELILANDING,PRE_HELIPAD_block,48}, - {48,HELIENDLANDING,PRE_HELIPAD_block,48}, {48,HELIPAD1,0,49}, {48,HELIPAD2,0,50}, {48,HANGAR,0,55}, - {49,0,NOTHING_block,51}, - {50,0,NOTHING_block,52}, + { 47, HELILANDING, PRE_HELIPAD_block, 48 }, + { 48, HELIENDLANDING, PRE_HELIPAD_block, 48 }, { 48, HELIPAD1, 0, 49 }, { 48, HELIPAD2, 0, 50 }, { 48, HANGAR, 0, 55 }, + { 49, 0, NOTHING_block, 51 }, + { 50, 0, NOTHING_block, 52 }, // landing - {51,255,NOTHING_block,0}, {51,HELIPAD1,HELIPAD1_block,12}, {51,HANGAR,0,55}, {51,0,0,12}, - {52,255,NOTHING_block,0}, {52,HELIPAD2,HELIPAD2_block,13}, {52,HANGAR,0,55}, {52,0,0,13}, + { 51, 255, NOTHING_block, 0 }, { 51, HELIPAD1, HELIPAD1_block, 12 }, { 51, HANGAR, 0, 55 }, { 51, 0, 0, 12 }, + { 52, 255, NOTHING_block, 0 }, { 52, HELIPAD2, HELIPAD2_block, 13 }, { 52, HANGAR, 0, 55 }, { 52, 0, 0, 13 }, // Helicopter -- takeoff - {53,HELITAKEOFF,NOTHING_block,0}, - {54,HELITAKEOFF,NOTHING_block,0}, - {55,0,HANGAR2_AREA_block,56}, // need to go to hangar when waiting in air - {56,0,HANGAR2_AREA_block,3}, + { 53, HELITAKEOFF, NOTHING_block, 0 }, + { 54, HELITAKEOFF, NOTHING_block, 0 }, + { 55, 0, HANGAR2_AREA_block, 56 }, // need to go to hangar when waiting in air + { 56, 0, HANGAR2_AREA_block, 3 }, // runway 2 out support - {57,255,OUT_WAY2_block,0}, {57,TAKEOFF,0,58}, {57,0,0,58}, - {58,0,OUT_WAY2_block,59}, - {59,TAKEOFF,RUNWAY_OUT2_block,60}, // takeoff - {60,0,RUNWAY_OUT2_block,61}, - {61,STARTTAKEOFF,NOTHING_block,62}, - {62,ENDTAKEOFF,NOTHING_block,0}, + { 57, 255, OUT_WAY2_block, 0 }, { 57, TAKEOFF, 0, 58 }, { 57, 0, 0, 58 }, + { 58, 0, OUT_WAY2_block, 59 }, + { 59, TAKEOFF, RUNWAY_OUT2_block, 60 }, // takeoff + { 60, 0, RUNWAY_OUT2_block, 61 }, + { 61, STARTTAKEOFF, NOTHING_block, 62 }, + { 62, ENDTAKEOFF, NOTHING_block, 0 }, // runway 2 in support - {63,LANDING,RUNWAY_IN2_block,64}, - {64,0,RUNWAY_IN2_block,65}, - {65,0,RUNWAY_IN2_block,66}, - {66,ENDLANDING,RUNWAY_IN2_block,0}, {66,255,0,1}, {66,255,0,0}, {66,0,0,67}, - {67,0,IN_WAY2_block,68}, - {68,255,IN_WAY2_block,0}, {68,255,TERM_GROUP2_block,1}, {68,255,TERM_GROUP1_block,0}, {68,HANGAR,HANGAR2_AREA_block,22}, {68,0,0,22}, - {69,255,RUNWAY_IN2_block,0}, {69,0,RUNWAY_IN2_block,63}, - {70,255,TERM_GROUP2_EXIT1_block,0}, {70,HELIPAD1,HELIPAD1_block,12}, {70,HELITAKEOFF,HELIPAD1_block,12}, {70,0,0,71}, - {71,255,TERM_GROUP2_EXIT1_block,0}, {71,HELIPAD2,HELIPAD2_block,13}, {71,HELITAKEOFF,HELIPAD1_block,12}, {71,0,0,24}, - {72,0,HELIPAD1_block,53}, - {73,0,HELIPAD2_block,54}, - {74,HELITAKEOFF,NOTHING_block,0}, - {75,HELITAKEOFF,NOTHING_block,0}, - {76,255,RUNWAY_IN_block,0}, {76,0,RUNWAY_IN_block,37}, - {MAX_ELEMENTS,0,0,0} // end marker. DO NOT REMOVE + { 63, LANDING, RUNWAY_IN2_block, 64 }, + { 64, 0, RUNWAY_IN2_block, 65 }, + { 65, 0, RUNWAY_IN2_block, 66 }, + { 66, ENDLANDING, RUNWAY_IN2_block, 0 }, { 66, 255, 0, 1 }, { 66, 255, 0, 0 }, { 66, 0, 0, 67 }, + { 67, 0, IN_WAY2_block, 68 }, + { 68, 255, IN_WAY2_block, 0 }, { 68, 255, TERM_GROUP2_block, 1 }, { 68, 255, TERM_GROUP1_block, 0 }, { 68, HANGAR, HANGAR2_AREA_block, 22 }, { 68, 0, 0, 22 }, + { 69, 255, RUNWAY_IN2_block, 0 }, { 69, 0, RUNWAY_IN2_block, 63 }, + { 70, 255, TERM_GROUP2_EXIT1_block, 0 }, { 70, HELIPAD1, HELIPAD1_block, 12 }, { 70, HELITAKEOFF, HELIPAD1_block, 12 }, { 70, 0, 0, 71 }, + { 71, 255, TERM_GROUP2_EXIT1_block, 0 }, { 71, HELIPAD2, HELIPAD2_block, 13 }, { 71, HELITAKEOFF, HELIPAD1_block, 12 }, { 71, 0, 0, 24 }, + { 72, 0, HELIPAD1_block, 53 }, + { 73, 0, HELIPAD2_block, 54 }, + { 74, HELITAKEOFF, NOTHING_block, 0 }, + { 75, HELITAKEOFF, NOTHING_block, 0 }, + { 76, 255, RUNWAY_IN_block, 0 }, { 76, 0, RUNWAY_IN_block, 37 }, + { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE }; // heliports, oilrigs don't have depots -static const byte _airport_helipad_heliport_oilrig[] = {1, 1}; +static const byte _airport_helipad_heliport_oilrig[] = { 1, 1 }; static const AirportFTAbuildup _airport_fta_heliport_oilrig[] = { - {0,HELIPAD1,HELIPAD1_block,1}, - {1,HELITAKEOFF,NOTHING_block,0}, // takeoff - {2,255,AIRPORT_BUSY_block,0}, {2,HELILANDING,0,3}, {2,HELITAKEOFF,0,1}, - {3,HELILANDING,AIRPORT_BUSY_block,4}, - {4,HELIENDLANDING,AIRPORT_BUSY_block,4}, {4,HELIPAD1,HELIPAD1_block,0}, {4,HELITAKEOFF,0,2}, + { 0, HELIPAD1, HELIPAD1_block, 1 }, + { 1, HELITAKEOFF, NOTHING_block, 0 }, // takeoff + { 2, 255, AIRPORT_BUSY_block, 0 }, { 2, HELILANDING, 0, 3 }, { 2, HELITAKEOFF, 0, 1 }, + { 3, HELILANDING, AIRPORT_BUSY_block, 4 }, + { 4, HELIENDLANDING, AIRPORT_BUSY_block, 4 }, { 4, HELIPAD1, HELIPAD1_block, 0 }, { 4, HELITAKEOFF, 0, 2 }, // In Air - {5,0,NOTHING_block,6}, - {6,0,NOTHING_block,7}, - {7,0,NOTHING_block,8}, - {8,FLYING,NOTHING_block,5}, {8,HELILANDING,HELIPAD1_block,2}, // landing - {MAX_ELEMENTS,0,0,0} // end marker. DO NOT REMOVE + { 5, 0, NOTHING_block, 6 }, + { 6, 0, NOTHING_block, 7 }, + { 7, 0, NOTHING_block, 8 }, + { 8, FLYING, NOTHING_block, 5 }, { 8, HELILANDING, HELIPAD1_block, 2 }, // landing + { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE }; // helidepots -static const TileIndexDiffC _airport_depots_helidepot[] = {{1, 0}}; -static const byte _airport_helipad_helidepot[] = {1, 1}; +static const TileIndexDiffC _airport_depots_helidepot[] = { { 1, 0 } }; +static const byte _airport_helipad_helidepot[] = { 1, 1 }; static const AirportFTAbuildup _airport_fta_helidepot[] = { - { 0,HANGAR,NOTHING_block,1}, - { 1,255,HANGAR2_AREA_block,0}, {1,HANGAR,0,0}, {1,HELIPAD1,HELIPAD1_block,14}, {1,HELITAKEOFF,0,15}, {1,0,0,0}, - { 2,FLYING,NOTHING_block,3}, {2,HELILANDING,PRE_HELIPAD_block,7}, {2,HANGAR,0,12}, {2,HELITAKEOFF,NOTHING_block,16}, + { 0, HANGAR, NOTHING_block, 1 }, + { 1, 255, HANGAR2_AREA_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, HELIPAD1, HELIPAD1_block, 14 }, { 1, HELITAKEOFF, 0, 15 }, { 1, 0, 0, 0 }, + { 2, FLYING, NOTHING_block, 3 }, { 2, HELILANDING, PRE_HELIPAD_block, 7 }, { 2, HANGAR, 0, 12 }, { 2, HELITAKEOFF, NOTHING_block, 16 }, // In Air - { 3,0,NOTHING_block,4}, - { 4,0,NOTHING_block,5}, - { 5,0,NOTHING_block,6}, - { 6,0,NOTHING_block,2}, + { 3, 0, NOTHING_block, 4 }, + { 4, 0, NOTHING_block, 5 }, + { 5, 0, NOTHING_block, 6 }, + { 6, 0, NOTHING_block, 2 }, // Helicopter -- stay in air in special place as a buffer to choose from helipads - { 7,HELILANDING,PRE_HELIPAD_block,8}, - { 8,HELIENDLANDING,PRE_HELIPAD_block,8}, {8,HELIPAD1,0,9}, {8,HANGAR,0,12}, {8,0,0,2}, - { 9,0,NOTHING_block,10}, + { 7, HELILANDING, PRE_HELIPAD_block, 8 }, + { 8, HELIENDLANDING, PRE_HELIPAD_block, 8 }, { 8, HELIPAD1, 0, 9 }, { 8, HANGAR, 0, 12 }, { 8, 0, 0, 2 }, + { 9, 0, NOTHING_block, 10 }, // landing - {10,255,NOTHING_block,10}, {10,HELIPAD1,HELIPAD1_block,14}, {10,HANGAR,0,1}, {10,0,0,14}, + { 10, 255, NOTHING_block, 10 }, { 10, HELIPAD1, HELIPAD1_block, 14 }, { 10, HANGAR, 0, 1 }, { 10, 0, 0, 14 }, // Helicopter -- takeoff - {11,HELITAKEOFF,NOTHING_block,0}, - {12,0,HANGAR2_AREA_block,13}, // need to go to hangar when waiting in air - {13,0,HANGAR2_AREA_block,1}, - {14,HELIPAD1,HELIPAD1_block,14}, {14,HANGAR,0,1}, {14,HELITAKEOFF,0,17}, - {15,HELITAKEOFF,NOTHING_block,0}, // takeoff outside depot - {16,HELITAKEOFF,0,14}, - {17,0,NOTHING_block,11}, - {MAX_ELEMENTS,0,0,0} // end marker. DO NOT REMOVE + { 11, HELITAKEOFF, NOTHING_block, 0 }, + { 12, 0, HANGAR2_AREA_block, 13 }, // need to go to hangar when waiting in air + { 13, 0, HANGAR2_AREA_block, 1 }, + { 14, HELIPAD1, HELIPAD1_block, 14 }, { 14, HANGAR, 0, 1 }, { 14, HELITAKEOFF, 0, 17 }, + { 15, HELITAKEOFF, NOTHING_block, 0 }, // takeoff outside depot + { 16, HELITAKEOFF, 0, 14 }, + { 17, 0, NOTHING_block, 11 }, + { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE }; // helistation -static const TileIndexDiffC _airport_depots_helistation[] = {{0, 0}}; -static const byte _airport_helipad_helistation[] = {1, 3}; +static const TileIndexDiffC _airport_depots_helistation[] = { { 0, 0 } }; +static const byte _airport_helipad_helistation[] = { 1, 3 }; static const AirportFTAbuildup _airport_fta_helistation[] = { - { 0,HANGAR,NOTHING_block,8}, {0,HELIPAD1,0,1}, {0,HELIPAD2,0,1}, {0,HELIPAD3,0,1}, {0,HELITAKEOFF,0,1}, {0,0,0,0}, - { 1,255,HANGAR2_AREA_block,0}, {1,HANGAR,0,0}, {1,HELITAKEOFF,0,3}, {1,0,0,4}, + { 0, HANGAR, NOTHING_block, 8 }, { 0, HELIPAD1, 0, 1 }, { 0, HELIPAD2, 0, 1 }, { 0, HELIPAD3, 0, 1 }, { 0, HELITAKEOFF, 0, 1 }, { 0, 0, 0, 0 }, + { 1, 255, HANGAR2_AREA_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, HELITAKEOFF, 0, 3 }, { 1, 0, 0, 4 }, // landing - { 2,FLYING,NOTHING_block,28}, {2,HELILANDING,0,15}, {2,0,0,28}, + { 2, FLYING, NOTHING_block, 28 }, { 2, HELILANDING, 0, 15 }, { 2, 0, 0, 28 }, // helicopter side - {3,HELITAKEOFF,NOTHING_block,0}, // helitakeoff outside hangar2 - {4,255,TAXIWAY_BUSY_block,0}, {4,HANGAR,HANGAR2_AREA_block,1}, {4,HELITAKEOFF,0,1}, {4,0,0,5}, - {5,255,TAXIWAY_BUSY_block,0}, {5,HELIPAD1,HELIPAD1_block,6}, {5,HELIPAD2,HELIPAD2_block,7}, {5,HELIPAD3,HELIPAD3_block,8}, {5,0,0,4}, - {6,HELIPAD1,HELIPAD1_block,5}, {6,HANGAR, HANGAR2_AREA_block,5}, {6,HELITAKEOFF,0,9}, {6,0,0,6}, - {7,HELIPAD2,HELIPAD2_block,5}, {7,HANGAR, HANGAR2_AREA_block,5}, {7,HELITAKEOFF,0,10}, {7,0,0,7}, - {8,HELIPAD3,HELIPAD3_block,5}, {8,HANGAR, HANGAR2_AREA_block,5}, {8,HELITAKEOFF,0,11}, {8,0,0,8}, - {9,0,HELIPAD1_block,12}, - {10,0,HELIPAD2_block,13}, - {11,0,HELIPAD3_block,14}, - {12,HELITAKEOFF,NOTHING_block,0}, - {13,HELITAKEOFF,NOTHING_block,0}, - {14,HELITAKEOFF,NOTHING_block,0}, + { 3, HELITAKEOFF, NOTHING_block, 0 }, // helitakeoff outside hangar2 + { 4, 255, TAXIWAY_BUSY_block, 0 }, { 4, HANGAR, HANGAR2_AREA_block, 1 }, { 4, HELITAKEOFF, 0, 1 }, { 4, 0, 0, 5 }, + { 5, 255, TAXIWAY_BUSY_block, 0 }, { 5, HELIPAD1, HELIPAD1_block, 6 }, { 5, HELIPAD2, HELIPAD2_block, 7 }, { 5, HELIPAD3, HELIPAD3_block, 8 }, { 5, 0, 0, 4 }, + { 6, HELIPAD1, HELIPAD1_block, 5 }, { 6, HANGAR, HANGAR2_AREA_block, 5 }, { 6, HELITAKEOFF, 0, 9 }, { 6, 0, 0, 6 }, + { 7, HELIPAD2, HELIPAD2_block, 5 }, { 7, HANGAR, HANGAR2_AREA_block, 5 }, { 7, HELITAKEOFF, 0, 10 }, { 7, 0, 0, 7 }, + { 8, HELIPAD3, HELIPAD3_block, 5 }, { 8, HANGAR, HANGAR2_AREA_block, 5 }, { 8, HELITAKEOFF, 0, 11 }, { 8, 0, 0, 8 }, + { 9, 0, HELIPAD1_block, 12 }, + { 10, 0, HELIPAD2_block, 13 }, + { 11, 0, HELIPAD3_block, 14 }, + { 12, HELITAKEOFF, NOTHING_block, 0 }, + { 13, HELITAKEOFF, NOTHING_block, 0 }, + { 14, HELITAKEOFF, NOTHING_block, 0 }, // heli - in flight moves - {15,HELILANDING,PRE_HELIPAD_block,16}, - {16,HELIENDLANDING,PRE_HELIPAD_block,16}, {16,HELIPAD1,0,17}, {16,HELIPAD2,0,18}, {16,HELIPAD3,0,19}, {16,HANGAR,0,23}, - {17,0,NOTHING_block,20}, - {18,0,NOTHING_block,21}, - {19,0,NOTHING_block,22}, + { 15, HELILANDING, PRE_HELIPAD_block, 16 }, + { 16, HELIENDLANDING, PRE_HELIPAD_block, 16 }, { 16, HELIPAD1, 0, 17 }, { 16, HELIPAD2, 0, 18 }, { 16, HELIPAD3, 0, 19 }, { 16, HANGAR, 0, 23 }, + { 17, 0, NOTHING_block, 20 }, + { 18, 0, NOTHING_block, 21 }, + { 19, 0, NOTHING_block, 22 }, // heli landing - {20,255,NOTHING_block,0}, {20,HELIPAD1,HELIPAD1_block,6}, {20,HANGAR,0,23}, {20,0,0,6}, - {21,255,NOTHING_block,0}, {21,HELIPAD2,HELIPAD2_block,7}, {21,HANGAR,0,23}, {21,0,0,7}, - {22,255,NOTHING_block,0}, {22,HELIPAD3,HELIPAD3_block,8}, {22,HANGAR,0,23}, {22,0,0,8}, - {23,0,HANGAR2_AREA_block,24}, // need to go to helihangar when waiting in air - {24,0,HANGAR2_AREA_block,1}, - {25,0,NOTHING_block,26}, - {26,0,NOTHING_block,27}, - {27,0,NOTHING_block,2}, - {28,0,NOTHING_block,29}, - {29,0,NOTHING_block,30}, - {30,0,NOTHING_block,31}, - {31,0,NOTHING_block,32}, - {32,0,NOTHING_block,25}, - {MAX_ELEMENTS,0,0,0} // end marker. DO NOT REMOVE + { 20, 255, NOTHING_block, 0 }, { 20, HELIPAD1, HELIPAD1_block, 6 }, { 20, HANGAR, 0, 23 }, { 20, 0, 0, 6 }, + { 21, 255, NOTHING_block, 0 }, { 21, HELIPAD2, HELIPAD2_block, 7 }, { 21, HANGAR, 0, 23 }, { 21, 0, 0, 7 }, + { 22, 255, NOTHING_block, 0 }, { 22, HELIPAD3, HELIPAD3_block, 8 }, { 22, HANGAR, 0, 23 }, { 22, 0, 0, 8 }, + { 23, 0, HANGAR2_AREA_block, 24 }, // need to go to helihangar when waiting in air + { 24, 0, HANGAR2_AREA_block, 1 }, + { 25, 0, NOTHING_block, 26 }, + { 26, 0, NOTHING_block, 27 }, + { 27, 0, NOTHING_block, 2 }, + { 28, 0, NOTHING_block, 29 }, + { 29, 0, NOTHING_block, 30 }, + { 30, 0, NOTHING_block, 31 }, + { 31, 0, NOTHING_block, 32 }, + { 32, 0, NOTHING_block, 25 }, + { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE }; diff --git a/bridge_gui.c b/bridge_gui.c index fab13c39d..d7e9fbda0 100644 --- a/bridge_gui.c +++ b/bridge_gui.c @@ -79,10 +79,10 @@ static void BuildBridgeWndProc(Window *w, WindowEvent *e) } static const Widget _build_bridge_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 199, 0, 13, STR_100D_SELECT_RAIL_BRIDGE, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_MATRIX, RESIZE_NONE, 7, 0, 187, 14, 101, 0x401, STR_101F_BRIDGE_SELECTION_CLICK}, -{ WWT_SCROLLBAR, RESIZE_NONE, 7, 188, 199, 14, 101, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 199, 0, 13, STR_100D_SELECT_RAIL_BRIDGE, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_MATRIX, RESIZE_NONE, 7, 0, 187, 14, 101, 0x401, STR_101F_BRIDGE_SELECTION_CLICK}, +{ WWT_SCROLLBAR, RESIZE_NONE, 7, 188, 199, 14, 101, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WIDGETS_END}, }; @@ -96,10 +96,10 @@ static const WindowDesc _build_bridge_desc = { static const Widget _build_road_bridge_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 199, 0, 13, STR_1803_SELECT_ROAD_BRIDGE, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_MATRIX, RESIZE_NONE, 7, 0, 187, 14, 101, 0x401, STR_101F_BRIDGE_SELECTION_CLICK}, -{ WWT_SCROLLBAR, RESIZE_NONE, 7, 188, 199, 14, 101, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 199, 0, 13, STR_1803_SELECT_ROAD_BRIDGE, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_MATRIX, RESIZE_NONE, 7, 0, 187, 14, 101, 0x401, STR_101F_BRIDGE_SELECTION_CLICK}, +{ WWT_SCROLLBAR, RESIZE_NONE, 7, 188, 199, 14, 101, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WIDGETS_END}, }; diff --git a/clear_cmd.c b/clear_cmd.c index 1698affbb..5626f2998 100644 --- a/clear_cmd.c +++ b/clear_cmd.c @@ -778,17 +778,17 @@ void InitializeClearLand(void) } const TileTypeProcs _tile_type_clear_procs = { - DrawTile_Clear, /* draw_tile_proc */ - GetSlopeZ_Clear, /* get_slope_z_proc */ - ClearTile_Clear, /* clear_tile_proc */ - GetAcceptedCargo_Clear, /* get_accepted_cargo_proc */ - GetTileDesc_Clear, /* get_tile_desc_proc */ - GetTileTrackStatus_Clear, /* get_tile_track_status_proc */ - ClickTile_Clear, /* click_tile_proc */ - AnimateTile_Clear, /* animate_tile_proc */ - TileLoop_Clear, /* tile_loop_clear */ - ChangeTileOwner_Clear, /* change_tile_owner_clear */ - NULL, /* get_produced_cargo_proc */ - NULL, /* vehicle_enter_tile_proc */ - GetSlopeTileh_Clear, /* get_slope_tileh_proc */ + DrawTile_Clear, /* draw_tile_proc */ + GetSlopeZ_Clear, /* get_slope_z_proc */ + ClearTile_Clear, /* clear_tile_proc */ + GetAcceptedCargo_Clear, /* get_accepted_cargo_proc */ + GetTileDesc_Clear, /* get_tile_desc_proc */ + GetTileTrackStatus_Clear, /* get_tile_track_status_proc */ + ClickTile_Clear, /* click_tile_proc */ + AnimateTile_Clear, /* animate_tile_proc */ + TileLoop_Clear, /* tile_loop_clear */ + ChangeTileOwner_Clear, /* change_tile_owner_clear */ + NULL, /* get_produced_cargo_proc */ + NULL, /* vehicle_enter_tile_proc */ + GetSlopeTileh_Clear, /* get_slope_tileh_proc */ }; @@ -4,150 +4,150 @@ #define COMMAND_H enum { - CMD_BUILD_RAILROAD_TRACK = 0, - CMD_REMOVE_RAILROAD_TRACK = 1, - CMD_BUILD_SINGLE_RAIL = 2, - CMD_REMOVE_SINGLE_RAIL = 3, - CMD_LANDSCAPE_CLEAR = 4, - CMD_BUILD_BRIDGE = 5, - CMD_BUILD_RAILROAD_STATION = 6, - CMD_BUILD_TRAIN_DEPOT = 7, - CMD_BUILD_SIGNALS = 8, - CMD_REMOVE_SIGNALS = 9, - CMD_TERRAFORM_LAND = 10, - CMD_PURCHASE_LAND_AREA = 11, - CMD_SELL_LAND_AREA = 12, - CMD_BUILD_TUNNEL = 13, + CMD_BUILD_RAILROAD_TRACK = 0, + CMD_REMOVE_RAILROAD_TRACK = 1, + CMD_BUILD_SINGLE_RAIL = 2, + CMD_REMOVE_SINGLE_RAIL = 3, + CMD_LANDSCAPE_CLEAR = 4, + CMD_BUILD_BRIDGE = 5, + CMD_BUILD_RAILROAD_STATION = 6, + CMD_BUILD_TRAIN_DEPOT = 7, + CMD_BUILD_SIGNALS = 8, + CMD_REMOVE_SIGNALS = 9, + CMD_TERRAFORM_LAND = 10, + CMD_PURCHASE_LAND_AREA = 11, + CMD_SELL_LAND_AREA = 12, + CMD_BUILD_TUNNEL = 13, - CMD_REMOVE_FROM_RAILROAD_STATION = 14, - CMD_CONVERT_RAIL = 15, + CMD_REMOVE_FROM_RAILROAD_STATION = 14, + CMD_CONVERT_RAIL = 15, - CMD_BUILD_TRAIN_WAYPOINT = 16, - CMD_RENAME_WAYPOINT = 17, - CMD_REMOVE_TRAIN_WAYPOINT = 18, + CMD_BUILD_TRAIN_WAYPOINT = 16, + CMD_RENAME_WAYPOINT = 17, + CMD_REMOVE_TRAIN_WAYPOINT = 18, - CMD_BUILD_ROAD_STOP = 21, - CMD_BUILD_LONG_ROAD = 23, - CMD_REMOVE_LONG_ROAD = 24, - CMD_BUILD_ROAD = 25, - CMD_REMOVE_ROAD = 26, - CMD_BUILD_ROAD_DEPOT = 27, + CMD_BUILD_ROAD_STOP = 21, + CMD_BUILD_LONG_ROAD = 23, + CMD_REMOVE_LONG_ROAD = 24, + CMD_BUILD_ROAD = 25, + CMD_REMOVE_ROAD = 26, + CMD_BUILD_ROAD_DEPOT = 27, - CMD_BUILD_AIRPORT = 29, + CMD_BUILD_AIRPORT = 29, - CMD_BUILD_DOCK = 30, + CMD_BUILD_DOCK = 30, - CMD_BUILD_SHIP_DEPOT = 31, - CMD_BUILD_BUOY = 32, + CMD_BUILD_SHIP_DEPOT = 31, + CMD_BUILD_BUOY = 32, - CMD_PLANT_TREE = 33, + CMD_PLANT_TREE = 33, - CMD_BUILD_RAIL_VEHICLE = 34, - CMD_MOVE_RAIL_VEHICLE = 35, + CMD_BUILD_RAIL_VEHICLE = 34, + CMD_MOVE_RAIL_VEHICLE = 35, - CMD_START_STOP_TRAIN = 36, + CMD_START_STOP_TRAIN = 36, - CMD_SELL_RAIL_WAGON = 38, + CMD_SELL_RAIL_WAGON = 38, - CMD_TRAIN_GOTO_DEPOT = 39, - CMD_FORCE_TRAIN_PROCEED = 40, - CMD_REVERSE_TRAIN_DIRECTION = 41, + CMD_TRAIN_GOTO_DEPOT = 39, + CMD_FORCE_TRAIN_PROCEED = 40, + CMD_REVERSE_TRAIN_DIRECTION = 41, - CMD_MODIFY_ORDER = 42, - CMD_SKIP_ORDER = 43, - CMD_DELETE_ORDER = 44, - CMD_INSERT_ORDER = 45, + CMD_MODIFY_ORDER = 42, + CMD_SKIP_ORDER = 43, + CMD_DELETE_ORDER = 44, + CMD_INSERT_ORDER = 45, - CMD_CHANGE_SERVICE_INT = 46, + CMD_CHANGE_SERVICE_INT = 46, - CMD_BUILD_INDUSTRY = 47, + CMD_BUILD_INDUSTRY = 47, - CMD_BUILD_COMPANY_HQ = 48, - CMD_SET_PLAYER_FACE = 49, - CMD_SET_PLAYER_COLOR = 50, + CMD_BUILD_COMPANY_HQ = 48, + CMD_SET_PLAYER_FACE = 49, + CMD_SET_PLAYER_COLOR = 50, - CMD_INCREASE_LOAN = 51, - CMD_DECREASE_LOAN = 52, + CMD_INCREASE_LOAN = 51, + CMD_DECREASE_LOAN = 52, - CMD_WANT_ENGINE_PREVIEW = 53, + CMD_WANT_ENGINE_PREVIEW = 53, - CMD_NAME_VEHICLE = 54, - CMD_RENAME_ENGINE = 55, - CMD_CHANGE_COMPANY_NAME = 56, - CMD_CHANGE_PRESIDENT_NAME = 57, - CMD_RENAME_STATION = 58, + CMD_NAME_VEHICLE = 54, + CMD_RENAME_ENGINE = 55, + CMD_CHANGE_COMPANY_NAME = 56, + CMD_CHANGE_PRESIDENT_NAME = 57, + CMD_RENAME_STATION = 58, - CMD_SELL_AIRCRAFT = 59, - CMD_START_STOP_AIRCRAFT = 60, - CMD_BUILD_AIRCRAFT = 61, - CMD_SEND_AIRCRAFT_TO_HANGAR = 62, - CMD_REFIT_AIRCRAFT = 64, + CMD_SELL_AIRCRAFT = 59, + CMD_START_STOP_AIRCRAFT = 60, + CMD_BUILD_AIRCRAFT = 61, + CMD_SEND_AIRCRAFT_TO_HANGAR = 62, + CMD_REFIT_AIRCRAFT = 64, - CMD_PLACE_SIGN = 65, - CMD_RENAME_SIGN = 66, + CMD_PLACE_SIGN = 65, + CMD_RENAME_SIGN = 66, - CMD_BUILD_ROAD_VEH = 67, - CMD_START_STOP_ROADVEH = 68, - CMD_SELL_ROAD_VEH = 69, - CMD_SEND_ROADVEH_TO_DEPOT = 70, - CMD_TURN_ROADVEH = 71, - CMD_REFIT_ROAD_VEH = 72, + CMD_BUILD_ROAD_VEH = 67, + CMD_START_STOP_ROADVEH = 68, + CMD_SELL_ROAD_VEH = 69, + CMD_SEND_ROADVEH_TO_DEPOT = 70, + CMD_TURN_ROADVEH = 71, + CMD_REFIT_ROAD_VEH = 72, - CMD_PAUSE = 73, + CMD_PAUSE = 73, - CMD_BUY_SHARE_IN_COMPANY = 74, - CMD_SELL_SHARE_IN_COMPANY = 75, - CMD_BUY_COMPANY = 76, + CMD_BUY_SHARE_IN_COMPANY = 74, + CMD_SELL_SHARE_IN_COMPANY = 75, + CMD_BUY_COMPANY = 76, - CMD_BUILD_TOWN = 77, + CMD_BUILD_TOWN = 77, - CMD_RENAME_TOWN = 80, - CMD_DO_TOWN_ACTION = 81, + CMD_RENAME_TOWN = 80, + CMD_DO_TOWN_ACTION = 81, - CMD_SET_ROAD_DRIVE_SIDE = 82, + CMD_SET_ROAD_DRIVE_SIDE = 82, - CMD_CHANGE_DIFFICULTY_LEVEL = 85, + CMD_CHANGE_DIFFICULTY_LEVEL = 85, - CMD_START_STOP_SHIP = 86, - CMD_SELL_SHIP = 87, - CMD_BUILD_SHIP = 88, - CMD_SEND_SHIP_TO_DEPOT = 89, - CMD_REFIT_SHIP = 91, + CMD_START_STOP_SHIP = 86, + CMD_SELL_SHIP = 87, + CMD_BUILD_SHIP = 88, + CMD_SEND_SHIP_TO_DEPOT = 89, + CMD_REFIT_SHIP = 91, - CMD_CLONE_ORDER = 99, - CMD_CLEAR_AREA = 100, + CMD_CLONE_ORDER = 99, + CMD_CLEAR_AREA = 100, - CMD_MONEY_CHEAT = 102, - CMD_BUILD_CANAL = 103, + CMD_MONEY_CHEAT = 102, + CMD_BUILD_CANAL = 103, - CMD_PLAYER_CTRL = 104, // used in multiplayer to create a new player etc. - CMD_LEVEL_LAND = 105, // level land + CMD_PLAYER_CTRL = 104, // used in multiplayer to create a new player etc. + CMD_LEVEL_LAND = 105, // level land - CMD_REFIT_RAIL_VEHICLE = 106, - CMD_RESTORE_ORDER_INDEX = 107, - CMD_BUILD_LOCK = 108, + CMD_REFIT_RAIL_VEHICLE = 106, + CMD_RESTORE_ORDER_INDEX = 107, + CMD_BUILD_LOCK = 108, - CMD_BUILD_SIGNAL_TRACK = 110, - CMD_REMOVE_SIGNAL_TRACK = 111, + CMD_BUILD_SIGNAL_TRACK = 110, + CMD_REMOVE_SIGNAL_TRACK = 111, - CMD_GIVE_MONEY = 113, - CMD_CHANGE_PATCH_SETTING = 114, + CMD_GIVE_MONEY = 113, + CMD_CHANGE_PATCH_SETTING = 114, - CMD_REPLACE_VEHICLE = 115, + CMD_REPLACE_VEHICLE = 115, - CMD_CLONE_VEHICLE = 116, + CMD_CLONE_VEHICLE = 116, }; enum { - DC_EXEC = 1, - DC_AUTO = 2, // don't allow building on structures - DC_QUERY_COST = 4, // query cost only, don't build. - DC_NO_WATER = 8, // don't allow building on water - DC_NO_RAIL_OVERLAP = 0x10, // don't allow overlap of rails (used in buildrail) - DC_AI_BUILDING = 0x20, // special building rules for AI - DC_NO_TOWN_RATING = 0x40, // town rating does not disallow you from building - DC_FORCETEST = 0x80, // force test too. + DC_EXEC = 0x01, + DC_AUTO = 0x02, // don't allow building on structures + DC_QUERY_COST = 0x04, // query cost only, don't build. + DC_NO_WATER = 0x08, // don't allow building on water + DC_NO_RAIL_OVERLAP = 0x10, // don't allow overlap of rails (used in buildrail) + DC_AI_BUILDING = 0x20, // special building rules for AI + DC_NO_TOWN_RATING = 0x40, // town rating does not disallow you from building + DC_FORCETEST = 0x80, // force test too. CMD_ERROR = ((int32)0x80000000), }; @@ -155,11 +155,11 @@ enum { #define CMD_MSG(x) ((x)<<16) enum { - CMD_AUTO = 0x200, - CMD_NO_WATER = 0x400, - CMD_NETWORK_COMMAND = 0x800, // execute the command without sending it on the network + CMD_AUTO = 0x0200, + CMD_NO_WATER = 0x0400, + CMD_NETWORK_COMMAND = 0x0800, // execute the command without sending it on the network CMD_NO_TEST_IF_IN_NETWORK = 0x1000, // When enabled, the command will bypass the no-DC_EXEC round if in network - CMD_SHOW_NO_ERROR = 0x2000, + CMD_SHOW_NO_ERROR = 0x2000, }; /** Command flags for the command table @@ -34,18 +34,18 @@ void SetDate(Date date) #define M(a, b) ((a << 5) | b) static const uint16 _month_date_from_year_day[] = { -M(0,1),M(0,2),M(0,3),M(0,4),M(0,5),M(0,6),M(0,7),M(0,8),M(0,9),M(0,10),M(0,11),M(0,12),M(0,13),M(0,14),M(0,15),M(0,16),M(0,17),M(0,18),M(0,19),M(0,20),M(0,21),M(0,22),M(0,23),M(0,24),M(0,25),M(0,26),M(0,27),M(0,28),M(0,29),M(0,30),M(0,31), -M(1,1),M(1,2),M(1,3),M(1,4),M(1,5),M(1,6),M(1,7),M(1,8),M(1,9),M(1,10),M(1,11),M(1,12),M(1,13),M(1,14),M(1,15),M(1,16),M(1,17),M(1,18),M(1,19),M(1,20),M(1,21),M(1,22),M(1,23),M(1,24),M(1,25),M(1,26),M(1,27),M(1,28),M(1,29), -M(2,1),M(2,2),M(2,3),M(2,4),M(2,5),M(2,6),M(2,7),M(2,8),M(2,9),M(2,10),M(2,11),M(2,12),M(2,13),M(2,14),M(2,15),M(2,16),M(2,17),M(2,18),M(2,19),M(2,20),M(2,21),M(2,22),M(2,23),M(2,24),M(2,25),M(2,26),M(2,27),M(2,28),M(2,29),M(2,30),M(2,31), -M(3,1),M(3,2),M(3,3),M(3,4),M(3,5),M(3,6),M(3,7),M(3,8),M(3,9),M(3,10),M(3,11),M(3,12),M(3,13),M(3,14),M(3,15),M(3,16),M(3,17),M(3,18),M(3,19),M(3,20),M(3,21),M(3,22),M(3,23),M(3,24),M(3,25),M(3,26),M(3,27),M(3,28),M(3,29),M(3,30), -M(4,1),M(4,2),M(4,3),M(4,4),M(4,5),M(4,6),M(4,7),M(4,8),M(4,9),M(4,10),M(4,11),M(4,12),M(4,13),M(4,14),M(4,15),M(4,16),M(4,17),M(4,18),M(4,19),M(4,20),M(4,21),M(4,22),M(4,23),M(4,24),M(4,25),M(4,26),M(4,27),M(4,28),M(4,29),M(4,30),M(4,31), -M(5,1),M(5,2),M(5,3),M(5,4),M(5,5),M(5,6),M(5,7),M(5,8),M(5,9),M(5,10),M(5,11),M(5,12),M(5,13),M(5,14),M(5,15),M(5,16),M(5,17),M(5,18),M(5,19),M(5,20),M(5,21),M(5,22),M(5,23),M(5,24),M(5,25),M(5,26),M(5,27),M(5,28),M(5,29),M(5,30), -M(6,1),M(6,2),M(6,3),M(6,4),M(6,5),M(6,6),M(6,7),M(6,8),M(6,9),M(6,10),M(6,11),M(6,12),M(6,13),M(6,14),M(6,15),M(6,16),M(6,17),M(6,18),M(6,19),M(6,20),M(6,21),M(6,22),M(6,23),M(6,24),M(6,25),M(6,26),M(6,27),M(6,28),M(6,29),M(6,30),M(6,31), -M(7,1),M(7,2),M(7,3),M(7,4),M(7,5),M(7,6),M(7,7),M(7,8),M(7,9),M(7,10),M(7,11),M(7,12),M(7,13),M(7,14),M(7,15),M(7,16),M(7,17),M(7,18),M(7,19),M(7,20),M(7,21),M(7,22),M(7,23),M(7,24),M(7,25),M(7,26),M(7,27),M(7,28),M(7,29),M(7,30),M(7,31), -M(8,1),M(8,2),M(8,3),M(8,4),M(8,5),M(8,6),M(8,7),M(8,8),M(8,9),M(8,10),M(8,11),M(8,12),M(8,13),M(8,14),M(8,15),M(8,16),M(8,17),M(8,18),M(8,19),M(8,20),M(8,21),M(8,22),M(8,23),M(8,24),M(8,25),M(8,26),M(8,27),M(8,28),M(8,29),M(8,30), -M(9,1),M(9,2),M(9,3),M(9,4),M(9,5),M(9,6),M(9,7),M(9,8),M(9,9),M(9,10),M(9,11),M(9,12),M(9,13),M(9,14),M(9,15),M(9,16),M(9,17),M(9,18),M(9,19),M(9,20),M(9,21),M(9,22),M(9,23),M(9,24),M(9,25),M(9,26),M(9,27),M(9,28),M(9,29),M(9,30),M(9,31), -M(10,1),M(10,2),M(10,3),M(10,4),M(10,5),M(10,6),M(10,7),M(10,8),M(10,9),M(10,10),M(10,11),M(10,12),M(10,13),M(10,14),M(10,15),M(10,16),M(10,17),M(10,18),M(10,19),M(10,20),M(10,21),M(10,22),M(10,23),M(10,24),M(10,25),M(10,26),M(10,27),M(10,28),M(10,29),M(10,30), -M(11,1),M(11,2),M(11,3),M(11,4),M(11,5),M(11,6),M(11,7),M(11,8),M(11,9),M(11,10),M(11,11),M(11,12),M(11,13),M(11,14),M(11,15),M(11,16),M(11,17),M(11,18),M(11,19),M(11,20),M(11,21),M(11,22),M(11,23),M(11,24),M(11,25),M(11,26),M(11,27),M(11,28),M(11,29),M(11,30),M(11,31), + M( 0, 1), M( 0, 2), M( 0, 3), M( 0, 4), M( 0, 5), M( 0, 6), M( 0, 7), M( 0, 8), M( 0, 9), M( 0, 10), M( 0, 11), M( 0, 12), M( 0, 13), M( 0, 14), M( 0, 15), M( 0, 16), M( 0, 17), M( 0, 18), M( 0, 19), M( 0, 20), M( 0, 21), M( 0, 22), M( 0, 23), M( 0, 24), M( 0, 25), M( 0, 26), M( 0, 27), M( 0, 28), M( 0, 29), M( 0, 30), M( 0, 31), + M( 1, 1), M( 1, 2), M( 1, 3), M( 1, 4), M( 1, 5), M( 1, 6), M( 1, 7), M( 1, 8), M( 1, 9), M( 1, 10), M( 1, 11), M( 1, 12), M( 1, 13), M( 1, 14), M( 1, 15), M( 1, 16), M( 1, 17), M( 1, 18), M( 1, 19), M( 1, 20), M( 1, 21), M( 1, 22), M( 1, 23), M( 1, 24), M( 1, 25), M( 1, 26), M( 1, 27), M( 1, 28), M( 1, 29), + M( 2, 1), M( 2, 2), M( 2, 3), M( 2, 4), M( 2, 5), M( 2, 6), M( 2, 7), M( 2, 8), M( 2, 9), M( 2, 10), M( 2, 11), M( 2, 12), M( 2, 13), M( 2, 14), M( 2, 15), M( 2, 16), M( 2, 17), M( 2, 18), M( 2, 19), M( 2, 20), M( 2, 21), M( 2, 22), M( 2, 23), M( 2, 24), M( 2, 25), M( 2, 26), M( 2, 27), M( 2, 28), M( 2, 29), M( 2, 30), M( 2, 31), + M( 3, 1), M( 3, 2), M( 3, 3), M( 3, 4), M( 3, 5), M( 3, 6), M( 3, 7), M( 3, 8), M( 3, 9), M( 3, 10), M( 3, 11), M( 3, 12), M( 3, 13), M( 3, 14), M( 3, 15), M( 3, 16), M( 3, 17), M( 3, 18), M( 3, 19), M( 3, 20), M( 3, 21), M( 3, 22), M( 3, 23), M( 3, 24), M( 3, 25), M( 3, 26), M( 3, 27), M( 3, 28), M( 3, 29), M( 3, 30), + M( 4, 1), M( 4, 2), M( 4, 3), M( 4, 4), M( 4, 5), M( 4, 6), M( 4, 7), M( 4, 8), M( 4, 9), M( 4, 10), M( 4, 11), M( 4, 12), M( 4, 13), M( 4, 14), M( 4, 15), M( 4, 16), M( 4, 17), M( 4, 18), M( 4, 19), M( 4, 20), M( 4, 21), M( 4, 22), M( 4, 23), M( 4, 24), M( 4, 25), M( 4, 26), M( 4, 27), M( 4, 28), M( 4, 29), M( 4, 30), M( 4, 31), + M( 5, 1), M( 5, 2), M( 5, 3), M( 5, 4), M( 5, 5), M( 5, 6), M( 5, 7), M( 5, 8), M( 5, 9), M( 5, 10), M( 5, 11), M( 5, 12), M( 5, 13), M( 5, 14), M( 5, 15), M( 5, 16), M( 5, 17), M( 5, 18), M( 5, 19), M( 5, 20), M( 5, 21), M( 5, 22), M( 5, 23), M( 5, 24), M( 5, 25), M( 5, 26), M( 5, 27), M( 5, 28), M( 5, 29), M( 5, 30), + M( 6, 1), M( 6, 2), M( 6, 3), M( 6, 4), M( 6, 5), M( 6, 6), M( 6, 7), M( 6, 8), M( 6, 9), M( 6, 10), M( 6, 11), M( 6, 12), M( 6, 13), M( 6, 14), M( 6, 15), M( 6, 16), M( 6, 17), M( 6, 18), M( 6, 19), M( 6, 20), M( 6, 21), M( 6, 22), M( 6, 23), M( 6, 24), M( 6, 25), M( 6, 26), M( 6, 27), M( 6, 28), M( 6, 29), M( 6, 30), M( 6, 31), + M( 7, 1), M( 7, 2), M( 7, 3), M( 7, 4), M( 7, 5), M( 7, 6), M( 7, 7), M( 7, 8), M( 7, 9), M( 7, 10), M( 7, 11), M( 7, 12), M( 7, 13), M( 7, 14), M( 7, 15), M( 7, 16), M( 7, 17), M( 7, 18), M( 7, 19), M( 7, 20), M( 7, 21), M( 7, 22), M( 7, 23), M( 7, 24), M( 7, 25), M( 7, 26), M( 7, 27), M( 7, 28), M( 7, 29), M( 7, 30), M( 7, 31), + M( 8, 1), M( 8, 2), M( 8, 3), M( 8, 4), M( 8, 5), M( 8, 6), M( 8, 7), M( 8, 8), M( 8, 9), M( 8, 10), M( 8, 11), M( 8, 12), M( 8, 13), M( 8, 14), M( 8, 15), M( 8, 16), M( 8, 17), M( 8, 18), M( 8, 19), M( 8, 20), M( 8, 21), M( 8, 22), M( 8, 23), M( 8, 24), M( 8, 25), M( 8, 26), M( 8, 27), M( 8, 28), M( 8, 29), M( 8, 30), + M( 9, 1), M( 9, 2), M( 9, 3), M( 9, 4), M( 9, 5), M( 9, 6), M( 9, 7), M( 9, 8), M( 9, 9), M( 9, 10), M( 9, 11), M( 9, 12), M( 9, 13), M( 9, 14), M( 9, 15), M( 9, 16), M( 9, 17), M( 9, 18), M( 9, 19), M( 9, 20), M( 9, 21), M( 9, 22), M( 9, 23), M( 9, 24), M( 9, 25), M( 9, 26), M( 9, 27), M( 9, 28), M( 9, 29), M( 9, 30), M( 9, 31), + M(10, 1), M(10, 2), M(10, 3), M(10, 4), M(10, 5), M(10, 6), M(10, 7), M(10, 8), M(10, 9), M(10, 10), M(10, 11), M(10, 12), M(10, 13), M(10, 14), M(10, 15), M(10, 16), M(10, 17), M(10, 18), M(10, 19), M(10, 20), M(10, 21), M(10, 22), M(10, 23), M(10, 24), M(10, 25), M(10, 26), M(10, 27), M(10, 28), M(10, 29), M(10, 30), + M(11, 1), M(11, 2), M(11, 3), M(11, 4), M(11, 5), M(11, 6), M(11, 7), M(11, 8), M(11, 9), M(11, 10), M(11, 11), M(11, 12), M(11, 13), M(11, 14), M(11, 15), M(11, 16), M(11, 17), M(11, 18), M(11, 19), M(11, 20), M(11, 21), M(11, 22), M(11, 23), M(11, 24), M(11, 25), M(11, 26), M(11, 27), M(11, 28), M(11, 29), M(11, 30), M(11, 31), }; #undef M @@ -105,9 +105,9 @@ void InitializeDepot(void) static const SaveLoad _depot_desc[] = { - SLE_CONDVAR(Depot, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Depot, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_VAR(Depot,town_index, SLE_UINT16), + SLE_CONDVAR(Depot, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Depot, xy, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_VAR(Depot, town_index, SLE_UINT16), SLE_END() }; diff --git a/disaster_cmd.c b/disaster_cmd.c index 3d4c58275..b580403d1 100644 --- a/disaster_cmd.c +++ b/disaster_cmd.c @@ -54,24 +54,24 @@ static void DisasterClearSquare(TileIndex tile) } } -static const SpriteID _disaster_images_1[] = {0xF41,0xF41,0xF41,0xF41,0xF41,0xF41,0xF41,0xF41}; -static const SpriteID _disaster_images_2[] = {0xF44,0xF44,0xF44,0xF44,0xF44,0xF44,0xF44,0xF44}; -static const SpriteID _disaster_images_3[] = {0xF4E,0xF4E,0xF4E,0xF4E,0xF4E,0xF4E,0xF4E,0xF4E}; -static const SpriteID _disaster_images_4[] = {0xF46,0xF46,0xF47,0xF47,0xF48,0xF48,0xF49,0xF49}; -static const SpriteID _disaster_images_5[] = {0xF4A,0xF4A,0xF4B,0xF4B,0xF4C,0xF4C,0xF4D,0xF4D}; -static const SpriteID _disaster_images_6[] = {0xF50,0xF50,0xF50,0xF50,0xF50,0xF50,0xF50,0xF50}; -static const SpriteID _disaster_images_7[] = {0xF51,0xF51,0xF51,0xF51,0xF51,0xF51,0xF51,0xF51}; -static const SpriteID _disaster_images_8[] = {0xF52,0xF52,0xF52,0xF52,0xF52,0xF52,0xF52,0xF52}; -static const SpriteID _disaster_images_9[] = {0xF3E,0xF3E,0xF3E,0xF3E,0xF3E,0xF3E,0xF3E,0xF3E}; +static const SpriteID _disaster_images_1[] = {0xF41, 0xF41, 0xF41, 0xF41, 0xF41, 0xF41, 0xF41, 0xF41}; +static const SpriteID _disaster_images_2[] = {0xF44, 0xF44, 0xF44, 0xF44, 0xF44, 0xF44, 0xF44, 0xF44}; +static const SpriteID _disaster_images_3[] = {0xF4E, 0xF4E, 0xF4E, 0xF4E, 0xF4E, 0xF4E, 0xF4E, 0xF4E}; +static const SpriteID _disaster_images_4[] = {0xF46, 0xF46, 0xF47, 0xF47, 0xF48, 0xF48, 0xF49, 0xF49}; +static const SpriteID _disaster_images_5[] = {0xF4A, 0xF4A, 0xF4B, 0xF4B, 0xF4C, 0xF4C, 0xF4D, 0xF4D}; +static const SpriteID _disaster_images_6[] = {0xF50, 0xF50, 0xF50, 0xF50, 0xF50, 0xF50, 0xF50, 0xF50}; +static const SpriteID _disaster_images_7[] = {0xF51, 0xF51, 0xF51, 0xF51, 0xF51, 0xF51, 0xF51, 0xF51}; +static const SpriteID _disaster_images_8[] = {0xF52, 0xF52, 0xF52, 0xF52, 0xF52, 0xF52, 0xF52, 0xF52}; +static const SpriteID _disaster_images_9[] = {0xF3E, 0xF3E, 0xF3E, 0xF3E, 0xF3E, 0xF3E, 0xF3E, 0xF3E}; static const SpriteID * const _disaster_images[] = { - _disaster_images_1,_disaster_images_1, - _disaster_images_2,_disaster_images_2, - _disaster_images_3,_disaster_images_3, - _disaster_images_8,_disaster_images_8,_disaster_images_9, - _disaster_images_6,_disaster_images_6, - _disaster_images_7,_disaster_images_7, - _disaster_images_4,_disaster_images_5, + _disaster_images_1, _disaster_images_1, + _disaster_images_2, _disaster_images_2, + _disaster_images_3, _disaster_images_3, + _disaster_images_8, _disaster_images_8, _disaster_images_9, + _disaster_images_6, _disaster_images_6, + _disaster_images_7, _disaster_images_7, + _disaster_images_4, _disaster_images_5, }; static void DisasterVehicleUpdateImage(Vehicle *v) diff --git a/dock_gui.c b/dock_gui.c index 4b7d3896d..8e3b3b84b 100644 --- a/dock_gui.c +++ b/dock_gui.c @@ -189,19 +189,19 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e) } static const Widget _build_docks_toolb_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 145, 0, 13, STR_9801_DOCK_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 7, 146, 157, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 21, 14, 35, SPR_IMG_BUILD_CANAL, STR_BUILD_CANALS_TIP}, -{ WWT_PANEL, RESIZE_NONE, 7, 22, 43, 14, 35, SPR_IMG_BUILD_LOCK, STR_BUILD_LOCKS_TIP}, - -{ WWT_PANEL, RESIZE_NONE, 7, 44, 47, 14, 35, 0x0, STR_NULL}, - -{ WWT_PANEL, RESIZE_NONE, 7, 48, 69, 14, 35, 703, STR_018D_DEMOLISH_BUILDINGS_ETC}, -{ WWT_PANEL, RESIZE_NONE, 7, 70, 91, 14, 35, 748, STR_981E_BUILD_SHIP_DEPOT_FOR_BUILDING}, -{ WWT_PANEL, RESIZE_NONE, 7, 92, 113, 14, 35, 746, STR_981D_BUILD_SHIP_DOCK}, -{ WWT_PANEL, RESIZE_NONE, 7, 114, 135, 14, 35, 693, STR_9834_POSITION_BUOY_WHICH_CAN}, -{ WWT_PANEL, RESIZE_NONE, 7, 136, 157, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 145, 0, 13, STR_9801_DOCK_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_NONE, 7, 146, 157, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 21, 14, 35, SPR_IMG_BUILD_CANAL, STR_BUILD_CANALS_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 22, 43, 14, 35, SPR_IMG_BUILD_LOCK, STR_BUILD_LOCKS_TIP}, + +{ WWT_PANEL, RESIZE_NONE, 7, 44, 47, 14, 35, 0x0, STR_NULL}, + +{ WWT_PANEL, RESIZE_NONE, 7, 48, 69, 14, 35, 703, STR_018D_DEMOLISH_BUILDINGS_ETC}, +{ WWT_PANEL, RESIZE_NONE, 7, 70, 91, 14, 35, 748, STR_981E_BUILD_SHIP_DEPOT_FOR_BUILDING}, +{ WWT_PANEL, RESIZE_NONE, 7, 92, 113, 14, 35, 746, STR_981D_BUILD_SHIP_DOCK}, +{ WWT_PANEL, RESIZE_NONE, 7, 114, 135, 14, 35, 693, STR_9834_POSITION_BUOY_WHICH_CAN}, +{ WWT_PANEL, RESIZE_NONE, 7, 136, 157, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, { WIDGETS_END}, }; @@ -271,11 +271,11 @@ static void BuildDockStationWndProc(Window *w, WindowEvent *e) } static const Widget _build_dock_station_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3068_DOCK, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 74, 0x0, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 30, 40, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 30, 40, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3068_DOCK, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 74, 0x0, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 30, 40, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 30, 40, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, { WIDGETS_END}, }; @@ -337,11 +337,11 @@ static void BuildDocksDepotWndProc(Window *w, WindowEvent *e) } static const Widget _build_docks_depot_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 203, 0, 13, STR_3800_SHIP_DEPOT_ORIENTATION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 203, 14, 85, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 100, 17, 82, 0x0, STR_3803_SELECT_SHIP_DEPOT_ORIENTATION}, -{ WWT_PANEL, RESIZE_NONE, 14, 103, 200, 17, 82, 0x0, STR_3803_SELECT_SHIP_DEPOT_ORIENTATION}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 203, 0, 13, STR_3800_SHIP_DEPOT_ORIENTATION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 203, 14, 85, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 100, 17, 82, 0x0, STR_3803_SELECT_SHIP_DEPOT_ORIENTATION}, +{ WWT_PANEL, RESIZE_NONE, 14, 103, 200, 17, 82, 0x0, STR_3803_SELECT_SHIP_DEPOT_ORIENTATION}, { WIDGETS_END}, }; diff --git a/dummy_land.c b/dummy_land.c index 88daa0752..10952fc00 100644 --- a/dummy_land.c +++ b/dummy_land.c @@ -67,17 +67,17 @@ static uint32 GetTileTrackStatus_Dummy(TileIndex tile, TransportType mode) } const TileTypeProcs _tile_type_dummy_procs = { - DrawTile_Dummy, /* draw_tile_proc */ - GetSlopeZ_Dummy, /* get_slope_z_proc */ - ClearTile_Dummy, /* clear_tile_proc */ - GetAcceptedCargo_Dummy, /* get_accepted_cargo_proc */ - GetTileDesc_Dummy, /* get_tile_desc_proc */ - GetTileTrackStatus_Dummy, /* get_tile_track_status_proc */ - ClickTile_Dummy, /* click_tile_proc */ - AnimateTile_Dummy, /* animate_tile_proc */ - TileLoop_Dummy, /* tile_loop_clear */ - ChangeTileOwner_Dummy, /* change_tile_owner_clear */ - NULL, /* get_produced_cargo_proc */ - NULL, /* vehicle_enter_tile_proc */ - GetSlopeTileh_Dummy, /* get_slope_tileh_proc */ + DrawTile_Dummy, /* draw_tile_proc */ + GetSlopeZ_Dummy, /* get_slope_z_proc */ + ClearTile_Dummy, /* clear_tile_proc */ + GetAcceptedCargo_Dummy, /* get_accepted_cargo_proc */ + GetTileDesc_Dummy, /* get_tile_desc_proc */ + GetTileTrackStatus_Dummy, /* get_tile_track_status_proc */ + ClickTile_Dummy, /* click_tile_proc */ + AnimateTile_Dummy, /* animate_tile_proc */ + TileLoop_Dummy, /* tile_loop_clear */ + ChangeTileOwner_Dummy, /* change_tile_owner_clear */ + NULL, /* get_produced_cargo_proc */ + NULL, /* vehicle_enter_tile_proc */ + GetSlopeTileh_Dummy, /* get_slope_tileh_proc */ }; @@ -687,54 +687,54 @@ static byte _price_category[NUM_PRICES] = { }; static const int32 _price_base[NUM_PRICES] = { - 100, // station_value - 100, // build_rail - 95, // build_road - 65, // build_signals - 275, // build_bridge - 600, // build_train_depot - 500, // build_road_depot - 700, // build_ship_depot - 450, // build_tunnel - 200, // train_station_track - 180, // train_station_length - 600, // build_airport - 200, // build_bus_station - 200, // build_truck_station - 350, // build_dock - 400000, // build_railvehicle - 2000, // build_railwagon - 700000, // aircraft_base - 14000, // roadveh_base - 65000, // ship_base - 20, // build_trees - 250, // terraform - 20, // clear_1 - 40, // purchase_land - 200, // clear_2 - 500, // clear_3 - 20, // remove_trees - -70, // remove_rail - 10, // remove_signals - 50, // clear_bridge - 80, // remove_train_depot - 80, // remove_road_depot - 90, // remove_ship_depot - 30, // clear_tunnel - 10000, // clear_water - 50, // remove_rail_station - 30, // remove_airport - 50, // remove_bus_station - 50, // remove_truck_station - 55, // remove_dock - 1600, // remove_house - 40, // remove_road - 5600, // running_rail[0] railroad - 5200, // running_rail[1] monorail - 4800, // running_rail[2] maglev - 9600, // aircraft_running - 1600, // roadveh_running - 5600, // ship_running + 100, // station_value + 100, // build_rail + 95, // build_road + 65, // build_signals + 275, // build_bridge + 600, // build_train_depot + 500, // build_road_depot + 700, // build_ship_depot + 450, // build_tunnel + 200, // train_station_track + 180, // train_station_length + 600, // build_airport + 200, // build_bus_station + 200, // build_truck_station + 350, // build_dock + 400000, // build_railvehicle + 2000, // build_railwagon + 700000, // aircraft_base + 14000, // roadveh_base + 65000, // ship_base + 20, // build_trees + 250, // terraform + 20, // clear_1 + 40, // purchase_land + 200, // clear_2 + 500, // clear_3 + 20, // remove_trees + -70, // remove_rail + 10, // remove_signals + 50, // clear_bridge + 80, // remove_train_depot + 80, // remove_road_depot + 90, // remove_ship_depot + 30, // clear_tunnel + 10000, // clear_water + 50, // remove_rail_station + 30, // remove_airport + 50, // remove_bus_station + 50, // remove_truck_station + 55, // remove_dock + 1600, // remove_house + 40, // remove_road + 5600, // running_rail[0] railroad + 5200, // running_rail[1] monorail + 4800, // running_rail[2] maglev + 9600, // aircraft_running + 1600, // roadveh_running + 5600, // ship_running 1000000, // build_industry }; @@ -1040,12 +1040,12 @@ no_add:; } static const SaveLoad _subsidies_desc[] = { - SLE_VAR(Subsidy,cargo_type, SLE_UINT8), - SLE_VAR(Subsidy,age, SLE_UINT8), - SLE_CONDVAR(Subsidy,from, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVAR(Subsidy,from, SLE_UINT16, 5, SL_MAX_VERSION), - SLE_CONDVAR(Subsidy,to, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVAR(Subsidy,to, SLE_UINT16, 5, SL_MAX_VERSION), + SLE_VAR(Subsidy, cargo_type, SLE_UINT8), + SLE_VAR(Subsidy, age, SLE_UINT8), + SLE_CONDVAR(Subsidy, from, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Subsidy, from, SLE_UINT16, 5, SL_MAX_VERSION), + SLE_CONDVAR(Subsidy, to, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Subsidy, to, SLE_UINT16, 5, SL_MAX_VERSION), SLE_END() }; @@ -1635,24 +1635,24 @@ int32 CmdBuyCompany(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) // Prices static void SaveLoad_PRIC(void) { - SlArray(&_price, NUM_PRICES, SLE_INT32); + SlArray(&_price, NUM_PRICES, SLE_INT32); SlArray(&_price_frac, NUM_PRICES, SLE_UINT16); } // Cargo payment rates static void SaveLoad_CAPR(void) { - SlArray(&_cargo_payment_rates, NUM_CARGO, SLE_INT32); + SlArray(&_cargo_payment_rates, NUM_CARGO, SLE_INT32); SlArray(&_cargo_payment_rates_frac, NUM_CARGO, SLE_UINT16); } static const SaveLoad _economy_desc[] = { - SLE_VAR(Economy,max_loan, SLE_INT32), - SLE_VAR(Economy,max_loan_unround, SLE_INT32), - SLE_VAR(Economy,fluct, SLE_FILE_I16 | SLE_VAR_I32), - SLE_VAR(Economy,interest_rate, SLE_UINT8), - SLE_VAR(Economy,infl_amount, SLE_UINT8), - SLE_VAR(Economy,infl_amount_pr, SLE_UINT8), + SLE_VAR(Economy, max_loan, SLE_INT32), + SLE_VAR(Economy, max_loan_unround, SLE_INT32), + SLE_VAR(Economy, fluct, SLE_FILE_I16 | SLE_VAR_I32), + SLE_VAR(Economy, interest_rate, SLE_UINT8), + SLE_VAR(Economy, infl_amount, SLE_UINT8), + SLE_VAR(Economy, infl_amount_pr, SLE_UINT8), SLE_END() }; @@ -1665,6 +1665,6 @@ static void SaveLoad_ECMY(void) const ChunkHandler _economy_chunk_handlers[] = { { 'PRIC', SaveLoad_PRIC, SaveLoad_PRIC, CH_RIFF | CH_AUTO_LENGTH}, { 'CAPR', SaveLoad_CAPR, SaveLoad_CAPR, CH_RIFF | CH_AUTO_LENGTH}, - { 'SUBS', Save_SUBS, Load_SUBS, CH_ARRAY}, + { 'SUBS', Save_SUBS, Load_SUBS, CH_ARRAY}, { 'ECMY', SaveLoad_ECMY, SaveLoad_ECMY, CH_RIFF | CH_LAST}, }; @@ -25,9 +25,9 @@ AircraftVehicleInfo _aircraft_vehicle_info[NUM_AIRCRAFT_ENGINES]; RoadVehicleInfo _road_vehicle_info[NUM_ROAD_ENGINES]; enum { - ENGINE_AVAILABLE = 1, + ENGINE_AVAILABLE = 1, ENGINE_INTRODUCING = 2, - ENGINE_PREVIEWING = 4, + ENGINE_PREVIEWING = 4, }; enum { @@ -40,18 +40,18 @@ enum { #define MC(cargo) (1 << cargo) const uint32 _default_refitmasks[NUM_VEHICLE_TYPES] = { /* Trains */ - MC(GC_PASSENGERS)|MC(GC_COAL)|MC(GC_MAIL)|MC(GC_LIVESTOCK)|MC(GC_GOODS)|MC(GC_GRAIN)|MC(GC_WOOD)|MC(GC_IRON_ORE)| - MC(GC_STEEL)|MC(GC_VALUABLES)|MC(GC_PAPER)|MC(GC_FOOD)|MC(GC_FRUIT)|MC(GC_COPPER_ORE)|MC(GC_WATER)|MC(GC_SUGAR)| - MC(GC_TOYS)|MC(GC_CANDY)|MC(GC_TOFFEE)|MC(GC_COLA)|MC(GC_COTTON_CANDY)|MC(GC_BUBBLES)|MC(GC_PLASTIC)|MC(GC_FIZZY_DRINKS), + MC(GC_PASSENGERS) | MC(GC_COAL) | MC(GC_MAIL) | MC(GC_LIVESTOCK) | MC(GC_GOODS) | MC(GC_GRAIN) | MC(GC_WOOD) | MC(GC_IRON_ORE) | + MC(GC_STEEL) | MC(GC_VALUABLES) | MC(GC_PAPER) | MC(GC_FOOD) | MC(GC_FRUIT) | MC(GC_COPPER_ORE) | MC(GC_WATER) | MC(GC_SUGAR) | + MC(GC_TOYS) | MC(GC_CANDY) | MC(GC_TOFFEE) | MC(GC_COLA) | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES) | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS), /* Road vehicles (not refittable by default) */ 0, /* Ships */ - MC(GC_COAL)|MC(GC_MAIL)|MC(GC_LIVESTOCK)|MC(GC_GOODS)|MC(GC_GRAIN)|MC(GC_WOOD)|MC(GC_IRON_ORE)|MC(GC_STEEL)|MC(GC_VALUABLES)| - MC(GC_PAPER)|MC(GC_FOOD)|MC(GC_FRUIT)|MC(GC_COPPER_ORE)|MC(GC_WATER)|MC(GC_RUBBER)|MC(GC_SUGAR)|MC(GC_TOYS)|MC(GC_BATTERIES)| - MC(GC_CANDY)|MC(GC_TOFFEE)|MC(GC_COLA)|MC(GC_COTTON_CANDY)|MC(GC_BUBBLES)|MC(GC_PLASTIC)|MC(GC_FIZZY_DRINKS), + MC(GC_COAL) | MC(GC_MAIL) | MC(GC_LIVESTOCK) | MC(GC_GOODS) | MC(GC_GRAIN) | MC(GC_WOOD) | MC(GC_IRON_ORE) | MC(GC_STEEL) | MC(GC_VALUABLES) | + MC(GC_PAPER) | MC(GC_FOOD) | MC(GC_FRUIT) | MC(GC_COPPER_ORE) | MC(GC_WATER) | MC(GC_RUBBER) | MC(GC_SUGAR) | MC(GC_TOYS) | MC(GC_BATTERIES) | + MC(GC_CANDY) | MC(GC_TOFFEE) | MC(GC_COLA) | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES) | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS), /* Aircraft */ - MC(GC_PASSENGERS)|MC(GC_MAIL)|MC(GC_GOODS)|MC(GC_VALUABLES)|MC(GC_FOOD)|MC(GC_FRUIT)|MC(GC_SUGAR)|MC(GC_TOYS)| - MC(GC_BATTERIES)|MC(GC_CANDY)|MC(GC_TOFFEE)|MC(GC_COLA)|MC(GC_COTTON_CANDY)|MC(GC_BUBBLES)|MC(GC_PLASTIC)|MC(GC_FIZZY_DRINKS), + MC(GC_PASSENGERS) | MC(GC_MAIL) | MC(GC_GOODS) | MC(GC_VALUABLES) | MC(GC_FOOD) | MC(GC_FRUIT) | MC(GC_SUGAR) | MC(GC_TOYS) | + MC(GC_BATTERIES) | MC(GC_CANDY) | MC(GC_TOFFEE) | MC(GC_COLA) | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES) | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS), /* Special/Disaster */ 0,0 }; @@ -606,25 +606,25 @@ static void Load_ERNW(void) } static const SaveLoad _engine_desc[] = { - SLE_CONDVAR(Engine,intro_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Engine,intro_date, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Engine,age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Engine,age, SLE_INT32, 31, SL_MAX_VERSION), - SLE_VAR(Engine,reliability, SLE_UINT16), - SLE_VAR(Engine,reliability_spd_dec, SLE_UINT16), - SLE_VAR(Engine,reliability_start, SLE_UINT16), - SLE_VAR(Engine,reliability_max, SLE_UINT16), - SLE_VAR(Engine,reliability_final, SLE_UINT16), - SLE_VAR(Engine,duration_phase_1, SLE_UINT16), - SLE_VAR(Engine,duration_phase_2, SLE_UINT16), - SLE_VAR(Engine,duration_phase_3, SLE_UINT16), - - SLE_VAR(Engine,lifelength, SLE_UINT8), - SLE_VAR(Engine,flags, SLE_UINT8), - SLE_VAR(Engine,preview_player, SLE_UINT8), - SLE_VAR(Engine,preview_wait, SLE_UINT8), - SLE_VAR(Engine,railtype, SLE_UINT8), - SLE_VAR(Engine,player_avail, SLE_UINT8), + SLE_CONDVAR(Engine, intro_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Engine, intro_date, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Engine, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Engine, age, SLE_INT32, 31, SL_MAX_VERSION), + SLE_VAR(Engine, reliability, SLE_UINT16), + SLE_VAR(Engine, reliability_spd_dec, SLE_UINT16), + SLE_VAR(Engine, reliability_start, SLE_UINT16), + SLE_VAR(Engine, reliability_max, SLE_UINT16), + SLE_VAR(Engine, reliability_final, SLE_UINT16), + SLE_VAR(Engine, duration_phase_1, SLE_UINT16), + SLE_VAR(Engine, duration_phase_2, SLE_UINT16), + SLE_VAR(Engine, duration_phase_3, SLE_UINT16), + + SLE_VAR(Engine, lifelength, SLE_UINT8), + SLE_VAR(Engine, flags, SLE_UINT8), + SLE_VAR(Engine, preview_player, SLE_UINT8), + SLE_VAR(Engine, preview_wait, SLE_UINT8), + SLE_VAR(Engine, railtype, SLE_UINT8), + SLE_VAR(Engine, player_avail, SLE_UINT8), // reserve extra space in savegame here. (currently 16 bytes) SLE_CONDNULL(16, 2, SL_MAX_VERSION), @@ -143,16 +143,16 @@ bool IsEngineBuildable(uint engine, byte type); enum { NUM_NORMAL_RAIL_ENGINES = 54, - NUM_MONORAIL_ENGINES = 30, - NUM_MAGLEV_ENGINES = 32, - NUM_TRAIN_ENGINES = NUM_NORMAL_RAIL_ENGINES + NUM_MONORAIL_ENGINES + NUM_MAGLEV_ENGINES, - NUM_ROAD_ENGINES = 88, - NUM_SHIP_ENGINES = 11, - NUM_AIRCRAFT_ENGINES = 41, - TOTAL_NUM_ENGINES = NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES + NUM_SHIP_ENGINES + NUM_AIRCRAFT_ENGINES, - AIRCRAFT_ENGINES_INDEX = NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES + NUM_SHIP_ENGINES, - SHIP_ENGINES_INDEX = NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES, - ROAD_ENGINES_INDEX = NUM_TRAIN_ENGINES, + NUM_MONORAIL_ENGINES = 30, + NUM_MAGLEV_ENGINES = 32, + NUM_TRAIN_ENGINES = NUM_NORMAL_RAIL_ENGINES + NUM_MONORAIL_ENGINES + NUM_MAGLEV_ENGINES, + NUM_ROAD_ENGINES = 88, + NUM_SHIP_ENGINES = 11, + NUM_AIRCRAFT_ENGINES = 41, + TOTAL_NUM_ENGINES = NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES + NUM_SHIP_ENGINES + NUM_AIRCRAFT_ENGINES, + AIRCRAFT_ENGINES_INDEX = NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES + NUM_SHIP_ENGINES, + SHIP_ENGINES_INDEX = NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES, + ROAD_ENGINES_INDEX = NUM_TRAIN_ENGINES, }; VARDEF Engine _engines[TOTAL_NUM_ENGINES]; #define FOR_ALL_ENGINES(e) for (e = _engines; e != endof(_engines); e++) diff --git a/engine_gui.c b/engine_gui.c index 5769c45f6..d3b3c39c6 100644 --- a/engine_gui.c +++ b/engine_gui.c @@ -37,11 +37,11 @@ static StringID GetEngineCategoryName(EngineID engine) } static const Widget _engine_preview_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 5, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 5, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 5, 11, 299, 0, 13, STR_8100_MESSAGE_FROM_VEHICLE_MANUFACTURE, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 5, 0, 299, 14, 191, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 5, 85, 144, 172, 183, STR_00C9_NO, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 5, 155, 214, 172, 183, STR_00C8_YES, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 5, 0, 299, 14, 191, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 5, 85, 144, 172, 183, STR_00C9_NO, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 5, 155, 214, 172, 183, STR_00C8_YES, STR_NULL}, { WIDGETS_END}, }; @@ -12,17 +12,17 @@ typedef struct { } FiosItem; enum { - FIOS_TYPE_DRIVE = 0, - FIOS_TYPE_PARENT = 1, - FIOS_TYPE_DIR = 2, - FIOS_TYPE_FILE = 3, - FIOS_TYPE_OLDFILE = 4, - FIOS_TYPE_SCENARIO = 5, - FIOS_TYPE_OLD_SCENARIO = 6, - FIOS_TYPE_DIRECT = 7, - FIOS_TYPE_PNG = 8, - FIOS_TYPE_BMP = 9, - FIOS_TYPE_INVALID = 255, + FIOS_TYPE_DRIVE = 0, + FIOS_TYPE_PARENT = 1, + FIOS_TYPE_DIR = 2, + FIOS_TYPE_FILE = 3, + FIOS_TYPE_OLDFILE = 4, + FIOS_TYPE_SCENARIO = 5, + FIOS_TYPE_OLD_SCENARIO = 6, + FIOS_TYPE_DIRECT = 7, + FIOS_TYPE_PNG = 8, + FIOS_TYPE_BMP = 9, + FIOS_TYPE_INVALID = 255, }; /* Variables to display file lists */ diff --git a/genworld_gui.c b/genworld_gui.c index 9ca71a463..d0a1d76ee 100644 --- a/genworld_gui.c +++ b/genworld_gui.c @@ -58,94 +58,94 @@ static inline void SetNewLandscapeType(byte landscape) // no longer static to allow calling from outside module const Widget _generate_landscape_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 13, 11, 337, 0, 13, STR_WORLD_GENERATION_CAPTION,STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 337, 14, 267, STR_NULL, STR_NULL}, - -{ WWT_PANEL_2, RESIZE_NONE, 12, 10, 86, 24, 78, 0x1312, STR_030E_SELECT_TEMPERATE_LANDSCAPE}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 90, 166, 24, 78, 0x1314, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 170, 246, 24, 78, 0x1316, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 250, 326, 24, 78, 0x1318, STR_0311_SELECT_TOYLAND_LANDSCAPE}, - -{ WWT_PANEL, RESIZE_NONE, 12, 114, 149, 90, 101, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 150, 161, 90, 101, STR_0225, STR_NULL}, // Mapsize X -{ WWT_PANEL, RESIZE_NONE, 12, 180, 215, 90, 101, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 216, 227, 90, 101, STR_0225, STR_NULL}, // Mapsize Y - -{ WWT_PANEL, RESIZE_NONE, 12, 114, 163, 112, 123, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 164, 175, 112, 123, STR_0225, STR_NULL}, // Number of towns -{ WWT_PANEL, RESIZE_NONE, 12, 114, 163, 130, 141, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 164, 175, 130, 141, STR_0225, STR_NULL}, // Number of industries - -{ WWT_IMGBTN, RESIZE_NONE, 15, 114, 194, 152, 163, STR_NULL, STR_RANDOM_SEED_HELP}, // Edit box for seed -{ WWT_TEXTBTN, RESIZE_NONE, 12, 203, 285, 152, 163, STR_RANDOM, STR_RANDOM_HELP}, - -{ WWT_TEXTBTN, RESIZE_NONE, 6, 243, 326, 228, 257, STR_GENERATE, STR_NULL}, // Generate button - -{ WWT_IMGBTN, RESIZE_NONE, 12, 216, 227, 112, 123, SPR_ARROW_DOWN, STR_029E_MOVE_THE_STARTING_DATE}, -{ WWT_PANEL, RESIZE_NONE, 12, 228, 314, 112, 123, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 12, 315, 326, 112, 123, SPR_ARROW_UP, STR_029F_MOVE_THE_STARTING_DATE}, - -{ WWT_IMGBTN, RESIZE_NONE, 12, 282, 293, 130, 141, SPR_ARROW_DOWN, STR_SNOW_LINE_DOWN}, -{ WWT_PANEL, RESIZE_NONE, 12, 294, 314, 130, 141, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 12, 315, 326, 130, 141, SPR_ARROW_UP, STR_SNOW_LINE_UP}, - -{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 192, 203, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 192, 203, STR_0225, STR_NULL}, // Tree placer - -{ WWT_EMPTY, RESIZE_NONE, 12, 114, 231, 174, 185, STR_NULL, STR_NULL}, -//{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 174, 185, STR_NULL, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 12, 114, 231, 174, 185, STR_NULL, STR_NULL}, -//{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 174, 185, STR_0225, STR_NULL}, // Landscape generator -//{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 210, 221, STR_NULL, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 12, 114, 231, 210, 221, STR_NULL, STR_NULL}, -//{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 210, 221, STR_0225, STR_NULL}, // Terrain type -//{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 228, 239, STR_NULL, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 12, 114, 231, 228, 239, STR_NULL, STR_NULL}, -//{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 228, 239, STR_0225, STR_NULL}, // Water quantity -{ WWT_PANEL, RESIZE_NONE, 12, 113, 219, 246, 257, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 246, 257, STR_0225, STR_NULL}, // Map smoothness +{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 13, 11, 337, 0, 13, STR_WORLD_GENERATION_CAPTION, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 337, 14, 267, STR_NULL, STR_NULL}, + +{ WWT_PANEL_2, RESIZE_NONE, 12, 10, 86, 24, 78, 0x1312, STR_030E_SELECT_TEMPERATE_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 90, 166, 24, 78, 0x1314, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 170, 246, 24, 78, 0x1316, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 250, 326, 24, 78, 0x1318, STR_0311_SELECT_TOYLAND_LANDSCAPE}, + +{ WWT_PANEL, RESIZE_NONE, 12, 114, 149, 90, 101, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 150, 161, 90, 101, STR_0225, STR_NULL}, // Mapsize X +{ WWT_PANEL, RESIZE_NONE, 12, 180, 215, 90, 101, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 216, 227, 90, 101, STR_0225, STR_NULL}, // Mapsize Y + +{ WWT_PANEL, RESIZE_NONE, 12, 114, 163, 112, 123, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 164, 175, 112, 123, STR_0225, STR_NULL}, // Number of towns +{ WWT_PANEL, RESIZE_NONE, 12, 114, 163, 130, 141, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 164, 175, 130, 141, STR_0225, STR_NULL}, // Number of industries + +{ WWT_IMGBTN, RESIZE_NONE, 15, 114, 194, 152, 163, STR_NULL, STR_RANDOM_SEED_HELP}, // Edit box for seed +{ WWT_TEXTBTN, RESIZE_NONE, 12, 203, 285, 152, 163, STR_RANDOM, STR_RANDOM_HELP}, + +{ WWT_TEXTBTN, RESIZE_NONE, 6, 243, 326, 228, 257, STR_GENERATE, STR_NULL}, // Generate button + +{ WWT_IMGBTN, RESIZE_NONE, 12, 216, 227, 112, 123, SPR_ARROW_DOWN, STR_029E_MOVE_THE_STARTING_DATE}, +{ WWT_PANEL, RESIZE_NONE, 12, 228, 314, 112, 123, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 12, 315, 326, 112, 123, SPR_ARROW_UP, STR_029F_MOVE_THE_STARTING_DATE}, + +{ WWT_IMGBTN, RESIZE_NONE, 12, 282, 293, 130, 141, SPR_ARROW_DOWN, STR_SNOW_LINE_DOWN}, +{ WWT_PANEL, RESIZE_NONE, 12, 294, 314, 130, 141, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 12, 315, 326, 130, 141, SPR_ARROW_UP, STR_SNOW_LINE_UP}, + +{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 192, 203, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 192, 203, STR_0225, STR_NULL}, // Tree placer + +{ WWT_EMPTY, RESIZE_NONE, 12, 114, 231, 174, 185, STR_NULL, STR_NULL}, +//{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 174, 185, STR_NULL, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 12, 114, 231, 174, 185, STR_NULL, STR_NULL}, +//{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 174, 185, STR_0225, STR_NULL}, // Landscape generator +//{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 210, 221, STR_NULL, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 12, 114, 231, 210, 221, STR_NULL, STR_NULL}, +//{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 210, 221, STR_0225, STR_NULL}, // Terrain type +//{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 228, 239, STR_NULL, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 12, 114, 231, 228, 239, STR_NULL, STR_NULL}, +//{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 228, 239, STR_0225, STR_NULL}, // Water quantity +{ WWT_PANEL, RESIZE_NONE, 12, 113, 219, 246, 257, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 246, 257, STR_0225, STR_NULL}, // Map smoothness { WIDGETS_END}, }; const Widget _heightmap_load_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 13, 11, 337, 0, 13, STR_WORLD_GENERATION_CAPTION,STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 337, 14, 235, STR_NULL, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 13, 11, 337, 0, 13, STR_WORLD_GENERATION_CAPTION, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 337, 14, 235, STR_NULL, STR_NULL}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 10, 86, 24, 78, 0x1312, STR_030E_SELECT_TEMPERATE_LANDSCAPE}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 90, 166, 24, 78, 0x1314, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 170, 246, 24, 78, 0x1316, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 250, 326, 24, 78, 0x1318, STR_0311_SELECT_TOYLAND_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 10, 86, 24, 78, 0x1312, STR_030E_SELECT_TEMPERATE_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 90, 166, 24, 78, 0x1314, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 170, 246, 24, 78, 0x1316, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 250, 326, 24, 78, 0x1318, STR_0311_SELECT_TOYLAND_LANDSCAPE}, -{ WWT_PANEL, RESIZE_NONE, 12, 114, 149, 112, 123, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 150, 161, 112, 123, STR_0225, STR_NULL}, // Mapsize X -{ WWT_PANEL, RESIZE_NONE, 12, 180, 215, 112, 123, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 216, 227, 112, 123, STR_0225, STR_NULL}, // Mapsize Y +{ WWT_PANEL, RESIZE_NONE, 12, 114, 149, 112, 123, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 150, 161, 112, 123, STR_0225, STR_NULL}, // Mapsize X +{ WWT_PANEL, RESIZE_NONE, 12, 180, 215, 112, 123, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 216, 227, 112, 123, STR_0225, STR_NULL}, // Mapsize Y -{ WWT_PANEL, RESIZE_NONE, 12, 114, 163, 134, 145, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 164, 175, 134, 145, STR_0225, STR_NULL}, // Number of towns -{ WWT_PANEL, RESIZE_NONE, 12, 114, 163, 152, 163, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 164, 175, 152, 163, STR_0225, STR_NULL}, // Number of industries +{ WWT_PANEL, RESIZE_NONE, 12, 114, 163, 134, 145, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 164, 175, 134, 145, STR_0225, STR_NULL}, // Number of towns +{ WWT_PANEL, RESIZE_NONE, 12, 114, 163, 152, 163, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 164, 175, 152, 163, STR_0225, STR_NULL}, // Number of industries -{ WWT_IMGBTN, RESIZE_NONE, 15, 114, 194, 174, 185, STR_NULL, STR_RANDOM_SEED_HELP}, // Edit box for seed -{ WWT_TEXTBTN, RESIZE_NONE, 12, 203, 285, 174, 185, STR_RANDOM, STR_RANDOM_HELP}, +{ WWT_IMGBTN, RESIZE_NONE, 15, 114, 194, 174, 185, STR_NULL, STR_RANDOM_SEED_HELP}, // Edit box for seed +{ WWT_TEXTBTN, RESIZE_NONE, 12, 203, 285, 174, 185, STR_RANDOM, STR_RANDOM_HELP}, -{ WWT_TEXTBTN, RESIZE_NONE, 6, 243, 326, 196, 225, STR_GENERATE, STR_NULL}, // Generate button +{ WWT_TEXTBTN, RESIZE_NONE, 6, 243, 326, 196, 225, STR_GENERATE, STR_NULL}, // Generate button -{ WWT_IMGBTN, RESIZE_NONE, 12, 216, 227, 134, 145, SPR_ARROW_DOWN, STR_029E_MOVE_THE_STARTING_DATE}, -{ WWT_PANEL, RESIZE_NONE, 12, 228, 314, 134, 145, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 12, 315, 326, 134, 145, SPR_ARROW_UP, STR_029F_MOVE_THE_STARTING_DATE}, +{ WWT_IMGBTN, RESIZE_NONE, 12, 216, 227, 134, 145, SPR_ARROW_DOWN, STR_029E_MOVE_THE_STARTING_DATE}, +{ WWT_PANEL, RESIZE_NONE, 12, 228, 314, 134, 145, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 12, 315, 326, 134, 145, SPR_ARROW_UP, STR_029F_MOVE_THE_STARTING_DATE}, -{ WWT_IMGBTN, RESIZE_NONE, 12, 282, 293, 152, 163, SPR_ARROW_DOWN, STR_SNOW_LINE_DOWN}, -{ WWT_PANEL, RESIZE_NONE, 12, 294, 314, 152, 163, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 12, 315, 326, 152, 163, SPR_ARROW_UP, STR_SNOW_LINE_UP}, +{ WWT_IMGBTN, RESIZE_NONE, 12, 282, 293, 152, 163, SPR_ARROW_DOWN, STR_SNOW_LINE_DOWN}, +{ WWT_PANEL, RESIZE_NONE, 12, 294, 314, 152, 163, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 12, 315, 326, 152, 163, SPR_ARROW_UP, STR_SNOW_LINE_UP}, -{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 196, 207, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 196, 207, STR_0225, STR_NULL}, // Tree placer +{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 196, 207, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 196, 207, STR_0225, STR_NULL}, // Tree placer -{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 214, 225, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 214, 225, STR_0225, STR_NULL}, // Heightmap rotation +{ WWT_PANEL, RESIZE_NONE, 12, 114, 219, 214, 225, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 12, 220, 231, 214, 225, STR_0225, STR_NULL}, // Heightmap rotation { WIDGETS_END}, }; @@ -271,12 +271,12 @@ static inline SpriteID GetFontBase(FontSize size) enum { - ASCII_SETX = 1, - ASCII_SETXY = 2, + ASCII_SETX = 1, + ASCII_SETXY = 2, - ASCII_TINYFONT = 8, - ASCII_BIGFONT = 9, - ASCII_NL = 10, + ASCII_TINYFONT = 8, + ASCII_BIGFONT = 9, + ASCII_NL = 10, ASCII_COLORSTART = 15, }; diff --git a/graph_gui.c b/graph_gui.c index e9d05b167..b2acd3d23 100644 --- a/graph_gui.c +++ b/graph_gui.c @@ -257,17 +257,17 @@ static void GraphLegendWndProc(Window *w, WindowEvent *e) } static const Widget _graph_legend_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 249, 0, 13, STR_704E_KEY_TO_COMPANY_GRAPHS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 249, 14, 113, 0x0,STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 16, 27, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 28, 39, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 40, 51, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 52, 63, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 64, 75, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 76, 87, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 88, 99, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 100, 111, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 249, 14, 113, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 16, 27, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 28, 39, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 40, 51, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 52, 63, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 64, 75, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 76, 87, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 88, 99, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 247, 100, 111, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, { WIDGETS_END}, }; @@ -365,10 +365,10 @@ static void OperatingProfitWndProc(Window *w, WindowEvent *e) } static const Widget _operating_profit_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 525, 0, 13, STR_7025_OPERATING_PROFIT_GRAPH, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 173, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 173, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -440,10 +440,10 @@ static void IncomeGraphWndProc(Window *w, WindowEvent *e) } static const Widget _income_graph_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 525, 0, 13, STR_7022_INCOME_GRAPH, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 141, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 141, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -513,10 +513,10 @@ static void DeliveredCargoGraphWndProc(Window *w, WindowEvent *e) } static const Widget _delivered_cargo_graph_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 525, 0, 13, STR_7050_UNITS_OF_CARGO_DELIVERED, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 141, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 141, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -588,11 +588,11 @@ static void PerformanceHistoryWndProc(Window *w, WindowEvent *e) } static const Widget _performance_history_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 475, 0, 13, STR_7051_COMPANY_PERFORMANCE_RATINGS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 476, 525, 0, 13, STR_PERFORMANCE_DETAIL_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 237, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 475, 0, 13, STR_7051_COMPANY_PERFORMANCE_RATINGS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 476, 525, 0, 13, STR_PERFORMANCE_DETAIL_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 237, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -662,10 +662,10 @@ static void CompanyValueGraphWndProc(Window *w, WindowEvent *e) } static const Widget _company_value_graph_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 525, 0, 13, STR_7052_COMPANY_VALUES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 237, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 525, 0, 13, STR_7052_COMPANY_VALUES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 575, 14, 237, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -752,21 +752,21 @@ static void CargoPaymentRatesWndProc(Window *w, WindowEvent *e) } static const Widget _cargo_payment_rates_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 567, 0, 13, STR_7061_CARGO_PAYMENT_RATES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 14, 0, 567, 14, 141, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 24, 31, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 32, 39, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 40, 47, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 48, 55, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 56, 63, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 64, 71, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 72, 79, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 80, 87, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 88, 95, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 96, 103, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 104, 111, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, -{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 112, 119, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 567, 0, 13, STR_7061_CARGO_PAYMENT_RATES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 567, 14, 141, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 24, 31, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 32, 39, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 40, 47, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 48, 55, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 56, 63, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 64, 71, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 72, 79, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 80, 87, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 88, 95, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 96, 103, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 104, 111, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, +{ WWT_PANEL, RESIZE_NONE, 12, 493, 562, 112, 119, 0x0, STR_7064_TOGGLE_GRAPH_FOR_CARGO}, { WIDGETS_END}, }; @@ -1055,29 +1055,29 @@ static void PerformanceRatingDetailWndProc(Window *w, WindowEvent *e) } static const Widget _performance_rating_detail_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 298, 0, 13, STR_PERFORMANCE_DETAIL, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 14, 27, 0x0, STR_NULL}, - -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 28, 47, 0x0,STR_PERFORMANCE_DETAIL_VEHICLES_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 48, 67, 0x0,STR_PERFORMANCE_DETAIL_STATIONS_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 68, 87, 0x0,STR_PERFORMANCE_DETAIL_MIN_PROFIT_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 88, 107, 0x0,STR_PERFORMANCE_DETAIL_MIN_INCOME_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 108, 127, 0x0,STR_PERFORMANCE_DETAIL_MAX_INCOME_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 128, 147, 0x0,STR_PERFORMANCE_DETAIL_DELIVERED_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 148, 167, 0x0,STR_PERFORMANCE_DETAIL_CARGO_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 168, 187, 0x0,STR_PERFORMANCE_DETAIL_MONEY_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 188, 207, 0x0,STR_PERFORMANCE_DETAIL_LOAN_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 208, 227, 0x0,STR_PERFORMANCE_DETAIL_TOTAL_TIP}, - -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 38, 14, 26, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 39, 75, 14, 26, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 76, 112, 14, 26, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 113, 149, 14, 26, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 150, 186, 14, 26, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 187, 223, 14, 26, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 224, 260, 14, 26, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 261, 297, 14, 26, 0x0,STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 298, 0, 13, STR_PERFORMANCE_DETAIL, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 14, 27, 0x0, STR_NULL}, + +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 28, 47, 0x0, STR_PERFORMANCE_DETAIL_VEHICLES_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 48, 67, 0x0, STR_PERFORMANCE_DETAIL_STATIONS_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 68, 87, 0x0, STR_PERFORMANCE_DETAIL_MIN_PROFIT_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 88, 107, 0x0, STR_PERFORMANCE_DETAIL_MIN_INCOME_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 108, 127, 0x0, STR_PERFORMANCE_DETAIL_MAX_INCOME_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 128, 147, 0x0, STR_PERFORMANCE_DETAIL_DELIVERED_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 148, 167, 0x0, STR_PERFORMANCE_DETAIL_CARGO_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 168, 187, 0x0, STR_PERFORMANCE_DETAIL_MONEY_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 188, 207, 0x0, STR_PERFORMANCE_DETAIL_LOAN_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 298, 208, 227, 0x0, STR_PERFORMANCE_DETAIL_TOTAL_TIP}, + +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 38, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 39, 75, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 76, 112, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 113, 149, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 150, 186, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 187, 223, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 224, 260, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 261, 297, 14, 26, 0x0, STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, { WIDGETS_END}, }; @@ -1208,12 +1208,12 @@ static void SignListWndProc(Window *w, WindowEvent *e) } static const Widget _sign_list_widget[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 345, 0, 13, STR_SIGN_LIST_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 346, 357, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_RB, 14, 0, 345, 14, 137, 0x0, STR_NULL}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 346, 357, 14, 125, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 346, 357, 126, 137, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 345, 0, 13, STR_SIGN_LIST_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 346, 357, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PANEL, RESIZE_RB, 14, 0, 345, 14, 137, 0x0, STR_NULL}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 346, 357, 14, 125, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 346, 357, 126, 137, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -133,8 +133,8 @@ void ShowNetworkGameWindow(void); void ShowBuildBridgeWindow(uint start, uint end, byte type); enum { - ZOOM_IN = 0, - ZOOM_OUT = 1, + ZOOM_IN = 0, + ZOOM_OUT = 1, ZOOM_NONE = 2, // hack, used to update the button status }; diff --git a/industry.h b/industry.h index 2e618edd9..858a8ba6a 100644 --- a/industry.h +++ b/industry.h @@ -108,45 +108,45 @@ void DeleteIndustry(Industry *is); void PlantRandomFarmField(const Industry *i); enum { - IT_COAL_MINE = 0, - IT_POWER_STATION = 1, - IT_SAWMILL = 2, - IT_FOREST = 3, - IT_OIL_REFINERY = 4, - IT_OIL_RIG = 5, - IT_FACTORY = 6, - IT_PRINTING_WORKS = 7, - IT_STEEL_MILL = 8, - IT_FARM = 9, - IT_COPPER_MINE = 10, - IT_OIL_WELL = 11, - IT_BANK_TEMP = 12, - IT_FOOD_PROCESS = 13, - IT_PAPER_MILL = 14, - IT_GOLD_MINE = 15, - IT_BANK_TROPIC_ARCTIC = 16, - IT_DIAMOND_MINE = 17, - IT_IRON_MINE = 18, - IT_FRUIT_PLANTATION = 19, - IT_RUBBER_PLANTATION = 20, - IT_WATER_SUPPLY = 21, - IT_WATER_TOWER = 22, - IT_FACTORY_2 = 23, - IT_FARM_2 = 24, - IT_LUMBER_MILL = 25, - IT_COTTON_CANDY = 26, - IT_CANDY_FACTORY = 27, - IT_BATTERY_FARM = 28, - IT_COLA_WELLS = 29, - IT_TOY_SHOP = 30, - IT_TOY_FACTORY = 31, - IT_PLASTIC_FOUNTAINS = 32, - IT_FIZZY_DRINK_FACTORY = 33, - IT_BUBBLE_GENERATOR = 34, - IT_TOFFEE_QUARRY = 35, - IT_SUGAR_MINE = 36, + IT_COAL_MINE = 0, + IT_POWER_STATION = 1, + IT_SAWMILL = 2, + IT_FOREST = 3, + IT_OIL_REFINERY = 4, + IT_OIL_RIG = 5, + IT_FACTORY = 6, + IT_PRINTING_WORKS = 7, + IT_STEEL_MILL = 8, + IT_FARM = 9, + IT_COPPER_MINE = 10, + IT_OIL_WELL = 11, + IT_BANK_TEMP = 12, + IT_FOOD_PROCESS = 13, + IT_PAPER_MILL = 14, + IT_GOLD_MINE = 15, + IT_BANK_TROPIC_ARCTIC = 16, + IT_DIAMOND_MINE = 17, + IT_IRON_MINE = 18, + IT_FRUIT_PLANTATION = 19, + IT_RUBBER_PLANTATION = 20, + IT_WATER_SUPPLY = 21, + IT_WATER_TOWER = 22, + IT_FACTORY_2 = 23, + IT_FARM_2 = 24, + IT_LUMBER_MILL = 25, + IT_COTTON_CANDY = 26, + IT_CANDY_FACTORY = 27, + IT_BATTERY_FARM = 28, + IT_COLA_WELLS = 29, + IT_TOY_SHOP = 30, + IT_TOY_FACTORY = 31, + IT_PLASTIC_FOUNTAINS = 32, + IT_FIZZY_DRINK_FACTORY = 33, + IT_BUBBLE_GENERATOR = 34, + IT_TOFFEE_QUARRY = 35, + IT_SUGAR_MINE = 36, IT_END, - IT_INVALID = 255, + IT_INVALID = 255, }; typedef enum IndustryLifeTypes { diff --git a/industry_cmd.c b/industry_cmd.c index cdabc032c..5a83ccb5a 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -594,9 +594,9 @@ static void TileLoopIndustry_BubbleGenerator(TileIndex tile) int dir; Vehicle *v; static const int8 _tileloop_ind_case_161[12] = { - 11, 0, -4, -14, - -4, -10, -4, 1, - 49, 59, 60, 65, + 11, 0, -4, -14, + -4, -10, -4, 1, + 49, 59, 60, 65, }; SndPlayTileFx(SND_2E_EXTRACT_AND_POP, tile); @@ -1160,11 +1160,11 @@ static const byte _industry_section_bits[] = { 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 4, 2, 16, 16, 16, 16, + 16, 16, 4, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 4, 2, 16, 16, 16, 16, 16, + 16, 4, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, @@ -1763,10 +1763,10 @@ static void UpdateIndustryStatistics(Industry *i) } static const byte _new_industry_rand[4][32] = { - {12,12,12,12,12,12,12, 0, 0, 6, 6, 9, 9, 3, 3, 3,18,18, 4, 4, 2, 2, 5, 5, 5, 5, 5, 5, 1, 1, 8, 8}, - {16,16,16, 0, 0, 0, 9, 9, 9, 9,13,13, 3, 3, 3, 3,15,15,15, 4, 4,11,11,11,11,11,14,14, 1, 1, 7, 7}, - {21,21,21,24,22,22,22,22,23,23,16,16,16, 4, 4,19,19,19,13,13,20,20,20,11,11,11,17,17,17,10,10,10}, - {30,30,30,36,36,31,31,31,27,27,27,28,28,28,26,26,26,34,34,34,35,35,35,29,29,29,32,32,32,33,33,33}, + {12, 12, 12, 12, 12, 12, 12, 0, 0, 6, 6, 9, 9, 3, 3, 3, 18, 18, 4, 4, 2, 2, 5, 5, 5, 5, 5, 5, 1, 1, 8, 8}, + {16, 16, 16, 0, 0, 0, 9, 9, 9, 9, 13, 13, 3, 3, 3, 3, 15, 15, 15, 4, 4, 11, 11, 11, 11, 11, 14, 14, 1, 1, 7, 7}, + {21, 21, 21, 24, 22, 22, 22, 22, 23, 23, 16, 16, 16, 4, 4, 19, 19, 19, 13, 13, 20, 20, 20, 11, 11, 11, 17, 17, 17, 10, 10, 10}, + {30, 30, 30, 36, 36, 31, 31, 31, 27, 27, 27, 28, 28, 28, 26, 26, 26, 34, 34, 34, 35, 35, 35, 29, 29, 29, 32, 32, 32, 33, 33, 33}, }; static void MaybeNewIndustry(uint32 r) @@ -1900,46 +1900,46 @@ void InitializeIndustries(void) } const TileTypeProcs _tile_type_industry_procs = { - DrawTile_Industry, /* draw_tile_proc */ - GetSlopeZ_Industry, /* get_slope_z_proc */ - ClearTile_Industry, /* clear_tile_proc */ - GetAcceptedCargo_Industry, /* get_accepted_cargo_proc */ - GetTileDesc_Industry, /* get_tile_desc_proc */ - GetTileTrackStatus_Industry,/* get_tile_track_status_proc */ - ClickTile_Industry, /* click_tile_proc */ - AnimateTile_Industry, /* animate_tile_proc */ - TileLoop_Industry, /* tile_loop_proc */ - ChangeTileOwner_Industry, /* change_tile_owner_proc */ - GetProducedCargo_Industry, /* get_produced_cargo_proc */ - NULL, /* vehicle_enter_tile_proc */ - GetSlopeTileh_Industry, /* get_slope_tileh_proc */ + DrawTile_Industry, /* draw_tile_proc */ + GetSlopeZ_Industry, /* get_slope_z_proc */ + ClearTile_Industry, /* clear_tile_proc */ + GetAcceptedCargo_Industry, /* get_accepted_cargo_proc */ + GetTileDesc_Industry, /* get_tile_desc_proc */ + GetTileTrackStatus_Industry, /* get_tile_track_status_proc */ + ClickTile_Industry, /* click_tile_proc */ + AnimateTile_Industry, /* animate_tile_proc */ + TileLoop_Industry, /* tile_loop_proc */ + ChangeTileOwner_Industry, /* change_tile_owner_proc */ + GetProducedCargo_Industry, /* get_produced_cargo_proc */ + NULL, /* vehicle_enter_tile_proc */ + GetSlopeTileh_Industry, /* get_slope_tileh_proc */ }; static const SaveLoad _industry_desc[] = { - SLE_CONDVAR(Industry, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Industry, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_VAR(Industry,width, SLE_UINT8), - SLE_VAR(Industry,height, SLE_UINT8), - SLE_REF(Industry,town, REF_TOWN), - SLE_ARR(Industry,produced_cargo, SLE_UINT8, 2), - SLE_ARR(Industry,cargo_waiting, SLE_UINT16, 2), - SLE_ARR(Industry,production_rate, SLE_UINT8, 2), - SLE_ARR(Industry,accepts_cargo, SLE_UINT8, 3), - SLE_VAR(Industry,prod_level, SLE_UINT8), - SLE_ARR(Industry,last_mo_production,SLE_UINT16, 2), - SLE_ARR(Industry,last_mo_transported,SLE_UINT16, 2), - SLE_ARR(Industry,pct_transported,SLE_UINT8, 2), - SLE_ARR(Industry,total_production,SLE_UINT16, 2), - SLE_ARR(Industry,total_transported,SLE_UINT16, 2), - - SLE_VAR(Industry,counter, SLE_UINT16), - - SLE_VAR(Industry,type, SLE_UINT8), - SLE_VAR(Industry,owner, SLE_UINT8), - SLE_VAR(Industry,color_map, SLE_UINT8), - SLE_CONDVAR(Industry, last_prod_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Industry, last_prod_year, SLE_INT32, 31, SL_MAX_VERSION), - SLE_VAR(Industry,was_cargo_delivered,SLE_UINT8), + SLE_CONDVAR(Industry, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Industry, xy, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_VAR(Industry, width, SLE_UINT8), + SLE_VAR(Industry, height, SLE_UINT8), + SLE_REF(Industry, town, REF_TOWN), + SLE_ARR(Industry, produced_cargo, SLE_UINT8, 2), + SLE_ARR(Industry, cargo_waiting, SLE_UINT16, 2), + SLE_ARR(Industry, production_rate, SLE_UINT8, 2), + SLE_ARR(Industry, accepts_cargo, SLE_UINT8, 3), + SLE_VAR(Industry, prod_level, SLE_UINT8), + SLE_ARR(Industry, last_mo_production, SLE_UINT16, 2), + SLE_ARR(Industry, last_mo_transported, SLE_UINT16, 2), + SLE_ARR(Industry, pct_transported, SLE_UINT8, 2), + SLE_ARR(Industry, total_production, SLE_UINT16, 2), + SLE_ARR(Industry, total_transported, SLE_UINT16, 2), + + SLE_VAR(Industry, counter, SLE_UINT16), + + SLE_VAR(Industry, type, SLE_UINT8), + SLE_VAR(Industry, owner, SLE_UINT8), + SLE_VAR(Industry, color_map, SLE_UINT8), + SLE_CONDVAR(Industry, last_prod_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Industry, last_prod_year, SLE_INT32, 31, SL_MAX_VERSION), + SLE_VAR(Industry, was_cargo_delivered, SLE_UINT8), // reserve extra space in savegame here. (currently 32 bytes) SLE_CONDNULL(32, 2, SL_MAX_VERSION), diff --git a/industry_gui.c b/industry_gui.c index 611b517d4..82ec88279 100644 --- a/industry_gui.c +++ b/industry_gui.c @@ -57,130 +57,130 @@ static void BuildIndustryWndProc(Window *w, WindowEvent *e) } static const Widget _build_industry_land0_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 115, 0x0, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_0242_SAWMILL, STR_0264_CONSTRUCT_SAWMILL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0247_STEEL_MILL, STR_0269_CONSTRUCT_STEEL_MILL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 115, 0x0, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_0242_SAWMILL, STR_0264_CONSTRUCT_SAWMILL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0247_STEEL_MILL, STR_0269_CONSTRUCT_STEEL_MILL}, { WIDGETS_END}, }; static const Widget _build_industry_land1_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 115, 0x0, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_024C_PAPER_MILL, STR_026E_CONSTRUCT_PAPER_MILL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_024D_FOOD_PROCESSING_PLANT,STR_026F_CONSTRUCT_FOOD_PROCESSING}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_024E_PRINTING_WORKS, STR_0270_CONSTRUCT_PRINTING_WORKS}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 115, 0x0, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_024C_PAPER_MILL, STR_026E_CONSTRUCT_PAPER_MILL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_024D_FOOD_PROCESSING_PLANT, STR_026F_CONSTRUCT_FOOD_PROCESSING}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_024E_PRINTING_WORKS, STR_0270_CONSTRUCT_PRINTING_WORKS}, { WIDGETS_END}, }; static const Widget _build_industry_land2_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 115, 0x0, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0250_LUMBER_MILL, STR_0273_CONSTRUCT_LUMBER_MILL_TO}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_024D_FOOD_PROCESSING_PLANT,STR_026F_CONSTRUCT_FOOD_PROCESSING}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0254_WATER_TOWER, STR_0277_CONSTRUCT_WATER_TOWER_CAN}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 115, 0x0, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0250_LUMBER_MILL, STR_0273_CONSTRUCT_LUMBER_MILL_TO}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_024D_FOOD_PROCESSING_PLANT, STR_026F_CONSTRUCT_FOOD_PROCESSING}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0254_WATER_TOWER, STR_0277_CONSTRUCT_WATER_TOWER_CAN}, { WIDGETS_END}, }; static const Widget _build_industry_land3_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 115, 0x0, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0258_CANDY_FACTORY, STR_027B_CONSTRUCT_CANDY_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_025B_TOY_SHOP, STR_027E_CONSTRUCT_TOY_SHOP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_025C_TOY_FACTORY, STR_027F_CONSTRUCT_TOY_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_025E_FIZZY_DRINK_FACTORY, STR_0281_CONSTRUCT_FIZZY_DRINK_FACTORY}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 115, 0x0, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0258_CANDY_FACTORY, STR_027B_CONSTRUCT_CANDY_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_025B_TOY_SHOP, STR_027E_CONSTRUCT_TOY_SHOP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_025C_TOY_FACTORY, STR_027F_CONSTRUCT_TOY_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_025E_FIZZY_DRINK_FACTORY, STR_0281_CONSTRUCT_FIZZY_DRINK_FACTORY}, { WIDGETS_END}, }; static const Widget _build_industry_land0_widgets_extra[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY,STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 187, 0x0, STR_NULL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0241_POWER_STATION,STR_0263_CONSTRUCT_POWER_STATION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_0242_SAWMILL, STR_0264_CONSTRUCT_SAWMILL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0247_STEEL_MILL, STR_0269_CONSTRUCT_STEEL_MILL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 84, 95, STR_0240_COAL_MINE, STR_CONSTRUCT_COAL_MINE_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 97, 108, STR_0243_FOREST, STR_CONSTRUCT_FOREST_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 110, 121, STR_0245_OIL_RIG, STR_CONSTRUCT_OIL_RIG_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 123, 134, STR_0248_FARM, STR_CONSTRUCT_FARM_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 136, 147, STR_024A_OIL_WELLS, STR_CONSTRUCT_OIL_WELLS_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 149, 160, STR_0249_IRON_ORE_MINE, STR_CONSTRUCT_IRON_ORE_MINE_TIP}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 187, 0x0, STR_NULL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_0242_SAWMILL, STR_0264_CONSTRUCT_SAWMILL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0247_STEEL_MILL, STR_0269_CONSTRUCT_STEEL_MILL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 84, 95, STR_0240_COAL_MINE, STR_CONSTRUCT_COAL_MINE_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 97, 108, STR_0243_FOREST, STR_CONSTRUCT_FOREST_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 110, 121, STR_0245_OIL_RIG, STR_CONSTRUCT_OIL_RIG_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 123, 134, STR_0248_FARM, STR_CONSTRUCT_FARM_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 136, 147, STR_024A_OIL_WELLS, STR_CONSTRUCT_OIL_WELLS_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 149, 160, STR_0249_IRON_ORE_MINE, STR_CONSTRUCT_IRON_ORE_MINE_TIP}, { WIDGETS_END}, }; static const Widget _build_industry_land1_widgets_extra[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 174, 0x0, STR_NULL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_024C_PAPER_MILL, STR_026E_CONSTRUCT_PAPER_MILL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_024D_FOOD_PROCESSING_PLANT,STR_026F_CONSTRUCT_FOOD_PROCESSING}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_024E_PRINTING_WORKS, STR_0270_CONSTRUCT_PRINTING_WORKS}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81+3, 92+3, STR_0240_COAL_MINE, STR_CONSTRUCT_COAL_MINE_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94+3, 105+3, STR_0243_FOREST, STR_CONSTRUCT_FOREST_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107+3, 118+3, STR_0248_FARM, STR_CONSTRUCT_FARM_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120+3, 131+3, STR_024A_OIL_WELLS, STR_CONSTRUCT_OIL_WELLS_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133+3, 144+3, STR_024F_GOLD_MINE, STR_CONSTRUCT_GOLD_MINE_TIP}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 174, 0x0, STR_NULL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_024C_PAPER_MILL, STR_026E_CONSTRUCT_PAPER_MILL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_024D_FOOD_PROCESSING_PLANT, STR_026F_CONSTRUCT_FOOD_PROCESSING}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_024E_PRINTING_WORKS, STR_0270_CONSTRUCT_PRINTING_WORKS}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 84, 95, STR_0240_COAL_MINE, STR_CONSTRUCT_COAL_MINE_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 97, 108, STR_0243_FOREST, STR_CONSTRUCT_FOREST_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 110, 121, STR_0248_FARM, STR_CONSTRUCT_FARM_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 123, 134, STR_024A_OIL_WELLS, STR_CONSTRUCT_OIL_WELLS_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 136, 147, STR_024F_GOLD_MINE, STR_CONSTRUCT_GOLD_MINE_TIP}, { WIDGETS_END}, }; static const Widget _build_industry_land2_widgets_extra[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 200, 0x0, STR_NULL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0250_LUMBER_MILL, STR_0273_CONSTRUCT_LUMBER_MILL_TO}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_024D_FOOD_PROCESSING_PLANT,STR_026F_CONSTRUCT_FOOD_PROCESSING}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0254_WATER_TOWER, STR_0277_CONSTRUCT_WATER_TOWER_CAN}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81+3, 92+3, STR_024A_OIL_WELLS,STR_CONSTRUCT_OIL_WELLS_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94+3, 105+3, STR_0255_DIAMOND_MINE, STR_CONSTRUCT_DIAMOND_MINE_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107+3, 118+3, STR_0256_COPPER_ORE_MINE, STR_CONSTRUCT_COPPER_ORE_MINE_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120+3, 131+3, STR_0248_FARM, STR_CONSTRUCT_FARM_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133+3, 144+3, STR_0251_FRUIT_PLANTATION, STR_CONSTRUCT_FRUIT_PLANTATION_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146+3, 157+3, STR_0252_RUBBER_PLANTATION,STR_CONSTRUCT_RUBBER_PLANTATION_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 159+3, 170+3, STR_0253_WATER_SUPPLY, STR_CONSTRUCT_WATER_SUPPLY_TIP}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 200, 0x0, STR_NULL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0250_LUMBER_MILL, STR_0273_CONSTRUCT_LUMBER_MILL_TO}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_024D_FOOD_PROCESSING_PLANT, STR_026F_CONSTRUCT_FOOD_PROCESSING}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0254_WATER_TOWER, STR_0277_CONSTRUCT_WATER_TOWER_CAN}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 84, 95, STR_024A_OIL_WELLS, STR_CONSTRUCT_OIL_WELLS_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 97, 108, STR_0255_DIAMOND_MINE, STR_CONSTRUCT_DIAMOND_MINE_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 110, 121, STR_0256_COPPER_ORE_MINE, STR_CONSTRUCT_COPPER_ORE_MINE_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 123, 134, STR_0248_FARM, STR_CONSTRUCT_FARM_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 136, 147, STR_0251_FRUIT_PLANTATION, STR_CONSTRUCT_FRUIT_PLANTATION_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 149, 160, STR_0252_RUBBER_PLANTATION, STR_CONSTRUCT_RUBBER_PLANTATION_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 162, 173, STR_0253_WATER_SUPPLY, STR_CONSTRUCT_WATER_SUPPLY_TIP}, { WIDGETS_END}, }; static const Widget _build_industry_land3_widgets_extra[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 187, 0x0, STR_NULL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0258_CANDY_FACTORY, STR_027B_CONSTRUCT_CANDY_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_025B_TOY_SHOP, STR_027E_CONSTRUCT_TOY_SHOP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_025C_TOY_FACTORY, STR_027F_CONSTRUCT_TOY_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_025E_FIZZY_DRINK_FACTORY, STR_0281_CONSTRUCT_FIZZY_DRINK_FACTORY}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68+3, 79+3, STR_0257_COTTON_CANDY_FOREST,STR_CONSTRUCT_COTTON_CANDY_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81+3, 92+3, STR_0259_BATTERY_FARM, STR_CONSTRUCT_BATTERY_FARM_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94+3, 105+3, STR_025A_COLA_WELLS, STR_CONSTRUCT_COLA_WELLS_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107+3, 118+3, STR_025D_PLASTIC_FOUNTAINS,STR_CONSTRUCT_PLASTIC_FOUNTAINS_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120+3, 131+3, STR_025F_BUBBLE_GENERATOR, STR_CONSTRUCT_BUBBLE_GENERATOR_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133+3, 144+3, STR_0260_TOFFEE_QUARRY, STR_CONSTRUCT_TOFFEE_QUARRY_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146+3, 157+3, STR_0261_SUGAR_MINE, STR_CONSTRUCT_SUGAR_MINE_TIP}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_0314_FUND_NEW_INDUSTRY, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 169, 14, 187, 0x0, STR_NULL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_0258_CANDY_FACTORY, STR_027B_CONSTRUCT_CANDY_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 29, 40, STR_025B_TOY_SHOP, STR_027E_CONSTRUCT_TOY_SHOP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_025C_TOY_FACTORY, STR_027F_CONSTRUCT_TOY_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_025E_FIZZY_DRINK_FACTORY, STR_0281_CONSTRUCT_FIZZY_DRINK_FACTORY}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 71, 82, STR_0257_COTTON_CANDY_FOREST, STR_CONSTRUCT_COTTON_CANDY_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 84, 95, STR_0259_BATTERY_FARM, STR_CONSTRUCT_BATTERY_FARM_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 97, 108, STR_025A_COLA_WELLS, STR_CONSTRUCT_COLA_WELLS_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 110, 121, STR_025D_PLASTIC_FOUNTAINS, STR_CONSTRUCT_PLASTIC_FOUNTAINS_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 123, 134, STR_025F_BUBBLE_GENERATOR, STR_CONSTRUCT_BUBBLE_GENERATOR_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 136, 147, STR_0260_TOFFEE_QUARRY, STR_CONSTRUCT_TOFFEE_QUARRY_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 149, 160, STR_0261_SUGAR_MINE, STR_CONSTRUCT_SUGAR_MINE_TIP}, { WIDGETS_END}, }; @@ -420,14 +420,14 @@ static void UpdateIndustryProduction(Industry *i) } static const Widget _industry_view_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 9, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 9, 11, 247, 0, 13, STR_4801, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 9, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_IMGBTN, RESIZE_NONE, 9, 0, 259, 14, 105, 0x0, STR_NULL}, -{ WWT_6, RESIZE_NONE, 9, 2, 257, 16, 103, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 9, 0, 259, 106, 147, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 9, 0, 129, 148, 159, STR_00E4_LOCATION, STR_482C_CENTER_THE_MAIN_VIEW_ON}, -{ WWT_IMGBTN, RESIZE_NONE, 9, 130, 259, 148, 159, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 9, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 9, 11, 247, 0, 13, STR_4801, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_NONE, 9, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_IMGBTN, RESIZE_NONE, 9, 0, 259, 14, 105, 0x0, STR_NULL}, +{ WWT_6, RESIZE_NONE, 9, 2, 257, 16, 103, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 9, 0, 259, 106, 147, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 9, 0, 129, 148, 159, STR_00E4_LOCATION, STR_482C_CENTER_THE_MAIN_VIEW_ON}, +{ WWT_IMGBTN, RESIZE_NONE, 9, 130, 259, 148, 159, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -453,17 +453,17 @@ void ShowIndustryViewWindow(int industry) } static const Widget _industry_directory_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 13, 11, 495, 0, 13, STR_INDUSTRYDIR_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 13, 496, 507, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 100, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 101, 200, 14, 25, STR_SORT_BY_TYPE, STR_SORT_ORDER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 201, 300, 14, 25, STR_SORT_BY_PRODUCTION, STR_SORT_ORDER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 301, 400, 14, 25, STR_SORT_BY_TRANSPORTED, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 13, 401, 495, 14, 25, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_BOTTOM, 13, 0, 495, 26, 189, 0x0, STR_200A_TOWN_NAMES_CLICK_ON_NAME}, -{ WWT_SCROLLBAR, RESIZE_BOTTOM, 13, 496, 507, 14, 177, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_RESIZEBOX, RESIZE_TB, 13, 496, 507, 178, 189, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 13, 11, 495, 0, 13, STR_INDUSTRYDIR_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_NONE, 13, 496, 507, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 100, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 101, 200, 14, 25, STR_SORT_BY_TYPE, STR_SORT_ORDER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 201, 300, 14, 25, STR_SORT_BY_PRODUCTION, STR_SORT_ORDER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 301, 400, 14, 25, STR_SORT_BY_TRANSPORTED, STR_SORT_ORDER_TIP}, +{ WWT_PANEL, RESIZE_NONE, 13, 401, 495, 14, 25, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_BOTTOM, 13, 0, 495, 26, 189, 0x0, STR_200A_TOWN_NAMES_CLICK_ON_NAME}, +{ WWT_SCROLLBAR, RESIZE_BOTTOM, 13, 496, 507, 14, 177, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_RESIZEBOX, RESIZE_TB, 13, 496, 507, 178, 189, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; diff --git a/intro_gui.c b/intro_gui.c index 7704c3b3e..0b4c81743 100644 --- a/intro_gui.c +++ b/intro_gui.c @@ -15,24 +15,24 @@ #include "genworld.h" static const Widget _select_game_widgets[] = { -{ WWT_CAPTION, RESIZE_NONE, 13, 0, 335, 0, 13, STR_0307_OPENTTD, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 335, 14, 176, STR_NULL, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 22, 33, STR_0140_NEW_GAME, STR_02FB_START_A_NEW_GAME}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 22, 33, STR_0141_LOAD_GAME, STR_02FC_LOAD_A_SAVED_GAME}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 40, 51, STR_029A_PLAY_SCENARIO, STR_0303_START_A_NEW_GAME_USING}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 40, 51, STR_PLAY_HEIGHTMAP, STR_PLAY_HEIGHTMAP_HINT}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 58, 69, STR_0220_CREATE_SCENARIO,STR_02FE_CREATE_A_CUSTOMIZED_GAME}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 58, 69, STR_MULTIPLAYER, STR_0300_SELECT_MULTIPLAYER_GAME}, - -{ WWT_PANEL_2, RESIZE_NONE, 12, 10, 86, 77, 131, 0x1312, STR_030E_SELECT_TEMPERATE_LANDSCAPE}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 90, 166, 77, 131, 0x1314, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 170, 246, 77, 131, 0x1316, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE}, -{ WWT_PANEL_2, RESIZE_NONE, 12, 250, 326, 77, 131, 0x1318, STR_0311_SELECT_TOYLAND_LANDSCAPE}, - -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 139, 150, STR_0148_GAME_OPTIONS, STR_0301_DISPLAY_GAME_OPTIONS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 139, 150, STR_01FE_DIFFICULTY, STR_0302_DISPLAY_DIFFICULTY_OPTIONS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 157, 168, STR_CONFIG_PATCHES, STR_CONFIG_PATCHES_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 157, 168, STR_0304_QUIT, STR_0305_QUIT_OPENTTD}, +{ WWT_CAPTION, RESIZE_NONE, 13, 0, 335, 0, 13, STR_0307_OPENTTD, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 335, 14, 176, STR_NULL, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 22, 33, STR_0140_NEW_GAME, STR_02FB_START_A_NEW_GAME}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 22, 33, STR_0141_LOAD_GAME, STR_02FC_LOAD_A_SAVED_GAME}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 40, 51, STR_029A_PLAY_SCENARIO, STR_0303_START_A_NEW_GAME_USING}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 40, 51, STR_PLAY_HEIGHTMAP, STR_PLAY_HEIGHTMAP_HINT}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 58, 69, STR_0220_CREATE_SCENARIO, STR_02FE_CREATE_A_CUSTOMIZED_GAME}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 58, 69, STR_MULTIPLAYER, STR_0300_SELECT_MULTIPLAYER_GAME}, + +{ WWT_PANEL_2, RESIZE_NONE, 12, 10, 86, 77, 131, 0x1312, STR_030E_SELECT_TEMPERATE_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 90, 166, 77, 131, 0x1314, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 170, 246, 77, 131, 0x1316, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE}, +{ WWT_PANEL_2, RESIZE_NONE, 12, 250, 326, 77, 131, 0x1318, STR_0311_SELECT_TOYLAND_LANDSCAPE}, + +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 139, 150, STR_0148_GAME_OPTIONS, STR_0301_DISPLAY_GAME_OPTIONS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 139, 150, STR_01FE_DIFFICULTY, STR_0302_DISPLAY_DIFFICULTY_OPTIONS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 157, 168, STR_CONFIG_PATCHES, STR_CONFIG_PATCHES_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 157, 168, STR_0304_QUIT, STR_0305_QUIT_OPENTTD}, { WIDGETS_END }, }; diff --git a/landscape.c b/landscape.c index a1d5e2c4c..4926c4e6d 100644 --- a/landscape.c +++ b/landscape.c @@ -50,13 +50,13 @@ const TileTypeProcs * const _tile_type_procs[16] = { /* landscape slope => sprite */ const byte _tileh_to_sprite[32] = { - 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,0, - 0,0,0,0,0,0,0,16,0,0,0,17,0,15,18,0, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, + 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 17, 0, 15, 18, 0, }; const byte _inclined_tileh[] = { - SLOPE_SW, SLOPE_NW, SLOPE_SW, SLOPE_SE, SLOPE_NE, SLOPE_SE, SLOPE_NE, SLOPE_NW, - SLOPE_E, SLOPE_N, SLOPE_W, SLOPE_S, + SLOPE_SW, SLOPE_NW, SLOPE_SW, SLOPE_SE, SLOPE_NE, SLOPE_SE, SLOPE_NE, SLOPE_NW, + SLOPE_E, SLOPE_N, SLOPE_W, SLOPE_S, SLOPE_NWS, SLOPE_WSE, SLOPE_SEN, SLOPE_ENW }; @@ -445,8 +445,8 @@ void ConvertGroundTilesIntoWaterTiles(void) } } -static const byte _genterrain_tbl_1[5] = { 10, 22, 33, 37, 4 }; -static const byte _genterrain_tbl_2[5] = { 0, 0, 0, 0, 33 }; +static const byte _genterrain_tbl_1[5] = { 10, 22, 33, 37, 4 }; +static const byte _genterrain_tbl_2[5] = { 0, 0, 0, 0, 33 }; static void GenerateTerrain(int type, int flag) { diff --git a/main_gui.c b/main_gui.c index 23c9523ce..27fa04fe8 100644 --- a/main_gui.c +++ b/main_gui.c @@ -428,33 +428,33 @@ static void MenuClickHelp(int index) typedef void MenuClickedProc(int index); static MenuClickedProc * const _menu_clicked_procs[] = { - NULL, /* 0 */ - NULL, /* 1 */ - MenuClickSettings, /* 2 */ - MenuClickSaveLoad, /* 3 */ - MenuClickMap, /* 4 */ - MenuClickTown, /* 5 */ - MenuClickSubsidies, /* 6 */ - MenuClickStations, /* 7 */ - MenuClickFinances, /* 8 */ - MenuClickCompany, /* 9 */ - MenuClickGraphs, /* 10 */ - MenuClickLeague, /* 11 */ - MenuClickIndustry, /* 12 */ - MenuClickShowTrains, /* 13 */ - MenuClickShowRoad, /* 14 */ - MenuClickShowShips, /* 15 */ - MenuClickShowAir, /* 16 */ - MenuClickScenMap, /* 17 */ - NULL, /* 18 */ - MenuClickBuildRail, /* 19 */ - MenuClickBuildRoad, /* 20 */ - MenuClickBuildWater, /* 21 */ - MenuClickBuildAir, /* 22 */ - MenuClickForest, /* 23 */ + NULL, /* 0 */ + NULL, /* 1 */ + MenuClickSettings, /* 2 */ + MenuClickSaveLoad, /* 3 */ + MenuClickMap, /* 4 */ + MenuClickTown, /* 5 */ + MenuClickSubsidies, /* 6 */ + MenuClickStations, /* 7 */ + MenuClickFinances, /* 8 */ + MenuClickCompany, /* 9 */ + MenuClickGraphs, /* 10 */ + MenuClickLeague, /* 11 */ + MenuClickIndustry, /* 12 */ + MenuClickShowTrains, /* 13 */ + MenuClickShowRoad, /* 14 */ + MenuClickShowShips, /* 15 */ + MenuClickShowAir, /* 16 */ + MenuClickScenMap, /* 17 */ + NULL, /* 18 */ + MenuClickBuildRail, /* 19 */ + MenuClickBuildRoad, /* 20 */ + MenuClickBuildWater, /* 21 */ + MenuClickBuildAir, /* 22 */ + MenuClickForest, /* 23 */ MenuClickMusicWindow, /* 24 */ - MenuClickNewspaper, /* 25 */ - MenuClickHelp, /* 26 */ + MenuClickNewspaper, /* 25 */ + MenuClickHelp, /* 26 */ }; static void MenuWndProc(Window *w, WindowEvent *e) @@ -533,13 +533,13 @@ static void MenuWndProc(Window *w, WindowEvent *e) } static const Widget _menu_widgets[] = { -{ WWT_PANEL, RESIZE_NONE, 14, 0, 159, 0, 65535, 0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 159, 0, 65535, 0, STR_NULL}, { WIDGETS_END}, }; static const Widget _player_menu_widgets[] = { -{ WWT_PANEL, RESIZE_NONE, 14, 0, 240, 0, 81, 0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 240, 0, 81, 0, STR_NULL}, { WIDGETS_END}, }; @@ -1187,13 +1187,13 @@ static const Widget _scen_edit_land_gen_widgets[] = { static const int8 _multi_terraform_coords[][2] = { { 0, -2}, - { 4, 0},{ -4, 0},{ 0, 2}, - { -8, 2},{ -4, 4},{ 0, 6},{ 4, 4},{ 8, 2}, - {-12, 0},{ -8, -2},{ -4, -4},{ 0, -6},{ 4, -4},{ 8, -2},{ 12, 0}, - {-16, 2},{-12, 4},{ -8, 6},{ -4, 8},{ 0, 10},{ 4, 8},{ 8, 6},{ 12, 4},{ 16, 2}, - {-20, 0},{-16, -2},{-12, -4},{ -8, -6},{ -4, -8},{ 0,-10},{ 4, -8},{ 8, -6},{ 12, -4},{ 16, -2},{ 20, 0}, - {-24, 2},{-20, 4},{-16, 6},{-12, 8},{ -8, 10},{ -4, 12},{ 0, 14},{ 4, 12},{ 8, 10},{ 12, 8},{ 16, 6},{ 20, 4},{ 24, 2}, - {-28, 0},{-24, -2},{-20, -4},{-16, -6},{-12, -8},{ -8,-10},{ -4,-12},{ 0,-14},{ 4,-12},{ 8,-10},{ 12, -8},{ 16, -6},{ 20, -4},{ 24, -2},{ 28, 0}, + { 4, 0}, { -4, 0}, { 0, 2}, + { -8, 2}, { -4, 4}, { 0, 6}, { 4, 4}, { 8, 2}, + {-12, 0}, { -8, -2}, { -4, -4}, { 0, -6}, { 4, -4}, { 8, -2}, { 12, 0}, + {-16, 2}, {-12, 4}, { -8, 6}, { -4, 8}, { 0, 10}, { 4, 8}, { 8, 6}, { 12, 4}, { 16, 2}, + {-20, 0}, {-16, -2}, {-12, -4}, { -8, -6}, { -4, -8}, { 0,-10}, { 4, -8}, { 8, -6}, { 12, -4}, { 16, -2}, { 20, 0}, + {-24, 2}, {-20, 4}, {-16, 6}, {-12, 8}, { -8, 10}, { -4, 12}, { 0, 14}, { 4, 12}, { 8, 10}, { 12, 8}, { 16, 6}, { 20, 4}, { 24, 2}, + {-28, 0}, {-24, -2}, {-20, -4}, {-16, -6}, {-12, -8}, { -8,-10}, { -4,-12}, { 0,-14}, { 4,-12}, { 8,-10}, { 12, -8}, { 16, -6}, { 20, -4}, { 24, -2}, { 28, 0}, }; // TODO - Merge with terraform_gui.c (move there) after I have cooled down at its braindeadness @@ -1477,90 +1477,90 @@ static void ToolbarScenGenTown(Window *w) static const Widget _scenedit_industry_normal_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_023F_INDUSTRY_GENERATION, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 169, 14, 224, 0x0, STR_NULL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_MANY_RANDOM_INDUSTRIES, STR_RANDOM_INDUSTRIES_TIP}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0240_COAL_MINE, STR_0262_CONSTRUCT_COAL_MINE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0242_SAWMILL, STR_0264_CONSTRUCT_SAWMILL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81, 92, STR_0243_FOREST, STR_0265_PLANT_FOREST}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94, 105, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107, 118, STR_0245_OIL_RIG, STR_0267_CONSTRUCT_OIL_RIG_CAN_ONLY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120, 131, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133, 144, STR_0247_STEEL_MILL, STR_0269_CONSTRUCT_STEEL_MILL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146, 157, STR_0248_FARM, STR_026A_CONSTRUCT_FARM}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 159, 170, STR_0249_IRON_ORE_MINE, STR_026B_CONSTRUCT_IRON_ORE_MINE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 172, 183, STR_024A_OIL_WELLS, STR_026C_CONSTRUCT_OIL_WELLS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 185, 196, STR_024B_BANK, STR_026D_CONSTRUCT_BANK_CAN_ONLY}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_023F_INDUSTRY_GENERATION, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 169, 14, 224, 0x0, STR_NULL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_MANY_RANDOM_INDUSTRIES, STR_RANDOM_INDUSTRIES_TIP}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0240_COAL_MINE, STR_0262_CONSTRUCT_COAL_MINE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0242_SAWMILL, STR_0264_CONSTRUCT_SAWMILL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81, 92, STR_0243_FOREST, STR_0265_PLANT_FOREST}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94, 105, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107, 118, STR_0245_OIL_RIG, STR_0267_CONSTRUCT_OIL_RIG_CAN_ONLY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120, 131, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133, 144, STR_0247_STEEL_MILL, STR_0269_CONSTRUCT_STEEL_MILL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146, 157, STR_0248_FARM, STR_026A_CONSTRUCT_FARM}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 159, 170, STR_0249_IRON_ORE_MINE, STR_026B_CONSTRUCT_IRON_ORE_MINE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 172, 183, STR_024A_OIL_WELLS, STR_026C_CONSTRUCT_OIL_WELLS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 185, 196, STR_024B_BANK, STR_026D_CONSTRUCT_BANK_CAN_ONLY}, { WIDGETS_END}, }; static const Widget _scenedit_industry_hilly_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_023F_INDUSTRY_GENERATION, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 169, 14, 224, 0x0, STR_NULL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_MANY_RANDOM_INDUSTRIES, STR_RANDOM_INDUSTRIES_TIP}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0240_COAL_MINE, STR_0262_CONSTRUCT_COAL_MINE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_024C_PAPER_MILL, STR_026E_CONSTRUCT_PAPER_MILL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81, 92, STR_0243_FOREST, STR_0265_PLANT_FOREST}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94, 105, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107, 118, STR_024D_FOOD_PROCESSING_PLANT, STR_026F_CONSTRUCT_FOOD_PROCESSING}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120, 131, STR_024E_PRINTING_WORKS, STR_0270_CONSTRUCT_PRINTING_WORKS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133, 144, STR_024F_GOLD_MINE, STR_0271_CONSTRUCT_GOLD_MINE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146, 157, STR_0248_FARM, STR_026A_CONSTRUCT_FARM}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 159, 170, STR_024B_BANK, STR_0272_CONSTRUCT_BANK_CAN_ONLY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 172, 183, STR_024A_OIL_WELLS, STR_026C_CONSTRUCT_OIL_WELLS}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_023F_INDUSTRY_GENERATION, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 169, 14, 224, 0x0, STR_NULL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_MANY_RANDOM_INDUSTRIES, STR_RANDOM_INDUSTRIES_TIP}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0240_COAL_MINE, STR_0262_CONSTRUCT_COAL_MINE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0241_POWER_STATION, STR_0263_CONSTRUCT_POWER_STATION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_024C_PAPER_MILL, STR_026E_CONSTRUCT_PAPER_MILL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81, 92, STR_0243_FOREST, STR_0265_PLANT_FOREST}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94, 105, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107, 118, STR_024D_FOOD_PROCESSING_PLANT, STR_026F_CONSTRUCT_FOOD_PROCESSING}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120, 131, STR_024E_PRINTING_WORKS, STR_0270_CONSTRUCT_PRINTING_WORKS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133, 144, STR_024F_GOLD_MINE, STR_0271_CONSTRUCT_GOLD_MINE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146, 157, STR_0248_FARM, STR_026A_CONSTRUCT_FARM}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 159, 170, STR_024B_BANK, STR_0272_CONSTRUCT_BANK_CAN_ONLY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 172, 183, STR_024A_OIL_WELLS, STR_026C_CONSTRUCT_OIL_WELLS}, { WIDGETS_END}, }; static const Widget _scenedit_industry_desert_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_023F_INDUSTRY_GENERATION, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 169, 14, 224, 0x0, STR_NULL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_MANY_RANDOM_INDUSTRIES, STR_RANDOM_INDUSTRIES_TIP}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0250_LUMBER_MILL, STR_0273_CONSTRUCT_LUMBER_MILL_TO}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0251_FRUIT_PLANTATION, STR_0274_PLANT_FRUIT_PLANTATION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0252_RUBBER_PLANTATION,STR_0275_PLANT_RUBBER_PLANTATION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81, 92, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94, 105, STR_024D_FOOD_PROCESSING_PLANT, STR_026F_CONSTRUCT_FOOD_PROCESSING}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107, 118, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120, 131, STR_0253_WATER_SUPPLY, STR_0276_CONSTRUCT_WATER_SUPPLY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133, 144, STR_0248_FARM, STR_026A_CONSTRUCT_FARM}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146, 157, STR_0254_WATER_TOWER, STR_0277_CONSTRUCT_WATER_TOWER_CAN}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 159, 170, STR_024A_OIL_WELLS, STR_026C_CONSTRUCT_OIL_WELLS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 172, 183, STR_024B_BANK, STR_0272_CONSTRUCT_BANK_CAN_ONLY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 185, 196, STR_0255_DIAMOND_MINE, STR_0278_CONSTRUCT_DIAMOND_MINE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 198, 209, STR_0256_COPPER_ORE_MINE, STR_0279_CONSTRUCT_COPPER_ORE_MINE}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_023F_INDUSTRY_GENERATION, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 169, 14, 224, 0x0, STR_NULL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_MANY_RANDOM_INDUSTRIES, STR_RANDOM_INDUSTRIES_TIP}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0250_LUMBER_MILL, STR_0273_CONSTRUCT_LUMBER_MILL_TO}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0251_FRUIT_PLANTATION, STR_0274_PLANT_FRUIT_PLANTATION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0252_RUBBER_PLANTATION, STR_0275_PLANT_RUBBER_PLANTATION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81, 92, STR_0244_OIL_REFINERY, STR_0266_CONSTRUCT_OIL_REFINERY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94, 105, STR_024D_FOOD_PROCESSING_PLANT, STR_026F_CONSTRUCT_FOOD_PROCESSING}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107, 118, STR_0246_FACTORY, STR_0268_CONSTRUCT_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120, 131, STR_0253_WATER_SUPPLY, STR_0276_CONSTRUCT_WATER_SUPPLY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133, 144, STR_0248_FARM, STR_026A_CONSTRUCT_FARM}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146, 157, STR_0254_WATER_TOWER, STR_0277_CONSTRUCT_WATER_TOWER_CAN}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 159, 170, STR_024A_OIL_WELLS, STR_026C_CONSTRUCT_OIL_WELLS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 172, 183, STR_024B_BANK, STR_0272_CONSTRUCT_BANK_CAN_ONLY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 185, 196, STR_0255_DIAMOND_MINE, STR_0278_CONSTRUCT_DIAMOND_MINE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 198, 209, STR_0256_COPPER_ORE_MINE, STR_0279_CONSTRUCT_COPPER_ORE_MINE}, { WIDGETS_END}, }; static const Widget _scenedit_industry_candy_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_023F_INDUSTRY_GENERATION,STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 169, 14, 224, 0x0, STR_NULL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_MANY_RANDOM_INDUSTRIES, STR_RANDOM_INDUSTRIES_TIP}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0257_COTTON_CANDY_FOREST,STR_027A_PLANT_COTTON_CANDY_FOREST}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0258_CANDY_FACTORY, STR_027B_CONSTRUCT_CANDY_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0259_BATTERY_FARM, STR_027C_CONSTRUCT_BATTERY_FARM}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81, 92, STR_025A_COLA_WELLS, STR_027D_CONSTRUCT_COLA_WELLS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94, 105, STR_025B_TOY_SHOP, STR_027E_CONSTRUCT_TOY_SHOP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107, 118, STR_025C_TOY_FACTORY, STR_027F_CONSTRUCT_TOY_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120, 131, STR_025D_PLASTIC_FOUNTAINS, STR_0280_CONSTRUCT_PLASTIC_FOUNTAINS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133, 144, STR_025E_FIZZY_DRINK_FACTORY,STR_0281_CONSTRUCT_FIZZY_DRINK_FACTORY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146, 157, STR_025F_BUBBLE_GENERATOR, STR_0282_CONSTRUCT_BUBBLE_GENERATOR}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 159, 170, STR_0260_TOFFEE_QUARRY, STR_0283_CONSTRUCT_TOFFEE_QUARRY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 172, 183, STR_0261_SUGAR_MINE, STR_0284_CONSTRUCT_SUGAR_MINE}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 169, 0, 13, STR_023F_INDUSTRY_GENERATION, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 169, 14, 224, 0x0, STR_NULL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 16, 27, STR_MANY_RANDOM_INDUSTRIES, STR_RANDOM_INDUSTRIES_TIP}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 42, 53, STR_0257_COTTON_CANDY_FOREST, STR_027A_PLANT_COTTON_CANDY_FOREST}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 55, 66, STR_0258_CANDY_FACTORY, STR_027B_CONSTRUCT_CANDY_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 68, 79, STR_0259_BATTERY_FARM, STR_027C_CONSTRUCT_BATTERY_FARM}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 81, 92, STR_025A_COLA_WELLS, STR_027D_CONSTRUCT_COLA_WELLS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 94, 105, STR_025B_TOY_SHOP, STR_027E_CONSTRUCT_TOY_SHOP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 107, 118, STR_025C_TOY_FACTORY, STR_027F_CONSTRUCT_TOY_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 120, 131, STR_025D_PLASTIC_FOUNTAINS, STR_0280_CONSTRUCT_PLASTIC_FOUNTAINS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 133, 144, STR_025E_FIZZY_DRINK_FACTORY, STR_0281_CONSTRUCT_FIZZY_DRINK_FACTORY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 146, 157, STR_025F_BUBBLE_GENERATOR, STR_0282_CONSTRUCT_BUBBLE_GENERATOR}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 159, 170, STR_0260_TOFFEE_QUARRY, STR_0283_CONSTRUCT_TOFFEE_QUARRY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 167, 172, 183, STR_0261_SUGAR_MINE, STR_0284_CONSTRUCT_SUGAR_MINE}, { WIDGETS_END}, }; @@ -1603,9 +1603,9 @@ static bool TryBuildIndustry(TileIndex tile, int type) static const byte _industry_type_list[4][16] = { - {0, 1, 2, 3, 4, 5, 6, 8, 9, 18, 11, 12}, - {0, 1, 14, 3, 4, 13, 7, 15, 9, 16, 11, 12}, - {25, 19, 20, 4, 13, 23, 21, 24, 22, 11, 16, 17, 10}, + { 0, 1, 2, 3, 4, 5, 6, 8, 9, 18, 11, 12}, + { 0, 1, 14, 3, 4, 13, 7, 15, 9, 16, 11, 12}, + {25, 19, 20, 4, 13, 23, 21, 24, 22, 11, 16, 17, 10}, {26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36}, }; @@ -1874,15 +1874,15 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e) } static const Widget _toolb_normal_widgets[] = { -{ WWT_PANEL, RESIZE_NONE, 14, 0, 21, 0, 21, SPR_IMG_PAUSE, STR_0171_PAUSE_GAME}, -{ WWT_PANEL, RESIZE_NONE, 14, 22, 43, 0, 21, SPR_IMG_FASTFORWARD, STR_FAST_FORWARD}, -{ WWT_PANEL, RESIZE_NONE, 14, 44, 65, 0, 21, SPR_IMG_SETTINGS, STR_0187_OPTIONS}, -{ WWT_PANEL_2, RESIZE_NONE, 14, 66, 87, 0, 21, SPR_IMG_SAVE, STR_0172_SAVE_GAME_ABANDON_GAME}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 21, 0, 21, SPR_IMG_PAUSE, STR_0171_PAUSE_GAME}, +{ WWT_PANEL, RESIZE_NONE, 14, 22, 43, 0, 21, SPR_IMG_FASTFORWARD, STR_FAST_FORWARD}, +{ WWT_PANEL, RESIZE_NONE, 14, 44, 65, 0, 21, SPR_IMG_SETTINGS, STR_0187_OPTIONS}, +{ WWT_PANEL_2, RESIZE_NONE, 14, 66, 87, 0, 21, SPR_IMG_SAVE, STR_0172_SAVE_GAME_ABANDON_GAME}, -{ WWT_PANEL, RESIZE_NONE, 14, 96, 117, 0, 21, SPR_IMG_SMALLMAP, STR_0174_DISPLAY_MAP}, -{ WWT_PANEL, RESIZE_NONE, 14, 118, 139, 0, 21, SPR_IMG_TOWN, STR_0176_DISPLAY_TOWN_DIRECTORY}, -{ WWT_PANEL, RESIZE_NONE, 14, 140, 161, 0, 21, SPR_IMG_SUBSIDIES, STR_02DC_DISPLAY_SUBSIDIES}, -{ WWT_PANEL, RESIZE_NONE, 14, 162, 183, 0, 21, SPR_IMG_COMPANY_LIST, STR_0173_DISPLAY_LIST_OF_COMPANY}, +{ WWT_PANEL, RESIZE_NONE, 14, 96, 117, 0, 21, SPR_IMG_SMALLMAP, STR_0174_DISPLAY_MAP}, +{ WWT_PANEL, RESIZE_NONE, 14, 118, 139, 0, 21, SPR_IMG_TOWN, STR_0176_DISPLAY_TOWN_DIRECTORY}, +{ WWT_PANEL, RESIZE_NONE, 14, 140, 161, 0, 21, SPR_IMG_SUBSIDIES, STR_02DC_DISPLAY_SUBSIDIES}, +{ WWT_PANEL, RESIZE_NONE, 14, 162, 183, 0, 21, SPR_IMG_COMPANY_LIST, STR_0173_DISPLAY_LIST_OF_COMPANY}, { WWT_PANEL, RESIZE_NONE, 14, 191, 212, 0, 21, SPR_IMG_COMPANY_FINANCE, STR_0177_DISPLAY_COMPANY_FINANCES}, { WWT_PANEL, RESIZE_NONE, 14, 213, 235, 0, 21, SPR_IMG_COMPANY_GENERAL, STR_0178_DISPLAY_COMPANY_GENERAL}, @@ -1890,23 +1890,23 @@ static const Widget _toolb_normal_widgets[] = { { WWT_PANEL, RESIZE_NONE, 14, 258, 279, 0, 21, SPR_IMG_COMPANY_LEAGUE, STR_017A_DISPLAY_COMPANY_LEAGUE}, { WWT_PANEL, RESIZE_NONE, 14, 280, 301, 0, 21, SPR_IMG_INDUSTRY, STR_0312_FUND_CONSTRUCTION_OF_NEW}, -{ WWT_PANEL, RESIZE_NONE, 14, 310, 331, 0, 21, SPR_IMG_TRAINLIST, STR_017B_DISPLAY_LIST_OF_COMPANY}, -{ WWT_PANEL, RESIZE_NONE, 14, 332, 353, 0, 21, SPR_IMG_TRUCKLIST, STR_017C_DISPLAY_LIST_OF_COMPANY}, -{ WWT_PANEL, RESIZE_NONE, 14, 354, 375, 0, 21, SPR_IMG_SHIPLIST, STR_017D_DISPLAY_LIST_OF_COMPANY}, -{ WWT_PANEL, RESIZE_NONE, 14, 376, 397, 0, 21, SPR_IMG_AIRPLANESLIST, STR_017E_DISPLAY_LIST_OF_COMPANY}, +{ WWT_PANEL, RESIZE_NONE, 14, 310, 331, 0, 21, SPR_IMG_TRAINLIST, STR_017B_DISPLAY_LIST_OF_COMPANY}, +{ WWT_PANEL, RESIZE_NONE, 14, 332, 353, 0, 21, SPR_IMG_TRUCKLIST, STR_017C_DISPLAY_LIST_OF_COMPANY}, +{ WWT_PANEL, RESIZE_NONE, 14, 354, 375, 0, 21, SPR_IMG_SHIPLIST, STR_017D_DISPLAY_LIST_OF_COMPANY}, +{ WWT_PANEL, RESIZE_NONE, 14, 376, 397, 0, 21, SPR_IMG_AIRPLANESLIST, STR_017E_DISPLAY_LIST_OF_COMPANY}, -{ WWT_PANEL, RESIZE_NONE, 14, 406, 427, 0, 21, SPR_IMG_ZOOMIN, STR_017F_ZOOM_THE_VIEW_IN}, -{ WWT_PANEL, RESIZE_NONE, 14, 428, 449, 0, 21, SPR_IMG_ZOOMOUT, STR_0180_ZOOM_THE_VIEW_OUT}, +{ WWT_PANEL, RESIZE_NONE, 14, 406, 427, 0, 21, SPR_IMG_ZOOMIN, STR_017F_ZOOM_THE_VIEW_IN}, +{ WWT_PANEL, RESIZE_NONE, 14, 428, 449, 0, 21, SPR_IMG_ZOOMOUT, STR_0180_ZOOM_THE_VIEW_OUT}, -{ WWT_PANEL, RESIZE_NONE, 14, 457, 478, 0, 21, SPR_IMG_BUILDRAIL, STR_0181_BUILD_RAILROAD_TRACK}, -{ WWT_PANEL, RESIZE_NONE, 14, 479, 500, 0, 21, SPR_IMG_BUILDROAD, STR_0182_BUILD_ROADS}, -{ WWT_PANEL, RESIZE_NONE, 14, 501, 522, 0, 21, SPR_IMG_BUILDWATER, STR_0183_BUILD_SHIP_DOCKS}, -{ WWT_PANEL, RESIZE_NONE, 14, 523, 544, 0, 21, SPR_IMG_BUILDAIR, STR_0184_BUILD_AIRPORTS}, -{ WWT_PANEL, RESIZE_NONE, 14, 545, 566, 0, 21, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, // tree icon is 0x2E6 +{ WWT_PANEL, RESIZE_NONE, 14, 457, 478, 0, 21, SPR_IMG_BUILDRAIL, STR_0181_BUILD_RAILROAD_TRACK}, +{ WWT_PANEL, RESIZE_NONE, 14, 479, 500, 0, 21, SPR_IMG_BUILDROAD, STR_0182_BUILD_ROADS}, +{ WWT_PANEL, RESIZE_NONE, 14, 501, 522, 0, 21, SPR_IMG_BUILDWATER, STR_0183_BUILD_SHIP_DOCKS}, +{ WWT_PANEL, RESIZE_NONE, 14, 523, 544, 0, 21, SPR_IMG_BUILDAIR, STR_0184_BUILD_AIRPORTS}, +{ WWT_PANEL, RESIZE_NONE, 14, 545, 566, 0, 21, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, // tree icon is 0x2E6 -{ WWT_PANEL, RESIZE_NONE, 14, 574, 595, 0, 21, SPR_IMG_MUSIC, STR_01D4_SHOW_SOUND_MUSIC_WINDOW}, -{ WWT_PANEL, RESIZE_NONE, 14, 596, 617, 0, 21, SPR_IMG_MESSAGES, STR_0203_SHOW_LAST_MESSAGE_NEWS}, -{ WWT_PANEL, RESIZE_NONE, 14, 618, 639, 0, 21, SPR_IMG_QUERY, STR_0186_LAND_BLOCK_INFORMATION}, +{ WWT_PANEL, RESIZE_NONE, 14, 574, 595, 0, 21, SPR_IMG_MUSIC, STR_01D4_SHOW_SOUND_MUSIC_WINDOW}, +{ WWT_PANEL, RESIZE_NONE, 14, 596, 617, 0, 21, SPR_IMG_MESSAGES, STR_0203_SHOW_LAST_MESSAGE_NEWS}, +{ WWT_PANEL, RESIZE_NONE, 14, 618, 639, 0, 21, SPR_IMG_QUERY, STR_0186_LAND_BLOCK_INFORMATION}, { WIDGETS_END}, }; @@ -1943,16 +1943,16 @@ static const Widget _toolb_scen_widgets[] = { { WWT_PANEL, RESIZE_NONE, 14, 540, 561, 0, 21, SPR_IMG_PLANTTREES, STR_0288_PLANT_TREES}, { WWT_PANEL, RESIZE_NONE, 14, 562, 583, 0, 21, SPR_IMG_SIGN, STR_0289_PLACE_SIGN}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 596, 617, 0, 21, SPR_IMG_MUSIC, STR_01D4_SHOW_SOUND_MUSIC_WINDOW}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 618, 639, 0, 21, SPR_IMG_QUERY, STR_0186_LAND_BLOCK_INFORMATION}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 596, 617, 0, 21, SPR_IMG_MUSIC, STR_01D4_SHOW_SOUND_MUSIC_WINDOW}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 618, 639, 0, 21, SPR_IMG_QUERY, STR_0186_LAND_BLOCK_INFORMATION}, {WIDGETS_END}, }; @@ -81,7 +81,7 @@ enum { enum { TILE_SIZE = 16, /* Tiles are 16x16 "units" in size */ TILE_PIXELS = 32, /* a tile is 32x32 pixels */ - TILE_HEIGHT = 8, /* The standard height-difference between tiles on two levels is 8 (z-diff 8) */ + TILE_HEIGHT = 8, /* The standard height-difference between tiles on two levels is 8 (z-diff 8) */ }; @@ -268,26 +268,26 @@ static void Load_NAME(void) } static const SaveLoadGlobVarList _date_desc[] = { - SLEG_CONDVAR(_date, SLE_FILE_U16 | SLE_VAR_U32, 0, 30), - SLEG_CONDVAR(_date, SLE_UINT32, 31, SL_MAX_VERSION), - SLEG_VAR(_date_fract, SLE_UINT16), - SLEG_VAR(_tick_counter, SLE_UINT16), - SLEG_VAR(_vehicle_id_ctr_day, SLE_UINT16), - SLEG_VAR(_age_cargo_skip_counter,SLE_UINT8), - SLEG_VAR(_avail_aircraft, SLE_UINT8), - SLEG_CONDVAR(_cur_tileloop_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLEG_CONDVAR(_cur_tileloop_tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLEG_VAR(_disaster_delay, SLE_UINT16), - SLEG_VAR(_station_tick_ctr, SLE_UINT16), - SLEG_VAR(_random_seeds[0][0], SLE_UINT32), - SLEG_VAR(_random_seeds[0][1], SLE_UINT32), - SLEG_CONDVAR(_cur_town_ctr, SLE_FILE_U8 | SLE_VAR_U32, 0, 9), - SLEG_CONDVAR(_cur_town_ctr, SLE_UINT32, 10, SL_MAX_VERSION), - SLEG_VAR(_cur_player_tick_index, SLE_FILE_U8 | SLE_VAR_U32), - SLEG_VAR(_next_competitor_start, SLE_FILE_U16 | SLE_VAR_U32), - SLEG_VAR(_trees_tick_ctr, SLE_UINT8), - SLEG_CONDVAR(_pause, SLE_UINT8, 4, SL_MAX_VERSION), - SLEG_CONDVAR(_cur_town_iter, SLE_UINT32, 11, SL_MAX_VERSION), + SLEG_CONDVAR(_date, SLE_FILE_U16 | SLE_VAR_U32, 0, 30), + SLEG_CONDVAR(_date, SLE_UINT32, 31, SL_MAX_VERSION), + SLEG_VAR(_date_fract, SLE_UINT16), + SLEG_VAR(_tick_counter, SLE_UINT16), + SLEG_VAR(_vehicle_id_ctr_day, SLE_UINT16), + SLEG_VAR(_age_cargo_skip_counter, SLE_UINT8), + SLEG_VAR(_avail_aircraft, SLE_UINT8), + SLEG_CONDVAR(_cur_tileloop_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLEG_CONDVAR(_cur_tileloop_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLEG_VAR(_disaster_delay, SLE_UINT16), + SLEG_VAR(_station_tick_ctr, SLE_UINT16), + SLEG_VAR(_random_seeds[0][0], SLE_UINT32), + SLEG_VAR(_random_seeds[0][1], SLE_UINT32), + SLEG_CONDVAR(_cur_town_ctr, SLE_FILE_U8 | SLE_VAR_U32, 0, 9), + SLEG_CONDVAR(_cur_town_ctr, SLE_UINT32, 10, SL_MAX_VERSION), + SLEG_VAR(_cur_player_tick_index, SLE_FILE_U8 | SLE_VAR_U32), + SLEG_VAR(_next_competitor_start, SLE_FILE_U16 | SLE_VAR_U32), + SLEG_VAR(_trees_tick_ctr, SLE_UINT8), + SLEG_CONDVAR(_pause, SLE_UINT8, 4, SL_MAX_VERSION), + SLEG_CONDVAR(_cur_town_iter, SLE_UINT32, 11, SL_MAX_VERSION), SLEG_END() }; @@ -300,11 +300,11 @@ static void SaveLoad_DATE(void) static const SaveLoadGlobVarList _view_desc[] = { - SLEG_CONDVAR(_saved_scrollpos_x, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLEG_CONDVAR(_saved_scrollpos_x, SLE_INT32, 6, SL_MAX_VERSION), - SLEG_CONDVAR(_saved_scrollpos_y, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLEG_CONDVAR(_saved_scrollpos_y, SLE_INT32, 6, SL_MAX_VERSION), - SLEG_VAR(_saved_scrollpos_zoom,SLE_UINT8), + SLEG_CONDVAR(_saved_scrollpos_x, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLEG_CONDVAR(_saved_scrollpos_x, SLE_INT32, 6, SL_MAX_VERSION), + SLEG_CONDVAR(_saved_scrollpos_y, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLEG_CONDVAR(_saved_scrollpos_y, SLE_INT32, 6, SL_MAX_VERSION), + SLEG_VAR(_saved_scrollpos_zoom, SLE_UINT8), SLEG_END() }; @@ -579,17 +579,17 @@ static void Load_CHTS(void) const ChunkHandler _misc_chunk_handlers[] = { - { 'MAPS', Save_MAPS, Load_MAPS, CH_RIFF }, - { 'MAPT', Save_MAPT, Load_MAPT, CH_RIFF }, - { 'MAPO', Save_MAP1, Load_MAP1, CH_RIFF }, - { 'MAP2', Save_MAP2, Load_MAP2, CH_RIFF }, - { 'M3LO', Save_MAP3, Load_MAP3, CH_RIFF }, - { 'M3HI', Save_MAP4, Load_MAP4, CH_RIFF }, - { 'MAP5', Save_MAP5, Load_MAP5, CH_RIFF }, - { 'MAPE', Save_MAPE, Load_MAPE, CH_RIFF }, - - { 'NAME', Save_NAME, Load_NAME, CH_ARRAY}, + { 'MAPS', Save_MAPS, Load_MAPS, CH_RIFF }, + { 'MAPT', Save_MAPT, Load_MAPT, CH_RIFF }, + { 'MAPO', Save_MAP1, Load_MAP1, CH_RIFF }, + { 'MAP2', Save_MAP2, Load_MAP2, CH_RIFF }, + { 'M3LO', Save_MAP3, Load_MAP3, CH_RIFF }, + { 'M3HI', Save_MAP4, Load_MAP4, CH_RIFF }, + { 'MAP5', Save_MAP5, Load_MAP5, CH_RIFF }, + { 'MAPE', Save_MAPE, Load_MAPE, CH_RIFF }, + + { 'NAME', Save_NAME, Load_NAME, CH_ARRAY}, { 'DATE', SaveLoad_DATE, SaveLoad_DATE, CH_RIFF}, { 'VIEW', SaveLoad_VIEW, SaveLoad_VIEW, CH_RIFF}, - { 'CHTS', Save_CHTS, Load_CHTS, CH_RIFF | CH_LAST} + { 'CHTS', Save_CHTS, Load_CHTS, CH_RIFF | CH_LAST} }; diff --git a/misc_gui.c b/misc_gui.c index 5754e422a..a569ab500 100644 --- a/misc_gui.c +++ b/misc_gui.c @@ -126,9 +126,9 @@ static void LandInfoWndProc(Window *w, WindowEvent *e) } static const Widget _land_info_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 279, 0, 13, STR_01A3_LAND_AREA_INFORMATION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 279, 14, 92, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 279, 14, 92, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -277,10 +277,10 @@ static void AboutWindowProc(Window *w, WindowEvent *e) } static const Widget _about_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 419, 0, 13, STR_015B_OPENTTD, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 0, 419, 14, 271, 0x0, STR_NULL}, -{ WWT_FRAME, RESIZE_NONE, 14, 5, 414, 40, 245, STR_NULL, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 419, 0, 13, STR_015B_OPENTTD, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 419, 14, 271, 0x0, STR_NULL}, +{ WWT_FRAME, RESIZE_NONE, 14, 5, 414, 40, 245, STR_NULL, STR_NULL}, { WIDGETS_END}, }; @@ -302,10 +302,10 @@ void ShowAboutWindow(void) static int _tree_to_plant; static const uint32 _tree_sprites[] = { - 0x655,0x663,0x678,0x62B,0x647,0x639,0x64E,0x632,0x67F,0x68D,0x69B,0x6A9, - 0x6AF,0x6D2,0x6D9,0x6C4,0x6CB,0x6B6,0x6BD,0x6E0, - 0x72E,0x734,0x74A,0x74F,0x76B,0x78F,0x788,0x77B,0x75F,0x774,0x720,0x797, - 0x79E,0x7A5 | PALETTE_TO_GREEN,0x7AC | PALETTE_TO_RED,0x7B3,0x7BA,0x7C1 | PALETTE_TO_RED,0x7C8 | PALETTE_TO_PALE_GREEN,0x7CF | PALETTE_TO_YELLOW,0x7D6 | PALETTE_TO_RED + 0x655, 0x663, 0x678, 0x62B, 0x647, 0x639, 0x64E, 0x632, 0x67F, 0x68D, 0x69B, 0x6A9, + 0x6AF, 0x6D2, 0x6D9, 0x6C4, 0x6CB, 0x6B6, 0x6BD, 0x6E0, + 0x72E, 0x734, 0x74A, 0x74F, 0x76B, 0x78F, 0x788, 0x77B, 0x75F, 0x774, 0x720, 0x797, + 0x79E, 0x7A5 | PALETTE_TO_GREEN, 0x7AC | PALETTE_TO_RED, 0x7B3, 0x7BA, 0x7C1 | PALETTE_TO_RED, 0x7C8 | PALETTE_TO_PALE_GREEN, 0x7CF | PALETTE_TO_YELLOW, 0x7D6 | PALETTE_TO_RED }; static void BuildTreesWndProc(Window *w, WindowEvent *e) @@ -392,22 +392,22 @@ static void BuildTreesWndProc(Window *w, WindowEvent *e) } static const Widget _build_trees_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 142, 0, 13, STR_2802_TREES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 142, 14, 170, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 140, 157, 168, STR_TREES_RANDOM_TYPE, STR_TREES_RANDOM_TYPE_TIP}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 142, 0, 13, STR_2802_TREES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 142, 14, 170, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 140, 157, 168, STR_TREES_RANDOM_TYPE, STR_TREES_RANDOM_TYPE_TIP}, { WIDGETS_END}, }; @@ -420,23 +420,23 @@ static const WindowDesc _build_trees_desc = { }; static const Widget _build_trees_scen_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 142, 0, 13, STR_2802_TREES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 142, 14, 183, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 140, 157, 168, STR_TREES_RANDOM_TYPE, STR_TREES_RANDOM_TYPE_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 140, 170, 181, STR_028A_RANDOM_TREES, STR_028B_PLANT_TREES_RANDOMLY_OVER}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 142, 0, 13, STR_2802_TREES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 142, 14, 183, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 2, 35, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 37, 70, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 72, 105, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_PANEL, RESIZE_NONE, 14, 107, 140, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 140, 157, 168, STR_TREES_RANDOM_TYPE, STR_TREES_RANDOM_TYPE_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 2, 140, 170, 181, STR_028A_RANDOM_TREES, STR_028B_PLANT_TREES_RANDOMLY_OVER}, { WIDGETS_END}, }; @@ -465,16 +465,16 @@ static uint _errmsg_duration; static const Widget _errmsg_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 4, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 4, 11, 239, 0, 13, STR_00B2_MESSAGE, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 4, 0, 239, 14, 45, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 4, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 4, 11, 239, 0, 13, STR_00B2_MESSAGE, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 4, 0, 239, 14, 45, 0x0, STR_NULL}, { WIDGETS_END}, }; static const Widget _errmsg_face_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 4, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 4, 11, 333, 0, 13, STR_00B3_MESSAGE_FROM, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 4, 0, 333, 14, 136, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 4, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 4, 11, 333, 0, 13, STR_00B3_MESSAGE_FROM, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 4, 0, 333, 14, 136, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -1046,12 +1046,12 @@ press_ok:; } static const Widget _query_string_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 259, 0, 13, STR_012D, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 259, 14, 29, 0x0, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 0, 129, 30, 41, STR_012E_CANCEL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 130, 259, 30, 41, STR_012F_OK, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 257, 16, 27, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 259, 0, 13, STR_012D, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 259, 14, 29, 0x0, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 0, 129, 30, 41, STR_012E_CANCEL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 130, 259, 30, 41, STR_012F_OK, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 257, 16, 27, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -1167,80 +1167,80 @@ void ShowQuery(StringID caption, StringID message, void (*ok_cancel_callback)(bo static const Widget _load_dialog_1_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_4001_LOAD_GAME, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, -{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 293, 0x0, STR_NULL}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, -{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 291, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 281, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 282, 293, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_4001_LOAD_GAME, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, +{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 293, 0x0, STR_NULL}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, +{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 291, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 281, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 282, 293, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const Widget _load_dialog_2_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_0298_LOAD_SCENARIO, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, -{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 293, 0x0, STR_NULL}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, -{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 291, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 281, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 282, 293, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_0298_LOAD_SCENARIO, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, +{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 293, 0x0, STR_NULL}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, +{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 291, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 281, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 282, 293, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const Widget _load_dialog_3_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_4011_LOAD_HEIGHTMAP,STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, -{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 293, 0x0, STR_NULL}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, -{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 291, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 281, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 282, 293, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_4011_LOAD_HEIGHTMAP, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, +{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 293, 0x0, STR_NULL}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, +{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 291, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 281, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 282, 293, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const Widget _save_dialog_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_4000_SAVE_GAME, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, -{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 291, 0x0, STR_NULL}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, -{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 290, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 291, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_IMGBTN, RESIZE_RTB, 14, 0, 256, 292, 307, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_RTB, 14, 2, 254, 294, 305, 0x0, STR_400B_CURRENTLY_SELECTED_NAME}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 127, 308, 319, STR_4003_DELETE, STR_400C_DELETE_THE_CURRENTLY_SELECTED}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 128, 244, 308, 319, STR_4002_SAVE, STR_400D_SAVE_THE_CURRENT_GAME_USING}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 308, 319, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_4000_SAVE_GAME, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, +{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 291, 0x0, STR_NULL}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, +{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 290, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 291, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_IMGBTN, RESIZE_RTB, 14, 0, 256, 292, 307, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_RTB, 14, 2, 254, 294, 305, 0x0, STR_400B_CURRENTLY_SELECTED_NAME}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 127, 308, 319, STR_4003_DELETE, STR_400C_DELETE_THE_CURRENTLY_SELECTED}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 128, 244, 308, 319, STR_4002_SAVE, STR_400D_SAVE_THE_CURRENT_GAME_USING}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 308, 319, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const Widget _save_dialog_scen_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_0299_SAVE_SCENARIO, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, -{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 291, 0x0, STR_NULL}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, -{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 290, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 291, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_IMGBTN, RESIZE_RTB, 14, 0, 256, 292, 307, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_RTB, 14, 2, 254, 294, 305, 0x0, STR_400B_CURRENTLY_SELECTED_NAME}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 127, 308, 319, STR_4003_DELETE, STR_400C_DELETE_THE_CURRENTLY_SELECTED}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 128, 244, 308, 319, STR_4002_SAVE, STR_400D_SAVE_THE_CURRENT_GAME_USING}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 308, 319, 0x0, STR_RESIZE_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, +{ WWT_IMGBTN, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_RB, 14, 0, 256, 48, 291, 0x0, STR_NULL}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, +{ WWT_6, RESIZE_RB, 14, 2, 243, 50, 290, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 291, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_IMGBTN, RESIZE_RTB, 14, 0, 256, 292, 307, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_RTB, 14, 2, 254, 294, 305, 0x0, STR_400B_CURRENTLY_SELECTED_NAME}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 127, 308, 319, STR_4003_DELETE, STR_400C_DELETE_THE_CURRENTLY_SELECTED}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 128, 244, 308, 319, STR_4002_SAVE, STR_400D_SAVE_THE_CURRENT_GAME_USING}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 308, 319, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -1720,10 +1720,10 @@ static const CheatEntry _cheats_ui[] = { static const Widget _cheat_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 399, 0, 13, STR_CHEATS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 14, 0, 399, 14, 169, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 399, 14, 169, 0x0, STR_CHEATS_TIP}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 399, 0, 13, STR_CHEATS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 399, 14, 169, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 399, 14, 169, 0x0, STR_CHEATS_TIP}, { WIDGETS_END}, }; diff --git a/music_gui.c b/music_gui.c index dee4a6896..0c45218cd 100644 --- a/music_gui.c +++ b/music_gui.c @@ -299,19 +299,19 @@ static void MusicTrackSelectionWndProc(Window *w, WindowEvent *e) } static const Widget _music_track_selection_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5,STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 431, 0, 13, STR_01EB_MUSIC_PROGRAM_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 431, 14, 217, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 181, 22, 215, 0x0, STR_01FA_CLICK_ON_MUSIC_TRACK_TO}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 250, 429, 22, 215, 0x0, STR_CLICK_ON_TRACK_TO_REMOVE}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 44, 51, 0x0, STR_01F3_SELECT_ALL_TRACKS_PROGRAM}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 52, 59, 0x0, STR_01F4_SELECT_OLD_STYLE_MUSIC}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 60, 67, 0x0, STR_01F5_SELECT_NEW_STYLE_MUSIC}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 68, 75, 0x0, STR_0330_SELECT_EZY_STREET_STYLE}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 76, 83, 0x0, STR_01F6_SELECT_CUSTOM_1_USER_DEFINED}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 84, 91, 0x0, STR_01F7_SELECT_CUSTOM_2_USER_DEFINED}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 108, 115, 0x0, STR_01F8_CLEAR_CURRENT_PROGRAM_CUSTOM1}, -//{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 124, 131, 0x0, STR_01F9_SAVE_MUSIC_SETTINGS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 431, 14, 217, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 2, 181, 22, 215, 0x0, STR_01FA_CLICK_ON_MUSIC_TRACK_TO}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 250, 429, 22, 215, 0x0, STR_CLICK_ON_TRACK_TO_REMOVE}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 44, 51, 0x0, STR_01F3_SELECT_ALL_TRACKS_PROGRAM}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 52, 59, 0x0, STR_01F4_SELECT_OLD_STYLE_MUSIC}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 60, 67, 0x0, STR_01F5_SELECT_NEW_STYLE_MUSIC}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 68, 75, 0x0, STR_0330_SELECT_EZY_STREET_STYLE}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 76, 83, 0x0, STR_01F6_SELECT_CUSTOM_1_USER_DEFINED}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 84, 91, 0x0, STR_01F7_SELECT_CUSTOM_2_USER_DEFINED}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 108, 115, 0x0, STR_01F8_CLEAR_CURRENT_PROGRAM_CUSTOM1}, +//{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 186, 245, 124, 131, 0x0, STR_01F9_SAVE_MUSIC_SETTINGS}, { WIDGETS_END}, }; @@ -468,24 +468,24 @@ static void MusicWindowWndProc(Window *w, WindowEvent *e) } static const Widget _music_window_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 299, 0, 13, STR_01D2_JAZZ_JUKEBOX, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 0, 21, 14, 35, 0x2C5, STR_01DE_SKIP_TO_PREVIOUS_TRACK}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 22, 43, 14, 35, 0x2C6, STR_01DF_SKIP_TO_NEXT_TRACK_IN_SELECTION}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 44, 65, 14, 35, 0x2C7, STR_01E0_STOP_PLAYING_MUSIC}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 66, 87, 14, 35, 0x2C8, STR_01E1_START_PLAYING_MUSIC}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 88, 299, 14, 35, 0x0, STR_01E2_DRAG_SLIDERS_TO_SET_MUSIC}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 186, 201, 15, 34, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 299, 36, 57, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 59, 240, 45, 53, 0x0, STR_NULL}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 6, 55, 42, 49, 0x0, STR_01FB_TOGGLE_PROGRAM_SHUFFLE}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 244, 293, 42, 49, 0x0, STR_01FC_SHOW_MUSIC_TRACK_SELECTION}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 0, 49, 58, 65, 0x0, STR_01F3_SELECT_ALL_TRACKS_PROGRAM}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 50, 99, 58, 65, 0x0, STR_01F4_SELECT_OLD_STYLE_MUSIC}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 100, 149, 58, 65, 0x0, STR_01F5_SELECT_NEW_STYLE_MUSIC}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 150, 199, 58, 65, 0x0, STR_0330_SELECT_EZY_STREET_STYLE}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 200, 249, 58, 65, 0x0, STR_01F6_SELECT_CUSTOM_1_USER_DEFINED}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 250, 299, 58, 65, 0x0, STR_01F7_SELECT_CUSTOM_2_USER_DEFINED}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 0, 21, 14, 35, 0x2C5, STR_01DE_SKIP_TO_PREVIOUS_TRACK}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 22, 43, 14, 35, 0x2C6, STR_01DF_SKIP_TO_NEXT_TRACK_IN_SELECTION}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 44, 65, 14, 35, 0x2C7, STR_01E0_STOP_PLAYING_MUSIC}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 66, 87, 14, 35, 0x2C8, STR_01E1_START_PLAYING_MUSIC}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 88, 299, 14, 35, 0x0, STR_01E2_DRAG_SLIDERS_TO_SET_MUSIC}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 186, 201, 15, 34, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 299, 36, 57, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 59, 240, 45, 53, 0x0, STR_NULL}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 6, 55, 42, 49, 0x0, STR_01FB_TOGGLE_PROGRAM_SHUFFLE}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 244, 293, 42, 49, 0x0, STR_01FC_SHOW_MUSIC_TRACK_SELECTION}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 0, 49, 58, 65, 0x0, STR_01F3_SELECT_ALL_TRACKS_PROGRAM}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 50, 99, 58, 65, 0x0, STR_01F4_SELECT_OLD_STYLE_MUSIC}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 100, 149, 58, 65, 0x0, STR_01F5_SELECT_NEW_STYLE_MUSIC}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 150, 199, 58, 65, 0x0, STR_0330_SELECT_EZY_STREET_STYLE}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 200, 249, 58, 65, 0x0, STR_01F6_SELECT_CUSTOM_1_USER_DEFINED}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 250, 299, 58, 65, 0x0, STR_01F7_SELECT_CUSTOM_2_USER_DEFINED}, { WIDGETS_END}, }; @@ -46,15 +46,15 @@ #define NETWORK_STATION_TYPES 5 enum { - NETWORK_NAME_LENGTH = 80, - NETWORK_HOSTNAME_LENGTH = 80, - NETWORK_REVISION_LENGTH = 15, - NETWORK_PASSWORD_LENGTH = 20, + NETWORK_NAME_LENGTH = 80, + NETWORK_HOSTNAME_LENGTH = 80, + NETWORK_REVISION_LENGTH = 15, + NETWORK_PASSWORD_LENGTH = 20, NETWORK_PLAYERS_LENGTH = 200, - NETWORK_CLIENT_NAME_LENGTH = 25, + NETWORK_CLIENT_NAME_LENGTH = 25, NETWORK_RCONCOMMAND_LENGTH = 500, - NETWORK_NUM_LANGUAGES = 4, + NETWORK_NUM_LANGUAGES = 4, }; // This is the struct used by both client and server @@ -87,36 +87,36 @@ typedef struct NetworkGameInfo { } NetworkGameInfo; typedef struct NetworkPlayerInfo { - char company_name[NETWORK_NAME_LENGTH]; // Company name - char password[NETWORK_PASSWORD_LENGTH]; // The password for the player - Year inaugurated_year; // What year the company started in - int64 company_value; // The company value - int64 money; // The amount of money the company has - int64 income; // How much did the company earned last year - uint16 performance; // What was his performance last month? - byte use_password; // 0: No password 1: There is a password - uint16 num_vehicle[NETWORK_VEHICLE_TYPES]; // How many vehicles are there of this type? - uint16 num_station[NETWORK_STATION_TYPES]; // How many stations are there of this type? - char players[NETWORK_PLAYERS_LENGTH]; // The players that control this company (Name1, name2, ..) - uint16 months_empty; // How many months the company is empty + char company_name[NETWORK_NAME_LENGTH]; // Company name + char password[NETWORK_PASSWORD_LENGTH]; // The password for the player + Year inaugurated_year; // What year the company started in + int64 company_value; // The company value + int64 money; // The amount of money the company has + int64 income; // How much did the company earned last year + uint16 performance; // What was his performance last month? + byte use_password; // 0: No password 1: There is a password + uint16 num_vehicle[NETWORK_VEHICLE_TYPES]; // How many vehicles are there of this type? + uint16 num_station[NETWORK_STATION_TYPES]; // How many stations are there of this type? + char players[NETWORK_PLAYERS_LENGTH]; // The players that control this company (Name1, name2, ..) + uint16 months_empty; // How many months the company is empty } NetworkPlayerInfo; typedef struct NetworkClientInfo { - uint16 client_index; /// Index of the client (same as ClientState->index) - char client_name[NETWORK_CLIENT_NAME_LENGTH]; /// Name of the client - byte client_lang; /// The language of the client - byte client_playas; /// As which player is this client playing (PlayerID) - uint32 client_ip; /// IP-address of the client (so he can be banned) - Date join_date; /// Gamedate the player has joined - char unique_id[NETWORK_NAME_LENGTH]; /// Every play sends an unique id so we can indentify him + uint16 client_index; // Index of the client (same as ClientState->index) + char client_name[NETWORK_CLIENT_NAME_LENGTH]; // Name of the client + byte client_lang; // The language of the client + byte client_playas; // As which player is this client playing (PlayerID) + uint32 client_ip; // IP-address of the client (so he can be banned) + Date join_date; // Gamedate the player has joined + char unique_id[NETWORK_NAME_LENGTH]; // Every play sends an unique id so we can indentify him } NetworkClientInfo; typedef struct NetworkGameList { NetworkGameInfo info; uint32 ip; uint16 port; - bool online; // False if the server did not respond (default status) - bool manually; // True if the server was added manually + bool online; // False if the server did not respond (default status) + bool manually; // True if the server was added manually struct NetworkGameList *next; } NetworkGameList; @@ -133,10 +133,10 @@ typedef enum { // language ids for server_lang and client_lang typedef enum { - NETLANG_ANY = 0, + NETLANG_ANY = 0, NETLANG_ENGLISH = 1, - NETLANG_GERMAN = 2, - NETLANG_FRENCH = 3, + NETLANG_GERMAN = 2, + NETLANG_FRENCH = 3, } NetworkLanguage; VARDEF NetworkGameList *_network_game_list; diff --git a/network_gui.c b/network_gui.c index 32624bd68..9a20af805 100644 --- a/network_gui.c +++ b/network_gui.c @@ -508,34 +508,34 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e) } static const Widget _network_game_window_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, BGC, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, BGC, 11, 549, 0, 13, STR_NETWORK_MULTIPLAYER, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, BGC, 0, 549, 14, 249, STR_NULL, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, BGC, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, BGC, 11, 549, 0, 13, STR_NETWORK_MULTIPLAYER, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, BGC, 0, 549, 14, 249, STR_NULL, STR_NULL}, /* LEFT SIDE */ -{ WWT_IMGBTN, RESIZE_NONE, BGC, 310, 461, 22, 33, STR_NULL, STR_NETWORK_ENTER_NAME_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, BGC, 310, 461, 22, 33, STR_NULL, STR_NETWORK_ENTER_NAME_TIP}, -{ WWT_6, RESIZE_NONE, BGC, 90, 181, 22, 33, STR_NETWORK_COMBO1, STR_NETWORK_CONNECTION_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, BGC, 170, 180, 23, 32, STR_0225, STR_NETWORK_CONNECTION_TIP}, +{ WWT_6, RESIZE_NONE, BGC, 90, 181, 22, 33, STR_NETWORK_COMBO1, STR_NETWORK_CONNECTION_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, BGC, 170, 180, 23, 32, STR_0225, STR_NETWORK_CONNECTION_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 10, 170, 42, 53, STR_NETWORK_GAME_NAME, STR_NETWORK_GAME_NAME_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 171, 250, 42, 53, STR_NETWORK_CLIENTS_CAPTION,STR_NETWORK_CLIENTS_CAPTION_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 251, 290, 42, 53, STR_EMPTY, STR_NETWORK_INFO_ICONS_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 10, 170, 42, 53, STR_NETWORK_GAME_NAME, STR_NETWORK_GAME_NAME_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 171, 250, 42, 53, STR_NETWORK_CLIENTS_CAPTION, STR_NETWORK_CLIENTS_CAPTION_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 251, 290, 42, 53, STR_EMPTY, STR_NETWORK_INFO_ICONS_TIP}, -{ WWT_MATRIX, RESIZE_NONE, BGC, 10, 290, 54, 222, (12 << 8) + 1, STR_NETWORK_CLICK_GAME_TO_SELECT}, -{ WWT_SCROLLBAR, RESIZE_NONE, BGC, 291, 302, 42, 222, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_MATRIX, RESIZE_NONE, BGC, 10, 290, 54, 222, (12 << 8) + 1, STR_NETWORK_CLICK_GAME_TO_SELECT}, +{ WWT_SCROLLBAR, RESIZE_NONE, BGC, 291, 302, 42, 222, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 30, 130, 232, 243, STR_NETWORK_FIND_SERVER, STR_NETWORK_FIND_SERVER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 180, 280, 232, 243, STR_NETWORK_ADD_SERVER, STR_NETWORK_ADD_SERVER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 30, 130, 232, 243, STR_NETWORK_FIND_SERVER, STR_NETWORK_FIND_SERVER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 180, 280, 232, 243, STR_NETWORK_ADD_SERVER, STR_NETWORK_ADD_SERVER_TIP}, /* RIGHT SIDE */ -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 315, 415, 232, 243, STR_NETWORK_START_SERVER, STR_NETWORK_START_SERVER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 430, 535, 232, 243, STR_012E_CANCEL, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 315, 415, 232, 243, STR_NETWORK_START_SERVER, STR_NETWORK_START_SERVER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 430, 535, 232, 243, STR_012E_CANCEL, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, BGC, 310, 540, 42, 222, STR_NULL, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, BGC, 310, 540, 42, 222, STR_NULL, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 315, 415, 201, 212, STR_NETWORK_JOIN_GAME, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 430, 535, 201, 212, STR_NETWORK_REFRESH, STR_NETWORK_REFRESH_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 315, 415, 201, 212, STR_NETWORK_JOIN_GAME, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 430, 535, 201, 212, STR_NETWORK_REFRESH, STR_NETWORK_REFRESH_TIP}, { WIDGETS_END}, }; @@ -744,30 +744,30 @@ static void NetworkStartServerWindowWndProc(Window *w, WindowEvent *e) } static const Widget _network_start_server_window_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, BGC, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, -{ WWT_CAPTION, RESIZE_NONE, BGC, 11, 419, 0, 13, STR_NETWORK_START_GAME_WINDOW, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, BGC, 0, 419, 14, 243, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, BGC, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_NONE, BGC, 11, 419, 0, 13, STR_NETWORK_START_GAME_WINDOW, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, BGC, 0, 419, 14, 243, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, BGC, 100, 272, 22, 33, 0x0, STR_NETWORK_NEW_GAME_NAME_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 285, 405, 22, 33, STR_NETWORK_SET_PASSWORD, STR_NETWORK_PASSWORD_TIP}, +{ WWT_IMGBTN, RESIZE_NONE, BGC, 100, 272, 22, 33, 0x0, STR_NETWORK_NEW_GAME_NAME_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 285, 405, 22, 33, STR_NETWORK_SET_PASSWORD, STR_NETWORK_PASSWORD_TIP}, -{ WWT_6, RESIZE_NONE, BGC, 10, 271, 62, 216, 0x0, STR_NETWORK_SELECT_MAP_TIP}, -{ WWT_SCROLLBAR, RESIZE_NONE, BGC, 259, 270, 63, 215, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_6, RESIZE_NONE, BGC, 10, 271, 62, 216, 0x0, STR_NETWORK_SELECT_MAP_TIP}, +{ WWT_SCROLLBAR, RESIZE_NONE, BGC, 259, 270, 63, 215, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, /* Combo boxes to control Connection Type / Max Clients / Max Companies / Max Observers / Language */ -{ WWT_6, RESIZE_NONE, BGC, 280, 410, 77, 88, STR_NETWORK_COMBO1, STR_NETWORK_CONNECTION_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 78, 87, STR_0225, STR_NETWORK_CONNECTION_TIP}, -{ WWT_6, RESIZE_NONE, BGC, 280, 410, 109, 120, STR_NETWORK_COMBO2, STR_NETWORK_NUMBER_OF_CLIENTS_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 110, 119, STR_0225, STR_NETWORK_NUMBER_OF_CLIENTS_TIP}, -{ WWT_6, RESIZE_NONE, BGC, 280, 410, 141, 152, STR_NETWORK_COMBO3, STR_NETWORK_NUMBER_OF_COMPANIES_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 142, 151, STR_0225, STR_NETWORK_NUMBER_OF_COMPANIES_TIP}, -{ WWT_6, RESIZE_NONE, BGC, 280, 410, 173, 184, STR_NETWORK_COMBO4, STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 174, 183, STR_0225, STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, -{ WWT_6, RESIZE_NONE, BGC, 280, 410, 205, 216, STR_NETWORK_COMBO5, STR_NETWORK_LANGUAGE_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 206, 215, STR_0225, STR_NETWORK_LANGUAGE_TIP}, - -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 40, 140, 224, 235, STR_NETWORK_START_GAME, STR_NETWORK_START_GAME_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 150, 250, 224, 235, STR_NETWORK_LOAD_GAME, STR_NETWORK_LOAD_GAME_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 260, 360, 224, 235, STR_012E_CANCEL, STR_NULL}, +{ WWT_6, RESIZE_NONE, BGC, 280, 410, 77, 88, STR_NETWORK_COMBO1, STR_NETWORK_CONNECTION_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 78, 87, STR_0225, STR_NETWORK_CONNECTION_TIP}, +{ WWT_6, RESIZE_NONE, BGC, 280, 410, 109, 120, STR_NETWORK_COMBO2, STR_NETWORK_NUMBER_OF_CLIENTS_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 110, 119, STR_0225, STR_NETWORK_NUMBER_OF_CLIENTS_TIP}, +{ WWT_6, RESIZE_NONE, BGC, 280, 410, 141, 152, STR_NETWORK_COMBO3, STR_NETWORK_NUMBER_OF_COMPANIES_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 142, 151, STR_0225, STR_NETWORK_NUMBER_OF_COMPANIES_TIP}, +{ WWT_6, RESIZE_NONE, BGC, 280, 410, 173, 184, STR_NETWORK_COMBO4, STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 174, 183, STR_0225, STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, +{ WWT_6, RESIZE_NONE, BGC, 280, 410, 205, 216, STR_NETWORK_COMBO5, STR_NETWORK_LANGUAGE_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, BGC, 399, 409, 206, 215, STR_0225, STR_NETWORK_LANGUAGE_TIP}, + +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 40, 140, 224, 235, STR_NETWORK_START_GAME, STR_NETWORK_START_GAME_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 150, 250, 224, 235, STR_NETWORK_LOAD_GAME, STR_NETWORK_LOAD_GAME_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 260, 360, 224, 235, STR_012E_CANCEL, STR_NULL}, { WIDGETS_END}, }; @@ -963,24 +963,24 @@ static void NetworkLobbyWindowWndProc(Window *w, WindowEvent *e) } static const Widget _network_lobby_window_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, BGC, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, -{ WWT_CAPTION, RESIZE_NONE, BGC, 11, 419, 0, 13, STR_NETWORK_GAME_LOBBY, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, BGC, 0, 419, 14, 234, STR_NULL, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, BGC, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_NONE, BGC, 11, 419, 0, 13, STR_NETWORK_GAME_LOBBY, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, BGC, 0, 419, 14, 234, STR_NULL, STR_NULL}, // company list -{ WWT_PANEL, RESIZE_NONE, BTC, 10, 155, 38, 49, STR_NULL, STR_NULL}, -{ WWT_MATRIX, RESIZE_NONE, BGC, 10, 155, 50, 190, (10 << 8) + 1, STR_NETWORK_COMPANY_LIST_TIP}, -{ WWT_SCROLLBAR, RESIZE_NONE, BGC, 156, 167, 38, 190, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PANEL, RESIZE_NONE, BTC, 10, 155, 38, 49, STR_NULL, STR_NULL}, +{ WWT_MATRIX, RESIZE_NONE, BGC, 10, 155, 50, 190, (10 << 8) + 1, STR_NETWORK_COMPANY_LIST_TIP}, +{ WWT_SCROLLBAR, RESIZE_NONE, BGC, 156, 167, 38, 190, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, // company/player info -{ WWT_PANEL, RESIZE_NONE, BGC, 173, 404, 38, 190, STR_NULL, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, BGC, 173, 404, 38, 190, STR_NULL, STR_NULL}, // buttons -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 10, 151, 200, 211, STR_NETWORK_JOIN_COMPANY, STR_NETWORK_JOIN_COMPANY_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 10, 151, 215, 226, STR_NETWORK_NEW_COMPANY, STR_NETWORK_NEW_COMPANY_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 158, 268, 200, 211, STR_NETWORK_SPECTATE_GAME,STR_NETWORK_SPECTATE_GAME_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 158, 268, 215, 226, STR_NETWORK_REFRESH, STR_NETWORK_REFRESH_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 278, 388, 200, 211, STR_012E_CANCEL, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 10, 151, 200, 211, STR_NETWORK_JOIN_COMPANY, STR_NETWORK_JOIN_COMPANY_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 10, 151, 215, 226, STR_NETWORK_NEW_COMPANY, STR_NETWORK_NEW_COMPANY_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 158, 268, 200, 211, STR_NETWORK_SPECTATE_GAME, STR_NETWORK_SPECTATE_GAME_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 158, 268, 215, 226, STR_NETWORK_REFRESH, STR_NETWORK_REFRESH_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 278, 388, 200, 211, STR_012E_CANCEL, STR_NULL}, { WIDGETS_END}, }; @@ -1045,7 +1045,7 @@ static const Widget _client_list_widgets[] = { }; static const Widget _client_list_popup_widgets[] = { -{ WWT_PANEL, RESIZE_NONE, 14, 0, 99, 0, 0, 0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 99, 0, 0, 0, STR_NULL}, { WIDGETS_END}, }; @@ -1443,9 +1443,9 @@ static void NetworkJoinStatusWindowWndProc(Window *w, WindowEvent *e) } static const Widget _network_join_status_window_widget[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 249, 0, 13, STR_NETWORK_CONNECTING, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 249, 14, 84, 0x0,STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 249, 14, 84, 0x0, STR_NULL}, { WWT_PUSHTXTBTN, RESIZE_NONE, BTC, 75, 175, 69, 80, STR_NETWORK_DISCONNECT, STR_NULL}, { WIDGETS_END}, }; diff --git a/network_udp.c b/network_udp.c index aacf53372..5ec1f2376 100644 --- a/network_udp.c +++ b/network_udp.c @@ -26,19 +26,19 @@ typedef enum { PACKET_UDP_CLIENT_FIND_SERVER, PACKET_UDP_SERVER_RESPONSE, PACKET_UDP_CLIENT_DETAIL_INFO, - PACKET_UDP_SERVER_DETAIL_INFO, // Is not used in OpenTTD itself, only for external querying - PACKET_UDP_SERVER_REGISTER, // Packet to register itself to the master server - PACKET_UDP_MASTER_ACK_REGISTER, // Packet indicating registration has succedeed - PACKET_UDP_CLIENT_GET_LIST, // Request for serverlist from master server + PACKET_UDP_SERVER_DETAIL_INFO, // Is not used in OpenTTD itself, only for external querying + PACKET_UDP_SERVER_REGISTER, // Packet to register itself to the master server + PACKET_UDP_MASTER_ACK_REGISTER, // Packet indicating registration has succedeed + PACKET_UDP_CLIENT_GET_LIST, // Request for serverlist from master server PACKET_UDP_MASTER_RESPONSE_LIST, // Response from master server with server ip's + port's - PACKET_UDP_SERVER_UNREGISTER, // Request to be removed from the server-list + PACKET_UDP_SERVER_UNREGISTER, // Request to be removed from the server-list PACKET_UDP_END } PacketUDPType; enum { ADVERTISE_NORMAL_INTERVAL = 30000, // interval between advertising in ticks (15 minutes) - ADVERTISE_RETRY_INTERVAL = 300, // readvertise when no response after this many ticks (9 seconds) - ADVERTISE_RETRY_TIMES = 3 // give up readvertising after this much failed retries + ADVERTISE_RETRY_INTERVAL = 300, // readvertise when no response after this many ticks (9 seconds) + ADVERTISE_RETRY_TIMES = 3 // give up readvertising after this much failed retries }; #define DEF_UDP_RECEIVE_COMMAND(type) void NetworkPacketReceive_ ## type ## _command(Packet *p, struct sockaddr_in *client_addr) diff --git a/newgrf_cargo.c b/newgrf_cargo.c index 38b2a5a3a..386f8c384 100644 --- a/newgrf_cargo.c +++ b/newgrf_cargo.c @@ -9,10 +9,10 @@ * the custom GRF files. It is basically just a transcribed table from TTDPatch's newgrf.txt. */ const CargoID _global_cargo_id[NUM_LANDSCAPE][NUM_CARGO] = { - /* LT_NORMAL */ {GC_PASSENGERS, GC_COAL, GC_MAIL, GC_OIL, GC_LIVESTOCK, GC_GOODS, GC_GRAIN, GC_WOOD, GC_IRON_ORE, GC_STEEL, GC_VALUABLES, GC_PAPER_TEMP}, - /* LT_HILLY */ {GC_PASSENGERS, GC_COAL, GC_MAIL, GC_OIL, GC_LIVESTOCK, GC_GOODS, GC_GRAIN, GC_WOOD, GC_INVALID, GC_PAPER, GC_VALUABLES, GC_FOOD }, - /* LT_DESERT */ {GC_PASSENGERS, GC_RUBBER,GC_MAIL, GC_OIL, GC_FRUIT, GC_GOODS, GC_GRAIN, GC_WOOD, GC_COPPER_ORE, GC_WATER, GC_VALUABLES, GC_FOOD }, - /* LT_CANDY */ {GC_PASSENGERS, GC_SUGAR, GC_MAIL, GC_TOYS,GC_BATTERIES, GC_CANDY, GC_TOFFEE,GC_COLA, GC_COTTON_CANDY,GC_BUBBLES,GC_PLASTIC, GC_FIZZY_DRINKS }, + /* LT_NORMAL */ {GC_PASSENGERS, GC_COAL, GC_MAIL, GC_OIL, GC_LIVESTOCK, GC_GOODS, GC_GRAIN, GC_WOOD, GC_IRON_ORE, GC_STEEL, GC_VALUABLES, GC_PAPER_TEMP}, + /* LT_HILLY */ {GC_PASSENGERS, GC_COAL, GC_MAIL, GC_OIL, GC_LIVESTOCK, GC_GOODS, GC_GRAIN, GC_WOOD, GC_INVALID, GC_PAPER, GC_VALUABLES, GC_FOOD }, + /* LT_DESERT */ {GC_PASSENGERS, GC_RUBBER, GC_MAIL, GC_OIL, GC_FRUIT, GC_GOODS, GC_GRAIN, GC_WOOD, GC_COPPER_ORE, GC_WATER, GC_VALUABLES, GC_FOOD }, + /* LT_CANDY */ {GC_PASSENGERS, GC_SUGAR, GC_MAIL, GC_TOYS, GC_BATTERIES, GC_CANDY, GC_TOFFEE, GC_COLA, GC_COTTON_CANDY, GC_BUBBLES, GC_PLASTIC, GC_FIZZY_DRINKS }, /** * - GC_INVALID (255) means that cargo is not available for that climate * - GC_PAPER_TEMP (27) is paper in temperate climate in TTDPatch @@ -25,11 +25,11 @@ const CargoID _global_cargo_id[NUM_LANDSCAPE][NUM_CARGO] = { /** BEGIN --- TRANSLATE FROM GLOBAL CARGO TO LOCAL CARGO ID'S **/ /** Map global cargo ID's to local-cargo ID's */ const CargoID _local_cargo_id_ctype[NUM_GLOBAL_CID] = { - CT_PASSENGERS,CT_COAL, CT_MAIL, CT_OIL, CT_LIVESTOCK,CT_GOODS, CT_GRAIN, CT_WOOD, /* 0- 7 */ - CT_IRON_ORE, CT_STEEL, CT_VALUABLES, CT_PAPER, CT_FOOD, CT_FRUIT, CT_COPPER_ORE, CT_WATER, /* 8-15 */ - CT_RUBBER, CT_SUGAR, CT_TOYS, CT_BATTERIES,CT_CANDY, CT_TOFFEE, CT_COLA, CT_COTTON_CANDY, /* 16-23 */ - CT_BUBBLES, CT_PLASTIC,CT_FIZZY_DRINKS,CT_PAPER /* unsup. */,CT_HILLY_UNUSED, /* 24-28 */ - CT_INVALID, CT_INVALID /* 29-30 */ + CT_PASSENGERS, CT_COAL, CT_MAIL, CT_OIL, CT_LIVESTOCK, CT_GOODS, CT_GRAIN, CT_WOOD, /* 0- 7 */ + CT_IRON_ORE, CT_STEEL, CT_VALUABLES, CT_PAPER, CT_FOOD, CT_FRUIT, CT_COPPER_ORE, CT_WATER, /* 8-15 */ + CT_RUBBER, CT_SUGAR, CT_TOYS, CT_BATTERIES, CT_CANDY, CT_TOFFEE, CT_COLA, CT_COTTON_CANDY, /* 16-23 */ + CT_BUBBLES, CT_PLASTIC, CT_FIZZY_DRINKS, CT_PAPER /* unsup. */, CT_HILLY_UNUSED, /* 24-28 */ + CT_INVALID, CT_INVALID /* 29-30 */ }; /** Bitmasked value where the global cargo ID is available in landscape @@ -37,17 +37,13 @@ const CargoID _local_cargo_id_ctype[NUM_GLOBAL_CID] = { #define MC(cargo) (1 << cargo) const uint32 _landscape_global_cargo_mask[NUM_LANDSCAPE] = { /* LT_NORMAL: temperate */ - MC(GC_PASSENGERS)|MC(GC_COAL)|MC(GC_MAIL)|MC(GC_OIL)|MC(GC_LIVESTOCK)|MC(GC_GOODS)|MC(GC_GRAIN)|MC(GC_WOOD)| - MC(GC_IRON_ORE)|MC(GC_STEEL)|MC(GC_VALUABLES), + MC(GC_PASSENGERS) | MC(GC_COAL) | MC(GC_MAIL) | MC(GC_OIL) | MC(GC_LIVESTOCK) | MC(GC_GOODS) | MC(GC_GRAIN) | MC(GC_WOOD) | MC(GC_IRON_ORE) | MC(GC_STEEL) | MC(GC_VALUABLES), /* LT_HILLY: arctic */ - MC(GC_PASSENGERS)|MC(GC_COAL)|MC(GC_MAIL)|MC(GC_OIL)|MC(GC_LIVESTOCK)|MC(GC_GOODS)| - MC(GC_GRAIN)|MC(GC_WOOD)|MC(GC_VALUABLES)|MC(GC_PAPER)|MC(GC_FOOD), + MC(GC_PASSENGERS) | MC(GC_COAL) | MC(GC_MAIL) | MC(GC_OIL) | MC(GC_LIVESTOCK) | MC(GC_GOODS) | MC(GC_GRAIN) | MC(GC_WOOD) | MC(GC_VALUABLES) | MC(GC_PAPER) | MC(GC_FOOD), /* LT_DESERT: rainforest/desert */ - MC(GC_PASSENGERS)|MC(GC_MAIL)|MC(GC_OIL)|MC(GC_GOODS)|MC(GC_GRAIN)|MC(GC_WOOD)| - MC(GC_VALUABLES)|MC(GC_FOOD)|MC(GC_FRUIT)|MC(GC_COPPER_ORE)|MC(GC_WATER)|MC(GC_RUBBER), + MC(GC_PASSENGERS) | MC(GC_MAIL) | MC(GC_OIL) | MC(GC_GOODS) | MC(GC_GRAIN) | MC(GC_WOOD) | MC(GC_VALUABLES) | MC(GC_FOOD) | MC(GC_FRUIT) | MC(GC_COPPER_ORE) | MC(GC_WATER) | MC(GC_RUBBER), /* LT_CANDY: toyland */ - MC(GC_PASSENGERS)|MC(GC_MAIL)|MC(GC_SUGAR)|MC(GC_TOYS)|MC(GC_BATTERIES)|MC(GC_CANDY)| - MC(GC_TOFFEE)|MC(GC_COLA)|MC(GC_COTTON_CANDY)|MC(GC_BUBBLES)|MC(GC_PLASTIC)|MC(GC_FIZZY_DRINKS) + MC(GC_PASSENGERS) | MC(GC_MAIL) | MC(GC_SUGAR) | MC(GC_TOYS) | MC(GC_BATTERIES) | MC(GC_CANDY) | MC(GC_TOFFEE) | MC(GC_COLA) | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES) | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS) }; /** END --- TRANSLATE FROM GLOBAL CARGO TO LOCAL CARGO ID'S **/ @@ -57,12 +53,12 @@ const uint32 _landscape_global_cargo_mask[NUM_LANDSCAPE] = const uint32 cargo_classes[16] = { /* Passengers */ MC(GC_PASSENGERS), /* Mail */ MC(GC_MAIL), - /* Express */ MC(GC_GOODS)|MC(GC_FOOD)|MC(GC_CANDY), + /* Express */ MC(GC_GOODS) | MC(GC_FOOD) | MC(GC_CANDY), /* Armoured */ MC(GC_VALUABLES), - /* Bulk */ MC(GC_COAL)|MC(GC_GRAIN)|MC(GC_IRON_ORE)|MC(GC_COPPER_ORE)|MC(GC_FRUIT)|MC(GC_SUGAR)|MC(GC_TOFFEE)|MC(GC_COTTON_CANDY), - /* Piece */ MC(GC_LIVESTOCK)|MC(GC_WOOD)|MC(GC_STEEL)|MC(GC_PAPER)|MC(GC_TOYS)|MC(GC_BATTERIES)|MC(GC_BUBBLES)|MC(GC_FIZZY_DRINKS), - /* Liquids */ MC(GC_OIL)|MC(GC_WATER)|MC(GC_RUBBER)|MC(GC_COLA)|MC(GC_PLASTIC), - /* Chilled */ MC(GC_FOOD)|MC(GC_FRUIT), + /* Bulk */ MC(GC_COAL) | MC(GC_GRAIN) | MC(GC_IRON_ORE) | MC(GC_COPPER_ORE) | MC(GC_FRUIT) | MC(GC_SUGAR) | MC(GC_TOFFEE) | MC(GC_COTTON_CANDY), + /* Piece */ MC(GC_LIVESTOCK) | MC(GC_WOOD) | MC(GC_STEEL) | MC(GC_PAPER) | MC(GC_TOYS) | MC(GC_BATTERIES) | MC(GC_BUBBLES) | MC(GC_FIZZY_DRINKS), + /* Liquids */ MC(GC_OIL) | MC(GC_WATER) | MC(GC_RUBBER) | MC(GC_COLA) | MC(GC_PLASTIC), + /* Chilled */ MC(GC_FOOD) | MC(GC_FRUIT), /* Undefined */ 0, 0, 0, 0, 0, 0, 0, 0 }; #undef MC diff --git a/newgrf_engine.h b/newgrf_engine.h index 1f268118b..8b88a9c77 100644 --- a/newgrf_engine.h +++ b/newgrf_engine.h @@ -41,11 +41,11 @@ bool UsesWagonOverride(const Vehicle *v); #define GetCustomVehicleIcon(et, direction) GetCustomEngineSprite(et, NULL, direction) typedef enum VehicleTrigger { - VEHICLE_TRIGGER_NEW_CARGO = 1, + VEHICLE_TRIGGER_NEW_CARGO = 1, // Externally triggered only for the first vehicle in chain - VEHICLE_TRIGGER_DEPOT = 2, + VEHICLE_TRIGGER_DEPOT = 2, // Externally triggered only for the first vehicle in chain, only if whole chain is empty - VEHICLE_TRIGGER_EMPTY = 4, + VEHICLE_TRIGGER_EMPTY = 4, // Not triggered externally (called for the whole chain if we got NEW_CARGO) VEHICLE_TRIGGER_ANY_NEW_CARGO = 8, } VehicleTrigger; @@ -32,39 +32,39 @@ VARDEF NewsItem _statusbar_news_item; enum { NT_ARRIVAL_PLAYER = 0, - NT_ARRIVAL_OTHER = 1, - NT_ACCIDENT = 2, - NT_COMPANY_INFO = 3, - NT_ECONOMY = 4, - NT_ADVICE = 5, - NT_NEW_VEHICLES = 6, - NT_ACCEPTANCE = 7, - NT_SUBSIDIES = 8, - NT_GENERAL = 9, + NT_ARRIVAL_OTHER = 1, + NT_ACCIDENT = 2, + NT_COMPANY_INFO = 3, + NT_ECONOMY = 4, + NT_ADVICE = 5, + NT_NEW_VEHICLES = 6, + NT_ACCEPTANCE = 7, + NT_SUBSIDIES = 8, + NT_GENERAL = 9, }; enum NewsMode { - NM_SMALL = 0, - NM_NORMAL = 1, - NM_THIN = 2, + NM_SMALL = 0, + NM_NORMAL = 1, + NM_THIN = 2, NM_CALLBACK = 3, }; enum NewsFlags { - NF_VIEWPORT = 1, - NF_TILE = 4, - NF_VEHICLE = 8, + NF_VIEWPORT = 0x01, + NF_TILE = 0x04, + NF_VEHICLE = 0x08, NF_FORCE_BIG = 0x10, - NF_NOEXPIRE = 0x20, - NF_INCOLOR = 0x40, + NF_NOEXPIRE = 0x20, + NF_INCOLOR = 0x40, }; enum { - DNC_TRAINAVAIL = 0, - DNC_ROADAVAIL = 1, - DNC_SHIPAVAIL = 2, + DNC_TRAINAVAIL = 0, + DNC_ROADAVAIL = 1, + DNC_SHIPAVAIL = 2, DNC_AIRCRAFTAVAIL = 3, - DNC_BANKRUPCY = 4, + DNC_BANKRUPCY = 4, }; /** diff --git a/news_gui.c b/news_gui.c index ad454279a..e3e739d7d 100644 --- a/news_gui.c +++ b/news_gui.c @@ -307,10 +307,10 @@ static WindowDesc _news_type2_desc = { }; static const Widget _news_type0_widgets[] = { -{ WWT_PANEL, RESIZE_NONE, 5, 0, 279, 14, 86, 0x0, STR_NULL}, -{ WWT_CLOSEBOX, RESIZE_NONE, 5, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 5, 11, 279, 0, 13, STR_012C_MESSAGE, STR_NULL}, -{ WWT_6, RESIZE_NONE, 5, 2, 277, 16, 64, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 5, 0, 279, 14, 86, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 5, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 5, 11, 279, 0, 13, STR_012C_MESSAGE, STR_NULL}, +{ WWT_6, RESIZE_NONE, 5, 2, 277, 16, 64, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -642,12 +642,12 @@ static void MessageHistoryWndProc(Window *w, WindowEvent *e) } static const Widget _message_history_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 13, 11, 387, 0, 13, STR_MESSAGE_HISTORY, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 13, 388, 399, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_IMGBTN, RESIZE_RB, 13, 0, 387, 14, 139, 0x0, STR_MESSAGE_HISTORY_TIP}, -{ WWT_SCROLLBAR, RESIZE_LRB, 13, 388, 399, 14, 127, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 13, 388, 399, 128, 139, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 13, 11, 387, 0, 13, STR_MESSAGE_HISTORY, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 13, 388, 399, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_IMGBTN, RESIZE_RB, 13, 0, 387, 14, 139, 0x0, STR_MESSAGE_HISTORY_TIP}, +{ WWT_SCROLLBAR, RESIZE_LRB, 13, 388, 399, 14, 127, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 13, 388, 399, 128, 139, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -801,43 +801,43 @@ static void MessageOptionsWndProc(Window *w, WindowEvent *e) } static const Widget _message_options_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 13, 11, 409, 0, 13, STR_0204_MESSAGE_OPTIONS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 13, 0, 409, 14, 184, STR_NULL, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 13, 0, 409, 14, 184, STR_NULL, STR_NULL}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 26, 37, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 26, 37, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 26, 37, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 26, 37, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 38, 49, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 38, 49, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 38, 49, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 38, 49, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 50, 61, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 50, 61, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 50, 61, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 50, 61, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 62, 73, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 62, 73, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 62, 73, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 62, 73, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 74, 85, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 74, 85, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 74, 85, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 74, 85, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 86, 97, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 86, 97, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 86, 97, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 86, 97, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 98, 109, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 98, 109, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 98, 109, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 98, 109, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 110, 121, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 110, 121, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 110, 121, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 110, 121, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 122, 133, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 122, 133, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 122, 133, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 122, 133, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 134, 145, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 134, 145, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 134, 145, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 134, 145, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_NONE, 3, 4, 86, 154, 165, STR_NULL, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 3, 87, 98, 154, 165, STR_0225, STR_NULL}, -{ WWT_4, RESIZE_NONE, 3, 4, 98, 166, 177, STR_02DB_OFF, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 3, 4, 86, 154, 165, STR_NULL, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 3, 87, 98, 154, 165, STR_0225, STR_NULL}, +{ WWT_4, RESIZE_NONE, 3, 4, 98, 166, 177, STR_02DB_OFF, STR_NULL}, { WIDGETS_END}, }; @@ -909,22 +909,22 @@ static void ScrollMainViewport(int x, int y) } static const int8 scrollamt[16][2] = { - { 0, 0}, - {-2, 0}, // 1:left - { 0,-2}, // 2:up - {-2,-1}, // 3:left + up - { 2, 0}, // 4:right - { 0, 0}, // 5:left + right - { 2,-1}, // 6:right + up - { 0,-2}, // 7:left + right + up = up - { 0 ,2}, // 8:down - {-2 ,1}, // 9:down+left - { 0, 0}, // 10:impossible - {-2, 0}, // 11:left + up + down = left - { 2, 1}, // 12:down+right - { 0, 2}, // 13:left + right + down = down - { 0,-2}, // 14:left + right + up = up - { 0, 0}, // 15:impossible + { 0, 0}, + {-2, 0}, // 1 : left + { 0, -2}, // 2 : up + {-2, -1}, // 3 : left + up + { 2, 0}, // 4 : right + { 0, 0}, // 5 : left + right + { 2, -1}, // 6 : right + up + { 0, -2}, // 7 : left + right + up = up + { 0 ,2}, // 8 : down + {-2 ,1}, // 9 : down+left + { 0, 0}, // 10 : impossible + {-2, 0}, // 11 : left + up + down = left + { 2, 1}, // 12 : down+right + { 0, 2}, // 13 : left + right + down = down + { 0, -2}, // 14 : left + right + up = up + { 0, 0}, // 15 : impossible }; static void HandleKeyScrolling(void) @@ -69,17 +69,17 @@ enum GameModes { }; enum SwitchModes { - SM_NONE = 0, - SM_NEWGAME = 1, - SM_EDITOR = 2, - SM_LOAD = 3, - SM_MENU = 4, - SM_SAVE = 5, - SM_GENRANDLAND = 6, - SM_LOAD_SCENARIO = 9, - SM_START_SCENARIO = 10, + SM_NONE = 0, + SM_NEWGAME = 1, + SM_EDITOR = 2, + SM_LOAD = 3, + SM_MENU = 4, + SM_SAVE = 5, + SM_GENRANDLAND = 6, + SM_LOAD_SCENARIO = 9, + SM_START_SCENARIO = 10, SM_START_HEIGHTMAP = 11, - SM_LOAD_HEIGHTMAP = 12, + SM_LOAD_HEIGHTMAP = 12, }; @@ -123,22 +123,22 @@ typedef struct TileInfo { /* Display Options */ enum { - DO_SHOW_TOWN_NAMES = 1 << 0, + DO_SHOW_TOWN_NAMES = 1 << 0, DO_SHOW_STATION_NAMES = 1 << 1, - DO_SHOW_SIGNS = 1 << 2, - DO_FULL_ANIMATION = 1 << 3, - DO_TRANS_BUILDINGS = 1 << 4, - DO_FULL_DETAIL = 1 << 5, - DO_WAYPOINTS = 1 << 6, - DO_TRANS_SIGNS = 1 << 7, + DO_SHOW_SIGNS = 1 << 2, + DO_FULL_ANIMATION = 1 << 3, + DO_TRANS_BUILDINGS = 1 << 4, + DO_FULL_DETAIL = 1 << 5, + DO_WAYPOINTS = 1 << 6, + DO_TRANS_SIGNS = 1 << 7, }; /* Landscape types */ enum { - LT_NORMAL = 0, - LT_HILLY = 1, - LT_DESERT = 2, - LT_CANDY = 3, + LT_NORMAL = 0, + LT_HILLY = 1, + LT_DESERT = 2, + LT_CANDY = 3, NUM_LANDSCAPE = 4, }; @@ -222,48 +222,48 @@ typedef struct GameDifficulty { enum { // Temperate - CT_PASSENGERS = 0, - CT_COAL = 1, - CT_MAIL = 2, - CT_OIL = 3, - CT_LIVESTOCK = 4, - CT_GOODS = 5, - CT_GRAIN = 6, - CT_WOOD = 7, - CT_IRON_ORE = 8, - CT_STEEL = 9, - CT_VALUABLES = 10, - CT_FOOD = 11, + CT_PASSENGERS = 0, + CT_COAL = 1, + CT_MAIL = 2, + CT_OIL = 3, + CT_LIVESTOCK = 4, + CT_GOODS = 5, + CT_GRAIN = 6, + CT_WOOD = 7, + CT_IRON_ORE = 8, + CT_STEEL = 9, + CT_VALUABLES = 10, + CT_FOOD = 11, // Arctic - CT_WHEAT = 6, - CT_HILLY_UNUSED = 8, - CT_PAPER = 9, - CT_GOLD = 10, + CT_WHEAT = 6, + CT_HILLY_UNUSED = 8, + CT_PAPER = 9, + CT_GOLD = 10, // Tropic - CT_RUBBER = 1, - CT_FRUIT = 4, - CT_MAIZE = 6, - CT_COPPER_ORE = 8, - CT_WATER = 9, - CT_DIAMONDS = 10, + CT_RUBBER = 1, + CT_FRUIT = 4, + CT_MAIZE = 6, + CT_COPPER_ORE = 8, + CT_WATER = 9, + CT_DIAMONDS = 10, // Toyland - CT_SUGAR = 1, - CT_TOYS = 3, - CT_BATTERIES = 4, - CT_CANDY = 5, - CT_TOFFEE = 6, - CT_COLA = 7, - CT_COTTON_CANDY = 8, - CT_BUBBLES = 9, - CT_PLASTIC = 10, + CT_SUGAR = 1, + CT_TOYS = 3, + CT_BATTERIES = 4, + CT_CANDY = 5, + CT_TOFFEE = 6, + CT_COLA = 7, + CT_COTTON_CANDY = 8, + CT_BUBBLES = 9, + CT_PLASTIC = 10, CT_FIZZY_DRINKS = 11, - NUM_CARGO = 12, + NUM_CARGO = 12, - CT_INVALID = 0xFF + CT_INVALID = 0xFF }; typedef uint AcceptedCargo[NUM_CARGO]; @@ -337,111 +337,111 @@ typedef struct { enum { - WC_MAIN_WINDOW = 0x0, - WC_MAIN_TOOLBAR = 0x1, - WC_STATUS_BAR = 0x2, - WC_BUILD_TOOLBAR = 0x3, - WC_NEWS_WINDOW = 0x4, - WC_TOWN_DIRECTORY = 0x5, - WC_STATION_LIST = 0x6, - WC_TOWN_VIEW = 0x7, - WC_SMALLMAP = 0x8, - WC_TRAINS_LIST = 0x9, - WC_ROADVEH_LIST = 0xA, - WC_SHIPS_LIST = 0xB, - WC_AIRCRAFT_LIST = 0xC, - WC_VEHICLE_VIEW = 0xD, - WC_VEHICLE_DETAILS = 0xE, - WC_VEHICLE_REFIT = 0xF, - WC_VEHICLE_ORDERS = 0x10, - WC_STATION_VIEW = 0x11, - WC_VEHICLE_DEPOT = 0x12, - WC_BUILD_VEHICLE = 0x13, - WC_BUILD_BRIDGE = 0x14, - WC_ERRMSG = 0x15, - WC_ASK_ABANDON_GAME = 0x16, - WC_QUIT_GAME = 0x17, - WC_BUILD_STATION = 0x18, - WC_BUS_STATION = 0x19, - WC_TRUCK_STATION = 0x1A, - WC_BUILD_DEPOT = 0x1B, - WC_COMPANY = 0x1D, - WC_FINANCES = 0x1E, - WC_PLAYER_COLOR = 0x1F, - WC_QUERY_STRING = 0x20, - WC_SAVELOAD = 0x21, - WC_SELECT_GAME = 0x22, - WC_TOOLBAR_MENU = 0x24, - WC_INCOME_GRAPH = 0x25, - WC_OPERATING_PROFIT = 0x26, - WC_TOOLTIPS = 0x27, - WC_INDUSTRY_VIEW = 0x28, - WC_PLAYER_FACE = 0x29, - WC_LAND_INFO = 0x2A, - WC_TOWN_AUTHORITY = 0x2B, - WC_SUBSIDIES_LIST = 0x2C, - WC_GRAPH_LEGEND = 0x2D, - WC_DELIVERED_CARGO = 0x2E, - WC_PERFORMANCE_HISTORY = 0x2F, - WC_COMPANY_VALUE = 0x30, - WC_COMPANY_LEAGUE = 0x31, - WC_BUY_COMPANY = 0x32, - WC_PAYMENT_RATES = 0x33, - WC_ENGINE_PREVIEW = 0x35, - WC_MUSIC_WINDOW = 0x36, - WC_MUSIC_TRACK_SELECTION = 0x37, - WC_SCEN_LAND_GEN = 0x38, // also used for landscaping toolbar - WC_ASK_RESET_LANDSCAPE = 0x39, - WC_SCEN_TOWN_GEN = 0x3A, - WC_SCEN_INDUSTRY = 0x3B, - WC_SCEN_BUILD_ROAD = 0x3C, - WC_BUILD_TREES = 0x3D, - WC_SEND_NETWORK_MSG = 0x3E, - WC_DROPDOWN_MENU = 0x3F, - WC_BUILD_INDUSTRY = 0x40, - WC_GAME_OPTIONS = 0x41, - WC_NETWORK_WINDOW = 0x42, - WC_INDUSTRY_DIRECTORY = 0x43, - WC_MESSAGE_HISTORY = 0x44, - WC_CHEATS = 0x45, - WC_PERFORMANCE_DETAIL = 0x46, - WC_CONSOLE = 0x47, - WC_EXTRA_VIEW_PORT = 0x48, - WC_CLIENT_LIST = 0x49, - WC_NETWORK_STATUS_WINDOW = 0x4A, - WC_CUSTOM_CURRENCY = 0x4B, - WC_REPLACE_VEHICLE = 0x4C, - WC_HIGHSCORE = 0x4D, - WC_ENDSCREEN = 0x4E, - WC_SIGN_LIST = 0x4F, - WC_GENERATE_LANDSCAPE = 0x50, + WC_MAIN_WINDOW = 0x00, + WC_MAIN_TOOLBAR = 0x01, + WC_STATUS_BAR = 0x02, + WC_BUILD_TOOLBAR = 0x03, + WC_NEWS_WINDOW = 0x04, + WC_TOWN_DIRECTORY = 0x05, + WC_STATION_LIST = 0x06, + WC_TOWN_VIEW = 0x07, + WC_SMALLMAP = 0x08, + WC_TRAINS_LIST = 0x09, + WC_ROADVEH_LIST = 0x0A, + WC_SHIPS_LIST = 0x0B, + WC_AIRCRAFT_LIST = 0x0C, + WC_VEHICLE_VIEW = 0x0D, + WC_VEHICLE_DETAILS = 0x0E, + WC_VEHICLE_REFIT = 0x0F, + WC_VEHICLE_ORDERS = 0x10, + WC_STATION_VIEW = 0x11, + WC_VEHICLE_DEPOT = 0x12, + WC_BUILD_VEHICLE = 0x13, + WC_BUILD_BRIDGE = 0x14, + WC_ERRMSG = 0x15, + WC_ASK_ABANDON_GAME = 0x16, + WC_QUIT_GAME = 0x17, + WC_BUILD_STATION = 0x18, + WC_BUS_STATION = 0x19, + WC_TRUCK_STATION = 0x1A, + WC_BUILD_DEPOT = 0x1B, + WC_COMPANY = 0x1D, + WC_FINANCES = 0x1E, + WC_PLAYER_COLOR = 0x1F, + WC_QUERY_STRING = 0x20, + WC_SAVELOAD = 0x21, + WC_SELECT_GAME = 0x22, + WC_TOOLBAR_MENU = 0x24, + WC_INCOME_GRAPH = 0x25, + WC_OPERATING_PROFIT = 0x26, + WC_TOOLTIPS = 0x27, + WC_INDUSTRY_VIEW = 0x28, + WC_PLAYER_FACE = 0x29, + WC_LAND_INFO = 0x2A, + WC_TOWN_AUTHORITY = 0x2B, + WC_SUBSIDIES_LIST = 0x2C, + WC_GRAPH_LEGEND = 0x2D, + WC_DELIVERED_CARGO = 0x2E, + WC_PERFORMANCE_HISTORY = 0x2F, + WC_COMPANY_VALUE = 0x30, + WC_COMPANY_LEAGUE = 0x31, + WC_BUY_COMPANY = 0x32, + WC_PAYMENT_RATES = 0x33, + WC_ENGINE_PREVIEW = 0x35, + WC_MUSIC_WINDOW = 0x36, + WC_MUSIC_TRACK_SELECTION = 0x37, + WC_SCEN_LAND_GEN = 0x38, // also used for landscaping toolbar + WC_ASK_RESET_LANDSCAPE = 0x39, + WC_SCEN_TOWN_GEN = 0x3A, + WC_SCEN_INDUSTRY = 0x3B, + WC_SCEN_BUILD_ROAD = 0x3C, + WC_BUILD_TREES = 0x3D, + WC_SEND_NETWORK_MSG = 0x3E, + WC_DROPDOWN_MENU = 0x3F, + WC_BUILD_INDUSTRY = 0x40, + WC_GAME_OPTIONS = 0x41, + WC_NETWORK_WINDOW = 0x42, + WC_INDUSTRY_DIRECTORY = 0x43, + WC_MESSAGE_HISTORY = 0x44, + WC_CHEATS = 0x45, + WC_PERFORMANCE_DETAIL = 0x46, + WC_CONSOLE = 0x47, + WC_EXTRA_VIEW_PORT = 0x48, + WC_CLIENT_LIST = 0x49, + WC_NETWORK_STATUS_WINDOW = 0x4A, + WC_CUSTOM_CURRENCY = 0x4B, + WC_REPLACE_VEHICLE = 0x4C, + WC_HIGHSCORE = 0x4D, + WC_ENDSCREEN = 0x4E, + WC_SIGN_LIST = 0x4F, + WC_GENERATE_LANDSCAPE = 0x50, WC_GENERATE_PROGRESS_WINDOW = 0x51, - WC_OK_CANCEL_QUERY = 0x52, + WC_OK_CANCEL_QUERY = 0x52, }; enum { - EXPENSES_CONSTRUCTION = 0, - EXPENSES_NEW_VEHICLES = 1, - EXPENSES_TRAIN_RUN = 2, - EXPENSES_ROADVEH_RUN = 3, - EXPENSES_AIRCRAFT_RUN = 4, - EXPENSES_SHIP_RUN = 5, - EXPENSES_PROPERTY = 6, - EXPENSES_TRAIN_INC = 7, - EXPENSES_ROADVEH_INC = 8, - EXPENSES_AIRCRAFT_INC = 9, - EXPENSES_SHIP_INC = 10, - EXPENSES_LOAN_INT = 11, - EXPENSES_OTHER = 12, + EXPENSES_CONSTRUCTION = 0, + EXPENSES_NEW_VEHICLES = 1, + EXPENSES_TRAIN_RUN = 2, + EXPENSES_ROADVEH_RUN = 3, + EXPENSES_AIRCRAFT_RUN = 4, + EXPENSES_SHIP_RUN = 5, + EXPENSES_PROPERTY = 6, + EXPENSES_TRAIN_INC = 7, + EXPENSES_ROADVEH_INC = 8, + EXPENSES_AIRCRAFT_INC = 9, + EXPENSES_SHIP_INC = 10, + EXPENSES_LOAN_INT = 11, + EXPENSES_OTHER = 12, }; // special string constants enum SpecialStrings { // special strings for town names. the town name is generated dynamically on request. - SPECSTR_TOWNNAME_START = 0x20C0, - SPECSTR_TOWNNAME_ENGLISH = SPECSTR_TOWNNAME_START, + SPECSTR_TOWNNAME_START = 0x20C0, + SPECSTR_TOWNNAME_ENGLISH = SPECSTR_TOWNNAME_START, SPECSTR_TOWNNAME_FRENCH, SPECSTR_TOWNNAME_GERMAN, SPECSTR_TOWNNAME_AMERICAN, @@ -462,37 +462,37 @@ enum SpecialStrings { SPECSTR_TOWNNAME_TURKISH, SPECSTR_TOWNNAME_ITALIAN, SPECSTR_TOWNNAME_CATALAN, - SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CATALAN, + SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CATALAN, // special strings for player names on the form "TownName transport". - SPECSTR_PLAYERNAME_START = 0x70EA, + SPECSTR_PLAYERNAME_START = 0x70EA, SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START, SPECSTR_PLAYERNAME_FRENCH, SPECSTR_PLAYERNAME_GERMAN, SPECSTR_PLAYERNAME_AMERICAN, SPECSTR_PLAYERNAME_LATIN, SPECSTR_PLAYERNAME_SILLY, - SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, + SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, - SPECSTR_ANDCO_NAME = 0x70E6, - SPECSTR_PRESIDENT_NAME = 0x70E7, - SPECSTR_SONGNAME = 0x70E8, + SPECSTR_ANDCO_NAME = 0x70E6, + SPECSTR_PRESIDENT_NAME = 0x70E7, + SPECSTR_SONGNAME = 0x70E8, // reserve 32 strings for the *.lng files - SPECSTR_LANGUAGE_START = 0x7100, - SPECSTR_LANGUAGE_END = 0x711f, + SPECSTR_LANGUAGE_START = 0x7100, + SPECSTR_LANGUAGE_END = 0x711f, // reserve 32 strings for various screen resolutions - SPECSTR_RESOLUTION_START = 0x7120, - SPECSTR_RESOLUTION_END = 0x713f, + SPECSTR_RESOLUTION_START = 0x7120, + SPECSTR_RESOLUTION_END = 0x713f, // reserve 32 strings for screenshot formats - SPECSTR_SCREENSHOT_START = 0x7140, - SPECSTR_SCREENSHOT_END = 0x715F, + SPECSTR_SCREENSHOT_START = 0x7140, + SPECSTR_SCREENSHOT_END = 0x715F, // Used to implement SetDParamStr - STR_SPEC_DYNSTRING = 0xF800, - STR_SPEC_USERSTRING = 0xF808, + STR_SPEC_DYNSTRING = 0xF800, + STR_SPEC_USERSTRING = 0xF808, }; typedef void PlaceProc(TileIndex tile); @@ -509,7 +509,7 @@ VARDEF byte _savegame_sort_order; #define INVALID_STRING_ID 0xFFFF enum { - MAX_SCREEN_WIDTH = 2048, + MAX_SCREEN_WIDTH = 2048, MAX_SCREEN_HEIGHT = 1200, }; @@ -517,7 +517,7 @@ enum { * gameview when here. Bitencoded variable that only allows scrolling if all * elements are zero */ enum { - SCROLL_CON = 0, + SCROLL_CON = 0, SCROLL_EDIT = 1, SCROLL_SAVE = 2, SCROLL_CHAT = 4, @@ -36,7 +36,7 @@ enum OrderFlagMasks { //Flags for depots: /** The current depot-order was initiated because it was in the vehicle's order list */ - OF_PART_OF_ORDERS = 0x2, + OF_PART_OF_ORDERS = 0x2, /** if OF_PART_OF_ORDERS is not set, this will cause the vehicle to be stopped in the depot */ OF_HALT_IN_DEPOT = 0x4, /** if OF_PART_OF_ORDERS is set, this will cause the order only be come active if the vehicle needs servicing */ diff --git a/order_cmd.c b/order_cmd.c index abef2d056..df5632048 100644 --- a/order_cmd.c +++ b/order_cmd.c @@ -1115,10 +1115,10 @@ void InitializeOrders(void) } static const SaveLoad _order_desc[] = { - SLE_VAR(Order,type, SLE_UINT8), - SLE_VAR(Order,flags, SLE_UINT8), - SLE_VAR(Order,station, SLE_UINT16), - SLE_REF(Order,next, REF_ORDER), + SLE_VAR(Order, type, SLE_UINT8), + SLE_VAR(Order, flags, SLE_UINT8), + SLE_VAR(Order, station, SLE_UINT16), + SLE_REF(Order, next, REF_ORDER), // reserve extra space in savegame here. (currently 10 bytes) SLE_CONDNULL(10, 5, SL_MAX_VERSION), diff --git a/order_gui.c b/order_gui.c index 778115abe..2ef68ee8f 100644 --- a/order_gui.c +++ b/order_gui.c @@ -513,19 +513,19 @@ static void OrdersWndProc(Window *w, WindowEvent *e) } static const Widget _orders_train_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 384, 0, 13, STR_8829_ORDERS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_RB, 14, 0, 372, 14, 75, 0x0, STR_8852_ORDERS_LIST_CLICK_ON_ORDER}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 373, 384, 14, 75, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 52, 76, 87, STR_8823_SKIP, STR_8853_SKIP_THE_CURRENT_ORDER}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 53, 105, 76, 87, STR_8824_DELETE, STR_8854_DELETE_THE_HIGHLIGHTED}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 106, 158, 76, 87, STR_8825_NON_STOP, STR_8855_MAKE_THE_HIGHLIGHTED_ORDER}, -{WWT_NODISTXTBTN, RESIZE_TB, 14, 159, 211, 76, 87, STR_8826_GO_TO, STR_8856_INSERT_A_NEW_ORDER_BEFORE}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 212, 264, 76, 87, STR_FULLLOAD_OR_SERVICE, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 265, 319, 76, 87, STR_8828_UNLOAD, STR_8858_MAKE_THE_HIGHLIGHTED_ORDER}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 320, 372, 76, 87, STR_886F_TRANSFER, STR_886D_MAKE_THE_HIGHLIGHTED_ORDER}, -{ WWT_PANEL, RESIZE_RTB, 14, 373, 372, 76, 87, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 373, 384, 76, 87, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 384, 0, 13, STR_8829_ORDERS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_RB, 14, 0, 372, 14, 75, 0x0, STR_8852_ORDERS_LIST_CLICK_ON_ORDER}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 373, 384, 14, 75, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 52, 76, 87, STR_8823_SKIP, STR_8853_SKIP_THE_CURRENT_ORDER}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 53, 105, 76, 87, STR_8824_DELETE, STR_8854_DELETE_THE_HIGHLIGHTED}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 106, 158, 76, 87, STR_8825_NON_STOP, STR_8855_MAKE_THE_HIGHLIGHTED_ORDER}, +{WWT_NODISTXTBTN, RESIZE_TB, 14, 159, 211, 76, 87, STR_8826_GO_TO, STR_8856_INSERT_A_NEW_ORDER_BEFORE}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 212, 264, 76, 87, STR_FULLLOAD_OR_SERVICE, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 265, 319, 76, 87, STR_8828_UNLOAD, STR_8858_MAKE_THE_HIGHLIGHTED_ORDER}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 320, 372, 76, 87, STR_886F_TRANSFER, STR_886D_MAKE_THE_HIGHLIGHTED_ORDER}, +{ WWT_PANEL, RESIZE_RTB, 14, 373, 372, 76, 87, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 373, 384, 76, 87, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -538,19 +538,19 @@ static const WindowDesc _orders_train_desc = { }; static const Widget _orders_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 395, 0, 13, STR_8829_ORDERS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_RB, 14, 0, 383, 14, 75, 0x0, STR_8852_ORDERS_LIST_CLICK_ON_ORDER}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 384, 395, 14, 75, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 63, 76, 87, STR_8823_SKIP, STR_8853_SKIP_THE_CURRENT_ORDER}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 64, 128, 76, 87, STR_8824_DELETE, STR_8854_DELETE_THE_HIGHLIGHTED}, -{ WWT_EMPTY, RESIZE_TB, 14, 0, 0, 76, 87, 0x0, 0x0}, -{WWT_NODISTXTBTN, RESIZE_TB, 14, 129, 192, 76, 87, STR_8826_GO_TO, STR_8856_INSERT_A_NEW_ORDER_BEFORE}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 193, 256, 76, 87, STR_FULLLOAD_OR_SERVICE, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 257, 319, 76, 87, STR_8828_UNLOAD, STR_8858_MAKE_THE_HIGHLIGHTED_ORDER}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 320, 383, 76, 87, STR_886F_TRANSFER, STR_886D_MAKE_THE_HIGHLIGHTED_ORDER}, -{ WWT_PANEL, RESIZE_RTB, 14, 384, 383, 76, 87, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 384, 395, 76, 87, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 395, 0, 13, STR_8829_ORDERS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_RB, 14, 0, 383, 14, 75, 0x0, STR_8852_ORDERS_LIST_CLICK_ON_ORDER}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 384, 395, 14, 75, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 63, 76, 87, STR_8823_SKIP, STR_8853_SKIP_THE_CURRENT_ORDER}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 64, 128, 76, 87, STR_8824_DELETE, STR_8854_DELETE_THE_HIGHLIGHTED}, +{ WWT_EMPTY, RESIZE_TB, 14, 0, 0, 76, 87, 0x0, 0x0}, +{WWT_NODISTXTBTN, RESIZE_TB, 14, 129, 192, 76, 87, STR_8826_GO_TO, STR_8856_INSERT_A_NEW_ORDER_BEFORE}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 193, 256, 76, 87, STR_FULLLOAD_OR_SERVICE, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 257, 319, 76, 87, STR_8828_UNLOAD, STR_8858_MAKE_THE_HIGHLIGHTED_ORDER}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 320, 383, 76, 87, STR_886F_TRANSFER, STR_886D_MAKE_THE_HIGHLIGHTED_ORDER}, +{ WWT_PANEL, RESIZE_RTB, 14, 384, 383, 76, 87, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 384, 395, 76, 87, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -563,18 +563,18 @@ static const WindowDesc _orders_desc = { }; static const Widget _other_orders_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 331, 0, 13, STR_A00B_ORDERS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_RB, 14, 0, 319, 14, 75, 0x0, STR_8852_ORDERS_LIST_CLICK_ON_ORDER}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 320, 331, 14, 75, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_RTB, 14, 0, 319, 76, 87, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 320, 331, 76, 87, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 331, 0, 13, STR_A00B_ORDERS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_RB, 14, 0, 319, 14, 75, 0x0, STR_8852_ORDERS_LIST_CLICK_ON_ORDER}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 320, 331, 14, 75, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 14, 0, 319, 76, 87, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 319, 76, 87, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 320, 331, 76, 87, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; diff --git a/pathfind.c b/pathfind.c index ae5f32ca6..9a001aac1 100644 --- a/pathfind.c +++ b/pathfind.c @@ -115,13 +115,15 @@ static const byte _bits_mask[4] = { }; static const byte _tpf_new_direction[14] = { - 0,1,0,1,2,1, 0,0, - 2,3,3,2,3,0, + 0, 1, 0, 1, 2, 1, + 0, 0, + 2, 3, 3, 2, 3, 0, }; static const byte _tpf_prev_direction[14] = { - 0,1,1,0,1,2, 0,0, - 2,3,2,3,0,3, + 0, 1, 1, 0, 1, 2, + 0, 0, + 2, 3, 2, 3, 0, 3, }; @@ -230,23 +232,23 @@ static uint SkipToEndOfTunnel(TrackPathFinder* tpf, TileIndex tile, DiagDirectio } const byte _ffb_64[128] = { -0,0,1,0,2,0,1,0, -3,0,1,0,2,0,1,0, -4,0,1,0,2,0,1,0, -3,0,1,0,2,0,1,0, -5,0,1,0,2,0,1,0, -3,0,1,0,2,0,1,0, -4,0,1,0,2,0,1,0, -3,0,1,0,2,0,1,0, - -0,0,0,2,0,4,4,6, -0,8,8,10,8,12,12,14, -0,16,16,18,16,20,20,22, -16,24,24,26,24,28,28,30, -0,32,32,34,32,36,36,38, -32,40,40,42,40,44,44,46, -32,48,48,50,48,52,52,54, -48,56,56,58,56,60,60,62, + 0, 0, 1, 0, 2, 0, 1, 0, + 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, + 3, 0, 1, 0, 2, 0, 1, 0, + 5, 0, 1, 0, 2, 0, 1, 0, + 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, + 3, 0, 1, 0, 2, 0, 1, 0, + + 0, 0, 0, 2, 0, 4, 4, 6, + 0, 8, 8, 10, 8, 12, 12, 14, + 0, 16, 16, 18, 16, 20, 20, 22, +16, 24, 24, 26, 24, 28, 28, 30, + 0, 32, 32, 34, 32, 36, 36, 38, +32, 40, 40, 42, 40, 44, 44, 46, +32, 48, 48, 50, 48, 52, 52, 54, +48, 56, 56, 58, 56, 60, 60, 62, }; static void TPFMode1(TrackPathFinder* tpf, TileIndex tile, DiagDirection direction) @@ -414,12 +416,12 @@ typedef struct { } StackedItem; static const byte _new_track[6][4] = { -{0,0xff,8,0xff,}, -{0xff,1,0xff,9,}, -{0xff,2,10,0xff,}, -{3,0xff,0xff,11,}, -{12,4,0xff,0xff,}, -{0xff,0xff,5,13,}, +{0, 0xff, 8, 0xff,}, +{0xff, 1, 0xff, 9,}, +{0xff, 2, 10, 0xff,}, +{3, 0xff, 0xff, 11,}, +{12, 4, 0xff, 0xff,}, +{0xff, 0xff, 5, 13,}, }; typedef struct HashLink { @@ -659,8 +661,8 @@ static uint DistanceMoo(TileIndex t0, TileIndex t1) // is currently limited to 16384 static const byte _length_of_track[16] = { - DIAG_FACTOR,DIAG_FACTOR,STR_FACTOR,STR_FACTOR,STR_FACTOR,STR_FACTOR,0,0, - DIAG_FACTOR,DIAG_FACTOR,STR_FACTOR,STR_FACTOR,STR_FACTOR,STR_FACTOR,0,0 + DIAG_FACTOR, DIAG_FACTOR, STR_FACTOR, STR_FACTOR, STR_FACTOR, STR_FACTOR, 0, 0, + DIAG_FACTOR, DIAG_FACTOR, STR_FACTOR, STR_FACTOR, STR_FACTOR, STR_FACTOR, 0, 0 }; // new more optimized pathfinder for trains... @@ -12,7 +12,7 @@ typedef struct PlayerEconomyEntry { int32 income; int32 expenses; int32 delivered_cargo; - int32 performance_history; // player score (scale 0-1000) + int32 performance_history; // player score (scale 0-1000) int64 company_value; } PlayerEconomyEntry; @@ -31,7 +31,7 @@ typedef struct AiBuildRec { typedef struct PlayerAI { byte state; - byte tick; // Used to determine how often to move + byte tick; // Used to determine how often to move uint32 state_counter; // Can hold tile index! uint16 timeout_counter; @@ -72,17 +72,17 @@ typedef struct PlayerAI { typedef struct Ai_PathFinderInfo { TileIndex start_tile_tl; // tl = top-left TileIndex start_tile_br; // br = bottom-right - TileIndex end_tile_tl; // tl = top-left - TileIndex end_tile_br; // br = bottom-right - byte start_direction; // 0 to 3 or AI_PATHFINDER_NO_DIRECTION - byte end_direction; // 0 to 3 or AI_PATHFINDER_NO_DIRECTION + TileIndex end_tile_tl; // tl = top-left + TileIndex end_tile_br; // br = bottom-right + byte start_direction; // 0 to 3 or AI_PATHFINDER_NO_DIRECTION + byte end_direction; // 0 to 3 or AI_PATHFINDER_NO_DIRECTION TileIndex route[500]; - byte route_extra[500]; // Some extra information about the route like bridge/tunnel + byte route_extra[500]; // Some extra information about the route like bridge/tunnel int route_length; - int position; // Current position in the build-path, needed to build the path + int position; // Current position in the build-path, needed to build the path - bool rail_or_road; // true = rail, false = road + bool rail_or_road; // true = rail, false = road } Ai_PathFinderInfo; // The amount of memory reserved for the AI-special-vehicles @@ -98,12 +98,12 @@ typedef struct PlayerAiNew { uint tick; uint idle; - int temp; // A value used in more than one function, but it just temporary - // The use is pretty simple: with this we can 'think' about stuff - // in more than one tick, and more than one AI. A static will not - // do, because they are not saved. This way, the AI is almost human ;) - int counter; // For the same reason as temp, we have counter. It can count how - // long we are trying something, and just abort if it takes too long + int temp; // A value used in more than one function, but it just temporary + // The use is pretty simple: with this we can 'think' about stuff + // in more than one tick, and more than one AI. A static will not + // do, because they are not saved. This way, the AI is almost human ;) + int counter; // For the same reason as temp, we have counter. It can count how + // long we are trying something, and just abort if it takes too long // Pathfinder stuff Ai_PathFinderInfo path_info; @@ -133,13 +133,13 @@ typedef struct PlayerAiNew { TileIndex depot_tile; byte depot_direction; - byte amount_veh; // How many vehicles we are going to build in this route - byte cur_veh; // How many vehicles did we bought? - VehicleID veh_id; // Used when bought a vehicle + byte amount_veh; // How many vehicles we are going to build in this route + byte cur_veh; // How many vehicles did we bought? + VehicleID veh_id; // Used when bought a vehicle VehicleID veh_main_id; // The ID of the first vehicle, for shared copy - int from_ic; // ic = industry/city. This is the ID of them - byte from_type; // AI_NO_TYPE/AI_CITY/AI_INDUSTRY + int from_ic; // ic = industry/city. This is the ID of them + byte from_type; // AI_NO_TYPE/AI_CITY/AI_INDUSTRY int to_ic; byte to_type; diff --git a/player_gui.c b/player_gui.c index e3fae50c9..a0a4f0927 100644 --- a/player_gui.c +++ b/player_gui.c @@ -103,46 +103,46 @@ static void DrawPlayerEconomyStats(const Player *p, byte mode) } static const Widget _player_finances_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 379, 0, 13, STR_700E_FINANCES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 380, 394, 0, 13, 0x2AA, STR_7075_TOGGLE_LARGE_SMALL_WINDOW}, -{ WWT_STICKYBOX, RESIZE_NONE, 14, 395, 406, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 406, 14, 169, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 406, 170, 203, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 202, 204, 215, STR_7029_BORROW, STR_7035_INCREASE_SIZE_OF_LOAN}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 203, 406, 204, 215, STR_702A_REPAY, STR_7036_REPAY_PART_OF_LOAN}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 379, 0, 13, STR_700E_FINANCES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 380, 394, 0, 13, 0x2AA, STR_7075_TOGGLE_LARGE_SMALL_WINDOW}, +{ WWT_STICKYBOX, RESIZE_NONE, 14, 395, 406, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 406, 14, 169, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 406, 170, 203, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 202, 204, 215, STR_7029_BORROW, STR_7035_INCREASE_SIZE_OF_LOAN}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 203, 406, 204, 215, STR_702A_REPAY, STR_7036_REPAY_PART_OF_LOAN}, { WIDGETS_END}, }; static const Widget _other_player_finances_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 379, 0, 13, STR_700E_FINANCES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 380, 394, 0, 13, 0x2AA, STR_7075_TOGGLE_LARGE_SMALL_WINDOW}, -{ WWT_STICKYBOX, RESIZE_NONE, 14, 395, 406, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 406, 14, 169, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 406, 170, 203, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 379, 0, 13, STR_700E_FINANCES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 380, 394, 0, 13, 0x2AA, STR_7075_TOGGLE_LARGE_SMALL_WINDOW}, +{ WWT_STICKYBOX, RESIZE_NONE, 14, 395, 406, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 406, 14, 169, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 406, 170, 203, 0x0, STR_NULL}, { WIDGETS_END}, }; static const Widget _other_player_finances_small_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 253, 0, 13, STR_700E_FINANCES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 254, 267, 0, 13, 0x2AA, STR_7075_TOGGLE_LARGE_SMALL_WINDOW}, -{ WWT_STICKYBOX, RESIZE_NONE, 14, 268, 279, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 279, 14, 47, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 253, 0, 13, STR_700E_FINANCES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 254, 267, 0, 13, 0x2AA, STR_7075_TOGGLE_LARGE_SMALL_WINDOW}, +{ WWT_STICKYBOX, RESIZE_NONE, 14, 268, 279, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 279, 14, 47, 0x0, STR_NULL}, { WIDGETS_END}, }; static const Widget _player_finances_small_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 253, 0, 13, STR_700E_FINANCES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 254, 267, 0, 13, 0x2AA, STR_7075_TOGGLE_LARGE_SMALL_WINDOW}, -{ WWT_STICKYBOX, RESIZE_NONE, 14, 268, 279, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 279, 14, 47, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 139, 48, 59, STR_7029_BORROW, STR_7035_INCREASE_SIZE_OF_LOAN}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 140, 279, 48, 59, STR_702A_REPAY, STR_7036_REPAY_PART_OF_LOAN}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 253, 0, 13, STR_700E_FINANCES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 254, 267, 0, 13, 0x2AA, STR_7075_TOGGLE_LARGE_SMALL_WINDOW}, +{ WWT_STICKYBOX, RESIZE_NONE, 14, 268, 279, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 279, 14, 47, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 139, 48, 59, STR_7029_BORROW, STR_7035_INCREASE_SIZE_OF_LOAN}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 140, 279, 48, 59, STR_702A_REPAY, STR_7036_REPAY_PART_OF_LOAN}, { WIDGETS_END}, }; @@ -304,10 +304,10 @@ static void SelectPlayerColorWndProc(Window *w, WindowEvent *e) } static const Widget _select_player_color_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5,STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 149, 0, 13, STR_7007_NEW_COLOR_SCHEME, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 137, 14, 127, 0x0, STR_7034_CLICK_ON_SELECTED_NEW_COLOR}, -{ WWT_SCROLLBAR, RESIZE_NONE, 14, 138, 149, 14, 127, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 137, 14, 127, 0x0, STR_7034_CLICK_ON_SELECTED_NEW_COLOR}, +{ WWT_SCROLLBAR, RESIZE_NONE, 14, 138, 149, 14, 127, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WIDGETS_END}, }; @@ -352,14 +352,14 @@ static void SelectPlayerFaceWndProc(Window *w, WindowEvent *e) } static const Widget _select_player_face_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 189, 0, 13, STR_7043_FACE_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 189, 14, 136, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 94, 137, 148, STR_012E_CANCEL, STR_7047_CANCEL_NEW_FACE_SELECTION}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 95, 189, 137, 148, STR_012F_OK, STR_7048_ACCEPT_NEW_FACE_SELECTION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 95, 187, 25, 36, STR_7044_MALE, STR_7049_SELECT_MALE_FACES}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 95, 187, 37, 48, STR_7045_FEMALE, STR_704A_SELECT_FEMALE_FACES}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 95, 187, 79, 90, STR_7046_NEW_FACE, STR_704B_GENERATE_RANDOM_NEW_FACE}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 189, 0, 13, STR_7043_FACE_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 189, 14, 136, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 94, 137, 148, STR_012E_CANCEL, STR_7047_CANCEL_NEW_FACE_SELECTION}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 95, 189, 137, 148, STR_012F_OK, STR_7048_ACCEPT_NEW_FACE_SELECTION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 95, 187, 25, 36, STR_7044_MALE, STR_7049_SELECT_MALE_FACES}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 95, 187, 37, 48, STR_7045_FEMALE, STR_704A_SELECT_FEMALE_FACES}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 95, 187, 79, 90, STR_7046_NEW_FACE, STR_704B_GENERATE_RANDOM_NEW_FACE}, { WIDGETS_END}, }; @@ -388,17 +388,17 @@ static const Widget _my_player_company_widgets[] = { }; static const Widget _other_player_company_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 359, 0, 13, STR_7001, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 359, 14, 157, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 266, 355, 18, 29, STR_7072_VIEW_HQ, STR_7070_BUILD_COMPANY_HEADQUARTERS}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 179, 158, 169, STR_7077_BUY_25_SHARE_IN_COMPANY, STR_7079_BUY_25_SHARE_IN_THIS_COMPANY}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 180, 359, 158, 169, STR_7078_SELL_25_SHARE_IN_COMPANY, STR_707A_SELL_25_SHARE_IN_THIS_COMPANY}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 359, 0, 13, STR_7001, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 359, 14, 157, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 266, 355, 18, 29, STR_7072_VIEW_HQ, STR_7070_BUILD_COMPANY_HEADQUARTERS}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 179, 158, 169, STR_7077_BUY_25_SHARE_IN_COMPANY, STR_7079_BUY_25_SHARE_IN_THIS_COMPANY}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 180, 359, 158, 169, STR_7078_SELL_25_SHARE_IN_COMPANY, STR_707A_SELL_25_SHARE_IN_THIS_COMPANY}, { WIDGETS_END}, }; @@ -1108,56 +1108,56 @@ void LoadFromHighScore(void) // Save/load of players static const SaveLoad _player_desc[] = { - SLE_VAR(Player,name_2, SLE_UINT32), - SLE_VAR(Player,name_1, SLE_STRINGID), + SLE_VAR(Player, name_2, SLE_UINT32), + SLE_VAR(Player, name_1, SLE_STRINGID), - SLE_VAR(Player,president_name_1,SLE_UINT16), - SLE_VAR(Player,president_name_2,SLE_UINT32), + SLE_VAR(Player, president_name_1,SLE_UINT16), + SLE_VAR(Player, president_name_2,SLE_UINT32), - SLE_VAR(Player,face, SLE_UINT32), + SLE_VAR(Player, face, SLE_UINT32), // money was changed to a 64 bit field in savegame version 1. - SLE_CONDVAR(Player,money64, SLE_VAR_I64 | SLE_FILE_I32, 0, 0), - SLE_CONDVAR(Player,money64, SLE_INT64, 1, SL_MAX_VERSION), + SLE_CONDVAR(Player, money64, SLE_VAR_I64 | SLE_FILE_I32, 0, 0), + SLE_CONDVAR(Player, money64, SLE_INT64, 1, SL_MAX_VERSION), - SLE_VAR(Player,current_loan, SLE_INT32), + SLE_VAR(Player, current_loan, SLE_INT32), - SLE_VAR(Player,player_color, SLE_UINT8), - SLE_VAR(Player,player_money_fraction,SLE_UINT8), - SLE_VAR(Player,avail_railtypes, SLE_UINT8), - SLE_VAR(Player,block_preview, SLE_UINT8), + SLE_VAR(Player, player_color, SLE_UINT8), + SLE_VAR(Player, player_money_fraction, SLE_UINT8), + SLE_VAR(Player, avail_railtypes, SLE_UINT8), + SLE_VAR(Player, block_preview, SLE_UINT8), - SLE_VAR(Player,cargo_types, SLE_UINT16), - SLE_CONDVAR(Player, location_of_house, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Player, location_of_house, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Player, last_build_coordinate, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Player, last_build_coordinate, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Player, inaugurated_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Player, inaugurated_year, SLE_INT32, 31, SL_MAX_VERSION), + SLE_VAR(Player, cargo_types, SLE_UINT16), + SLE_CONDVAR(Player, location_of_house, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Player, location_of_house, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Player, last_build_coordinate, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Player, last_build_coordinate, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Player, inaugurated_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Player, inaugurated_year, SLE_INT32, 31, SL_MAX_VERSION), - SLE_ARR(Player,share_owners, SLE_UINT8, 4), + SLE_ARR(Player, share_owners, SLE_UINT8, 4), - SLE_VAR(Player,num_valid_stat_ent,SLE_UINT8), + SLE_VAR(Player, num_valid_stat_ent, SLE_UINT8), - SLE_VAR(Player,quarters_of_bankrupcy,SLE_UINT8), - SLE_VAR(Player,bankrupt_asked, SLE_UINT8), - SLE_VAR(Player,bankrupt_timeout,SLE_INT16), - SLE_VAR(Player,bankrupt_value, SLE_INT32), + SLE_VAR(Player, quarters_of_bankrupcy, SLE_UINT8), + SLE_VAR(Player, bankrupt_asked, SLE_UINT8), + SLE_VAR(Player, bankrupt_timeout, SLE_INT16), + SLE_VAR(Player, bankrupt_value, SLE_INT32), // yearly expenses was changed to 64-bit in savegame version 2. - SLE_CONDARR(Player,yearly_expenses, SLE_FILE_I32|SLE_VAR_I64, 3*13, 0, 1), - SLE_CONDARR(Player,yearly_expenses, SLE_INT64, 3*13, 2, SL_MAX_VERSION), + SLE_CONDARR(Player, yearly_expenses, SLE_FILE_I32 | SLE_VAR_I64, 3 * 13, 0, 1), + SLE_CONDARR(Player, yearly_expenses, SLE_INT64, 3 * 13, 2, SL_MAX_VERSION), - SLE_CONDVAR(Player,is_ai, SLE_BOOL, 2, SL_MAX_VERSION), - SLE_CONDVAR(Player,is_active, SLE_BOOL, 4, SL_MAX_VERSION), + SLE_CONDVAR(Player, is_ai, SLE_BOOL, 2, SL_MAX_VERSION), + SLE_CONDVAR(Player, is_active, SLE_BOOL, 4, SL_MAX_VERSION), // Engine renewal settings SLE_CONDNULL(512, 16, 18), - SLE_CONDREF(Player,engine_renew_list, REF_ENGINE_RENEWS, 19, SL_MAX_VERSION), - SLE_CONDVAR(Player,engine_renew, SLE_BOOL, 16, SL_MAX_VERSION), - SLE_CONDVAR(Player,engine_renew_months, SLE_INT16, 16, SL_MAX_VERSION), - SLE_CONDVAR(Player,engine_renew_money, SLE_UINT32, 16, SL_MAX_VERSION), - SLE_CONDVAR(Player,renew_keep_length, SLE_BOOL, 2, SL_MAX_VERSION), // added with 16.1, but was blank since 2 + SLE_CONDREF(Player, engine_renew_list, REF_ENGINE_RENEWS, 19, SL_MAX_VERSION), + SLE_CONDVAR(Player, engine_renew, SLE_BOOL, 16, SL_MAX_VERSION), + SLE_CONDVAR(Player, engine_renew_months, SLE_INT16, 16, SL_MAX_VERSION), + SLE_CONDVAR(Player, engine_renew_money, SLE_UINT32, 16, SL_MAX_VERSION), + SLE_CONDVAR(Player, renew_keep_length, SLE_BOOL, 2, SL_MAX_VERSION), // added with 16.1, but was blank since 2 // reserve extra space in savegame here. (currently 63 bytes) SLE_CONDNULL(63, 2, SL_MAX_VERSION), @@ -1167,76 +1167,76 @@ static const SaveLoad _player_desc[] = { static const SaveLoad _player_economy_desc[] = { // these were changed to 64-bit in savegame format 2 - SLE_CONDVAR(PlayerEconomyEntry,income, SLE_INT32, 0, 1), - SLE_CONDVAR(PlayerEconomyEntry,expenses, SLE_INT32, 0, 1), - SLE_CONDVAR(PlayerEconomyEntry,company_value, SLE_FILE_I32 | SLE_VAR_I64, 0, 1), - SLE_CONDVAR(PlayerEconomyEntry,income, SLE_FILE_I64 | SLE_VAR_I32, 2, SL_MAX_VERSION), - SLE_CONDVAR(PlayerEconomyEntry,expenses,SLE_FILE_I64 | SLE_VAR_I32, 2, SL_MAX_VERSION), - SLE_CONDVAR(PlayerEconomyEntry,company_value, SLE_INT64, 2, SL_MAX_VERSION), + SLE_CONDVAR(PlayerEconomyEntry, income, SLE_INT32, 0, 1), + SLE_CONDVAR(PlayerEconomyEntry, expenses, SLE_INT32, 0, 1), + SLE_CONDVAR(PlayerEconomyEntry, company_value, SLE_FILE_I32 | SLE_VAR_I64, 0, 1), + SLE_CONDVAR(PlayerEconomyEntry, income, SLE_FILE_I64 | SLE_VAR_I32, 2, SL_MAX_VERSION), + SLE_CONDVAR(PlayerEconomyEntry, expenses, SLE_FILE_I64 | SLE_VAR_I32, 2, SL_MAX_VERSION), + SLE_CONDVAR(PlayerEconomyEntry, company_value, SLE_INT64, 2, SL_MAX_VERSION), - SLE_VAR(PlayerEconomyEntry,delivered_cargo, SLE_INT32), - SLE_VAR(PlayerEconomyEntry,performance_history, SLE_INT32), + SLE_VAR(PlayerEconomyEntry, delivered_cargo, SLE_INT32), + SLE_VAR(PlayerEconomyEntry, performance_history, SLE_INT32), SLE_END() }; static const SaveLoad _player_ai_desc[] = { - SLE_VAR(PlayerAI,state, SLE_UINT8), - SLE_VAR(PlayerAI,tick, SLE_UINT8), - SLE_CONDVAR(PlayerAI,state_counter, SLE_FILE_U16 | SLE_VAR_U32, 0, 12), - SLE_CONDVAR(PlayerAI,state_counter, SLE_UINT32, 13, SL_MAX_VERSION), - SLE_VAR(PlayerAI,timeout_counter, SLE_UINT16), - - SLE_VAR(PlayerAI,state_mode, SLE_UINT8), - SLE_VAR(PlayerAI,banned_tile_count, SLE_UINT8), - SLE_VAR(PlayerAI,railtype_to_use, SLE_UINT8), - - SLE_VAR(PlayerAI,cargo_type, SLE_UINT8), - SLE_VAR(PlayerAI,num_wagons, SLE_UINT8), - SLE_VAR(PlayerAI,build_kind, SLE_UINT8), - SLE_VAR(PlayerAI,num_build_rec, SLE_UINT8), - SLE_VAR(PlayerAI,num_loco_to_build, SLE_UINT8), - SLE_VAR(PlayerAI,num_want_fullload, SLE_UINT8), - - SLE_VAR(PlayerAI,route_type_mask, SLE_UINT8), - - SLE_CONDVAR(PlayerAI, start_tile_a, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(PlayerAI, start_tile_a, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(PlayerAI, cur_tile_a, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(PlayerAI, cur_tile_a, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_VAR(PlayerAI,start_dir_a, SLE_UINT8), - SLE_VAR(PlayerAI,cur_dir_a, SLE_UINT8), - - SLE_CONDVAR(PlayerAI, start_tile_b, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(PlayerAI, start_tile_b, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(PlayerAI, cur_tile_b, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(PlayerAI, cur_tile_b, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_VAR(PlayerAI,start_dir_b, SLE_UINT8), - SLE_VAR(PlayerAI,cur_dir_b, SLE_UINT8), - - SLE_REF(PlayerAI,cur_veh, REF_VEHICLE), - - SLE_ARR(PlayerAI,wagon_list, SLE_UINT16, 9), - SLE_ARR(PlayerAI,order_list_blocks, SLE_UINT8, 20), - SLE_ARR(PlayerAI,banned_tiles, SLE_UINT16, 16), + SLE_VAR(PlayerAI, state, SLE_UINT8), + SLE_VAR(PlayerAI, tick, SLE_UINT8), + SLE_CONDVAR(PlayerAI, state_counter, SLE_FILE_U16 | SLE_VAR_U32, 0, 12), + SLE_CONDVAR(PlayerAI, state_counter, SLE_UINT32, 13, SL_MAX_VERSION), + SLE_VAR(PlayerAI, timeout_counter, SLE_UINT16), + + SLE_VAR(PlayerAI, state_mode, SLE_UINT8), + SLE_VAR(PlayerAI, banned_tile_count, SLE_UINT8), + SLE_VAR(PlayerAI, railtype_to_use, SLE_UINT8), + + SLE_VAR(PlayerAI, cargo_type, SLE_UINT8), + SLE_VAR(PlayerAI, num_wagons, SLE_UINT8), + SLE_VAR(PlayerAI, build_kind, SLE_UINT8), + SLE_VAR(PlayerAI, num_build_rec, SLE_UINT8), + SLE_VAR(PlayerAI, num_loco_to_build, SLE_UINT8), + SLE_VAR(PlayerAI, num_want_fullload, SLE_UINT8), + + SLE_VAR(PlayerAI, route_type_mask, SLE_UINT8), + + SLE_CONDVAR(PlayerAI, start_tile_a, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(PlayerAI, start_tile_a, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(PlayerAI, cur_tile_a, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(PlayerAI, cur_tile_a, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_VAR(PlayerAI, start_dir_a, SLE_UINT8), + SLE_VAR(PlayerAI, cur_dir_a, SLE_UINT8), + + SLE_CONDVAR(PlayerAI, start_tile_b, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(PlayerAI, start_tile_b, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(PlayerAI, cur_tile_b, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(PlayerAI, cur_tile_b, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_VAR(PlayerAI, start_dir_b, SLE_UINT8), + SLE_VAR(PlayerAI, cur_dir_b, SLE_UINT8), + + SLE_REF(PlayerAI, cur_veh, REF_VEHICLE), + + SLE_ARR(PlayerAI, wagon_list, SLE_UINT16, 9), + SLE_ARR(PlayerAI, order_list_blocks, SLE_UINT8, 20), + SLE_ARR(PlayerAI, banned_tiles, SLE_UINT16, 16), SLE_CONDNULL(64, 2, SL_MAX_VERSION), SLE_END() }; static const SaveLoad _player_ai_build_rec_desc[] = { - SLE_CONDVAR(AiBuildRec,spec_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(AiBuildRec,spec_tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(AiBuildRec,use_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(AiBuildRec,use_tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_VAR(AiBuildRec,rand_rng, SLE_UINT8), - SLE_VAR(AiBuildRec,cur_building_rule,SLE_UINT8), - SLE_VAR(AiBuildRec,unk6, SLE_UINT8), - SLE_VAR(AiBuildRec,unk7, SLE_UINT8), - SLE_VAR(AiBuildRec,buildcmd_a, SLE_UINT8), - SLE_VAR(AiBuildRec,buildcmd_b, SLE_UINT8), - SLE_VAR(AiBuildRec,direction, SLE_UINT8), - SLE_VAR(AiBuildRec,cargo, SLE_UINT8), + SLE_CONDVAR(AiBuildRec, spec_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(AiBuildRec, spec_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(AiBuildRec, use_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(AiBuildRec, use_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_VAR(AiBuildRec, rand_rng, SLE_UINT8), + SLE_VAR(AiBuildRec, cur_building_rule, SLE_UINT8), + SLE_VAR(AiBuildRec, unk6, SLE_UINT8), + SLE_VAR(AiBuildRec, unk7, SLE_UINT8), + SLE_VAR(AiBuildRec, buildcmd_a, SLE_UINT8), + SLE_VAR(AiBuildRec, buildcmd_b, SLE_UINT8), + SLE_VAR(AiBuildRec, direction, SLE_UINT8), + SLE_VAR(AiBuildRec, cargo, SLE_UINT8), SLE_END() }; @@ -14,7 +14,7 @@ typedef enum RailTypes { RAILTYPE_MONO = 2, RAILTYPE_MAGLEV = 3, RAILTYPE_END, - INVALID_RAILTYPE = 0xFF + INVALID_RAILTYPE = 0xFF } RailType; typedef byte RailTypeMask; @@ -47,22 +47,22 @@ static inline Track AxisToTrack(Axis a) /** Bitfield corresponding to Track */ typedef enum TrackBits { - TRACK_BIT_NONE = 0U, - TRACK_BIT_X = 1U << TRACK_X, - TRACK_BIT_Y = 1U << TRACK_Y, - TRACK_BIT_UPPER = 1U << TRACK_UPPER, - TRACK_BIT_LOWER = 1U << TRACK_LOWER, - TRACK_BIT_LEFT = 1U << TRACK_LEFT, - TRACK_BIT_RIGHT = 1U << TRACK_RIGHT, - TRACK_BIT_CROSS = TRACK_BIT_X | TRACK_BIT_Y, - TRACK_BIT_HORZ = TRACK_BIT_UPPER | TRACK_BIT_LOWER, - TRACK_BIT_VERT = TRACK_BIT_LEFT | TRACK_BIT_RIGHT, - TRACK_BIT_3WAY_NE = TRACK_BIT_X | TRACK_BIT_UPPER | TRACK_BIT_RIGHT, - TRACK_BIT_3WAY_SE = TRACK_BIT_Y | TRACK_BIT_LOWER | TRACK_BIT_RIGHT, - TRACK_BIT_3WAY_SW = TRACK_BIT_X | TRACK_BIT_LOWER | TRACK_BIT_LEFT, - TRACK_BIT_3WAY_NW = TRACK_BIT_Y | TRACK_BIT_UPPER | TRACK_BIT_LEFT, - TRACK_BIT_ALL = TRACK_BIT_CROSS | TRACK_BIT_HORZ | TRACK_BIT_VERT, - TRACK_BIT_MASK = 0x3FU + TRACK_BIT_NONE = 0U, + TRACK_BIT_X = 1U << TRACK_X, + TRACK_BIT_Y = 1U << TRACK_Y, + TRACK_BIT_UPPER = 1U << TRACK_UPPER, + TRACK_BIT_LOWER = 1U << TRACK_LOWER, + TRACK_BIT_LEFT = 1U << TRACK_LEFT, + TRACK_BIT_RIGHT = 1U << TRACK_RIGHT, + TRACK_BIT_CROSS = TRACK_BIT_X | TRACK_BIT_Y, + TRACK_BIT_HORZ = TRACK_BIT_UPPER | TRACK_BIT_LOWER, + TRACK_BIT_VERT = TRACK_BIT_LEFT | TRACK_BIT_RIGHT, + TRACK_BIT_3WAY_NE = TRACK_BIT_X | TRACK_BIT_UPPER | TRACK_BIT_RIGHT, + TRACK_BIT_3WAY_SE = TRACK_BIT_Y | TRACK_BIT_LOWER | TRACK_BIT_RIGHT, + TRACK_BIT_3WAY_SW = TRACK_BIT_X | TRACK_BIT_LOWER | TRACK_BIT_LEFT, + TRACK_BIT_3WAY_NW = TRACK_BIT_Y | TRACK_BIT_UPPER | TRACK_BIT_LEFT, + TRACK_BIT_ALL = TRACK_BIT_CROSS | TRACK_BIT_HORZ | TRACK_BIT_VERT, + TRACK_BIT_MASK = 0x3FU } TrackBits; @@ -84,16 +84,16 @@ static inline TrackBits AxisToTrackBits(Axis a) /** These are a combination of tracks and directions. Values are 0-5 in one direction (corresponding to the Track enum) and 8-13 in the other direction. */ typedef enum Trackdirs { - TRACKDIR_X_NE = 0, - TRACKDIR_Y_SE = 1, - TRACKDIR_UPPER_E = 2, - TRACKDIR_LOWER_E = 3, - TRACKDIR_LEFT_S = 4, - TRACKDIR_RIGHT_S = 5, + TRACKDIR_X_NE = 0, + TRACKDIR_Y_SE = 1, + TRACKDIR_UPPER_E = 2, + TRACKDIR_LOWER_E = 3, + TRACKDIR_LEFT_S = 4, + TRACKDIR_RIGHT_S = 5, /* Note the two missing values here. This enables trackdir -> track * conversion by doing (trackdir & 7) */ - TRACKDIR_X_SW = 8, - TRACKDIR_Y_NW = 9, + TRACKDIR_X_SW = 8, + TRACKDIR_Y_NW = 9, TRACKDIR_UPPER_W = 10, TRACKDIR_LOWER_W = 11, TRACKDIR_LEFT_N = 12, @@ -105,13 +105,13 @@ typedef enum Trackdirs { /** These are a combination of tracks and directions. Values are 0-5 in one direction (corresponding to the Track enum) and 8-13 in the other direction. */ typedef enum TrackdirBits { - TRACKDIR_BIT_NONE = 0x0, - TRACKDIR_BIT_X_NE = 0x1, - TRACKDIR_BIT_Y_SE = 0x2, - TRACKDIR_BIT_UPPER_E = 0x4, - TRACKDIR_BIT_LOWER_E = 0x8, - TRACKDIR_BIT_LEFT_S = 0x10, - TRACKDIR_BIT_RIGHT_S = 0x20, + TRACKDIR_BIT_NONE = 0x0000, + TRACKDIR_BIT_X_NE = 0x0001, + TRACKDIR_BIT_Y_SE = 0x0002, + TRACKDIR_BIT_UPPER_E = 0x0004, + TRACKDIR_BIT_LOWER_E = 0x0008, + TRACKDIR_BIT_LEFT_S = 0x0010, + TRACKDIR_BIT_RIGHT_S = 0x0020, /* Again, note the two missing values here. This enables trackdir -> track conversion by doing (trackdir & 0xFF) */ TRACKDIR_BIT_X_SW = 0x0100, TRACKDIR_BIT_Y_NW = 0x0200, @@ -205,7 +205,7 @@ extern RailtypeInfo _railtypes[RAILTYPE_END]; // these are the maximums used for updating signal blocks, and checking if a depot is in a pbs block enum { NUM_SSD_ENTRY = 256, // max amount of blocks - NUM_SSD_STACK = 32 ,// max amount of blocks to check recursively + NUM_SSD_STACK = 32, // max amount of blocks to check recursively }; /** diff --git a/rail_cmd.c b/rail_cmd.c index 4676d492b..4e623703f 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -2023,17 +2023,17 @@ static uint32 VehicleEnter_Track(Vehicle *v, TileIndex tile, int x, int y) const TileTypeProcs _tile_type_rail_procs = { - DrawTile_Track, /* draw_tile_proc */ - GetSlopeZ_Track, /* get_slope_z_proc */ - ClearTile_Track, /* clear_tile_proc */ - GetAcceptedCargo_Track, /* get_accepted_cargo_proc */ - GetTileDesc_Track, /* get_tile_desc_proc */ - GetTileTrackStatus_Track, /* get_tile_track_status_proc */ - ClickTile_Track, /* click_tile_proc */ - AnimateTile_Track, /* animate_tile_proc */ - TileLoop_Track, /* tile_loop_clear */ - ChangeTileOwner_Track, /* change_tile_owner_clear */ - NULL, /* get_produced_cargo_proc */ - VehicleEnter_Track, /* vehicle_enter_tile_proc */ - GetSlopeTileh_Track, /* get_slope_tileh_proc */ + DrawTile_Track, /* draw_tile_proc */ + GetSlopeZ_Track, /* get_slope_z_proc */ + ClearTile_Track, /* clear_tile_proc */ + GetAcceptedCargo_Track, /* get_accepted_cargo_proc */ + GetTileDesc_Track, /* get_tile_desc_proc */ + GetTileTrackStatus_Track, /* get_tile_track_status_proc */ + ClickTile_Track, /* click_tile_proc */ + AnimateTile_Track, /* animate_tile_proc */ + TileLoop_Track, /* tile_loop_clear */ + ChangeTileOwner_Track, /* change_tile_owner_clear */ + NULL, /* get_produced_cargo_proc */ + VehicleEnter_Track, /* vehicle_enter_tile_proc */ + GetSlopeTileh_Track, /* get_slope_tileh_proc */ }; diff --git a/rail_gui.c b/rail_gui.c index 68979d80f..49e9c8844 100644 --- a/rail_gui.c +++ b/rail_gui.c @@ -97,9 +97,9 @@ static void PlaceExtraDepotRail(TileIndex tile, uint16 extra) } static const uint16 _place_depot_extra[12] = { - 0x604, 0x2102, 0x1202, 0x505, - 0x2400, 0x2801, 0x1800, 0x1401, - 0x2203, 0x904, 0x0A05, 0x1103, + 0x0604, 0x2102, 0x1202, 0x0505, + 0x2400, 0x2801, 0x1800, 0x1401, + 0x2203, 0x0904, 0x0A05, 0x1103, }; @@ -501,30 +501,30 @@ static void BuildRailToolbWndProc(Window *w, WindowEvent *e) static const Widget _build_rail_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5,STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 359, 0, 13, STR_100A_RAILROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 7, 360, 371, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_STICKYBOX, RESIZE_NONE, 7, 360, 371, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_NONE, 7, 110, 113, 14, 35, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 7, 110, 113, 14, 35, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 21, 14, 35, 0x4E3, STR_1018_BUILD_RAILROAD_TRACK}, -{ WWT_PANEL, RESIZE_NONE, 7, 22, 43, 14, 35, 0x4E4, STR_1018_BUILD_RAILROAD_TRACK}, -{ WWT_PANEL, RESIZE_NONE, 7, 44, 65, 14, 35, 0x4E5, STR_1018_BUILD_RAILROAD_TRACK}, -{ WWT_PANEL, RESIZE_NONE, 7, 66, 87, 14, 35, 0x4E6, STR_1018_BUILD_RAILROAD_TRACK}, -{ WWT_PANEL, RESIZE_NONE, 7, 88, 109, 14, 35, SPR_IMG_AUTORAIL, STR_BUILD_AUTORAIL_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 21, 14, 35, 0x4E3, STR_1018_BUILD_RAILROAD_TRACK}, +{ WWT_PANEL, RESIZE_NONE, 7, 22, 43, 14, 35, 0x4E4, STR_1018_BUILD_RAILROAD_TRACK}, +{ WWT_PANEL, RESIZE_NONE, 7, 44, 65, 14, 35, 0x4E5, STR_1018_BUILD_RAILROAD_TRACK}, +{ WWT_PANEL, RESIZE_NONE, 7, 66, 87, 14, 35, 0x4E6, STR_1018_BUILD_RAILROAD_TRACK}, +{ WWT_PANEL, RESIZE_NONE, 7, 88, 109, 14, 35, SPR_IMG_AUTORAIL, STR_BUILD_AUTORAIL_TIP}, -{ WWT_PANEL, RESIZE_NONE, 7, 114, 135, 14, 35, 0x2BF, STR_018D_DEMOLISH_BUILDINGS_ETC}, -{ WWT_PANEL, RESIZE_NONE, 7, 136, 157, 14, 35, 0x50E, STR_1019_BUILD_TRAIN_DEPOT_FOR_BUILDING}, -{ WWT_PANEL, RESIZE_NONE, 7, 158, 179, 14, 35, SPR_IMG_WAYPOINT, STR_CONVERT_RAIL_TO_WAYPOINT_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 114, 135, 14, 35, 0x2BF, STR_018D_DEMOLISH_BUILDINGS_ETC}, +{ WWT_PANEL, RESIZE_NONE, 7, 136, 157, 14, 35, 0x50E, STR_1019_BUILD_TRAIN_DEPOT_FOR_BUILDING}, +{ WWT_PANEL, RESIZE_NONE, 7, 158, 179, 14, 35, SPR_IMG_WAYPOINT, STR_CONVERT_RAIL_TO_WAYPOINT_TIP}, -{ WWT_PANEL, RESIZE_NONE, 7, 180, 221, 14, 35, 0x512, STR_101A_BUILD_RAILROAD_STATION}, -{ WWT_PANEL, RESIZE_NONE, 7, 222, 243, 14, 35, 0x50B, STR_101B_BUILD_RAILROAD_SIGNALS}, -{ WWT_PANEL, RESIZE_NONE, 7, 244, 285, 14, 35, 0xA22, STR_101C_BUILD_RAILROAD_BRIDGE}, -{ WWT_PANEL, RESIZE_NONE, 7, 286, 305, 14, 35, SPR_IMG_TUNNEL_RAIL, STR_101D_BUILD_RAILROAD_TUNNEL}, -{ WWT_PANEL, RESIZE_NONE, 7, 306, 327, 14, 35, 0x2CA, STR_101E_TOGGLE_BUILD_REMOVE_FOR}, -{ WWT_PANEL, RESIZE_NONE, 7, 328, 349, 14, 35, SPR_IMG_CONVERT_RAIL, STR_CONVERT_RAIL_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 180, 221, 14, 35, 0x512, STR_101A_BUILD_RAILROAD_STATION}, +{ WWT_PANEL, RESIZE_NONE, 7, 222, 243, 14, 35, 0x50B, STR_101B_BUILD_RAILROAD_SIGNALS}, +{ WWT_PANEL, RESIZE_NONE, 7, 244, 285, 14, 35, 0xA22, STR_101C_BUILD_RAILROAD_BRIDGE}, +{ WWT_PANEL, RESIZE_NONE, 7, 286, 305, 14, 35, SPR_IMG_TUNNEL_RAIL, STR_101D_BUILD_RAILROAD_TUNNEL}, +{ WWT_PANEL, RESIZE_NONE, 7, 306, 327, 14, 35, 0x2CA, STR_101E_TOGGLE_BUILD_REMOVE_FOR}, +{ WWT_PANEL, RESIZE_NONE, 7, 328, 349, 14, 35, SPR_IMG_CONVERT_RAIL, STR_CONVERT_RAIL_TIP}, -{ WWT_PANEL, RESIZE_NONE, 7, 350, 371, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 350, 371, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, { WIDGETS_END}, }; @@ -826,66 +826,66 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) } static const Widget _station_builder_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3000_RAIL_STATION_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 199, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 7, 72, 26, 73, 0x0, STR_304E_SELECT_RAILROAD_STATION}, -{ WWT_PANEL, RESIZE_NONE, 14, 75, 140, 26, 73, 0x0, STR_304E_SELECT_RAILROAD_STATION}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 22, 36, 87, 98, STR_00CB_1, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 51, 87, 98, STR_00CC_2, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 52, 66, 87, 98, STR_00CD_3, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 67, 81, 87, 98, STR_00CE_4, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 82, 96, 87, 98, STR_00CF_5, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 97, 111, 87, 98, STR_0335_6, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 112, 126, 87, 98, STR_0336_7, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 22, 36, 112, 123, STR_00CB_1, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 51, 112, 123, STR_00CC_2, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 52, 66, 112, 123, STR_00CD_3, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 67, 81, 112, 123, STR_00CE_4, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 82, 96, 112, 123, STR_00CF_5, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 97, 111, 112, 123, STR_0335_6, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 112, 126, 112, 123, STR_0336_7, STR_3050_SELECT_LENGTH_OF_RAILROAD}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 111, 126, 137, STR_DRAG_DROP, STR_STATION_DRAG_DROP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 152, 163, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 152, 163, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 199, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 7, 72, 26, 73, 0x0, STR_304E_SELECT_RAILROAD_STATION}, +{ WWT_PANEL, RESIZE_NONE, 14, 75, 140, 26, 73, 0x0, STR_304E_SELECT_RAILROAD_STATION}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 22, 36, 87, 98, STR_00CB_1, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 51, 87, 98, STR_00CC_2, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 52, 66, 87, 98, STR_00CD_3, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 67, 81, 87, 98, STR_00CE_4, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 82, 96, 87, 98, STR_00CF_5, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 97, 111, 87, 98, STR_0335_6, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 112, 126, 87, 98, STR_0336_7, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 22, 36, 112, 123, STR_00CB_1, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 51, 112, 123, STR_00CC_2, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 52, 66, 112, 123, STR_00CD_3, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 67, 81, 112, 123, STR_00CE_4, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 82, 96, 112, 123, STR_00CF_5, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 97, 111, 112, 123, STR_0335_6, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 112, 126, 112, 123, STR_0336_7, STR_3050_SELECT_LENGTH_OF_RAILROAD}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 111, 126, 137, STR_DRAG_DROP, STR_STATION_DRAG_DROP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 152, 163, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 152, 163, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, { WIDGETS_END}, }; static const Widget _newstation_builder_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3000_RAIL_STATION_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 289, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 7, 72, 116, 163, 0x0, STR_304E_SELECT_RAILROAD_STATION}, -{ WWT_PANEL, RESIZE_NONE, 14, 75, 140, 116, 163, 0x0, STR_304E_SELECT_RAILROAD_STATION}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 22, 36, 177, 188, STR_00CB_1, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 51, 177, 188, STR_00CC_2, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 52, 66, 177, 188, STR_00CD_3, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 67, 81, 177, 188, STR_00CE_4, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 82, 96, 177, 188, STR_00CF_5, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 97, 111, 177, 188, STR_0335_6, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 112, 126, 177, 188, STR_0336_7, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 22, 36, 202, 213, STR_00CB_1, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 51, 202, 213, STR_00CC_2, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 52, 66, 202, 213, STR_00CD_3, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 67, 81, 202, 213, STR_00CE_4, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 82, 96, 202, 213, STR_00CF_5, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 97, 111, 202, 213, STR_0335_6, STR_3050_SELECT_LENGTH_OF_RAILROAD}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 112, 126, 202, 213, STR_0336_7, STR_3050_SELECT_LENGTH_OF_RAILROAD}, - -{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 111, 216, 227, STR_DRAG_DROP, STR_STATION_DRAG_DROP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 242, 253, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 242, 253, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 289, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 7, 72, 116, 163, 0x0, STR_304E_SELECT_RAILROAD_STATION}, +{ WWT_PANEL, RESIZE_NONE, 14, 75, 140, 116, 163, 0x0, STR_304E_SELECT_RAILROAD_STATION}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 22, 36, 177, 188, STR_00CB_1, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 51, 177, 188, STR_00CC_2, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 52, 66, 177, 188, STR_00CD_3, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 67, 81, 177, 188, STR_00CE_4, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 82, 96, 177, 188, STR_00CF_5, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 97, 111, 177, 188, STR_0335_6, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 112, 126, 177, 188, STR_0336_7, STR_304F_SELECT_NUMBER_OF_PLATFORMS}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 22, 36, 202, 213, STR_00CB_1, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 51, 202, 213, STR_00CC_2, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 52, 66, 202, 213, STR_00CD_3, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 67, 81, 202, 213, STR_00CE_4, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 82, 96, 202, 213, STR_00CF_5, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 97, 111, 202, 213, STR_0335_6, STR_3050_SELECT_LENGTH_OF_RAILROAD}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 112, 126, 202, 213, STR_0336_7, STR_3050_SELECT_LENGTH_OF_RAILROAD}, + +{ WWT_TEXTBTN, RESIZE_NONE, 14, 37, 111, 216, 227, STR_DRAG_DROP, STR_STATION_DRAG_DROP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 242, 253, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 242, 253, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, /* newstations gui additions */ -{ WWT_6, RESIZE_NONE, 14, 7, 140, 17, 28, STR_02BD, STR_SELECT_STATION_CLASS_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 129, 139, 18, 27, STR_0225, STR_SELECT_STATION_CLASS_TIP}, -{ WWT_MATRIX, RESIZE_NONE, 14, 7, 128, 32, 102, 0x501, STR_SELECT_STATION_TYPE_TIP}, -{ WWT_SCROLLBAR, RESIZE_NONE, 14, 129, 140, 32, 102, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_6, RESIZE_NONE, 14, 7, 140, 17, 28, STR_02BD, STR_SELECT_STATION_CLASS_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 129, 139, 18, 27, STR_0225, STR_SELECT_STATION_CLASS_TIP}, +{ WWT_MATRIX, RESIZE_NONE, 14, 7, 128, 32, 102, 0x501, STR_SELECT_STATION_TYPE_TIP}, +{ WWT_SCROLLBAR, RESIZE_NONE, 14, 129, 140, 32, 102, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WIDGETS_END}, }; @@ -963,13 +963,13 @@ static void BuildTrainDepotWndProc(Window *w, WindowEvent *e) } static const Widget _build_depot_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5,STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 139, 0, 13, STR_1014_TRAIN_DEPOT_ORIENTATION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 121, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 121, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, { WIDGETS_END}, }; @@ -1042,17 +1042,17 @@ static void BuildWaypointWndProc(Window *w, WindowEvent *e) } static const Widget _build_waypoint_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 343, 0, 13, STR_WAYPOINT,STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 343, 14, 91, 0x0, 0}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 343, 0, 13, STR_WAYPOINT, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 343, 14, 91, 0x0, 0}, -{ WWT_PANEL, RESIZE_NONE, 7, 3, 68, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, -{ WWT_PANEL, RESIZE_NONE, 7, 71, 136, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, -{ WWT_PANEL, RESIZE_NONE, 7, 139, 204, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, -{ WWT_PANEL, RESIZE_NONE, 7, 207, 272, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, -{ WWT_PANEL, RESIZE_NONE, 7, 275, 340, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 3, 68, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 71, 136, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 139, 204, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 207, 272, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, +{ WWT_PANEL, RESIZE_NONE, 7, 275, 340, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, -{ WWT_HSCROLLBAR, RESIZE_NONE, 7, 1, 343, 80, 91, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_HSCROLLBAR, RESIZE_NONE, 7, 1, 343, 80, 91, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WIDGETS_END}, }; diff --git a/rail_map.h b/rail_map.h index cf099b53b..d4f0a0386 100644 --- a/rail_map.h +++ b/rail_map.h @@ -217,7 +217,7 @@ static inline bool IsSignalPresent(TileIndex t, byte signalbit) * normal boolean evaluation, since that will make future additions easier. */ typedef enum SignalStates { - SIGNAL_STATE_RED = 0, + SIGNAL_STATE_RED = 0, SIGNAL_STATE_GREEN = 1, } SignalState; @@ -280,19 +280,19 @@ RailType GetTileRailType(TileIndex tile, Trackdir trackdir); typedef enum RailGroundType { - RAIL_GROUND_BARREN = 0, - RAIL_GROUND_GRASS = 1, - RAIL_GROUND_FENCE_NW = 2, - RAIL_GROUND_FENCE_SE = 3, - RAIL_GROUND_FENCE_SENW = 4, - RAIL_GROUND_FENCE_NE = 5, - RAIL_GROUND_FENCE_SW = 6, - RAIL_GROUND_FENCE_NESW = 7, - RAIL_GROUND_FENCE_VERT1 = 8, - RAIL_GROUND_FENCE_VERT2 = 9, + RAIL_GROUND_BARREN = 0, + RAIL_GROUND_GRASS = 1, + RAIL_GROUND_FENCE_NW = 2, + RAIL_GROUND_FENCE_SE = 3, + RAIL_GROUND_FENCE_SENW = 4, + RAIL_GROUND_FENCE_NE = 5, + RAIL_GROUND_FENCE_SW = 6, + RAIL_GROUND_FENCE_NESW = 7, + RAIL_GROUND_FENCE_VERT1 = 8, + RAIL_GROUND_FENCE_VERT2 = 9, RAIL_GROUND_FENCE_HORIZ1 = 10, RAIL_GROUND_FENCE_HORIZ2 = 11, - RAIL_GROUND_ICE_DESERT = 12, + RAIL_GROUND_ICE_DESERT = 12, } RailGroundType; static inline void SetRailGroundType(TileIndex t, RailGroundType rgt) diff --git a/road_cmd.c b/road_cmd.c index 158ade66b..6624df88f 100644 --- a/road_cmd.c +++ b/road_cmd.c @@ -1100,17 +1100,17 @@ static void ChangeTileOwner_Road(TileIndex tile, PlayerID old_player, PlayerID n const TileTypeProcs _tile_type_road_procs = { - DrawTile_Road, /* draw_tile_proc */ - GetSlopeZ_Road, /* get_slope_z_proc */ - ClearTile_Road, /* clear_tile_proc */ - GetAcceptedCargo_Road, /* get_accepted_cargo_proc */ - GetTileDesc_Road, /* get_tile_desc_proc */ - GetTileTrackStatus_Road, /* get_tile_track_status_proc */ - ClickTile_Road, /* click_tile_proc */ - AnimateTile_Road, /* animate_tile_proc */ - TileLoop_Road, /* tile_loop_clear */ - ChangeTileOwner_Road, /* change_tile_owner_clear */ - NULL, /* get_produced_cargo_proc */ - VehicleEnter_Road, /* vehicle_enter_tile_proc */ - GetSlopeTileh_Road, /* get_slope_tileh_proc */ + DrawTile_Road, /* draw_tile_proc */ + GetSlopeZ_Road, /* get_slope_z_proc */ + ClearTile_Road, /* clear_tile_proc */ + GetAcceptedCargo_Road, /* get_accepted_cargo_proc */ + GetTileDesc_Road, /* get_tile_desc_proc */ + GetTileTrackStatus_Road, /* get_tile_track_status_proc */ + ClickTile_Road, /* click_tile_proc */ + AnimateTile_Road, /* animate_tile_proc */ + TileLoop_Road, /* tile_loop_clear */ + ChangeTileOwner_Road, /* change_tile_owner_clear */ + NULL, /* get_produced_cargo_proc */ + VehicleEnter_Road, /* vehicle_enter_tile_proc */ + GetSlopeTileh_Road, /* get_slope_tileh_proc */ }; diff --git a/road_gui.c b/road_gui.c index 91575fa08..c70bcb562 100644 --- a/road_gui.c +++ b/road_gui.c @@ -283,20 +283,20 @@ static void BuildRoadToolbWndProc(Window *w, WindowEvent *e) } static const Widget _build_road_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 227, 0, 13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 7, 228, 239, 0, 13, 0x0, STR_STICKY_BUTTON}, - -{ WWT_PANEL, RESIZE_NONE, 7, 0, 21, 14, 35, SPR_IMG_ROAD_NW, STR_180B_BUILD_ROAD_SECTION}, -{ WWT_PANEL, RESIZE_NONE, 7, 22, 43, 14, 35, SPR_IMG_ROAD_NE, STR_180B_BUILD_ROAD_SECTION}, -{ WWT_PANEL, RESIZE_NONE, 7, 44, 65, 14, 35, SPR_IMG_DYNAMITE, STR_018D_DEMOLISH_BUILDINGS_ETC}, -{ WWT_PANEL, RESIZE_NONE, 7, 66, 87, 14, 35, SPR_IMG_ROAD_DEPOT, STR_180C_BUILD_ROAD_VEHICLE_DEPOT}, -{ WWT_PANEL, RESIZE_NONE, 7, 88, 109, 14, 35, SPR_IMG_BUS_STATION, STR_180D_BUILD_BUS_STATION}, -{ WWT_PANEL, RESIZE_NONE, 7, 110, 131, 14, 35, SPR_IMG_TRUCK_BAY, STR_180E_BUILD_TRUCK_LOADING_BAY}, -{ WWT_PANEL, RESIZE_NONE, 7, 132, 173, 14, 35, SPR_IMG_BRIDGE, STR_180F_BUILD_ROAD_BRIDGE}, -{ WWT_PANEL, RESIZE_NONE, 7, 174, 195, 14, 35, SPR_IMG_ROAD_TUNNEL, STR_1810_BUILD_ROAD_TUNNEL}, -{ WWT_PANEL, RESIZE_NONE, 7, 196, 217, 14, 35, SPR_IMG_REMOVE, STR_1811_TOGGLE_BUILD_REMOVE_FOR}, -{ WWT_PANEL, RESIZE_NONE, 7, 218, 239, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, +{ WWT_STICKYBOX, RESIZE_NONE, 7, 228, 239, 0, 13, 0x0, STR_STICKY_BUTTON}, + +{ WWT_PANEL, RESIZE_NONE, 7, 0, 21, 14, 35, SPR_IMG_ROAD_NW, STR_180B_BUILD_ROAD_SECTION}, +{ WWT_PANEL, RESIZE_NONE, 7, 22, 43, 14, 35, SPR_IMG_ROAD_NE, STR_180B_BUILD_ROAD_SECTION}, +{ WWT_PANEL, RESIZE_NONE, 7, 44, 65, 14, 35, SPR_IMG_DYNAMITE, STR_018D_DEMOLISH_BUILDINGS_ETC}, +{ WWT_PANEL, RESIZE_NONE, 7, 66, 87, 14, 35, SPR_IMG_ROAD_DEPOT, STR_180C_BUILD_ROAD_VEHICLE_DEPOT}, +{ WWT_PANEL, RESIZE_NONE, 7, 88, 109, 14, 35, SPR_IMG_BUS_STATION, STR_180D_BUILD_BUS_STATION}, +{ WWT_PANEL, RESIZE_NONE, 7, 110, 131, 14, 35, SPR_IMG_TRUCK_BAY, STR_180E_BUILD_TRUCK_LOADING_BAY}, +{ WWT_PANEL, RESIZE_NONE, 7, 132, 173, 14, 35, SPR_IMG_BRIDGE, STR_180F_BUILD_ROAD_BRIDGE}, +{ WWT_PANEL, RESIZE_NONE, 7, 174, 195, 14, 35, SPR_IMG_ROAD_TUNNEL, STR_1810_BUILD_ROAD_TUNNEL}, +{ WWT_PANEL, RESIZE_NONE, 7, 196, 217, 14, 35, SPR_IMG_REMOVE, STR_1811_TOGGLE_BUILD_REMOVE_FOR}, +{ WWT_PANEL, RESIZE_NONE, 7, 218, 239, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, { WIDGETS_END}, }; @@ -317,20 +317,20 @@ void ShowBuildRoadToolbar(void) } static const Widget _build_road_scen_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 161, 0, 13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 7, 162, 173, 0, 13, 0x0, STR_STICKY_BUTTON}, - -{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 21, 14, 35, 0x51D, STR_180B_BUILD_ROAD_SECTION}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 22, 43, 14, 35, 0x51E, STR_180B_BUILD_ROAD_SECTION}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 44, 65, 14, 35, 0x2BF, STR_018D_DEMOLISH_BUILDINGS_ETC}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 66, 107, 14, 35, 0xA22, STR_180F_BUILD_ROAD_BRIDGE}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 108, 129, 14, 35, 0x97D, STR_1810_BUILD_ROAD_TUNNEL}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 130, 151, 14, 35, 0x2CA, STR_1811_TOGGLE_BUILD_REMOVE_FOR}, -{ WWT_PANEL, RESIZE_NONE, 7, 152, 173, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, +{ WWT_STICKYBOX, RESIZE_NONE, 7, 162, 173, 0, 13, 0x0, STR_STICKY_BUTTON}, + +{ WWT_IMGBTN, RESIZE_NONE, 7, 0, 21, 14, 35, 0x51D, STR_180B_BUILD_ROAD_SECTION}, +{ WWT_IMGBTN, RESIZE_NONE, 7, 22, 43, 14, 35, 0x51E, STR_180B_BUILD_ROAD_SECTION}, +{ WWT_IMGBTN, RESIZE_NONE, 7, 44, 65, 14, 35, 0x2BF, STR_018D_DEMOLISH_BUILDINGS_ETC}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 7, 66, 107, 14, 35, 0xA22, STR_180F_BUILD_ROAD_BRIDGE}, +{ WWT_IMGBTN, RESIZE_NONE, 7, 108, 129, 14, 35, 0x97D, STR_1810_BUILD_ROAD_TUNNEL}, +{ WWT_IMGBTN, RESIZE_NONE, 7, 130, 151, 14, 35, 0x2CA, STR_1811_TOGGLE_BUILD_REMOVE_FOR}, +{ WWT_PANEL, RESIZE_NONE, 7, 152, 173, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, { WIDGETS_END}, }; @@ -381,13 +381,13 @@ static void BuildRoadDepotWndProc(Window *w, WindowEvent *e) } static const Widget _build_road_depot_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5,STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 139, 0, 13, STR_1806_ROAD_DEPOT_ORIENTATION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 121, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 121, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, { WIDGETS_END}, }; @@ -468,15 +468,15 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e) } static const Widget _bus_station_picker_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 139, 0, 13, STR_3042_BUS_STATION_ORIENTATION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 176, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_3051_SELECT_BUS_STATION_ORIENTATION}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_3051_SELECT_BUS_STATION_ORIENTATION}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_3051_SELECT_BUS_STATION_ORIENTATION}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_3051_SELECT_BUS_STATION_ORIENTATION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 10, 69, 133, 144, STR_02DB_OFF,STR_3065_DON_T_HIGHLIGHT_COVERAGE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 70, 129, 133, 144, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 176, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_3051_SELECT_BUS_STATION_ORIENTATION}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_3051_SELECT_BUS_STATION_ORIENTATION}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_3051_SELECT_BUS_STATION_ORIENTATION}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_3051_SELECT_BUS_STATION_ORIENTATION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 10, 69, 133, 144, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 70, 129, 133, 144, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, { WIDGETS_END}, }; @@ -494,15 +494,15 @@ static void ShowBusStationPicker(void) } static const Widget _truck_station_picker_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 139, 0, 13, STR_3043_TRUCK_STATION_ORIENT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 176, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 10, 69, 133, 144, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 70, 129, 133, 144, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 176, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 10, 69, 133, 144, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 70, 129, 133, 144, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, { WIDGETS_END}, }; diff --git a/roadveh_cmd.c b/roadveh_cmd.c index be1c091ac..88396661c 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -1204,7 +1204,7 @@ static const byte _road_veh_data_1[] = { 15, 15, 11, 11 }; -static const byte _roadveh_data_2[4] = { 0,1,8,9 }; +static const byte _roadveh_data_2[4] = { 0, 1, 8, 9 }; static void RoadVehController(Vehicle *v) { diff --git a/roadveh_gui.c b/roadveh_gui.c index dd9e52544..9a2a7515a 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -272,14 +272,14 @@ do_change_service_int: } static const Widget _roadveh_details_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 339, 0, 13, STR_900C_DETAILS,STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 340, 379, 0, 13, STR_01AA_NAME, STR_902E_NAME_ROAD_VEHICLE}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 379, 14, 55, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 379, 56, 88, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 89, 94, STR_0188, STR_884D_INCREASE_SERVICING_INTERVAL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 95, 100, STR_0189, STR_884E_DECREASE_SERVICING_INTERVAL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 11, 379, 89, 100, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 339, 0, 13, STR_900C_DETAILS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 340, 379, 0, 13, STR_01AA_NAME, STR_902E_NAME_ROAD_VEHICLE}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 379, 14, 55, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 379, 56, 88, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 89, 94, STR_0188, STR_884D_INCREASE_SERVICING_INTERVAL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 95, 100, STR_0189, STR_884E_DECREASE_SERVICING_INTERVAL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 11, 379, 89, 100, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -427,21 +427,21 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e) } static const Widget _roadveh_view_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 237, 0, 13, STR_9002, STR_018C_WINDOW_TITLE_DRAG_THIS }, -{ WWT_STICKYBOX, RESIZE_LR, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON }, -{ WWT_IMGBTN, RESIZE_RB, 14, 0, 231, 14, 103, 0x0, STR_NULL }, -{ WWT_6, RESIZE_RB, 14, 2, 229, 16, 101, 0x0, STR_NULL }, -{ WWT_PUSHIMGBTN, RESIZE_RTB, 14, 0, 237, 104, 115, 0x0, STR_901C_CURRENT_VEHICLE_ACTION }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 14, 31, 0x2AB, STR_901E_CENTER_MAIN_VIEW_ON_VEHICLE }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, 0x2AE, STR_901F_SEND_VEHICLE_TO_DEPOT }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2CB, STR_9020_FORCE_VEHICLE_TO_TURN_AROUND }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2B2, STR_901D_SHOW_VEHICLE_S_ORDERS }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 86, 103, 0x2B3, STR_9021_SHOW_ROAD_VEHICLE_DETAILS }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, SPR_CLONE_ROADVEH, STR_CLONE_ROAD_VEHICLE_INFO }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2B4, STR_REFIT_ROAD_VEHICLE_TO_CARRY }, -{ WWT_PANEL, RESIZE_LRB, 14, 232, 249, 104, 103, 0x0, STR_NULL }, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 238, 249, 104, 115, 0x0, STR_NULL }, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 237, 0, 13, STR_9002, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_STICKYBOX, RESIZE_LR, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON }, +{ WWT_IMGBTN, RESIZE_RB, 14, 0, 231, 14, 103, 0x0, STR_NULL }, +{ WWT_6, RESIZE_RB, 14, 2, 229, 16, 101, 0x0, STR_NULL }, +{ WWT_PUSHIMGBTN, RESIZE_RTB, 14, 0, 237, 104, 115, 0x0, STR_901C_CURRENT_VEHICLE_ACTION }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 14, 31, 0x2AB, STR_901E_CENTER_MAIN_VIEW_ON_VEHICLE }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, 0x2AE, STR_901F_SEND_VEHICLE_TO_DEPOT }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2CB, STR_9020_FORCE_VEHICLE_TO_TURN_AROUND }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2B2, STR_901D_SHOW_VEHICLE_S_ORDERS }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 86, 103, 0x2B3, STR_9021_SHOW_ROAD_VEHICLE_DETAILS }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, SPR_CLONE_ROADVEH, STR_CLONE_ROAD_VEHICLE_INFO }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2B4, STR_REFIT_ROAD_VEHICLE_TO_CARRY }, +{ WWT_PANEL, RESIZE_LRB, 14, 232, 249, 104, 103, 0x0, STR_NULL }, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 238, 249, 104, 115, 0x0, STR_NULL }, { WIDGETS_END } }; @@ -580,14 +580,14 @@ static void NewRoadVehWndProc(Window *w, WindowEvent *e) } static const Widget _new_road_veh_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 247, 0, 13, STR_9006_NEW_ROAD_VEHICLES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 235, 14, 125, 0x801, STR_9026_ROAD_VEHICLE_SELECTION}, -{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 236, 247, 14, 125, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_IMGBTN, RESIZE_TB, 14, 0, 247, 126, 197, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 117, 198, 209, STR_9007_BUILD_VEHICLE,STR_9027_BUILD_THE_HIGHLIGHTED_ROAD}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 118, 235, 198, 209, STR_9034_RENAME, STR_9035_RENAME_ROAD_VEHICLE_TYPE}, -{ WWT_RESIZEBOX, RESIZE_TB, 14, 236, 247, 198, 209, 0x0, STR_RESIZE_BUTTON}, +{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 235, 14, 125, 0x801, STR_9026_ROAD_VEHICLE_SELECTION}, +{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 236, 247, 14, 125, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_IMGBTN, RESIZE_TB, 14, 0, 247, 126, 197, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 117, 198, 209, STR_9007_BUILD_VEHICLE, STR_9027_BUILD_THE_HIGHLIGHTED_ROAD}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 118, 235, 198, 209, STR_9034_RENAME, STR_9035_RENAME_ROAD_VEHICLE_TYPE}, +{ WWT_RESIZEBOX, RESIZE_TB, 14, 236, 247, 198, 209, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -870,19 +870,19 @@ static void RoadDepotWndProc(Window *w, WindowEvent *e) } static const Widget _road_depot_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 302, 0, 13, STR_9003_ROAD_VEHICLE_DEPOT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 303, 314, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_LRB, 14, 280, 302, 14, 13, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_LRTB, 14, 280, 302, 14, 55, 0x2A9, STR_9024_DRAG_ROAD_VEHICLE_TO_HERE}, - -{ WWT_MATRIX, RESIZE_RB, 14, 0, 279, 14, 55, 0x305, STR_9022_VEHICLES_CLICK_ON_VEHICLE}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 303, 314, 14, 55, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 100, 56, 67, STR_9004_NEW_VEHICLES, STR_9023_BUILD_NEW_ROAD_VEHICLE}, -{WWT_NODISTXTBTN, RESIZE_TB, 14, 101, 200, 56, 67, STR_CLONE_ROAD_VEHICLE, STR_CLONE_ROAD_VEHICLE_DEPOT_INFO}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 201, 302, 56, 67, STR_00E4_LOCATION, STR_9025_CENTER_MAIN_VIEW_ON_ROAD}, -{ WWT_PANEL, RESIZE_RTB, 14, 303, 302, 56, 67, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 303, 314, 56, 67, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 302, 0, 13, STR_9003_ROAD_VEHICLE_DEPOT, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 303, 314, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PANEL, RESIZE_LRB, 14, 280, 302, 14, 13, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_LRTB, 14, 280, 302, 14, 55, 0x2A9, STR_9024_DRAG_ROAD_VEHICLE_TO_HERE}, + +{ WWT_MATRIX, RESIZE_RB, 14, 0, 279, 14, 55, 0x305, STR_9022_VEHICLES_CLICK_ON_VEHICLE}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 303, 314, 14, 55, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 100, 56, 67, STR_9004_NEW_VEHICLES, STR_9023_BUILD_NEW_ROAD_VEHICLE}, +{WWT_NODISTXTBTN, RESIZE_TB, 14, 101, 200, 56, 67, STR_CLONE_ROAD_VEHICLE, STR_CLONE_ROAD_VEHICLE_DEPOT_INFO}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 201, 302, 56, 67, STR_00E4_LOCATION, STR_9025_CENTER_MAIN_VIEW_ON_ROAD}, +{ WWT_PANEL, RESIZE_RTB, 14, 303, 302, 56, 67, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 303, 314, 56, 67, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -910,35 +910,35 @@ void ShowRoadDepotWindow(TileIndex tile) } static const Widget _player_roadveh_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_9001_ROAD_VEHICLES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, -{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 207, 0x701, STR_901A_ROAD_VEHICLES_CLICK_ON}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_9001_ROAD_VEHICLES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, +{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, +{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, +{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 207, 0x701, STR_901A_ROAD_VEHICLES_CLICK_ON}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, /* only for our road list, a 'Build Vehicle' button that opens the depot of the last built depot */ -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 124, 208, 219, STR_8815_NEW_VEHICLES, STR_901B_BUILD_NEW_ROAD_VEHICLES}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 125, 247, 208, 219, STR_REPLACE_VEHICLES, STR_REPLACE_HELP}, -{ WWT_PANEL, RESIZE_RTB, 14, 248, 247, 208, 219, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 208, 219, 0x0, STR_RESIZE_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 124, 208, 219, STR_8815_NEW_VEHICLES, STR_901B_BUILD_NEW_ROAD_VEHICLES}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 125, 247, 208, 219, STR_REPLACE_VEHICLES, STR_REPLACE_HELP}, +{ WWT_PANEL, RESIZE_RTB, 14, 248, 247, 208, 219, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 208, 219, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const Widget _other_player_roadveh_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_9001_ROAD_VEHICLES, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, -{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 207, 0x701, STR_901A_ROAD_VEHICLES_CLICK_ON}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_RTB, 14, 0, 247, 208, 219, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 208, 219, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_9001_ROAD_VEHICLES, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, +{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, +{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, +{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 207, 0x701, STR_901A_ROAD_VEHICLES_CLICK_ON}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 247, 208, 219, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 208, 219, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; diff --git a/saveload.h b/saveload.h index 6734b0014..f1ba3ec2b 100644 --- a/saveload.h +++ b/saveload.h @@ -37,12 +37,12 @@ typedef struct { } NullStruct; typedef enum SLRefType { - REF_ORDER = 0, - REF_VEHICLE = 1, - REF_STATION = 2, - REF_TOWN = 3, - REF_VEHICLE_OLD = 4, - REF_ROADSTOPS = 5, + REF_ORDER = 0, + REF_VEHICLE = 1, + REF_STATION = 2, + REF_TOWN = 3, + REF_VEHICLE_OLD = 4, + REF_ROADSTOPS = 5, REF_ENGINE_RENEWS = 6, } SLRefType; @@ -53,11 +53,11 @@ enum { }; enum { - CH_RIFF = 0, - CH_ARRAY = 1, - CH_SPARSE_ARRAY = 2, - CH_TYPE_MASK = 3, - CH_LAST = 8, + CH_RIFF = 0, + CH_ARRAY = 1, + CH_SPARSE_ARRAY = 2, + CH_TYPE_MASK = 3, + CH_LAST = 8, CH_AUTO_LENGTH = 16, CH_PRI_0 = 0 << 4, @@ -89,20 +89,20 @@ enum VarTypes { /* 6 more possible file-primitives */ /* 4 bytes allocated a maximum of 16 types for NumberType */ - SLE_VAR_BL = 0 << 4, - SLE_VAR_I8 = 1 << 4, - SLE_VAR_U8 = 2 << 4, - SLE_VAR_I16 = 3 << 4, - SLE_VAR_U16 = 4 << 4, - SLE_VAR_I32 = 5 << 4, - SLE_VAR_U32 = 6 << 4, - SLE_VAR_I64 = 7 << 4, - SLE_VAR_U64 = 8 << 4, - SLE_VAR_NULL = 9 << 4, ///< useful to write zeros in savegame. - SLE_VAR_STRB = 10 << 4, ///< normal string (with pre-allocated buffer) - SLE_VAR_STRBQ= 11 << 4, ///< string enclosed in quotes (with pre-allocated buffer) - SLE_VAR_STR = 12 << 4, ///< string pointer - SLE_VAR_STRQ = 13 << 4, ///< string enclosed in quotes + SLE_VAR_BL = 0 << 4, + SLE_VAR_I8 = 1 << 4, + SLE_VAR_U8 = 2 << 4, + SLE_VAR_I16 = 3 << 4, + SLE_VAR_U16 = 4 << 4, + SLE_VAR_I32 = 5 << 4, + SLE_VAR_U32 = 6 << 4, + SLE_VAR_I64 = 7 << 4, + SLE_VAR_U64 = 8 << 4, + SLE_VAR_NULL = 9 << 4, ///< useful to write zeros in savegame. + SLE_VAR_STRB = 10 << 4, ///< normal string (with pre-allocated buffer) + SLE_VAR_STRBQ = 11 << 4, ///< string enclosed in quotes (with pre-allocated buffer) + SLE_VAR_STR = 12 << 4, ///< string pointer + SLE_VAR_STRQ = 13 << 4, ///< string enclosed in quotes /* 2 more possible memory-primitives */ /* Shortcut values */ @@ -111,29 +111,29 @@ enum VarTypes { /* Default combinations of variables. As savegames change, so can variables * and thus it is possible that the saved value and internal size do not * match and you need to specify custom combo. The defaults are listed here */ - SLE_BOOL = SLE_FILE_I8 | SLE_VAR_BL, - SLE_INT8 = SLE_FILE_I8 | SLE_VAR_I8, - SLE_UINT8 = SLE_FILE_U8 | SLE_VAR_U8, - SLE_INT16 = SLE_FILE_I16 | SLE_VAR_I16, - SLE_UINT16 = SLE_FILE_U16 | SLE_VAR_U16, - SLE_INT32 = SLE_FILE_I32 | SLE_VAR_I32, - SLE_UINT32 = SLE_FILE_U32 | SLE_VAR_U32, - SLE_INT64 = SLE_FILE_I64 | SLE_VAR_I64, - SLE_UINT64 = SLE_FILE_U64 | SLE_VAR_U64, - SLE_CHAR = SLE_FILE_I8 | SLE_VAR_CHAR, - SLE_STRINGID = SLE_FILE_STRINGID | SLE_VAR_U16, - SLE_STRINGBUF = SLE_FILE_STRING | SLE_VAR_STRB, - SLE_STRINGBQUOTE= SLE_FILE_STRING | SLE_VAR_STRBQ, - SLE_STRING = SLE_FILE_STRING | SLE_VAR_STR, - SLE_STRINGQUOTE = SLE_FILE_STRING | SLE_VAR_STRQ, + SLE_BOOL = SLE_FILE_I8 | SLE_VAR_BL, + SLE_INT8 = SLE_FILE_I8 | SLE_VAR_I8, + SLE_UINT8 = SLE_FILE_U8 | SLE_VAR_U8, + SLE_INT16 = SLE_FILE_I16 | SLE_VAR_I16, + SLE_UINT16 = SLE_FILE_U16 | SLE_VAR_U16, + SLE_INT32 = SLE_FILE_I32 | SLE_VAR_I32, + SLE_UINT32 = SLE_FILE_U32 | SLE_VAR_U32, + SLE_INT64 = SLE_FILE_I64 | SLE_VAR_I64, + SLE_UINT64 = SLE_FILE_U64 | SLE_VAR_U64, + SLE_CHAR = SLE_FILE_I8 | SLE_VAR_CHAR, + SLE_STRINGID = SLE_FILE_STRINGID | SLE_VAR_U16, + SLE_STRINGBUF = SLE_FILE_STRING | SLE_VAR_STRB, + SLE_STRINGBQUOTE = SLE_FILE_STRING | SLE_VAR_STRBQ, + SLE_STRING = SLE_FILE_STRING | SLE_VAR_STR, + SLE_STRINGQUOTE = SLE_FILE_STRING | SLE_VAR_STRQ, /* Shortcut values */ - SLE_UINT = SLE_UINT32, - SLE_INT = SLE_INT32, - SLE_STRB = SLE_STRINGBUF, - SLE_STRBQ= SLE_STRINGBQUOTE, - SLE_STR = SLE_STRING, - SLE_STRQ = SLE_STRINGQUOTE, + SLE_UINT = SLE_UINT32, + SLE_INT = SLE_INT32, + SLE_STRB = SLE_STRINGBUF, + SLE_STRBQ = SLE_STRINGBQUOTE, + SLE_STR = SLE_STRING, + SLE_STRQ = SLE_STRINGQUOTE, /* 8 bytes allocated for a maximum of 8 flags * Flags directing saving/loading of a variable */ @@ -146,13 +146,13 @@ enum VarTypes { typedef uint32 VarType; enum SaveLoadTypes { - SL_VAR = 0, - SL_REF = 1, - SL_ARR = 2, - SL_STR = 3, + SL_VAR = 0, + SL_REF = 1, + SL_ARR = 2, + SL_STR = 3, // non-normal save-load types - SL_WRITEBYTE = 8, - SL_INCLUDE = 9, + SL_WRITEBYTE = 8, + SL_INCLUDE = 9, SL_END = 15 }; diff --git a/settings.c b/settings.c index 098f25763..f27e8613b 100644 --- a/settings.c +++ b/settings.c @@ -1146,14 +1146,14 @@ static int32 EngineRenewMoneyUpdate(int32 p1) #endif static const SettingDesc _music_settings[] = { - SDT_VAR(MusicFileSettings, playlist, SLE_UINT8, S, 0, 0, 0, 5, STR_NULL, NULL), - SDT_VAR(MusicFileSettings, music_vol, SLE_UINT8, S, 0, 128, 0, 100, STR_NULL, NULL), - SDT_VAR(MusicFileSettings, effect_vol,SLE_UINT8, S, 0, 128, 0, 100, STR_NULL, NULL), - SDT_LIST(MusicFileSettings, custom_1, SLE_UINT8, S, 0, NULL, STR_NULL, NULL), - SDT_LIST(MusicFileSettings, custom_2, SLE_UINT8, S, 0, NULL, STR_NULL, NULL), - SDT_BOOL(MusicFileSettings, playing, S, 0, true, STR_NULL, NULL), - SDT_BOOL(MusicFileSettings, shuffle, S, 0,false, STR_NULL, NULL), - SDT_STR(MusicFileSettings, extmidi, SLE_STRB, S, 0, EXTERNAL_PLAYER,STR_NULL, NULL), + SDT_VAR(MusicFileSettings, playlist, SLE_UINT8, S, 0, 0, 0, 5, STR_NULL, NULL), + SDT_VAR(MusicFileSettings, music_vol, SLE_UINT8, S, 0, 128, 0, 100, STR_NULL, NULL), + SDT_VAR(MusicFileSettings, effect_vol, SLE_UINT8, S, 0, 128, 0, 100, STR_NULL, NULL), + SDT_LIST(MusicFileSettings, custom_1, SLE_UINT8, S, 0, NULL, STR_NULL, NULL), + SDT_LIST(MusicFileSettings, custom_2, SLE_UINT8, S, 0, NULL, STR_NULL, NULL), + SDT_BOOL(MusicFileSettings, playing, S, 0, true, STR_NULL, NULL), + SDT_BOOL(MusicFileSettings, shuffle, S, 0, false, STR_NULL, NULL), + SDT_STR(MusicFileSettings, extmidi, SLE_STRB, S, 0, EXTERNAL_PLAYER, STR_NULL, NULL), SDT_END() }; diff --git a/settings.h b/settings.h index 904abca77..5e57f1774 100644 --- a/settings.h +++ b/settings.h @@ -62,7 +62,7 @@ typedef SettingDesc SettingDescGlobVarList; typedef enum { IGT_VARIABLES = 0, ///< values of the form "landscape = hilly" - IGT_LIST = 1, ///< a list of values, seperated by \n and terminated by the next group block + IGT_LIST = 1, ///< a list of values, seperated by \n and terminated by the next group block } IniGroupType; /** Get the address of the variable. Which one to pick depends on the object diff --git a/settings_gui.c b/settings_gui.c index edb5804b2..350b7aa7f 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -237,42 +237,42 @@ int32 CmdSetRoadDriveSide(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) } static const Widget _game_options_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 369, 0, 13, STR_00B1_GAME_OPTIONS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 14, 0, 369, 14, 238, 0x0, STR_NULL}, -{ WWT_FRAME, RESIZE_NONE, 14, 10, 179, 20, 55, STR_02E0_CURRENCY_UNITS, STR_NULL}, -{ WWT_6, RESIZE_NONE, 14, 20, 169, 34, 45, STR_02E1, STR_02E2_CURRENCY_UNITS_SELECTION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 158, 168, 35, 44, STR_0225, STR_02E2_CURRENCY_UNITS_SELECTION}, -{ WWT_FRAME, RESIZE_NONE, 14, 190, 359, 20, 55, STR_MEASURING_UNITS, STR_NULL}, -{ WWT_6, RESIZE_NONE, 14, 200, 349, 34, 45, STR_02E4, STR_MEASURING_UNITS_SELECTION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 338, 348, 35, 44, STR_0225, STR_MEASURING_UNITS_SELECTION}, -{ WWT_FRAME, RESIZE_NONE, 14, 10, 179, 62, 97, STR_02E6_ROAD_VEHICLES, STR_NULL}, -{ WWT_6, RESIZE_NONE, 14, 20, 169, 76, 87, STR_02E7, STR_02E8_SELECT_SIDE_OF_ROAD_FOR}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 158, 168, 77, 86, STR_0225, STR_02E8_SELECT_SIDE_OF_ROAD_FOR}, -{ WWT_FRAME, RESIZE_NONE, 14, 190, 359, 62, 97, STR_02EB_TOWN_NAMES, STR_NULL}, -{ WWT_6, RESIZE_NONE, 14, 200, 349, 76, 87, STR_02EC, STR_02ED_SELECT_STYLE_OF_TOWN_NAMES}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 338, 348, 77, 86, STR_0225, STR_02ED_SELECT_STYLE_OF_TOWN_NAMES}, -{ WWT_FRAME, RESIZE_NONE, 14, 10, 179, 104, 139, STR_02F4_AUTOSAVE, STR_NULL}, -{ WWT_6, RESIZE_NONE, 14, 20, 169, 118, 129, STR_02F5, STR_02F6_SELECT_INTERVAL_BETWEEN}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 158, 168, 119, 128, STR_0225, STR_02F6_SELECT_INTERVAL_BETWEEN}, - -{ WWT_FRAME, RESIZE_NONE, 14, 10, 359, 194, 228, STR_02BC_VEHICLE_DESIGN_NAMES, STR_NULL}, -{ WWT_6, RESIZE_NONE, 14, 20, 119, 207, 218, STR_02BD, STR_02C1_VEHICLE_DESIGN_NAMES_SELECTION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 108, 118, 208, 217, STR_0225, STR_02C1_VEHICLE_DESIGN_NAMES_SELECTION}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 130, 349, 207, 218, STR_02C0_SAVE_CUSTOM_NAMES, STR_02C2_SAVE_CUSTOMIZED_VEHICLE}, - -{ WWT_FRAME, RESIZE_NONE, 14, 190, 359, 104, 139, STR_OPTIONS_LANG, STR_NULL}, -{ WWT_6, RESIZE_NONE, 14, 200, 349, 118, 129, STR_OPTIONS_LANG_CBO, STR_OPTIONS_LANG_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 338, 348, 119, 128, STR_0225, STR_OPTIONS_LANG_TIP}, - -{ WWT_FRAME, RESIZE_NONE, 14, 10, 179, 146, 190, STR_OPTIONS_RES, STR_NULL}, -{ WWT_6, RESIZE_NONE, 14, 20, 169, 160, 171, STR_OPTIONS_RES_CBO, STR_OPTIONS_RES_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 158, 168, 161, 170, STR_0225, STR_OPTIONS_RES_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 149, 169, 176, 184, STR_EMPTY, STR_OPTIONS_FULLSCREEN_TIP}, - -{ WWT_FRAME, RESIZE_NONE, 14, 190, 359, 146, 190, STR_OPTIONS_SCREENSHOT_FORMAT, STR_NULL}, -{ WWT_6, RESIZE_NONE, 14, 200, 349, 160, 171, STR_OPTIONS_SCREENSHOT_FORMAT_CBO, STR_OPTIONS_SCREENSHOT_FORMAT_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 338, 348, 161, 170, STR_0225, STR_OPTIONS_SCREENSHOT_FORMAT_TIP}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 369, 0, 13, STR_00B1_GAME_OPTIONS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 369, 14, 238, 0x0, STR_NULL}, +{ WWT_FRAME, RESIZE_NONE, 14, 10, 179, 20, 55, STR_02E0_CURRENCY_UNITS, STR_NULL}, +{ WWT_6, RESIZE_NONE, 14, 20, 169, 34, 45, STR_02E1, STR_02E2_CURRENCY_UNITS_SELECTION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 158, 168, 35, 44, STR_0225, STR_02E2_CURRENCY_UNITS_SELECTION}, +{ WWT_FRAME, RESIZE_NONE, 14, 190, 359, 20, 55, STR_MEASURING_UNITS, STR_NULL}, +{ WWT_6, RESIZE_NONE, 14, 200, 349, 34, 45, STR_02E4, STR_MEASURING_UNITS_SELECTION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 338, 348, 35, 44, STR_0225, STR_MEASURING_UNITS_SELECTION}, +{ WWT_FRAME, RESIZE_NONE, 14, 10, 179, 62, 97, STR_02E6_ROAD_VEHICLES, STR_NULL}, +{ WWT_6, RESIZE_NONE, 14, 20, 169, 76, 87, STR_02E7, STR_02E8_SELECT_SIDE_OF_ROAD_FOR}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 158, 168, 77, 86, STR_0225, STR_02E8_SELECT_SIDE_OF_ROAD_FOR}, +{ WWT_FRAME, RESIZE_NONE, 14, 190, 359, 62, 97, STR_02EB_TOWN_NAMES, STR_NULL}, +{ WWT_6, RESIZE_NONE, 14, 200, 349, 76, 87, STR_02EC, STR_02ED_SELECT_STYLE_OF_TOWN_NAMES}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 338, 348, 77, 86, STR_0225, STR_02ED_SELECT_STYLE_OF_TOWN_NAMES}, +{ WWT_FRAME, RESIZE_NONE, 14, 10, 179, 104, 139, STR_02F4_AUTOSAVE, STR_NULL}, +{ WWT_6, RESIZE_NONE, 14, 20, 169, 118, 129, STR_02F5, STR_02F6_SELECT_INTERVAL_BETWEEN}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 158, 168, 119, 128, STR_0225, STR_02F6_SELECT_INTERVAL_BETWEEN}, + +{ WWT_FRAME, RESIZE_NONE, 14, 10, 359, 194, 228, STR_02BC_VEHICLE_DESIGN_NAMES, STR_NULL}, +{ WWT_6, RESIZE_NONE, 14, 20, 119, 207, 218, STR_02BD, STR_02C1_VEHICLE_DESIGN_NAMES_SELECTION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 108, 118, 208, 217, STR_0225, STR_02C1_VEHICLE_DESIGN_NAMES_SELECTION}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 130, 349, 207, 218, STR_02C0_SAVE_CUSTOM_NAMES, STR_02C2_SAVE_CUSTOMIZED_VEHICLE}, + +{ WWT_FRAME, RESIZE_NONE, 14, 190, 359, 104, 139, STR_OPTIONS_LANG, STR_NULL}, +{ WWT_6, RESIZE_NONE, 14, 200, 349, 118, 129, STR_OPTIONS_LANG_CBO, STR_OPTIONS_LANG_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 338, 348, 119, 128, STR_0225, STR_OPTIONS_LANG_TIP}, + +{ WWT_FRAME, RESIZE_NONE, 14, 10, 179, 146, 190, STR_OPTIONS_RES, STR_NULL}, +{ WWT_6, RESIZE_NONE, 14, 20, 169, 160, 171, STR_OPTIONS_RES_CBO, STR_OPTIONS_RES_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 158, 168, 161, 170, STR_0225, STR_OPTIONS_RES_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 149, 169, 176, 184, STR_EMPTY, STR_OPTIONS_FULLSCREEN_TIP}, + +{ WWT_FRAME, RESIZE_NONE, 14, 190, 359, 146, 190, STR_OPTIONS_SCREENSHOT_FORMAT, STR_NULL}, +{ WWT_6, RESIZE_NONE, 14, 200, 349, 160, 171, STR_OPTIONS_SCREENSHOT_FORMAT_CBO, STR_OPTIONS_SCREENSHOT_FORMAT_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 338, 348, 161, 170, STR_0225, STR_OPTIONS_SCREENSHOT_FORMAT_TIP}, { WIDGETS_END}, }; @@ -349,9 +349,9 @@ static inline bool GetBitAndShift(uint32 *b) */ static const int16 _default_game_diff[3][GAME_DIFFICULTY_NUM] = { /* A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R*/ - {2, 2, 1, 3, 300, 2, 0, 2, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0}, //easy - {4, 1, 1, 2, 150, 3, 1, 3, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1}, //medium - {7, 0, 2, 2, 100, 4, 1, 3, 2, 2, 0, 2, 3, 2, 1, 1, 1, 2}, //hard + {2, 2, 1, 3, 300, 2, 0, 2, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0}, //easy + {4, 1, 1, 2, 150, 3, 1, 3, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1}, //medium + {7, 0, 2, 2, 100, 4, 1, 3, 2, 2, 0, 2, 3, 2, 1, 1, 1, 2}, //hard }; void SetDifficultyLevel(int mode, GameOptions *gm_opt) @@ -525,18 +525,18 @@ static void GameDifficultyWndProc(Window *w, WindowEvent *e) #undef DIFF_INGAME_DISABLED_BUTTONS static const Widget _game_difficulty_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 10, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 10, 11, 369, 0, 13, STR_6800_DIFFICULTY_LEVEL, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 14, 29, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 10, 96, 16, 27, STR_6801_EASY, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 97, 183, 16, 27, STR_6802_MEDIUM, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 184, 270, 16, 27, STR_6803_HARD, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 271, 357, 16, 27, STR_6804_CUSTOM, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 10, 0, 369, 30, 41, STR_6838_SHOW_HI_SCORE_CHART,STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 42, 262, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 263, 278, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 105, 185, 265, 276, STR_OPTIONS_SAVE_CHANGES, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 186, 266, 265, 276, STR_012E_CANCEL, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 10, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 10, 11, 369, 0, 13, STR_6800_DIFFICULTY_LEVEL, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 14, 29, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 10, 96, 16, 27, STR_6801_EASY, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 97, 183, 16, 27, STR_6802_MEDIUM, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 184, 270, 16, 27, STR_6803_HARD, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 271, 357, 16, 27, STR_6804_CUSTOM, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 10, 0, 369, 30, 41, STR_6838_SHOW_HI_SCORE_CHART, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 42, 262, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 263, 278, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 105, 185, 265, 276, STR_OPTIONS_SAVE_CHANGES, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 186, 266, 265, 276, STR_012E_CANCEL, STR_NULL}, { WIDGETS_END}, }; @@ -882,17 +882,17 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e) } static const Widget _patches_selection_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 10, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 10, 11, 369, 0, 13, STR_CONFIG_PATCHES_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 14, 41, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 42, 360, 0x0, STR_NULL}, - -{ WWT_TEXTBTN, RESIZE_NONE, 3, 10, 96, 16, 27, STR_CONFIG_PATCHES_GUI, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 3, 97, 183, 16, 27, STR_CONFIG_PATCHES_CONSTRUCTION, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 3, 184, 270, 16, 27, STR_CONFIG_PATCHES_VEHICLES, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 3, 271, 357, 16, 27, STR_CONFIG_PATCHES_STATIONS, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 3, 10, 96, 28, 39, STR_CONFIG_PATCHES_ECONOMY, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 3, 97, 183, 28, 39, STR_CONFIG_PATCHES_AI, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 10, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 10, 11, 369, 0, 13, STR_CONFIG_PATCHES_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 14, 41, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 10, 0, 369, 42, 360, 0x0, STR_NULL}, + +{ WWT_TEXTBTN, RESIZE_NONE, 3, 10, 96, 16, 27, STR_CONFIG_PATCHES_GUI, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 3, 97, 183, 16, 27, STR_CONFIG_PATCHES_CONSTRUCTION, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 3, 184, 270, 16, 27, STR_CONFIG_PATCHES_VEHICLES, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 3, 271, 357, 16, 27, STR_CONFIG_PATCHES_STATIONS, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 3, 10, 96, 28, 39, STR_CONFIG_PATCHES_ECONOMY, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 3, 97, 183, 28, 39, STR_CONFIG_PATCHES_AI, STR_NULL}, { WIDGETS_END}, }; @@ -1006,19 +1006,19 @@ static void NewgrfWndProc(Window *w, WindowEvent *e) } static const Widget _newgrf_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 279, 0, 13, STR_NEWGRF_SETTINGS_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 14, 0, 279, 183, 276, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 279, 0, 13, STR_NEWGRF_SETTINGS_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 279, 183, 276, 0x0, STR_NULL}, -{ WWT_MATRIX, RESIZE_NONE, 14, 0, 267, 14, 182, 0xC01,/*small rows*/ STR_NEWGRF_TIP}, -{ WWT_SCROLLBAR, RESIZE_NONE, 14, 268, 279, 14, 182, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_MATRIX, RESIZE_NONE, 14, 0, 267, 14, 182, 0xC01, /*small rows*/ STR_NEWGRF_TIP}, +{ WWT_SCROLLBAR, RESIZE_NONE, 14, 268, 279, 14, 182, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 147, 158, 244, 255, STR_0188, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 159, 170, 244, 255, STR_0189, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 175, 274, 244, 255, STR_NEWGRF_SET_PARAMETERS, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 147, 158, 244, 255, STR_0188, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 159, 170, 244, 255, STR_0189, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 175, 274, 244, 255, STR_NEWGRF_SET_PARAMETERS, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 5, 138, 261, 272, STR_NEWGRF_APPLY_CHANGES, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 142, 274, 261, 272, STR_012E_CANCEL, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 5, 138, 261, 272, STR_NEWGRF_APPLY_CHANGES, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 142, 274, 261, 272, STR_012E_CANCEL, STR_NULL}, { WIDGETS_END}, }; @@ -1261,9 +1261,9 @@ static void CustCurrencyWndProc(Window *w, WindowEvent *e) } static const Widget _cust_currency_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 229, 0, 13, STR_CURRENCY_WINDOW, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 14, 0, 229, 14, 119, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 229, 0, 13, STR_CURRENCY_WINDOW, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 229, 14, 119, 0x0, STR_NULL}, { WIDGETS_END}, }; diff --git a/ship_cmd.c b/ship_cmd.c index ac0492925..4b4d49d9f 100644 --- a/ship_cmd.c +++ b/ship_cmd.c @@ -287,14 +287,14 @@ static void UpdateShipDeltaXY(Vehicle *v, int dir) { #define MKIT(d,c,b,a) ((a&0xFF)<<24) | ((b&0xFF)<<16) | ((c&0xFF)<<8) | ((d&0xFF)<<0) static const uint32 _delta_xy_table[8] = { - MKIT( -3, -3, 6, 6), - MKIT(-16, -3, 32, 6), - MKIT( -3, -3, 6, 6), - MKIT( -3,-16, 6, 32), - MKIT( -3, -3, 6, 6), - MKIT(-16, -3, 32, 6), - MKIT( -3, -3, 6, 6), - MKIT( -3,-16, 6, 32), + MKIT( -3, -3, 6, 6), + MKIT(-16, -3, 32, 6), + MKIT( -3, -3, 6, 6), + MKIT( -3, -16, 6, 32), + MKIT( -3, -3, 6, 6), + MKIT(-16, -3, 32, 6), + MKIT( -3, -3, 6, 6), + MKIT( -3, -16, 6, 32), }; #undef MKIT uint32 x = _delta_xy_table[dir]; diff --git a/ship_gui.c b/ship_gui.c index ff0c73d32..d232f23a9 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -127,11 +127,11 @@ static void ShipRefitWndProc(Window *w, WindowEvent *e) static const Widget _ship_refit_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_983D_SELECT_TYPE_OF_CARGO_FOR}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_983C_REFIT_SHIP, STR_983E_REFIT_SHIP_TO_CARRY_HIGHLIGHTED}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_983D_SELECT_TYPE_OF_CARGO_FOR}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_983C_REFIT_SHIP, STR_983E_REFIT_SHIP_TO_CARRY_HIGHLIGHTED}, { WIDGETS_END}, }; @@ -268,14 +268,14 @@ do_change_service_int: static const Widget _ship_details_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 364, 0, 13, STR_9811_DETAILS,STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 365, 404, 0, 13, STR_01AA_NAME, STR_982F_NAME_SHIP}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 404, 14, 55, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 404, 56, 88, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 89, 94, STR_0188, STR_884D_INCREASE_SERVICING_INTERVAL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 95, 100, STR_0189, STR_884E_DECREASE_SERVICING_INTERVAL}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 11, 404, 89, 100, 0x0, STR_NULL}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 364, 0, 13, STR_9811_DETAILS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 365, 404, 0, 13, STR_01AA_NAME, STR_982F_NAME_SHIP}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 404, 14, 55, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 404, 56, 88, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 89, 94, STR_0188, STR_884D_INCREASE_SERVICING_INTERVAL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 95, 100, STR_0189, STR_884E_DECREASE_SERVICING_INTERVAL}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 11, 404, 89, 100, 0x0, STR_NULL}, { WIDGETS_END}, }; @@ -411,14 +411,14 @@ static void NewShipWndProc(Window *w, WindowEvent *e) } static const Widget _new_ship_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 254, 0, 13, STR_9808_NEW_SHIPS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 242, 14, 109, 0x401, STR_9825_SHIP_SELECTION_LIST_CLICK}, -{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 243, 254, 14, 109, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_IMGBTN, RESIZE_TB, 14, 0, 254, 110, 161, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 121, 162, 173, STR_9809_BUILD_SHIP, STR_9826_BUILD_THE_HIGHLIGHTED_SHIP}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 122, 242, 162, 173, STR_9836_RENAME, STR_9837_RENAME_SHIP_TYPE}, -{ WWT_RESIZEBOX, RESIZE_TB, 14, 243, 254, 162, 173, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 254, 0, 13, STR_9808_NEW_SHIPS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 242, 14, 109, 0x401, STR_9825_SHIP_SELECTION_LIST_CLICK}, +{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 243, 254, 14, 109, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_IMGBTN, RESIZE_TB, 14, 0, 254, 110, 161, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 121, 162, 173, STR_9809_BUILD_SHIP, STR_9826_BUILD_THE_HIGHLIGHTED_SHIP}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 122, 242, 162, 173, STR_9836_RENAME, STR_9837_RENAME_SHIP_TYPE}, +{ WWT_RESIZEBOX, RESIZE_TB, 14, 243, 254, 162, 173, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -571,20 +571,20 @@ static void ShipViewWndProc(Window *w, WindowEvent *e) } static const Widget _ship_view_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 237, 0, 13, STR_980F, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_IMGBTN, RESIZE_RB, 14, 0, 231, 14, 103, 0x0, STR_NULL}, -{ WWT_6, RESIZE_RB, 14, 2, 229, 16, 101, 0x0, STR_NULL}, -{ WWT_PUSHIMGBTN, RESIZE_RTB, 14, 0, 237, 104, 115, 0x0, STR_9827_CURRENT_SHIP_ACTION_CLICK}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 14, 31, 0x2AB, STR_9829_CENTER_MAIN_VIEW_ON_SHIP}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, 0x2B0, STR_982A_SEND_SHIP_TO_DEPOT}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2B4, STR_983A_REFIT_CARGO_SHIP_TO_CARRY}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2B2, STR_9828_SHOW_SHIP_S_ORDERS}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 86, 103, 0x2B3, STR_982B_SHOW_SHIP_DETAILS}, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, SPR_CLONE_SHIP, STR_CLONE_SHIP_INFO}, -{ WWT_PANEL, RESIZE_LRB, 14, 232, 249, 104, 103, 0x0, STR_NULL }, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 238, 249, 104, 115, 0x0, STR_NULL }, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 237, 0, 13, STR_980F, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_IMGBTN, RESIZE_RB, 14, 0, 231, 14, 103, 0x0, STR_NULL}, +{ WWT_6, RESIZE_RB, 14, 2, 229, 16, 101, 0x0, STR_NULL}, +{ WWT_PUSHIMGBTN, RESIZE_RTB, 14, 0, 237, 104, 115, 0x0, STR_9827_CURRENT_SHIP_ACTION_CLICK}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 14, 31, 0x2AB, STR_9829_CENTER_MAIN_VIEW_ON_SHIP}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, 0x2B0, STR_982A_SEND_SHIP_TO_DEPOT}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2B4, STR_983A_REFIT_CARGO_SHIP_TO_CARRY}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2B2, STR_9828_SHOW_SHIP_S_ORDERS}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 86, 103, 0x2B3, STR_982B_SHOW_SHIP_DETAILS}, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, SPR_CLONE_SHIP, STR_CLONE_SHIP_INFO}, +{ WWT_PANEL, RESIZE_LRB, 14, 232, 249, 104, 103, 0x0, STR_NULL }, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 238, 249, 104, 115, 0x0, STR_NULL }, { WIDGETS_END } }; @@ -854,19 +854,19 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e) } static const Widget _ship_depot_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 292, 0, 13, STR_9803_SHIP_DEPOT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 293, 304, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_LRB, 14, 270, 292, 14, 13, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_LRTB, 14, 270, 292, 14, 61, 0x2A9, STR_9821_DRAG_SHIP_TO_HERE_TO_SELL}, - -{ WWT_MATRIX, RESIZE_RB, 14, 0, 269, 14, 61, 0x203, STR_981F_SHIPS_CLICK_ON_SHIP_FOR}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 293, 304, 14, 61, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 96, 62, 73, STR_9804_NEW_SHIPS, STR_9820_BUILD_NEW_SHIP}, -{WWT_NODISTXTBTN, RESIZE_TB, 14, 97, 194, 62, 73, STR_CLONE_SHIP, STR_CLONE_SHIP_DEPOT_INFO}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 195, 292, 62, 73, STR_00E4_LOCATION, STR_9822_CENTER_MAIN_VIEW_ON_SHIP}, -{ WWT_PANEL, RESIZE_RTB, 14, 293, 292, 62, 73, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 293, 304, 62, 73, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 292, 0, 13, STR_9803_SHIP_DEPOT, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 293, 304, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PANEL, RESIZE_LRB, 14, 270, 292, 14, 13, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_LRTB, 14, 270, 292, 14, 61, 0x2A9, STR_9821_DRAG_SHIP_TO_HERE_TO_SELL}, + +{ WWT_MATRIX, RESIZE_RB, 14, 0, 269, 14, 61, 0x203, STR_981F_SHIPS_CLICK_ON_SHIP_FOR}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 293, 304, 14, 61, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 96, 62, 73, STR_9804_NEW_SHIPS, STR_9820_BUILD_NEW_SHIP}, +{WWT_NODISTXTBTN, RESIZE_TB, 14, 97, 194, 62, 73, STR_CLONE_SHIP, STR_CLONE_SHIP_DEPOT_INFO}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 195, 292, 62, 73, STR_00E4_LOCATION, STR_9822_CENTER_MAIN_VIEW_ON_SHIP}, +{ WWT_PANEL, RESIZE_RTB, 14, 293, 292, 62, 73, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 293, 304, 62, 73, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -919,34 +919,34 @@ static void DrawSmallOrderList(const Vehicle *v, int x, int y) static const Widget _player_ships_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_9805_SHIPS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, -{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 169, 0x401, STR_9823_SHIPS_CLICK_ON_SHIP_FOR}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 124, 170, 181, STR_9804_NEW_SHIPS, STR_9824_BUILD_NEW_SHIPS_REQUIRES}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 125, 247, 170, 181, STR_REPLACE_VEHICLES, STR_REPLACE_HELP}, -{ WWT_PANEL, RESIZE_RTB, 14, 248, 247, 170, 181, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 170, 181, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_9805_SHIPS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, +{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, +{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, +{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 169, 0x401, STR_9823_SHIPS_CLICK_ON_SHIP_FOR}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 124, 170, 181, STR_9804_NEW_SHIPS, STR_9824_BUILD_NEW_SHIPS_REQUIRES}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 125, 247, 170, 181, STR_REPLACE_VEHICLES, STR_REPLACE_HELP}, +{ WWT_PANEL, RESIZE_RTB, 14, 248, 247, 170, 181, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 170, 181, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const Widget _other_player_ships_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_9805_SHIPS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, -{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 169, 0x401, STR_9823_SHIPS_CLICK_ON_SHIP_FOR}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_RTB, 14, 0, 247, 170, 181, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 170, 181, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 247, 0, 13, STR_9805_SHIPS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, +{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, +{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 259, 14, 25, 0x0, STR_NULL}, +{ WWT_MATRIX, RESIZE_RB, 14, 0, 247, 26, 169, 0x401, STR_9823_SHIPS_CLICK_ON_SHIP_FOR}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 248, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 247, 170, 181, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 248, 259, 170, 181, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -226,13 +226,13 @@ void InitializeSigns(void) } static const SaveLoad _sign_desc[] = { - SLE_VAR(SignStruct,str, SLE_UINT16), - SLE_CONDVAR(SignStruct,x, SLE_FILE_I16 | SLE_VAR_I32, 0, 4), - SLE_CONDVAR(SignStruct,y, SLE_FILE_I16 | SLE_VAR_I32, 0, 4), - SLE_CONDVAR(SignStruct,x, SLE_INT32, 5, SL_MAX_VERSION), - SLE_CONDVAR(SignStruct,y, SLE_INT32, 5, SL_MAX_VERSION), - SLE_CONDVAR(SignStruct,owner, SLE_UINT8, 6, SL_MAX_VERSION), - SLE_VAR(SignStruct,z, SLE_UINT8), + SLE_VAR(SignStruct, str, SLE_UINT16), + SLE_CONDVAR(SignStruct, x, SLE_FILE_I16 | SLE_VAR_I32, 0, 4), + SLE_CONDVAR(SignStruct, y, SLE_FILE_I16 | SLE_VAR_I32, 0, 4), + SLE_CONDVAR(SignStruct, x, SLE_INT32, 5, SL_MAX_VERSION), + SLE_CONDVAR(SignStruct, y, SLE_INT32, 5, SL_MAX_VERSION), + SLE_CONDVAR(SignStruct, owner, SLE_UINT8, 6, SL_MAX_VERSION), + SLE_VAR(SignStruct, z, SLE_UINT8), SLE_END() }; @@ -4,27 +4,27 @@ #define SLOPE_H typedef enum Slope { - SLOPE_FLAT = 0x00, - SLOPE_W = 0x01, - SLOPE_S = 0x02, - SLOPE_E = 0x04, - SLOPE_N = 0x08, - SLOPE_STEEP = 0x10, - SLOPE_NW = SLOPE_N | SLOPE_W, - SLOPE_SW = SLOPE_S | SLOPE_W, - SLOPE_SE = SLOPE_S | SLOPE_E, - SLOPE_NE = SLOPE_N | SLOPE_E, - SLOPE_EW = SLOPE_E | SLOPE_W, - SLOPE_NS = SLOPE_N | SLOPE_S, + SLOPE_FLAT = 0x00, + SLOPE_W = 0x01, + SLOPE_S = 0x02, + SLOPE_E = 0x04, + SLOPE_N = 0x08, + SLOPE_STEEP = 0x10, + SLOPE_NW = SLOPE_N | SLOPE_W, + SLOPE_SW = SLOPE_S | SLOPE_W, + SLOPE_SE = SLOPE_S | SLOPE_E, + SLOPE_NE = SLOPE_N | SLOPE_E, + SLOPE_EW = SLOPE_E | SLOPE_W, + SLOPE_NS = SLOPE_N | SLOPE_S, SLOPE_ELEVATED = SLOPE_N | SLOPE_E | SLOPE_S | SLOPE_W, - SLOPE_NWS = SLOPE_N | SLOPE_W | SLOPE_S, - SLOPE_WSE = SLOPE_W | SLOPE_S | SLOPE_E, - SLOPE_SEN = SLOPE_S | SLOPE_E | SLOPE_N, - SLOPE_ENW = SLOPE_E | SLOPE_N | SLOPE_W, - SLOPE_STEEP_W = SLOPE_STEEP | SLOPE_NWS, - SLOPE_STEEP_S = SLOPE_STEEP | SLOPE_WSE, - SLOPE_STEEP_E = SLOPE_STEEP | SLOPE_SEN, - SLOPE_STEEP_N = SLOPE_STEEP | SLOPE_ENW + SLOPE_NWS = SLOPE_N | SLOPE_W | SLOPE_S, + SLOPE_WSE = SLOPE_W | SLOPE_S | SLOPE_E, + SLOPE_SEN = SLOPE_S | SLOPE_E | SLOPE_N, + SLOPE_ENW = SLOPE_E | SLOPE_N | SLOPE_W, + SLOPE_STEEP_W = SLOPE_STEEP | SLOPE_NWS, + SLOPE_STEEP_S = SLOPE_STEEP | SLOPE_WSE, + SLOPE_STEEP_E = SLOPE_STEEP | SLOPE_SEN, + SLOPE_STEEP_N = SLOPE_STEEP | SLOPE_ENW } Slope; static inline bool IsSteepSlope(Slope s) diff --git a/smallmap_gui.c b/smallmap_gui.c index 1491f0be9..96ef78a13 100644 --- a/smallmap_gui.c +++ b/smallmap_gui.c @@ -53,130 +53,130 @@ static bool _smallmap_show_towns = true; /* Legend text giving the colours to look for on the minimap */ static const uint16 _legend_land_contours[] = { - MK(0x5A,STR_00F0_100M), - MK(0x5C,STR_00F1_200M), - MK(0x5E,STR_00F2_300M), - MK(0x1F,STR_00F3_400M), - MK(0x27,STR_00F4_500M), - - MS(0xD7,STR_00EB_ROADS), - MK(0x0A,STR_00EC_RAILROADS), - MK(0x98,STR_00ED_STATIONS_AIRPORTS_DOCKS), - MK(0xB5,STR_00EE_BUILDINGS_INDUSTRIES), - MK(0x0F,STR_00EF_VEHICLES), + MK(0x5A, STR_00F0_100M), + MK(0x5C, STR_00F1_200M), + MK(0x5E, STR_00F2_300M), + MK(0x1F, STR_00F3_400M), + MK(0x27, STR_00F4_500M), + + MS(0xD7, STR_00EB_ROADS), + MK(0x0A, STR_00EC_RAILROADS), + MK(0x98, STR_00ED_STATIONS_AIRPORTS_DOCKS), + MK(0xB5, STR_00EE_BUILDINGS_INDUSTRIES), + MK(0x0F, STR_00EF_VEHICLES), MKEND() }; static const uint16 _legend_vehicles[] = { - MK(0xB8,STR_00F5_TRAINS), - MK(0xBF,STR_00F6_ROAD_VEHICLES), - MK(0x98,STR_00F7_SHIPS), - MK(0x0F,STR_00F8_AIRCRAFT), - MS(0xD7,STR_00F9_TRANSPORT_ROUTES), - MK(0xB5,STR_00EE_BUILDINGS_INDUSTRIES), + MK(0xB8, STR_00F5_TRAINS), + MK(0xBF, STR_00F6_ROAD_VEHICLES), + MK(0x98, STR_00F7_SHIPS), + MK(0x0F, STR_00F8_AIRCRAFT), + MS(0xD7, STR_00F9_TRANSPORT_ROUTES), + MK(0xB5, STR_00EE_BUILDINGS_INDUSTRIES), MKEND() }; static const uint16 _legend_industries_normal[] = { - MK(0xD7,STR_00FA_COAL_MINE), - MK(0xB8,STR_00FB_POWER_STATION), - MK(0x56,STR_00FC_FOREST), - MK(0xC2,STR_00FD_SAWMILL), - MK(0xBF,STR_00FE_OIL_REFINERY), - MK(0x0F,STR_0105_BANK), - - MS(0x30,STR_00FF_FARM), - MK(0xAE,STR_0100_FACTORY), - MK(0x98,STR_0102_OIL_WELLS), - MK(0x37,STR_0103_IRON_ORE_MINE), - MK(0x0A,STR_0104_STEEL_MILL), + MK(0xD7, STR_00FA_COAL_MINE), + MK(0xB8, STR_00FB_POWER_STATION), + MK(0x56, STR_00FC_FOREST), + MK(0xC2, STR_00FD_SAWMILL), + MK(0xBF, STR_00FE_OIL_REFINERY), + MK(0x0F, STR_0105_BANK), + + MS(0x30, STR_00FF_FARM), + MK(0xAE, STR_0100_FACTORY), + MK(0x98, STR_0102_OIL_WELLS), + MK(0x37, STR_0103_IRON_ORE_MINE), + MK(0x0A, STR_0104_STEEL_MILL), MKEND() }; static const uint16 _legend_industries_hilly[] = { - MK(0xD7,STR_00FA_COAL_MINE), - MK(0xB8,STR_00FB_POWER_STATION), - MK(0x56,STR_00FC_FOREST), - MK(0x0A,STR_0106_PAPER_MILL), - MK(0xBF,STR_00FE_OIL_REFINERY), - MK(0x37,STR_0108_FOOD_PROCESSING_PLANT), - MS(0x30,STR_00FF_FARM), - - MK(0xAE,STR_0101_PRINTING_WORKS), - MK(0x98,STR_0102_OIL_WELLS), - MK(0xC2,STR_0107_GOLD_MINE), - MK(0x0F,STR_0105_BANK), + MK(0xD7, STR_00FA_COAL_MINE), + MK(0xB8, STR_00FB_POWER_STATION), + MK(0x56, STR_00FC_FOREST), + MK(0x0A, STR_0106_PAPER_MILL), + MK(0xBF, STR_00FE_OIL_REFINERY), + MK(0x37, STR_0108_FOOD_PROCESSING_PLANT), + MS(0x30, STR_00FF_FARM), + + MK(0xAE, STR_0101_PRINTING_WORKS), + MK(0x98, STR_0102_OIL_WELLS), + MK(0xC2, STR_0107_GOLD_MINE), + MK(0x0F, STR_0105_BANK), MKEND() }; static const uint16 _legend_industries_desert[] = { - MK(0xBF,STR_00FE_OIL_REFINERY), - MK(0x98,STR_0102_OIL_WELLS), - MK(0x0F,STR_0105_BANK), - MK(0xB8,STR_0109_DIAMOND_MINE), - MK(0x37,STR_0108_FOOD_PROCESSING_PLANT), - MK(0x0A,STR_010A_COPPER_ORE_MINE), - MK(0x30,STR_00FF_FARM), - MS(0x56,STR_010B_FRUIT_PLANTATION), - - MK(0x27,STR_010C_RUBBER_PLANTATION), - MK(0x25,STR_010D_WATER_SUPPLY), - MK(0xD0,STR_010E_WATER_TOWER), - MK(0xAE,STR_0100_FACTORY), - MK(0xC2,STR_010F_LUMBER_MILL), + MK(0xBF, STR_00FE_OIL_REFINERY), + MK(0x98, STR_0102_OIL_WELLS), + MK(0x0F, STR_0105_BANK), + MK(0xB8, STR_0109_DIAMOND_MINE), + MK(0x37, STR_0108_FOOD_PROCESSING_PLANT), + MK(0x0A, STR_010A_COPPER_ORE_MINE), + MK(0x30, STR_00FF_FARM), + MS(0x56, STR_010B_FRUIT_PLANTATION), + + MK(0x27, STR_010C_RUBBER_PLANTATION), + MK(0x25, STR_010D_WATER_SUPPLY), + MK(0xD0, STR_010E_WATER_TOWER), + MK(0xAE, STR_0100_FACTORY), + MK(0xC2, STR_010F_LUMBER_MILL), MKEND() }; static const uint16 _legend_industries_candy[] = { - MK(0x30,STR_0110_COTTON_CANDY_FOREST), - MK(0xAE,STR_0111_CANDY_FACTORY), - MK(0x27,STR_0112_BATTERY_FARM), - MK(0x37,STR_0113_COLA_WELLS), - MK(0xD0,STR_0114_TOY_SHOP), - MK(0x0A,STR_0115_TOY_FACTORY), - MS(0x25,STR_0116_PLASTIC_FOUNTAINS), - - MK(0xB8,STR_0117_FIZZY_DRINK_FACTORY), - MK(0x98,STR_0118_BUBBLE_GENERATOR), - MK(0xC2,STR_0119_TOFFEE_QUARRY), - MK(0x0F,STR_011A_SUGAR_MINE), + MK(0x30, STR_0110_COTTON_CANDY_FOREST), + MK(0xAE, STR_0111_CANDY_FACTORY), + MK(0x27, STR_0112_BATTERY_FARM), + MK(0x37, STR_0113_COLA_WELLS), + MK(0xD0, STR_0114_TOY_SHOP), + MK(0x0A, STR_0115_TOY_FACTORY), + MS(0x25, STR_0116_PLASTIC_FOUNTAINS), + + MK(0xB8, STR_0117_FIZZY_DRINK_FACTORY), + MK(0x98, STR_0118_BUBBLE_GENERATOR), + MK(0xC2, STR_0119_TOFFEE_QUARRY), + MK(0x0F, STR_011A_SUGAR_MINE), MKEND() }; static const uint16 _legend_routes[] = { - MK(0xD7,STR_00EB_ROADS), - MK(0x0A,STR_00EC_RAILROADS), - MK(0xB5,STR_00EE_BUILDINGS_INDUSTRIES), - MS(0x56,STR_011B_RAILROAD_STATION), - - MK(0xC2,STR_011C_TRUCK_LOADING_BAY), - MK(0xBF,STR_011D_BUS_STATION), - MK(0xB8,STR_011E_AIRPORT_HELIPORT), - MK(0x98,STR_011F_DOCK), + MK(0xD7, STR_00EB_ROADS), + MK(0x0A, STR_00EC_RAILROADS), + MK(0xB5, STR_00EE_BUILDINGS_INDUSTRIES), + MS(0x56, STR_011B_RAILROAD_STATION), + + MK(0xC2, STR_011C_TRUCK_LOADING_BAY), + MK(0xBF, STR_011D_BUS_STATION), + MK(0xB8, STR_011E_AIRPORT_HELIPORT), + MK(0x98, STR_011F_DOCK), MKEND() }; static const uint16 _legend_vegetation[] = { - MK(0x52,STR_0120_ROUGH_LAND), - MK(0x54,STR_0121_GRASS_LAND), - MK(0x37,STR_0122_BARE_LAND), - MK(0x25,STR_0123_FIELDS), - MK(0x57,STR_0124_TREES), - MK(0xD0,STR_00FC_FOREST), - MS(0x0A,STR_0125_ROCKS), - - MK(0xC2,STR_012A_DESERT), - MK(0x98,STR_012B_SNOW), - MK(0xD7,STR_00F9_TRANSPORT_ROUTES), - MK(0xB5,STR_00EE_BUILDINGS_INDUSTRIES), + MK(0x52, STR_0120_ROUGH_LAND), + MK(0x54, STR_0121_GRASS_LAND), + MK(0x37, STR_0122_BARE_LAND), + MK(0x25, STR_0123_FIELDS), + MK(0x57, STR_0124_TREES), + MK(0xD0, STR_00FC_FOREST), + MS(0x0A, STR_0125_ROCKS), + + MK(0xC2, STR_012A_DESERT), + MK(0x98, STR_012B_SNOW), + MK(0xD7, STR_00F9_TRANSPORT_ROUTES), + MK(0xB5, STR_00EE_BUILDINGS_INDUSTRIES), MKEND() }; static const uint16 _legend_land_owners[] = { - MK(0xCA,STR_0126_WATER), - MK(0x54,STR_0127_NO_OWNER), - MK(0xB4,STR_0128_TOWNS), - MK(0x20,STR_0129_INDUSTRIES), + MK(0xCA, STR_0126_WATER), + MK(0x54, STR_0127_NO_OWNER), + MK(0xB4, STR_0128_TOWNS), + MK(0x20, STR_0129_INDUSTRIES), MKEND() }; #undef MK @@ -269,48 +269,48 @@ static inline uint32 ApplyMask(uint32 colour, const AndOr *mask) static const AndOr _smallmap_contours_andor[] = { - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0x000A0A00),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00D7D700),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00B5B500),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0x98989898),MKCOLOR(0x00000000)}, - {MKCOLOR(0xCACACACA),MKCOLOR(0x00000000)}, - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0xB5B5B5B5),MKCOLOR(0x00000000)}, - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0x00B5B500),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x000A0A00),MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0x000A0A00), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0x98989898), MKCOLOR(0x00000000)}, + {MKCOLOR(0xCACACACA), MKCOLOR(0x00000000)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0xB5B5B5B5), MKCOLOR(0x00000000)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x000A0A00), MKCOLOR(0xFF0000FF)}, }; static const AndOr _smallmap_vehicles_andor[] = { - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0x00D7D700),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00D7D700),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00B5B500),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0x00D7D700),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0xCACACACA),MKCOLOR(0x00000000)}, - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0xB5B5B5B5),MKCOLOR(0x00000000)}, - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0x00B5B500),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00D7D700),MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0xCACACACA), MKCOLOR(0x00000000)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0xB5B5B5B5), MKCOLOR(0x00000000)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, }; static const AndOr _smallmap_vegetation_andor[] = { - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0x00D7D700),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00D7D700),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00B5B500),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00575700),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00D7D700),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0xCACACACA),MKCOLOR(0x00000000)}, - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0xB5B5B5B5),MKCOLOR(0x00000000)}, - {MKCOLOR(0x00000000),MKCOLOR(0xFFFFFFFF)}, - {MKCOLOR(0x00B5B500),MKCOLOR(0xFF0000FF)}, - {MKCOLOR(0x00D7D700),MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00575700), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0xCACACACA), MKCOLOR(0x00000000)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0xB5B5B5B5), MKCOLOR(0x00000000)}, + {MKCOLOR(0x00000000), MKCOLOR(0xFFFFFFFF)}, + {MKCOLOR(0x00B5B500), MKCOLOR(0xFF0000FF)}, + {MKCOLOR(0x00D7D700), MKCOLOR(0xFF0000FF)}, }; typedef uint32 GetSmallMapPixels(TileIndex tile); // typedef callthrough function @@ -393,28 +393,28 @@ static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile) /* Industry colours... a total of 175 gfx - XXX - increase if more industries */ static const byte _industry_smallmap_colors[175] = { - 215,215,215,215,215,215,215,184, - 184,184,184,194,194,194,194,194, - 86, 86,191,191,191,191,191,191, - 152,152,152,152,152,152,152,152, - 152, 48, 48, 48, 48, 48, 48,174, - 174,174,174,174,174,174,174, 10, - 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 15, 15, 55, 55, 55, 55, - 10, 10, 10, 10, 10, 10, 10, 10, - 194,194,194,194,194,194,194,194, - 194,194,194,194,194,194,194,194, - 194, 15, 15,184,184,184,184,184, - 184,184,184,184, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 86, 39, 37, 37, - 208,174,174,174,174,194,194,194, - 194, 48, 48,174,174,174,174, 39, - 39, 55,208,208,208,208, 10, 10, - 10, 10, 10, 10, 37, 37, 37, 37, - 37, 37, 37, 37,184,184,184,184, - 152,152,152,152,194,194,194, 15, - 15, 15, 15, 15, 15, 15, 15, + 215, 215, 215, 215, 215, 215, 215, 184, + 184, 184, 184, 194, 194, 194, 194, 194, + 86, 86, 191, 191, 191, 191, 191, 191, + 152, 152, 152, 152, 152, 152, 152, 152, + 152, 48, 48, 48, 48, 48, 48, 174, + 174, 174, 174, 174, 174, 174, 174, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 15, 15, 55, 55, 55, 55, + 10, 10, 10, 10, 10, 10, 10, 10, + 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, + 194, 15, 15, 184, 184, 184, 184, 184, + 184, 184, 184, 184, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 86, 39, 37, 37, + 208, 174, 174, 174, 174, 194, 194, 194, + 194, 48, 48, 174, 174, 174, 174, 39, + 39, 55, 208, 208, 208, 208, 10, 10, + 10, 10, 10, 10, 37, 37, 37, 37, + 37, 37, 37, 37, 184, 184, 184, 184, + 152, 152, 152, 152, 194, 194, 194, 15, + 15, 15, 15, 15, 15, 15, 15, }; /** @@ -998,18 +998,18 @@ void ShowSmallMap(void) /* Extra ViewPort Window Stuff */ static const Widget _extra_view_port_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 287, 0, 13, STR_EXTRA_VIEW_PORT_TITLE, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 288, 299, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_RB, 14, 0, 299, 14, 233, 0x0, STR_NULL}, -{ WWT_6, RESIZE_RB, 14, 2, 297, 16, 231, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_TB, 14, 0, 21, 234, 255, 0x2DF, STR_017F_ZOOM_THE_VIEW_IN}, -{ WWT_PANEL, RESIZE_TB, 14, 22, 43, 234, 255, 0x2E0, STR_0180_ZOOM_THE_VIEW_OUT}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 44, 171, 234, 255, STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW,STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 172, 298, 234, 255, STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN,STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT}, -{ WWT_PANEL, RESIZE_RTB, 14, 299, 299, 234, 255, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_RTB, 14, 0, 287, 256, 267, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 288, 299, 256, 267, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 287, 0, 13, STR_EXTRA_VIEW_PORT_TITLE, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 288, 299, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PANEL, RESIZE_RB, 14, 0, 299, 14, 233, 0x0, STR_NULL}, +{ WWT_6, RESIZE_RB, 14, 2, 297, 16, 231, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_TB, 14, 0, 21, 234, 255, 0x2DF, STR_017F_ZOOM_THE_VIEW_IN}, +{ WWT_PANEL, RESIZE_TB, 14, 22, 43, 234, 255, 0x2E0, STR_0180_ZOOM_THE_VIEW_OUT}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 44, 171, 234, 255, STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW, STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 172, 298, 234, 255, STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN, STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT}, +{ WWT_PANEL, RESIZE_RTB, 14, 299, 299, 234, 255, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 287, 256, 267, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 288, 299, 256, 267, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; diff --git a/spritecache.c b/spritecache.c index 9fe087f99..4604f7602 100644 --- a/spritecache.c +++ b/spritecache.c @@ -385,7 +385,7 @@ static void* AllocSprite(size_t mem_req) static uint RotateSprite(uint s) { - static const byte _rotate_tile_sprite[19] = { 0,2,4,6,8,10,12,14,1,3,5,7,9,11,13,17,18,16,15 }; + static const byte _rotate_tile_sprite[19] = { 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 17, 18, 16, 15 }; static const byte _coast_map[9] = {0, 4, 3, 1, 2, 6, 8, 5, 7}; static const byte _fence_map[6] = {1, 0, 5, 4, 3, 2}; @@ -399,7 +399,7 @@ static uint RotateSprite(uint s) X19(4000) X19(4023) X19(4042) - MAP(4061,4069,_coast_map) + MAP(4061, 4069, _coast_map) X19(4126) X19(4145) X19(4164) @@ -98,15 +98,15 @@ struct Station { }; enum { - FACIL_TRAIN = 1, - FACIL_TRUCK_STOP = 2, - FACIL_BUS_STOP = 4, - FACIL_AIRPORT = 8, - FACIL_DOCK = 0x10, + FACIL_TRAIN = 0x01, + FACIL_TRUCK_STOP = 0x02, + FACIL_BUS_STOP = 0x04, + FACIL_AIRPORT = 0x08, + FACIL_DOCK = 0x10, }; enum { -// HVOT_PENDING_DELETE = 1<<0, // not needed anymore +// HVOT_PENDING_DELETE = 1 << 0, // not needed anymore HVOT_TRAIN = 1 << 1, HVOT_BUS = 1 << 2, HVOT_TRUCK = 1 << 3, @@ -118,20 +118,20 @@ enum { }; enum { - CA_BUS = 3, - CA_TRUCK = 3, - CA_AIR_OILPAD = 3, - CA_TRAIN = 4, - CA_AIR_HELIPORT = 4, - CA_AIR_SMALL = 4, - CA_AIR_LARGE = 5, - CA_DOCK = 5, - CA_AIR_METRO = 6, - CA_AIR_INTER = 8, - CA_AIR_COMMUTER = 4, - CA_AIR_HELIDEPOT = 4, + CA_BUS = 3, + CA_TRUCK = 3, + CA_AIR_OILPAD = 3, + CA_TRAIN = 4, + CA_AIR_HELIPORT = 4, + CA_AIR_SMALL = 4, + CA_AIR_LARGE = 5, + CA_DOCK = 5, + CA_AIR_METRO = 6, + CA_AIR_INTER = 8, + CA_AIR_COMMUTER = 4, + CA_AIR_HELIDEPOT = 4, CA_AIR_INTERCON = 10, - CA_AIR_HELISTATION = 4, + CA_AIR_HELISTATION = 4, }; void ModifyStationRatingAround(TileIndex tile, PlayerID owner, int amount, uint radius); diff --git a/station_cmd.c b/station_cmd.c index 71eec64e2..ad3cec867 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -1901,8 +1901,8 @@ static const TileIndexDiffC _dock_tileoffs_chkaround[] = { { 0, 0}, { 0, -1} }; -static const byte _dock_w_chk[4] = { 2,1,2,1 }; -static const byte _dock_h_chk[4] = { 1,2,1,2 }; +static const byte _dock_w_chk[4] = { 2, 1, 2, 1 }; +static const byte _dock_h_chk[4] = { 1, 2, 1, 2 }; /** Build a dock/haven. * @param tile tile where dock will be built @@ -2961,58 +2961,58 @@ static const SaveLoad _roadstop_desc[] = { }; static const SaveLoad _station_desc[] = { - SLE_CONDVAR(Station, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Station, bus_tile_obsolete, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, lorry_tile_obsolete, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, train_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, train_tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Station, airport_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, airport_tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Station, dock_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, dock_tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_REF(Station, town, REF_TOWN), - SLE_VAR(Station, trainst_w, SLE_UINT8), - SLE_CONDVAR(Station, trainst_h, SLE_UINT8, 2, SL_MAX_VERSION), + SLE_CONDVAR(Station, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Station, xy, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Station, bus_tile_obsolete, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Station, lorry_tile_obsolete, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Station, train_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Station, train_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Station, airport_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Station, dock_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Station, dock_tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_REF(Station, town, REF_TOWN), + SLE_VAR(Station, trainst_w, SLE_UINT8), + SLE_CONDVAR(Station, trainst_h, SLE_UINT8, 2, SL_MAX_VERSION), // alpha_order was stored here in savegame format 0 - 3 SLE_CONDNULL(1, 0, 3), - SLE_VAR(Station,string_id, SLE_STRINGID), - SLE_VAR(Station,had_vehicle_of_type,SLE_UINT16), + SLE_VAR(Station, string_id, SLE_STRINGID), + SLE_VAR(Station, had_vehicle_of_type, SLE_UINT16), - SLE_VAR(Station,time_since_load, SLE_UINT8), - SLE_VAR(Station,time_since_unload, SLE_UINT8), - SLE_VAR(Station,delete_ctr, SLE_UINT8), - SLE_VAR(Station,owner, SLE_UINT8), - SLE_VAR(Station,facilities, SLE_UINT8), - SLE_VAR(Station,airport_type, SLE_UINT8), + SLE_VAR(Station, time_since_load, SLE_UINT8), + SLE_VAR(Station, time_since_unload, SLE_UINT8), + SLE_VAR(Station, delete_ctr, SLE_UINT8), + SLE_VAR(Station, owner, SLE_UINT8), + SLE_VAR(Station, facilities, SLE_UINT8), + SLE_VAR(Station, airport_type, SLE_UINT8), // truck/bus_stop_status was stored here in savegame format 0 - 6 - SLE_CONDVAR(Station,truck_stop_status_obsolete, SLE_UINT8, 0, 5), - SLE_CONDVAR(Station,bus_stop_status_obsolete, SLE_UINT8, 0, 5), + SLE_CONDVAR(Station, truck_stop_status_obsolete, SLE_UINT8, 0, 5), + SLE_CONDVAR(Station, bus_stop_status_obsolete, SLE_UINT8, 0, 5), // blocked_months was stored here in savegame format 0 - 4.0 - SLE_CONDVAR(Station,blocked_months_obsolete, SLE_UINT8, 0, 4), + SLE_CONDVAR(Station, blocked_months_obsolete, SLE_UINT8, 0, 4), - SLE_CONDVAR(Station,airport_flags, SLE_VAR_U32 | SLE_FILE_U16, 0, 2), - SLE_CONDVAR(Station,airport_flags, SLE_UINT32, 3, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport_flags, SLE_VAR_U32 | SLE_FILE_U16, 0, 2), + SLE_CONDVAR(Station, airport_flags, SLE_UINT32, 3, SL_MAX_VERSION), SLE_CONDNULL(2, 0, 25), /* Ex last-vehicle */ - SLE_CONDVAR(Station,last_vehicle_type, SLE_UINT8 , 26, SL_MAX_VERSION), + SLE_CONDVAR(Station, last_vehicle_type, SLE_UINT8, 26, SL_MAX_VERSION), // Was custom station class and id SLE_CONDNULL(2, 3, 25), - SLE_CONDVAR(Station,build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 30), - SLE_CONDVAR(Station,build_date, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Station, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 30), + SLE_CONDVAR(Station, build_date, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDREF(Station,bus_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION), - SLE_CONDREF(Station,truck_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION), + SLE_CONDREF(Station, bus_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION), + SLE_CONDREF(Station, truck_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION), /* Used by newstations for graphic variations */ - SLE_CONDVAR(Station,random_bits, SLE_UINT16, 27, SL_MAX_VERSION), - SLE_CONDVAR(Station,waiting_triggers, SLE_UINT8, 27, SL_MAX_VERSION), - SLE_CONDVAR(Station,num_specs, SLE_UINT8, 27, SL_MAX_VERSION), + SLE_CONDVAR(Station, random_bits, SLE_UINT16, 27, SL_MAX_VERSION), + SLE_CONDVAR(Station, waiting_triggers, SLE_UINT8, 27, SL_MAX_VERSION), + SLE_CONDVAR(Station, num_specs, SLE_UINT8, 27, SL_MAX_VERSION), // reserve extra space in savegame here. (currently 32 bytes) SLE_CONDNULL(32, 2, SL_MAX_VERSION), @@ -3021,15 +3021,15 @@ static const SaveLoad _station_desc[] = { }; static const SaveLoad _goods_desc[] = { - SLE_VAR(GoodsEntry,waiting_acceptance, SLE_UINT16), - SLE_VAR(GoodsEntry,days_since_pickup, SLE_UINT8), - SLE_VAR(GoodsEntry,rating, SLE_UINT8), - SLE_CONDVAR(GoodsEntry,enroute_from, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), - SLE_CONDVAR(GoodsEntry,enroute_from, SLE_UINT16, 7, SL_MAX_VERSION), - SLE_VAR(GoodsEntry,enroute_time, SLE_UINT8), - SLE_VAR(GoodsEntry,last_speed, SLE_UINT8), - SLE_VAR(GoodsEntry,last_age, SLE_UINT8), - SLE_CONDVAR(GoodsEntry,feeder_profit, SLE_INT32, 14, SL_MAX_VERSION), + SLE_VAR(GoodsEntry, waiting_acceptance, SLE_UINT16), + SLE_VAR(GoodsEntry, days_since_pickup, SLE_UINT8), + SLE_VAR(GoodsEntry, rating, SLE_UINT8), + SLE_CONDVAR(GoodsEntry, enroute_from, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), + SLE_CONDVAR(GoodsEntry, enroute_from, SLE_UINT16, 7, SL_MAX_VERSION), + SLE_VAR(GoodsEntry, enroute_time, SLE_UINT8), + SLE_VAR(GoodsEntry, last_speed, SLE_UINT8), + SLE_VAR(GoodsEntry, last_age, SLE_UINT8), + SLE_CONDVAR(GoodsEntry, feeder_profit, SLE_INT32, 14, SL_MAX_VERSION), SLE_END() }; diff --git a/station_gui.c b/station_gui.c index 6691ddfb0..670ac0aa3 100644 --- a/station_gui.c +++ b/station_gui.c @@ -430,37 +430,37 @@ static const Widget _player_stations_widgets[] = { { WWT_SCROLLBAR, RESIZE_LRB, 14, 346, 357, 25, 149, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WWT_RESIZEBOX, RESIZE_LRTB, 14, 346, 357, 150, 161, 0x0, STR_RESIZE_BUTTON}, //Index 6 -{ WWT_TEXTBTN, RESIZE_NONE, 14, 0, 13, 14, 24, STR_TRAIN, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 27, 14, 24, STR_LORRY, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 28, 41, 14, 24, STR_BUS, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 42, 55, 14, 24, STR_PLANE, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 56, 69, 14, 24, STR_SHIP, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 0, 13, 14, 24, STR_TRAIN, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 27, 14, 24, STR_LORRY, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 28, 41, 14, 24, STR_BUS, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 42, 55, 14, 24, STR_PLANE, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 56, 69, 14, 24, STR_SHIP, STR_USE_CTRL_TO_SELECT_MORE}, //Index 11 -{ WWT_PANEL, RESIZE_NONE, 14, 83, 88, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 89, 102, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 103, 116, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 117, 130, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 131, 144, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 145, 158, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 159, 172, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 173, 186, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 187, 200, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 201, 214, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 215, 228, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 229, 242, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 243, 256, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, -{ WWT_PANEL, RESIZE_NONE, 14, 257, 270, 14, 24, 0x0, STR_NO_WAITING_CARGO}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 285, 357, 14, 24, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 83, 88, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 89, 102, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 103, 116, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 117, 130, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 131, 144, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 145, 158, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 159, 172, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 173, 186, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 187, 200, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 201, 214, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 215, 228, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 229, 242, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 243, 256, 14, 24, 0x0, STR_USE_CTRL_TO_SELECT_MORE}, +{ WWT_PANEL, RESIZE_NONE, 14, 257, 270, 14, 24, 0x0, STR_NO_WAITING_CARGO}, +{ WWT_PANEL, RESIZE_RIGHT, 14, 285, 357, 14, 24, 0x0, STR_NULL}, //26 -{ WWT_PANEL, RESIZE_NONE, 14, 70, 83, 14, 24, 0x0, STR_SELECT_ALL_FACILITIES}, -{ WWT_PANEL, RESIZE_NONE, 14, 271, 284, 14, 24, 0x0, STR_SELECT_ALL_TYPES}, +{ WWT_PANEL, RESIZE_NONE, 14, 70, 83, 14, 24, 0x0, STR_SELECT_ALL_FACILITIES}, +{ WWT_PANEL, RESIZE_NONE, 14, 271, 284, 14, 24, 0x0, STR_SELECT_ALL_TYPES}, //28 -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 25, 36, STR_SORT_BY, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 14, 81, 232, 25, 36, 0x0, STR_SORT_CRITERIA_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 233, 243, 25, 36, STR_0225, STR_SORT_CRITERIA_TIP}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 244, 345, 25, 36, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 25, 36, STR_SORT_BY, STR_SORT_ORDER_TIP}, +{ WWT_PANEL, RESIZE_NONE, 14, 81, 232, 25, 36, 0x0, STR_SORT_CRITERIA_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 233, 243, 25, 36, STR_0225, STR_SORT_CRITERIA_TIP}, +{ WWT_PANEL, RESIZE_RIGHT, 14, 244, 345, 25, 36, 0x0, STR_NULL}, { WIDGETS_END}, }; diff --git a/strgen/strgen.c b/strgen/strgen.c index abdcb21bf..6fbccfb24 100644 --- a/strgen/strgen.c +++ b/strgen/strgen.c @@ -34,13 +34,13 @@ typedef void (*ParseCmdProc)(char *buf, int value); typedef struct LanguagePackHeader { uint32 ident; - uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h - char name[32]; // the international name of this language + uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h + char name[32]; // the international name of this language char own_name[32]; // the localized name of this language - char isocode[16]; // the ISO code for the language (not country code) - uint16 offsets[32]; // the offsets - byte plural_form; // plural form index - byte pad[3]; // pad header to be a multiple of 4 + char isocode[16]; // the ISO code for the language (not country code) + uint16 offsets[32]; // the offsets + byte plural_form; // plural form index + byte pad[3]; // pad header to be a multiple of 4 } LanguagePackHeader; typedef struct CmdStruct { @@ -53,7 +53,7 @@ typedef struct CmdStruct { enum { C_DONTCOUNT = 1, - C_CASE = 2, + C_CASE = 2, }; @@ -70,14 +70,14 @@ static int _cur_line; static int _errors, _warnings; typedef struct LangString { - char *name; // Name of the string - char *english; // English text - char *translated; // Translated text - uint16 hash_next; // next hash entry + char *name; // Name of the string + char *english; // English text + char *translated; // Translated text + uint16 hash_next; // next hash entry uint16 index; - int line; // line of string in source-file - Case *english_case; // cases for english - Case *translated_case; // cases for foreign + int line; // line of string in source-file + Case *english_case; // cases for english + Case *translated_case; // cases for foreign } LangString; static LangString *_strings[65536]; @@ -103,7 +103,7 @@ static char _cases[MAX_NUM_CASES][16]; static int _numcases; // for each plural value, this is the number of plural forms. -static const byte _plural_form_counts[] = { 2,1,2,3,3,3,3,3,4 }; +static const byte _plural_form_counts[] = { 2, 1, 2, 3, 3, 3, 3, 3, 4 }; static const char *_cur_ident; diff --git a/table/ai_rail.h b/table/ai_rail.h index 4226f3945..8e6a49c50 100644 --- a/table/ai_rail.h +++ b/table/ai_rail.h @@ -29,296 +29,296 @@ typedef struct { #define MKEND {4, 0, {0, 0}}} static const AiDefaultRailBlock _raildata_ai_0 = { - MKHDR(1,2,1,0,1) - MKDEPOT(2, -1,1), - MKSTATION(0x15, 0,-1), - MKRAIL(0x26, 0,1), - MKCLRRAIL(1, 0,2), + MKHDR(1, 2, 1, 0, 1) + MKDEPOT(2, -1, 1), + MKSTATION(0x15, 0, -1), + MKRAIL(0x26, 0, 1), + MKCLRRAIL(1, 0, 2), MKEND }; static const AiDefaultRailBlock _raildata_ai_1 = { - MKHDR(1,2,1,0,3) - MKDEPOT(2, -1,-1), - MKRAIL(0x26, 0,-1), - MKSTATION(0x15, 0,0), - MKCLRRAIL(3, 0,-2), + MKHDR(1, 2, 1, 0, 3) + MKDEPOT(2, -1, -1), + MKRAIL(0x26, 0, -1), + MKSTATION(0x15, 0, 0), + MKCLRRAIL(3, 0, -2), MKEND }; static const AiDefaultRailBlock _raildata_ai_2 = { - MKHDR(1,2,1,0,0) - MKDEPOT(1, -1,-1), - MKRAIL(0x15, -1,0), - MKSTATION(0x14, 0,0), - MKCLRRAIL(0, -2,0), + MKHDR(1, 2, 1, 0, 0) + MKDEPOT(1, -1, -1), + MKRAIL(0x15, -1, 0), + MKSTATION(0x14, 0, 0), + MKCLRRAIL(0, -2, 0), MKEND }; static const AiDefaultRailBlock _raildata_ai_3 = { - MKHDR(1,2,1,0,2) - MKDEPOT(1, 1,-1), - MKRAIL(0x15, 1,0), - MKSTATION(0x14, -1,0), - MKCLRRAIL(2, 2,0), + MKHDR(1, 2, 1, 0, 2) + MKDEPOT(1, 1, -1), + MKRAIL(0x15, 1, 0), + MKSTATION(0x14, -1, 0), + MKCLRRAIL(2, 2, 0), MKEND }; static const AiDefaultRailBlock _raildata_ai_4 = { - MKHDR(1,2,2,0,255) - MKSTATION(0x15, 0,0), - MKCLRRAIL(3, 0,-1), - MKCLRRAIL(1, 0,2), + MKHDR(1, 2, 2, 0, 255) + MKSTATION(0x15, 0, 0), + MKCLRRAIL(3, 0, -1), + MKCLRRAIL(1, 0, 2), MKEND }; static const AiDefaultRailBlock _raildata_ai_5 = { - MKHDR(1,2,2,0,255) - MKSTATION(0x14, 0,0), - MKCLRRAIL(0, -1,0), - MKCLRRAIL(2, 2,0), + MKHDR(1, 2, 2, 0, 255) + MKSTATION(0x14, 0, 0), + MKCLRRAIL(0, -1, 0), + MKCLRRAIL(2, 2, 0), MKEND }; static const AiDefaultRailBlock _raildata_ai_6 = { - MKHDR(2,3,1,0,1) - MKSTATION(0x27, 0,-2), - MKRAIL(0xC2, 0,1), - MKRAIL(0xC2, 1,1), - MKRAIL(0x1A, 0,2), - MKRAIL(0x26, 1,2), - MKDEPOT(3, 1,3), - MKCLRRAIL(1, 0,3), + MKHDR(2, 3, 1, 0, 1) + MKSTATION(0x27, 0, -2), + MKRAIL(0xC2, 0, 1), + MKRAIL(0xC2, 1, 1), + MKRAIL(0x1A, 0, 2), + MKRAIL(0x26, 1, 2), + MKDEPOT(3, 1, 3), + MKCLRRAIL(1, 0, 3), MKEND }; static const AiDefaultRailBlock _raildata_ai_7 = { - MKHDR(2,3,1,0,3) - MKDEPOT(1, 0,-3), - MKRAIL(0x1A, 0,-2), - MKRAIL(0x26, 1,-2), - MKRAIL(0xC2, 0,-1), - MKRAIL(0xC2, 1,-1), - MKSTATION(0x27, 0,0), - MKCLRRAIL(3, 1,-3), + MKHDR(2, 3, 1, 0, 3) + MKDEPOT(1, 0, -3), + MKRAIL(0x1A, 0, -2), + MKRAIL(0x26, 1, -2), + MKRAIL(0xC2, 0, -1), + MKRAIL(0xC2, 1, -1), + MKSTATION(0x27, 0, 0), + MKCLRRAIL(3, 1, -3), MKEND }; static const AiDefaultRailBlock _raildata_ai_8 = { - MKHDR(2,3,1,0,2) - MKSTATION(0x26, -2,0), - MKRAIL(0xC1, 1,0), - MKRAIL(0xC1, 1,1), - MKRAIL(0x29, 2,0), - MKRAIL(0x15, 2,1), - MKDEPOT(0, 3,0), - MKCLRRAIL(2, 3,1), + MKHDR(2, 3, 1, 0, 2) + MKSTATION(0x26, -2, 0), + MKRAIL(0xC1, 1, 0), + MKRAIL(0xC1, 1, 1), + MKRAIL(0x29, 2, 0), + MKRAIL(0x15, 2, 1), + MKDEPOT(0, 3, 0), + MKCLRRAIL(2, 3, 1), MKEND }; static const AiDefaultRailBlock _raildata_ai_9 = { - MKHDR(2,3,1,0,0) - MKDEPOT(2, -3,-1), - MKRAIL(0x29, -2,-1), - MKRAIL(0x15, -2,0), - MKRAIL(0xC1, -1,-1), - MKRAIL(0xC1, -1,0), - MKSTATION(0x26, 0,-1), - MKCLRRAIL(0, -3,0), + MKHDR(2, 3, 1, 0, 0) + MKDEPOT(2, -3, -1), + MKRAIL(0x29, -2, -1), + MKRAIL(0x15, -2, 0), + MKRAIL(0xC1, -1, -1), + MKRAIL(0xC1, -1, 0), + MKSTATION(0x26, 0, -1), + MKCLRRAIL(0, -3, 0), MKEND }; static const AiDefaultRailBlock _raildata_ai_10 = { - MKHDR(2,3,2,0,255) - MKRAIL(0x1A, 0,-3), - MKRAIL(0x20, 1,-3), - MKRAIL(0xC2, 0,-2), - MKRAIL(0xC2, 1,-2), - MKSTATION(0x27, 0,-1), - MKRAIL(0xC2, 0,2), - MKRAIL(0xC2, 1,2), - MKRAIL(0x1A, 0,3), - MKRAIL(0x4, 1,3), - MKCLRRAIL(3, 0,-4), - MKCLRRAIL(1, 0,4), + MKHDR(2, 3, 2, 0, 255) + MKRAIL(0x1A, 0, -3), + MKRAIL(0x20, 1, -3), + MKRAIL(0xC2, 0, -2), + MKRAIL(0xC2, 1, -2), + MKSTATION(0x27, 0, -1), + MKRAIL(0xC2, 0, 2), + MKRAIL(0xC2, 1, 2), + MKRAIL(0x1A, 0, 3), + MKRAIL(0x4, 1, 3), + MKCLRRAIL(3, 0, -4), + MKCLRRAIL(1, 0, 4), MKEND }; static const AiDefaultRailBlock _raildata_ai_11 = { - MKHDR(2,3,2,0,255) - MKRAIL(0x29, -3,0), - MKRAIL(0x10, -3,1), - MKRAIL(0xC1, -2,0), - MKRAIL(0xC1, -2,1), - MKSTATION(0x26, -1,0), - MKRAIL(0xC1, 2,0), - MKRAIL(0xC1, 2,1), - MKRAIL(0x29, 3,0), - MKRAIL(0x4, 3,1), - MKCLRRAIL(0, -4,0), - MKCLRRAIL(2, 4,0), + MKHDR(2, 3, 2, 0, 255) + MKRAIL(0x29, -3, 0), + MKRAIL(0x10, -3, 1), + MKRAIL(0xC1, -2, 0), + MKRAIL(0xC1, -2, 1), + MKSTATION(0x26, -1, 0), + MKRAIL(0xC1, 2, 0), + MKRAIL(0xC1, 2, 1), + MKRAIL(0x29, 3, 0), + MKRAIL(0x4, 3, 1), + MKCLRRAIL(0, -4, 0), + MKCLRRAIL(2, 4, 0), MKEND }; static const AiDefaultRailBlock _raildata_ai_12 = { - MKHDR(2,3,2,1,3) - MKRAIL(0x88, -1,-3), - MKRAIL(0x6, 0,-3), - MKRAIL(0x2, -1,-2), - MKRAIL(0x42, 0,-2), - MKRAIL(0x2, -1,-1), - MKRAIL(0x2, 0,-1), - MKRAIL(0x2, -1,0), - MKRAIL(0x2, 0,0), - MKRAIL(0x82, -1,1), - MKRAIL(0x2, 0,1), - MKRAIL(0xA, -1,2), - MKRAIL(0x44, 0,2), - MKCLRRAIL(3, 0,-4), - MKCLRRAIL(1, -1,3), + MKHDR(2, 3, 2, 1, 3) + MKRAIL(0x88, -1, -3), + MKRAIL(0x6, 0, -3), + MKRAIL(0x2, -1, -2), + MKRAIL(0x42, 0, -2), + MKRAIL(0x2, -1, -1), + MKRAIL(0x2, 0, -1), + MKRAIL(0x2, -1, 0), + MKRAIL(0x2, 0, 0), + MKRAIL(0x82, -1, 1), + MKRAIL(0x2, 0, 1), + MKRAIL(0xA, -1, 2), + MKRAIL(0x44, 0, 2), + MKCLRRAIL(3, 0, -4), + MKCLRRAIL(1, -1, 3), MKEND }; static const AiDefaultRailBlock _raildata_ai_13 = { - MKHDR(2,3,2,1,0) - MKRAIL(0x21, -3,0), - MKRAIL(0x50, -3,1), - MKRAIL(0x81, -2,0), - MKRAIL(0x1, -2,1), - MKRAIL(0x1, -1,0), - MKRAIL(0x1, -1,1), - MKRAIL(0x1, 0,0), - MKRAIL(0x1, 0,1), - MKRAIL(0x1, 1,0), - MKRAIL(0x41, 1,1), - MKRAIL(0xA0, 2,0), - MKRAIL(0x11, 2,1), - MKCLRRAIL(0, -4,0), - MKCLRRAIL(2, 3,1), + MKHDR(2, 3, 2, 1, 0) + MKRAIL(0x21, -3, 0), + MKRAIL(0x50, -3, 1), + MKRAIL(0x81, -2, 0), + MKRAIL(0x1, -2, 1), + MKRAIL(0x1, -1, 0), + MKRAIL(0x1, -1, 1), + MKRAIL(0x1, 0, 0), + MKRAIL(0x1, 0, 1), + MKRAIL(0x1, 1, 0), + MKRAIL(0x41, 1, 1), + MKRAIL(0xA0, 2, 0), + MKRAIL(0x11, 2, 1), + MKCLRRAIL(0, -4, 0), + MKCLRRAIL(2, 3, 1), MKEND }; static const AiDefaultRailBlock _raildata_ai_14 = { - MKHDR(2,3,2,1,1) - MKRAIL(0x88, -1,-3), - MKRAIL(0x6, 0,-3), - MKRAIL(0x2, -1,-2), - MKRAIL(0x42, 0,-2), - MKRAIL(0x2, -1,-1), - MKRAIL(0x2, 0,-1), - MKRAIL(0x2, -1,0), - MKRAIL(0x2, 0,0), - MKRAIL(0x82, -1,1), - MKRAIL(0x2, 0,1), - MKRAIL(0xA, -1,2), - MKRAIL(0x44, 0,2), - MKCLRRAIL(1, -1,3), - MKCLRRAIL(3, 0,-4), + MKHDR(2, 3, 2, 1, 1) + MKRAIL(0x88, -1, -3), + MKRAIL(0x6, 0, -3), + MKRAIL(0x2, -1, -2), + MKRAIL(0x42, 0, -2), + MKRAIL(0x2, -1, -1), + MKRAIL(0x2, 0, -1), + MKRAIL(0x2, -1, 0), + MKRAIL(0x2, 0, 0), + MKRAIL(0x82, -1, 1), + MKRAIL(0x2, 0, 1), + MKRAIL(0xA, -1, 2), + MKRAIL(0x44, 0, 2), + MKCLRRAIL(1, -1, 3), + MKCLRRAIL(3, 0, -4), MKEND }; static const AiDefaultRailBlock _raildata_ai_15 = { - MKHDR(2,3,2,1,2) - MKRAIL(0x21, -3,0), - MKRAIL(0x50, -3,1), - MKRAIL(0x81, -2,0), - MKRAIL(0x1, -2,1), - MKRAIL(0x1, -1,0), - MKRAIL(0x1, -1,1), - MKRAIL(0x1, 0,0), - MKRAIL(0x1, 0,1), - MKRAIL(0x1, 1,0), - MKRAIL(0x41, 1,1), - MKRAIL(0xA0, 2,0), - MKRAIL(0x11, 2,1), - MKCLRRAIL(2, 3,1), - MKCLRRAIL(0, -4,0), + MKHDR(2, 3, 2, 1, 2) + MKRAIL(0x21, -3, 0), + MKRAIL(0x50, -3, 1), + MKRAIL(0x81, -2, 0), + MKRAIL(0x1, -2, 1), + MKRAIL(0x1, -1, 0), + MKRAIL(0x1, -1, 1), + MKRAIL(0x1, 0, 0), + MKRAIL(0x1, 0, 1), + MKRAIL(0x1, 1, 0), + MKRAIL(0x41, 1, 1), + MKRAIL(0xA0, 2, 0), + MKRAIL(0x11, 2, 1), + MKCLRRAIL(2, 3, 1), + MKCLRRAIL(0, -4, 0), MKEND }; static const AiDefaultRailBlock _raildata_ai_16 = { - MKHDR(1,3,1,0,1) - MKSTATION(0x17, 0,-2), - MKRAIL(0x1A, 0,1), - MKCLRRAIL(1, 0,2), - MKDEPOT(0, 1,1), + MKHDR(1, 3, 1, 0, 1) + MKSTATION(0x17, 0, -2), + MKRAIL(0x1A, 0, 1), + MKCLRRAIL(1, 0, 2), + MKDEPOT(0, 1, 1), MKEND }; static const AiDefaultRailBlock _raildata_ai_17 = { - MKHDR(1,3,1,0,3) - MKCLRRAIL(3, 0,-2), - MKRAIL(0x26, 0,-1), - MKDEPOT(2, -1,-1), - MKSTATION(0x17, 0,0), + MKHDR(1, 3, 1, 0, 3) + MKCLRRAIL(3, 0, -2), + MKRAIL(0x26, 0, -1), + MKDEPOT(2, -1, -1), + MKSTATION(0x17, 0, 0), MKEND }; static const AiDefaultRailBlock _raildata_ai_18 = { - MKHDR(1,3,1,0,0) - MKCLRRAIL(0, -2,0), - MKRAIL(0x29, -1,0), - MKDEPOT(3, -1,1), - MKSTATION(0x16, 0,0), + MKHDR(1, 3, 1, 0, 0) + MKCLRRAIL(0, -2, 0), + MKRAIL(0x29, -1, 0), + MKDEPOT(3, -1, 1), + MKSTATION(0x16, 0, 0), MKEND }; static const AiDefaultRailBlock _raildata_ai_19 = { - MKHDR(1,3,1,0,2) - MKSTATION(0x16, -2,0), - MKDEPOT(2, 0,-1), - MKRAIL(0x20, 1,-1), - MKRAIL(0x15, 1,0), - MKCLRRAIL(2, 2,0), + MKHDR(1, 3, 1, 0, 2) + MKSTATION(0x16, -2, 0), + MKDEPOT(2, 0, -1), + MKRAIL(0x20, 1, -1), + MKRAIL(0x15, 1, 0), + MKCLRRAIL(2, 2, 0), MKEND }; static const AiDefaultRailBlock _raildata_ai_20 = { - MKHDR(2,3,1,0,1) - MKSTATION(0x26, -2,0), - MKRAIL(0xC1, 1,0), - MKRAIL(0xC1, 1,1), - MKRAIL(0x26, 2,0), - MKRAIL(0x26, 2,1), - MKDEPOT(1, 2,-1), - MKCLRRAIL(1, 2,2), + MKHDR(2, 3, 1, 0, 1) + MKSTATION(0x26, -2, 0), + MKRAIL(0xC1, 1, 0), + MKRAIL(0xC1, 1, 1), + MKRAIL(0x26, 2, 0), + MKRAIL(0x26, 2, 1), + MKDEPOT(1, 2, -1), + MKCLRRAIL(1, 2, 2), MKEND }; static const AiDefaultRailBlock _raildata_ai_21 = { - MKHDR(2,3,1,0,3) - MKDEPOT(2, -3,-1), - MKRAIL(0x3F, -2,-1), - MKRAIL(0x10, -2,0), - MKRAIL(0xC1, -1,-1), - MKRAIL(0xC1, -1,0), - MKSTATION(0x26, 0,-1), - MKCLRRAIL(3, -2,-2), + MKHDR(2, 3, 1, 0, 3) + MKDEPOT(2, -3, -1), + MKRAIL(0x3F, -2, -1), + MKRAIL(0x10, -2, 0), + MKRAIL(0xC1, -1, -1), + MKRAIL(0xC1, -1, 0), + MKSTATION(0x26, 0, -1), + MKCLRRAIL(3, -2, -2), MKEND }; static const AiDefaultRailBlock _raildata_ai_22 = { - MKHDR(2,3,1,0,0) - MKSTATION(0x27, 0,-2), - MKRAIL(0xC2, 0,1), - MKRAIL(0xC2, 1,1), - MKRAIL(0x15, 0,2), - MKRAIL(0x4, 1,2), - MKRAIL(0x15, -1,2), - MKDEPOT(1, -1,1), - MKCLRRAIL(0, -2,2), + MKHDR(2, 3, 1, 0, 0) + MKSTATION(0x27, 0, -2), + MKRAIL(0xC2, 0, 1), + MKRAIL(0xC2, 1, 1), + MKRAIL(0x15, 0, 2), + MKRAIL(0x4, 1, 2), + MKRAIL(0x15, -1, 2), + MKDEPOT(1, -1, 1), + MKCLRRAIL(0, -2, 2), MKEND }; static const AiDefaultRailBlock _raildata_ai_23 = { - MKHDR(2,3,1,0,2) - MKDEPOT(1, 0,-3), - MKRAIL(0x1A, 0,-2), - MKRAIL(0x29, 1,-2), - MKRAIL(0xC2, 0,-1), - MKRAIL(0xC2, 1,-1), - MKSTATION(0x27, 0,0), - MKCLRRAIL(2, 2,-2), + MKHDR(2, 3, 1, 0, 2) + MKDEPOT(1, 0, -3), + MKRAIL(0x1A, 0, -2), + MKRAIL(0x29, 1, -2), + MKRAIL(0xC2, 0, -1), + MKRAIL(0xC2, 1, -1), + MKSTATION(0x27, 0, 0), + MKCLRRAIL(2, 2, -2), MKEND }; diff --git a/table/clear_land.h b/table/clear_land.h index e2d167faa..581c86855 100644 --- a/table/clear_land.h +++ b/table/clear_land.h @@ -12,17 +12,17 @@ static const SpriteID _landscape_clear_sprites[8] = { }; static const byte _fence_mod_by_tileh[32] = { - 0,2,4,0,0,2,4,0, - 0,2,4,0,0,2,4,0, - 0,2,4,0,0,2,4,4, - 0,2,4,2,0,2,4,0, + 0, 2, 4, 0, 0, 2, 4, 0, + 0, 2, 4, 0, 0, 2, 4, 0, + 0, 2, 4, 0, 0, 2, 4, 4, + 0, 2, 4, 2, 0, 2, 4, 0, }; static const byte _fence_mod_by_tileh_2[32] = { - 1,1,5,5,3,3,1,1, - 1,1,5,5,3,3,1,1, - 1,1,5,5,3,3,1,5, - 1,1,5,5,3,3,3,1, + 1, 1, 5, 5, 3, 3, 1, 1, + 1, 1, 5, 5, 3, 3, 1, 1, + 1, 1, 5, 5, 3, 3, 1, 5, + 1, 1, 5, 5, 3, 3, 3, 1, }; diff --git a/table/elrail_data.h b/table/elrail_data.h index 9fed4f69a..cd0fb383b 100644 --- a/table/elrail_data.h +++ b/table/elrail_data.h @@ -409,14 +409,14 @@ typedef enum { PCP exists.*/ static const CatenarySprite Wires[5][TRACK_END][4] = { { /* Tileh == 0 */ - {INVALID_CATENARY, WIRE_X_FLAT_NE, WIRE_X_FLAT_SW, WIRE_X_FLAT_BOTH}, - {INVALID_CATENARY, WIRE_Y_FLAT_SE, WIRE_Y_FLAT_NW, WIRE_Y_FLAT_BOTH}, - {INVALID_CATENARY, WIRE_EW_N_W, WIRE_EW_N_E, WIRE_EW_N_BOTH}, - {INVALID_CATENARY, WIRE_EW_S_E, WIRE_EW_S_W, WIRE_EW_S_BOTH}, - {INVALID_CATENARY, WIRE_NS_W_S, WIRE_NS_W_N, WIRE_NS_W_BOTH}, - {INVALID_CATENARY, WIRE_NS_E_N, WIRE_NS_E_S, WIRE_NS_E_BOTH}, + {INVALID_CATENARY, WIRE_X_FLAT_NE, WIRE_X_FLAT_SW, WIRE_X_FLAT_BOTH}, + {INVALID_CATENARY, WIRE_Y_FLAT_SE, WIRE_Y_FLAT_NW, WIRE_Y_FLAT_BOTH}, + {INVALID_CATENARY, WIRE_EW_N_W, WIRE_EW_N_E, WIRE_EW_N_BOTH}, + {INVALID_CATENARY, WIRE_EW_S_E, WIRE_EW_S_W, WIRE_EW_S_BOTH}, + {INVALID_CATENARY, WIRE_NS_W_S, WIRE_NS_W_N, WIRE_NS_W_BOTH}, + {INVALID_CATENARY, WIRE_NS_E_N, WIRE_NS_E_S, WIRE_NS_E_BOTH}, }, { /* Tileh == 3 */ - {INVALID_CATENARY, WIRE_X_UP_NE, WIRE_X_UP_SW, WIRE_X_UP_BOTH}, + {INVALID_CATENARY, WIRE_X_UP_NE, WIRE_X_UP_SW, WIRE_X_UP_BOTH}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, @@ -424,20 +424,20 @@ static const CatenarySprite Wires[5][TRACK_END][4] = { {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, }, { /* Tileh == 6 */ {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, - {INVALID_CATENARY, WIRE_Y_UP_SE, WIRE_Y_UP_NW, WIRE_Y_UP_BOTH}, + {INVALID_CATENARY, WIRE_Y_UP_SE, WIRE_Y_UP_NW, WIRE_Y_UP_BOTH}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, }, { /* Tileh == 9 */ {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, - {INVALID_CATENARY, WIRE_Y_DOWN_SE, WIRE_Y_DOWN_NW, WIRE_Y_DOWN_BOTH}, + {INVALID_CATENARY, WIRE_Y_DOWN_SE, WIRE_Y_DOWN_NW, WIRE_Y_DOWN_BOTH}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, }, { /* Tileh == 12 */ - {INVALID_CATENARY, WIRE_X_DOWN_NE, WIRE_X_DOWN_SW, WIRE_X_DOWN_BOTH}, + {INVALID_CATENARY, WIRE_X_DOWN_NE, WIRE_X_DOWN_SW, WIRE_X_DOWN_BOTH}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, diff --git a/table/files.h b/table/files.h index 74b20ed13..5015fe82a 100644 --- a/table/files.h +++ b/table/files.h @@ -25,31 +25,31 @@ static FileList files_dos = { { - { "TRG1.GRF", {0x93,0x11,0x67,0x62,0x80,0xe5,0xb1,0x40,0x77,0xa8,0xee,0x41,0xc1,0xb4,0x21,0x92} }, // 0 - 4792 inclusive - { "TRGI.GRF", {0xda,0x6a,0x6c,0x9d,0xcc,0x45,0x1e,0xec,0x88,0xd7,0x92,0x11,0x43,0x7b,0x76,0xa8} }, // 4793 - 4889 inclusive - { "dosdummy.grf", {0x07,0x01,0xe6,0xc4,0x07,0x6a,0x5b,0xc3,0xf4,0x9f,0x01,0xad,0x21,0x6c,0xa0,0xc2} }, // 4890 - 4895 inclusive - { "nsignalsw.grf", {0x65,0xb9,0xd7,0x30,0x56,0x06,0xcc,0x9e,0x27,0x57,0xc8,0xe4,0x9b,0xb3,0x66,0x81} }, // 4896 - 5381 inclusive + { "TRG1.GRF", {0x93, 0x11, 0x67, 0x62, 0x80, 0xe5, 0xb1, 0x40, 0x77, 0xa8, 0xee, 0x41, 0xc1, 0xb4, 0x21, 0x92} }, // 0 - 4792 inclusive + { "TRGI.GRF", {0xda, 0x6a, 0x6c, 0x9d, 0xcc, 0x45, 0x1e, 0xec, 0x88, 0xd7, 0x92, 0x11, 0x43, 0x7b, 0x76, 0xa8} }, // 4793 - 4889 inclusive + { "dosdummy.grf", {0x07, 0x01, 0xe6, 0xc4, 0x07, 0x6a, 0x5b, 0xc3, 0xf4, 0x9f, 0x01, 0xad, 0x21, 0x6c, 0xa0, 0xc2} }, // 4890 - 4895 inclusive + { "nsignalsw.grf", {0x65, 0xb9, 0xd7, 0x30, 0x56, 0x06, 0xcc, 0x9e, 0x27, 0x57, 0xc8, 0xe4, 0x9b, 0xb3, 0x66, 0x81} }, // 4896 - 5381 inclusive { NULL, { 0 } } }, - { { "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} } + { { "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} } } }; 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 - { "nsignalsw.grf", {0x65,0xb9,0xd7,0x30,0x56,0x06,0xcc,0x9e,0x27,0x57,0xc8,0xe4,0x9b,0xb3,0x66,0x81} }, // 4896 - 5381 inclusive + { "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 + { "nsignalsw.grf", {0x65, 0xb9, 0xd7, 0x30, 0x56, 0x06, 0xcc, 0x9e, 0x27, 0x57, 0xc8, 0xe4, 0x9b, 0xb3, 0x66, 0x81} }, // 4896 - 5381 inclusive { NULL, { 0 } }, { NULL, { 0 } } }, - { { "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} } + { { "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} } } }; -static MD5File sample_cat_win = { "SAMPLE.CAT", {0x92,0x12,0xe8,0x1e,0x72,0xba,0xdd,0x4b,0xbe,0x1e,0xae,0xae,0x66,0x45,0x8e,0x10} }; -static MD5File sample_cat_dos = { "SAMPLE.CAT", {0x42,0x2e,0xa3,0xdd,0x07,0x4d,0x28,0x59,0xbb,0x51,0x63,0x9a,0x6e,0x0e,0x85,0xda} }; +static MD5File sample_cat_win = { "SAMPLE.CAT", {0x92, 0x12, 0xe8, 0x1e, 0x72, 0xba, 0xdd, 0x4b, 0xbe, 0x1e, 0xae, 0xae, 0x66, 0x45, 0x8e, 0x10} }; +static MD5File sample_cat_dos = { "SAMPLE.CAT", {0x42, 0x2e, 0xa3, 0xdd, 0x07, 0x4d, 0x28, 0x59, 0xbb, 0x51, 0x63, 0x9a, 0x6e, 0x0e, 0x85, 0xda} }; diff --git a/table/genland.h b/table/genland.h index 67062cd82..4007f8db3 100644 --- a/table/genland.h +++ b/table/genland.h @@ -1,157 +1,157 @@ /* $Id$ */ -#define M(x,y) {x, y} +#define M(x, y) {x, y} static const TileIndexDiffC _make_desert_or_rainforest_data[] = { - M(-5,-6), - M(-4,-6), - M(-3,-6), - M(-2,-6), - M(-1,-6), - M(0,-5), - M(1,-5), - M(2,-5), - M(3,-5), - M(4,-5), - M(5,-5), - M(-5,-5), - M(-4,-5), - M(-3,-5), - M(-2,-5), - M(-1,-5), - M(0,-4), - M(1,-4), - M(2,-4), - M(3,-4), - M(4,-4), - M(5,-4), - M(-5,-4), - M(-4,-4), - M(-3,-4), - M(-2,-4), - M(-1,-4), - M(0,-3), - M(1,-3), - M(2,-3), - M(3,-3), - M(4,-3), - M(5,-3), - M(-5,-3), - M(-4,-3), - M(-3,-3), - M(-2,-3), - M(-1,-3), - M(0,-2), - M(1,-2), - M(2,-2), - M(3,-2), - M(4,-2), - M(5,-2), - M(-5,-2), - M(-4,-2), - M(-3,-2), - M(-2,-2), - M(-1,-2), - M(0,-1), - M(1,-1), - M(2,-1), - M(3,-1), - M(4,-1), - M(5,-1), - M(-5,-1), - M(-4,-1), - M(-3,-1), - M(-2,-1), - M(-1,-1), - M(0,0), - M(1,0), - M(2,0), - M(3,0), - M(4,0), - M(5,0), - M(-5,0), - M(-4,0), - M(-3,0), - M(-2,0), - M(-1,0), - M(0,1), - M(1,1), - M(2,1), - M(3,1), - M(4,1), - M(5,1), - M(-5,1), - M(-4,1), - M(-3,1), - M(-2,1), - M(-1,1), - M(0,2), - M(1,2), - M(2,2), - M(3,2), - M(4,2), - M(5,2), - M(-5,2), - M(-4,2), - M(-3,2), - M(-2,2), - M(-1,2), - M(0,3), - M(1,3), - M(2,3), - M(3,3), - M(4,3), - M(5,3), - M(-5,3), - M(-4,3), - M(-3,3), - M(-2,3), - M(-1,3), - M(0,4), - M(1,4), - M(2,4), - M(3,4), - M(4,4), - M(5,4), - M(-5,4), - M(-4,4), - M(-3,4), - M(-2,4), - M(-1,4), - M(0,5), - M(1,5), - M(2,5), - M(3,5), - M(4,5), - M(5,5), - M(6,-3), - M(-6,-4), - M(-3,5), - M(-3,-7), - M(6,-2), - M(-6,-3), - M(-2,5), - M(-2,-7), - M(6,-1), - M(-6,-2), - M(-1,5), - M(-1,-7), - M(6,0), - M(-6,-1), - M(0,6), - M(0,-6), - M(6,1), - M(-6,0), - M(1,6), - M(1,-6), - M(6,2), - M(-6,1), - M(2,6), - M(2,-6), - M(6,3), - M(-6,2), - M(3,6), - M(3,-6) + M(-5, -6), + M(-4, -6), + M(-3, -6), + M(-2, -6), + M(-1, -6), + M( 0, -5), + M( 1, -5), + M( 2, -5), + M( 3, -5), + M( 4, -5), + M( 5, -5), + M(-5, -5), + M(-4, -5), + M(-3, -5), + M(-2, -5), + M(-1, -5), + M( 0, -4), + M( 1, -4), + M( 2, -4), + M( 3, -4), + M( 4, -4), + M( 5, -4), + M(-5, -4), + M(-4, -4), + M(-3, -4), + M(-2, -4), + M(-1, -4), + M( 0, -3), + M( 1, -3), + M( 2, -3), + M( 3, -3), + M( 4, -3), + M( 5, -3), + M(-5, -3), + M(-4, -3), + M(-3, -3), + M(-2, -3), + M(-1, -3), + M( 0, -2), + M( 1, -2), + M( 2, -2), + M( 3, -2), + M( 4, -2), + M( 5, -2), + M(-5, -2), + M(-4, -2), + M(-3, -2), + M(-2, -2), + M(-1, -2), + M( 0, -1), + M( 1, -1), + M( 2, -1), + M( 3, -1), + M( 4, -1), + M( 5, -1), + M(-5, -1), + M(-4, -1), + M(-3, -1), + M(-2, -1), + M(-1, -1), + M( 0, 0), + M( 1, 0), + M( 2, 0), + M( 3, 0), + M( 4, 0), + M( 5, 0), + M(-5, 0), + M(-4, 0), + M(-3, 0), + M(-2, 0), + M(-1, 0), + M( 0, 1), + M( 1, 1), + M( 2, 1), + M( 3, 1), + M( 4, 1), + M( 5, 1), + M(-5, 1), + M(-4, 1), + M(-3, 1), + M(-2, 1), + M(-1, 1), + M( 0, 2), + M( 1, 2), + M( 2, 2), + M( 3, 2), + M( 4, 2), + M( 5, 2), + M(-5, 2), + M(-4, 2), + M(-3, 2), + M(-2, 2), + M(-1, 2), + M( 0, 3), + M( 1, 3), + M( 2, 3), + M( 3, 3), + M( 4, 3), + M( 5, 3), + M(-5, 3), + M(-4, 3), + M(-3, 3), + M(-2, 3), + M(-1, 3), + M( 0, 4), + M( 1, 4), + M( 2, 4), + M( 3, 4), + M( 4, 4), + M( 5, 4), + M(-5, 4), + M(-4, 4), + M(-3, 4), + M(-2, 4), + M(-1, 4), + M( 0, 5), + M( 1, 5), + M( 2, 5), + M( 3, 5), + M( 4, 5), + M( 5, 5), + M( 6, -3), + M(-6, -4), + M(-3, 5), + M(-3, -7), + M( 6, -2), + M(-6, -3), + M(-2, 5), + M(-2, -7), + M( 6, -1), + M(-6, -2), + M(-1, 5), + M(-1, -7), + M( 6, 0), + M(-6, -1), + M( 0, 6), + M( 0, -6), + M( 6, 1), + M(-6, 0), + M( 1, 6), + M( 1, -6), + M( 6, 2), + M(-6, 1), + M( 2, 6), + M( 2, -6), + M( 6, 3), + M(-6, 2), + M( 3, 6), + M( 3, -6) }; diff --git a/table/industry_land.h b/table/industry_land.h index 9844d66df..5ceec7c4f 100644 --- a/table/industry_land.h +++ b/table/industry_land.h @@ -879,13 +879,13 @@ static const DrawIndustrySpec4Struct _industry_anim_offs_3[] = { }; static const byte _industry_anim_offs[] = { - 255, 0, 0, 0, 2, 4, 6, 8, 10, 9, - 7, 5, 3, 1, 255, 0, 0, 0, 2, 4, - 6, 8, 10, 9, 7, 5, 3, 1, 255, 0, - 0, 0, 2, 4, 6, 8, 10, 9, 7, 5, - 3, 1, 255, 0, 0, 0, 2, 4, 6, 8, - 10, 9, 7, 5, 3, 1, 255, 0, 0, 0, - 2, 4, 6, 8, 10, 9, 7, 5, 3, 1 + 255, 0, 0, 0, 2, 4, 6, 8, 10, 9, + 7, 5, 3, 1, 255, 0, 0, 0, 2, 4, + 6, 8, 10, 9, 7, 5, 3, 1, 255, 0, + 0, 0, 2, 4, 6, 8, 10, 9, 7, 5, + 3, 1, 255, 0, 0, 0, 2, 4, 6, 8, + 10, 9, 7, 5, 3, 1, 255, 0, 0, 0, + 2, 4, 6, 8, 10, 9, 7, 5, 3, 1 }; static const byte _industry_anim_offs_2[] = { @@ -896,59 +896,59 @@ static const byte _industry_anim_offs_2[] = { }; static const byte _coal_plant_sparks_x[] = {11, 11, 14, 13, 18, 15}; -static const byte _coal_plant_sparks_y[] = {23, 11, 6, 3, 1, 0}; +static const byte _coal_plant_sparks_y[] = {23, 11, 6, 3, 1, 0}; /* next frame in an animation */ #define N 255 static const byte _industry_section_animation_next[] = { -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, 16, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, 129, N, N, N, N, N, -135, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, 16, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, 129, N, N, N, N, N, +135, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, }; /* animation to start when goods is produced */ static const byte _industry_produce_section[] = { -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -17, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, 130, N, N, N, N, N, 136, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, N, -N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +17, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, 130, N, N, N, N, N, 136, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, N, +N, N, N, N, N, N, N, }; #undef N diff --git a/table/road_land.h b/table/road_land.h index d09174323..52e013bd9 100644 --- a/table/road_land.h +++ b/table/road_land.h @@ -38,7 +38,7 @@ static const DrawTileSprites _road_depot[] = { static const SpriteID _road_tile_sprites_1[16] = { - 0, 0x546, 0x545, 0x53B, 0x544, 0x534, 0x53E, 0x539, + 0, 0x546, 0x545, 0x53B, 0x544, 0x534, 0x53E, 0x539, 0x543, 0x53C, 0x535, 0x538, 0x53D, 0x537, 0x53A, 0x536 }; @@ -59,7 +59,7 @@ static const DrawRoadTileStruct _road_display_datas2_2[] = { }; static const DrawRoadTileStruct _road_display_datas2_3[] = { - MAKELINE(0x57f,1,8) + MAKELINE(0x57f, 1, 8) ENDLINE }; @@ -68,18 +68,18 @@ static const DrawRoadTileStruct _road_display_datas2_4[] = { }; static const DrawRoadTileStruct _road_display_datas2_5[] = { - MAKELINE(0x57f,1,8) - MAKELINE(0x57e,14,8) + MAKELINE(0x57f, 1, 8) + MAKELINE(0x57e, 14, 8) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_6[] = { - MAKELINE(0x57e,8,1) + MAKELINE(0x57e, 8, 1) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_7[] = { - MAKELINE(0x57f,1,8) + MAKELINE(0x57f, 1, 8) ENDLINE }; @@ -88,33 +88,33 @@ static const DrawRoadTileStruct _road_display_datas2_8[] = { }; static const DrawRoadTileStruct _road_display_datas2_9[] = { - MAKELINE(0x57f,8,14) + MAKELINE(0x57f, 8, 14) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_10[] = { - MAKELINE(0x57f,8,14) - MAKELINE(0x57e,8,1) + MAKELINE(0x57f, 8, 14) + MAKELINE(0x57e, 8, 1) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_11[] = { - MAKELINE(0x57f,8,14) + MAKELINE(0x57f, 8, 14) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_12[] = { - MAKELINE(0x57e,8,1) + MAKELINE(0x57e, 8, 1) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_13[] = { - MAKELINE(0x57e,14,8) + MAKELINE(0x57e, 14, 8) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_14[] = { - MAKELINE(0x57e,8,1) + MAKELINE(0x57e, 8, 1) ENDLINE }; @@ -135,9 +135,9 @@ static const DrawRoadTileStruct _road_display_datas2_18[] = { }; static const DrawRoadTileStruct _road_display_datas2_19[] = { - MAKELINE(0x1212,0,2) - MAKELINE(0x1212,3,9) - MAKELINE(0x1212,10,12) + MAKELINE(0x1212, 0, 2) + MAKELINE(0x1212, 3, 9) + MAKELINE(0x1212, 10, 12) ENDLINE }; @@ -146,23 +146,23 @@ static const DrawRoadTileStruct _road_display_datas2_20[] = { }; static const DrawRoadTileStruct _road_display_datas2_21[] = { - MAKELINE(0x1212,0,2) - MAKELINE(0x1212,0,10) - MAKELINE(0x1212,12,2) - MAKELINE(0x1212,12,10) + MAKELINE(0x1212, 0, 2) + MAKELINE(0x1212, 0, 10) + MAKELINE(0x1212, 12, 2) + MAKELINE(0x1212, 12, 10) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_22[] = { - MAKELINE(0x1212,10,0) - MAKELINE(0x1212,3,3) - MAKELINE(0x1212,0,10) + MAKELINE(0x1212, 10, 0) + MAKELINE(0x1212, 3, 3) + MAKELINE(0x1212, 0, 10) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_23[] = { - MAKELINE(0x1212,0,2) - MAKELINE(0x1212,0,10) + MAKELINE(0x1212, 0, 2) + MAKELINE(0x1212, 0, 10) ENDLINE }; @@ -171,42 +171,42 @@ static const DrawRoadTileStruct _road_display_datas2_24[] = { }; static const DrawRoadTileStruct _road_display_datas2_25[] = { - MAKELINE(0x1212,12,2) - MAKELINE(0x1212,9,9) - MAKELINE(0x1212,2,12) + MAKELINE(0x1212, 12, 2) + MAKELINE(0x1212, 9, 9) + MAKELINE(0x1212, 2, 12) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_26[] = { - MAKELINE(0x1212,2,0) - MAKELINE(0x1212,10,0) - MAKELINE(0x1212,2,12) - MAKELINE(0x1212,10,12) + MAKELINE(0x1212, 2, 0) + MAKELINE(0x1212, 10, 0) + MAKELINE(0x1212, 2, 12) + MAKELINE(0x1212, 10, 12) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_27[] = { - MAKELINE(0x1212,2,12) - MAKELINE(0x1212,10,12) + MAKELINE(0x1212, 2, 12) + MAKELINE(0x1212, 10, 12) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_28[] = { - MAKELINE(0x1212,2,0) - MAKELINE(0x1212,9,3) - MAKELINE(0x1212,12,10) + MAKELINE(0x1212, 2, 0) + MAKELINE(0x1212, 9, 3) + MAKELINE(0x1212, 12, 10) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_29[] = { - MAKELINE(0x1212,12,2) - MAKELINE(0x1212,12,10) + MAKELINE(0x1212, 12, 2) + MAKELINE(0x1212, 12, 10) ENDLINE }; static const DrawRoadTileStruct _road_display_datas2_30[] = { - MAKELINE(0x1212,2,0) - MAKELINE(0x1212,10,0) + MAKELINE(0x1212, 2, 0) + MAKELINE(0x1212, 10, 0) ENDLINE }; diff --git a/table/roadveh.h b/table/roadveh.h index 63c1903d7..fa8f18e1f 100644 --- a/table/roadveh.h +++ b/table/roadveh.h @@ -1,1012 +1,1012 @@ /* $Id$ */ static const RoadDriveEntry _roadveh_drive_data_0[] = { - {15,5}, - {14,5}, - {13,5}, - {12,5}, - {11,5}, - {10,5}, - {9,5}, - {8,5}, - {7,5}, - {6,5}, - {5,5}, - {4,5}, - {3,5}, - {2,5}, - {1,5}, - {0,5}, - {0x80,0} + {15, 5}, + {14, 5}, + {13, 5}, + {12, 5}, + {11, 5}, + {10, 5}, + { 9, 5}, + { 8, 5}, + { 7, 5}, + { 6, 5}, + { 5, 5}, + { 4, 5}, + { 3, 5}, + { 2, 5}, + { 1, 5}, + { 0, 5}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_1[] = { - {5,0}, - {5,1}, - {5,2}, - {5,3}, - {5,4}, - {5,5}, - {5,6}, - {5,7}, - {5,8}, - {5,9}, - {5,10}, - {5,11}, - {5,12}, - {5,13}, - {5,14}, - {5,15}, - {0x81,0} + {5, 0}, + {5, 1}, + {5, 2}, + {5, 3}, + {5, 4}, + {5, 5}, + {5, 6}, + {5, 7}, + {5, 8}, + {5, 9}, + {5, 10}, + {5, 11}, + {5, 12}, + {5, 13}, + {5, 14}, + {5, 15}, + {0x81, 0} }; static const RoadDriveEntry _roadveh_drive_data_2[] = { - {5,0}, - {5,1}, - {5,2}, - {4,3}, - {3,4}, - {2,5}, - {1,5}, - {0,5}, - {0x80,0} + {5, 0}, + {5, 1}, + {5, 2}, + {4, 3}, + {3, 4}, + {2, 5}, + {1, 5}, + {0, 5}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_3[] = { - {15,5}, - {14,5}, - {13,5}, - {12,5}, - {11,5}, - {10,5}, - {9,6}, - {8,7}, - {7,8}, - {6,9}, - {5,10}, - {5,11}, - {5,12}, - {5,13}, - {5,14}, - {5,15}, - {0x81,0} + {15, 5}, + {14, 5}, + {13, 5}, + {12, 5}, + {11, 5}, + {10, 5}, + { 9, 6}, + { 8, 7}, + { 7, 8}, + { 6, 9}, + { 5, 10}, + { 5, 11}, + { 5, 12}, + { 5, 13}, + { 5, 14}, + { 5, 15}, + {0x81, 0} }; static const RoadDriveEntry _roadveh_drive_data_4[] = { - {5,0}, - {5,1}, - {5,2}, - {5,3}, - {5,4}, - {5,5}, - {6,6}, - {7,7}, - {8,8}, - {9,9}, - {10,9}, - {11,9}, - {12,9}, - {13,9}, - {14,9}, - {15,9}, - {0x82,0} + { 5, 0}, + { 5, 1}, + { 5, 2}, + { 5, 3}, + { 5, 4}, + { 5, 5}, + { 6, 6}, + { 7, 7}, + { 8, 8}, + { 9, 9}, + {10, 9}, + {11, 9}, + {12, 9}, + {13, 9}, + {14, 9}, + {15, 9}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_5[] = { - {0,9}, - {1,9}, - {2,9}, - {3,10}, - {4,11}, - {5,12}, - {5,13}, - {5,14}, - {5,15}, - {0x81,0} + {0, 9}, + {1, 9}, + {2, 9}, + {3, 10}, + {4, 11}, + {5, 12}, + {5, 13}, + {5, 14}, + {5, 15}, + {0x81, 0} }; static const RoadDriveEntry _roadveh_drive_data_6[] = { - {0,6}, - {0,7}, - {0,8}, - {0,9}, - {0x42,0} + {0, 6}, + {0, 7}, + {0, 8}, + {0, 9}, + {0x42, 0} }; static const RoadDriveEntry _roadveh_drive_data_7[] = { - {6,15}, - {7,15}, - {8,15}, - {9,15}, - {0x43,0} + {6, 15}, + {7, 15}, + {8, 15}, + {9, 15}, + {0x43, 0} }; static const RoadDriveEntry _roadveh_drive_data_8[] = { - {0,9}, - {1,9}, - {2,9}, - {3,9}, - {4,9}, - {5,9}, - {6,9}, - {7,9}, - {8,9}, - {9,9}, - {10,9}, - {11,9}, - {12,9}, - {13,9}, - {14,9}, - {15,9}, - {0x82,0} + { 0, 9}, + { 1, 9}, + { 2, 9}, + { 3, 9}, + { 4, 9}, + { 5, 9}, + { 6, 9}, + { 7, 9}, + { 8, 9}, + { 9, 9}, + {10, 9}, + {11, 9}, + {12, 9}, + {13, 9}, + {14, 9}, + {15, 9}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_9[] = { - {9,15}, - {9,14}, - {9,13}, - {9,12}, - {9,11}, - {9,10}, - {9,9}, - {9,8}, - {9,7}, - {9,6}, - {9,5}, - {9,4}, - {9,3}, - {9,2}, - {9,1}, - {9,0}, - {0x83,0} + {9, 15}, + {9, 14}, + {9, 13}, + {9, 12}, + {9, 11}, + {9, 10}, + {9, 9}, + {9, 8}, + {9, 7}, + {9, 6}, + {9, 5}, + {9, 4}, + {9, 3}, + {9, 2}, + {9, 1}, + {9, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_10[] = { - {0,9}, - {1,9}, - {2,9}, - {3,9}, - {4,9}, - {5,9}, - {6,8}, - {7,7}, - {8,6}, - {9,5}, - {9,4}, - {9,3}, - {9,2}, - {9,1}, - {9,0}, - {0x83,0} + {0, 9}, + {1, 9}, + {2, 9}, + {3, 9}, + {4, 9}, + {5, 9}, + {6, 8}, + {7, 7}, + {8, 6}, + {9, 5}, + {9, 4}, + {9, 3}, + {9, 2}, + {9, 1}, + {9, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_11[] = { - {9,15}, - {9,14}, - {9,13}, - {10,12}, - {11,11}, - {12,10}, - {13,9}, - {14,9}, - {15,9}, - {0x82,0} + { 9, 15}, + { 9, 14}, + { 9, 13}, + {10, 12}, + {11, 11}, + {12, 10}, + {13, 9}, + {14, 9}, + {15, 9}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_12[] = { - {15,5}, - {14,5}, - {13,5}, - {12,4}, - {11,3}, - {10,2}, - {9,1}, - {9,0}, - {0x83,0} + {15, 5}, + {14, 5}, + {13, 5}, + {12, 4}, + {11, 3}, + {10, 2}, + { 9, 1}, + { 9, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_13[] = { - {9,15}, - {9,14}, - {9,13}, - {9,12}, - {9,11}, - {9,10}, - {8,9}, - {7,8}, - {6,7}, - {5,6}, - {4,5}, - {3,5}, - {2,5}, - {1,5}, - {0,5}, - {0x80,0} + {9, 15}, + {9, 14}, + {9, 13}, + {9, 12}, + {9, 11}, + {9, 10}, + {8, 9}, + {7, 8}, + {6, 7}, + {5, 6}, + {4, 5}, + {3, 5}, + {2, 5}, + {1, 5}, + {0, 5}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_14[] = { - {15,8}, - {15,7}, - {15,6}, - {15,5}, - {0x40,0} + {15, 8}, + {15, 7}, + {15, 6}, + {15, 5}, + {0x40, 0} }; static const RoadDriveEntry _roadveh_drive_data_15[] = { - {8,0}, - {7,0}, - {6,0}, - {5,0}, - {0x41,0} + {8, 0}, + {7, 0}, + {6, 0}, + {5, 0}, + {0x41, 0} }; static const RoadDriveEntry _roadveh_drive_data_16[] = { - {15,9}, - {14,9}, - {13,9}, - {12,9}, - {11,9}, - {10,9}, - {9,9}, - {8,9}, - {7,9}, - {6,9}, - {5,9}, - {4,9}, - {3,9}, - {2,9}, - {1,9}, - {0,9}, - {0x80,0} + {15, 9}, + {14, 9}, + {13, 9}, + {12, 9}, + {11, 9}, + {10, 9}, + { 9, 9}, + { 8, 9}, + { 7, 9}, + { 6, 9}, + { 5, 9}, + { 4, 9}, + { 3, 9}, + { 2, 9}, + { 1, 9}, + { 0, 9}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_17[] = { - {9,0}, - {9,1}, - {9,2}, - {9,3}, - {9,4}, - {9,5}, - {9,6}, - {9,7}, - {9,8}, - {9,9}, - {9,10}, - {9,11}, - {9,12}, - {9,13}, - {9,14}, - {9,15}, - {0x81,0} + {9, 0}, + {9, 1}, + {9, 2}, + {9, 3}, + {9, 4}, + {9, 5}, + {9, 6}, + {9, 7}, + {9, 8}, + {9, 9}, + {9, 10}, + {9, 11}, + {9, 12}, + {9, 13}, + {9, 14}, + {9, 15}, + {0x81, 0} }; static const RoadDriveEntry _roadveh_drive_data_18[] = { - {9,0}, - {9,1}, - {9,2}, - {9,3}, - {9,4}, - {9,5}, - {8,6}, - {7,7}, - {6,8}, - {5,9}, - {4,9}, - {3,9}, - {2,9}, - {1,9}, - {0,9}, - {0x80,0} + {9, 0}, + {9, 1}, + {9, 2}, + {9, 3}, + {9, 4}, + {9, 5}, + {8, 6}, + {7, 7}, + {6, 8}, + {5, 9}, + {4, 9}, + {3, 9}, + {2, 9}, + {1, 9}, + {0, 9}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_19[] = { - {15,9}, - {14,9}, - {13,9}, - {12,10}, - {11,11}, - {10,12}, - {9,13}, - {9,14}, - {9,15}, - {0x81,0} + {15, 9}, + {14, 9}, + {13, 9}, + {12, 10}, + {11, 11}, + {10, 12}, + { 9, 13}, + { 9, 14}, + { 9, 15}, + {0x81, 0} }; static const RoadDriveEntry _roadveh_drive_data_20[] = { - {9,0}, - {9,1}, - {10,2}, - {11,3}, - {12,4}, - {13,5}, - {14,5}, - {15,5}, - {0x82,0} + { 9, 0}, + { 9, 1}, + {10, 2}, + {11, 3}, + {12, 4}, + {13, 5}, + {14, 5}, + {15, 5}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_21[] = { - {0,5}, - {1,5}, - {2,5}, - {3,5}, - {4,5}, - {5,6}, - {6,7}, - {7,8}, - {8,9}, - {9,10}, - {9,11}, - {9,12}, - {9,13}, - {9,14}, - {9,15}, - {0x81,0} + {0, 5}, + {1, 5}, + {2, 5}, + {3, 5}, + {4, 5}, + {5, 6}, + {6, 7}, + {7, 8}, + {8, 9}, + {9, 10}, + {9, 11}, + {9, 12}, + {9, 13}, + {9, 14}, + {9, 15}, + {0x81, 0} }; static const RoadDriveEntry _roadveh_drive_data_22[] = { - {0,8}, - {0,7}, - {0,6}, - {0,5}, - {0x42,0} + {0, 8}, + {0, 7}, + {0, 6}, + {0, 5}, + {0x42, 0} }; static const RoadDriveEntry _roadveh_drive_data_23[] = { - {8,15}, - {7,15}, - {6,15}, - {5,15}, - {0x43,0} + {8, 15}, + {7, 15}, + {6, 15}, + {5, 15}, + {0x43, 0} }; static const RoadDriveEntry _roadveh_drive_data_24[] = { - {0,5}, - {1,5}, - {2,5}, - {3,5}, - {4,5}, - {5,5}, - {6,5}, - {7,5}, - {8,5}, - {9,5}, - {10,5}, - {11,5}, - {12,5}, - {13,5}, - {14,5}, - {15,5}, - {0x82,0} + { 0, 5}, + { 1, 5}, + { 2, 5}, + { 3, 5}, + { 4, 5}, + { 5, 5}, + { 6, 5}, + { 7, 5}, + { 8, 5}, + { 9, 5}, + {10, 5}, + {11, 5}, + {12, 5}, + {13, 5}, + {14, 5}, + {15, 5}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_25[] = { - {5,15}, - {5,14}, - {5,13}, - {5,12}, - {5,11}, - {5,10}, - {5,9}, - {5,8}, - {5,7}, - {5,6}, - {5,5}, - {5,4}, - {5,3}, - {5,2}, - {5,1}, - {5,0}, - {0x83,0} + {5, 15}, + {5, 14}, + {5, 13}, + {5, 12}, + {5, 11}, + {5, 10}, + {5, 9}, + {5, 8}, + {5, 7}, + {5, 6}, + {5, 5}, + {5, 4}, + {5, 3}, + {5, 2}, + {5, 1}, + {5, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_26[] = { - {0,5}, - {1,5}, - {2,5}, - {3,4}, - {4,3}, - {5,2}, - {5,1}, - {5,0}, - {0x83,0} + {0, 5}, + {1, 5}, + {2, 5}, + {3, 4}, + {4, 3}, + {5, 2}, + {5, 1}, + {5, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_27[] = { - {5,15}, - {5,14}, - {5,13}, - {5,12}, - {5,11}, - {5,10}, - {6,9}, - {7,8}, - {8,7}, - {9,6}, - {10,5}, - {11,5}, - {12,5}, - {13,5}, - {14,5}, - {15,5}, - {0x82,0} + { 5, 15}, + { 5, 14}, + { 5, 13}, + { 5, 12}, + { 5, 11}, + { 5, 10}, + { 6, 9}, + { 7, 8}, + { 8, 7}, + { 9, 6}, + {10, 5}, + {11, 5}, + {12, 5}, + {13, 5}, + {14, 5}, + {15, 5}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_28[] = { - {15,9}, - {14,9}, - {13,9}, - {12,9}, - {11,9}, - {10,9}, - {9,9}, - {8,8}, - {7,7}, - {6,6}, - {5,5}, - {5,4}, - {5,3}, - {5,2}, - {5,1}, - {5,0}, - {0x83,0} + {15, 9}, + {14, 9}, + {13, 9}, + {12, 9}, + {11, 9}, + {10, 9}, + { 9, 9}, + { 8, 8}, + { 7, 7}, + { 6, 6}, + { 5, 5}, + { 5, 4}, + { 5, 3}, + { 5, 2}, + { 5, 1}, + { 5, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_29[] = { - {5,15}, - {5,14}, - {5,13}, - {5,12}, - {4,11}, - {3,10}, - {2,9}, - {1,9}, - {0,9}, - {0x80,0} + {5, 15}, + {5, 14}, + {5, 13}, + {5, 12}, + {4, 11}, + {3, 10}, + {2, 9}, + {1, 9}, + {0, 9}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_30[] = { - {15,6}, - {15,7}, - {15,8}, - {15,9}, - {0x40,0} + {15, 6}, + {15, 7}, + {15, 8}, + {15, 9}, + {0x40, 0} }; static const RoadDriveEntry _roadveh_drive_data_31[] = { - {6,0}, - {7,0}, - {8,0}, - {9,0}, - {0x41,0} + {6, 0}, + {7, 0}, + {8, 0}, + {9, 0}, + {0x41, 0} }; static const RoadDriveEntry _roadveh_drive_data_32[] = { - {15,5}, - {14,5}, - {13,6}, - {13,7}, - {13,8}, - {13,9}, - {13,10}, - {13,11}, - {12,12}, - {11,12}, - {10,12}, - {9,12}, - {8,12}, - {7,12}, - {6,12}, - {5,11}, - {5,10}, - {5,9}, - {5,8}, - {5,7}, - {5,6}, - {5,7}, - {5,8}, - {5,9}, - {5,10}, - {5,11}, - {6,12}, - {7,12}, - {8,12}, - {9,12}, - {10,12}, - {11,12}, - {12,12}, - {13,11}, - {13,10}, - {14,9}, - {15,9}, - {0x82,0} + {15, 5}, + {14, 5}, + {13, 6}, + {13, 7}, + {13, 8}, + {13, 9}, + {13, 10}, + {13, 11}, + {12, 12}, + {11, 12}, + {10, 12}, + { 9, 12}, + { 8, 12}, + { 7, 12}, + { 6, 12}, + { 5, 11}, + { 5, 10}, + { 5, 9}, + { 5, 8}, + { 5, 7}, + { 5, 6}, + { 5, 7}, + { 5, 8}, + { 5, 9}, + { 5, 10}, + { 5, 11}, + { 6, 12}, + { 7, 12}, + { 8, 12}, + { 9, 12}, + {10, 12}, + {11, 12}, + {12, 12}, + {13, 11}, + {13, 10}, + {14, 9}, + {15, 9}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_33[] = { - {5,0}, - {5,1}, - {6,2}, - {7,2}, - {8,2}, - {9,2}, - {10,2}, - {11,2}, - {12,3}, - {12,4}, - {12,5}, - {12,6}, - {12,7}, - {12,8}, - {12,9}, - {11,10}, - {10,10}, - {9,10}, - {8,10}, - {7,10}, - {6,10}, - {7,10}, - {8,10}, - {9,10}, - {10,10}, - {11,10}, - {12,9}, - {12,8}, - {12,7}, - {12,6}, - {12,5}, - {12,4}, - {12,3}, - {11,2}, - {10,2}, - {9,1}, - {9,0}, - {0x83,0} + { 5, 0}, + { 5, 1}, + { 6, 2}, + { 7, 2}, + { 8, 2}, + { 9, 2}, + {10, 2}, + {11, 2}, + {12, 3}, + {12, 4}, + {12, 5}, + {12, 6}, + {12, 7}, + {12, 8}, + {12, 9}, + {11, 10}, + {10, 10}, + { 9, 10}, + { 8, 10}, + { 7, 10}, + { 6, 10}, + { 7, 10}, + { 8, 10}, + { 9, 10}, + {10, 10}, + {11, 10}, + {12, 9}, + {12, 8}, + {12, 7}, + {12, 6}, + {12, 5}, + {12, 4}, + {12, 3}, + {11, 2}, + {10, 2}, + { 9, 1}, + { 9, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_34[] = { - {15,5}, - {14,5}, - {13,6}, - {13,7}, - {13,8}, - {13,9}, - {13,10}, - {13,11}, - {12,12}, - {11,12}, - {10,12}, - {9,11}, - {9,10}, - {9,9}, - {9,8}, - {9,7}, - {9,6}, - {9,7}, - {9,8}, - {9,9}, - {9,10}, - {9,11}, - {10,12}, - {11,12}, - {12,12}, - {13,11}, - {13,10}, - {14,9}, - {15,9}, - {0x82,0} + {15, 5}, + {14, 5}, + {13, 6}, + {13, 7}, + {13, 8}, + {13, 9}, + {13, 10}, + {13, 11}, + {12, 12}, + {11, 12}, + {10, 12}, + { 9, 11}, + { 9, 10}, + { 9, 9}, + { 9, 8}, + { 9, 7}, + { 9, 6}, + { 9, 7}, + { 9, 8}, + { 9, 9}, + { 9, 10}, + { 9, 11}, + {10, 12}, + {11, 12}, + {12, 12}, + {13, 11}, + {13, 10}, + {14, 9}, + {15, 9}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_35[] = { - {5,0}, - {5,1}, - {6,2}, - {7,2}, - {8,2}, - {9,2}, - {10,2}, - {11,2}, - {12,3}, - {12,4}, - {12,5}, - {11,6}, - {10,6}, - {9,6}, - {8,6}, - {7,6}, - {6,6}, - {7,6}, - {8,6}, - {9,6}, - {10,6}, - {11,6}, - {12,5}, - {12,4}, - {12,3}, - {11,2}, - {10,2}, - {9,1}, - {9,0}, - {0x83,0} + { 5, 0}, + { 5, 1}, + { 6, 2}, + { 7, 2}, + { 8, 2}, + { 9, 2}, + {10, 2}, + {11, 2}, + {12, 3}, + {12, 4}, + {12, 5}, + {11, 6}, + {10, 6}, + { 9, 6}, + { 8, 6}, + { 7, 6}, + { 6, 6}, + { 7, 6}, + { 8, 6}, + { 9, 6}, + {10, 6}, + {11, 6}, + {12, 5}, + {12, 4}, + {12, 3}, + {11, 2}, + {10, 2}, + { 9, 1}, + { 9, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_40[] = { - {0,9}, - {1,9}, - {2,8}, - {2,7}, - {2,6}, - {2,5}, - {2,4}, - {3,3}, - {4,3}, - {5,3}, - {6,3}, - {7,3}, - {8,3}, - {9,3}, - {10,4}, - {10,5}, - {10,6}, - {10,7}, - {10,8}, - {10,9}, - {10,8}, - {10,7}, - {10,6}, - {10,5}, - {10,4}, - {9,3}, - {8,3}, - {7,3}, - {6,3}, - {5,3}, - {4,3}, - {3,3}, - {2,4}, - {1,5}, - {0,5}, - {0x80,0} + { 0, 9}, + { 1, 9}, + { 2, 8}, + { 2, 7}, + { 2, 6}, + { 2, 5}, + { 2, 4}, + { 3, 3}, + { 4, 3}, + { 5, 3}, + { 6, 3}, + { 7, 3}, + { 8, 3}, + { 9, 3}, + {10, 4}, + {10, 5}, + {10, 6}, + {10, 7}, + {10, 8}, + {10, 9}, + {10, 8}, + {10, 7}, + {10, 6}, + {10, 5}, + {10, 4}, + { 9, 3}, + { 8, 3}, + { 7, 3}, + { 6, 3}, + { 5, 3}, + { 4, 3}, + { 3, 3}, + { 2, 4}, + { 1, 5}, + { 0, 5}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_41[] = { - {9,15}, - {9,14}, - {8,13}, - {7,13}, - {6,13}, - {5,13}, - {4,13}, - {3,12}, - {3,11}, - {3,10}, - {3,9}, - {3,8}, - {3,7}, - {3,6}, - {4,5}, - {5,5}, - {6,5}, - {7,5}, - {8,5}, - {9,5}, - {8,5}, - {7,5}, - {6,5}, - {5,5}, - {4,5}, - {3,6}, - {3,7}, - {3,8}, - {3,9}, - {3,10}, - {3,11}, - {3,12}, - {4,13}, - {5,14}, - {5,15}, - {0x81,0} + {9, 15}, + {9, 14}, + {8, 13}, + {7, 13}, + {6, 13}, + {5, 13}, + {4, 13}, + {3, 12}, + {3, 11}, + {3, 10}, + {3, 9}, + {3, 8}, + {3, 7}, + {3, 6}, + {4, 5}, + {5, 5}, + {6, 5}, + {7, 5}, + {8, 5}, + {9, 5}, + {8, 5}, + {7, 5}, + {6, 5}, + {5, 5}, + {4, 5}, + {3, 6}, + {3, 7}, + {3, 8}, + {3, 9}, + {3, 10}, + {3, 11}, + {3, 12}, + {4, 13}, + {5, 14}, + {5, 15}, + {0x81, 0} }; static const RoadDriveEntry _roadveh_drive_data_42[] = { - {0,9}, - {1,9}, - {2,8}, - {2,7}, - {2,6}, - {2,5}, - {2,4}, - {3,3}, - {4,3}, - {5,3}, - {6,4}, - {6,5}, - {6,6}, - {6,7}, - {6,8}, - {6,9}, - {6,8}, - {6,7}, - {6,6}, - {6,5}, - {6,4}, - {5,3}, - {4,3}, - {3,3}, - {2,4}, - {1,5}, - {0,5}, - {0x80,0} + {0, 9}, + {1, 9}, + {2, 8}, + {2, 7}, + {2, 6}, + {2, 5}, + {2, 4}, + {3, 3}, + {4, 3}, + {5, 3}, + {6, 4}, + {6, 5}, + {6, 6}, + {6, 7}, + {6, 8}, + {6, 9}, + {6, 8}, + {6, 7}, + {6, 6}, + {6, 5}, + {6, 4}, + {5, 3}, + {4, 3}, + {3, 3}, + {2, 4}, + {1, 5}, + {0, 5}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_43[] = { - {9,15}, - {9,14}, - {8,13}, - {7,13}, - {6,13}, - {5,13}, - {4,13}, - {3,12}, - {3,11}, - {3,10}, - {4,9}, - {5,9}, - {6,9}, - {7,9}, - {8,9}, - {9,9}, - {8,9}, - {7,9}, - {6,9}, - {5,9}, - {4,9}, - {3,10}, - {3,11}, - {3,12}, - {4,13}, - {5,14}, - {5,15}, - {0x81,0} + {9, 15}, + {9, 14}, + {8, 13}, + {7, 13}, + {6, 13}, + {5, 13}, + {4, 13}, + {3, 12}, + {3, 11}, + {3, 10}, + {4, 9}, + {5, 9}, + {6, 9}, + {7, 9}, + {8, 9}, + {9, 9}, + {8, 9}, + {7, 9}, + {6, 9}, + {5, 9}, + {4, 9}, + {3, 10}, + {3, 11}, + {3, 12}, + {4, 13}, + {5, 14}, + {5, 15}, + {0x81, 0} }; static const RoadDriveEntry _roadveh_drive_data_48[] = { - {15,9}, - {14,9}, - {13,10}, - {13,11}, - {12,12}, - {11,12}, - {10,12}, - {9,12}, - {8,12}, - {7,12}, - {6,12}, - {5,11}, - {5,10}, - {5,9}, - {5,8}, - {5,7}, - {5,6}, - {5,7}, - {5,8}, - {5,9}, - {5,10}, - {5,11}, - {6,12}, - {7,12}, - {8,12}, - {9,12}, - {10,12}, - {11,12}, - {12,12}, - {13,11}, - {13,10}, - {13,9}, - {13,8}, - {13,7}, - {13,6}, - {14,5}, - {15,5}, - {0x82,0} + {15, 9}, + {14, 9}, + {13, 10}, + {13, 11}, + {12, 12}, + {11, 12}, + {10, 12}, + { 9, 12}, + { 8, 12}, + { 7, 12}, + { 6, 12}, + { 5, 11}, + { 5, 10}, + { 5, 9}, + { 5, 8}, + { 5, 7}, + { 5, 6}, + { 5, 7}, + { 5, 8}, + { 5, 9}, + { 5, 10}, + { 5, 11}, + { 6, 12}, + { 7, 12}, + { 8, 12}, + { 9, 12}, + {10, 12}, + {11, 12}, + {12, 12}, + {13, 11}, + {13, 10}, + {13, 9}, + {13, 8}, + {13, 7}, + {13, 6}, + {14, 5}, + {15, 5}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_49[] = { - {9,0}, - {9,1}, - {10,2}, - {11,2}, - {12,3}, - {12,4}, - {12,5}, - {12,6}, - {12,7}, - {12,8}, - {12,9}, - {11,10}, - {10,10}, - {9,10}, - {8,10}, - {7,10}, - {6,10}, - {7,10}, - {8,10}, - {9,10}, - {10,10}, - {11,10}, - {12,9}, - {12,8}, - {12,7}, - {12,6}, - {12,5}, - {12,4}, - {12,3}, - {11,2}, - {10,2}, - {9,2}, - {8,2}, - {7,2}, - {6,2}, - {5,1}, - {5,0}, - {0x83,0} + { 9, 0}, + { 9, 1}, + {10, 2}, + {11, 2}, + {12, 3}, + {12, 4}, + {12, 5}, + {12, 6}, + {12, 7}, + {12, 8}, + {12, 9}, + {11, 10}, + {10, 10}, + { 9, 10}, + { 8, 10}, + { 7, 10}, + { 6, 10}, + { 7, 10}, + { 8, 10}, + { 9, 10}, + {10, 10}, + {11, 10}, + {12, 9}, + {12, 8}, + {12, 7}, + {12, 6}, + {12, 5}, + {12, 4}, + {12, 3}, + {11, 2}, + {10, 2}, + { 9, 2}, + { 8, 2}, + { 7, 2}, + { 6, 2}, + { 5, 1}, + { 5, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_50[] = { - {15,9}, - {14,9}, - {13,10}, - {13,11}, - {12,12}, - {11,12}, - {10,12}, - {9,11}, - {9,10}, - {9,9}, - {9,8}, - {9,7}, - {9,6}, - {9,7}, - {9,8}, - {9,9}, - {9,10}, - {9,11}, - {10,12}, - {11,12}, - {12,12}, - {13,11}, - {13,10}, - {13,9}, - {13,8}, - {13,7}, - {13,6}, - {14,5}, - {15,5}, - {0x82,0} + {15, 9}, + {14, 9}, + {13, 10}, + {13, 11}, + {12, 12}, + {11, 12}, + {10, 12}, + { 9, 11}, + { 9, 10}, + { 9, 9}, + { 9, 8}, + { 9, 7}, + { 9, 6}, + { 9, 7}, + { 9, 8}, + { 9, 9}, + { 9, 10}, + { 9, 11}, + {10, 12}, + {11, 12}, + {12, 12}, + {13, 11}, + {13, 10}, + {13, 9}, + {13, 8}, + {13, 7}, + {13, 6}, + {14, 5}, + {15, 5}, + {0x82, 0} }; static const RoadDriveEntry _roadveh_drive_data_51[] = { - {9,0}, - {9,1}, - {10,2}, - {11,2}, - {12,3}, - {12,4}, - {12,5}, - {11,6}, - {10,6}, - {9,6}, - {8,6}, - {7,6}, - {6,6}, - {7,6}, - {8,6}, - {9,6}, - {10,6}, - {11,6}, - {12,5}, - {12,4}, - {12,3}, - {11,2}, - {10,2}, - {9,2}, - {8,2}, - {7,2}, - {6,2}, - {5,1}, - {5,0}, - {0x83,0} + { 9, 0}, + { 9, 1}, + {10, 2}, + {11, 2}, + {12, 3}, + {12, 4}, + {12, 5}, + {11, 6}, + {10, 6}, + { 9, 6}, + { 8, 6}, + { 7, 6}, + { 6, 6}, + { 7, 6}, + { 8, 6}, + { 9, 6}, + {10, 6}, + {11, 6}, + {12, 5}, + {12, 4}, + {12, 3}, + {11, 2}, + {10, 2}, + { 9, 2}, + { 8, 2}, + { 7, 2}, + { 6, 2}, + { 5, 1}, + { 5, 0}, + {0x83, 0} }; static const RoadDriveEntry _roadveh_drive_data_56[] = { - {0,5}, - {1,5}, - {2,4}, - {3,3}, - {4,3}, - {5,3}, - {6,3}, - {7,3}, - {8,3}, - {9,3}, - {10,4}, - {10,5}, - {10,6}, - {10,7}, - {10,8}, - {10,9}, - {10,8}, - {10,7}, - {10,6}, - {10,5}, - {10,4}, - {9,3}, - {8,3}, - {7,3}, - {6,3}, - {5,3}, - {4,3}, - {3,3}, - {2,4}, - {2,5}, - {2,6}, - {2,7}, - {2,8}, - {1,9}, - {0,9}, - {0x80,0} + { 0, 5}, + { 1, 5}, + { 2, 4}, + { 3, 3}, + { 4, 3}, + { 5, 3}, + { 6, 3}, + { 7, 3}, + { 8, 3}, + { 9, 3}, + {10, 4}, + {10, 5}, + {10, 6}, + {10, 7}, + {10, 8}, + {10, 9}, + {10, 8}, + {10, 7}, + {10, 6}, + {10, 5}, + {10, 4}, + { 9, 3}, + { 8, 3}, + { 7, 3}, + { 6, 3}, + { 5, 3}, + { 4, 3}, + { 3, 3}, + { 2, 4}, + { 2, 5}, + { 2, 6}, + { 2, 7}, + { 2, 8}, + { 1, 9}, + { 0, 9}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_57[] = { - {5,15}, - {5,14}, - {4,13}, - {3,12}, - {3,11}, - {3,10}, - {3,9}, - {3,8}, - {3,7}, - {3,6}, - {4,5}, - {5,5}, - {6,5}, - {7,5}, - {8,5}, - {9,5}, - {8,5}, - {7,5}, - {6,5}, - {5,5}, - {4,5}, - {3,6}, - {3,7}, - {3,8}, - {3,9}, - {3,10}, - {3,11}, - {3,12}, - {4,13}, - {5,13}, - {6,13}, - {7,13}, - {8,13}, - {9,14}, - {9,15}, - {0x81,0} + {5, 15}, + {5, 14}, + {4, 13}, + {3, 12}, + {3, 11}, + {3, 10}, + {3, 9}, + {3, 8}, + {3, 7}, + {3, 6}, + {4, 5}, + {5, 5}, + {6, 5}, + {7, 5}, + {8, 5}, + {9, 5}, + {8, 5}, + {7, 5}, + {6, 5}, + {5, 5}, + {4, 5}, + {3, 6}, + {3, 7}, + {3, 8}, + {3, 9}, + {3, 10}, + {3, 11}, + {3, 12}, + {4, 13}, + {5, 13}, + {6, 13}, + {7, 13}, + {8, 13}, + {9, 14}, + {9, 15}, + {0x81, 0} }; static const RoadDriveEntry _roadveh_drive_data_58[] = { - {0,5}, - {1,5}, - {2,4}, - {3,3}, - {4,3}, - {5,3}, - {6,4}, - {6,5}, - {6,6}, - {6,7}, - {6,8}, - {6,9}, - {6,8}, - {6,7}, - {6,6}, - {6,5}, - {6,4}, - {5,3}, - {4,3}, - {3,3}, - {2,4}, - {2,5}, - {2,6}, - {2,7}, - {2,8}, - {1,9}, - {0,9}, - {0x80,0} + {0, 5}, + {1, 5}, + {2, 4}, + {3, 3}, + {4, 3}, + {5, 3}, + {6, 4}, + {6, 5}, + {6, 6}, + {6, 7}, + {6, 8}, + {6, 9}, + {6, 8}, + {6, 7}, + {6, 6}, + {6, 5}, + {6, 4}, + {5, 3}, + {4, 3}, + {3, 3}, + {2, 4}, + {2, 5}, + {2, 6}, + {2, 7}, + {2, 8}, + {1, 9}, + {0, 9}, + {0x80, 0} }; static const RoadDriveEntry _roadveh_drive_data_59[] = { - {5,15}, - {5,14}, - {4,13}, - {3,12}, - {3,11}, - {3,10}, - {4,9}, - {5,9}, - {6,9}, - {7,9}, - {8,9}, - {9,9}, - {8,9}, - {7,9}, - {6,9}, - {5,9}, - {4,9}, - {3,10}, - {3,11}, - {3,12}, - {4,13}, - {5,13}, - {6,13}, - {7,13}, - {8,13}, - {9,14}, - {9,15}, - {0x81,0} + {5, 15}, + {5, 14}, + {4, 13}, + {3, 12}, + {3, 11}, + {3, 10}, + {4, 9}, + {5, 9}, + {6, 9}, + {7, 9}, + {8, 9}, + {9, 9}, + {8, 9}, + {7, 9}, + {6, 9}, + {5, 9}, + {4, 9}, + {3, 10}, + {3, 11}, + {3, 12}, + {4, 13}, + {5, 13}, + {6, 13}, + {7, 13}, + {8, 13}, + {9, 14}, + {9, 15}, + {0x81, 0} }; static const RoadDriveEntry * const _road_drive_data[] = { diff --git a/table/train_cmd.h b/table/train_cmd.h index da4b7ebfe..1bf8e70c8 100644 --- a/table/train_cmd.h +++ b/table/train_cmd.h @@ -44,14 +44,14 @@ static const byte _engine_sprite_add[] = { static const byte _wagon_full_adder[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 44, 0, 0, 0, 0, 24, - 24, 24, 24, 0, 0, 32, 32, 0, - 4, 4, 4, 4, 4, 4, 4, 0, - 0, 4, 4, 4, 0, 44, 0, 0, - 0, 0, 24, 24, 24, 24, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 44, 0, 0, 0, 0, 24, + 24, 24, 24, 0, 0, 32, 32, 0, + 4, 4, 4, 4, 4, 4, 4, 0, + 0, 4, 4, 4, 0, 44, 0, 0, + 0, 0, 24, 24, 24, 24, 0, 0, 32, 32 }; diff --git a/table/unmovable_land.h b/table/unmovable_land.h index 490c4564b..9b9e7d6cd 100644 --- a/table/unmovable_land.h +++ b/table/unmovable_land.h @@ -13,8 +13,8 @@ typedef struct DrawTileUnmovableStruct { #define TILE_SEQ_END() { 0x80, 0, 0, 0, 0, 0, 0 } static const DrawTileUnmovableStruct _draw_tile_unmovable_data[] = { - {0xA29, 7,7, 2,2, 70, 0}, - {0xA2A, 4,4, 7,7, 61, 0}, + {0xA29, 7, 7, 2, 2, 70, 0}, + {0xA2A, 4, 4, 7, 7, 61, 0}, }; @@ -22,8 +22,8 @@ typedef enum TileTypes { } TileType; typedef enum TropicZones { - TROPICZONE_INVALID = 0, - TROPICZONE_DESERT = 1, + TROPICZONE_INVALID = 0, + TROPICZONE_DESERT = 1, TROPICZONE_RAINFOREST = 2, } TropicZone; @@ -96,32 +96,32 @@ enum { // These refer to the maximums, so Appalling is -1000 to -400 // MAXIMUM RATINGS BOUNDARIES RATING_MINIMUM = -1000, - RATING_APPALLING = -400, - RATING_VERYPOOR = -200, - RATING_POOR = 0, - RATING_MEDIOCRE = 200, - RATING_GOOD = 400, - RATING_VERYGOOD = 600, - RATING_EXCELLENT = 800, - RATING_OUTSTANDING = 1000, // OUTSTANDING + RATING_APPALLING = -400, + RATING_VERYPOOR = -200, + RATING_POOR = 0, + RATING_MEDIOCRE = 200, + RATING_GOOD = 400, + RATING_VERYGOOD = 600, + RATING_EXCELLENT = 800, + RATING_OUTSTANDING = 1000, // OUTSTANDING RATING_MAXIMUM = RATING_OUTSTANDING, // RATINGS AFFECTING NUMBERS RATING_TREE_DOWN_STEP = -35, - RATING_TREE_MINIMUM = RATING_MINIMUM, - RATING_TREE_UP_STEP = 7, - RATING_TREE_MAXIMUM = 220, + RATING_TREE_MINIMUM = RATING_MINIMUM, + RATING_TREE_UP_STEP = 7, + RATING_TREE_MAXIMUM = 220, RATING_TUNNEL_BRIDGE_DOWN_STEP = -250, - RATING_TUNNEL_BRIDGE_MINIMUM = 0, + RATING_TUNNEL_BRIDGE_MINIMUM = 0, RATING_INDUSTRY_DOWN_STEP = -1500, - RATING_INDUSTRY_MINIMUM = RATING_MINIMUM, + RATING_INDUSTRY_MINIMUM = RATING_MINIMUM, RATING_ROAD_DOWN_STEP = -50, - RATING_ROAD_MINIMUM = -100, - RATING_HOUSE_MINIMUM = RATING_MINIMUM, + RATING_ROAD_MINIMUM = -100, + RATING_HOUSE_MINIMUM = RATING_MINIMUM, RATING_BRIBE_UP_STEP = 200, RATING_BRIBE_MAXIMUM = 800, @@ -132,9 +132,9 @@ enum { /* This is the base "normal" number of towns on the 8x8 map, when * one town should get grown per tick. The other numbers of towns * are then scaled based on that. */ - TOWN_GROWTH_FREQUENCY = 23, + TOWN_GROWTH_FREQUENCY = 23, /* Simple value that indicates the house has reached final stage of construction*/ - TOWN_HOUSE_COMPLETED = 3, + TOWN_HOUSE_COMPLETED = 3, }; /* This enum is used in conjonction with town->flags12. diff --git a/town_cmd.c b/town_cmd.c index 7691179cf..8ae8dd1d7 100644 --- a/town_cmd.c +++ b/town_cmd.c @@ -788,24 +788,24 @@ static bool GrowTown(Town *t) static void UpdateTownRadius(Town *t) { static const uint16 _town_radius_data[23][5] = { - { 4, 0, 0, 0, 0}, // 0 - {16, 0, 0, 0, 0}, - {25, 0, 0, 0, 0}, - {36, 0, 0, 0, 0}, - {49, 0, 4, 0, 0}, - {64, 0, 4, 0, 0}, // 20 - {64, 0, 9, 0, 1}, - {64, 0, 9, 0, 4}, - {64, 0, 16, 0, 4}, - {81, 0, 16, 0, 4}, - {81, 0, 16, 0, 4}, // 40 - {81, 0, 25, 0, 9}, - {81, 36, 25, 0, 9}, - {81, 36, 25, 16, 9}, - {81, 49, 0, 25, 9}, - {81, 64, 0, 25, 9}, // 60 - {81, 64, 0, 36, 9}, - {81, 64, 0, 36, 16}, + { 4, 0, 0, 0, 0}, // 0 + { 16, 0, 0, 0, 0}, + { 25, 0, 0, 0, 0}, + { 36, 0, 0, 0, 0}, + { 49, 0, 4, 0, 0}, + { 64, 0, 4, 0, 0}, // 20 + { 64, 0, 9, 0, 1}, + { 64, 0, 9, 0, 4}, + { 64, 0, 16, 0, 4}, + { 81, 0, 16, 0, 4}, + { 81, 0, 16, 0, 4}, // 40 + { 81, 0, 25, 0, 9}, + { 81, 36, 25, 0, 9}, + { 81, 36, 25, 16, 9}, + { 81, 49, 0, 25, 9}, + { 81, 64, 0, 25, 9}, // 60 + { 81, 64, 0, 36, 9}, + { 81, 64, 0, 36, 16}, {100, 81, 0, 49, 16}, {100, 81, 0, 49, 25}, {121, 81, 0, 49, 25}, // 80 @@ -1794,9 +1794,9 @@ void ChangeTownRating(Town *t, int add, int max) /* penalty for removing town-owned stuff */ static const int _default_rating_settings [3][3] = { // ROAD_REMOVE, TUNNELBRIDGE_REMOVE, INDUSTRY_REMOVE - { 0, 128, 384}, // Permissive - { 48, 192, 480}, // Neutral - { 96, 384, 768}, // Hostile + { 0, 128, 384}, // Permissive + { 48, 192, 480}, // Neutral + { 96, 384, 768}, // Hostile }; bool CheckforTownRating(uint32 flags, Town *t, byte type) @@ -1857,80 +1857,80 @@ void InitializeTowns(void) } const TileTypeProcs _tile_type_town_procs = { - DrawTile_Town, /* draw_tile_proc */ - GetSlopeZ_Town, /* get_slope_z_proc */ - ClearTile_Town, /* clear_tile_proc */ - GetAcceptedCargo_Town, /* get_accepted_cargo_proc */ - GetTileDesc_Town, /* get_tile_desc_proc */ - GetTileTrackStatus_Town, /* get_tile_track_status_proc */ - ClickTile_Town, /* click_tile_proc */ - AnimateTile_Town, /* animate_tile_proc */ - TileLoop_Town, /* tile_loop_clear */ - ChangeTileOwner_Town, /* change_tile_owner_clear */ - NULL, /* get_produced_cargo_proc */ - NULL, /* vehicle_enter_tile_proc */ - GetSlopeTileh_Town, /* get_slope_tileh_proc */ + DrawTile_Town, /* draw_tile_proc */ + GetSlopeZ_Town, /* get_slope_z_proc */ + ClearTile_Town, /* clear_tile_proc */ + GetAcceptedCargo_Town, /* get_accepted_cargo_proc */ + GetTileDesc_Town, /* get_tile_desc_proc */ + GetTileTrackStatus_Town, /* get_tile_track_status_proc */ + ClickTile_Town, /* click_tile_proc */ + AnimateTile_Town, /* animate_tile_proc */ + TileLoop_Town, /* tile_loop_clear */ + ChangeTileOwner_Town, /* change_tile_owner_clear */ + NULL, /* get_produced_cargo_proc */ + NULL, /* vehicle_enter_tile_proc */ + GetSlopeTileh_Town, /* get_slope_tileh_proc */ }; // Save and load of towns. static const SaveLoad _town_desc[] = { - SLE_CONDVAR(Town, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Town, xy, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Town, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Town, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Town,population, SLE_FILE_U16 | SLE_VAR_U32, 0, 2), - SLE_CONDVAR(Town,population, SLE_UINT32, 3, SL_MAX_VERSION), + SLE_CONDVAR(Town, population, SLE_FILE_U16 | SLE_VAR_U32, 0, 2), + SLE_CONDVAR(Town, population, SLE_UINT32, 3, SL_MAX_VERSION), - SLE_VAR(Town,num_houses, SLE_UINT16), - SLE_VAR(Town,townnametype,SLE_UINT16), - SLE_VAR(Town,townnameparts,SLE_UINT32), + SLE_VAR(Town, num_houses, SLE_UINT16), + SLE_VAR(Town, townnametype, SLE_UINT16), + SLE_VAR(Town, townnameparts, SLE_UINT32), - SLE_VAR(Town,flags12, SLE_UINT8), - SLE_VAR(Town,statues, SLE_UINT8), + SLE_VAR(Town, flags12, SLE_UINT8), + SLE_VAR(Town, statues, SLE_UINT8), // sort_index_obsolete was stored here in savegame format 0 - 1 SLE_CONDNULL(1, 0, 1), - SLE_VAR(Town,have_ratings,SLE_UINT8), - SLE_ARR(Town,ratings, SLE_INT16, 8), + SLE_VAR(Town, have_ratings, SLE_UINT8), + SLE_ARR(Town, ratings, SLE_INT16, 8), // failed bribe attempts are stored since savegame format 4 - SLE_CONDARR(Town,unwanted, SLE_INT8, 8, 4,SL_MAX_VERSION), - - SLE_CONDVAR(Town,max_pass, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town,max_mail, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town,new_max_pass,SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town,new_max_mail,SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town,act_pass, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town,act_mail, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town,new_act_pass,SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town,new_act_mail,SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - - SLE_CONDVAR(Town,max_pass, SLE_UINT32, 9, SL_MAX_VERSION), - SLE_CONDVAR(Town,max_mail, SLE_UINT32, 9, SL_MAX_VERSION), - SLE_CONDVAR(Town,new_max_pass,SLE_UINT32, 9, SL_MAX_VERSION), - SLE_CONDVAR(Town,new_max_mail,SLE_UINT32, 9, SL_MAX_VERSION), - SLE_CONDVAR(Town,act_pass, SLE_UINT32, 9, SL_MAX_VERSION), - SLE_CONDVAR(Town,act_mail, SLE_UINT32, 9, SL_MAX_VERSION), - SLE_CONDVAR(Town,new_act_pass,SLE_UINT32, 9, SL_MAX_VERSION), - SLE_CONDVAR(Town,new_act_mail,SLE_UINT32, 9, SL_MAX_VERSION), - - SLE_VAR(Town,pct_pass_transported,SLE_UINT8), - SLE_VAR(Town,pct_mail_transported,SLE_UINT8), - - SLE_VAR(Town,act_food, SLE_UINT16), - SLE_VAR(Town,act_water, SLE_UINT16), - SLE_VAR(Town,new_act_food,SLE_UINT16), - SLE_VAR(Town,new_act_water,SLE_UINT16), - - SLE_VAR(Town,time_until_rebuild, SLE_UINT8), - SLE_VAR(Town,grow_counter, SLE_UINT8), - SLE_VAR(Town,growth_rate, SLE_UINT8), - SLE_VAR(Town,fund_buildings_months, SLE_UINT8), - SLE_VAR(Town,road_build_months, SLE_UINT8), - - SLE_VAR(Town,exclusivity, SLE_UINT8), - SLE_VAR(Town,exclusive_counter, SLE_UINT8), + SLE_CONDARR(Town, unwanted, SLE_INT8, 8, 4,SL_MAX_VERSION), + + SLE_CONDVAR(Town, max_pass, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town, max_mail, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town, new_max_pass, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town, new_max_mail, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town, act_pass, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town, act_mail, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town, new_act_pass, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town, new_act_mail, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + + SLE_CONDVAR(Town, max_pass, SLE_UINT32, 9, SL_MAX_VERSION), + SLE_CONDVAR(Town, max_mail, SLE_UINT32, 9, SL_MAX_VERSION), + SLE_CONDVAR(Town, new_max_pass, SLE_UINT32, 9, SL_MAX_VERSION), + SLE_CONDVAR(Town, new_max_mail, SLE_UINT32, 9, SL_MAX_VERSION), + SLE_CONDVAR(Town, act_pass, SLE_UINT32, 9, SL_MAX_VERSION), + SLE_CONDVAR(Town, act_mail, SLE_UINT32, 9, SL_MAX_VERSION), + SLE_CONDVAR(Town, new_act_pass, SLE_UINT32, 9, SL_MAX_VERSION), + SLE_CONDVAR(Town, new_act_mail, SLE_UINT32, 9, SL_MAX_VERSION), + + SLE_VAR(Town, pct_pass_transported, SLE_UINT8), + SLE_VAR(Town, pct_mail_transported, SLE_UINT8), + + SLE_VAR(Town, act_food, SLE_UINT16), + SLE_VAR(Town, act_water, SLE_UINT16), + SLE_VAR(Town, new_act_food, SLE_UINT16), + SLE_VAR(Town, new_act_water, SLE_UINT16), + + SLE_VAR(Town, time_until_rebuild, SLE_UINT8), + SLE_VAR(Town, grow_counter, SLE_UINT8), + SLE_VAR(Town, growth_rate, SLE_UINT8), + SLE_VAR(Town, fund_buildings_months, SLE_UINT8), + SLE_VAR(Town, road_build_months, SLE_UINT8), + + SLE_VAR(Town, exclusivity, SLE_UINT8), + SLE_VAR(Town, exclusive_counter, SLE_UINT8), // reserve extra space in savegame here. (currently 30 bytes) SLE_CONDNULL(30, 2, SL_MAX_VERSION), diff --git a/town_gui.c b/town_gui.c index 9d4d376f2..20ed795d4 100644 --- a/town_gui.c +++ b/town_gui.c @@ -18,13 +18,13 @@ #include "variables.h" static const Widget _town_authority_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 13, 11, 316, 0, 13, STR_2022_LOCAL_AUTHORITY, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 316, 14, 105, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 306, 106, 157, 0x0, STR_2043_LIST_OF_THINGS_TO_DO_AT}, -{ WWT_SCROLLBAR, RESIZE_NONE, 13, 305, 316, 106, 157, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 316, 158, 209, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 316, 210, 221, STR_2042_DO_IT, STR_2044_CARRY_OUT_THE_HIGHLIGHTED}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 316, 14, 105, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 306, 106, 157, 0x0, STR_2043_LIST_OF_THINGS_TO_DO_AT}, +{ WWT_SCROLLBAR, RESIZE_NONE, 13, 305, 316, 106, 157, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 316, 158, 209, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 316, 210, 221, STR_2042_DO_IT, STR_2044_CARRY_OUT_THE_HIGHLIGHTED}, { WIDGETS_END}, }; @@ -291,15 +291,15 @@ static void TownViewWndProc(Window *w, WindowEvent *e) static const Widget _town_view_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 13, 11, 247, 0, 13, STR_2005, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 13, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 259, 14, 105, 0x0, STR_NULL}, -{ WWT_6, RESIZE_NONE, 13, 2, 257, 16, 103, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 259, 106, 137, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 85, 138, 149, STR_00E4_LOCATION, STR_200B_CENTER_THE_MAIN_VIEW_ON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 86, 171, 138, 149, STR_2020_LOCAL_AUTHORITY,STR_2021_SHOW_INFORMATION_ON_LOCAL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 172, 259, 138, 149, STR_0130_RENAME, STR_200C_CHANGE_TOWN_NAME}, +{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 13, 11, 247, 0, 13, STR_2005, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_NONE, 13, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 259, 14, 105, 0x0, STR_NULL}, +{ WWT_6, RESIZE_NONE, 13, 2, 257, 16, 103, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 259, 106, 137, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 85, 138, 149, STR_00E4_LOCATION, STR_200B_CENTER_THE_MAIN_VIEW_ON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 86, 171, 138, 149, STR_2020_LOCAL_AUTHORITY, STR_2021_SHOW_INFORMATION_ON_LOCAL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 172, 259, 138, 149, STR_0130_RENAME, STR_200C_CHANGE_TOWN_NAME}, { WIDGETS_END}, }; @@ -312,17 +312,17 @@ static const WindowDesc _town_view_desc = { }; static const Widget _town_view_scen_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 13, 11, 172, 0, 13, STR_2005, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 13, 11, 172, 0, 13, STR_2005, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_STICKYBOX, RESIZE_NONE, 13, 248, 259, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 259, 14, 105, 0x0, STR_NULL}, -{ WWT_6, RESIZE_NONE, 13, 2, 257, 16, 103, 0x0, STR_NULL}, -{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 259, 106, 137, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 85, 138, 149, STR_00E4_LOCATION, STR_200B_CENTER_THE_MAIN_VIEW_ON}, -{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 173, 247, 0, 13, STR_0130_RENAME, STR_200C_CHANGE_TOWN_NAME}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 86, 171, 138, 149, STR_023C_EXPAND, STR_023B_INCREASE_SIZE_OF_TOWN}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 172, 259, 138, 149, STR_0290_DELETE, STR_0291_DELETE_THIS_TOWN_COMPLETELY}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 259, 14, 105, 0x0, STR_NULL}, +{ WWT_6, RESIZE_NONE, 13, 2, 257, 16, 103, 0x0, STR_NULL}, +{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 259, 106, 137, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 85, 138, 149, STR_00E4_LOCATION, STR_200B_CENTER_THE_MAIN_VIEW_ON}, +{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 173, 247, 0, 13, STR_0130_RENAME, STR_200C_CHANGE_TOWN_NAME}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 86, 171, 138, 149, STR_023C_EXPAND, STR_023B_INCREASE_SIZE_OF_TOWN}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 172, 259, 138, 149, STR_0290_DELETE, STR_0291_DELETE_THIS_TOWN_COMPLETELY}, { WIDGETS_END}, }; @@ -351,15 +351,15 @@ void ShowTownViewWindow(TownID town) } static const Widget _town_directory_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 13, 11, 195, 0, 13, STR_2000_TOWNS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 13, 196, 207, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 98, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 99, 195, 14, 25, STR_SORT_BY_POPULATION, STR_SORT_ORDER_TIP}, -{ WWT_IMGBTN, RESIZE_BOTTOM, 13, 0, 195, 26, 189, 0x0, STR_200A_TOWN_NAMES_CLICK_ON_NAME}, -{ WWT_SCROLLBAR, RESIZE_BOTTOM, 13, 196, 207, 14, 189, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_TB, 13, 0, 195, 190, 201, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_TB, 13, 196, 207, 190, 201, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 13, 11, 195, 0, 13, STR_2000_TOWNS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_NONE, 13, 196, 207, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 0, 98, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 99, 195, 14, 25, STR_SORT_BY_POPULATION, STR_SORT_ORDER_TIP}, +{ WWT_IMGBTN, RESIZE_BOTTOM, 13, 0, 195, 26, 189, 0x0, STR_200A_TOWN_NAMES_CLICK_ON_NAME}, +{ WWT_SCROLLBAR, RESIZE_BOTTOM, 13, 196, 207, 14, 189, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PANEL, RESIZE_TB, 13, 0, 195, 190, 201, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_TB, 13, 196, 207, 190, 201, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; diff --git a/train_cmd.c b/train_cmd.c index 8d711befb..2b06dd92b 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -35,8 +35,8 @@ static bool TrainCheckIfLineEnds(Vehicle *v); static void TrainController(Vehicle *v); -static const byte _vehicle_initial_x_fract[4] = {10,8,4,8}; -static const byte _vehicle_initial_y_fract[4] = {8,4,8,10}; +static const byte _vehicle_initial_x_fract[4] = {10, 8, 4, 8}; +static const byte _vehicle_initial_y_fract[4] = { 8, 4, 8, 10}; static const byte _state_dir_table[4] = { 0x20, 8, 0x10, 4 }; /** @@ -2171,12 +2171,12 @@ static void FillWithStationData(TrainTrackFollowerData* fd, const Vehicle* v) } static const byte _initial_tile_subcoord[6][4][3] = { -{{ 15, 8, 1 },{ 0, 0, 0 },{ 0, 8, 5 },{ 0, 0, 0 }}, -{{ 0, 0, 0 },{ 8, 0, 3 },{ 0, 0, 0 },{ 8,15, 7 }}, -{{ 0, 0, 0 },{ 7, 0, 2 },{ 0, 7, 6 },{ 0, 0, 0 }}, -{{ 15, 8, 2 },{ 0, 0, 0 },{ 0, 0, 0 },{ 8,15, 6 }}, -{{ 15, 7, 0 },{ 8, 0, 4 },{ 0, 0, 0 },{ 0, 0, 0 }}, -{{ 0, 0, 0 },{ 0, 0, 0 },{ 0, 8, 4 },{ 7,15, 0 }}, +{{ 15, 8, 1 }, { 0, 0, 0 }, { 0, 8, 5 }, { 0, 0, 0 }}, +{{ 0, 0, 0 }, { 8, 0, 3 }, { 0, 0, 0 }, { 8, 15, 7 }}, +{{ 0, 0, 0 }, { 7, 0, 2 }, { 0, 7, 6 }, { 0, 0, 0 }}, +{{ 15, 8, 2 }, { 0, 0, 0 }, { 0, 0, 0 }, { 8, 15, 6 }}, +{{ 15, 7, 0 }, { 8, 0, 4 }, { 0, 0, 0 }, { 0, 0, 0 }}, +{{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 8, 4 }, { 7, 15, 0 }}, }; static const uint32 _reachable_tracks[4] = { @@ -2712,10 +2712,10 @@ typedef struct { static const RailtypeSlowdownParams _railtype_slowdown[] = { // normal accel - {256/4, 256/2, 256/4, 2}, // normal - {256/4, 256/2, 256/4, 2}, // electrified - {256/4, 256/2, 256/4, 2}, // monorail - {0, 256/2, 256/4, 2}, // maglev + {256 / 4, 256 / 2, 256 / 4, 2}, // normal + {256 / 4, 256 / 2, 256 / 4, 2}, // electrified + {256 / 4, 256 / 2, 256 / 4, 2}, // monorail + {0, 256 / 2, 256 / 4, 2}, // maglev }; /* Modify the speed of the vehicle due to a turn */ diff --git a/train_gui.c b/train_gui.c index 65424d228..f9b3ee520 100644 --- a/train_gui.c +++ b/train_gui.c @@ -302,14 +302,14 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e) } static const Widget _new_rail_vehicle_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 227, 0, 13, STR_JUST_STRING, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 215, 14, 125, 0x801, STR_8843_TRAIN_VEHICLE_SELECTION}, -{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 216, 227, 14, 125, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_TB, 14, 0, 227, 126, 197, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 107, 198, 209, STR_881F_BUILD_VEHICLE, STR_8844_BUILD_THE_HIGHLIGHTED_TRAIN}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 108, 215, 198, 209, STR_8820_RENAME, STR_8845_RENAME_TRAIN_VEHICLE_TYPE}, -{ WWT_RESIZEBOX, RESIZE_TB, 14, 216, 227, 198, 209, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 227, 0, 13, STR_JUST_STRING, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 215, 14, 125, 0x801, STR_8843_TRAIN_VEHICLE_SELECTION}, +{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 216, 227, 14, 125, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PANEL, RESIZE_TB, 14, 0, 227, 126, 197, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 107, 198, 209, STR_881F_BUILD_VEHICLE, STR_8844_BUILD_THE_HIGHLIGHTED_TRAIN}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 108, 215, 198, 209, STR_8820_RENAME, STR_8845_RENAME_TRAIN_VEHICLE_TYPE}, +{ WWT_RESIZEBOX, RESIZE_TB, 14, 216, 227, 198, 209, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -772,25 +772,25 @@ static void TrainDepotWndProc(Window *w, WindowEvent *e) } static const Widget _train_depot_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 348, 0, 13, STR_8800_TRAIN_DEPOT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 349, 360, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 348, 0, 13, STR_8800_TRAIN_DEPOT, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 349, 360, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_LRB, 14, 326, 348, 14, 13, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_LRTB, 14, 326, 348, 14, 54, 0x2A9, STR_8841_DRAG_TRAIN_VEHICLE_TO_HERE}, -{ WWT_PANEL, RESIZE_LRTB, 14, 326, 348, 55, 109, 0x2BF, STR_DRAG_WHOLE_TRAIN_TO_SELL_TIP}, +{ WWT_PANEL, RESIZE_LRB, 14, 326, 348, 14, 13, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_LRTB, 14, 326, 348, 14, 54, 0x2A9, STR_8841_DRAG_TRAIN_VEHICLE_TO_HERE}, +{ WWT_PANEL, RESIZE_LRTB, 14, 326, 348, 55, 109, 0x2BF, STR_DRAG_WHOLE_TRAIN_TO_SELL_TIP}, -{ WWT_MATRIX, RESIZE_RB, 14, 0, 325, 14, 97, 0x601, STR_883F_TRAINS_CLICK_ON_TRAIN_FOR}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 349, 360, 14, 109, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 116, 110, 121, STR_8815_NEW_VEHICLES, STR_8840_BUILD_NEW_TRAIN_VEHICLE}, -{WWT_NODISTXTBTN, RESIZE_TB, 14, 117, 232, 110, 121, STR_CLONE_TRAIN, STR_CLONE_TRAIN_DEPOT_INFO}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 233, 348, 110, 121, STR_00E4_LOCATION, STR_8842_CENTER_MAIN_VIEW_ON_TRAIN}, +{ WWT_MATRIX, RESIZE_RB, 14, 0, 325, 14, 97, 0x601, STR_883F_TRAINS_CLICK_ON_TRAIN_FOR}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 349, 360, 14, 109, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 116, 110, 121, STR_8815_NEW_VEHICLES, STR_8840_BUILD_NEW_TRAIN_VEHICLE}, +{WWT_NODISTXTBTN, RESIZE_TB, 14, 117, 232, 110, 121, STR_CLONE_TRAIN, STR_CLONE_TRAIN_DEPOT_INFO}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 233, 348, 110, 121, STR_00E4_LOCATION, STR_8842_CENTER_MAIN_VIEW_ON_TRAIN}, -{ WWT_HSCROLLBAR, RESIZE_RTB, 14, 0, 325, 98, 109, 0x0, STR_HSCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_RTB, 14, 349, 348, 110, 121, 0x0, STR_NULL}, +{ WWT_HSCROLLBAR, RESIZE_RTB, 14, 0, 325, 98, 109, 0x0, STR_HSCROLL_BAR_SCROLLS_LIST}, +{ WWT_PANEL, RESIZE_RTB, 14, 349, 348, 110, 121, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 349, 360, 110, 121, 0x0, STR_RESIZE_BUTTON}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 349, 360, 110, 121, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -868,11 +868,11 @@ static void RailVehicleRefitWndProc(Window *w, WindowEvent *e) static const Widget _rail_vehicle_refit_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_RAIL_SELECT_TYPE_OF_CARGO_FOR}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_RAIL_REFIT_VEHICLE,STR_RAIL_REFIT_TO_CARRY_HIGHLIGHTED}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_RAIL_SELECT_TYPE_OF_CARGO_FOR}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_RAIL_REFIT_VEHICLE, STR_RAIL_REFIT_TO_CARRY_HIGHLIGHTED}, { WIDGETS_END}, }; @@ -896,22 +896,22 @@ static void ShowRailVehicleRefitWindow(Vehicle *v) } static const Widget _train_view_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 237, 0, 13, STR_882E, STR_018C_WINDOW_TITLE_DRAG_THIS }, -{ WWT_STICKYBOX, RESIZE_LR, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON }, -{ WWT_PANEL, RESIZE_RB, 14, 0, 231, 14, 121, 0x0, STR_NULL }, -{ WWT_6, RESIZE_RB, 14, 2, 229, 16, 119, 0x0, STR_NULL }, -{ WWT_PUSHIMGBTN, RESIZE_RTB, 14, 0, 237, 122, 133, 0x0, STR_8846_CURRENT_TRAIN_ACTION_CLICK }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 14, 31, 0x2AB, STR_8848_CENTER_MAIN_VIEW_ON_TRAIN }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, 0x2AD, STR_8849_SEND_TRAIN_TO_DEPOT }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2B1, STR_884A_FORCE_TRAIN_TO_PROCEED }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2CB, STR_884B_REVERSE_DIRECTION_OF_TRAIN }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 86, 103, 0x2B2, STR_8847_SHOW_TRAIN_S_ORDERS }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 104, 121, 0x2B3, STR_884C_SHOW_TRAIN_DETAILS }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2B4, STR_RAIL_REFIT_VEHICLE_TO_CARRY }, -{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, SPR_CLONE_TRAIN, STR_CLONE_TRAIN_INFO }, -{ WWT_PANEL, RESIZE_LRB, 14, 232, 249, 122, 121, 0x0, STR_NULL }, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 238, 249, 122, 133, 0x0, STR_NULL }, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 237, 0, 13, STR_882E, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_STICKYBOX, RESIZE_LR, 14, 238, 249, 0, 13, 0x0, STR_STICKY_BUTTON }, +{ WWT_PANEL, RESIZE_RB, 14, 0, 231, 14, 121, 0x0, STR_NULL }, +{ WWT_6, RESIZE_RB, 14, 2, 229, 16, 119, 0x0, STR_NULL }, +{ WWT_PUSHIMGBTN, RESIZE_RTB, 14, 0, 237, 122, 133, 0x0, STR_8846_CURRENT_TRAIN_ACTION_CLICK }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 14, 31, 0x2AB, STR_8848_CENTER_MAIN_VIEW_ON_TRAIN }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, 0x2AD, STR_8849_SEND_TRAIN_TO_DEPOT }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 50, 67, 0x2B1, STR_884A_FORCE_TRAIN_TO_PROCEED }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2CB, STR_884B_REVERSE_DIRECTION_OF_TRAIN }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 86, 103, 0x2B2, STR_8847_SHOW_TRAIN_S_ORDERS }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 104, 121, 0x2B3, STR_884C_SHOW_TRAIN_DETAILS }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 68, 85, 0x2B4, STR_RAIL_REFIT_VEHICLE_TO_CARRY }, +{ WWT_PUSHIMGBTN, RESIZE_LR, 14, 232, 249, 32, 49, SPR_CLONE_TRAIN, STR_CLONE_TRAIN_INFO }, +{ WWT_PANEL, RESIZE_LRB, 14, 232, 249, 122, 121, 0x0, STR_NULL }, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 238, 249, 122, 133, 0x0, STR_NULL }, { WIDGETS_END } }; @@ -1369,34 +1369,34 @@ static void ShowTrainDetailsWindow(const Vehicle *v) } static const Widget _player_trains_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 312, 0, 13, STR_881B_TRAINS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 313, 324, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 324, 14, 25, 0x0, STR_NULL}, -{ WWT_MATRIX, RESIZE_RB, 14, 0, 312, 26, 207, 0x701, STR_883D_TRAINS_CLICK_ON_TRAIN_FOR}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 313, 324, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 156, 208, 219, STR_8815_NEW_VEHICLES, STR_883E_BUILD_NEW_TRAINS_REQUIRES}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 157, 312, 208, 219, STR_REPLACE_VEHICLES, STR_REPLACE_HELP}, -{ WWT_PANEL, RESIZE_RTB, 14, 313, 312, 208, 219, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 313, 324, 208, 219, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 312, 0, 13, STR_881B_TRAINS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 313, 324, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, +{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, +{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 324, 14, 25, 0x0, STR_NULL}, +{ WWT_MATRIX, RESIZE_RB, 14, 0, 312, 26, 207, 0x701, STR_883D_TRAINS_CLICK_ON_TRAIN_FOR}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 313, 324, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 156, 208, 219, STR_8815_NEW_VEHICLES, STR_883E_BUILD_NEW_TRAINS_REQUIRES}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 157, 312, 208, 219, STR_REPLACE_VEHICLES, STR_REPLACE_HELP}, +{ WWT_PANEL, RESIZE_RTB, 14, 313, 312, 208, 219, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 313, 324, 208, 219, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const Widget _other_player_trains_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 312, 0, 13, STR_881B_TRAINS, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_LR, 14, 313, 324, 0, 13, 0x0, STR_STICKY_BUTTON}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, -{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, -{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 324, 14, 25, 0x0, STR_NULL}, -{ WWT_MATRIX, RESIZE_RB, 14, 0, 312, 26, 207, 0x701, STR_883D_TRAINS_CLICK_ON_TRAIN_FOR}, -{ WWT_SCROLLBAR, RESIZE_LRB, 14, 313, 324, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_RTB, 14, 0, 312, 208, 219, 0x0, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 313, 324, 208, 219, 0x0, STR_RESIZE_BUTTON}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 312, 0, 13, STR_881B_TRAINS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_LR, 14, 313, 324, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, +{ WWT_PANEL, RESIZE_NONE, 14, 81, 235, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 236, 247, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP}, +{ WWT_PANEL, RESIZE_RIGHT, 14, 248, 324, 14, 25, 0x0, STR_NULL}, +{ WWT_MATRIX, RESIZE_RB, 14, 0, 312, 26, 207, 0x701, STR_883D_TRAINS_CLICK_ON_TRAIN_FOR}, +{ WWT_SCROLLBAR, RESIZE_LRB, 14, 313, 324, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 312, 208, 219, 0x0, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_LRTB, 14, 313, 324, 208, 219, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; diff --git a/tree_cmd.c b/tree_cmd.c index 6366df469..582f3aef4 100644 --- a/tree_cmd.c +++ b/tree_cmd.c @@ -657,17 +657,17 @@ void InitializeTrees(void) const TileTypeProcs _tile_type_trees_procs = { - DrawTile_Trees, /* draw_tile_proc */ - GetSlopeZ_Trees, /* get_slope_z_proc */ - ClearTile_Trees, /* clear_tile_proc */ - GetAcceptedCargo_Trees, /* get_accepted_cargo_proc */ - GetTileDesc_Trees, /* get_tile_desc_proc */ - GetTileTrackStatus_Trees, /* get_tile_track_status_proc */ - ClickTile_Trees, /* click_tile_proc */ - AnimateTile_Trees, /* animate_tile_proc */ - TileLoop_Trees, /* tile_loop_clear */ - ChangeTileOwner_Trees, /* change_tile_owner_clear */ - NULL, /* get_produced_cargo_proc */ - NULL, /* vehicle_enter_tile_proc */ - GetSlopeTileh_Trees, /* get_slope_tileh_proc */ + DrawTile_Trees, /* draw_tile_proc */ + GetSlopeZ_Trees, /* get_slope_z_proc */ + ClearTile_Trees, /* clear_tile_proc */ + GetAcceptedCargo_Trees, /* get_accepted_cargo_proc */ + GetTileDesc_Trees, /* get_tile_desc_proc */ + GetTileTrackStatus_Trees, /* get_tile_track_status_proc */ + ClickTile_Trees, /* click_tile_proc */ + AnimateTile_Trees, /* animate_tile_proc */ + TileLoop_Trees, /* tile_loop_clear */ + ChangeTileOwner_Trees, /* change_tile_owner_clear */ + NULL, /* get_produced_cargo_proc */ + NULL, /* vehicle_enter_tile_proc */ + GetSlopeTileh_Trees, /* get_slope_tileh_proc */ }; diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 6e5a91a29..aebbfa5ac 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -846,9 +846,9 @@ uint GetBridgeHeight(TileIndex t) } static const byte _bridge_foundations[][31] = { -// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 _S _W _N _E - { 0,16,18, 3,20, 5, 0, 7,22, 0,10,11,12,13,14, 0, 0, 0, 0, 0, 0, 0, 0,18, 0, 0, 0,16, 0,22,20 }, - { 0,15,17, 0,19, 5, 6, 7,21, 9,10,11, 0,13,14, 0, 0, 0, 0, 0, 0, 0, 0,17, 0, 0, 0,15, 0,21,19 } + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 _S _W _N _E + { 0, 16, 18, 3, 20, 5, 0, 7, 22, 0, 10, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 16, 0, 22, 20 }, + { 0, 15, 17, 0, 19, 5, 6, 7, 21, 9, 10, 11, 0, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 15, 0, 21, 19 } }; extern const byte _road_sloped_sprites[14]; @@ -1218,7 +1218,7 @@ static const StringID _bridge_tile_str[(MAX_BRIDGES + 3) + (MAX_BRIDGES + 3)] = STR_5027_TUBULAR_RAIL_BRIDGE, STR_5027_TUBULAR_RAIL_BRIDGE, STR_5027_TUBULAR_RAIL_BRIDGE, - 0,0,0, + 0, 0, 0, STR_5025_WOODEN_ROAD_BRIDGE, STR_5026_CONCRETE_ROAD_BRIDGE, @@ -1233,7 +1233,7 @@ static const StringID _bridge_tile_str[(MAX_BRIDGES + 3) + (MAX_BRIDGES + 3)] = STR_5028_TUBULAR_ROAD_BRIDGE, STR_5028_TUBULAR_ROAD_BRIDGE, STR_5028_TUBULAR_ROAD_BRIDGE, - 0,0,0, + 0, 0, 0, }; static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td) @@ -1330,18 +1330,18 @@ static void ChangeTileOwner_TunnelBridge(TileIndex tile, PlayerID old_player, Pl } -static const byte _tunnel_fractcoord_1[4] = {0x8E,0x18,0x81,0xE8}; -static const byte _tunnel_fractcoord_2[4] = {0x81,0x98,0x87,0x38}; -static const byte _tunnel_fractcoord_3[4] = {0x82,0x88,0x86,0x48}; -static const byte _exit_tunnel_track[4] = {1,2,1,2}; +static const byte _tunnel_fractcoord_1[4] = {0x8E, 0x18, 0x81, 0xE8}; +static const byte _tunnel_fractcoord_2[4] = {0x81, 0x98, 0x87, 0x38}; +static const byte _tunnel_fractcoord_3[4] = {0x82, 0x88, 0x86, 0x48}; +static const byte _exit_tunnel_track[4] = {1, 2, 1, 2}; static const byte _road_exit_tunnel_state[4] = {8, 9, 0, 1}; static const byte _road_exit_tunnel_frame[4] = {2, 7, 9, 4}; -static const byte _tunnel_fractcoord_4[4] = {0x52, 0x85, 0x98, 0x29}; -static const byte _tunnel_fractcoord_5[4] = {0x92, 0x89, 0x58, 0x25}; -static const byte _tunnel_fractcoord_6[4] = {0x92, 0x89, 0x56, 0x45}; -static const byte _tunnel_fractcoord_7[4] = {0x52, 0x85, 0x96, 0x49}; +static const byte _tunnel_fractcoord_4[4] = {0x52, 0x85, 0x98, 0x29}; +static const byte _tunnel_fractcoord_5[4] = {0x92, 0x89, 0x58, 0x25}; +static const byte _tunnel_fractcoord_6[4] = {0x92, 0x89, 0x56, 0x45}; +static const byte _tunnel_fractcoord_7[4] = {0x52, 0x85, 0x96, 0x49}; static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y) { @@ -1454,17 +1454,17 @@ TileIndex GetVehicleOutOfTunnelTile(const Vehicle *v) } const TileTypeProcs _tile_type_tunnelbridge_procs = { - DrawTile_TunnelBridge, /* draw_tile_proc */ - GetSlopeZ_TunnelBridge, /* get_slope_z_proc */ - ClearTile_TunnelBridge, /* clear_tile_proc */ - GetAcceptedCargo_TunnelBridge, /* get_accepted_cargo_proc */ - GetTileDesc_TunnelBridge, /* get_tile_desc_proc */ - GetTileTrackStatus_TunnelBridge,/* get_tile_track_status_proc */ - ClickTile_TunnelBridge, /* click_tile_proc */ - AnimateTile_TunnelBridge, /* animate_tile_proc */ - TileLoop_TunnelBridge, /* tile_loop_clear */ - ChangeTileOwner_TunnelBridge, /* change_tile_owner_clear */ - NULL, /* get_produced_cargo_proc */ - VehicleEnter_TunnelBridge, /* vehicle_enter_tile_proc */ - GetSlopeTileh_TunnelBridge, /* get_slope_tileh_proc */ + DrawTile_TunnelBridge, /* draw_tile_proc */ + GetSlopeZ_TunnelBridge, /* get_slope_z_proc */ + ClearTile_TunnelBridge, /* clear_tile_proc */ + GetAcceptedCargo_TunnelBridge, /* get_accepted_cargo_proc */ + GetTileDesc_TunnelBridge, /* get_tile_desc_proc */ + GetTileTrackStatus_TunnelBridge, /* get_tile_track_status_proc */ + ClickTile_TunnelBridge, /* click_tile_proc */ + AnimateTile_TunnelBridge, /* animate_tile_proc */ + TileLoop_TunnelBridge, /* tile_loop_clear */ + ChangeTileOwner_TunnelBridge, /* change_tile_owner_clear */ + NULL, /* get_produced_cargo_proc */ + VehicleEnter_TunnelBridge, /* vehicle_enter_tile_proc */ + GetSlopeTileh_TunnelBridge, /* get_slope_tileh_proc */ }; diff --git a/variables.h b/variables.h index 3fd9488f9..eaf3ce576 100644 --- a/variables.h +++ b/variables.h @@ -82,131 +82,131 @@ VARDEF byte _saved_scrollpos_zoom; // ********* END OF SAVE REGION typedef struct Patches { - bool modified_catchment; //different-size catchment areas - bool vehicle_speed; // show vehicle speed - bool build_on_slopes; // allow building on slopes - bool mammoth_trains; // allow very long trains - bool join_stations; // allow joining of train stations - bool full_load_any; // new full load calculation, any cargo must be full - bool improved_load; // improved loading algorithm - byte station_spread; // amount a station may spread - bool inflation; // disable inflation - bool selectgoods; // only send the goods to station if a train has been there - bool longbridges; // allow 100 tile long bridges - bool gotodepot; // allow goto depot in orders - bool build_rawmaterial_ind; // allow building raw material industries - bool multiple_industry_per_town; // allow many industries of the same type per town - bool same_industry_close; // allow same type industries to be built close to each other - uint16 lost_train_days; // if a train doesn't switch order in this amount of days, a train is lost warning is shown + bool modified_catchment; // different-size catchment areas + bool vehicle_speed; // show vehicle speed + bool build_on_slopes; // allow building on slopes + bool mammoth_trains; // allow very long trains + bool join_stations; // allow joining of train stations + bool full_load_any; // new full load calculation, any cargo must be full + bool improved_load; // improved loading algorithm + byte station_spread; // amount a station may spread + bool inflation; // disable inflation + bool selectgoods; // only send the goods to station if a train has been there + bool longbridges; // allow 100 tile long bridges + bool gotodepot; // allow goto depot in orders + bool build_rawmaterial_ind; // allow building raw material industries + bool multiple_industry_per_town; // allow many industries of the same type per town + bool same_industry_close; // allow same type industries to be built close to each other + uint16 lost_train_days; // if a train doesn't switch order in this amount of days, a train is lost warning is shown uint8 order_review_system; - bool train_income_warn; // if train is generating little income, show a warning - bool status_long_date; // always show long date in status bar - bool signal_side; // show signals on right side - bool show_finances; // show finances at end of year - bool new_nonstop; // ttdpatch compatible nonstop handling - bool roadveh_queue; // buggy road vehicle queueing - bool autoscroll; // scroll when moving mouse to the edge. - byte errmsg_duration; // duration of error message - byte land_generator; // the landscape generator - byte oil_refinery_limit; // distance oil refineries allowed from map edge - byte snow_line_height; // a number 0-15 that configured snow line height - byte tgen_smoothness; // how rough is the terrain from 0-3 - uint32 generation_seed; // noise seed for world generation - byte tree_placer; // the tree placer algorithm - byte heightmap_rotation;// rotation director for the heightmap - uint16 progress_update_interval;// interval between two updates of the progress in hundreds of milliseconds - byte se_flat_world_height; // land height a flat world gets in SE - bool bribe; // enable bribing the local authority - bool nonuniform_stations;// allow nonuniform train stations - bool always_small_airport; // always allow small airports - bool realistic_acceleration; // realistic acceleration for trains - bool wagon_speed_limits; // enable wagon speed limits - bool forbid_90_deg; // forbid trains to make 90 deg turns - bool invisible_trees; // don't show trees when buildings are transparent + bool train_income_warn; // if train is generating little income, show a warning + bool status_long_date; // always show long date in status bar + bool signal_side; // show signals on right side + bool show_finances; // show finances at end of year + bool new_nonstop; // ttdpatch compatible nonstop handling + bool roadveh_queue; // buggy road vehicle queueing + bool autoscroll; // scroll when moving mouse to the edge. + byte errmsg_duration; // duration of error message + byte land_generator; // the landscape generator + byte oil_refinery_limit; // distance oil refineries allowed from map edge + byte snow_line_height; // a number 0-15 that configured snow line height + byte tgen_smoothness; // how rough is the terrain from 0-3 + uint32 generation_seed; // noise seed for world generation + byte tree_placer; // the tree placer algorithm + byte heightmap_rotation; // rotation director for the heightmap + uint16 progress_update_interval; // interval between two updates of the progress in hundreds of milliseconds + byte se_flat_world_height; // land height a flat world gets in SE + bool bribe; // enable bribing the local authority + bool nonuniform_stations; // allow nonuniform train stations + bool always_small_airport; // always allow small airports + bool realistic_acceleration; // realistic acceleration for trains + bool wagon_speed_limits; // enable wagon speed limits + bool forbid_90_deg; // forbid trains to make 90 deg turns + bool invisible_trees; // don't show trees when buildings are transparent bool no_servicing_if_no_breakdowns; // dont send vehicles to depot when breakdowns are disabled - bool link_terraform_toolbar; // display terraform toolbar when displaying rail, road, water and airport toolbars - bool reverse_scroll; // Right-Click-Scrolling scrolls in the opposite direction + bool link_terraform_toolbar; // display terraform toolbar when displaying rail, road, water and airport toolbars + bool reverse_scroll; // Right-Click-Scrolling scrolls in the opposite direction - uint8 toolbar_pos; // position of toolbars, 0=left, 1=center, 2=right - uint8 window_snap_radius; // Windows snap at each other if closer than this + uint8 toolbar_pos; // position of toolbars, 0=left, 1=center, 2=right + uint8 window_snap_radius; // Windows snap at each other if closer than this - UnitID max_trains; //max trains in game per player (these are 16bit because the unitnumber field can't hold more) - UnitID max_roadveh; //max trucks in game per player - UnitID max_aircraft; //max planes in game per player - UnitID max_ships; //max ships in game per player + UnitID max_trains; // max trains in game per player (these are 16bit because the unitnumber field can't hold more) + UnitID max_roadveh; // max trucks in game per player + UnitID max_aircraft; // max planes in game per player + UnitID max_ships; // max ships in game per player - bool servint_ispercent; // service intervals are in percents - uint16 servint_trains; // service interval for trains - uint16 servint_roadveh; // service interval for road vehicles - uint16 servint_aircraft;// service interval for aircraft - uint16 servint_ships; // service interval for ships + bool servint_ispercent; // service intervals are in percents + uint16 servint_trains; // service interval for trains + uint16 servint_roadveh; // service interval for road vehicles + uint16 servint_aircraft; // service interval for aircraft + uint16 servint_ships; // service interval for ships bool autorenew; int16 autorenew_months; int32 autorenew_money; - byte pf_maxdepth; // maximum recursion depth when searching for a train route for new pathfinder - uint16 pf_maxlength; // maximum length when searching for a train route for new pathfinder + byte pf_maxdepth; // maximum recursion depth when searching for a train route for new pathfinder + uint16 pf_maxlength; // maximum length when searching for a train route for new pathfinder - bool bridge_pillars; // show bridge pillars for high bridges + bool bridge_pillars; // show bridge pillars for high bridges - bool ai_disable_veh_train; // disable types for AI - bool ai_disable_veh_roadveh; // disable types for AI - bool ai_disable_veh_aircraft; // disable types for AI - bool ai_disable_veh_ship; // disable types for AI - Year starting_year; // starting date - Year ending_year; // end of the game (just show highscore) - Year colored_news_year; // when does newspaper become colored? + bool ai_disable_veh_train; // disable types for AI + bool ai_disable_veh_roadveh; // disable types for AI + bool ai_disable_veh_aircraft; // disable types for AI + bool ai_disable_veh_ship; // disable types for AI + Year starting_year; // starting date + Year ending_year; // end of the game (just show highscore) + Year colored_news_year; // when does newspaper become colored? - bool keep_all_autosave; // name the autosave in a different way. - bool autosave_on_exit; // save an autosave when you quit the game, but do not ask "Do you really want to quit?" - byte max_num_autosaves; // controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1) - bool extra_dynamite; // extra dynamite + bool keep_all_autosave; // name the autosave in a different way. + bool autosave_on_exit; // save an autosave when you quit the game, but do not ask "Do you really want to quit?" + byte max_num_autosaves; // controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1) + bool extra_dynamite; // extra dynamite - bool never_expire_vehicles; // never expire vehicles - byte extend_vehicle_life; // extend vehicle life by this many years + bool never_expire_vehicles; // never expire vehicles + byte extend_vehicle_life; // extend vehicle life by this many years - bool auto_euro; // automatically switch to euro in 2002 - bool serviceathelipad; // service helicopters at helipads automatically (no need to send to depot) - bool smooth_economy; // smooth economy - bool allow_shares; // allow the buying/selling of shares - byte dist_local_authority; // distance for town local authority, default 20 + bool auto_euro; // automatically switch to euro in 2002 + bool serviceathelipad; // service helicopters at helipads automatically (no need to send to depot) + bool smooth_economy; // smooth economy + bool allow_shares; // allow the buying/selling of shares + byte dist_local_authority; // distance for town local authority, default 20 - byte wait_oneway_signal; //waitingtime in days before a oneway signal - byte wait_twoway_signal; //waitingtime in days before a twoway signal + byte wait_oneway_signal; // waitingtime in days before a oneway signal + byte wait_twoway_signal; // waitingtime in days before a twoway signal - uint8 map_x; // Size of map + uint8 map_x; // Size of map uint8 map_y; - byte drag_signals_density; // many signals density - bool ainew_active; // Is the new AI active? - bool ai_in_multiplayer; // Do we allow AIs in multiplayer + byte drag_signals_density; // many signals density + bool ainew_active; // Is the new AI active? + bool ai_in_multiplayer; // Do we allow AIs in multiplayer /* - * New Path Finding - */ + * New Path Finding + */ bool new_pathfinding_all; /* Use the newest pathfinding algorithm for all */ /** - * The maximum amount of search nodes a single NPF run should take. This - * limit should make sure performance stays at acceptable levels at the cost - * of not being perfect anymore. This will probably be fixed in a more - * sophisticated way sometime soon - */ + * The maximum amount of search nodes a single NPF run should take. This + * limit should make sure performance stays at acceptable levels at the cost + * of not being perfect anymore. This will probably be fixed in a more + * sophisticated way sometime soon + */ uint32 npf_max_search_nodes; - uint32 npf_rail_firstred_penalty; /* The penalty for when the first signal is red (and it is not an exit or combo signal) */ + uint32 npf_rail_firstred_penalty; /* The penalty for when the first signal is red (and it is not an exit or combo signal) */ uint32 npf_rail_firstred_exit_penalty; /* The penalty for when the first signal is red (and it is an exit or combo signal) */ - uint32 npf_rail_lastred_penalty; /* The penalty for when the last signal is red */ - uint32 npf_rail_station_penalty; /* The penalty for station tiles */ - uint32 npf_rail_slope_penalty; /* The penalty for sloping upwards */ - uint32 npf_rail_curve_penalty; /* The penalty for curves */ + uint32 npf_rail_lastred_penalty; /* The penalty for when the last signal is red */ + uint32 npf_rail_station_penalty; /* The penalty for station tiles */ + uint32 npf_rail_slope_penalty; /* The penalty for sloping upwards */ + uint32 npf_rail_curve_penalty; /* The penalty for curves */ uint32 npf_rail_depot_reverse_penalty; /* The penalty for reversing in depots */ - uint32 npf_buoy_penalty; /* The penalty for going over (through) a buoy */ - uint32 npf_water_curve_penalty; /* The penalty for curves */ - uint32 npf_road_curve_penalty; /* The penalty for curves */ - uint32 npf_crossing_penalty; /* The penalty for level crossings */ + uint32 npf_buoy_penalty; /* The penalty for going over (through) a buoy */ + uint32 npf_water_curve_penalty; /* The penalty for curves */ + uint32 npf_road_curve_penalty; /* The penalty for curves */ + uint32 npf_crossing_penalty; /* The penalty for level crossings */ bool population_in_label; // Show the population of a town in his label? @@ -229,16 +229,16 @@ typedef struct Cheat { // Only add new entries at the end of the struct! typedef struct Cheats { - Cheat magic_bulldozer; // dynamite industries, unmovables - Cheat switch_player; // change to another player - Cheat money; // get rich - Cheat crossing_tunnels; // allow tunnels that cross each other - Cheat build_in_pause; // build while in pause mode - Cheat no_jetcrash; // no jet will crash on small airports anymore + Cheat magic_bulldozer; // dynamite industries, unmovables + Cheat switch_player; // change to another player + Cheat money; // get rich + Cheat crossing_tunnels; // allow tunnels that cross each other + Cheat build_in_pause; // build while in pause mode + Cheat no_jetcrash; // no jet will crash on small airports anymore Cheat switch_climate; - Cheat change_date; //changes date ingame - Cheat setup_prod; //setup raw-material production in game - Cheat elrail; //allow electric engines to be powered on conventional rail + Cheat change_date; // changes date ingame + Cheat setup_prod; // setup raw-material production in game + Cheat elrail; // allow electric engines to be powered on conventional rail } Cheats; VARDEF Cheats _cheats; @@ -281,10 +281,10 @@ VARDEF int32 _additional_cash_required; VARDEF uint32 _decode_parameters[20]; -VARDEF uint32 _pressed_key; // Low 8 bits = ASCII, High 16 bits = keycode -VARDEF bool _ctrl_pressed; // Is Ctrl pressed? +VARDEF uint32 _pressed_key; // Low 8 bits = ASCII, High 16 bits = keycode +VARDEF bool _ctrl_pressed; // Is Ctrl pressed? VARDEF bool _shift_pressed; // Is Alt pressed? -VARDEF byte _dirkeys; // 1=left, 2=up, 4=right, 8=down +VARDEF byte _dirkeys; // 1 = left, 2 = up, 4 = right, 8 = down VARDEF bool _fullscreen; VARDEF bool _fast_forward; @@ -1100,131 +1100,131 @@ typedef struct BubbleMovement { #define ME(i) { i, 4, 0, 0 } static const BubbleMovement _bubble_float_sw[] = { - MK(0,0,1,0), - MK(1,0,1,1), - MK(0,0,1,0), - MK(1,0,1,2), + MK(0, 0, 1, 0), + MK(1, 0, 1, 1), + MK(0, 0, 1, 0), + MK(1, 0, 1, 2), ME(1) }; static const BubbleMovement _bubble_float_ne[] = { - MK(0,0,1,0), - MK(-1,0,1,1), - MK(0,0,1,0), - MK(-1,0,1,2), + MK( 0, 0, 1, 0), + MK(-1, 0, 1, 1), + MK( 0, 0, 1, 0), + MK(-1, 0, 1, 2), ME(1) }; static const BubbleMovement _bubble_float_se[] = { - MK(0,0,1,0), - MK(0,1,1,1), - MK(0,0,1,0), - MK(0,1,1,2), + MK(0, 0, 1, 0), + MK(0, 1, 1, 1), + MK(0, 0, 1, 0), + MK(0, 1, 1, 2), ME(1) }; static const BubbleMovement _bubble_float_nw[] = { - MK(0,0,1,0), - MK(0,-1,1,1), - MK(0,0,1,0), - MK(0,-1,1,2), + MK(0, 0, 1, 0), + MK(0, -1, 1, 1), + MK(0, 0, 1, 0), + MK(0, -1, 1, 2), ME(1) }; static const BubbleMovement _bubble_burst[] = { - MK(0,0,1,2), - MK(0,0,1,7), - MK(0,0,1,8), - MK(0,0,1,9), + MK(0, 0, 1, 2), + MK(0, 0, 1, 7), + MK(0, 0, 1, 8), + MK(0, 0, 1, 9), ME(0) }; static const BubbleMovement _bubble_absorb[] = { - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(0,0,1,0), - MK(0,0,1,2), - MK(0,0,1,0), - MK(0,0,1,1), - MK(2,1,3,0), - MK(1,1,3,1), - MK(2,1,3,0), - MK(1,1,3,2), - MK(2,1,3,0), - MK(1,1,3,1), - MK(2,1,3,0), - MK(1,0,1,2), - MK(0,0,1,0), - MK(1,0,1,1), - MK(0,0,1,0), - MK(1,0,1,2), - MK(0,0,1,0), - MK(1,0,1,1), - MK(0,0,1,0), - MK(1,0,1,2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(0, 0, 1, 0), + MK(0, 0, 1, 2), + MK(0, 0, 1, 0), + MK(0, 0, 1, 1), + MK(2, 1, 3, 0), + MK(1, 1, 3, 1), + MK(2, 1, 3, 0), + MK(1, 1, 3, 2), + MK(2, 1, 3, 0), + MK(1, 1, 3, 1), + MK(2, 1, 3, 0), + MK(1, 0, 1, 2), + MK(0, 0, 1, 0), + MK(1, 0, 1, 1), + MK(0, 0, 1, 0), + MK(1, 0, 1, 2), + MK(0, 0, 1, 0), + MK(1, 0, 1, 1), + MK(0, 0, 1, 0), + MK(1, 0, 1, 2), ME(2), - MK(0,0,0,0xA), - MK(0,0,0,0xB), - MK(0,0,0,0xC), - MK(0,0,0,0xD), - MK(0,0,0,0xE), + MK(0, 0, 0, 0xA), + MK(0, 0, 0, 0xB), + MK(0, 0, 0, 0xC), + MK(0, 0, 0, 0xD), + MK(0, 0, 0, 0xE), ME(0) }; #undef ME @@ -1422,13 +1422,13 @@ void DecreaseVehicleValue(Vehicle *v) } static const byte _breakdown_chance[64] = { - 3, 3, 3, 3, 3, 3, 3, 3, - 4, 4, 5, 5, 6, 6, 7, 7, - 8, 8, 9, 9, 10, 10, 11, 11, - 12, 13, 13, 13, 13, 14, 15, 16, - 17, 19, 21, 25, 28, 31, 34, 37, - 40, 44, 48, 52, 56, 60, 64, 68, - 72, 80, 90, 100, 110, 120, 130, 140, + 3, 3, 3, 3, 3, 3, 3, 3, + 4, 4, 5, 5, 6, 6, 7, 7, + 8, 8, 9, 9, 10, 10, 11, 11, + 12, 13, 13, 13, 13, 14, 15, 16, + 17, 19, 21, 25, 28, 31, 34, 37, + 40, 44, 48, 52, 56, 60, 64, 68, + 72, 80, 90, 100, 110, 120, 130, 140, 150, 170, 190, 210, 230, 250, 250, 250, }; @@ -2138,116 +2138,116 @@ PalSpriteID GetVehiclePalette(const Vehicle *v) // Save and load of vehicles const SaveLoad _common_veh_desc[] = { - SLE_VAR(Vehicle,subtype, SLE_UINT8), - - SLE_REF(Vehicle,next, REF_VEHICLE_OLD), - SLE_VAR(Vehicle,string_id, SLE_STRINGID), - SLE_CONDVAR(Vehicle,unitnumber, SLE_FILE_U8 | SLE_VAR_U16, 0, 7), - SLE_CONDVAR(Vehicle,unitnumber, SLE_UINT16, 8, SL_MAX_VERSION), - SLE_VAR(Vehicle,owner, SLE_UINT8), - SLE_CONDVAR(Vehicle,tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle,tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle,dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle,dest_tile, SLE_UINT32, 6, SL_MAX_VERSION), - - SLE_CONDVAR(Vehicle,x_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle,x_pos, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle,y_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle,y_pos, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_VAR(Vehicle,z_pos, SLE_UINT8), - SLE_VAR(Vehicle,direction, SLE_UINT8), - - SLE_VAR(Vehicle,cur_image, SLE_UINT16), - SLE_VAR(Vehicle,spritenum, SLE_UINT8), - SLE_VAR(Vehicle,sprite_width, SLE_UINT8), - SLE_VAR(Vehicle,sprite_height, SLE_UINT8), - SLE_VAR(Vehicle,z_height, SLE_UINT8), - SLE_VAR(Vehicle,x_offs, SLE_INT8), - SLE_VAR(Vehicle,y_offs, SLE_INT8), - SLE_VAR(Vehicle,engine_type, SLE_UINT16), - - SLE_VAR(Vehicle,max_speed, SLE_UINT16), - SLE_VAR(Vehicle,cur_speed, SLE_UINT16), - SLE_VAR(Vehicle,subspeed, SLE_UINT8), - SLE_VAR(Vehicle,acceleration, SLE_UINT8), - SLE_VAR(Vehicle,progress, SLE_UINT8), - - SLE_VAR(Vehicle,vehstatus, SLE_UINT8), - SLE_CONDVAR(Vehicle,last_station_visited, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVAR(Vehicle,last_station_visited, SLE_UINT16, 5, SL_MAX_VERSION), - - SLE_VAR(Vehicle,cargo_type, SLE_UINT8), - SLE_VAR(Vehicle,cargo_days, SLE_UINT8), - SLE_CONDVAR(Vehicle,cargo_source, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), - SLE_CONDVAR(Vehicle,cargo_source, SLE_UINT16, 7, SL_MAX_VERSION), - SLE_VAR(Vehicle,cargo_cap, SLE_UINT16), - SLE_VAR(Vehicle,cargo_count, SLE_UINT16), - - SLE_VAR(Vehicle,day_counter, SLE_UINT8), - SLE_VAR(Vehicle,tick_counter, SLE_UINT8), - - SLE_VAR(Vehicle,cur_order_index, SLE_UINT8), - SLE_VAR(Vehicle,num_orders, SLE_UINT8), + SLE_VAR(Vehicle, subtype, SLE_UINT8), + + SLE_REF(Vehicle, next, REF_VEHICLE_OLD), + SLE_VAR(Vehicle, string_id, SLE_STRINGID), + SLE_CONDVAR(Vehicle, unitnumber, SLE_FILE_U8 | SLE_VAR_U16, 0, 7), + SLE_CONDVAR(Vehicle, unitnumber, SLE_UINT16, 8, SL_MAX_VERSION), + SLE_VAR(Vehicle, owner, SLE_UINT8), + SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, dest_tile, SLE_UINT32, 6, SL_MAX_VERSION), + + SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, x_pos, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, y_pos, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_VAR(Vehicle, z_pos, SLE_UINT8), + SLE_VAR(Vehicle, direction, SLE_UINT8), + + SLE_VAR(Vehicle, cur_image, SLE_UINT16), + SLE_VAR(Vehicle, spritenum, SLE_UINT8), + SLE_VAR(Vehicle, sprite_width, SLE_UINT8), + SLE_VAR(Vehicle, sprite_height, SLE_UINT8), + SLE_VAR(Vehicle, z_height, SLE_UINT8), + SLE_VAR(Vehicle, x_offs, SLE_INT8), + SLE_VAR(Vehicle, y_offs, SLE_INT8), + SLE_VAR(Vehicle, engine_type, SLE_UINT16), + + SLE_VAR(Vehicle, max_speed, SLE_UINT16), + SLE_VAR(Vehicle, cur_speed, SLE_UINT16), + SLE_VAR(Vehicle, subspeed, SLE_UINT8), + SLE_VAR(Vehicle, acceleration, SLE_UINT8), + SLE_VAR(Vehicle, progress, SLE_UINT8), + + SLE_VAR(Vehicle, vehstatus, SLE_UINT8), + SLE_CONDVAR(Vehicle, last_station_visited, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Vehicle, last_station_visited, SLE_UINT16, 5, SL_MAX_VERSION), + + SLE_VAR(Vehicle, cargo_type, SLE_UINT8), + SLE_VAR(Vehicle, cargo_days, SLE_UINT8), + SLE_CONDVAR(Vehicle, cargo_source, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), + SLE_CONDVAR(Vehicle, cargo_source, SLE_UINT16, 7, SL_MAX_VERSION), + SLE_VAR(Vehicle, cargo_cap, SLE_UINT16), + SLE_VAR(Vehicle, cargo_count, SLE_UINT16), + + SLE_VAR(Vehicle, day_counter, SLE_UINT8), + SLE_VAR(Vehicle, tick_counter, SLE_UINT8), + + SLE_VAR(Vehicle, cur_order_index, SLE_UINT8), + SLE_VAR(Vehicle, num_orders, SLE_UINT8), /* This next line is for version 4 and prior compatibility.. it temporarily reads type and flags (which were both 4 bits) into type. Later on this is converted correctly */ - SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, type), SLE_UINT8, 0, 4), + SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, type), SLE_UINT8, 0, 4), SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_FILE_U8 | SLE_VAR_U16, 0, 4), /* Orders for version 5 and on */ - SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, type), SLE_UINT8, 5, SL_MAX_VERSION), - SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, flags), SLE_UINT8, 5, SL_MAX_VERSION), - SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_UINT16, 5, SL_MAX_VERSION), - - SLE_REF(Vehicle,orders, REF_ORDER), - - SLE_CONDVAR(Vehicle,age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle,age, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle,max_age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle,max_age, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle,date_of_last_service, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle,date_of_last_service, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle,service_interval, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle,service_interval, SLE_INT32, 31, SL_MAX_VERSION), - SLE_VAR(Vehicle,reliability, SLE_UINT16), - SLE_VAR(Vehicle,reliability_spd_dec,SLE_UINT16), - SLE_VAR(Vehicle,breakdown_ctr, SLE_UINT8), - SLE_VAR(Vehicle,breakdown_delay, SLE_UINT8), - SLE_VAR(Vehicle,breakdowns_since_last_service, SLE_UINT8), - SLE_VAR(Vehicle,breakdown_chance, SLE_UINT8), - SLE_CONDVAR(Vehicle,build_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle,build_year, SLE_INT32, 31, SL_MAX_VERSION), - - SLE_VAR(Vehicle,load_unload_time_rem, SLE_UINT16), - - SLE_VAR(Vehicle,profit_this_year, SLE_INT32), - SLE_VAR(Vehicle,profit_last_year, SLE_INT32), - SLE_VAR(Vehicle,value, SLE_UINT32), - - SLE_VAR(Vehicle,random_bits, SLE_UINT8), - SLE_VAR(Vehicle,waiting_triggers, SLE_UINT8), - - SLE_REF(Vehicle,next_shared, REF_VEHICLE), - SLE_REF(Vehicle,prev_shared, REF_VEHICLE), + SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, type), SLE_UINT8, 5, SL_MAX_VERSION), + SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, flags), SLE_UINT8, 5, SL_MAX_VERSION), + SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_UINT16, 5, SL_MAX_VERSION), + + SLE_REF(Vehicle, orders, REF_ORDER), + + SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, age, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, max_age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, max_age, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, date_of_last_service, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, date_of_last_service, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, service_interval, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, service_interval, SLE_INT32, 31, SL_MAX_VERSION), + SLE_VAR(Vehicle, reliability, SLE_UINT16), + SLE_VAR(Vehicle, reliability_spd_dec, SLE_UINT16), + SLE_VAR(Vehicle, breakdown_ctr, SLE_UINT8), + SLE_VAR(Vehicle, breakdown_delay, SLE_UINT8), + SLE_VAR(Vehicle, breakdowns_since_last_service, SLE_UINT8), + SLE_VAR(Vehicle, breakdown_chance, SLE_UINT8), + SLE_CONDVAR(Vehicle, build_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, build_year, SLE_INT32, 31, SL_MAX_VERSION), + + SLE_VAR(Vehicle, load_unload_time_rem, SLE_UINT16), + + SLE_VAR(Vehicle, profit_this_year, SLE_INT32), + SLE_VAR(Vehicle, profit_last_year, SLE_INT32), + SLE_VAR(Vehicle, value, SLE_UINT32), + + SLE_VAR(Vehicle, random_bits, SLE_UINT8), + SLE_VAR(Vehicle, waiting_triggers, SLE_UINT8), + + SLE_REF(Vehicle, next_shared, REF_VEHICLE), + SLE_REF(Vehicle, prev_shared, REF_VEHICLE), // reserve extra space in savegame here. (currently 10 bytes) - SLE_CONDNULL(10, 2, SL_MAX_VERSION), + SLE_CONDNULL(10, 2, SL_MAX_VERSION), SLE_END() }; static const SaveLoad _train_desc[] = { - SLE_WRITEBYTE(Vehicle,type,VEH_Train, 0), // Train type. VEH_Train in mem, 0 in file. + SLE_WRITEBYTE(Vehicle, type, VEH_Train, 0), // Train type. VEH_Train in mem, 0 in file. SLE_INCLUDEX(0, INC_VEHICLE_COMMON), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRail,crash_anim_pos), SLE_UINT16), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRail,force_proceed), SLE_UINT8), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRail,railtype), SLE_UINT8), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRail,track), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRail, crash_anim_pos), SLE_UINT16), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRail, force_proceed), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRail, railtype), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRail, track), SLE_UINT8), - SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,flags), SLE_UINT8, 2, SL_MAX_VERSION), - SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,days_since_order_progr), SLE_UINT16, 2, SL_MAX_VERSION), + SLE_CONDVARX(offsetof(Vehicle, u) + offsetof(VehicleRail, flags), SLE_UINT8, 2, SL_MAX_VERSION), + SLE_CONDVARX(offsetof(Vehicle, u) + offsetof(VehicleRail, days_since_order_progr), SLE_UINT16, 2, SL_MAX_VERSION), SLE_CONDNULL(2, 2, 19), // reserve extra space in savegame here. (currently 11 bytes) @@ -2257,29 +2257,29 @@ static const SaveLoad _train_desc[] = { }; static const SaveLoad _roadveh_desc[] = { - SLE_WRITEBYTE(Vehicle,type,VEH_Road, 1), // Road type. VEH_Road in mem, 1 in file. + SLE_WRITEBYTE(Vehicle, type, VEH_Road, 1), // Road type. VEH_Road in mem, 1 in file. SLE_INCLUDEX(0, INC_VEHICLE_COMMON), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,state), SLE_UINT8), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,frame), SLE_UINT8), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,blocked_ctr), SLE_UINT16), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,overtaking), SLE_UINT8), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,overtaking_ctr),SLE_UINT8), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,crashed_ctr), SLE_UINT16), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,reverse_ctr), SLE_UINT8), - - SLE_CONDREFX(offsetof(Vehicle,u)+offsetof(VehicleRoad,slot), REF_ROADSTOPS, 6, SL_MAX_VERSION), - SLE_CONDNULL(1, 6, SL_MAX_VERSION), - SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,slot_age), SLE_UINT8, 6, SL_MAX_VERSION), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRoad, state), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRoad, frame), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRoad, blocked_ctr), SLE_UINT16), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRoad, overtaking), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRoad, overtaking_ctr), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRoad, crashed_ctr), SLE_UINT16), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleRoad, reverse_ctr), SLE_UINT8), + + SLE_CONDREFX(offsetof(Vehicle, u) + offsetof(VehicleRoad, slot), REF_ROADSTOPS, 6, SL_MAX_VERSION), + SLE_CONDNULL(1, 6, SL_MAX_VERSION), + SLE_CONDVARX(offsetof(Vehicle, u) + offsetof(VehicleRoad, slot_age), SLE_UINT8, 6, SL_MAX_VERSION), // reserve extra space in savegame here. (currently 16 bytes) - SLE_CONDNULL(16, 2, SL_MAX_VERSION), + SLE_CONDNULL(16, 2, SL_MAX_VERSION), SLE_END() }; static const SaveLoad _ship_desc[] = { - SLE_WRITEBYTE(Vehicle,type,VEH_Ship, 2), // Ship type. VEH_Ship in mem, 2 in file. + SLE_WRITEBYTE(Vehicle, type, VEH_Ship, 2), // Ship type. VEH_Ship in mem, 2 in file. SLE_INCLUDEX(0, INC_VEHICLE_COMMON), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleShip,state), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleShip, state), SLE_UINT8), // reserve extra space in savegame here. (currently 16 bytes) SLE_CONDNULL(16, 2, SL_MAX_VERSION), @@ -2288,20 +2288,20 @@ static const SaveLoad _ship_desc[] = { }; static const SaveLoad _aircraft_desc[] = { - SLE_WRITEBYTE(Vehicle,type,VEH_Aircraft, 3), // Aircraft type. VEH_Aircraft in mem, 3 in file. + SLE_WRITEBYTE(Vehicle, type, VEH_Aircraft, 3), // Aircraft type. VEH_Aircraft in mem, 3 in file. SLE_INCLUDEX(0, INC_VEHICLE_COMMON), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleAir,crashed_counter), SLE_UINT16), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleAir,pos), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleAir, crashed_counter), SLE_UINT16), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleAir, pos), SLE_UINT8), - SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleAir,targetairport), SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleAir,targetairport), SLE_UINT16, 5, SL_MAX_VERSION), + SLE_CONDVARX(offsetof(Vehicle, u) + offsetof(VehicleAir, targetairport), SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVARX(offsetof(Vehicle, u) + offsetof(VehicleAir, targetairport), SLE_UINT16, 5, SL_MAX_VERSION), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleAir,state), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleAir, state), SLE_UINT8), - SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleAir,previous_pos), SLE_UINT8, 2, SL_MAX_VERSION), + SLE_CONDVARX(offsetof(Vehicle, u) + offsetof(VehicleAir, previous_pos), SLE_UINT8, 2, SL_MAX_VERSION), // reserve extra space in savegame here. (currently 15 bytes) - SLE_CONDNULL(15, 2, SL_MAX_VERSION), + SLE_CONDNULL(15, 2, SL_MAX_VERSION), SLE_END() }; @@ -2309,28 +2309,28 @@ static const SaveLoad _aircraft_desc[] = { static const SaveLoad _special_desc[] = { SLE_WRITEBYTE(Vehicle,type,VEH_Special, 4), - SLE_VAR(Vehicle,subtype, SLE_UINT8), + SLE_VAR(Vehicle, subtype, SLE_UINT8), - SLE_CONDVAR(Vehicle,tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle,tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle,x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLE_CONDVAR(Vehicle,x_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle,y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLE_CONDVAR(Vehicle,y_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_VAR(Vehicle,z_pos, SLE_UINT8), + SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLE_CONDVAR(Vehicle, x_pos, SLE_INT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLE_CONDVAR(Vehicle, y_pos, SLE_INT32, 6, SL_MAX_VERSION), + SLE_VAR(Vehicle, z_pos, SLE_UINT8), - SLE_VAR(Vehicle,cur_image, SLE_UINT16), - SLE_VAR(Vehicle,sprite_width, SLE_UINT8), - SLE_VAR(Vehicle,sprite_height, SLE_UINT8), - SLE_VAR(Vehicle,z_height, SLE_UINT8), - SLE_VAR(Vehicle,x_offs, SLE_INT8), - SLE_VAR(Vehicle,y_offs, SLE_INT8), - SLE_VAR(Vehicle,progress, SLE_UINT8), - SLE_VAR(Vehicle,vehstatus, SLE_UINT8), + SLE_VAR(Vehicle, cur_image, SLE_UINT16), + SLE_VAR(Vehicle, sprite_width, SLE_UINT8), + SLE_VAR(Vehicle, sprite_height, SLE_UINT8), + SLE_VAR(Vehicle, z_height, SLE_UINT8), + SLE_VAR(Vehicle, x_offs, SLE_INT8), + SLE_VAR(Vehicle, y_offs, SLE_INT8), + SLE_VAR(Vehicle, progress, SLE_UINT8), + SLE_VAR(Vehicle, vehstatus, SLE_UINT8), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleSpecial,unk0), SLE_UINT16), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleSpecial,unk2), SLE_UINT8), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleSpecial, unk0), SLE_UINT16), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleSpecial, unk2), SLE_UINT8), // reserve extra space in savegame here. (currently 16 bytes) SLE_CONDNULL(16, 2, SL_MAX_VERSION), @@ -2339,43 +2339,43 @@ static const SaveLoad _special_desc[] = { }; static const SaveLoad _disaster_desc[] = { - SLE_WRITEBYTE(Vehicle,type,VEH_Disaster, 5), - - SLE_REF(Vehicle,next, REF_VEHICLE_OLD), - - SLE_VAR(Vehicle,subtype, SLE_UINT8), - SLE_CONDVAR(Vehicle,tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle,tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle,dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Vehicle,dest_tile, SLE_UINT32, 6, SL_MAX_VERSION), - - SLE_CONDVAR(Vehicle,x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLE_CONDVAR(Vehicle,x_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle,y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), - SLE_CONDVAR(Vehicle,y_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_VAR(Vehicle,z_pos, SLE_UINT8), - SLE_VAR(Vehicle,direction, SLE_UINT8), - - SLE_VAR(Vehicle,x_offs, SLE_INT8), - SLE_VAR(Vehicle,y_offs, SLE_INT8), - SLE_VAR(Vehicle,sprite_width, SLE_UINT8), - SLE_VAR(Vehicle,sprite_height, SLE_UINT8), - SLE_VAR(Vehicle,z_height, SLE_UINT8), - SLE_VAR(Vehicle,owner, SLE_UINT8), - SLE_VAR(Vehicle,vehstatus, SLE_UINT8), - SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_FILE_U8 | SLE_VAR_U16, 0, 4), - SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_UINT16, 5, SL_MAX_VERSION), - - SLE_VAR(Vehicle,cur_image, SLE_UINT16), - SLE_CONDVAR(Vehicle,age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), - SLE_CONDVAR(Vehicle,age, SLE_INT32, 31, SL_MAX_VERSION), - SLE_VAR(Vehicle,tick_counter, SLE_UINT8), - - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleDisaster,image_override), SLE_UINT16), - SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleDisaster,unk2), SLE_UINT16), + SLE_WRITEBYTE(Vehicle, type, VEH_Disaster, 5), + + SLE_REF(Vehicle, next, REF_VEHICLE_OLD), + + SLE_VAR(Vehicle, subtype, SLE_UINT8), + SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, tile, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, dest_tile, SLE_UINT32, 6, SL_MAX_VERSION), + + SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLE_CONDVAR(Vehicle, x_pos, SLE_INT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLE_CONDVAR(Vehicle, y_pos, SLE_INT32, 6, SL_MAX_VERSION), + SLE_VAR(Vehicle, z_pos, SLE_UINT8), + SLE_VAR(Vehicle, direction, SLE_UINT8), + + SLE_VAR(Vehicle, x_offs, SLE_INT8), + SLE_VAR(Vehicle, y_offs, SLE_INT8), + SLE_VAR(Vehicle, sprite_width, SLE_UINT8), + SLE_VAR(Vehicle, sprite_height, SLE_UINT8), + SLE_VAR(Vehicle, z_height, SLE_UINT8), + SLE_VAR(Vehicle, owner, SLE_UINT8), + SLE_VAR(Vehicle, vehstatus, SLE_UINT8), + SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_UINT16, 5, SL_MAX_VERSION), + + SLE_VAR(Vehicle, cur_image, SLE_UINT16), + SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, age, SLE_INT32, 31, SL_MAX_VERSION), + SLE_VAR(Vehicle, tick_counter, SLE_UINT8), + + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleDisaster, image_override), SLE_UINT16), + SLE_VARX(offsetof(Vehicle, u) + offsetof(VehicleDisaster, unk2), SLE_UINT16), // reserve extra space in savegame here. (currently 16 bytes) - SLE_CONDNULL(16, 2, SL_MAX_VERSION), + SLE_CONDNULL(16, 2, SL_MAX_VERSION), SLE_END() }; @@ -8,24 +8,24 @@ #include "rail.h" enum { - VEH_Invalid = 0, - VEH_Train = 0x10, - VEH_Road = 0x11, - VEH_Ship = 0x12, + VEH_Invalid = 0x00, + VEH_Train = 0x10, + VEH_Road = 0x11, + VEH_Ship = 0x12, VEH_Aircraft = 0x13, - VEH_Special = 0x14, + VEH_Special = 0x14, VEH_Disaster = 0x15, } ; enum VehStatus { - VS_HIDDEN = 1, - VS_STOPPED = 2, - VS_UNCLICKABLE = 4, - VS_DEFPAL = 0x8, - VS_TRAIN_SLOWING = 0x10, - VS_SHADOW = 0x20, + VS_HIDDEN = 0x01, + VS_STOPPED = 0x02, + VS_UNCLICKABLE = 0x04, + VS_DEFPAL = 0x08, + VS_TRAIN_SLOWING = 0x10, + VS_SHADOW = 0x20, VS_AIRCRAFT_BROKEN = 0x40, - VS_CRASHED = 0x80, + VS_CRASHED = 0x80, }; /* Effect vehicle types */ @@ -81,14 +81,14 @@ typedef struct VehicleRail { } VehicleRail; enum { - VRF_REVERSING = 0, + VRF_REVERSING = 0, // used to calculate if train is going up or down - VRF_GOINGUP = 1, - VRF_GOINGDOWN = 2, + VRF_GOINGUP = 1, + VRF_GOINGDOWN = 2, // used to store if a wagon is powered or not - VRF_POWEREDWAGON = 3, + VRF_POWEREDWAGON = 3, // used to reverse the visible direction of the vehicle VRF_REVERSE_DIRECTION = 4, @@ -130,63 +130,63 @@ typedef struct VehicleShip { struct Vehicle { - byte type; // type, ie roadven,train,ship,aircraft,special - byte subtype; // subtype (Filled with values from EffectVehicles or TrainSubTypes) + byte type; // type, ie roadven,train,ship,aircraft,special + byte subtype; // subtype (Filled with values from EffectVehicles or TrainSubTypes) - VehicleID index; // NOSAVE: Index in vehicle array + VehicleID index; // NOSAVE: Index in vehicle array - Vehicle *next; // next - Vehicle *first; // NOSAVE: pointer to the first vehicle in the chain - Vehicle *depot_list; //NOSAVE: linked list to tell what vehicles entered a depot during the last tick. Used by autoreplace + Vehicle *next; // next + Vehicle *first; // NOSAVE: pointer to the first vehicle in the chain + Vehicle *depot_list; //NOSAVE: linked list to tell what vehicles entered a depot during the last tick. Used by autoreplace - StringID string_id; // Displayed string + StringID string_id; // Displayed string - UnitID unitnumber; // unit number, for display purposes only - PlayerID owner; // which player owns the vehicle? + UnitID unitnumber; // unit number, for display purposes only + PlayerID owner; // which player owns the vehicle? - TileIndex tile; // Current tile index - TileIndex dest_tile; // Heading for this tile + TileIndex tile; // Current tile index + TileIndex dest_tile; // Heading for this tile - int32 x_pos; // coordinates + int32 x_pos; // coordinates int32 y_pos; byte z_pos; - byte direction; // facing - - byte spritenum; // currently displayed sprite index - // 0xfd == custom sprite, 0xfe == custom second head sprite - // 0xff == reserved for another custom sprite - uint16 cur_image; // sprite number for this vehicle - byte sprite_width;// width of vehicle sprite - byte sprite_height;// height of vehicle sprite - byte z_height; // z-height of vehicle sprite - int8 x_offs; // x offset for vehicle sprite - int8 y_offs; // y offset for vehicle sprite + byte direction; // facing + + byte spritenum; // currently displayed sprite index + // 0xfd == custom sprite, 0xfe == custom second head sprite + // 0xff == reserved for another custom sprite + uint16 cur_image; // sprite number for this vehicle + byte sprite_width; // width of vehicle sprite + byte sprite_height; // height of vehicle sprite + byte z_height; // z-height of vehicle sprite + int8 x_offs; // x offset for vehicle sprite + int8 y_offs; // y offset for vehicle sprite EngineID engine_type; // for randomized variational spritegroups // bitmask used to resolve them; parts of it get reseeded when triggers // of corresponding spritegroups get matched byte random_bits; - byte waiting_triggers; // triggers to be yet matched + byte waiting_triggers; // triggers to be yet matched - uint16 max_speed; // maximum speed - uint16 cur_speed; // current speed - byte subspeed; // fractional speed - byte acceleration; // used by train & aircraft + uint16 max_speed; // maximum speed + uint16 cur_speed; // current speed + byte subspeed; // fractional speed + byte acceleration; // used by train & aircraft byte progress; - byte vehstatus; // Status + byte vehstatus; // Status StationID last_station_visited; - CargoID cargo_type; // type of cargo this vehicle is carrying - byte cargo_days; // how many days have the pieces been in transit - StationID cargo_source;// source of cargo - uint16 cargo_cap; // total capacity - uint16 cargo_count;// how many pieces are used + CargoID cargo_type; // type of cargo this vehicle is carrying + byte cargo_days; // how many days have the pieces been in transit + StationID cargo_source; // source of cargo + uint16 cargo_cap; // total capacity + uint16 cargo_count; // how many pieces are used byte cargo_subtype; ///< Used for livery refits (NewGRF variations) - byte day_counter; // increased by one for each day - byte tick_counter;// increased by one for each tick + byte day_counter; // increased by one for each day + byte tick_counter; // increased by one for each tick /* Begin Order-stuff */ Order current_order; ///< The current order (+ status, like: loading) @@ -220,7 +220,7 @@ struct Vehicle { byte breakdown_chance; Year build_year; - bool leave_depot_instantly; // NOSAVE: stores if the vehicle needs to leave the depot it just entered. Used by autoreplace + bool leave_depot_instantly; // NOSAVE: stores if the vehicle needs to leave the depot it just entered. Used by autoreplace uint16 load_unload_time_rem; diff --git a/vehicle_gui.c b/vehicle_gui.c index a1bf146a9..7ff1f65fd 100644 --- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -1051,36 +1051,36 @@ static const Widget _replace_rail_vehicle_widgets[] = { }; static const Widget _replace_road_vehicle_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 443, 0, 13, STR_REPLACE_VEHICLES_WHITE, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 14, 444, 455, 0, 13, STR_NULL, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_TB, 14, 0, 227, 126, 197, STR_NULL, STR_NULL}, +{ WWT_STICKYBOX, RESIZE_NONE, 14, 444, 455, 0, 13, STR_NULL, STR_STICKY_BUTTON}, +{ WWT_PANEL, RESIZE_TB, 14, 0, 227, 126, 197, STR_NULL, STR_NULL}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 138, 198, 209, STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON}, -{ WWT_PANEL, RESIZE_TB, 14, 139, 305, 198, 209, STR_NULL, STR_REPLACE_HELP_REPLACE_INFO_TAB}, +{ WWT_PANEL, RESIZE_TB, 14, 139, 305, 198, 209, STR_NULL, STR_REPLACE_HELP_REPLACE_INFO_TAB}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 306, 443, 198, 209, STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON}, -{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 215, 14, 125, 0x801, STR_REPLACE_HELP_LEFT_ARRAY}, -{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 216, 227, 14, 125, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_MATRIX, RESIZE_BOTTOM, 14, 228, 443, 14, 125, 0x801, STR_REPLACE_HELP_RIGHT_ARRAY}, -{ WWT_SCROLL2BAR, RESIZE_BOTTOM, 14, 444, 455, 14, 125, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_TB, 14, 228, 455, 126, 197, STR_NULL, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_TB, 14, 444, 455, 198, 209, STR_NULL, STR_RESIZE_BUTTON}, +{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 215, 14, 125, 0x801, STR_REPLACE_HELP_LEFT_ARRAY}, +{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 216, 227, 14, 125, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_MATRIX, RESIZE_BOTTOM, 14, 228, 443, 14, 125, 0x801, STR_REPLACE_HELP_RIGHT_ARRAY}, +{ WWT_SCROLL2BAR, RESIZE_BOTTOM, 14, 444, 455, 14, 125, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PANEL, RESIZE_TB, 14, 228, 455, 126, 197, STR_NULL, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_TB, 14, 444, 455, 198, 209, STR_NULL, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const Widget _replace_ship_aircraft_vehicle_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 443, 0, 13, STR_REPLACE_VEHICLES_WHITE, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 14, 444, 455, 0, 13, STR_NULL, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_TB, 14, 0, 227, 110, 181, STR_NULL, STR_NULL}, +{ WWT_STICKYBOX, RESIZE_NONE, 14, 444, 455, 0, 13, STR_NULL, STR_STICKY_BUTTON}, +{ WWT_PANEL, RESIZE_TB, 14, 0, 227, 110, 181, STR_NULL, STR_NULL}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 138, 182, 193, STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON}, -{ WWT_PANEL, RESIZE_TB, 14, 139, 305, 182, 193, STR_NULL, STR_REPLACE_HELP_REPLACE_INFO_TAB}, +{ WWT_PANEL, RESIZE_TB, 14, 139, 305, 182, 193, STR_NULL, STR_REPLACE_HELP_REPLACE_INFO_TAB}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 306, 443, 182, 193, STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON}, -{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 215, 14, 109, 0x401, STR_REPLACE_HELP_LEFT_ARRAY}, -{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 216, 227, 14, 109, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_MATRIX, RESIZE_BOTTOM, 14, 228, 443, 14, 109, 0x401, STR_REPLACE_HELP_RIGHT_ARRAY}, -{ WWT_SCROLL2BAR, RESIZE_BOTTOM, 14, 444, 455, 14, 109, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_TB, 14, 228, 455, 110, 181, STR_NULL, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_TB, 14, 444, 455, 182, 193, STR_NULL, STR_RESIZE_BUTTON}, +{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 215, 14, 109, 0x401, STR_REPLACE_HELP_LEFT_ARRAY}, +{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 216, 227, 14, 109, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_MATRIX, RESIZE_BOTTOM, 14, 228, 443, 14, 109, 0x401, STR_REPLACE_HELP_RIGHT_ARRAY}, +{ WWT_SCROLL2BAR, RESIZE_BOTTOM, 14, 444, 455, 14, 109, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, +{ WWT_PANEL, RESIZE_TB, 14, 228, 455, 110, 181, STR_NULL, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_TB, 14, 444, 455, 182, 193, STR_NULL, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; diff --git a/viewport.h b/viewport.h index d0f9c0c37..26b90a24c 100644 --- a/viewport.h +++ b/viewport.h @@ -4,11 +4,11 @@ #define VIEWPORT_H struct ViewPort { - int left,top; // screen coordinates for the viewport - int width, height; // screen width/height for the viewport + int left,top; // screen coordinates for the viewport + int width, height; // screen width/height for the viewport - int virtual_left, virtual_top; // virtual coordinates - int virtual_width, virtual_height; // these are just width << zoom, height << zoom + int virtual_left, virtual_top; // virtual coordinates + int virtual_width, virtual_height; // these are just width << zoom, height << zoom byte zoom; }; @@ -49,41 +49,41 @@ void VpSetPlaceSizingLimit(int limit); Vehicle *CheckMouseOverVehicle(void); enum { - VPM_X_OR_Y = 0, - VPM_FIX_X = 1, - VPM_FIX_Y = 2, - VPM_RAILDIRS = 3, - VPM_X_AND_Y = 4, + VPM_X_OR_Y = 0, + VPM_FIX_X = 1, + VPM_FIX_Y = 2, + VPM_RAILDIRS = 3, + VPM_X_AND_Y = 4, VPM_X_AND_Y_LIMITED = 5, - VPM_SIGNALDIRS = 6 + VPM_SIGNALDIRS = 6 }; // viewport highlight mode (for highlighting tiles below cursor) enum { - VHM_NONE = 0, // default - VHM_RECT = 1, // rectangle (stations, depots, ...) - VHM_POINT = 2, // point (lower land, raise land, level land, ...) + VHM_NONE = 0, // default + VHM_RECT = 1, // rectangle (stations, depots, ...) + VHM_POINT = 2, // point (lower land, raise land, level land, ...) VHM_SPECIAL = 3, // special mode used for highlighting while dragging (and for tunnels/docks) - VHM_DRAG = 4, // dragging items in the depot windows - VHM_RAIL = 5, // rail pieces + VHM_DRAG = 4, // dragging items in the depot windows + VHM_RAIL = 5, // rail pieces }; void VpSelectTilesWithMethod(int x, int y, int method); // highlighting draw styles enum { - HT_NONE = 0, - HT_RECT = 0x80, - HT_POINT = 0x40, - HT_LINE = 0x20, /* used for autorail highlighting (longer streches) - * (uses lower bits to indicate direction) */ - HT_RAIL = 0x10, /* autorail (one piece) - * (uses lower bits to indicate direction) */ + HT_NONE = 0x00, + HT_RECT = 0x80, + HT_POINT = 0x40, + HT_LINE = 0x20, /* used for autorail highlighting (longer streches) + * (uses lower bits to indicate direction) */ + HT_RAIL = 0x10, /* autorail (one piece) + * (uses lower bits to indicate direction) */ /* lower bits (used with HT_LINE and HT_RAIL): * (see ASCII art in autorail.h for a visual interpretation) */ - HT_DIR_X = 0, // X direction - HT_DIR_Y = 1, // Y direction + HT_DIR_X = 0, // X direction + HT_DIR_Y = 1, // Y direction HT_DIR_HU = 2, // horizontal upper HT_DIR_HL = 3, // horizontal lower HT_DIR_VL = 4, // vertical left diff --git a/water_cmd.c b/water_cmd.c index 834cfd196..5d50f01ac 100644 --- a/water_cmd.c +++ b/water_cmd.c @@ -649,7 +649,7 @@ static void FloodVehicle(Vehicle *v) void TileLoop_Water(TileIndex tile) { static const TileIndexDiffC _tile_loop_offs_array[][5] = { - // tile to mod shore? shore? + // tile to mod shore? shore? {{-1, 0}, {0, 0}, {0, 1}, {-1, 0}, {-1, 1}}, {{ 0, 1}, {0, 1}, {1, 1}, { 0, 2}, { 1, 2}}, {{ 1, 0}, {1, 0}, {1, 1}, { 2, 0}, { 2, 1}}, @@ -745,17 +745,17 @@ static uint32 VehicleEnter_Water(Vehicle *v, TileIndex tile, int x, int y) const TileTypeProcs _tile_type_water_procs = { - DrawTile_Water, /* draw_tile_proc */ - GetSlopeZ_Water, /* get_slope_z_proc */ - ClearTile_Water, /* clear_tile_proc */ - GetAcceptedCargo_Water, /* get_accepted_cargo_proc */ - GetTileDesc_Water, /* get_tile_desc_proc */ - GetTileTrackStatus_Water,/* get_tile_track_status_proc */ - ClickTile_Water, /* click_tile_proc */ - AnimateTile_Water, /* animate_tile_proc */ - TileLoop_Water, /* tile_loop_clear */ - ChangeTileOwner_Water, /* change_tile_owner_clear */ - NULL, /* get_produced_cargo_proc */ - VehicleEnter_Water, /* vehicle_enter_tile_proc */ - GetSlopeTileh_Water, /* get_slope_tileh_proc */ + DrawTile_Water, /* draw_tile_proc */ + GetSlopeZ_Water, /* get_slope_z_proc */ + ClearTile_Water, /* clear_tile_proc */ + GetAcceptedCargo_Water, /* get_accepted_cargo_proc */ + GetTileDesc_Water, /* get_tile_desc_proc */ + GetTileTrackStatus_Water, /* get_tile_track_status_proc */ + ClickTile_Water, /* click_tile_proc */ + AnimateTile_Water, /* animate_tile_proc */ + TileLoop_Water, /* tile_loop_clear */ + ChangeTileOwner_Water, /* change_tile_owner_clear */ + NULL, /* get_produced_cargo_proc */ + VehicleEnter_Water, /* vehicle_enter_tile_proc */ + GetSlopeTileh_Water, /* get_slope_tileh_proc */ }; diff --git a/waypoint.c b/waypoint.c index b946d38c4..eb198da4f 100644 --- a/waypoint.c +++ b/waypoint.c @@ -401,17 +401,17 @@ void InitializeWaypoints(void) } static const SaveLoad _waypoint_desc[] = { - SLE_CONDVAR(Waypoint, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Waypoint, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Waypoint, town_index, SLE_UINT16, 12, SL_MAX_VERSION), - SLE_CONDVAR(Waypoint, town_cn, SLE_UINT8, 12, SL_MAX_VERSION), - SLE_VAR(Waypoint, string, SLE_UINT16), - SLE_VAR(Waypoint, deleted, SLE_UINT8), - - SLE_CONDVAR(Waypoint, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 30), - SLE_CONDVAR(Waypoint, build_date, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Waypoint, localidx, SLE_UINT8, 3, SL_MAX_VERSION), - SLE_CONDVAR(Waypoint, grfid, SLE_UINT32, 17, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Waypoint, xy, SLE_UINT32, 6, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, town_index, SLE_UINT16, 12, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, town_cn, SLE_UINT8, 12, SL_MAX_VERSION), + SLE_VAR(Waypoint, string, SLE_UINT16), + SLE_VAR(Waypoint, deleted, SLE_UINT8), + + SLE_CONDVAR(Waypoint, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 30), + SLE_CONDVAR(Waypoint, build_date, SLE_INT32, 31, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, localidx, SLE_UINT8, 3, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, grfid, SLE_UINT32, 17, SL_MAX_VERSION), SLE_END() }; @@ -155,67 +155,67 @@ enum WindowKeyCodes { WKC_META = 0x1000, // Special ones - WKC_NONE = 0, - WKC_ESC=1, - WKC_BACKSPACE = 2, - WKC_INSERT = 3, - WKC_DELETE = 4, + WKC_NONE = 0, + WKC_ESC = 1, + WKC_BACKSPACE = 2, + WKC_INSERT = 3, + WKC_DELETE = 4, - WKC_PAGEUP = 5, - WKC_PAGEDOWN = 6, - WKC_END = 7, - WKC_HOME = 8, + WKC_PAGEUP = 5, + WKC_PAGEDOWN = 6, + WKC_END = 7, + WKC_HOME = 8, // Arrow keys - WKC_LEFT = 9, - WKC_UP = 10, - WKC_RIGHT = 11, - WKC_DOWN = 12, + WKC_LEFT = 9, + WKC_UP = 10, + WKC_RIGHT = 11, + WKC_DOWN = 12, // Return & tab - WKC_RETURN = 13, - WKC_TAB = 14, + WKC_RETURN = 13, + WKC_TAB = 14, // Numerical keyboard - WKC_NUM_0 = 16, - WKC_NUM_1 = 17, - WKC_NUM_2 = 18, - WKC_NUM_3 = 19, - WKC_NUM_4 = 20, - WKC_NUM_5 = 21, - WKC_NUM_6 = 22, - WKC_NUM_7 = 23, - WKC_NUM_8 = 24, - WKC_NUM_9 = 25, - WKC_NUM_DIV = 26, - WKC_NUM_MUL = 27, - WKC_NUM_MINUS = 28, - WKC_NUM_PLUS = 29, - WKC_NUM_ENTER = 30, + WKC_NUM_0 = 16, + WKC_NUM_1 = 17, + WKC_NUM_2 = 18, + WKC_NUM_3 = 19, + WKC_NUM_4 = 20, + WKC_NUM_5 = 21, + WKC_NUM_6 = 22, + WKC_NUM_7 = 23, + WKC_NUM_8 = 24, + WKC_NUM_9 = 25, + WKC_NUM_DIV = 26, + WKC_NUM_MUL = 27, + WKC_NUM_MINUS = 28, + WKC_NUM_PLUS = 29, + WKC_NUM_ENTER = 30, WKC_NUM_DECIMAL = 31, // Space - WKC_SPACE = 32, + WKC_SPACE = 32, // Function keys - WKC_F1 = 33, - WKC_F2 = 34, - WKC_F3 = 35, - WKC_F4 = 36, - WKC_F5 = 37, - WKC_F6 = 38, - WKC_F7 = 39, - WKC_F8 = 40, - WKC_F9 = 41, - WKC_F10 = 42, - WKC_F11 = 43, - WKC_F12 = 44, + WKC_F1 = 33, + WKC_F2 = 34, + WKC_F3 = 35, + WKC_F4 = 36, + WKC_F5 = 37, + WKC_F6 = 38, + WKC_F7 = 39, + WKC_F8 = 40, + WKC_F9 = 41, + WKC_F10 = 42, + WKC_F11 = 43, + WKC_F12 = 44, // backquote is the key left of "1" // we only store this key here, no matter what character is really mapped to it // on a particular keyboard. (US keyboard: ` and ~ ; German keyboard: ^ and °) - WKC_BACKQUOTE = 45, - WKC_PAUSE = 46, + WKC_BACKQUOTE = 45, + WKC_PAUSE = 46, // 0-9 are mapped to 48-57 // A-Z are mapped to 65-90 @@ -232,18 +232,18 @@ typedef struct WindowDesc { } WindowDesc; enum { - WDF_STD_TOOLTIPS = 1, /* use standard routine when displaying tooltips */ - WDF_DEF_WIDGET = 2, /* default widget control for some widgets in the on click event */ - WDF_STD_BTN = 4, /* default handling for close and drag widgets (widget no 0 and 1) */ + WDF_STD_TOOLTIPS = 1, /* use standard routine when displaying tooltips */ + WDF_DEF_WIDGET = 2, /* default widget control for some widgets in the on click event */ + WDF_STD_BTN = 4, /* default handling for close and drag widgets (widget no 0 and 1) */ - WDF_UNCLICK_BUTTONS=16, /* Unclick buttons when the window event times out */ - WDF_STICKY_BUTTON =32, /* Set window to sticky mode; they are not closed unless closed with 'X' (widget 2) */ - WDF_RESIZABLE =64, /* A window can be resized */ + WDF_UNCLICK_BUTTONS = 16, /* Unclick buttons when the window event times out */ + WDF_STICKY_BUTTON = 32, /* Set window to sticky mode; they are not closed unless closed with 'X' (widget 2) */ + WDF_RESIZABLE = 64, /* A window can be resized */ }; /* can be used as x or y coordinates to cause a specific placement */ enum { - WDP_AUTO = -1, + WDP_AUTO = -1, WDP_CENTER = -2, }; @@ -493,38 +493,38 @@ typedef struct dropdown_d { assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(dropdown_d)); enum WindowEvents { - WE_CLICK = 0, - WE_PAINT = 1, - WE_MOUSELOOP = 2, - WE_TICK = 3, - WE_4 = 4, - WE_TIMEOUT = 5, - WE_PLACE_OBJ = 6, - WE_ABORT_PLACE_OBJ = 7, - WE_DESTROY = 8, - WE_ON_EDIT_TEXT = 9, - WE_POPUPMENU_SELECT = 10, - WE_POPUPMENU_OVER = 11, - WE_DRAGDROP = 12, - WE_PLACE_DRAG = 13, - WE_PLACE_MOUSEUP = 14, - WE_PLACE_PRESIZE = 15, - WE_DROPDOWN_SELECT = 16, - WE_RCLICK = 17, - WE_KEYPRESS = 18, - WE_CREATE = 19, - WE_MOUSEOVER = 20, + WE_CLICK = 0, + WE_PAINT = 1, + WE_MOUSELOOP = 2, + WE_TICK = 3, + WE_4 = 4, + WE_TIMEOUT = 5, + WE_PLACE_OBJ = 6, + WE_ABORT_PLACE_OBJ = 7, + WE_DESTROY = 8, + WE_ON_EDIT_TEXT = 9, + WE_POPUPMENU_SELECT = 10, + WE_POPUPMENU_OVER = 11, + WE_DRAGDROP = 12, + WE_PLACE_DRAG = 13, + WE_PLACE_MOUSEUP = 14, + WE_PLACE_PRESIZE = 15, + WE_DROPDOWN_SELECT = 16, + WE_RCLICK = 17, + WE_KEYPRESS = 18, + WE_CREATE = 19, + WE_MOUSEOVER = 20, WE_ON_EDIT_TEXT_CANCEL = 21, - WE_RESIZE = 22, - WE_MESSAGE = 23, - WE_SCROLL = 24, - WE_MOUSEWHEEL = 25, + WE_RESIZE = 22, + WE_MESSAGE = 23, + WE_SCROLL = 24, + WE_MOUSEWHEEL = 25, }; /****************** THESE ARE NOT WIDGET TYPES!!!!! *******************/ enum WindowWidgetBehaviours { - WWB_PUSHBUTTON = 1 << 5, + WWB_PUSHBUTTON = 1 << 5, WWB_NODISBUTTON = 2 << 5, }; @@ -532,27 +532,27 @@ enum WindowWidgetBehaviours { enum WindowWidgetTypes { WWT_EMPTY = 0, - WWT_IMGBTN = 1, /* button with image */ - WWT_PANEL = WWT_IMGBTN, - WWT_PANEL_2 = 2, /* button with diff image when clicked */ + WWT_IMGBTN = 1, /* button with image */ + WWT_PANEL = WWT_IMGBTN, + WWT_PANEL_2 = 2, /* button with diff image when clicked */ - WWT_TEXTBTN = 3, /* button with text */ - WWT_4 = 4, /* button with diff text when clicked */ - WWT_5 = 5, /* label */ - WWT_6 = 6, /* combo box text area */ - WWT_MATRIX = 7, - WWT_SCROLLBAR = 8, - WWT_FRAME = 9, /* frame */ - WWT_CAPTION = 10, + WWT_TEXTBTN = 3, /* button with text */ + WWT_4 = 4, /* button with diff text when clicked */ + WWT_5 = 5, /* label */ + WWT_6 = 6, /* combo box text area */ + WWT_MATRIX = 7, + WWT_SCROLLBAR = 8, + WWT_FRAME = 9, /* frame */ + WWT_CAPTION = 10, WWT_HSCROLLBAR = 11, - WWT_STICKYBOX = 12, - WWT_SCROLL2BAR = 13, /* 2nd vertical scrollbar*/ - WWT_RESIZEBOX = 14, - WWT_CLOSEBOX = 15, - WWT_LAST = 16, /* Last Item. use WIDGETS_END to fill up padding!! */ + WWT_STICKYBOX = 12, + WWT_SCROLL2BAR = 13, /* 2nd vertical scrollbar*/ + WWT_RESIZEBOX = 14, + WWT_CLOSEBOX = 15, + WWT_LAST = 16, /* Last Item. use WIDGETS_END to fill up padding!! */ - WWT_MASK = 31, + WWT_MASK = 31, WWT_PUSHTXTBTN = WWT_TEXTBTN | WWB_PUSHBUTTON, WWT_PUSHIMGBTN = WWT_IMGBTN | WWB_PUSHBUTTON, @@ -562,21 +562,21 @@ enum WindowWidgetTypes { #define WIDGETS_END WWT_LAST, RESIZE_NONE, 0, 0, 0, 0, 0, 0, STR_NULL enum WindowFlags { - WF_TIMEOUT_SHL = 0, - WF_TIMEOUT_MASK = 7, - WF_DRAGGING = 1 << 3, - WF_SCROLL_UP = 1 << 4, - WF_SCROLL_DOWN = 1 << 5, - WF_SCROLL_MIDDLE = 1 << 6, - WF_HSCROLL = 1 << 7, - WF_SIZING = 1 << 8, - WF_STICKY = 1 << 9, + WF_TIMEOUT_SHL = 0, + WF_TIMEOUT_MASK = 7, + WF_DRAGGING = 1 << 3, + WF_SCROLL_UP = 1 << 4, + WF_SCROLL_DOWN = 1 << 5, + WF_SCROLL_MIDDLE = 1 << 6, + WF_HSCROLL = 1 << 7, + WF_SIZING = 1 << 8, + WF_STICKY = 1 << 9, WF_DISABLE_VP_SCROLL = 1 << 10, - WF_WHITE_BORDER_ONE = 1 << 11, + WF_WHITE_BORDER_ONE = 1 << 11, WF_WHITE_BORDER_MASK = 3 << 11, - WF_SCROLL2 = 1 << 13, + WF_SCROLL2 = 1 << 13, }; /* window.c */ @@ -658,10 +658,10 @@ VARDEF bool _popup_menu_active; VARDEF byte _special_mouse_mode; enum SpecialMouseMode { - WSM_NONE = 0, + WSM_NONE = 0, WSM_DRAGDROP = 1, - WSM_SIZING = 2, - WSM_PRESIZE = 3, + WSM_SIZING = 2, + WSM_PRESIZE = 3, }; void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y); |