mirror of https://github.com/OpenTTD/OpenTTD
Compare commits
6 Commits
cdb653ef30
...
4df06a4f5a
Author | SHA1 | Date |
---|---|---|
|
4df06a4f5a | |
|
f51067f9f5 | |
|
47d8f72205 | |
|
ef4514862b | |
|
621d7cc44d | |
|
ce6bc21641 |
|
@ -493,7 +493,7 @@ public:
|
|||
{
|
||||
switch (widget) {
|
||||
case WID_AP_CLASS_DROPDOWN:
|
||||
ShowDropDownList(this, BuildAirportClassDropDown(), _selected_airport_class, WID_AP_CLASS_DROPDOWN);
|
||||
this->HandleDropdownListButtonClick(BuildAirportClassDropDown(), _selected_airport_class, WID_AP_CLASS_DROPDOWN);
|
||||
break;
|
||||
|
||||
case WID_AP_AIRPORT_LIST: {
|
||||
|
|
|
@ -534,16 +534,16 @@ public:
|
|||
DropDownList list;
|
||||
list.push_back(MakeDropDownListStringItem(STR_REPLACE_ENGINES, 1));
|
||||
list.push_back(MakeDropDownListStringItem(STR_REPLACE_WAGONS, 0));
|
||||
ShowDropDownList(this, std::move(list), this->replace_engines ? 1 : 0, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN);
|
||||
this->HandleDropdownListButtonClick(std::move(list), this->replace_engines ? 1 : 0, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN);
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_RV_RAIL_TYPE_DROPDOWN: // Railtype selection dropdown menu
|
||||
ShowDropDownList(this, GetRailTypeDropDownList(true, true), this->sel_railtype, widget);
|
||||
this->HandleDropdownListButtonClick(GetRailTypeDropDownList(true, true), this->sel_railtype, widget);
|
||||
break;
|
||||
|
||||
case WID_RV_ROAD_TYPE_DROPDOWN: // Roadtype selection dropdown menu
|
||||
ShowDropDownList(this, GetRoadTypeDropDownList(RTTB_ROAD | RTTB_TRAM, true, true), this->sel_roadtype, widget);
|
||||
this->HandleDropdownListButtonClick(GetRoadTypeDropDownList(RTTB_ROAD | RTTB_TRAM, true, true), this->sel_roadtype, widget);
|
||||
break;
|
||||
|
||||
case WID_RV_TRAIN_WAGONREMOVE_TOGGLE: {
|
||||
|
@ -563,7 +563,7 @@ public:
|
|||
ReplaceClick_StartReplace(false);
|
||||
} else {
|
||||
bool replacment_when_old = EngineHasReplacementWhenOldForCompany(Company::Get(_local_company), this->sel_engine[0], this->sel_group);
|
||||
ShowDropDownMenu(this, _start_replace_dropdown, replacment_when_old ? 1 : 0, WID_RV_START_REPLACE, !this->replace_engines ? 1 << 1 : 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(_start_replace_dropdown, replacment_when_old ? 1 : 0, WID_RV_START_REPLACE, !this->replace_engines ? 1 << 1 : 0, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ public:
|
|||
break;
|
||||
|
||||
case WID_BBS_DROPDOWN_CRITERIA:
|
||||
ShowDropDownMenu(this, BuildBridgeWindow::sorter_names, this->bridges.SortType(), WID_BBS_DROPDOWN_CRITERIA, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(BuildBridgeWindow::sorter_names, this->bridges.SortType(), WID_BBS_DROPDOWN_CRITERIA, 0, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1675,12 +1675,12 @@ struct BuildVehicleWindow : Window {
|
|||
break;
|
||||
|
||||
case WID_BV_CARGO_FILTER_DROPDOWN: // Select cargo filtering criteria dropdown menu
|
||||
ShowDropDownList(this, this->BuildCargoDropDownList(), this->cargo_filter_criteria, widget);
|
||||
this->HandleDropdownListButtonClick(this->BuildCargoDropDownList(), this->cargo_filter_criteria, widget);
|
||||
break;
|
||||
|
||||
case WID_BV_CONFIGURE_BADGES:
|
||||
if (this->badge_classes.GetClasses().empty()) break;
|
||||
ShowDropDownList(this, this->BuildBadgeConfigurationList(), -1, widget, 0, false, true);
|
||||
this->HandleDropdownListButtonClick(this->BuildBadgeConfigurationList(), -1, widget, 0, false, true);
|
||||
break;
|
||||
|
||||
case WID_BV_SHOW_HIDE: {
|
||||
|
@ -1706,7 +1706,7 @@ struct BuildVehicleWindow : Window {
|
|||
|
||||
default:
|
||||
if (IsInsideMM(widget, this->badge_filters.first, this->badge_filters.second)) {
|
||||
ShowDropDownList(this, this->GetWidget<NWidgetBadgeFilter>(widget)->GetDropDownList(), -1, widget, 0, false);
|
||||
this->HandleDropdownListButtonClick(this->GetWidget<NWidgetBadgeFilter>(widget)->GetDropDownList(), -1, widget, 0, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -660,7 +660,7 @@ private:
|
|||
} else {
|
||||
sel = default_col;
|
||||
}
|
||||
ShowDropDownList(this, std::move(list), sel, widget);
|
||||
this->HandleDropdownListButtonClick(std::move(list), sel, widget);
|
||||
}
|
||||
|
||||
void BuildGroupList(CompanyID owner)
|
||||
|
|
|
@ -96,7 +96,7 @@ struct SetDateWindow : Window {
|
|||
break;
|
||||
}
|
||||
|
||||
ShowDropDownList(this, std::move(list), selected, widget);
|
||||
this->HandleDropdownListButtonClick(std::move(list), selected, widget);
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "depot_base.h"
|
||||
#include "spritecache.h"
|
||||
#include "strings_func.h"
|
||||
#include "sound_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "company_func.h"
|
||||
#include "tilehighlight_func.h"
|
||||
|
@ -815,6 +816,8 @@ struct DepotWindow : Window {
|
|||
} else {
|
||||
ResetObjectToPlace();
|
||||
}
|
||||
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
break;
|
||||
|
||||
case WID_D_LOCATION:
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "gfx_func.h"
|
||||
#include "gfx_type.h"
|
||||
#include "palette_func.h"
|
||||
#include "window_gui.h"
|
||||
|
||||
/**
|
||||
* Base list item class from which others are derived.
|
||||
|
|
|
@ -654,26 +654,27 @@ struct GenerateLandscapeWindow : public Window {
|
|||
case WID_GL_TROPICAL:
|
||||
case WID_GL_TOYLAND:
|
||||
SetNewLandscapeType(LandscapeType(widget - WID_GL_TEMPERATE));
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
break;
|
||||
|
||||
case WID_GL_MAPSIZE_X_PULLDOWN: // Mapsize X
|
||||
ShowDropDownList(this, BuildMapsizeDropDown(), _settings_newgame.game_creation.map_x, WID_GL_MAPSIZE_X_PULLDOWN);
|
||||
this->HandleDropdownListButtonClick(BuildMapsizeDropDown(), _settings_newgame.game_creation.map_x, WID_GL_MAPSIZE_X_PULLDOWN);
|
||||
break;
|
||||
|
||||
case WID_GL_MAPSIZE_Y_PULLDOWN: // Mapsize Y
|
||||
ShowDropDownList(this, BuildMapsizeDropDown(), _settings_newgame.game_creation.map_y, WID_GL_MAPSIZE_Y_PULLDOWN);
|
||||
this->HandleDropdownListButtonClick(BuildMapsizeDropDown(), _settings_newgame.game_creation.map_y, WID_GL_MAPSIZE_Y_PULLDOWN);
|
||||
break;
|
||||
|
||||
case WID_GL_TOWN_PULLDOWN: // Number of towns
|
||||
ShowDropDownMenu(this, _num_towns, _settings_newgame.difficulty.number_towns, WID_GL_TOWN_PULLDOWN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(_num_towns, _settings_newgame.difficulty.number_towns, WID_GL_TOWN_PULLDOWN, 0, 0);
|
||||
break;
|
||||
|
||||
case WID_GL_TOWNNAME_DROPDOWN: // Townname generator
|
||||
ShowDropDownList(this, BuildTownNameDropDown(), _settings_newgame.game_creation.town_name, WID_GL_TOWNNAME_DROPDOWN);
|
||||
this->HandleDropdownListButtonClick(BuildTownNameDropDown(), _settings_newgame.game_creation.town_name, WID_GL_TOWNNAME_DROPDOWN);
|
||||
break;
|
||||
|
||||
case WID_GL_INDUSTRY_PULLDOWN: // Number of industries
|
||||
ShowDropDownMenu(this, _num_inds, _settings_newgame.difficulty.industry_density, WID_GL_INDUSTRY_PULLDOWN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(_num_inds, _settings_newgame.difficulty.industry_density, WID_GL_INDUSTRY_PULLDOWN, 0, 0);
|
||||
break;
|
||||
|
||||
case WID_GL_GENERATE_BUTTON: { // Generate
|
||||
|
@ -718,6 +719,7 @@ struct GenerateLandscapeWindow : public Window {
|
|||
case WID_GL_HEIGHTMAP_HEIGHT_TEXT: // Height level text
|
||||
this->widget_id = WID_GL_HEIGHTMAP_HEIGHT_TEXT;
|
||||
ShowQueryString(GetString(STR_JUST_INT, _settings_newgame.game_creation.heightmap_height), STR_MAPGEN_HEIGHTMAP_HEIGHT_QUERY_CAPT, 4, this, CS_NUMERAL, QueryStringFlag::EnableDefault);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
break;
|
||||
|
||||
|
||||
|
@ -753,6 +755,7 @@ struct GenerateLandscapeWindow : public Window {
|
|||
case WID_GL_SNOW_COVERAGE_TEXT: // Snow coverage text
|
||||
this->widget_id = WID_GL_SNOW_COVERAGE_TEXT;
|
||||
ShowQueryString(GetString(STR_JUST_INT, _settings_newgame.game_creation.snow_coverage), STR_MAPGEN_SNOW_COVERAGE_QUERY_CAPT, 4, this, CS_NUMERAL, QueryStringFlag::EnableDefault);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
break;
|
||||
|
||||
case WID_GL_DESERT_COVERAGE_DOWN:
|
||||
|
@ -770,15 +773,16 @@ struct GenerateLandscapeWindow : public Window {
|
|||
case WID_GL_DESERT_COVERAGE_TEXT: // Desert line text
|
||||
this->widget_id = WID_GL_DESERT_COVERAGE_TEXT;
|
||||
ShowQueryString(GetString(STR_JUST_INT, _settings_newgame.game_creation.desert_coverage), STR_MAPGEN_DESERT_COVERAGE_QUERY_CAPT, 4, this, CS_NUMERAL, QueryStringFlag::EnableDefault);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
break;
|
||||
|
||||
case WID_GL_HEIGHTMAP_ROTATION_PULLDOWN: // Heightmap rotation
|
||||
ShowDropDownMenu(this, _rotation, _settings_newgame.game_creation.heightmap_rotation, WID_GL_HEIGHTMAP_ROTATION_PULLDOWN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(_rotation, _settings_newgame.game_creation.heightmap_rotation, WID_GL_HEIGHTMAP_ROTATION_PULLDOWN, 0, 0);
|
||||
break;
|
||||
|
||||
case WID_GL_TERRAIN_PULLDOWN: // Terrain type
|
||||
/* For the original map generation only the first four are valid. */
|
||||
ShowDropDownMenu(this, _elevations, _settings_newgame.difficulty.terrain_type, WID_GL_TERRAIN_PULLDOWN, 0, _settings_newgame.game_creation.land_generator == LG_ORIGINAL ? ~0xF : 0);
|
||||
this->HandleDropdownMenuButtonClick(_elevations, _settings_newgame.difficulty.terrain_type, WID_GL_TERRAIN_PULLDOWN, 0, _settings_newgame.game_creation.land_generator == LG_ORIGINAL ? ~0xF : 0);
|
||||
break;
|
||||
|
||||
case WID_GL_WATER_PULLDOWN: { // Water quantity
|
||||
|
@ -787,45 +791,50 @@ struct GenerateLandscapeWindow : public Window {
|
|||
if (_settings_newgame.game_creation.land_generator == LG_ORIGINAL) {
|
||||
SetBit(hidden_mask, CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY);
|
||||
}
|
||||
ShowDropDownMenu(this, _sea_lakes, _settings_newgame.difficulty.quantity_sea_lakes, WID_GL_WATER_PULLDOWN, 0, hidden_mask);
|
||||
this->HandleDropdownMenuButtonClick(_sea_lakes, _settings_newgame.difficulty.quantity_sea_lakes, WID_GL_WATER_PULLDOWN, 0, hidden_mask);
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_GL_RIVER_PULLDOWN: // Amount of rivers
|
||||
ShowDropDownMenu(this, _rivers, _settings_newgame.game_creation.amount_of_rivers, WID_GL_RIVER_PULLDOWN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(_rivers, _settings_newgame.game_creation.amount_of_rivers, WID_GL_RIVER_PULLDOWN, 0, 0);
|
||||
break;
|
||||
|
||||
case WID_GL_SMOOTHNESS_PULLDOWN: // Map smoothness
|
||||
ShowDropDownMenu(this, _smoothness, _settings_newgame.game_creation.tgen_smoothness, WID_GL_SMOOTHNESS_PULLDOWN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(_smoothness, _settings_newgame.game_creation.tgen_smoothness, WID_GL_SMOOTHNESS_PULLDOWN, 0, 0);
|
||||
break;
|
||||
|
||||
case WID_GL_VARIETY_PULLDOWN: // Map variety
|
||||
ShowDropDownMenu(this, _variety, _settings_newgame.game_creation.variety, WID_GL_VARIETY_PULLDOWN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(_variety, _settings_newgame.game_creation.variety, WID_GL_VARIETY_PULLDOWN, 0, 0);
|
||||
break;
|
||||
|
||||
/* Freetype map borders */
|
||||
case WID_GL_WATER_NW:
|
||||
_settings_newgame.game_creation.water_borders.Flip(BorderFlag::NorthWest);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
this->InvalidateData();
|
||||
break;
|
||||
|
||||
case WID_GL_WATER_NE:
|
||||
_settings_newgame.game_creation.water_borders.Flip(BorderFlag::NorthEast);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
this->InvalidateData();
|
||||
break;
|
||||
|
||||
case WID_GL_WATER_SE:
|
||||
_settings_newgame.game_creation.water_borders.Flip(BorderFlag::SouthEast);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
this->InvalidateData();
|
||||
break;
|
||||
|
||||
case WID_GL_WATER_SW:
|
||||
_settings_newgame.game_creation.water_borders.Flip(BorderFlag::SouthWest);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
this->InvalidateData();
|
||||
break;
|
||||
|
||||
case WID_GL_BORDERS_RANDOM:
|
||||
_settings_newgame.game_creation.water_borders = (_settings_newgame.game_creation.water_borders == BorderFlag::Random) ? BorderFlag{} : BorderFlag::Random;
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
this->InvalidateData();
|
||||
break;
|
||||
|
||||
|
@ -1134,11 +1143,11 @@ struct CreateScenarioWindow : public Window
|
|||
break;
|
||||
|
||||
case WID_CS_MAPSIZE_X_PULLDOWN: // Mapsize X
|
||||
ShowDropDownList(this, BuildMapsizeDropDown(), _settings_newgame.game_creation.map_x, WID_CS_MAPSIZE_X_PULLDOWN);
|
||||
this->HandleDropdownListButtonClick(BuildMapsizeDropDown(), _settings_newgame.game_creation.map_x, WID_CS_MAPSIZE_X_PULLDOWN);
|
||||
break;
|
||||
|
||||
case WID_CS_MAPSIZE_Y_PULLDOWN: // Mapsize Y
|
||||
ShowDropDownList(this, BuildMapsizeDropDown(), _settings_newgame.game_creation.map_y, WID_CS_MAPSIZE_Y_PULLDOWN);
|
||||
this->HandleDropdownListButtonClick(BuildMapsizeDropDown(), _settings_newgame.game_creation.map_y, WID_CS_MAPSIZE_Y_PULLDOWN);
|
||||
break;
|
||||
|
||||
case WID_CS_EMPTY_WORLD: // Empty world / flat world
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "cargotype.h"
|
||||
#include "strings_func.h"
|
||||
#include "window_func.h"
|
||||
#include "sound_func.h"
|
||||
#include "gfx_func.h"
|
||||
#include "core/geometry_func.hpp"
|
||||
#include "currency.h"
|
||||
|
@ -90,6 +91,8 @@ struct GraphLegendWindow : Window {
|
|||
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
|
||||
InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0);
|
||||
InvalidateWindowData(WC_COMPANY_VALUE, 0);
|
||||
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -716,6 +719,8 @@ public:
|
|||
case WID_GRAPH_RANGE_MATRIX: {
|
||||
int row = GetRowFromWidget(pt.y, widget, 0, GetCharacterHeight(FS_SMALL) + WidgetDimensions::scaled.framerect.Vertical());
|
||||
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
|
||||
if (HasBit(this->masked_range, row)) break;
|
||||
ToggleBit(this->excluded_range, row);
|
||||
this->SetDirty();
|
||||
|
@ -1255,6 +1260,8 @@ struct BaseCargoGraphWindow : BaseGraphWindow {
|
|||
int row = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GRAPH_MATRIX);
|
||||
if (row >= this->vscroll->GetCount()) return;
|
||||
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
|
||||
for (const CargoSpec *cs : _sorted_cargo_specs) {
|
||||
if (!HasBit(this->cargo_types, cs->Index())) continue;
|
||||
if (row-- > 0) continue;
|
||||
|
|
|
@ -700,15 +700,15 @@ public:
|
|||
break;
|
||||
|
||||
case WID_GL_GROUP_BY_DROPDOWN: // Select grouping option dropdown menu
|
||||
ShowDropDownMenu(this, this->vehicle_group_by_names, this->grouping, WID_GL_GROUP_BY_DROPDOWN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(this->vehicle_group_by_names, this->grouping, WID_GL_GROUP_BY_DROPDOWN, 0, 0);
|
||||
return;
|
||||
|
||||
case WID_GL_SORT_BY_DROPDOWN: // Select sorting criteria dropdown menu
|
||||
ShowDropDownMenu(this, this->GetVehicleSorterNames(), this->vehgroups.SortType(), WID_GL_SORT_BY_DROPDOWN, 0, (this->vli.vtype == VEH_TRAIN || this->vli.vtype == VEH_ROAD) ? 0 : (1 << 10));
|
||||
this->HandleDropdownMenuButtonClick(this->GetVehicleSorterNames(), this->vehgroups.SortType(), WID_GL_SORT_BY_DROPDOWN, 0, (this->vli.vtype == VEH_TRAIN || this->vli.vtype == VEH_ROAD) ? 0 : (1 << 10));
|
||||
return;
|
||||
|
||||
case WID_GL_FILTER_BY_CARGO: // Select filtering criteria dropdown menu
|
||||
ShowDropDownList(this, this->BuildCargoDropDownList(false), this->cargo_filter_criteria, widget);
|
||||
this->HandleDropdownListButtonClick(this->BuildCargoDropDownList(false), this->cargo_filter_criteria, widget);
|
||||
break;
|
||||
|
||||
case WID_GL_ALL_VEHICLES: // All vehicles button
|
||||
|
@ -849,7 +849,7 @@ public:
|
|||
break;
|
||||
|
||||
case WID_GL_MANAGE_VEHICLES_DROPDOWN: {
|
||||
ShowDropDownList(this, this->BuildActionDropdownList(true, Group::IsValidID(this->vli.ToGroupID()), IsDefaultGroupID(this->vli.ToGroupID())), -1, WID_GL_MANAGE_VEHICLES_DROPDOWN);
|
||||
this->HandleDropdownListButtonClick(this->BuildActionDropdownList(true, Group::IsValidID(this->vli.ToGroupID()), IsDefaultGroupID(this->vli.ToGroupID())), -1, WID_GL_MANAGE_VEHICLES_DROPDOWN);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1798,15 +1798,15 @@ public:
|
|||
break;
|
||||
|
||||
case WID_ID_DROPDOWN_CRITERIA:
|
||||
ShowDropDownMenu(this, IndustryDirectoryWindow::sorter_names, this->industries.SortType(), WID_ID_DROPDOWN_CRITERIA, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(IndustryDirectoryWindow::sorter_names, this->industries.SortType(), WID_ID_DROPDOWN_CRITERIA, 0, 0);
|
||||
break;
|
||||
|
||||
case WID_ID_FILTER_BY_ACC_CARGO: // Cargo filter dropdown
|
||||
ShowDropDownList(this, this->BuildCargoDropDownList(), this->accepted_cargo_filter_criteria, widget);
|
||||
this->HandleDropdownListButtonClick(this->BuildCargoDropDownList(), this->accepted_cargo_filter_criteria, widget);
|
||||
break;
|
||||
|
||||
case WID_ID_FILTER_BY_PROD_CARGO: // Cargo filter dropdown
|
||||
ShowDropDownList(this, this->BuildCargoDropDownList(), this->produced_cargo_filter_criteria, widget);
|
||||
this->HandleDropdownListButtonClick(this->BuildCargoDropDownList(), this->produced_cargo_filter_criteria, widget);
|
||||
break;
|
||||
|
||||
case WID_ID_INDUSTRY_LIST: {
|
||||
|
@ -3092,7 +3092,7 @@ struct IndustryCargoesWindow : public Window {
|
|||
}
|
||||
if (!lst.empty()) {
|
||||
int selected = (this->ind_cargo >= NUM_INDUSTRYTYPES) ? (int)(this->ind_cargo - NUM_INDUSTRYTYPES) : -1;
|
||||
ShowDropDownList(this, std::move(lst), selected, WID_IC_CARGO_DROPDOWN);
|
||||
this->HandleDropdownListButtonClick(std::move(lst), selected, WID_IC_CARGO_DROPDOWN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -3106,7 +3106,7 @@ struct IndustryCargoesWindow : public Window {
|
|||
}
|
||||
if (!lst.empty()) {
|
||||
int selected = (this->ind_cargo < NUM_INDUSTRYTYPES) ? (int)this->ind_cargo : -1;
|
||||
ShowDropDownList(this, std::move(lst), selected, WID_IC_IND_DROPDOWN);
|
||||
this->HandleDropdownListButtonClick(std::move(lst), selected, WID_IC_IND_DROPDOWN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -595,7 +595,7 @@ struct MusicTrackSelectionWindow : public Window {
|
|||
|
||||
case WID_MTS_MUSICSET: {
|
||||
int selected = 0;
|
||||
ShowDropDownList(this, BuildSetDropDownList<BaseMusic>(&selected), selected, widget);
|
||||
this->HandleDropdownListButtonClick(BuildSetDropDownList<BaseMusic>(&selected), selected, widget);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1019,7 +1019,7 @@ struct NetworkStartServerWindow : public Window {
|
|||
break;
|
||||
|
||||
case WID_NSS_CONNTYPE_BTN: // Connection type
|
||||
ShowDropDownList(this, BuildVisibilityDropDownList(), _settings_client.network.server_game_type, WID_NSS_CONNTYPE_BTN);
|
||||
this->HandleDropdownListButtonClick(BuildVisibilityDropDownList(), _settings_client.network.server_game_type, WID_NSS_CONNTYPE_BTN);
|
||||
break;
|
||||
|
||||
case WID_NSS_CLIENTS_BTND: case WID_NSS_CLIENTS_BTNU: // Click on up/down button for number of clients
|
||||
|
@ -1714,7 +1714,7 @@ public:
|
|||
case WID_CL_SERVER_VISIBILITY:
|
||||
if (!_network_server) break;
|
||||
|
||||
ShowDropDownList(this, BuildVisibilityDropDownList(), _settings_client.network.server_game_type, WID_CL_SERVER_VISIBILITY);
|
||||
this->HandleDropdownListButtonClick(BuildVisibilityDropDownList(), _settings_client.network.server_game_type, WID_CL_SERVER_VISIBILITY);
|
||||
break;
|
||||
|
||||
case WID_CL_MATRIX: {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "newgrf_badge.h"
|
||||
#include "newgrf_badge_type.h"
|
||||
#include "timer/timer_game_calendar.h"
|
||||
#include "widget_type.h"
|
||||
|
||||
class GUIBadgeClasses : public UsedBadgeClasses {
|
||||
public:
|
||||
|
|
|
@ -941,7 +941,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
|
|||
}
|
||||
|
||||
this->CloseChildWindows(WC_QUERY_STRING); // Remove the parameter query window
|
||||
ShowDropDownList(this, std::move(list), this->preset, WID_NS_PRESET_LIST);
|
||||
this->HandleDropdownListButtonClick(std::move(list), this->preset, WID_NS_PRESET_LIST);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1254,7 +1254,7 @@ public:
|
|||
} else {
|
||||
const Order *o = this->vehicle->GetOrder(this->OrderGetSel());
|
||||
assert(o != nullptr);
|
||||
ShowDropDownMenu(this, _order_non_stop_drowdown, o->GetNonStopType(), WID_O_NON_STOP, 0,
|
||||
this->HandleDropdownMenuButtonClick(_order_non_stop_drowdown, o->GetNonStopType(), WID_O_NON_STOP, 0,
|
||||
o->IsType(OT_GOTO_STATION) ? 0 : (o->IsType(OT_GOTO_WAYPOINT) ? 3 : 12));
|
||||
}
|
||||
break;
|
||||
|
@ -1275,7 +1275,7 @@ public:
|
|||
case OPOS_SHARE: sel = 3; break;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
ShowDropDownMenu(this, this->vehicle->type == VEH_AIRCRAFT ? _order_goto_dropdown_aircraft : _order_goto_dropdown, sel, WID_O_GOTO, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(this->vehicle->type == VEH_AIRCRAFT ? _order_goto_dropdown_aircraft : _order_goto_dropdown, sel, WID_O_GOTO, 0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1283,7 +1283,7 @@ public:
|
|||
if (this->GetWidget<NWidgetLeaf>(widget)->ButtonHit(pt)) {
|
||||
this->OrderClick_FullLoad(OLF_FULL_LOAD_ANY, true);
|
||||
} else {
|
||||
ShowDropDownMenu(this, _order_full_load_drowdown, this->vehicle->GetOrder(this->OrderGetSel())->GetLoadType(), WID_O_FULL_LOAD, 0, 2);
|
||||
this->HandleDropdownMenuButtonClick(_order_full_load_drowdown, this->vehicle->GetOrder(this->OrderGetSel())->GetLoadType(), WID_O_FULL_LOAD, 0, 2);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1291,7 +1291,7 @@ public:
|
|||
if (this->GetWidget<NWidgetLeaf>(widget)->ButtonHit(pt)) {
|
||||
this->OrderClick_Unload(OUFB_UNLOAD, true);
|
||||
} else {
|
||||
ShowDropDownMenu(this, _order_unload_drowdown, this->vehicle->GetOrder(this->OrderGetSel())->GetUnloadType(), WID_O_UNLOAD, 0, 8);
|
||||
this->HandleDropdownMenuButtonClick(_order_unload_drowdown, this->vehicle->GetOrder(this->OrderGetSel())->GetUnloadType(), WID_O_UNLOAD, 0, 8);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1300,14 +1300,14 @@ public:
|
|||
break;
|
||||
|
||||
case WID_O_DEPOT_ACTION:
|
||||
ShowDropDownMenu(this, _order_depot_action_dropdown, DepotActionStringIndex(this->vehicle->GetOrder(this->OrderGetSel())), WID_O_DEPOT_ACTION, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(_order_depot_action_dropdown, DepotActionStringIndex(this->vehicle->GetOrder(this->OrderGetSel())), WID_O_DEPOT_ACTION, 0, 0);
|
||||
break;
|
||||
|
||||
case WID_O_REFIT_DROPDOWN:
|
||||
if (this->GetWidget<NWidgetLeaf>(widget)->ButtonHit(pt)) {
|
||||
this->OrderClick_Refit(0, true);
|
||||
} else {
|
||||
ShowDropDownMenu(this, _order_refit_action_dropdown, 0, WID_O_REFIT_DROPDOWN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(_order_refit_action_dropdown, 0, WID_O_REFIT_DROPDOWN, 0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1320,14 +1320,14 @@ public:
|
|||
for (const auto &ocv : _order_conditional_variable) {
|
||||
list.push_back(MakeDropDownListStringItem(STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + ocv, ocv));
|
||||
}
|
||||
ShowDropDownList(this, std::move(list), this->vehicle->GetOrder(this->OrderGetSel())->GetConditionVariable(), WID_O_COND_VARIABLE);
|
||||
this->HandleDropdownListButtonClick(std::move(list), this->vehicle->GetOrder(this->OrderGetSel())->GetConditionVariable(), WID_O_COND_VARIABLE);
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_O_COND_COMPARATOR: {
|
||||
const Order *o = this->vehicle->GetOrder(this->OrderGetSel());
|
||||
assert(o != nullptr);
|
||||
ShowDropDownMenu(this, _order_conditional_condition, o->GetConditionComparator(), WID_O_COND_COMPARATOR, 0, (o->GetConditionVariable() == OCV_REQUIRES_SERVICE) ? 0x3F : 0xC0);
|
||||
this->HandleDropdownMenuButtonClick(_order_conditional_condition, o->GetConditionComparator(), WID_O_COND_COMPARATOR, 0, (o->GetConditionVariable() == OCV_REQUIRES_SERVICE) ? 0x3F : 0xC0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -398,6 +398,8 @@ void PickerWindow::OnClick(Point pt, WidgetID widget, int)
|
|||
SetBit(this->callbacks.mode, PFM_ALL);
|
||||
}
|
||||
this->InvalidateData({PickerInvalidation::Class, PickerInvalidation::Type, PickerInvalidation::Position});
|
||||
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
break;
|
||||
|
||||
case WID_PW_SHRINK:
|
||||
|
@ -441,12 +443,12 @@ void PickerWindow::OnClick(Point pt, WidgetID widget, int)
|
|||
|
||||
case WID_PW_CONFIGURE_BADGES:
|
||||
if (this->badge_classes.GetClasses().empty()) break;
|
||||
ShowDropDownList(this, BuildBadgeClassConfigurationList(this->badge_classes, 1, {}), -1, widget, 0, false, true);
|
||||
this->HandleDropdownListButtonClick(BuildBadgeClassConfigurationList(this->badge_classes, 1, {}), -1, widget, 0, false, true);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (IsInsideMM(widget, this->badge_filters.first, this->badge_filters.second)) {
|
||||
ShowDropDownList(this, this->GetWidget<NWidgetBadgeFilter>(widget)->GetDropDownList(), -1, widget, 0, false);
|
||||
this->HandleDropdownListButtonClick(this->GetWidget<NWidgetBadgeFilter>(widget)->GetDropDownList(), -1, widget, 0, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1580,10 +1580,13 @@ public:
|
|||
if (w != nullptr) ToggleRailButton_Remove(w);
|
||||
}
|
||||
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
|
||||
break;
|
||||
|
||||
case WID_BS_CONVERT:
|
||||
_convert_signal_button = !_convert_signal_button;
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
break;
|
||||
|
||||
case WID_BS_DRAG_SIGNALS_DENSITY_DECREASE:
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "table/strings.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
#include "window_gui.h"
|
||||
|
||||
|
||||
/* == BaseSettingEntry methods == */
|
||||
|
|
|
@ -1148,7 +1148,7 @@ struct GameOptionsWindow : Window {
|
|||
int selected;
|
||||
DropDownList list = this->BuildDropDownList(widget, &selected);
|
||||
if (!list.empty()) {
|
||||
ShowDropDownList(this, std::move(list), selected, widget);
|
||||
this->HandleDropdownListButtonClick(std::move(list), selected, widget);
|
||||
} else {
|
||||
if (widget == WID_GO_RESOLUTION_DROPDOWN) ShowErrorMessage(GetEncodedString(STR_ERROR_RESOLUTION_LIST_FAILED), {}, WL_ERROR);
|
||||
}
|
||||
|
@ -1180,7 +1180,7 @@ struct GameOptionsWindow : Window {
|
|||
int selected;
|
||||
DropDownList list = this->BuildDropDownList(widget, &selected);
|
||||
if (!list.empty()) {
|
||||
ShowDropDownList(this, std::move(list), this->filter.mode, widget);
|
||||
this->HandleDropdownListButtonClick(std::move(list), this->filter.mode, widget);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1189,7 +1189,7 @@ struct GameOptionsWindow : Window {
|
|||
int selected;
|
||||
DropDownList list = this->BuildDropDownList(widget, &selected);
|
||||
if (!list.empty()) {
|
||||
ShowDropDownList(this, std::move(list), this->filter.type, widget);
|
||||
this->HandleDropdownListButtonClick(std::move(list), this->filter.type, widget);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1735,7 +1735,6 @@ public:
|
|||
case WID_SM_CENTERMAP: // Center the smallmap again
|
||||
this->SmallMapCenterOnCurrentPos();
|
||||
this->HandleButtonClick(WID_SM_CENTERMAP);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
break;
|
||||
|
||||
case WID_SM_TOGGLETOWNNAME: // Toggle town names
|
||||
|
|
|
@ -658,12 +658,12 @@ public:
|
|||
break;
|
||||
|
||||
case WID_STL_SORTDROPBTN: // select sorting criteria dropdown menu
|
||||
ShowDropDownMenu(this, CompanyStationsWindow::sorter_names, this->stations.SortType(), WID_STL_SORTDROPBTN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(CompanyStationsWindow::sorter_names, this->stations.SortType(), WID_STL_SORTDROPBTN, 0, 0);
|
||||
break;
|
||||
|
||||
case WID_STL_CARGODROPDOWN:
|
||||
this->filter_expanded = false;
|
||||
ShowDropDownList(this, this->BuildCargoDropDownList(this->filter_expanded), -1, widget, 0, false, true);
|
||||
this->HandleDropdownListButtonClick(this->BuildCargoDropDownList(this->filter_expanded), -1, widget, 0, false, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2005,14 +2005,14 @@ struct StationViewWindow : public Window {
|
|||
* sorting criteria for columns 1, 2, and 3. Column 0 is always
|
||||
* sorted by cargo type. The others can theoretically be sorted
|
||||
* by different things but there is no UI for that. */
|
||||
ShowDropDownMenu(this, StationViewWindow::sort_names,
|
||||
this->HandleDropdownMenuButtonClick(StationViewWindow::sort_names,
|
||||
this->current_mode * 2 + (this->sortings[1] == CargoSortType::Count ? 1 : 0),
|
||||
WID_SV_SORT_BY, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_SV_GROUP_BY: {
|
||||
ShowDropDownMenu(this, StationViewWindow::group_names, this->grouping_index, WID_SV_GROUP_BY, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(StationViewWindow::group_names, this->grouping_index, WID_SV_GROUP_BY, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -805,7 +805,7 @@ public:
|
|||
selected++;
|
||||
}
|
||||
|
||||
ShowDropDownList(this, std::move(list), selected, widget);
|
||||
this->HandleDropdownListButtonClick(std::move(list), selected, widget);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ static const PalSpriteID _aqueduct_sprite_table_heads[] = {
|
|||
{SPR_AQUEDUCT_RAMP_SW, PAL_NONE}, {SPR_AQUEDUCT_RAMP_SE, PAL_NONE}, {SPR_AQUEDUCT_RAMP_NE, PAL_NONE}, {SPR_AQUEDUCT_RAMP_NW, PAL_NONE},
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_4_0[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_oxide_north[] = {
|
||||
{ 0x9A9, PAL_NONE }, { 0x99F, PAL_NONE }, { 0x9B1, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9A5, PAL_NONE }, { 0x997, PAL_NONE }, { 0x9AD, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x99D, PAL_NONE }, { 0x99F, PAL_NONE }, { 0x9B1, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -58,7 +58,7 @@ static const PalSpriteID _bridge_sprite_table_4_0[] = {
|
|||
{ 0x1116, PAL_NONE }, { 0x997, PAL_NONE }, { 0x9AD, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_4_1[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_oxide_south[] = {
|
||||
{ 0x9AA, PAL_NONE }, { 0x9A0, PAL_NONE }, { 0x9B2, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9A6, PAL_NONE }, { 0x998, PAL_NONE }, { 0x9AE, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x99E, PAL_NONE }, { 0x9A0, PAL_NONE }, { 0x9B2, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -69,7 +69,7 @@ static const PalSpriteID _bridge_sprite_table_4_1[] = {
|
|||
{ 0x1117, PAL_NONE }, { 0x998, PAL_NONE }, { 0x9AE, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_4_2[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_oxide_inner_north[] = {
|
||||
{ 0x9AC, PAL_NONE }, { 0x9A4, PAL_NONE }, { 0x9B4, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9A8, PAL_NONE }, { 0x99C, PAL_NONE }, { 0x9B0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9A2, PAL_NONE }, { 0x9A4, PAL_NONE }, { 0x9B4, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -80,7 +80,7 @@ static const PalSpriteID _bridge_sprite_table_4_2[] = {
|
|||
{ 0x1119, PAL_NONE }, { 0x99C, PAL_NONE }, { 0x9B0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_4_3[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_oxide_inner_south[] = {
|
||||
{ 0x9AB, PAL_NONE }, { 0x9A3, PAL_NONE }, { 0x9B3, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9A7, PAL_NONE }, { 0x99B, PAL_NONE }, { 0x9AF, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9A1, PAL_NONE }, { 0x9A3, PAL_NONE }, { 0x9B3, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -91,7 +91,7 @@ static const PalSpriteID _bridge_sprite_table_4_3[] = {
|
|||
{ 0x1118, PAL_NONE }, { 0x99B, PAL_NONE }, { 0x9AF, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_4_4[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_oxide_middle_odd[] = {
|
||||
{ 0x9B6, PAL_NONE }, { 0x9BA, PAL_NONE }, { 0x9BC, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9B5, PAL_NONE }, { 0x9B9, PAL_NONE }, { 0x9BB, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9B8, PAL_NONE }, { 0x9BA, PAL_NONE }, { 0x9BC, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -102,7 +102,7 @@ static const PalSpriteID _bridge_sprite_table_4_4[] = {
|
|||
{ 0x111E, PAL_NONE }, { 0x9B9, PAL_NONE }, { 0x9BB, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_4_5[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_middle_even[] = {
|
||||
{ 0x9BD, PAL_NONE }, { 0x9C1, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9BE, PAL_NONE }, { 0x9C2, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9BF, PAL_NONE }, { 0x9C1, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -113,7 +113,7 @@ static const PalSpriteID _bridge_sprite_table_4_5[] = {
|
|||
{ 0x1121, PAL_NONE }, { 0x9C2, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_4_6[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_generic_oxide_heads[] = {
|
||||
{ 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
|
||||
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, PAL_NONE },
|
||||
{ 0x98E, PAL_NONE }, { 0x990, PAL_NONE }, { 0x98D, PAL_NONE }, { 0x98F, PAL_NONE },
|
||||
|
@ -124,7 +124,7 @@ static const PalSpriteID _bridge_sprite_table_4_6[] = {
|
|||
{ 0x1113, PAL_NONE }, { 0x1115, PAL_NONE }, { 0x1112, PAL_NONE }, { 0x1114, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_5_0[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_yellow_north[] = {
|
||||
{ 0x9A9, PALETTE_TO_STRUCT_YELLOW }, { 0x99F, PALETTE_TO_STRUCT_YELLOW }, { 0x9B1, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x9A5, PALETTE_TO_STRUCT_YELLOW }, { 0x997, PALETTE_TO_STRUCT_YELLOW }, { 0x9AD, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x99D, PALETTE_TO_STRUCT_YELLOW }, { 0x99F, PALETTE_TO_STRUCT_YELLOW }, { 0x9B1, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
|
@ -135,7 +135,7 @@ static const PalSpriteID _bridge_sprite_table_5_0[] = {
|
|||
{ 0x1116, PALETTE_TO_STRUCT_YELLOW }, { 0x997, PALETTE_TO_STRUCT_YELLOW }, { 0x9AD, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_5_1[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_yellow_south[] = {
|
||||
{ 0x9AA, PALETTE_TO_STRUCT_YELLOW }, { 0x9A0, PALETTE_TO_STRUCT_YELLOW }, { 0x9B2, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x9A6, PALETTE_TO_STRUCT_YELLOW }, { 0x998, PALETTE_TO_STRUCT_YELLOW }, { 0x9AE, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x99E, PALETTE_TO_STRUCT_YELLOW }, { 0x9A0, PALETTE_TO_STRUCT_YELLOW }, { 0x9B2, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
|
@ -146,7 +146,7 @@ static const PalSpriteID _bridge_sprite_table_5_1[] = {
|
|||
{ 0x1117, PALETTE_TO_STRUCT_YELLOW }, { 0x998, PALETTE_TO_STRUCT_YELLOW }, { 0x9AE, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_5_2[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_yellow_inner_north[] = {
|
||||
{ 0x9AC, PALETTE_TO_STRUCT_YELLOW }, { 0x9A4, PALETTE_TO_STRUCT_YELLOW }, { 0x9B4, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x9A8, PALETTE_TO_STRUCT_YELLOW }, { 0x99C, PALETTE_TO_STRUCT_YELLOW }, { 0x9B0, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x9A2, PALETTE_TO_STRUCT_YELLOW }, { 0x9A4, PALETTE_TO_STRUCT_YELLOW }, { 0x9B4, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
|
@ -157,7 +157,7 @@ static const PalSpriteID _bridge_sprite_table_5_2[] = {
|
|||
{ 0x1119, PALETTE_TO_STRUCT_YELLOW }, { 0x99C, PALETTE_TO_STRUCT_YELLOW }, { 0x9B0, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_5_3[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_yellow_inner_south[] = {
|
||||
{ 0x9AB, PALETTE_TO_STRUCT_YELLOW }, { 0x9A3, PALETTE_TO_STRUCT_YELLOW }, { 0x9B3, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x9A7, PALETTE_TO_STRUCT_YELLOW }, { 0x99B, PALETTE_TO_STRUCT_YELLOW }, { 0x9AF, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x9A1, PALETTE_TO_STRUCT_YELLOW }, { 0x9A3, PALETTE_TO_STRUCT_YELLOW }, { 0x9B3, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
|
@ -168,7 +168,7 @@ static const PalSpriteID _bridge_sprite_table_5_3[] = {
|
|||
{ 0x1118, PALETTE_TO_STRUCT_YELLOW }, { 0x99B, PALETTE_TO_STRUCT_YELLOW }, { 0x9AF, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_5_4[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_yellow_middle_odd[] = {
|
||||
{ 0x9B6, PALETTE_TO_STRUCT_YELLOW }, { 0x9BA, PALETTE_TO_STRUCT_YELLOW }, { 0x9BC, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x9B5, PALETTE_TO_STRUCT_YELLOW }, { 0x9B9, PALETTE_TO_STRUCT_YELLOW }, { 0x9BB, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0x9B8, PALETTE_TO_STRUCT_YELLOW }, { 0x9BA, PALETTE_TO_STRUCT_YELLOW }, { 0x9BC, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
|
@ -179,7 +179,7 @@ static const PalSpriteID _bridge_sprite_table_5_4[] = {
|
|||
{ 0x111E, PALETTE_TO_STRUCT_YELLOW }, { 0x9B9, PALETTE_TO_STRUCT_YELLOW }, { 0x9BB, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_5_5[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_yellow_middle_even[] = {
|
||||
{ 0x9BD, PALETTE_TO_STRUCT_YELLOW }, { 0x9C1, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9BE, PALETTE_TO_STRUCT_YELLOW }, { 0x9C2, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9BF, PALETTE_TO_STRUCT_YELLOW }, { 0x9C1, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -190,7 +190,7 @@ static const PalSpriteID _bridge_sprite_table_5_5[] = {
|
|||
{ 0x1121, PALETTE_TO_STRUCT_YELLOW }, { 0x9C2, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_5_6[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_generic_yellow_heads[] = {
|
||||
{ 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
|
||||
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, PAL_NONE },
|
||||
{ 0x98E, PALETTE_TO_STRUCT_YELLOW }, { 0x990, PALETTE_TO_STRUCT_YELLOW }, { 0x98D, PALETTE_TO_STRUCT_YELLOW }, { 0x98F, PALETTE_TO_STRUCT_YELLOW },
|
||||
|
@ -201,7 +201,7 @@ static const PalSpriteID _bridge_sprite_table_5_6[] = {
|
|||
{ 0x1113, PALETTE_TO_STRUCT_YELLOW }, { 0x1115, PALETTE_TO_STRUCT_YELLOW }, { 0x1112, PALETTE_TO_STRUCT_YELLOW }, { 0x1114, PALETTE_TO_STRUCT_YELLOW },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_6_0[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_oxide_north[] = {
|
||||
{ 0x9CD, PAL_NONE }, { 0x9D9, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9CE, PAL_NONE }, { 0x9DA, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9D3, PAL_NONE }, { 0x9D9, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -212,7 +212,7 @@ static const PalSpriteID _bridge_sprite_table_6_0[] = {
|
|||
{ 0x1125, PAL_NONE }, { 0x9DA, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_6_1[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_oxide_south[] = {
|
||||
{ 0x9CB, PAL_NONE }, { 0x9D7, PAL_NONE }, { 0x9DD, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9D0, PAL_NONE }, { 0x9DC, PAL_NONE }, { 0x9E0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9D1, PAL_NONE }, { 0x9D7, PAL_NONE }, { 0x9DD, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -223,7 +223,7 @@ static const PalSpriteID _bridge_sprite_table_6_1[] = {
|
|||
{ 0x1127, PAL_NONE }, { 0x9DC, PAL_NONE }, { 0x9E0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_6_2[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_oxide_middle[] = {
|
||||
{ 0x9CC, PAL_NONE }, { 0x9D8, PAL_NONE }, { 0x9DE, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9CF, PAL_NONE }, { 0x9DB, PAL_NONE }, { 0x9DF, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9D2, PAL_NONE }, { 0x9D8, PAL_NONE }, { 0x9DE, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -234,7 +234,7 @@ static const PalSpriteID _bridge_sprite_table_6_2[] = {
|
|||
{ 0x1126, PAL_NONE }, { 0x9DB, PAL_NONE }, { 0x9DF, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_6_3[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_oxide_heads[] = {
|
||||
{ 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
|
||||
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, PAL_NONE },
|
||||
{ 0x98E, PAL_NONE }, { 0x990, PAL_NONE }, { 0x98D, PAL_NONE }, { 0x98F, PAL_NONE },
|
||||
|
@ -245,7 +245,7 @@ static const PalSpriteID _bridge_sprite_table_6_3[] = {
|
|||
{ 0x1113, PAL_NONE }, { 0x1115, PAL_NONE }, { 0x1112, PAL_NONE }, { 0x1114, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_7_0[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_brown_north[] = {
|
||||
{ 0x9CD, PALETTE_TO_STRUCT_BROWN }, { 0x9D9, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9CE, PALETTE_TO_STRUCT_BROWN }, { 0x9DA, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9D3, PALETTE_TO_STRUCT_BROWN }, { 0x9D9, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -256,7 +256,7 @@ static const PalSpriteID _bridge_sprite_table_7_0[] = {
|
|||
{ 0x1125, PALETTE_TO_STRUCT_BROWN }, { 0x9DA, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_7_1[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_brown_south[] = {
|
||||
{ 0x9CB, PALETTE_TO_STRUCT_BROWN }, { 0x9D7, PALETTE_TO_STRUCT_BROWN }, { 0x9DD, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE },
|
||||
{ 0x9D0, PALETTE_TO_STRUCT_BROWN }, { 0x9DC, PALETTE_TO_STRUCT_BROWN }, { 0x9E0, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE },
|
||||
{ 0x9D1, PALETTE_TO_STRUCT_BROWN }, { 0x9D7, PALETTE_TO_STRUCT_BROWN }, { 0x9DD, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE },
|
||||
|
@ -267,7 +267,7 @@ static const PalSpriteID _bridge_sprite_table_7_1[] = {
|
|||
{ 0x1127, PALETTE_TO_STRUCT_BROWN }, { 0x9DC, PALETTE_TO_STRUCT_BROWN }, { 0x9E0, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_7_2[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_brown_middle[] = {
|
||||
{ 0x9CC, PALETTE_TO_STRUCT_BROWN }, { 0x9D8, PALETTE_TO_STRUCT_BROWN }, { 0x9DE, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE },
|
||||
{ 0x9CF, PALETTE_TO_STRUCT_BROWN }, { 0x9DB, PALETTE_TO_STRUCT_BROWN }, { 0x9DF, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE },
|
||||
{ 0x9D2, PALETTE_TO_STRUCT_BROWN }, { 0x9D8, PALETTE_TO_STRUCT_BROWN }, { 0x9DE, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE },
|
||||
|
@ -278,7 +278,7 @@ static const PalSpriteID _bridge_sprite_table_7_2[] = {
|
|||
{ 0x1126, PALETTE_TO_STRUCT_BROWN }, { 0x9DB, PALETTE_TO_STRUCT_BROWN }, { 0x9DF, PALETTE_TO_STRUCT_BROWN }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_7_3[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_brown_heads[] = {
|
||||
{ 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
|
||||
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, PAL_NONE },
|
||||
{ 0x98E, PALETTE_TO_STRUCT_BROWN }, { 0x990, PALETTE_TO_STRUCT_BROWN }, { 0x98D, PALETTE_TO_STRUCT_BROWN }, { 0x98F, PALETTE_TO_STRUCT_BROWN },
|
||||
|
@ -289,7 +289,7 @@ static const PalSpriteID _bridge_sprite_table_7_3[] = {
|
|||
{ 0x1113, PALETTE_TO_STRUCT_BROWN }, { 0x1115, PALETTE_TO_STRUCT_BROWN }, { 0x1112, PALETTE_TO_STRUCT_BROWN }, { 0x1114, PALETTE_TO_STRUCT_BROWN },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_8_0[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_red_north[] = {
|
||||
{ 0x9CD, PALETTE_TO_STRUCT_RED }, { 0x9D9, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9CE, PALETTE_TO_STRUCT_RED }, { 0x9DA, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9D3, PALETTE_TO_STRUCT_RED }, { 0x9D9, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -300,7 +300,7 @@ static const PalSpriteID _bridge_sprite_table_8_0[] = {
|
|||
{ 0x1125, PALETTE_TO_STRUCT_RED }, { 0x9DA, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_8_1[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_red_south[] = {
|
||||
{ 0x9CB, PALETTE_TO_STRUCT_RED }, { 0x9D7, PALETTE_TO_STRUCT_RED }, { 0x9DD, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE },
|
||||
{ 0x9D0, PALETTE_TO_STRUCT_RED }, { 0x9DC, PALETTE_TO_STRUCT_RED }, { 0x9E0, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE },
|
||||
{ 0x9D1, PALETTE_TO_STRUCT_RED }, { 0x9D7, PALETTE_TO_STRUCT_RED }, { 0x9DD, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE },
|
||||
|
@ -311,7 +311,7 @@ static const PalSpriteID _bridge_sprite_table_8_1[] = {
|
|||
{ 0x1127, PALETTE_TO_STRUCT_RED }, { 0x9DC, PALETTE_TO_STRUCT_RED }, { 0x9E0, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_8_2[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_red_middle[] = {
|
||||
{ 0x9CC, PALETTE_TO_STRUCT_RED }, { 0x9D8, PALETTE_TO_STRUCT_RED }, { 0x9DE, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE },
|
||||
{ 0x9CF, PALETTE_TO_STRUCT_RED }, { 0x9DB, PALETTE_TO_STRUCT_RED }, { 0x9DF, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE },
|
||||
{ 0x9D2, PALETTE_TO_STRUCT_RED }, { 0x9D8, PALETTE_TO_STRUCT_RED }, { 0x9DE, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE },
|
||||
|
@ -322,7 +322,7 @@ static const PalSpriteID _bridge_sprite_table_8_2[] = {
|
|||
{ 0x1126, PALETTE_TO_STRUCT_RED }, { 0x9DB, PALETTE_TO_STRUCT_RED }, { 0x9DF, PALETTE_TO_STRUCT_RED }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_8_3[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_cantilever_red_heads[] = {
|
||||
{ 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
|
||||
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, PAL_NONE },
|
||||
{ 0x98E, PALETTE_TO_STRUCT_RED }, { 0x990, PALETTE_TO_STRUCT_RED }, { 0x98D, PALETTE_TO_STRUCT_RED }, { 0x98F, PALETTE_TO_STRUCT_RED },
|
||||
|
@ -399,7 +399,7 @@ static const PalSpriteID _bridge_sprite_table_archgirder_heads[] = {
|
|||
MW( SPR_BTGEN_MGLV_RAMP_X_DOWN ), MW( SPR_BTGEN_MGLV_RAMP_Y_DOWN ), MW( SPR_BTGEN_MGLV_RAMP_X_UP ), MW( SPR_BTGEN_MGLV_RAMP_Y_UP ),
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_concrete_suspended_A[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_concrete_north[] = {
|
||||
MC( SPR_BTSUS_RAIL_X_REAR_TILE_A ), MC( SPR_BTSUS_X_FRONT_TILE_A ), MC( SPR_BTSUS_X_PILLAR_TILE_A ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_RAIL_Y_REAR_TILE_A ), MC( SPR_BTSUS_Y_FRONT_TILE_A ), MC( SPR_BTSUS_Y_PILLAR_TILE_A ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_ROAD_X_REAR_TILE_A ), MC( SPR_BTSUS_X_FRONT_TILE_A ), MC( SPR_BTSUS_X_PILLAR_TILE_A ), MN( 0x0 ),
|
||||
|
@ -410,7 +410,7 @@ static const PalSpriteID _bridge_sprite_table_concrete_suspended_A[] = {
|
|||
MC( SPR_BTSUS_MGLV_Y_REAR_TILE_A ), MC( SPR_BTSUS_Y_FRONT_TILE_A ), MC( SPR_BTSUS_Y_PILLAR_TILE_A ), MN( 0x0 ),
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_concrete_suspended_B[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_concrete_south[] = {
|
||||
MC( SPR_BTSUS_RAIL_X_REAR_TILE_B ), MC( SPR_BTSUS_X_FRONT_TILE_B ), MC( SPR_BTSUS_X_PILLAR_TILE_B ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_RAIL_Y_REAR_TILE_B ), MC( SPR_BTSUS_Y_FRONT_TILE_B ), MC( SPR_BTSUS_Y_PILLAR_TILE_B ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_ROAD_X_REAR_TILE_B ), MC( SPR_BTSUS_X_FRONT_TILE_B ), MC( SPR_BTSUS_X_PILLAR_TILE_B ), MN( 0x0 ),
|
||||
|
@ -421,7 +421,7 @@ static const PalSpriteID _bridge_sprite_table_concrete_suspended_B[] = {
|
|||
MC( SPR_BTSUS_MGLV_Y_REAR_TILE_B ), MC( SPR_BTSUS_Y_FRONT_TILE_B ), MC( SPR_BTSUS_Y_PILLAR_TILE_B ), MN( 0x0 ),
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_concrete_suspended_C[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_concrete_inner_north[] = {
|
||||
MC( SPR_BTSUS_RAIL_X_REAR_TILE_C ), MC( SPR_BTSUS_X_FRONT_TILE_C ), MC( SPR_BTSUS_X_PILLAR_TILE_C ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_RAIL_Y_REAR_TILE_C ), MC( SPR_BTSUS_Y_FRONT_TILE_C ), MC( SPR_BTSUS_Y_PILLAR_TILE_C ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_ROAD_X_REAR_TILE_C ), MC( SPR_BTSUS_X_FRONT_TILE_C ), MC( SPR_BTSUS_X_PILLAR_TILE_C ), MN( 0x0 ),
|
||||
|
@ -432,7 +432,7 @@ static const PalSpriteID _bridge_sprite_table_concrete_suspended_C[] = {
|
|||
MC( SPR_BTSUS_MGLV_Y_REAR_TILE_C ), MC( SPR_BTSUS_Y_FRONT_TILE_C ), MC( SPR_BTSUS_Y_PILLAR_TILE_C ), MN( 0x0 ),
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_concrete_suspended_D[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_concrete_inner_south[] = {
|
||||
MC( SPR_BTSUS_RAIL_X_REAR_TILE_D ), MC( SPR_BTSUS_X_FRONT_TILE_D ), MC( SPR_BTSUS_X_PILLAR_TILE_D ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_RAIL_Y_REAR_TILE_D ), MC( SPR_BTSUS_Y_FRONT_TILE_D ), MC( SPR_BTSUS_Y_PILLAR_TILE_D ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_ROAD_X_REAR_TILE_D ), MC( SPR_BTSUS_X_FRONT_TILE_D ), MC( SPR_BTSUS_X_PILLAR_TILE_D ), MN( 0x0 ),
|
||||
|
@ -443,7 +443,7 @@ static const PalSpriteID _bridge_sprite_table_concrete_suspended_D[] = {
|
|||
MC( SPR_BTSUS_MGLV_Y_REAR_TILE_D ), MC( SPR_BTSUS_Y_FRONT_TILE_D ), MC( SPR_BTSUS_Y_PILLAR_TILE_D ), MN( 0x0 ),
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_concrete_suspended_E[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_concrete_middle_odd[] = {
|
||||
MC( SPR_BTSUS_RAIL_X_REAR_TILE_E ), MC( SPR_BTSUS_X_FRONT_TILE_E ), MC( SPR_BTSUS_X_PILLAR_TILE_E ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_RAIL_Y_REAR_TILE_E ), MC( SPR_BTSUS_Y_FRONT_TILE_E ), MC( SPR_BTSUS_Y_PILLAR_TILE_E ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_ROAD_X_REAR_TILE_E ), MC( SPR_BTSUS_X_FRONT_TILE_E ), MC( SPR_BTSUS_X_PILLAR_TILE_E ), MN( 0x0 ),
|
||||
|
@ -454,7 +454,7 @@ static const PalSpriteID _bridge_sprite_table_concrete_suspended_E[] = {
|
|||
MC( SPR_BTSUS_MGLV_Y_REAR_TILE_E ), MC( SPR_BTSUS_Y_FRONT_TILE_E ), MC( SPR_BTSUS_Y_PILLAR_TILE_E ), MN( 0x0 ),
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_concrete_suspended_F[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_suspension_concrete_middle_even[] = {
|
||||
MC( SPR_BTSUS_RAIL_X_REAR_TILE_F ), MC( SPR_BTSUS_X_FRONT ), MN( 0x0 ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_RAIL_Y_REAR_TILE_F ), MC( SPR_BTSUS_Y_FRONT ), MN( 0x0 ), MN( 0x0 ),
|
||||
MC( SPR_BTSUS_ROAD_X_REAR_TILE_F ), MC( SPR_BTSUS_X_FRONT ), MN( 0x0 ), MN( 0x0 ),
|
||||
|
@ -465,7 +465,7 @@ static const PalSpriteID _bridge_sprite_table_concrete_suspended_F[] = {
|
|||
MC( SPR_BTSUS_MGLV_Y_REAR_TILE_F ), MC( SPR_BTSUS_Y_FRONT ), MN( 0x0 ), MN( 0x0 ),
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_concrete_suspended_heads[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_generic_concrete_heads[] = {
|
||||
MN( SPR_BTGEN_RAIL_X_SLOPE_UP ), MN( SPR_BTGEN_RAIL_Y_SLOPE_UP ), MN( SPR_BTGEN_RAIL_X_SLOPE_DOWN ), MN( SPR_BTGEN_RAIL_Y_SLOPE_DOWN ),
|
||||
MN( SPR_BTGEN_RAIL_RAMP_X_DOWN ), MN( SPR_BTGEN_RAIL_RAMP_Y_DOWN ), MN( SPR_BTGEN_RAIL_RAMP_X_UP ), MN( SPR_BTGEN_RAIL_RAMP_Y_UP ),
|
||||
MC( SPR_BTGEN_ROAD_X_SLOPE_UP ), MC( SPR_BTGEN_ROAD_Y_SLOPE_UP ), MC( SPR_BTGEN_ROAD_X_SLOPE_DOWN ), MC( SPR_BTGEN_ROAD_Y_SLOPE_DOWN ),
|
||||
|
@ -476,7 +476,7 @@ static const PalSpriteID _bridge_sprite_table_concrete_suspended_heads[] = {
|
|||
MC( SPR_BTGEN_MGLV_RAMP_X_DOWN ), MC( SPR_BTGEN_MGLV_RAMP_Y_DOWN ), MC( SPR_BTGEN_MGLV_RAMP_X_UP ), MC( SPR_BTGEN_MGLV_RAMP_Y_UP ),
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_9_0[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_girder_middle[] = {
|
||||
{ 0x9F9, PAL_NONE }, { 0x9FD, PAL_NONE }, { 0x9C9, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9FA, PAL_NONE }, { 0x9FE, PAL_NONE }, { 0x9CA, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0x9FB, PAL_NONE }, { 0x9FD, PAL_NONE }, { 0x9C9, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -487,7 +487,7 @@ static const PalSpriteID _bridge_sprite_table_9_0[] = {
|
|||
{ 0x1133, PAL_NONE }, { 0x9FE, PAL_NONE }, { 0x9CA, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_10_0[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_tubular_oxide_north[] = {
|
||||
{ 0xA0B, PAL_NONE }, { 0xA01, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA0C, PAL_NONE }, { 0xA02, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA11, PAL_NONE }, { 0xA01, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -498,7 +498,7 @@ static const PalSpriteID _bridge_sprite_table_10_0[] = {
|
|||
{ 0xA1E, PAL_NONE }, { 0xA02, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_10_1[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_tubular_oxide_south[] = {
|
||||
{ 0xA09, PAL_NONE }, { 0x9FF, PAL_NONE }, { 0xA05, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA0E, PAL_NONE }, { 0xA04, PAL_NONE }, { 0xA08, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA0F, PAL_NONE }, { 0x9FF, PAL_NONE }, { 0xA05, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -509,7 +509,7 @@ static const PalSpriteID _bridge_sprite_table_10_1[] = {
|
|||
{ 0xA20, PAL_NONE }, { 0xA04, PAL_NONE }, { 0xA08, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_10_2[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_tubular_oxide_middle[] = {
|
||||
{ 0xA0A, PAL_NONE }, { 0xA00, PAL_NONE }, { 0xA06, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA0D, PAL_NONE }, { 0xA03, PAL_NONE }, { 0xA07, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA10, PAL_NONE }, { 0xA00, PAL_NONE }, { 0xA06, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -520,7 +520,7 @@ static const PalSpriteID _bridge_sprite_table_10_2[] = {
|
|||
{ 0xA1F, PAL_NONE }, { 0xA03, PAL_NONE }, { 0xA07, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_11_0[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_tubular_yellow_north[] = {
|
||||
{ 0xA0B, PALETTE_TO_STRUCT_YELLOW }, { 0xA01, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA0C, PALETTE_TO_STRUCT_YELLOW }, { 0xA02, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA11, PALETTE_TO_STRUCT_YELLOW }, { 0xA01, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -531,7 +531,7 @@ static const PalSpriteID _bridge_sprite_table_11_0[] = {
|
|||
{ 0xA1E, PALETTE_TO_STRUCT_YELLOW }, { 0xA02, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_11_1[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_tubular_yellow_south[] = {
|
||||
{ 0xA09, PALETTE_TO_STRUCT_YELLOW }, { 0x9FF, PALETTE_TO_STRUCT_YELLOW }, { 0xA05, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0xA0E, PALETTE_TO_STRUCT_YELLOW }, { 0xA04, PALETTE_TO_STRUCT_YELLOW }, { 0xA08, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0xA0F, PALETTE_TO_STRUCT_YELLOW }, { 0x9FF, PALETTE_TO_STRUCT_YELLOW }, { 0xA05, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
|
@ -542,7 +542,7 @@ static const PalSpriteID _bridge_sprite_table_11_1[] = {
|
|||
{ 0xA20, PALETTE_TO_STRUCT_YELLOW }, { 0xA04, PALETTE_TO_STRUCT_YELLOW }, { 0xA08, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_11_2[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_tubular_yellow_middle[] = {
|
||||
{ 0xA0A, PALETTE_TO_STRUCT_YELLOW }, { 0xA00, PALETTE_TO_STRUCT_YELLOW }, { 0xA06, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0xA0D, PALETTE_TO_STRUCT_YELLOW }, { 0xA03, PALETTE_TO_STRUCT_YELLOW }, { 0xA07, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
{ 0xA10, PALETTE_TO_STRUCT_YELLOW }, { 0xA00, PALETTE_TO_STRUCT_YELLOW }, { 0xA06, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
|
@ -553,7 +553,7 @@ static const PalSpriteID _bridge_sprite_table_11_2[] = {
|
|||
{ 0xA1F, PALETTE_TO_STRUCT_YELLOW }, { 0xA03, PALETTE_TO_STRUCT_YELLOW }, { 0xA07, PALETTE_TO_STRUCT_YELLOW }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_12_0[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_tubular_silicon_north[] = {
|
||||
{ 0xA0B, PALETTE_TO_STRUCT_CONCRETE }, { 0xA01, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA0C, PALETTE_TO_STRUCT_CONCRETE }, { 0xA02, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
{ 0xA11, PALETTE_TO_STRUCT_CONCRETE }, { 0xA01, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
|
@ -564,7 +564,7 @@ static const PalSpriteID _bridge_sprite_table_12_0[] = {
|
|||
{ 0xA1E, PALETTE_TO_STRUCT_CONCRETE }, { 0xA02, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_12_1[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_tubular_silicon_south[] = {
|
||||
{ 0xA09, PALETTE_TO_STRUCT_CONCRETE }, { 0x9FF, PALETTE_TO_STRUCT_CONCRETE }, { 0xA05, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE },
|
||||
{ 0xA0E, PALETTE_TO_STRUCT_CONCRETE }, { 0xA04, PALETTE_TO_STRUCT_CONCRETE }, { 0xA08, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE },
|
||||
{ 0xA0F, PALETTE_TO_STRUCT_CONCRETE }, { 0x9FF, PALETTE_TO_STRUCT_CONCRETE }, { 0xA05, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE },
|
||||
|
@ -575,7 +575,7 @@ static const PalSpriteID _bridge_sprite_table_12_1[] = {
|
|||
{ 0xA20, PALETTE_TO_STRUCT_CONCRETE }, { 0xA04, PALETTE_TO_STRUCT_CONCRETE }, { 0xA08, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE },
|
||||
};
|
||||
|
||||
static const PalSpriteID _bridge_sprite_table_12_2[] = {
|
||||
static const PalSpriteID _bridge_sprite_table_tubular_silicon_middle[] = {
|
||||
{ 0xA0A, PALETTE_TO_STRUCT_CONCRETE }, { 0xA00, PALETTE_TO_STRUCT_CONCRETE }, { 0xA06, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE },
|
||||
{ 0xA0D, PALETTE_TO_STRUCT_CONCRETE }, { 0xA03, PALETTE_TO_STRUCT_CONCRETE }, { 0xA07, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE },
|
||||
{ 0xA10, PALETTE_TO_STRUCT_CONCRETE }, { 0xA00, PALETTE_TO_STRUCT_CONCRETE }, { 0xA06, PALETTE_TO_STRUCT_CONCRETE }, { 0x0, PAL_NONE },
|
||||
|
@ -596,64 +596,64 @@ static const std::span<const PalSpriteID> _bridge_sprite_table_archgirder[] = {
|
|||
_bridge_sprite_table_archgirder_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_4[] = {
|
||||
_bridge_sprite_table_4_0,
|
||||
_bridge_sprite_table_4_1,
|
||||
_bridge_sprite_table_4_2,
|
||||
_bridge_sprite_table_4_3,
|
||||
_bridge_sprite_table_4_4,
|
||||
_bridge_sprite_table_4_5,
|
||||
_bridge_sprite_table_4_6,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_suspension_oxide[] = {
|
||||
_bridge_sprite_table_suspension_oxide_north,
|
||||
_bridge_sprite_table_suspension_oxide_south,
|
||||
_bridge_sprite_table_suspension_oxide_inner_north,
|
||||
_bridge_sprite_table_suspension_oxide_inner_south,
|
||||
_bridge_sprite_table_suspension_oxide_middle_odd,
|
||||
_bridge_sprite_table_suspension_middle_even,
|
||||
_bridge_sprite_table_generic_oxide_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_5[] = {
|
||||
_bridge_sprite_table_5_0,
|
||||
_bridge_sprite_table_5_1,
|
||||
_bridge_sprite_table_5_2,
|
||||
_bridge_sprite_table_5_3,
|
||||
_bridge_sprite_table_5_4,
|
||||
_bridge_sprite_table_5_5,
|
||||
_bridge_sprite_table_5_6,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_suspension_yellow[] = {
|
||||
_bridge_sprite_table_suspension_yellow_north,
|
||||
_bridge_sprite_table_suspension_yellow_south,
|
||||
_bridge_sprite_table_suspension_yellow_inner_north,
|
||||
_bridge_sprite_table_suspension_yellow_inner_south,
|
||||
_bridge_sprite_table_suspension_yellow_middle_odd,
|
||||
_bridge_sprite_table_suspension_yellow_middle_even,
|
||||
_bridge_sprite_table_generic_yellow_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_concrete_suspended[] = {
|
||||
_bridge_sprite_table_concrete_suspended_A,
|
||||
_bridge_sprite_table_concrete_suspended_B,
|
||||
_bridge_sprite_table_concrete_suspended_C,
|
||||
_bridge_sprite_table_concrete_suspended_D,
|
||||
_bridge_sprite_table_concrete_suspended_E,
|
||||
_bridge_sprite_table_concrete_suspended_F,
|
||||
_bridge_sprite_table_concrete_suspended_heads,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_suspension_concrete[] = {
|
||||
_bridge_sprite_table_suspension_concrete_north,
|
||||
_bridge_sprite_table_suspension_concrete_south,
|
||||
_bridge_sprite_table_suspension_concrete_inner_north,
|
||||
_bridge_sprite_table_suspension_concrete_inner_south,
|
||||
_bridge_sprite_table_suspension_concrete_middle_odd,
|
||||
_bridge_sprite_table_suspension_concrete_middle_even,
|
||||
_bridge_sprite_table_generic_concrete_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_6[] = {
|
||||
_bridge_sprite_table_6_0,
|
||||
_bridge_sprite_table_6_1,
|
||||
_bridge_sprite_table_6_2,
|
||||
_bridge_sprite_table_6_2,
|
||||
_bridge_sprite_table_6_2,
|
||||
_bridge_sprite_table_6_2,
|
||||
_bridge_sprite_table_6_3,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_cantilever_oxide[] = {
|
||||
_bridge_sprite_table_cantilever_oxide_north,
|
||||
_bridge_sprite_table_cantilever_oxide_south,
|
||||
_bridge_sprite_table_cantilever_oxide_middle,
|
||||
_bridge_sprite_table_cantilever_oxide_middle,
|
||||
_bridge_sprite_table_cantilever_oxide_middle,
|
||||
_bridge_sprite_table_cantilever_oxide_middle,
|
||||
_bridge_sprite_table_cantilever_oxide_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_7[] = {
|
||||
_bridge_sprite_table_7_0,
|
||||
_bridge_sprite_table_7_1,
|
||||
_bridge_sprite_table_7_2,
|
||||
_bridge_sprite_table_7_2,
|
||||
_bridge_sprite_table_7_2,
|
||||
_bridge_sprite_table_7_2,
|
||||
_bridge_sprite_table_7_3,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_cantilever_brown[] = {
|
||||
_bridge_sprite_table_cantilever_brown_north,
|
||||
_bridge_sprite_table_cantilever_brown_south,
|
||||
_bridge_sprite_table_cantilever_brown_middle,
|
||||
_bridge_sprite_table_cantilever_brown_middle,
|
||||
_bridge_sprite_table_cantilever_brown_middle,
|
||||
_bridge_sprite_table_cantilever_brown_middle,
|
||||
_bridge_sprite_table_cantilever_brown_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_8[] = {
|
||||
_bridge_sprite_table_8_0,
|
||||
_bridge_sprite_table_8_1,
|
||||
_bridge_sprite_table_8_2,
|
||||
_bridge_sprite_table_8_2,
|
||||
_bridge_sprite_table_8_2,
|
||||
_bridge_sprite_table_8_2,
|
||||
_bridge_sprite_table_8_3,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_cantilever_red[] = {
|
||||
_bridge_sprite_table_cantilever_red_north,
|
||||
_bridge_sprite_table_cantilever_red_south,
|
||||
_bridge_sprite_table_cantilever_red_middle,
|
||||
_bridge_sprite_table_cantilever_red_middle,
|
||||
_bridge_sprite_table_cantilever_red_middle,
|
||||
_bridge_sprite_table_cantilever_red_middle,
|
||||
_bridge_sprite_table_cantilever_red_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_wood[] = {
|
||||
|
@ -676,60 +676,60 @@ static const std::span<const PalSpriteID> _bridge_sprite_table_concrete[] = {
|
|||
_bridge_sprite_table_concrete_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_9[] = {
|
||||
_bridge_sprite_table_9_0,
|
||||
_bridge_sprite_table_9_0,
|
||||
_bridge_sprite_table_9_0,
|
||||
_bridge_sprite_table_9_0,
|
||||
_bridge_sprite_table_9_0,
|
||||
_bridge_sprite_table_9_0,
|
||||
_bridge_sprite_table_4_6,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_girder[] = {
|
||||
_bridge_sprite_table_girder_middle,
|
||||
_bridge_sprite_table_girder_middle,
|
||||
_bridge_sprite_table_girder_middle,
|
||||
_bridge_sprite_table_girder_middle,
|
||||
_bridge_sprite_table_girder_middle,
|
||||
_bridge_sprite_table_girder_middle,
|
||||
_bridge_sprite_table_generic_oxide_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_10[] = {
|
||||
_bridge_sprite_table_10_0,
|
||||
_bridge_sprite_table_10_1,
|
||||
_bridge_sprite_table_10_2,
|
||||
_bridge_sprite_table_10_2,
|
||||
_bridge_sprite_table_10_2,
|
||||
_bridge_sprite_table_10_2,
|
||||
_bridge_sprite_table_4_6,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_tubular_oxide[] = {
|
||||
_bridge_sprite_table_tubular_oxide_north,
|
||||
_bridge_sprite_table_tubular_oxide_south,
|
||||
_bridge_sprite_table_tubular_oxide_middle,
|
||||
_bridge_sprite_table_tubular_oxide_middle,
|
||||
_bridge_sprite_table_tubular_oxide_middle,
|
||||
_bridge_sprite_table_tubular_oxide_middle,
|
||||
_bridge_sprite_table_generic_oxide_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_11[] = {
|
||||
_bridge_sprite_table_11_0,
|
||||
_bridge_sprite_table_11_1,
|
||||
_bridge_sprite_table_11_2,
|
||||
_bridge_sprite_table_11_2,
|
||||
_bridge_sprite_table_11_2,
|
||||
_bridge_sprite_table_11_2,
|
||||
_bridge_sprite_table_5_6,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_tubular_yellow[] = {
|
||||
_bridge_sprite_table_tubular_yellow_north,
|
||||
_bridge_sprite_table_tubular_yellow_south,
|
||||
_bridge_sprite_table_tubular_yellow_middle,
|
||||
_bridge_sprite_table_tubular_yellow_middle,
|
||||
_bridge_sprite_table_tubular_yellow_middle,
|
||||
_bridge_sprite_table_tubular_yellow_middle,
|
||||
_bridge_sprite_table_generic_yellow_heads,
|
||||
};
|
||||
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_12[] = {
|
||||
_bridge_sprite_table_12_0,
|
||||
_bridge_sprite_table_12_1,
|
||||
_bridge_sprite_table_12_2,
|
||||
_bridge_sprite_table_12_2,
|
||||
_bridge_sprite_table_12_2,
|
||||
_bridge_sprite_table_12_2,
|
||||
_bridge_sprite_table_concrete_suspended_heads,
|
||||
static const std::span<const PalSpriteID> _bridge_sprite_table_tubular_silicon[] = {
|
||||
_bridge_sprite_table_tubular_silicon_north,
|
||||
_bridge_sprite_table_tubular_silicon_south,
|
||||
_bridge_sprite_table_tubular_silicon_middle,
|
||||
_bridge_sprite_table_tubular_silicon_middle,
|
||||
_bridge_sprite_table_tubular_silicon_middle,
|
||||
_bridge_sprite_table_tubular_silicon_middle,
|
||||
_bridge_sprite_table_generic_concrete_heads,
|
||||
};
|
||||
|
||||
static const std::span<const std::span<const PalSpriteID>> _bridge_sprite_table[MAX_BRIDGES] = {
|
||||
_bridge_sprite_table_wood,
|
||||
_bridge_sprite_table_concrete,
|
||||
_bridge_sprite_table_archgirder,
|
||||
_bridge_sprite_table_concrete_suspended,
|
||||
_bridge_sprite_table_4,
|
||||
_bridge_sprite_table_5,
|
||||
_bridge_sprite_table_6,
|
||||
_bridge_sprite_table_7,
|
||||
_bridge_sprite_table_8,
|
||||
_bridge_sprite_table_9,
|
||||
_bridge_sprite_table_10,
|
||||
_bridge_sprite_table_11,
|
||||
_bridge_sprite_table_12
|
||||
_bridge_sprite_table_suspension_concrete,
|
||||
_bridge_sprite_table_suspension_oxide,
|
||||
_bridge_sprite_table_suspension_yellow,
|
||||
_bridge_sprite_table_cantilever_oxide,
|
||||
_bridge_sprite_table_cantilever_brown,
|
||||
_bridge_sprite_table_cantilever_red,
|
||||
_bridge_sprite_table_girder,
|
||||
_bridge_sprite_table_tubular_oxide,
|
||||
_bridge_sprite_table_tubular_yellow,
|
||||
_bridge_sprite_table_tubular_silicon,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -621,7 +621,6 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
|
|||
if (!IsInsideMM(size, 1, 8 + 1)) return;
|
||||
_terraform_size = size;
|
||||
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
this->SetDirty();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -514,7 +514,7 @@ void TextfileWindow::AfterLoadMarkdown()
|
|||
for (size_t line : this->jumplist) {
|
||||
list.push_back(MakeDropDownListStringItem(GetString(STR_TEXTFILE_JUMPLIST_ITEM, this->lines[line].text), (int)line));
|
||||
}
|
||||
ShowDropDownList(this, std::move(list), -1, widget);
|
||||
this->HandleDropdownListButtonClick(std::move(list), -1, widget);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -857,7 +857,6 @@ static CallBackFunction ToolbarZoomInClick(Window *w)
|
|||
{
|
||||
if (DoZoomInOutWindow(ZOOM_IN, GetMainWindow())) {
|
||||
w->HandleButtonClick((_game_mode == GM_EDITOR) ? (WidgetID)WID_TE_ZOOM_IN : (WidgetID)WID_TN_ZOOM_IN);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
}
|
||||
return CBF_NONE;
|
||||
}
|
||||
|
@ -868,7 +867,6 @@ static CallBackFunction ToolbarZoomOutClick(Window *w)
|
|||
{
|
||||
if (DoZoomInOutWindow(ZOOM_OUT, GetMainWindow())) {
|
||||
w->HandleButtonClick((_game_mode == GM_EDITOR) ? (WidgetID)WID_TE_ZOOM_OUT : (WidgetID)WID_TN_ZOOM_OUT);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
}
|
||||
return CBF_NONE;
|
||||
}
|
||||
|
@ -1232,7 +1230,6 @@ static CallBackFunction ToolbarScenDateForward(Window *w)
|
|||
static CallBackFunction ToolbarScenGenLand(Window *w)
|
||||
{
|
||||
w->HandleButtonClick(WID_TE_LAND_GENERATE);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
|
||||
ShowEditorTerraformToolbar();
|
||||
return CBF_NONE;
|
||||
|
@ -1256,7 +1253,6 @@ static CallBackFunction ToolbarScenGenTown(int index)
|
|||
static CallBackFunction ToolbarScenGenIndustry(Window *w)
|
||||
{
|
||||
w->HandleButtonClick(WID_TE_INDUSTRY);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
ShowBuildIndustryWindow();
|
||||
return CBF_NONE;
|
||||
}
|
||||
|
@ -1304,7 +1300,6 @@ static CallBackFunction ToolbarScenBuildTram(int index)
|
|||
static CallBackFunction ToolbarScenBuildDocks(Window *w)
|
||||
{
|
||||
w->HandleButtonClick(WID_TE_WATER);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
ShowBuildDocksScenToolbar();
|
||||
return CBF_NONE;
|
||||
}
|
||||
|
@ -1312,7 +1307,6 @@ static CallBackFunction ToolbarScenBuildDocks(Window *w)
|
|||
static CallBackFunction ToolbarScenPlantTrees(Window *w)
|
||||
{
|
||||
w->HandleButtonClick(WID_TE_TREES);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
ShowBuildTreesToolbar();
|
||||
return CBF_NONE;
|
||||
}
|
||||
|
@ -1320,7 +1314,6 @@ static CallBackFunction ToolbarScenPlantTrees(Window *w)
|
|||
static CallBackFunction ToolbarScenPlaceSign(Window *w)
|
||||
{
|
||||
w->HandleButtonClick(WID_TE_SIGNS);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
return SelectSignTool();
|
||||
}
|
||||
|
||||
|
|
|
@ -286,6 +286,8 @@ public:
|
|||
|
||||
new_show_state ? _town_local_authority_kdtree.Insert(index) : _town_local_authority_kdtree.Remove(index);
|
||||
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
|
||||
this->town->show_zone = new_show_state;
|
||||
this->SetWidgetLoweredState(widget, new_show_state);
|
||||
MarkWholeScreenDirty();
|
||||
|
@ -937,7 +939,7 @@ public:
|
|||
break;
|
||||
|
||||
case WID_TD_SORT_CRITERIA: // Click on sort criteria dropdown
|
||||
ShowDropDownMenu(this, TownDirectoryWindow::sorter_names, this->towns.SortType(), WID_TD_SORT_CRITERIA, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(TownDirectoryWindow::sorter_names, this->towns.SortType(), WID_TD_SORT_CRITERIA, 0, 0);
|
||||
break;
|
||||
|
||||
case WID_TD_LIST: { // Click on Town Matrix
|
||||
|
|
|
@ -2101,16 +2101,16 @@ public:
|
|||
break;
|
||||
|
||||
case WID_VL_GROUP_BY_PULLDOWN: // Select sorting criteria dropdown menu
|
||||
ShowDropDownMenu(this, this->vehicle_group_by_names, this->grouping, WID_VL_GROUP_BY_PULLDOWN, 0, 0);
|
||||
this->HandleDropdownMenuButtonClick(this->vehicle_group_by_names, this->grouping, WID_VL_GROUP_BY_PULLDOWN, 0, 0);
|
||||
return;
|
||||
|
||||
case WID_VL_SORT_BY_PULLDOWN: // Select sorting criteria dropdown menu
|
||||
ShowDropDownMenu(this, this->GetVehicleSorterNames(), this->vehgroups.SortType(), WID_VL_SORT_BY_PULLDOWN, 0,
|
||||
this->HandleDropdownMenuButtonClick(this->GetVehicleSorterNames(), this->vehgroups.SortType(), WID_VL_SORT_BY_PULLDOWN, 0,
|
||||
(this->vli.vtype == VEH_TRAIN || this->vli.vtype == VEH_ROAD) ? 0 : (1 << 10));
|
||||
return;
|
||||
|
||||
case WID_VL_FILTER_BY_CARGO: // Cargo filter dropdown
|
||||
ShowDropDownList(this, this->BuildCargoDropDownList(false), this->cargo_filter_criteria, widget);
|
||||
this->HandleDropdownListButtonClick(this->BuildCargoDropDownList(false), this->cargo_filter_criteria, widget);
|
||||
break;
|
||||
|
||||
case WID_VL_LIST: { // Matrix to show vehicles
|
||||
|
@ -2159,7 +2159,7 @@ public:
|
|||
break;
|
||||
|
||||
case WID_VL_MANAGE_VEHICLES_DROPDOWN: {
|
||||
ShowDropDownList(this, this->BuildActionDropdownList(this->vli.type == VL_STANDARD, false, true), 0, WID_VL_MANAGE_VEHICLES_DROPDOWN);
|
||||
this->HandleDropdownListButtonClick(this->BuildActionDropdownList(this->vli.type == VL_STANDARD, false, true), 0, WID_VL_MANAGE_VEHICLES_DROPDOWN);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2727,7 +2727,7 @@ struct VehicleDetailsWindow : Window {
|
|||
|
||||
case WID_VD_SERVICE_INTERVAL_DROPDOWN: {
|
||||
const Vehicle *v = Vehicle::Get(this->window_number);
|
||||
ShowDropDownMenu(this,
|
||||
this->HandleDropdownMenuButtonClick(
|
||||
TimerGameEconomy::UsingWallclockUnits() ? _service_interval_dropdown_wallclock : _service_interval_dropdown_calendar,
|
||||
v->ServiceIntervalIsCustom() ? (v->ServiceIntervalIsPercent() ? 2 : 1) : 0, widget, 0, 0);
|
||||
break;
|
||||
|
|
|
@ -30,12 +30,14 @@
|
|||
#include "hotkeys.h"
|
||||
#include "toolbar_gui.h"
|
||||
#include "statusbar_gui.h"
|
||||
#include "dropdown_func.h"
|
||||
#include "error.h"
|
||||
#include "game/game.hpp"
|
||||
#include "video/video_driver.hpp"
|
||||
#include "framerate_type.h"
|
||||
#include "network/network_func.h"
|
||||
#include "news_func.h"
|
||||
#include "sound_func.h"
|
||||
#include "timer/timer.h"
|
||||
#include "timer/timer_window.h"
|
||||
|
||||
|
@ -586,6 +588,38 @@ EventState Window::OnHotkey(int hotkey)
|
|||
return ES_HANDLED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the player clicking on a dropdown list.
|
||||
* @param list Prepopulated DropDownList.
|
||||
* @param selected The initially selected list item.
|
||||
* @param button The widget within the parent window that is used to determine
|
||||
* the list's location.
|
||||
* @param width Override the minimum width determined by the selected widget and list contents.
|
||||
* @param instant_close Set to true if releasing mouse button should close the
|
||||
* list regardless of where the cursor is.
|
||||
* @param persist Set if this dropdown should stay open after an option is selected.
|
||||
*/
|
||||
void Window::HandleDropdownListButtonClick(DropDownList &&list, int selected, WidgetID button, uint width, bool instant_close, bool persist)
|
||||
{
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
ShowDropDownList(this, std::forward<DropDownList>(list), selected, button, width, instant_close, persist);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the player clicking on a dropdown menu.
|
||||
* @param strings Menu list.
|
||||
* @param selected Index of initial selected item.
|
||||
* @param button Button widget number of the parent window \a w that wants the dropdown menu.
|
||||
* @param disabled_mask Bitmask for disabled items (items with their bit set are displayed, but not selectable in the dropdown list).
|
||||
* @param hidden_mask Bitmask for hidden items (items with their bit set are not copied to the dropdown list).
|
||||
* @param width Minimum width of the dropdown menu.
|
||||
*/
|
||||
void Window::HandleDropdownMenuButtonClick(std::span<const StringID> strings, int selected, WidgetID button, uint32_t disabled_mask, uint32_t hidden_mask, uint width)
|
||||
{
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
ShowDropDownMenu(this, strings, selected, button, disabled_mask, hidden_mask, width);
|
||||
}
|
||||
|
||||
/**
|
||||
* Do all things to make a button look clicked and mark it to be
|
||||
* unclicked in a few ticks.
|
||||
|
@ -596,6 +630,7 @@ void Window::HandleButtonClick(WidgetID widget)
|
|||
this->LowerWidget(widget);
|
||||
this->SetTimeout();
|
||||
this->SetWidgetDirty(widget);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
}
|
||||
|
||||
static void StartWindowDrag(Window *w);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "vehiclelist.h"
|
||||
#include "vehicle_type.h"
|
||||
#include "viewport_type.h"
|
||||
#include "dropdown_type.h"
|
||||
#include "company_type.h"
|
||||
#include "tile_type.h"
|
||||
#include "widget_type.h"
|
||||
|
@ -499,6 +500,8 @@ public:
|
|||
EventState HandleEditBoxKey(WidgetID wid, char32_t key, uint16_t keycode);
|
||||
virtual void InsertTextString(WidgetID wid, std::string_view str, bool marked, std::optional<size_t> caret, std::optional<size_t> insert_location, std::optional<size_t> replacement_end);
|
||||
|
||||
void HandleDropdownListButtonClick(DropDownList &&list, int selected, WidgetID button, uint width = 0, bool instant_close = false, bool persist = false);
|
||||
void HandleDropdownMenuButtonClick(std::span<const StringID> strings, int selected, WidgetID button, uint32_t disabled_mask, uint32_t hidden_mask, uint width = 0);
|
||||
void HandleButtonClick(WidgetID widget);
|
||||
int GetRowFromWidget(int clickpos, WidgetID widget, int padding, int line_height = -1) const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue