1
0
Fork 0

Compare commits

...

5 Commits

Author SHA1 Message Date
SamuXarick d88f5fe47d
Merge 3d8dad2cc6 into 614a01907a 2025-07-27 20:54:40 +00:00
Peter Nelson 614a01907a
Codechange: Make functions for click and confirm beeps. (#14484)
Avoids repetition.
2025-07-27 21:54:32 +01:00
Peter Nelson f51067f9f5
Codechange: Give all bridge sprite tables descriptive names. (#14483)
Finish off the work started 17 years ago...
2025-07-27 20:14:37 +01:00
SamuXarick 3d8dad2cc6 Codechange: Optimize FlowRiver
Make all height_tile int to allow comparison between heights generated from TileHeight and heights generated from IsTileFlat.
Make the first check IsWaterTile as that is the first thing that should be checked for FlowRiver recursive calls. Swaps position with height_begin.
Change FlatSet to std::unordered_set which is faster at the contains function.
Change std::list to std::vector to be a queue, but do not pop items from it when advancing the queue. The tiles in it are ordered by insertion which is what's needed for the n-th tile to make lake_centre.
count is not required. It can be extracted from either the unordered set or the vector.
Swap the order of checks for determining the validity of lake_centre tile, making IsTileFlat and DistanceManhattan the last ones to check as I believe are the most computational.
2025-05-08 12:26:39 +01:00
SamuXarick 7ddbd1643e Codechange: Implementation of std::hash for StrongType::Typedef 2025-05-08 10:15:21 +01:00
20 changed files with 253 additions and 211 deletions

View File

@ -509,7 +509,7 @@ public:
this->SetWidgetLoweredState(WID_AP_BTN_DONTHILIGHT, !_settings_client.gui.station_show_coverage); this->SetWidgetLoweredState(WID_AP_BTN_DONTHILIGHT, !_settings_client.gui.station_show_coverage);
this->SetWidgetLoweredState(WID_AP_BTN_DOHILIGHT, _settings_client.gui.station_show_coverage); this->SetWidgetLoweredState(WID_AP_BTN_DOHILIGHT, _settings_client.gui.station_show_coverage);
this->SetDirty(); this->SetDirty();
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->UpdateSelectSize(); this->UpdateSelectSize();
SetViewportCatchmentStation(nullptr, true); SetViewportCatchmentStation(nullptr, true);
break; break;

View File

@ -158,4 +158,31 @@ namespace StrongType {
}; };
} }
/**
* Implementation of std::hash for StrongType::Typedef.
*
* This specialization of std::hash allows hashing of StrongType::Typedef instances
* by leveraging the hash of the base type.
*
* Example Usage:
* using MyType = StrongType::Typedef<int, struct MyTypeTag>;
* std::unordered_map<MyType, std::string> my_map;
*
* @tparam TBaseType The underlying type of the StrongType::Typedef.
* @tparam TProperties Additional properties for the StrongType::Typedef.
*/
template <typename TBaseType, typename... TProperties>
struct std::hash<StrongType::Typedef<TBaseType, TProperties...>> {
/**
* Computes the hash value for a StrongType::Typedef instance.
*
* @param t The StrongType::Typedef instance to hash.
* @return The hash value of the base type of t.
*/
std::size_t operator()(const StrongType::Typedef<TBaseType, TProperties...> &t) const noexcept
{
return std::hash<TBaseType>()(t.base());
}
};
#endif /* STRONG_TYPEDEF_TYPE_HPP */ #endif /* STRONG_TYPEDEF_TYPE_HPP */

View File

@ -469,7 +469,7 @@ public:
this->RaiseWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF); this->RaiseWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF);
_settings_client.gui.station_show_coverage = (widget != BDSW_LT_OFF); _settings_client.gui.station_show_coverage = (widget != BDSW_LT_OFF);
this->LowerWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF); this->LowerWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
SetViewportCatchmentStation(nullptr, true); SetViewportCatchmentStation(nullptr, true);
break; break;
@ -580,7 +580,7 @@ public:
this->RaiseWidget(WID_BDD_X + _ship_depot_direction); this->RaiseWidget(WID_BDD_X + _ship_depot_direction);
_ship_depot_direction = (widget == WID_BDD_X ? AXIS_X : AXIS_Y); _ship_depot_direction = (widget == WID_BDD_X ? AXIS_X : AXIS_Y);
this->LowerWidget(WID_BDD_X + _ship_depot_direction); this->LowerWidget(WID_BDD_X + _ship_depot_direction);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
UpdateDocksDirection(); UpdateDocksDirection();
this->SetDirty(); this->SetDirty();
break; break;

View File

@ -323,7 +323,7 @@ static void StartGeneratingLandscape(GenerateLandscapeWindowMode mode)
MakeNewgameSettingsLive(); MakeNewgameSettingsLive();
ResetGRFConfig(true); ResetGRFConfig(true);
if (_settings_client.sound.confirm) SndPlayFx(SND_15_BEEP); SndConfirmBeep();
switch (mode) { switch (mode) {
case GLWM_GENERATE: _switch_mode = (_game_mode == GM_EDITOR) ? SM_GENRANDLAND : SM_NEWGAME; break; case GLWM_GENERATE: _switch_mode = (_game_mode == GM_EDITOR) ? SM_GENRANDLAND : SM_NEWGAME; break;
case GLWM_HEIGHTMAP: _switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_HEIGHTMAP : SM_START_HEIGHTMAP; break; case GLWM_HEIGHTMAP: _switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_HEIGHTMAP : SM_START_HEIGHTMAP; break;

View File

@ -3076,7 +3076,7 @@ struct IndustryCargoesWindow : public Window {
case WID_IC_NOTIFY: case WID_IC_NOTIFY:
this->ToggleWidgetLoweredState(WID_IC_NOTIFY); this->ToggleWidgetLoweredState(WID_IC_NOTIFY);
this->SetWidgetDirty(WID_IC_NOTIFY); this->SetWidgetDirty(WID_IC_NOTIFY);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
if (this->IsWidgetLowered(WID_IC_NOTIFY)) { if (this->IsWidgetLowered(WID_IC_NOTIFY)) {
if (FindWindowByClass(WC_SMALLMAP) == nullptr) ShowSmallMap(); if (FindWindowByClass(WC_SMALLMAP) == nullptr) ShowSmallMap();

View File

@ -27,7 +27,6 @@
#include "effectvehicle_func.h" #include "effectvehicle_func.h"
#include "landscape_type.h" #include "landscape_type.h"
#include "animated_tile_func.h" #include "animated_tile_func.h"
#include "core/flatset_type.hpp"
#include "core/random_func.hpp" #include "core/random_func.hpp"
#include "object_base.h" #include "object_base.h"
#include "company_func.h" #include "company_func.h"
@ -43,6 +42,8 @@
#include "table/strings.h" #include "table/strings.h"
#include "table/sprites.h" #include "table/sprites.h"
#include <unordered_set>
#include "safeguards.h" #include "safeguards.h"
extern const TileTypeProcs extern const TileTypeProcs
@ -1300,28 +1301,26 @@ public:
*/ */
static std::tuple<bool, bool> FlowRiver(TileIndex spring, TileIndex begin, uint min_river_length) static std::tuple<bool, bool> FlowRiver(TileIndex spring, TileIndex begin, uint min_river_length)
{ {
uint height_begin = TileHeight(begin);
if (IsWaterTile(begin)) { if (IsWaterTile(begin)) {
return { DistanceManhattan(spring, begin) > min_river_length, GetTileZ(begin) == 0 }; return { DistanceManhattan(spring, begin) > min_river_length, GetTileZ(begin) == 0 };
} }
FlatSet<TileIndex> marks; int height_begin = TileHeight(begin);
std::unordered_set<TileIndex> marks;
marks.insert(begin); marks.insert(begin);
/* Breadth first search for the closest tile we can flow down to. */ std::vector<TileIndex> queue;
std::list<TileIndex> queue;
queue.push_back(begin); queue.push_back(begin);
/* Breadth first search for the closest tile we can flow down to. */
bool found = false; bool found = false;
uint count = 0; // Number of tiles considered; to be used for lake location guessing.
TileIndex end; TileIndex end;
do { for (size_t i = 0; i != queue.size(); i++) {
end = queue.front(); end = queue[i];
queue.pop_front();
uint height_end = TileHeight(end); int height_end;
if (IsTileFlat(end) && (height_end < height_begin || (height_end == height_begin && IsWaterTile(end)))) { if (IsTileFlat(end, &height_end) && (height_end < height_begin || (height_end == height_begin && IsWaterTile(end)))) {
found = true; found = true;
break; break;
} }
@ -1330,31 +1329,29 @@ static std::tuple<bool, bool> FlowRiver(TileIndex spring, TileIndex begin, uint
TileIndex t = end + TileOffsByDiagDir(d); TileIndex t = end + TileOffsByDiagDir(d);
if (IsValidTile(t) && !marks.contains(t) && FlowsDown(end, t)) { if (IsValidTile(t) && !marks.contains(t) && FlowsDown(end, t)) {
marks.insert(t); marks.insert(t);
count++;
queue.push_back(t); queue.push_back(t);
} }
} }
} while (!queue.empty()); }
bool main_river = false; bool main_river = false;
if (found) { if (found) {
/* Flow further down hill. */ /* Flow further down hill. */
std::tie(found, main_river) = FlowRiver(spring, end, min_river_length); std::tie(found, main_river) = FlowRiver(spring, end, min_river_length);
} else if (count > 32) { } else if (queue.size() > 32) {
/* Maybe we can make a lake. Find the Nth of the considered tiles. */ /* Maybe we can make a lake. Find the Nth of the considered tiles. */
auto cit = marks.cbegin(); TileIndex lake_centre = queue[RandomRange(static_cast<uint32_t>(queue.size()))];
std::advance(cit, RandomRange(count - 1)); int height_lake;
TileIndex lake_centre = *cit;
if (IsValidTile(lake_centre) && if (IsValidTile(lake_centre) &&
/* A river, or lake, can only be built on flat slopes. */
IsTileFlat(lake_centre) &&
/* We want the lake to be built at the height of the river. */
TileHeight(begin) == TileHeight(lake_centre) &&
/* We don't want the lake at the entry of the valley. */ /* We don't want the lake at the entry of the valley. */
lake_centre != begin && lake_centre != begin &&
/* We don't want lakes in the desert. */ /* We don't want lakes in the desert. */
(_settings_game.game_creation.landscape != LandscapeType::Tropic || GetTropicZone(lake_centre) != TROPICZONE_DESERT) && (_settings_game.game_creation.landscape != LandscapeType::Tropic || GetTropicZone(lake_centre) != TROPICZONE_DESERT) &&
/* A river, or lake, can only be built on flat slopes. */
IsTileFlat(lake_centre, &height_lake) &&
/* We want the lake to be built at the height of the river. */
height_lake == height_begin &&
/* We only want a lake if the river is long enough. */ /* We only want a lake if the river is long enough. */
DistanceManhattan(spring, lake_centre) > min_river_length) { DistanceManhattan(spring, lake_centre) > min_river_length) {
end = lake_centre; end = lake_centre;
@ -1364,7 +1361,7 @@ static std::tuple<bool, bool> FlowRiver(TileIndex spring, TileIndex begin, uint
/* Run the loop twice, so artefacts from going circular in one direction get (mostly) hidden. */ /* Run the loop twice, so artefacts from going circular in one direction get (mostly) hidden. */
for (uint loops = 0; loops < 2; ++loops) { for (uint loops = 0; loops < 2; ++loops) {
for (auto tile : SpiralTileSequence(lake_centre, diameter)) { for (auto tile : SpiralTileSequence(lake_centre, diameter)) {
MakeLake(tile, height_begin); MakeLake(tile, height_lake);
} }
} }
@ -1372,7 +1369,6 @@ static std::tuple<bool, bool> FlowRiver(TileIndex spring, TileIndex begin, uint
} }
} }
marks.clear();
if (found) RiverBuilder::Exec(begin, end, spring, main_river); if (found) RiverBuilder::Exec(begin, end, spring, main_river);
return { found, main_river }; return { found, main_river };
} }

View File

@ -64,7 +64,7 @@ bool HandlePlacePushButton(Window *w, WidgetID widget, CursorID cursor, HighLigh
{ {
if (w->IsWidgetDisabled(widget)) return false; if (w->IsWidgetDisabled(widget)) return false;
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
w->SetDirty(); w->SetDirty();
if (w->IsWidgetLowered(widget)) { if (w->IsWidgetLowered(widget)) {

View File

@ -319,7 +319,7 @@ public:
if (_object_gui.sel_type != std::numeric_limits<uint16_t>::max()) { if (_object_gui.sel_type != std::numeric_limits<uint16_t>::max()) {
_object_gui.sel_view = this->GetWidget<NWidgetBase>(widget)->GetParentWidget<NWidgetMatrix>()->GetCurrentElement(); _object_gui.sel_view = this->GetWidget<NWidgetBase>(widget)->GetParentWidget<NWidgetMatrix>()->GetCurrentElement();
this->InvalidateData(PickerInvalidation::Position); this->InvalidateData(PickerInvalidation::Position);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
} }
break; break;

View File

@ -384,7 +384,7 @@ void PickerWindow::OnClick(Point pt, WidgetID widget, int)
this->callbacks.SetSelectedClass(*it); this->callbacks.SetSelectedClass(*it);
this->InvalidateData({PickerInvalidation::Type, PickerInvalidation::Position, PickerInvalidation::Validate}); this->InvalidateData({PickerInvalidation::Type, PickerInvalidation::Position, PickerInvalidation::Validate});
} }
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
CloseWindowById(WC_SELECT_STATION, 0); CloseWindowById(WC_SELECT_STATION, 0);
break; break;
} }
@ -434,7 +434,7 @@ void PickerWindow::OnClick(Point pt, WidgetID widget, int)
this->callbacks.SetSelectedType(item.index); this->callbacks.SetSelectedType(item.index);
this->InvalidateData(PickerInvalidation::Position); this->InvalidateData(PickerInvalidation::Position);
} }
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
CloseWindowById(WC_SELECT_STATION, 0); CloseWindowById(WC_SELECT_STATION, 0);
break; break;
} }

View File

@ -357,7 +357,7 @@ static void BuildRailClick_Remove(Window *w)
{ {
if (w->IsWidgetDisabled(WID_RAT_REMOVE)) return; if (w->IsWidgetDisabled(WID_RAT_REMOVE)) return;
ToggleRailButton_Remove(w); ToggleRailButton_Remove(w);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
/* handle station builder */ /* handle station builder */
if (w->IsWidgetLowered(WID_RAT_BUILD_STATION)) { if (w->IsWidgetLowered(WID_RAT_BUILD_STATION)) {
@ -1239,7 +1239,7 @@ public:
this->RaiseWidget(WID_BRAS_PLATFORM_DIR_X + _station_gui.axis); this->RaiseWidget(WID_BRAS_PLATFORM_DIR_X + _station_gui.axis);
_station_gui.axis = (Axis)(widget - WID_BRAS_PLATFORM_DIR_X); _station_gui.axis = (Axis)(widget - WID_BRAS_PLATFORM_DIR_X);
this->LowerWidget(WID_BRAS_PLATFORM_DIR_X + _station_gui.axis); this->LowerWidget(WID_BRAS_PLATFORM_DIR_X + _station_gui.axis);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
CloseWindowById(WC_SELECT_STATION, 0); CloseWindowById(WC_SELECT_STATION, 0);
break; break;
@ -1271,7 +1271,7 @@ public:
this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN); this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN); this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
CloseWindowById(WC_SELECT_STATION, 0); CloseWindowById(WC_SELECT_STATION, 0);
break; break;
@ -1304,7 +1304,7 @@ public:
this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN); this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN); this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
CloseWindowById(WC_SELECT_STATION, 0); CloseWindowById(WC_SELECT_STATION, 0);
break; break;
@ -1338,7 +1338,7 @@ public:
this->SetWidgetLoweredState(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN, !_settings_client.gui.station_dragdrop); this->SetWidgetLoweredState(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN, !_settings_client.gui.station_dragdrop);
this->SetWidgetLoweredState(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN, !_settings_client.gui.station_dragdrop); this->SetWidgetLoweredState(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN, !_settings_client.gui.station_dragdrop);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
CloseWindowById(WC_SELECT_STATION, 0); CloseWindowById(WC_SELECT_STATION, 0);
break; break;
@ -1350,7 +1350,7 @@ public:
this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_OFF, !_settings_client.gui.station_show_coverage); this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_OFF, !_settings_client.gui.station_show_coverage);
this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_ON, _settings_client.gui.station_show_coverage); this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_ON, _settings_client.gui.station_show_coverage);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
SetViewportCatchmentStation(nullptr, true); SetViewportCatchmentStation(nullptr, true);
break; break;
@ -1743,7 +1743,7 @@ struct BuildRailDepotWindow : public PickerWindowBase {
this->RaiseWidget(WID_BRAD_DEPOT_NE + _build_depot_direction); this->RaiseWidget(WID_BRAD_DEPOT_NE + _build_depot_direction);
_build_depot_direction = (DiagDirection)(widget - WID_BRAD_DEPOT_NE); _build_depot_direction = (DiagDirection)(widget - WID_BRAD_DEPOT_NE);
this->LowerWidget(WID_BRAD_DEPOT_NE + _build_depot_direction); this->LowerWidget(WID_BRAD_DEPOT_NE + _build_depot_direction);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
break; break;
} }

View File

@ -582,7 +582,7 @@ struct BuildRoadToolbarWindow : Window {
CloseWindowById(WC_SELECT_STATION, 0); CloseWindowById(WC_SELECT_STATION, 0);
ToggleRoadButton_Remove(this); ToggleRoadButton_Remove(this);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
break; break;
case WID_ROT_CONVERT_ROAD: case WID_ROT_CONVERT_ROAD:
@ -1145,7 +1145,7 @@ struct BuildRoadDepotWindow : public PickerWindowBase {
this->RaiseWidget(WID_BROD_DEPOT_NE + _road_depot_orientation); this->RaiseWidget(WID_BROD_DEPOT_NE + _road_depot_orientation);
_road_depot_orientation = (DiagDirection)(widget - WID_BROD_DEPOT_NE); _road_depot_orientation = (DiagDirection)(widget - WID_BROD_DEPOT_NE);
this->LowerWidget(WID_BROD_DEPOT_NE + _road_depot_orientation); this->LowerWidget(WID_BROD_DEPOT_NE + _road_depot_orientation);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
break; break;
@ -1477,7 +1477,7 @@ public:
this->RaiseWidget(WID_BROS_STATION_NE + _roadstop_gui.orientation); this->RaiseWidget(WID_BROS_STATION_NE + _roadstop_gui.orientation);
_roadstop_gui.orientation = (DiagDirection)(widget - WID_BROS_STATION_NE); _roadstop_gui.orientation = (DiagDirection)(widget - WID_BROS_STATION_NE);
this->LowerWidget(WID_BROS_STATION_NE + _roadstop_gui.orientation); this->LowerWidget(WID_BROS_STATION_NE + _roadstop_gui.orientation);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
CloseWindowById(WC_SELECT_STATION, 0); CloseWindowById(WC_SELECT_STATION, 0);
break; break;
@ -1487,7 +1487,7 @@ public:
this->RaiseWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF); this->RaiseWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF);
_settings_client.gui.station_show_coverage = (widget != WID_BROS_LT_OFF); _settings_client.gui.station_show_coverage = (widget != WID_BROS_LT_OFF);
this->LowerWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF); this->LowerWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
SetViewportCatchmentStation(nullptr, true); SetViewportCatchmentStation(nullptr, true);
break; break;

View File

@ -1717,7 +1717,7 @@ public:
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SM_MAP); const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SM_MAP);
Point zoom_pt = { (int)wid->current_x / 2, (int)wid->current_y / 2}; Point zoom_pt = { (int)wid->current_x / 2, (int)wid->current_y / 2};
this->SetZoomLevel((widget == WID_SM_ZOOM_IN) ? ZLC_ZOOM_IN : ZLC_ZOOM_OUT, &zoom_pt); this->SetZoomLevel((widget == WID_SM_ZOOM_IN) ? ZLC_ZOOM_IN : ZLC_ZOOM_OUT, &zoom_pt);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
break; break;
} }
@ -1729,13 +1729,13 @@ public:
case WID_SM_VEGETATION: // Show vegetation case WID_SM_VEGETATION: // Show vegetation
case WID_SM_OWNERS: // Show land owners case WID_SM_OWNERS: // Show land owners
this->SwitchMapType((SmallMapType)(widget - WID_SM_CONTOUR)); this->SwitchMapType((SmallMapType)(widget - WID_SM_CONTOUR));
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
break; break;
case WID_SM_CENTERMAP: // Center the smallmap again case WID_SM_CENTERMAP: // Center the smallmap again
this->SmallMapCenterOnCurrentPos(); this->SmallMapCenterOnCurrentPos();
this->HandleButtonClick(WID_SM_CENTERMAP); this->HandleButtonClick(WID_SM_CENTERMAP);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
break; break;
case WID_SM_TOGGLETOWNNAME: // Toggle town names case WID_SM_TOGGLETOWNNAME: // Toggle town names
@ -1743,7 +1743,7 @@ public:
this->SetWidgetLoweredState(WID_SM_TOGGLETOWNNAME, this->show_towns); this->SetWidgetLoweredState(WID_SM_TOGGLETOWNNAME, this->show_towns);
this->SetDirty(); this->SetDirty();
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
break; break;
case WID_SM_SHOW_IND_NAMES: // Toggle industry names case WID_SM_SHOW_IND_NAMES: // Toggle industry names
@ -1751,7 +1751,7 @@ public:
this->SetWidgetLoweredState(WID_SM_SHOW_IND_NAMES, this->show_ind_names); this->SetWidgetLoweredState(WID_SM_SHOW_IND_NAMES, this->show_ind_names);
this->SetDirty(); this->SetDirty();
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
break; break;
case WID_SM_LEGEND: // Legend case WID_SM_LEGEND: // Legend

View File

@ -247,6 +247,22 @@ void SndPlayFx(SoundID sound)
StartSound(sound, 0.5, UINT8_MAX); StartSound(sound, 0.5, UINT8_MAX);
} }
/**
* Play a beep sound for a click event if enabled in settings.
*/
void SndClickBeep()
{
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
}
/**
* Play a beep sound for a confirm event if enabled in settings.
*/
void SndConfirmBeep()
{
if (_settings_client.sound.confirm) SndPlayFx(SND_15_BEEP);
}
/** Names corresponding to the sound set's files */ /** Names corresponding to the sound set's files */
static const std::string_view _sound_file_names[] = { "samples" }; static const std::string_view _sound_file_names[] = { "samples" };

View File

@ -21,4 +21,7 @@ void SndPlayVehicleFx(SoundID sound, const Vehicle *v);
void SndPlayFx(SoundID sound); void SndPlayFx(SoundID sound);
void SndCopyToPool(); void SndCopyToPool();
void SndClickBeep();
void SndConfirmBeep();
#endif /* SOUND_FUNC_H */ #endif /* SOUND_FUNC_H */

View File

@ -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}, {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 }, { 0x9A9, PAL_NONE }, { 0x99F, PAL_NONE }, { 0x9B1, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9A5, PAL_NONE }, { 0x997, PAL_NONE }, { 0x9AD, 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 }, { 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 }, { 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 }, { 0x9AA, PAL_NONE }, { 0x9A0, PAL_NONE }, { 0x9B2, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9A6, PAL_NONE }, { 0x998, PAL_NONE }, { 0x9AE, 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 }, { 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 }, { 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 }, { 0x9AC, PAL_NONE }, { 0x9A4, PAL_NONE }, { 0x9B4, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9A8, PAL_NONE }, { 0x99C, PAL_NONE }, { 0x9B0, 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 }, { 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 }, { 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 }, { 0x9AB, PAL_NONE }, { 0x9A3, PAL_NONE }, { 0x9B3, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9A7, PAL_NONE }, { 0x99B, PAL_NONE }, { 0x9AF, 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 }, { 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 }, { 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 }, { 0x9B6, PAL_NONE }, { 0x9BA, PAL_NONE }, { 0x9BC, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9B5, PAL_NONE }, { 0x9B9, PAL_NONE }, { 0x9BB, 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 }, { 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 }, { 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 }, { 0x9BD, PAL_NONE }, { 0x9C1, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9BE, PAL_NONE }, { 0x9C2, 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 }, { 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 }, { 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 }, { 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, 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 }, { 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 }, { 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 }, { 0x9CD, PAL_NONE }, { 0x9D9, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9CE, PAL_NONE }, { 0x9DA, 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 }, { 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 }, { 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 }, { 0x9CB, PAL_NONE }, { 0x9D7, PAL_NONE }, { 0x9DD, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9D0, PAL_NONE }, { 0x9DC, PAL_NONE }, { 0x9E0, 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 }, { 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 }, { 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 }, { 0x9CC, PAL_NONE }, { 0x9D8, PAL_NONE }, { 0x9DE, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9CF, PAL_NONE }, { 0x9DB, PAL_NONE }, { 0x9DF, 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 }, { 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 }, { 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 }, { 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 0x986, PAL_NONE }, { 0x988, PAL_NONE }, { 0x985, PAL_NONE }, { 0x987, PAL_NONE },
{ 0x98A, PAL_NONE }, { 0x98C, PAL_NONE }, { 0x989, PAL_NONE }, { 0x98B, 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 }, { 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 ), 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_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_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 ), 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 ), 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_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_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 ), 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 ), 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_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_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 ), 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 ), 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_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_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 ), 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 ), 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_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_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 ), 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 ), 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_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_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 ), 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 ), 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_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 ), 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 ), 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 ), 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 }, { 0x9F9, PAL_NONE }, { 0x9FD, PAL_NONE }, { 0x9C9, PAL_NONE }, { 0x0, PAL_NONE },
{ 0x9FA, PAL_NONE }, { 0x9FE, PAL_NONE }, { 0x9CA, 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 }, { 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 }, { 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 }, { 0xA0B, PAL_NONE }, { 0xA01, PAL_NONE }, { 0x0, PAL_NONE }, { 0x0, PAL_NONE },
{ 0xA0C, PAL_NONE }, { 0xA02, 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 }, { 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 }, { 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 }, { 0xA09, PAL_NONE }, { 0x9FF, PAL_NONE }, { 0xA05, PAL_NONE }, { 0x0, PAL_NONE },
{ 0xA0E, PAL_NONE }, { 0xA04, PAL_NONE }, { 0xA08, 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 }, { 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 }, { 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 }, { 0xA0A, PAL_NONE }, { 0xA00, PAL_NONE }, { 0xA06, PAL_NONE }, { 0x0, PAL_NONE },
{ 0xA0D, PAL_NONE }, { 0xA03, PAL_NONE }, { 0xA07, 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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 }, { 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, _bridge_sprite_table_archgirder_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_4[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_suspension_oxide[] = {
_bridge_sprite_table_4_0, _bridge_sprite_table_suspension_oxide_north,
_bridge_sprite_table_4_1, _bridge_sprite_table_suspension_oxide_south,
_bridge_sprite_table_4_2, _bridge_sprite_table_suspension_oxide_inner_north,
_bridge_sprite_table_4_3, _bridge_sprite_table_suspension_oxide_inner_south,
_bridge_sprite_table_4_4, _bridge_sprite_table_suspension_oxide_middle_odd,
_bridge_sprite_table_4_5, _bridge_sprite_table_suspension_middle_even,
_bridge_sprite_table_4_6, _bridge_sprite_table_generic_oxide_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_5[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_suspension_yellow[] = {
_bridge_sprite_table_5_0, _bridge_sprite_table_suspension_yellow_north,
_bridge_sprite_table_5_1, _bridge_sprite_table_suspension_yellow_south,
_bridge_sprite_table_5_2, _bridge_sprite_table_suspension_yellow_inner_north,
_bridge_sprite_table_5_3, _bridge_sprite_table_suspension_yellow_inner_south,
_bridge_sprite_table_5_4, _bridge_sprite_table_suspension_yellow_middle_odd,
_bridge_sprite_table_5_5, _bridge_sprite_table_suspension_yellow_middle_even,
_bridge_sprite_table_5_6, _bridge_sprite_table_generic_yellow_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_concrete_suspended[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_suspension_concrete[] = {
_bridge_sprite_table_concrete_suspended_A, _bridge_sprite_table_suspension_concrete_north,
_bridge_sprite_table_concrete_suspended_B, _bridge_sprite_table_suspension_concrete_south,
_bridge_sprite_table_concrete_suspended_C, _bridge_sprite_table_suspension_concrete_inner_north,
_bridge_sprite_table_concrete_suspended_D, _bridge_sprite_table_suspension_concrete_inner_south,
_bridge_sprite_table_concrete_suspended_E, _bridge_sprite_table_suspension_concrete_middle_odd,
_bridge_sprite_table_concrete_suspended_F, _bridge_sprite_table_suspension_concrete_middle_even,
_bridge_sprite_table_concrete_suspended_heads, _bridge_sprite_table_generic_concrete_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_6[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_cantilever_oxide[] = {
_bridge_sprite_table_6_0, _bridge_sprite_table_cantilever_oxide_north,
_bridge_sprite_table_6_1, _bridge_sprite_table_cantilever_oxide_south,
_bridge_sprite_table_6_2, _bridge_sprite_table_cantilever_oxide_middle,
_bridge_sprite_table_6_2, _bridge_sprite_table_cantilever_oxide_middle,
_bridge_sprite_table_6_2, _bridge_sprite_table_cantilever_oxide_middle,
_bridge_sprite_table_6_2, _bridge_sprite_table_cantilever_oxide_middle,
_bridge_sprite_table_6_3, _bridge_sprite_table_cantilever_oxide_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_7[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_cantilever_brown[] = {
_bridge_sprite_table_7_0, _bridge_sprite_table_cantilever_brown_north,
_bridge_sprite_table_7_1, _bridge_sprite_table_cantilever_brown_south,
_bridge_sprite_table_7_2, _bridge_sprite_table_cantilever_brown_middle,
_bridge_sprite_table_7_2, _bridge_sprite_table_cantilever_brown_middle,
_bridge_sprite_table_7_2, _bridge_sprite_table_cantilever_brown_middle,
_bridge_sprite_table_7_2, _bridge_sprite_table_cantilever_brown_middle,
_bridge_sprite_table_7_3, _bridge_sprite_table_cantilever_brown_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_8[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_cantilever_red[] = {
_bridge_sprite_table_8_0, _bridge_sprite_table_cantilever_red_north,
_bridge_sprite_table_8_1, _bridge_sprite_table_cantilever_red_south,
_bridge_sprite_table_8_2, _bridge_sprite_table_cantilever_red_middle,
_bridge_sprite_table_8_2, _bridge_sprite_table_cantilever_red_middle,
_bridge_sprite_table_8_2, _bridge_sprite_table_cantilever_red_middle,
_bridge_sprite_table_8_2, _bridge_sprite_table_cantilever_red_middle,
_bridge_sprite_table_8_3, _bridge_sprite_table_cantilever_red_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_wood[] = { 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, _bridge_sprite_table_concrete_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_9[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_girder[] = {
_bridge_sprite_table_9_0, _bridge_sprite_table_girder_middle,
_bridge_sprite_table_9_0, _bridge_sprite_table_girder_middle,
_bridge_sprite_table_9_0, _bridge_sprite_table_girder_middle,
_bridge_sprite_table_9_0, _bridge_sprite_table_girder_middle,
_bridge_sprite_table_9_0, _bridge_sprite_table_girder_middle,
_bridge_sprite_table_9_0, _bridge_sprite_table_girder_middle,
_bridge_sprite_table_4_6, _bridge_sprite_table_generic_oxide_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_10[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_tubular_oxide[] = {
_bridge_sprite_table_10_0, _bridge_sprite_table_tubular_oxide_north,
_bridge_sprite_table_10_1, _bridge_sprite_table_tubular_oxide_south,
_bridge_sprite_table_10_2, _bridge_sprite_table_tubular_oxide_middle,
_bridge_sprite_table_10_2, _bridge_sprite_table_tubular_oxide_middle,
_bridge_sprite_table_10_2, _bridge_sprite_table_tubular_oxide_middle,
_bridge_sprite_table_10_2, _bridge_sprite_table_tubular_oxide_middle,
_bridge_sprite_table_4_6, _bridge_sprite_table_generic_oxide_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_11[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_tubular_yellow[] = {
_bridge_sprite_table_11_0, _bridge_sprite_table_tubular_yellow_north,
_bridge_sprite_table_11_1, _bridge_sprite_table_tubular_yellow_south,
_bridge_sprite_table_11_2, _bridge_sprite_table_tubular_yellow_middle,
_bridge_sprite_table_11_2, _bridge_sprite_table_tubular_yellow_middle,
_bridge_sprite_table_11_2, _bridge_sprite_table_tubular_yellow_middle,
_bridge_sprite_table_11_2, _bridge_sprite_table_tubular_yellow_middle,
_bridge_sprite_table_5_6, _bridge_sprite_table_generic_yellow_heads,
}; };
static const std::span<const PalSpriteID> _bridge_sprite_table_12[] = { static const std::span<const PalSpriteID> _bridge_sprite_table_tubular_silicon[] = {
_bridge_sprite_table_12_0, _bridge_sprite_table_tubular_silicon_north,
_bridge_sprite_table_12_1, _bridge_sprite_table_tubular_silicon_south,
_bridge_sprite_table_12_2, _bridge_sprite_table_tubular_silicon_middle,
_bridge_sprite_table_12_2, _bridge_sprite_table_tubular_silicon_middle,
_bridge_sprite_table_12_2, _bridge_sprite_table_tubular_silicon_middle,
_bridge_sprite_table_12_2, _bridge_sprite_table_tubular_silicon_middle,
_bridge_sprite_table_concrete_suspended_heads, _bridge_sprite_table_generic_concrete_heads,
}; };
static const std::span<const std::span<const PalSpriteID>> _bridge_sprite_table[MAX_BRIDGES] = { static const std::span<const std::span<const PalSpriteID>> _bridge_sprite_table[MAX_BRIDGES] = {
_bridge_sprite_table_wood, _bridge_sprite_table_wood,
_bridge_sprite_table_concrete, _bridge_sprite_table_concrete,
_bridge_sprite_table_archgirder, _bridge_sprite_table_archgirder,
_bridge_sprite_table_concrete_suspended, _bridge_sprite_table_suspension_concrete,
_bridge_sprite_table_4, _bridge_sprite_table_suspension_oxide,
_bridge_sprite_table_5, _bridge_sprite_table_suspension_yellow,
_bridge_sprite_table_6, _bridge_sprite_table_cantilever_oxide,
_bridge_sprite_table_7, _bridge_sprite_table_cantilever_brown,
_bridge_sprite_table_8, _bridge_sprite_table_cantilever_red,
_bridge_sprite_table_9, _bridge_sprite_table_girder,
_bridge_sprite_table_10, _bridge_sprite_table_tubular_oxide,
_bridge_sprite_table_11, _bridge_sprite_table_tubular_yellow,
_bridge_sprite_table_12 _bridge_sprite_table_tubular_silicon,
}; };
/** /**

View File

@ -621,7 +621,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
if (!IsInsideMM(size, 1, 8 + 1)) return; if (!IsInsideMM(size, 1, 8 + 1)) return;
_terraform_size = size; _terraform_size = size;
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
break; break;
} }

View File

@ -117,7 +117,7 @@ public:
static void PopupMainToolbarMenu(Window *w, WidgetID widget, DropDownList &&list, int def) static void PopupMainToolbarMenu(Window *w, WidgetID widget, DropDownList &&list, int def)
{ {
ShowDropDownList(w, std::move(list), def, widget, 0, true); ShowDropDownList(w, std::move(list), def, widget, 0, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
} }
/** /**
@ -204,7 +204,7 @@ static CallBackFunction ToolbarPauseClick(Window *)
if (_networking && !_network_server) return CBF_NONE; // only server can pause the game if (_networking && !_network_server) return CBF_NONE; // only server can pause the game
if (Command<CMD_PAUSE>::Post(PauseMode::Normal, _pause_mode.None())) { if (Command<CMD_PAUSE>::Post(PauseMode::Normal, _pause_mode.None())) {
if (_settings_client.sound.confirm) SndPlayFx(SND_15_BEEP); SndConfirmBeep();
} }
return CBF_NONE; return CBF_NONE;
} }
@ -220,7 +220,7 @@ static CallBackFunction ToolbarFastForwardClick(Window *)
ChangeGameSpeed(_game_speed == 100); ChangeGameSpeed(_game_speed == 100);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -291,7 +291,7 @@ static CallBackFunction ToolbarOptionsClick(Window *w)
list.push_back(MakeDropDownListCheckedItem(IsTransparencySet(TO_SIGNS), STR_SETTINGS_MENU_TRANSPARENT_SIGNS, OME_SHOW_STATIONSIGNS)); list.push_back(MakeDropDownListCheckedItem(IsTransparencySet(TO_SIGNS), STR_SETTINGS_MENU_TRANSPARENT_SIGNS, OME_SHOW_STATIONSIGNS));
ShowDropDownList(w, std::move(list), 0, WID_TN_SETTINGS, 140, true); ShowDropDownList(w, std::move(list), 0, WID_TN_SETTINGS, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -684,7 +684,7 @@ static CallBackFunction ToolbarGraphsClick(Window *w)
if (_toolbar_mode != TB_NORMAL) AddDropDownLeagueTableOptions(list); if (_toolbar_mode != TB_NORMAL) AddDropDownLeagueTableOptions(list);
ShowDropDownList(w, std::move(list), GRMN_OPERATING_PROFIT_GRAPH, WID_TN_GRAPHS, 140, true); ShowDropDownList(w, std::move(list), GRMN_OPERATING_PROFIT_GRAPH, WID_TN_GRAPHS, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -697,7 +697,7 @@ static CallBackFunction ToolbarLeagueClick(Window *w)
int selected = list[0]->result; int selected = list[0]->result;
ShowDropDownList(w, std::move(list), selected, WID_TN_LEAGUE, 140, true); ShowDropDownList(w, std::move(list), selected, WID_TN_LEAGUE, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -857,7 +857,7 @@ static CallBackFunction ToolbarZoomInClick(Window *w)
{ {
if (DoZoomInOutWindow(ZOOM_IN, GetMainWindow())) { if (DoZoomInOutWindow(ZOOM_IN, GetMainWindow())) {
w->HandleButtonClick((_game_mode == GM_EDITOR) ? (WidgetID)WID_TE_ZOOM_IN : (WidgetID)WID_TN_ZOOM_IN); 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); SndClickBeep();
} }
return CBF_NONE; return CBF_NONE;
} }
@ -868,7 +868,7 @@ static CallBackFunction ToolbarZoomOutClick(Window *w)
{ {
if (DoZoomInOutWindow(ZOOM_OUT, GetMainWindow())) { if (DoZoomInOutWindow(ZOOM_OUT, GetMainWindow())) {
w->HandleButtonClick((_game_mode == GM_EDITOR) ? (WidgetID)WID_TE_ZOOM_OUT : (WidgetID)WID_TN_ZOOM_OUT); 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); SndClickBeep();
} }
return CBF_NONE; return CBF_NONE;
} }
@ -878,7 +878,7 @@ static CallBackFunction ToolbarZoomOutClick(Window *w)
static CallBackFunction ToolbarBuildRailClick(Window *w) static CallBackFunction ToolbarBuildRailClick(Window *w)
{ {
ShowDropDownList(w, GetRailTypeDropDownList(), _last_built_railtype, WID_TN_RAILS, 140, true); ShowDropDownList(w, GetRailTypeDropDownList(), _last_built_railtype, WID_TN_RAILS, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -900,7 +900,7 @@ static CallBackFunction MenuClickBuildRail(int index)
static CallBackFunction ToolbarBuildRoadClick(Window *w) static CallBackFunction ToolbarBuildRoadClick(Window *w)
{ {
ShowDropDownList(w, GetRoadTypeDropDownList(RTTB_ROAD), _last_built_roadtype, WID_TN_ROADS, 140, true); ShowDropDownList(w, GetRoadTypeDropDownList(RTTB_ROAD), _last_built_roadtype, WID_TN_ROADS, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -922,7 +922,7 @@ static CallBackFunction MenuClickBuildRoad(int index)
static CallBackFunction ToolbarBuildTramClick(Window *w) static CallBackFunction ToolbarBuildTramClick(Window *w)
{ {
ShowDropDownList(w, GetRoadTypeDropDownList(RTTB_TRAM), _last_built_tramtype, WID_TN_TRAMS, 140, true); ShowDropDownList(w, GetRoadTypeDropDownList(RTTB_TRAM), _last_built_tramtype, WID_TN_TRAMS, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -946,7 +946,7 @@ static CallBackFunction ToolbarBuildWaterClick(Window *w)
DropDownList list; DropDownList list;
list.push_back(MakeDropDownListIconItem(SPR_IMG_BUILD_CANAL, PAL_NONE, STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION, 0)); list.push_back(MakeDropDownListIconItem(SPR_IMG_BUILD_CANAL, PAL_NONE, STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION, 0));
ShowDropDownList(w, std::move(list), 0, WID_TN_WATER, 140, true); ShowDropDownList(w, std::move(list), 0, WID_TN_WATER, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -968,7 +968,7 @@ static CallBackFunction ToolbarBuildAirClick(Window *w)
DropDownList list; DropDownList list;
list.push_back(MakeDropDownListIconItem(SPR_IMG_AIRPORT, PAL_NONE, STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION, 0)); list.push_back(MakeDropDownListIconItem(SPR_IMG_AIRPORT, PAL_NONE, STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION, 0));
ShowDropDownList(w, std::move(list), 0, WID_TN_AIR, 140, true); ShowDropDownList(w, std::move(list), 0, WID_TN_AIR, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -992,7 +992,7 @@ static CallBackFunction ToolbarForestClick(Window *w)
list.push_back(MakeDropDownListIconItem(SPR_IMG_PLANTTREES, PAL_NONE, STR_LANDSCAPING_MENU_PLANT_TREES, 1)); list.push_back(MakeDropDownListIconItem(SPR_IMG_PLANTTREES, PAL_NONE, STR_LANDSCAPING_MENU_PLANT_TREES, 1));
list.push_back(MakeDropDownListIconItem(SPR_IMG_SIGN, PAL_NONE, STR_LANDSCAPING_MENU_PLACE_SIGN, 2)); list.push_back(MakeDropDownListIconItem(SPR_IMG_SIGN, PAL_NONE, STR_LANDSCAPING_MENU_PLACE_SIGN, 2));
ShowDropDownList(w, std::move(list), 0, WID_TN_LANDSCAPE, 100, true); ShowDropDownList(w, std::move(list), 0, WID_TN_LANDSCAPE, 100, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -1188,7 +1188,7 @@ static CallBackFunction ToolbarSwitchClick(Window *w)
w->ReInit(); w->ReInit();
w->SetWidgetLoweredState(_game_mode == GM_EDITOR ? (WidgetID)WID_TE_SWITCH_BAR : (WidgetID)WID_TN_SWITCH_BAR, _toolbar_mode == TB_LOWER); w->SetWidgetLoweredState(_game_mode == GM_EDITOR ? (WidgetID)WID_TE_SWITCH_BAR : (WidgetID)WID_TN_SWITCH_BAR, _toolbar_mode == TB_LOWER);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -1232,7 +1232,7 @@ static CallBackFunction ToolbarScenDateForward(Window *w)
static CallBackFunction ToolbarScenGenLand(Window *w) static CallBackFunction ToolbarScenGenLand(Window *w)
{ {
w->HandleButtonClick(WID_TE_LAND_GENERATE); w->HandleButtonClick(WID_TE_LAND_GENERATE);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
ShowEditorTerraformToolbar(); ShowEditorTerraformToolbar();
return CBF_NONE; return CBF_NONE;
@ -1256,7 +1256,7 @@ static CallBackFunction ToolbarScenGenTown(int index)
static CallBackFunction ToolbarScenGenIndustry(Window *w) static CallBackFunction ToolbarScenGenIndustry(Window *w)
{ {
w->HandleButtonClick(WID_TE_INDUSTRY); w->HandleButtonClick(WID_TE_INDUSTRY);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
ShowBuildIndustryWindow(); ShowBuildIndustryWindow();
return CBF_NONE; return CBF_NONE;
} }
@ -1264,7 +1264,7 @@ static CallBackFunction ToolbarScenGenIndustry(Window *w)
static CallBackFunction ToolbarScenBuildRoadClick(Window *w) static CallBackFunction ToolbarScenBuildRoadClick(Window *w)
{ {
ShowDropDownList(w, GetScenRoadTypeDropDownList(RTTB_ROAD), _last_built_roadtype, WID_TE_ROADS, 140, true); ShowDropDownList(w, GetScenRoadTypeDropDownList(RTTB_ROAD), _last_built_roadtype, WID_TE_ROADS, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -1284,7 +1284,7 @@ static CallBackFunction ToolbarScenBuildRoad(int index)
static CallBackFunction ToolbarScenBuildTramClick(Window *w) static CallBackFunction ToolbarScenBuildTramClick(Window *w)
{ {
ShowDropDownList(w, GetScenRoadTypeDropDownList(RTTB_TRAM), _last_built_tramtype, WID_TE_TRAMS, 140, true); ShowDropDownList(w, GetScenRoadTypeDropDownList(RTTB_TRAM), _last_built_tramtype, WID_TE_TRAMS, 140, true);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return CBF_NONE; return CBF_NONE;
} }
@ -1304,7 +1304,7 @@ static CallBackFunction ToolbarScenBuildTram(int index)
static CallBackFunction ToolbarScenBuildDocks(Window *w) static CallBackFunction ToolbarScenBuildDocks(Window *w)
{ {
w->HandleButtonClick(WID_TE_WATER); w->HandleButtonClick(WID_TE_WATER);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
ShowBuildDocksScenToolbar(); ShowBuildDocksScenToolbar();
return CBF_NONE; return CBF_NONE;
} }
@ -1312,7 +1312,7 @@ static CallBackFunction ToolbarScenBuildDocks(Window *w)
static CallBackFunction ToolbarScenPlantTrees(Window *w) static CallBackFunction ToolbarScenPlantTrees(Window *w)
{ {
w->HandleButtonClick(WID_TE_TREES); w->HandleButtonClick(WID_TE_TREES);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
ShowBuildTreesToolbar(); ShowBuildTreesToolbar();
return CBF_NONE; return CBF_NONE;
} }
@ -1320,7 +1320,7 @@ static CallBackFunction ToolbarScenPlantTrees(Window *w)
static CallBackFunction ToolbarScenPlaceSign(Window *w) static CallBackFunction ToolbarScenPlaceSign(Window *w)
{ {
w->HandleButtonClick(WID_TE_SIGNS); w->HandleButtonClick(WID_TE_SIGNS);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
return SelectSignTool(); return SelectSignTool();
} }
@ -2407,7 +2407,7 @@ struct ScenarioEditorToolbarWindow : Window {
{ {
CallBackFunction cbf = _scen_toolbar_dropdown_procs[widget](index); CallBackFunction cbf = _scen_toolbar_dropdown_procs[widget](index);
if (cbf != CBF_NONE) _last_started_action = cbf; if (cbf != CBF_NONE) _last_started_action = cbf;
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
} }
EventState OnHotkey(int hotkey) override EventState OnHotkey(int hotkey) override

View File

@ -1739,7 +1739,7 @@ struct BuildHouseWindow : public PickerWindow {
this->SetWidgetLoweredState(WID_BH_PROTECT_OFF, !BuildHouseWindow::house_protected); this->SetWidgetLoweredState(WID_BH_PROTECT_OFF, !BuildHouseWindow::house_protected);
this->SetWidgetLoweredState(WID_BH_PROTECT_ON, BuildHouseWindow::house_protected); this->SetWidgetLoweredState(WID_BH_PROTECT_ON, BuildHouseWindow::house_protected);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
this->SetDirty(); this->SetDirty();
break; break;

View File

@ -80,7 +80,7 @@ public:
} else { } else {
/* toggle the bit of the transparencies variable and play a sound */ /* toggle the bit of the transparencies variable and play a sound */
ToggleTransparency((TransparencyOption)(widget - WID_TT_BEGIN)); ToggleTransparency((TransparencyOption)(widget - WID_TT_BEGIN));
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
MarkWholeScreenDirty(); MarkWholeScreenDirty();
} }
} else if (widget == WID_TT_BUTTONS) { } else if (widget == WID_TT_BUTTONS) {
@ -94,7 +94,7 @@ public:
if (i == WID_TT_TEXT|| i == WID_TT_END) return; if (i == WID_TT_TEXT|| i == WID_TT_END) return;
ToggleInvisibility((TransparencyOption)(i - WID_TT_BEGIN)); ToggleInvisibility((TransparencyOption)(i - WID_TT_BEGIN));
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); SndClickBeep();
/* Redraw whole screen only if transparency is set */ /* Redraw whole screen only if transparency is set */
if (IsTransparencySet((TransparencyOption)(i - WID_TT_BEGIN))) { if (IsTransparencySet((TransparencyOption)(i - WID_TT_BEGIN))) {

View File

@ -102,7 +102,7 @@ class BuildTreesWindow : public Window
if (this->tree_to_plant >= 0) { if (this->tree_to_plant >= 0) {
/* Activate placement */ /* Activate placement */
if (_settings_client.sound.confirm) SndPlayFx(SND_15_BEEP); SndConfirmBeep();
SetObjectToPlace(SPR_CURSOR_TREE, PAL_NONE, HT_RECT | HT_DIAGONAL, this->window_class, this->window_number); SetObjectToPlace(SPR_CURSOR_TREE, PAL_NONE, HT_RECT | HT_DIAGONAL, this->window_class, this->window_number);
this->tree_to_plant = current_tree; // SetObjectToPlace may call ResetObjectToPlace which may reset tree_to_plant to -1 this->tree_to_plant = current_tree; // SetObjectToPlace may call ResetObjectToPlace which may reset tree_to_plant to -1
} else { } else {
@ -180,7 +180,7 @@ public:
break; break;
case WID_BT_MANY_RANDOM: // place trees randomly over the landscape case WID_BT_MANY_RANDOM: // place trees randomly over the landscape
if (_settings_client.sound.confirm) SndPlayFx(SND_15_BEEP); SndConfirmBeep();
PlaceTreesRandomly(); PlaceTreesRandomly();
MarkWholeScreenDirty(); MarkWholeScreenDirty();
break; break;