mirror of https://github.com/OpenTTD/OpenTTD
Compare commits
8 Commits
a1bdf0f740
...
27f7317b34
Author | SHA1 | Date |
---|---|---|
|
27f7317b34 | |
|
065f88eec8 | |
|
00631729a4 | |
|
9f29f9fa56 | |
|
adc221f0d4 | |
|
cdadfd8e83 | |
|
614a01907a | |
|
f51067f9f5 |
|
@ -91,6 +91,7 @@ add_files(
|
||||||
bridge_gui.cpp
|
bridge_gui.cpp
|
||||||
bridge_map.cpp
|
bridge_map.cpp
|
||||||
bridge_map.h
|
bridge_map.h
|
||||||
|
bridge_type.h
|
||||||
build_vehicle_gui.cpp
|
build_vehicle_gui.cpp
|
||||||
cachecheck.cpp
|
cachecheck.cpp
|
||||||
cargo_type.h
|
cargo_type.h
|
||||||
|
|
|
@ -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;
|
||||||
|
|
31
src/bridge.h
31
src/bridge.h
|
@ -13,29 +13,16 @@
|
||||||
#include "gfx_type.h"
|
#include "gfx_type.h"
|
||||||
#include "tile_cmd.h"
|
#include "tile_cmd.h"
|
||||||
#include "timer/timer_game_calendar.h"
|
#include "timer/timer_game_calendar.h"
|
||||||
|
#include "bridge_type.h"
|
||||||
/**
|
|
||||||
* This enum is related to the definition of bridge pieces,
|
|
||||||
* which is used to determine the proper sprite table to use
|
|
||||||
* while drawing a given bridge part.
|
|
||||||
*/
|
|
||||||
enum BridgePieces : uint8_t {
|
|
||||||
BRIDGE_PIECE_NORTH = 0,
|
|
||||||
BRIDGE_PIECE_SOUTH,
|
|
||||||
BRIDGE_PIECE_INNER_NORTH,
|
|
||||||
BRIDGE_PIECE_INNER_SOUTH,
|
|
||||||
BRIDGE_PIECE_MIDDLE_ODD,
|
|
||||||
BRIDGE_PIECE_MIDDLE_EVEN,
|
|
||||||
BRIDGE_PIECE_HEAD,
|
|
||||||
NUM_BRIDGE_PIECES,
|
|
||||||
};
|
|
||||||
|
|
||||||
DECLARE_INCREMENT_DECREMENT_OPERATORS(BridgePieces)
|
|
||||||
|
|
||||||
static const uint MAX_BRIDGES = 13; ///< Maximal number of available bridge specs.
|
static const uint MAX_BRIDGES = 13; ///< Maximal number of available bridge specs.
|
||||||
constexpr uint SPRITES_PER_BRIDGE_PIECE = 32; ///< Number of sprites there are per bridge piece.
|
constexpr uint SPRITES_PER_BRIDGE_PIECE = 32; ///< Number of sprites there are per bridge piece.
|
||||||
|
|
||||||
typedef uint BridgeType; ///< Bridge spec number.
|
enum class BridgeSpecCtrlFlag : uint8_t{
|
||||||
|
CustomPillarFlags,
|
||||||
|
InvalidPillarFlags,
|
||||||
|
};
|
||||||
|
using BridgeSpecCtrlFlags = EnumBitSet<BridgeSpecCtrlFlag, uint8_t>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Struct containing information about a single bridge type
|
* Struct containing information about a single bridge type
|
||||||
|
@ -52,6 +39,8 @@ struct BridgeSpec {
|
||||||
StringID transport_name[2]; ///< description of the bridge, when built for road or rail
|
StringID transport_name[2]; ///< description of the bridge, when built for road or rail
|
||||||
std::vector<std::vector<PalSpriteID>> sprite_table; ///< table of sprites for drawing the bridge
|
std::vector<std::vector<PalSpriteID>> sprite_table; ///< table of sprites for drawing the bridge
|
||||||
uint8_t flags; ///< bit 0 set: disable drawing of far pillars.
|
uint8_t flags; ///< bit 0 set: disable drawing of far pillars.
|
||||||
|
BridgeSpecCtrlFlags ctrl_flags{}; ///< control flags
|
||||||
|
std::array<std::array<BridgePillarFlags, AXIS_END>, NUM_BRIDGE_PIECES - 1> pillar_flags{}; ///< bridge pillar flags, 6 for each axis.
|
||||||
};
|
};
|
||||||
|
|
||||||
extern BridgeSpec _bridge[MAX_BRIDGES];
|
extern BridgeSpec _bridge[MAX_BRIDGES];
|
||||||
|
@ -70,11 +59,13 @@ inline const BridgeSpec *GetBridgeSpec(BridgeType i)
|
||||||
return &_bridge[i];
|
return &_bridge[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawBridgeMiddle(const TileInfo *ti);
|
void DrawBridgeMiddle(const TileInfo *ti, BridgePillarFlags blocked_pillars);
|
||||||
|
|
||||||
CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoCommandFlags flags = {});
|
CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoCommandFlags flags = {});
|
||||||
int CalcBridgeLenCostFactor(int x);
|
int CalcBridgeLenCostFactor(int x);
|
||||||
|
|
||||||
|
BridgePillarFlags GetBridgeTilePillarFlags(TileIndex tile, TileIndex rampnorth, TileIndex rampsouth, BridgeType type, TransportType transport_type);
|
||||||
|
|
||||||
void ResetBridges();
|
void ResetBridges();
|
||||||
|
|
||||||
#endif /* BRIDGE_H */
|
#endif /* BRIDGE_H */
|
||||||
|
|
|
@ -383,9 +383,9 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
||||||
CommandCost ret = Command<CMD_BUILD_BRIDGE>::Do(CommandFlagsToDCFlags(GetCommandFlags<CMD_BUILD_BRIDGE>()) | DoCommandFlag::QueryCost, end, start, transport_type, 0, road_rail_type);
|
CommandCost ret = Command<CMD_BUILD_BRIDGE>::Do(CommandFlagsToDCFlags(GetCommandFlags<CMD_BUILD_BRIDGE>()) | DoCommandFlag::QueryCost, end, start, transport_type, 0, road_rail_type);
|
||||||
|
|
||||||
GUIBridgeList bl;
|
GUIBridgeList bl;
|
||||||
if (ret.Failed()) {
|
if (ret.Failed()) errmsg = ret.GetErrorMessage();
|
||||||
errmsg = ret.GetErrorMessage();
|
bool query_per_bridge_type = errmsg == STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION;
|
||||||
} else {
|
if (ret.Succeeded() || query_per_bridge_type) {
|
||||||
/* check which bridges can be built */
|
/* check which bridges can be built */
|
||||||
const uint tot_bridgedata_len = CalcBridgeLenCostFactor(bridge_len + 2);
|
const uint tot_bridgedata_len = CalcBridgeLenCostFactor(bridge_len + 2);
|
||||||
|
|
||||||
|
@ -415,11 +415,13 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
||||||
}
|
}
|
||||||
|
|
||||||
bool any_available = false;
|
bool any_available = false;
|
||||||
|
StringID type_errmsg = INVALID_STRING_ID;
|
||||||
CommandCost type_check;
|
CommandCost type_check;
|
||||||
/* loop for all bridgetypes */
|
/* loop for all bridgetypes */
|
||||||
for (BridgeType brd_type = 0; brd_type != MAX_BRIDGES; brd_type++) {
|
for (BridgeType brd_type = 0; brd_type != MAX_BRIDGES; brd_type++) {
|
||||||
type_check = CheckBridgeAvailability(brd_type, bridge_len);
|
type_check = CheckBridgeAvailability(brd_type, bridge_len);
|
||||||
if (type_check.Succeeded()) {
|
if (type_check.Succeeded()) {
|
||||||
|
if (query_per_bridge_type && Command<CMD_BUILD_BRIDGE>::Do(CommandFlagsToDCFlags(GetCommandFlags<CMD_BUILD_BRIDGE>()) | DoCommandFlag::QueryCost, end, start, transport_type, brd_type, road_rail_type).Failed()) continue;
|
||||||
/* bridge is accepted, add to list */
|
/* bridge is accepted, add to list */
|
||||||
BuildBridgeData &item = bl.emplace_back();
|
BuildBridgeData &item = bl.emplace_back();
|
||||||
item.index = brd_type;
|
item.index = brd_type;
|
||||||
|
@ -428,13 +430,12 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
||||||
* bridge itself (not computed with DoCommandFlag::QueryCost) */
|
* bridge itself (not computed with DoCommandFlag::QueryCost) */
|
||||||
item.cost = ret.GetCost() + (((int64_t)tot_bridgedata_len * _price[PR_BUILD_BRIDGE] * item.spec->price) >> 8) + infra_cost;
|
item.cost = ret.GetCost() + (((int64_t)tot_bridgedata_len * _price[PR_BUILD_BRIDGE] * item.spec->price) >> 8) + infra_cost;
|
||||||
any_available = true;
|
any_available = true;
|
||||||
|
} else if (type_check.GetErrorMessage() != INVALID_STRING_ID && !query_per_bridge_type) {
|
||||||
|
type_errmsg = type_check.GetErrorMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* give error cause if no bridges available here*/
|
/* give error cause if no bridges available here*/
|
||||||
if (!any_available)
|
if (!any_available && type_errmsg != INVALID_STRING_ID) errmsg = type_errmsg;
|
||||||
{
|
|
||||||
errmsg = type_check.GetErrorMessage();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bl.empty()) {
|
if (!bl.empty()) {
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* This file is part of OpenTTD.
|
||||||
|
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||||
|
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @file bridge_type.h Header file for bridge types. */
|
||||||
|
|
||||||
|
#ifndef BRIDGE_TYPE_H
|
||||||
|
#define BRIDGE_TYPE_H
|
||||||
|
|
||||||
|
#include "core/enum_type.hpp"
|
||||||
|
|
||||||
|
using BridgeType = uint; ///< Bridge spec number.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This enum is related to the definition of bridge pieces,
|
||||||
|
* which is used to determine the proper sprite table to use
|
||||||
|
* while drawing a given bridge part.
|
||||||
|
*/
|
||||||
|
enum BridgePieces : uint8_t {
|
||||||
|
BRIDGE_PIECE_NORTH = 0,
|
||||||
|
BRIDGE_PIECE_SOUTH,
|
||||||
|
BRIDGE_PIECE_INNER_NORTH,
|
||||||
|
BRIDGE_PIECE_INNER_SOUTH,
|
||||||
|
BRIDGE_PIECE_MIDDLE_ODD,
|
||||||
|
BRIDGE_PIECE_MIDDLE_EVEN,
|
||||||
|
BRIDGE_PIECE_HEAD,
|
||||||
|
NUM_BRIDGE_PIECES,
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_INCREMENT_DECREMENT_OPERATORS(BridgePieces)
|
||||||
|
|
||||||
|
enum class BridgePillarFlag : uint8_t {
|
||||||
|
CornerW = 0,
|
||||||
|
CornerS = 1,
|
||||||
|
CornerE = 2,
|
||||||
|
CornerN = 3,
|
||||||
|
EdgeNE = 4,
|
||||||
|
EdgeSE = 5,
|
||||||
|
EdgeSW = 6,
|
||||||
|
EdgeNW = 7,
|
||||||
|
};
|
||||||
|
using BridgePillarFlags = EnumBitSet<BridgePillarFlag, uint8_t>;
|
||||||
|
|
||||||
|
static constexpr BridgePillarFlags BRIDGEPILLARFLAGS_ALL{
|
||||||
|
BridgePillarFlag::CornerW, BridgePillarFlag::CornerS, BridgePillarFlag::CornerE, BridgePillarFlag::CornerN,
|
||||||
|
BridgePillarFlag::EdgeNE, BridgePillarFlag::EdgeSE, BridgePillarFlag::EdgeSW, BridgePillarFlag::EdgeNW,
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* BRIDGE_TYPE_H */
|
|
@ -152,7 +152,7 @@ static void DrawTile_Clear(TileInfo *ti)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawBridgeMiddle(ti);
|
DrawBridgeMiddle(ti, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetSlopePixelZ_Clear(TileIndex tile, uint x, uint y, bool)
|
static int GetSlopePixelZ_Clear(TileIndex tile, uint x, uint y, bool)
|
||||||
|
@ -390,6 +390,11 @@ static CommandCost TerraformTile_Clear(TileIndex tile, DoCommandFlags flags, int
|
||||||
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost CheckBuildAbove_Clear(TileIndex, DoCommandFlags, Axis, int)
|
||||||
|
{
|
||||||
|
return CommandCost();
|
||||||
|
}
|
||||||
|
|
||||||
extern const TileTypeProcs _tile_type_clear_procs = {
|
extern const TileTypeProcs _tile_type_clear_procs = {
|
||||||
DrawTile_Clear, ///< draw_tile_proc
|
DrawTile_Clear, ///< draw_tile_proc
|
||||||
GetSlopePixelZ_Clear, ///< get_slope_z_proc
|
GetSlopePixelZ_Clear, ///< get_slope_z_proc
|
||||||
|
@ -405,4 +410,5 @@ extern const TileTypeProcs _tile_type_clear_procs = {
|
||||||
nullptr, ///< vehicle_enter_tile_proc
|
nullptr, ///< vehicle_enter_tile_proc
|
||||||
GetFoundation_Clear, ///< get_foundation_proc
|
GetFoundation_Clear, ///< get_foundation_proc
|
||||||
TerraformTile_Clear, ///< terraform_tile_proc
|
TerraformTile_Clear, ///< terraform_tile_proc
|
||||||
|
CheckBuildAbove_Clear, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -3205,6 +3205,7 @@ extern const TileTypeProcs _tile_type_industry_procs = {
|
||||||
nullptr, // vehicle_enter_tile_proc
|
nullptr, // vehicle_enter_tile_proc
|
||||||
GetFoundation_Industry, // get_foundation_proc
|
GetFoundation_Industry, // get_foundation_proc
|
||||||
TerraformTile_Industry, // terraform_tile_proc
|
TerraformTile_Industry, // terraform_tile_proc
|
||||||
|
nullptr, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
||||||
bool IndustryCompare::operator() (const IndustryListEntry &lhs, const IndustryListEntry &rhs) const
|
bool IndustryCompare::operator() (const IndustryListEntry &lhs, const IndustryListEntry &rhs) const
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -5244,6 +5244,7 @@ STR_ERROR_START_AND_END_MUST_BE_IN :{WHITE}Start an
|
||||||
STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH :{WHITE}... ends of bridge must both be on land
|
STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH :{WHITE}... ends of bridge must both be on land
|
||||||
STR_ERROR_BRIDGE_TOO_LONG :{WHITE}... bridge too long
|
STR_ERROR_BRIDGE_TOO_LONG :{WHITE}... bridge too long
|
||||||
STR_ERROR_BRIDGE_THROUGH_MAP_BORDER :{WHITE}Bridge would end out of the map
|
STR_ERROR_BRIDGE_THROUGH_MAP_BORDER :{WHITE}Bridge would end out of the map
|
||||||
|
STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION :{WHITE}Bridge is too low for station
|
||||||
|
|
||||||
# Tunnel related errors
|
# Tunnel related errors
|
||||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :{WHITE}Can't build tunnel here...
|
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :{WHITE}Can't build tunnel here...
|
||||||
|
|
|
@ -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)) {
|
||||||
|
|
|
@ -93,6 +93,7 @@ static ChangeInfoResult BridgeChangeInfo(uint first, uint last, int prop, ByteRe
|
||||||
MapSpriteMappingRecolour(&bridge->sprite_table[tableid][sprite]);
|
MapSpriteMappingRecolour(&bridge->sprite_table[tableid][sprite]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!bridge->ctrl_flags.Test(BridgeSpecCtrlFlag::CustomPillarFlags)) bridge->ctrl_flags.Set(BridgeSpecCtrlFlag::InvalidPillarFlags);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +121,20 @@ static ChangeInfoResult BridgeChangeInfo(uint first, uint last, int prop, ByteRe
|
||||||
bridge->price = buf.ReadWord();
|
bridge->price = buf.ReadWord();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x14:
|
||||||
|
buf.ReadWord();
|
||||||
|
buf.ReadWord();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x15: // Pillars
|
||||||
|
for (uint j = 0; j != 6; ++j) {
|
||||||
|
bridge->pillar_flags[j][AXIS_X] = BridgePillarFlags{buf.ReadByte()};
|
||||||
|
bridge->pillar_flags[j][AXIS_Y] = BridgePillarFlags{buf.ReadByte()};
|
||||||
|
}
|
||||||
|
bridge->ctrl_flags.Reset(BridgeSpecCtrlFlag::InvalidPillarFlags);
|
||||||
|
bridge->ctrl_flags.Set(BridgeSpecCtrlFlag::CustomPillarFlags);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret = CIR_UNKNOWN;
|
ret = CIR_UNKNOWN;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -49,6 +49,13 @@ static ChangeInfoResult IgnoreRoadStopProperty(uint prop, ByteReader &buf)
|
||||||
buf.ReadDWord();
|
buf.ReadDWord();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x13:
|
||||||
|
case 0x14:
|
||||||
|
buf.ReadWord();
|
||||||
|
buf.ReadWord();
|
||||||
|
buf.ReadWord();
|
||||||
|
break;
|
||||||
|
|
||||||
case 0x16: // Badge list
|
case 0x16: // Badge list
|
||||||
SkipBadgeList(buf);
|
SkipBadgeList(buf);
|
||||||
break;
|
break;
|
||||||
|
@ -134,6 +141,18 @@ static ChangeInfoResult RoadStopChangeInfo(uint first, uint last, int prop, Byte
|
||||||
rs->flags = static_cast<RoadStopSpecFlags>(buf.ReadDWord()); // Future-proofing, size this as 4 bytes, but we only need two byte's worth of flags at present
|
rs->flags = static_cast<RoadStopSpecFlags>(buf.ReadDWord()); // Future-proofing, size this as 4 bytes, but we only need two byte's worth of flags at present
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x13: // Bridge height.
|
||||||
|
for (uint j = 0; j != 6; ++j) {
|
||||||
|
rs->tilespecs[j].height = buf.ReadByte();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x14: // Disallow pillars.
|
||||||
|
for (uint j = 0; j != 6; ++j) {
|
||||||
|
rs->tilespecs[j].disallowed_pillars = BridgePillarFlags{buf.ReadByte()};
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 0x15: // Cost multipliers
|
case 0x15: // Cost multipliers
|
||||||
rs->build_cost_multiplier = buf.ReadByte();
|
rs->build_cost_multiplier = buf.ReadByte();
|
||||||
rs->clear_cost_multiplier = buf.ReadByte();
|
rs->clear_cost_multiplier = buf.ReadByte();
|
||||||
|
|
|
@ -184,12 +184,12 @@ static ChangeInfoResult StationChangeInfo(uint first, uint last, int prop, ByteR
|
||||||
|
|
||||||
case 0x11: { // Pylon placement
|
case 0x11: { // Pylon placement
|
||||||
uint8_t pylons = buf.ReadByte();
|
uint8_t pylons = buf.ReadByte();
|
||||||
if (statspec->tileflags.size() < 8) statspec->tileflags.resize(8);
|
if (statspec->tilespecs.size() < 8) statspec->tilespecs.resize(8);
|
||||||
for (int j = 0; j < 8; ++j) {
|
for (int j = 0; j < 8; ++j) {
|
||||||
if (HasBit(pylons, j)) {
|
if (HasBit(pylons, j)) {
|
||||||
statspec->tileflags[j].Set(StationSpec::TileFlag::Pylons);
|
statspec->tilespecs[j].flags.Set(StationSpec::TileFlag::Pylons);
|
||||||
} else {
|
} else {
|
||||||
statspec->tileflags[j].Reset(StationSpec::TileFlag::Pylons);
|
statspec->tilespecs[j].flags.Reset(StationSpec::TileFlag::Pylons);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -209,12 +209,12 @@ static ChangeInfoResult StationChangeInfo(uint first, uint last, int prop, ByteR
|
||||||
|
|
||||||
case 0x14: { // Overhead wire placement
|
case 0x14: { // Overhead wire placement
|
||||||
uint8_t wires = buf.ReadByte();
|
uint8_t wires = buf.ReadByte();
|
||||||
if (statspec->tileflags.size() < 8) statspec->tileflags.resize(8);
|
if (statspec->tilespecs.size() < 8) statspec->tilespecs.resize(8);
|
||||||
for (int j = 0; j < 8; ++j) {
|
for (int j = 0; j < 8; ++j) {
|
||||||
if (HasBit(wires, j)) {
|
if (HasBit(wires, j)) {
|
||||||
statspec->tileflags[j].Set(StationSpec::TileFlag::NoWires);
|
statspec->tilespecs[j].flags.Set(StationSpec::TileFlag::NoWires);
|
||||||
} else {
|
} else {
|
||||||
statspec->tileflags[j].Reset(StationSpec::TileFlag::NoWires);
|
statspec->tilespecs[j].flags.Reset(StationSpec::TileFlag::NoWires);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -222,12 +222,12 @@ static ChangeInfoResult StationChangeInfo(uint first, uint last, int prop, ByteR
|
||||||
|
|
||||||
case 0x15: { // Blocked tiles
|
case 0x15: { // Blocked tiles
|
||||||
uint8_t blocked = buf.ReadByte();
|
uint8_t blocked = buf.ReadByte();
|
||||||
if (statspec->tileflags.size() < 8) statspec->tileflags.resize(8);
|
if (statspec->tilespecs.size() < 8) statspec->tilespecs.resize(8);
|
||||||
for (int j = 0; j < 8; ++j) {
|
for (int j = 0; j < 8; ++j) {
|
||||||
if (HasBit(blocked, j)) {
|
if (HasBit(blocked, j)) {
|
||||||
statspec->tileflags[j].Set(StationSpec::TileFlag::Blocked);
|
statspec->tilespecs[j].flags.Set(StationSpec::TileFlag::Blocked);
|
||||||
} else {
|
} else {
|
||||||
statspec->tileflags[j].Reset(StationSpec::TileFlag::Blocked);
|
statspec->tilespecs[j].flags.Reset(StationSpec::TileFlag::Blocked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -268,11 +268,11 @@ static ChangeInfoResult StationChangeInfo(uint first, uint last, int prop, ByteR
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 0x1B: // Minimum bridge height (not implemented)
|
case 0x1B: // Minimum bridge height (old variable)
|
||||||
buf.ReadWord();
|
if (statspec->tilespecs.size() < 8) statspec->tilespecs.resize(8);
|
||||||
buf.ReadWord();
|
for (int j = 0; j < 8; ++j) {
|
||||||
buf.ReadWord();
|
statspec->tilespecs[j].height = buf.ReadByte();
|
||||||
buf.ReadWord();
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x1C: // Station Name
|
case 0x1C: // Station Name
|
||||||
|
@ -285,8 +285,10 @@ static ChangeInfoResult StationChangeInfo(uint first, uint last, int prop, ByteR
|
||||||
|
|
||||||
case 0x1E: { // Extended tile flags (replaces prop 11, 14 and 15)
|
case 0x1E: { // Extended tile flags (replaces prop 11, 14 and 15)
|
||||||
uint16_t tiles = buf.ReadExtendedByte();
|
uint16_t tiles = buf.ReadExtendedByte();
|
||||||
auto flags = reinterpret_cast<const StationSpec::TileFlags *>(buf.ReadBytes(tiles));
|
if (statspec->tilespecs.size() < tiles) statspec->tilespecs.resize(tiles);
|
||||||
statspec->tileflags.assign(flags, flags + tiles);
|
for (uint j = 0; j != tiles; ++j) {
|
||||||
|
statspec->tilespecs[j].flags = StationSpec::TileFlags{buf.ReadByte()};
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,6 +296,24 @@ static ChangeInfoResult StationChangeInfo(uint first, uint last, int prop, ByteR
|
||||||
statspec->badges = ReadBadgeList(buf, GSF_STATIONS);
|
statspec->badges = ReadBadgeList(buf, GSF_STATIONS);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x20: { // Minimum bridge height (extended)
|
||||||
|
uint16_t tiles = buf.ReadExtendedByte();
|
||||||
|
if (statspec->tilespecs.size() < tiles) statspec->tilespecs.resize(tiles);
|
||||||
|
for (int j = 0; j != tiles; ++j) {
|
||||||
|
statspec->tilespecs[j].height = buf.ReadByte();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 0x21: { // Disallowed bridge pillars
|
||||||
|
uint16_t tiles = buf.ReadExtendedByte();
|
||||||
|
if (statspec->tilespecs.size() < tiles) statspec->tilespecs.resize(tiles);
|
||||||
|
for (int j = 0; j != tiles; ++j) {
|
||||||
|
statspec->tilespecs[j].disallowed_pillars = BridgePillarFlags{buf.ReadByte()};
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret = CIR_UNKNOWN;
|
ret = CIR_UNKNOWN;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#ifndef NEWGRF_ROADSTATION_H
|
#ifndef NEWGRF_ROADSTATION_H
|
||||||
#define NEWGRF_ROADSTATION_H
|
#define NEWGRF_ROADSTATION_H
|
||||||
|
|
||||||
|
#include "bridge_type.h"
|
||||||
#include "newgrf_animation_type.h"
|
#include "newgrf_animation_type.h"
|
||||||
#include "newgrf_spritegroup.h"
|
#include "newgrf_spritegroup.h"
|
||||||
#include "newgrf_badge_type.h"
|
#include "newgrf_badge_type.h"
|
||||||
|
@ -138,12 +139,17 @@ struct RoadStopSpec : NewGRFSpecBase<RoadStopClassID> {
|
||||||
|
|
||||||
AnimationInfo<StationAnimationTriggers> animation;
|
AnimationInfo<StationAnimationTriggers> animation;
|
||||||
|
|
||||||
uint8_t bridge_height[6]; ///< Minimum height for a bridge above, 0 for none
|
struct TileSpec {
|
||||||
uint8_t bridge_disallowed_pillars[6]; ///< Disallowed pillar flags for a bridge above
|
uint8_t height = 0; ///< Minimum height for a bridge above, 0 for none
|
||||||
|
BridgePillarFlags disallowed_pillars = BRIDGEPILLARFLAGS_ALL; ///< Disallowed pillar flags for a bridge above
|
||||||
|
};
|
||||||
|
std::array<TileSpec, 6> tilespecs{}; ///< Per tile information.
|
||||||
|
|
||||||
uint8_t build_cost_multiplier = 16; ///< Build cost multiplier per tile.
|
uint8_t build_cost_multiplier = 16; ///< Build cost multiplier per tile.
|
||||||
uint8_t clear_cost_multiplier = 16; ///< Clear cost multiplier per tile.
|
uint8_t clear_cost_multiplier = 16; ///< Clear cost multiplier per tile.
|
||||||
|
|
||||||
|
uint8_t height; ///< The height of this structure, in heightlevels; max MAX_TILE_HEIGHT.
|
||||||
|
|
||||||
std::vector<BadgeID> badges;
|
std::vector<BadgeID> badges;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#ifndef NEWGRF_STATION_H
|
#ifndef NEWGRF_STATION_H
|
||||||
#define NEWGRF_STATION_H
|
#define NEWGRF_STATION_H
|
||||||
|
|
||||||
|
#include "bridge_type.h"
|
||||||
#include "core/enum_type.hpp"
|
#include "core/enum_type.hpp"
|
||||||
#include "newgrf_animation_type.h"
|
#include "newgrf_animation_type.h"
|
||||||
#include "newgrf_badge_type.h"
|
#include "newgrf_badge_type.h"
|
||||||
|
@ -168,7 +169,13 @@ struct StationSpec : NewGRFSpecBase<StationClassID> {
|
||||||
Blocked = 2, ///< Tile is blocked to vehicles.
|
Blocked = 2, ///< Tile is blocked to vehicles.
|
||||||
};
|
};
|
||||||
using TileFlags = EnumBitSet<TileFlag, uint8_t>;
|
using TileFlags = EnumBitSet<TileFlag, uint8_t>;
|
||||||
std::vector<TileFlags> tileflags; ///< List of tile flags.
|
|
||||||
|
struct TileSpec {
|
||||||
|
TileFlags flags{}; ///< Tile flags.
|
||||||
|
uint8_t height = 0; ///< Minimum height for a bridge above, 0 for none
|
||||||
|
BridgePillarFlags disallowed_pillars = BRIDGEPILLARFLAGS_ALL; ///< Disallowed pillar flags for a bridge above
|
||||||
|
};
|
||||||
|
std::vector<TileSpec> tilespecs; ///< Per-layout-tile information.
|
||||||
|
|
||||||
AnimationInfo<StationAnimationTriggers> animation;
|
AnimationInfo<StationAnimationTriggers> animation;
|
||||||
|
|
||||||
|
|
|
@ -483,7 +483,7 @@ static void DrawTile_Object(TileInfo *ti)
|
||||||
DrawNewObjectTile(ti, spec);
|
DrawNewObjectTile(ti, spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawBridgeMiddle(ti);
|
DrawBridgeMiddle(ti, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetSlopePixelZ_Object(TileIndex tile, uint x, uint y, bool)
|
static int GetSlopePixelZ_Object(TileIndex tile, uint x, uint y, bool)
|
||||||
|
@ -929,6 +929,16 @@ static CommandCost TerraformTile_Object(TileIndex tile, DoCommandFlags flags, in
|
||||||
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost CheckBuildAbove_Object(TileIndex tile, DoCommandFlags flags, Axis, int height)
|
||||||
|
{
|
||||||
|
const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
|
||||||
|
if (spec->flags.Test(ObjectFlag::AllowUnderBridge) && GetTileMaxZ(tile) + spec->height <= height) {
|
||||||
|
return CommandCost();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
|
}
|
||||||
|
|
||||||
extern const TileTypeProcs _tile_type_object_procs = {
|
extern const TileTypeProcs _tile_type_object_procs = {
|
||||||
DrawTile_Object, // draw_tile_proc
|
DrawTile_Object, // draw_tile_proc
|
||||||
GetSlopePixelZ_Object, // get_slope_z_proc
|
GetSlopePixelZ_Object, // get_slope_z_proc
|
||||||
|
@ -944,4 +954,5 @@ extern const TileTypeProcs _tile_type_object_procs = {
|
||||||
nullptr, // vehicle_enter_tile_proc
|
nullptr, // vehicle_enter_tile_proc
|
||||||
GetFoundation_Object, // get_foundation_proc
|
GetFoundation_Object, // get_foundation_proc
|
||||||
TerraformTile_Object, // terraform_tile_proc
|
TerraformTile_Object, // terraform_tile_proc
|
||||||
|
CheckBuildAbove_Object, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2525,7 +2525,7 @@ static void DrawTile_Track(TileInfo *ti)
|
||||||
|
|
||||||
DrawRailTileSeq(ti, dts, TO_BUILDINGS, relocation, 0, _drawtile_track_palette);
|
DrawRailTileSeq(ti, dts, TO_BUILDINGS, relocation, 0, _drawtile_track_palette);
|
||||||
}
|
}
|
||||||
DrawBridgeMiddle(ti);
|
DrawBridgeMiddle(ti, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawTrainDepotSprite(int x, int y, int dir, RailType railtype)
|
void DrawTrainDepotSprite(int x, int y, int dir, RailType railtype)
|
||||||
|
@ -3070,6 +3070,11 @@ static CommandCost TerraformTile_Track(TileIndex tile, DoCommandFlags flags, int
|
||||||
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost CheckBuildAbove_Track(TileIndex tile, DoCommandFlags flags, Axis, int)
|
||||||
|
{
|
||||||
|
if (IsPlainRail(tile)) return CommandCost();
|
||||||
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
|
}
|
||||||
|
|
||||||
extern const TileTypeProcs _tile_type_rail_procs = {
|
extern const TileTypeProcs _tile_type_rail_procs = {
|
||||||
DrawTile_Track, // draw_tile_proc
|
DrawTile_Track, // draw_tile_proc
|
||||||
|
@ -3086,4 +3091,5 @@ extern const TileTypeProcs _tile_type_rail_procs = {
|
||||||
VehicleEnter_Track, // vehicle_enter_tile_proc
|
VehicleEnter_Track, // vehicle_enter_tile_proc
|
||||||
GetFoundation_Track, // get_foundation_proc
|
GetFoundation_Track, // get_foundation_proc
|
||||||
TerraformTile_Track, // terraform_tile_proc
|
TerraformTile_Track, // terraform_tile_proc
|
||||||
|
CheckBuildAbove_Track, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1858,7 +1858,7 @@ static void DrawTile_Road(TileInfo *ti)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DrawBridgeMiddle(ti);
|
DrawBridgeMiddle(ti, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2616,6 +2616,11 @@ CommandCost CmdConvertRoad(DoCommandFlags flags, TileIndex tile, TileIndex area_
|
||||||
return found_convertible_road ? cost : error;
|
return found_convertible_road ? cost : error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost CheckBuildAbove_Road(TileIndex tile, DoCommandFlags flags, Axis, int)
|
||||||
|
{
|
||||||
|
if (!IsRoadDepot(tile)) return CommandCost();
|
||||||
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
|
}
|
||||||
|
|
||||||
/** Tile callback functions for road tiles */
|
/** Tile callback functions for road tiles */
|
||||||
extern const TileTypeProcs _tile_type_road_procs = {
|
extern const TileTypeProcs _tile_type_road_procs = {
|
||||||
|
@ -2633,4 +2638,5 @@ extern const TileTypeProcs _tile_type_road_procs = {
|
||||||
VehicleEnter_Road, // vehicle_enter_tile_proc
|
VehicleEnter_Road, // vehicle_enter_tile_proc
|
||||||
GetFoundation_Road, // get_foundation_proc
|
GetFoundation_Road, // get_foundation_proc
|
||||||
TerraformTile_Road, // terraform_tile_proc
|
TerraformTile_Road, // terraform_tile_proc
|
||||||
|
CheckBuildAbove_Road, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -406,6 +406,7 @@ enum SaveLoadVersion : uint16_t {
|
||||||
SLV_FACE_STYLES, ///< 355 PR#14319 Addition of face styles, replacing gender and ethnicity.
|
SLV_FACE_STYLES, ///< 355 PR#14319 Addition of face styles, replacing gender and ethnicity.
|
||||||
SLV_INDUSTRY_NUM_VALID_HISTORY, ///< 356 PR#14416 Store number of valid history records for industries.
|
SLV_INDUSTRY_NUM_VALID_HISTORY, ///< 356 PR#14416 Store number of valid history records for industries.
|
||||||
SLV_INDUSTRY_ACCEPTED_HISTORY, ///< 357 PR#14321 Add per-industry history of cargo delivered and waiting.
|
SLV_INDUSTRY_ACCEPTED_HISTORY, ///< 357 PR#14321 Add per-industry history of cargo delivered and waiting.
|
||||||
|
SLV_STATIONS_UNDER_BRIDGES, ///< 358 PR#14477 Allow stations under bridges.
|
||||||
|
|
||||||
SL_MAX_VERSION, ///< Highest possible saveload version
|
SL_MAX_VERSION, ///< Highest possible saveload version
|
||||||
};
|
};
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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" };
|
||||||
|
|
||||||
|
|
|
@ -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 */
|
||||||
|
|
|
@ -77,6 +77,8 @@
|
||||||
|
|
||||||
#include "safeguards.h"
|
#include "safeguards.h"
|
||||||
|
|
||||||
|
static StationSpec::TileFlags GetStationTileFlags(StationGfx gfx, const StationSpec *statspec);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Static instance of FlowStat::SharesMap.
|
* Static instance of FlowStat::SharesMap.
|
||||||
* Note: This instance is created on task start.
|
* Note: This instance is created on task start.
|
||||||
|
@ -864,6 +866,29 @@ static CommandCost CheckFlatLandAirport(AirportTileTableIterator tile_iter, DoCo
|
||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost IsRailStationBridgeAboveOk(TileIndex tile, const StationSpec *statspec, uint8_t layout, int bridge_height)
|
||||||
|
{
|
||||||
|
if (statspec == nullptr) {
|
||||||
|
/* Default stations/waypoints */
|
||||||
|
int height_above = layout < 4 ? 2 : 5;
|
||||||
|
if (GetTileMaxZ(tile) + height_above > bridge_height) return CommandCost(STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION);
|
||||||
|
} else {
|
||||||
|
int height_above = layout < std::size(statspec->tilespecs) ? statspec->tilespecs[layout].height : 0;
|
||||||
|
if (height_above == 0) return CommandCost(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
||||||
|
if (GetTileMaxZ(tile) + height_above > bridge_height) return CommandCost(STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION);
|
||||||
|
}
|
||||||
|
|
||||||
|
return CommandCost();
|
||||||
|
}
|
||||||
|
|
||||||
|
CommandCost IsRailStationBridgeAboveOk(TileIndex tile, const StationSpec *statspec, uint8_t layout)
|
||||||
|
{
|
||||||
|
if (!IsBridgeAbove(tile)) return CommandCost();
|
||||||
|
|
||||||
|
TileIndex rampsouth = GetSouthernBridgeEnd(tile);
|
||||||
|
return IsRailStationBridgeAboveOk(tile, statspec, layout, GetBridgeHeight(rampsouth));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a rail station can be built at the given tile.
|
* Checks if a rail station can be built at the given tile.
|
||||||
* @param tile_cur Tile to check.
|
* @param tile_cur Tile to check.
|
||||||
|
@ -888,7 +913,7 @@ static CommandCost CheckFlatLandRailStation(TileIndex tile_cur, TileIndex north_
|
||||||
const StationSpec *statspec = StationClass::Get(spec_class)->GetSpec(spec_index);
|
const StationSpec *statspec = StationClass::Get(spec_class)->GetSpec(spec_index);
|
||||||
bool slope_cb = statspec != nullptr && statspec->callback_mask.Test(StationCallbackMask::SlopeCheck);
|
bool slope_cb = statspec != nullptr && statspec->callback_mask.Test(StationCallbackMask::SlopeCheck);
|
||||||
|
|
||||||
CommandCost ret = CheckBuildableTile(tile_cur, invalid_dirs, allowed_z, false);
|
CommandCost ret = CheckBuildableTile(tile_cur, invalid_dirs, allowed_z, false, false);
|
||||||
if (ret.Failed()) return ret;
|
if (ret.Failed()) return ret;
|
||||||
cost.AddCost(ret.GetCost());
|
cost.AddCost(ret.GetCost());
|
||||||
|
|
||||||
|
@ -949,6 +974,33 @@ static CommandCost CheckFlatLandRailStation(TileIndex tile_cur, TileIndex north_
|
||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost IsRoadStopBridgeAboveOk(TileIndex tile, const RoadStopSpec *spec, bool drive_through, DiagDirection entrance, int bridge_height)
|
||||||
|
{
|
||||||
|
uint layout = drive_through ? (GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + DiagDirToAxis(entrance)) : entrance;
|
||||||
|
|
||||||
|
if (spec == nullptr) {
|
||||||
|
if (GetTileMaxZ(tile) + (drive_through ? 1 : 2) > bridge_height) {
|
||||||
|
return CommandCost(STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int height = spec->tilespecs[layout].height;
|
||||||
|
if (height == 0) return CommandCost(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
||||||
|
if (GetTileMaxZ(tile) + height > bridge_height) {
|
||||||
|
return CommandCost(STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return CommandCost();
|
||||||
|
}
|
||||||
|
|
||||||
|
static CommandCost IsRoadStopBridgeAboveOk(TileIndex tile, const RoadStopSpec *spec, bool drive_through, DiagDirection entrance)
|
||||||
|
{
|
||||||
|
if (!IsBridgeAbove(tile)) return CommandCost();
|
||||||
|
|
||||||
|
TileIndex rampsouth = GetSouthernBridgeEnd(tile);
|
||||||
|
return IsRoadStopBridgeAboveOk(tile, spec, drive_through, entrance, GetBridgeHeight(rampsouth));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a road stop can be built at the given tile.
|
* Checks if a road stop can be built at the given tile.
|
||||||
* @param cur_tile Tile to check.
|
* @param cur_tile Tile to check.
|
||||||
|
@ -962,14 +1014,17 @@ static CommandCost CheckFlatLandRailStation(TileIndex tile_cur, TileIndex north_
|
||||||
* @param rt Road type to build, may be INVALID_ROADTYPE if an existing road is required.
|
* @param rt Road type to build, may be INVALID_ROADTYPE if an existing road is required.
|
||||||
* @return The cost in case of success, or an error code if it failed.
|
* @return The cost in case of success, or an error code if it failed.
|
||||||
*/
|
*/
|
||||||
static CommandCost CheckFlatLandRoadStop(TileIndex cur_tile, int &allowed_z, DoCommandFlags flags, DiagDirections invalid_dirs, bool is_drive_through, StationType station_type, Axis axis, StationID *station, RoadType rt)
|
static CommandCost CheckFlatLandRoadStop(TileIndex cur_tile, int &allowed_z, const RoadStopSpec *spec, DoCommandFlags flags, DiagDirections invalid_dirs, bool is_drive_through, StationType station_type, Axis axis, StationID *station, RoadType rt)
|
||||||
{
|
{
|
||||||
CommandCost cost(EXPENSES_CONSTRUCTION);
|
CommandCost cost(EXPENSES_CONSTRUCTION);
|
||||||
|
|
||||||
CommandCost ret = CheckBuildableTile(cur_tile, invalid_dirs, allowed_z, !is_drive_through);
|
CommandCost ret = CheckBuildableTile(cur_tile, invalid_dirs, allowed_z, !is_drive_through, false);
|
||||||
if (ret.Failed()) return ret;
|
if (ret.Failed()) return ret;
|
||||||
cost.AddCost(ret.GetCost());
|
cost.AddCost(ret.GetCost());
|
||||||
|
|
||||||
|
ret = IsRoadStopBridgeAboveOk(cur_tile, spec, is_drive_through, DiagDirection{FindFirstBit(invalid_dirs.base())});
|
||||||
|
if (ret.Failed()) return ret;
|
||||||
|
|
||||||
/* If station is set, then we have special handling to allow building on top of already existing stations.
|
/* If station is set, then we have special handling to allow building on top of already existing stations.
|
||||||
* Station points to StationID::Invalid() if we can build on any station.
|
* Station points to StationID::Invalid() if we can build on any station.
|
||||||
* Or it points to a station if we're only allowed to build on exactly that station. */
|
* Or it points to a station if we're only allowed to build on exactly that station. */
|
||||||
|
@ -1307,8 +1362,8 @@ static CommandCost CalculateRailStationCost(TileArea tile_area, DoCommandFlags f
|
||||||
static StationSpec::TileFlags GetStationTileFlags(StationGfx gfx, const StationSpec *statspec)
|
static StationSpec::TileFlags GetStationTileFlags(StationGfx gfx, const StationSpec *statspec)
|
||||||
{
|
{
|
||||||
/* Default stations do not draw pylons under roofs (gfx >= 4) */
|
/* Default stations do not draw pylons under roofs (gfx >= 4) */
|
||||||
if (statspec == nullptr || gfx >= statspec->tileflags.size()) return gfx < 4 ? StationSpec::TileFlag::Pylons : StationSpec::TileFlags{};
|
if (statspec == nullptr || gfx >= statspec->tilespecs.size()) return gfx < 4 ? StationSpec::TileFlag::Pylons : StationSpec::TileFlags{};
|
||||||
return statspec->tileflags[gfx];
|
return statspec->tilespecs[gfx].flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1362,6 +1417,9 @@ CommandCost CmdBuildRailStation(DoCommandFlags flags, TileIndex tile_org, RailTy
|
||||||
w_org = numtracks;
|
w_org = numtracks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if the first tile and the last tile are valid */
|
||||||
|
if (!IsValidTile(tile_org) || TileAddWrap(tile_org, w_org - 1, h_org - 1) == INVALID_TILE) return CMD_ERROR;
|
||||||
|
|
||||||
bool reuse = (station_to_join != NEW_STATION);
|
bool reuse = (station_to_join != NEW_STATION);
|
||||||
if (!reuse) station_to_join = StationID::Invalid();
|
if (!reuse) station_to_join = StationID::Invalid();
|
||||||
bool distant_join = (station_to_join != StationID::Invalid());
|
bool distant_join = (station_to_join != StationID::Invalid());
|
||||||
|
@ -1392,8 +1450,29 @@ CommandCost CmdBuildRailStation(DoCommandFlags flags, TileIndex tile_org, RailTy
|
||||||
if (ret.Failed()) return ret;
|
if (ret.Failed()) return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we can allocate a custom stationspec to this station */
|
|
||||||
const StationSpec *statspec = StationClass::Get(spec_class)->GetSpec(spec_index);
|
const StationSpec *statspec = StationClass::Get(spec_class)->GetSpec(spec_index);
|
||||||
|
TileIndexDiff tile_delta = TileOffsByAxis(axis); // offset to go to the next platform tile
|
||||||
|
TileIndexDiff track_delta = TileOffsByAxis(OtherAxis(axis)); // offset to go to the next track
|
||||||
|
|
||||||
|
std::vector<uint8_t> layouts(numtracks * plat_len);
|
||||||
|
GetStationLayout(layouts.data(), numtracks, plat_len, statspec);
|
||||||
|
|
||||||
|
{
|
||||||
|
auto it = std::begin(layouts);
|
||||||
|
TileIndex tile_track = tile_org;
|
||||||
|
for (uint i = 0; i < numtracks; i++) {
|
||||||
|
TileIndex tile = tile_track;
|
||||||
|
for (uint j = 0; j < plat_len; j++) {
|
||||||
|
uint8_t layout = ((*it++) & ~1) + axis; // Adjust layout piece to match axis.
|
||||||
|
ret = IsRailStationBridgeAboveOk(tile, statspec, layout);
|
||||||
|
if (ret.Failed()) return ret;
|
||||||
|
tile += tile_delta;
|
||||||
|
}
|
||||||
|
tile_track += track_delta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check if we can allocate a custom stationspec to this station */
|
||||||
int specindex = AllocateSpecToStation(statspec, st, flags.Test(DoCommandFlag::Execute));
|
int specindex = AllocateSpecToStation(statspec, st, flags.Test(DoCommandFlag::Execute));
|
||||||
if (specindex == -1) return CommandCost(STR_ERROR_TOO_MANY_STATION_SPECS);
|
if (specindex == -1) return CommandCost(STR_ERROR_TOO_MANY_STATION_SPECS);
|
||||||
|
|
||||||
|
@ -1423,13 +1502,7 @@ CommandCost CmdBuildRailStation(DoCommandFlags flags, TileIndex tile_org, RailTy
|
||||||
st->cached_anim_triggers.Set(statspec->animation.triggers);
|
st->cached_anim_triggers.Set(statspec->animation.triggers);
|
||||||
}
|
}
|
||||||
|
|
||||||
TileIndexDiff tile_delta = TileOffsByAxis(axis); // offset to go to the next platform tile
|
|
||||||
TileIndexDiff track_delta = TileOffsByAxis(OtherAxis(axis)); // offset to go to the next track
|
|
||||||
Track track = AxisToTrack(axis);
|
Track track = AxisToTrack(axis);
|
||||||
|
|
||||||
std::vector<uint8_t> layouts(numtracks * plat_len);
|
|
||||||
GetStationLayout(layouts.data(), numtracks, plat_len, statspec);
|
|
||||||
|
|
||||||
uint8_t numtracks_orig = numtracks;
|
uint8_t numtracks_orig = numtracks;
|
||||||
|
|
||||||
Company *c = Company::Get(st->owner);
|
Company *c = Company::Get(st->owner);
|
||||||
|
@ -1440,6 +1513,7 @@ CommandCost CmdBuildRailStation(DoCommandFlags flags, TileIndex tile_org, RailTy
|
||||||
int w = plat_len;
|
int w = plat_len;
|
||||||
do {
|
do {
|
||||||
uint8_t layout = layouts[layout_idx++];
|
uint8_t layout = layouts[layout_idx++];
|
||||||
|
|
||||||
if (IsRailStationTile(tile) && HasStationReservation(tile)) {
|
if (IsRailStationTile(tile) && HasStationReservation(tile)) {
|
||||||
/* Check for trains having a reservation for this tile. */
|
/* Check for trains having a reservation for this tile. */
|
||||||
Train *v = GetTrainForReservation(tile, AxisToTrack(GetRailStationAxis(tile)));
|
Train *v = GetTrainForReservation(tile, AxisToTrack(GetRailStationAxis(tile)));
|
||||||
|
@ -1913,7 +1987,7 @@ static CommandCost FindJoiningRoadStop(StationID existing_stop, StationID statio
|
||||||
* @param unit_cost The cost to build one road stop of the current type.
|
* @param unit_cost The cost to build one road stop of the current type.
|
||||||
* @return The cost in case of success, or an error code if it failed.
|
* @return The cost in case of success, or an error code if it failed.
|
||||||
*/
|
*/
|
||||||
CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool is_drive_through, StationType station_type, Axis axis, DiagDirection ddir, StationID *est, RoadType rt, Money unit_cost)
|
CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool is_drive_through, StationType station_type, const RoadStopSpec *roadstopspec, Axis axis, DiagDirection ddir, StationID *est, RoadType rt, Money unit_cost)
|
||||||
{
|
{
|
||||||
DiagDirections invalid_dirs{};
|
DiagDirections invalid_dirs{};
|
||||||
if (is_drive_through) {
|
if (is_drive_through) {
|
||||||
|
@ -1927,7 +2001,7 @@ CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool
|
||||||
int allowed_z = -1;
|
int allowed_z = -1;
|
||||||
CommandCost cost(EXPENSES_CONSTRUCTION);
|
CommandCost cost(EXPENSES_CONSTRUCTION);
|
||||||
for (TileIndex cur_tile : tile_area) {
|
for (TileIndex cur_tile : tile_area) {
|
||||||
CommandCost ret = CheckFlatLandRoadStop(cur_tile, allowed_z, flags, invalid_dirs, is_drive_through, station_type, axis, est, rt);
|
CommandCost ret = CheckFlatLandRoadStop(cur_tile, allowed_z, roadstopspec, flags, invalid_dirs, is_drive_through, station_type, axis, est, rt);
|
||||||
if (ret.Failed()) return ret;
|
if (ret.Failed()) return ret;
|
||||||
|
|
||||||
bool is_preexisting_roadstop = IsTileType(cur_tile, MP_STATION) && IsAnyRoadStop(cur_tile);
|
bool is_preexisting_roadstop = IsTileType(cur_tile, MP_STATION) && IsAnyRoadStop(cur_tile);
|
||||||
|
@ -2008,7 +2082,7 @@ CommandCost CmdBuildRoadStop(DoCommandFlags flags, TileIndex tile, uint8_t width
|
||||||
unit_cost = _price[is_truck_stop ? PR_BUILD_STATION_TRUCK : PR_BUILD_STATION_BUS];
|
unit_cost = _price[is_truck_stop ? PR_BUILD_STATION_TRUCK : PR_BUILD_STATION_BUS];
|
||||||
}
|
}
|
||||||
StationID est = StationID::Invalid();
|
StationID est = StationID::Invalid();
|
||||||
CommandCost cost = CalculateRoadStopCost(roadstop_area, flags, is_drive_through, is_truck_stop ? StationType::Truck : StationType::Bus, axis, ddir, &est, rt, unit_cost);
|
CommandCost cost = CalculateRoadStopCost(roadstop_area, flags, is_drive_through, is_truck_stop ? StationType::Truck : StationType::Bus, roadstopspec, axis, ddir, &est, rt, unit_cost);
|
||||||
if (cost.Failed()) return cost;
|
if (cost.Failed()) return cost;
|
||||||
|
|
||||||
Station *st = nullptr;
|
Station *st = nullptr;
|
||||||
|
@ -3073,6 +3147,51 @@ bool SplitGroundSpriteForOverlay(const TileInfo *ti, SpriteID *ground, RailTrack
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BridgePillarFlags GetRailStationBlockedPillars(const StationSpec *statspec, uint8_t layout)
|
||||||
|
{
|
||||||
|
static const BridgePillarFlags default_pillar_flags[] = {
|
||||||
|
{BridgePillarFlag::EdgeSW, BridgePillarFlag::EdgeNE}, // X empty
|
||||||
|
{BridgePillarFlag::EdgeNW, BridgePillarFlag::EdgeSE}, // Y empty
|
||||||
|
{BridgePillarFlag::EdgeSW, BridgePillarFlag::EdgeNE}, // X small
|
||||||
|
{BridgePillarFlag::EdgeNW, BridgePillarFlag::EdgeSE}, // Y small
|
||||||
|
{BridgePillarFlag::EdgeSW, BridgePillarFlag::EdgeNE, BridgePillarFlag::EdgeSE, BridgePillarFlag::CornerE, BridgePillarFlag::CornerS}, // X large
|
||||||
|
{BridgePillarFlag::EdgeNW, BridgePillarFlag::EdgeSE, BridgePillarFlag::EdgeSW, BridgePillarFlag::CornerS, BridgePillarFlag::CornerW}, // Y large
|
||||||
|
{BridgePillarFlag::EdgeSW, BridgePillarFlag::EdgeNE, BridgePillarFlag::EdgeNW, BridgePillarFlag::CornerN, BridgePillarFlag::CornerW}, // X large
|
||||||
|
{BridgePillarFlag::EdgeNW, BridgePillarFlag::EdgeSE, BridgePillarFlag::EdgeNE, BridgePillarFlag::CornerN, BridgePillarFlag::CornerE}, // Y large
|
||||||
|
};
|
||||||
|
|
||||||
|
if (statspec == nullptr) {
|
||||||
|
/* Default stations/waypoints */
|
||||||
|
if (layout < 8) return default_pillar_flags[layout];
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
if (layout < std::size(statspec->tilespecs) && statspec->tilespecs[layout].disallowed_pillars != BRIDGEPILLARFLAGS_ALL) {
|
||||||
|
/* Pllar flags set by NewGRF */
|
||||||
|
return statspec->tilespecs[layout].disallowed_pillars;
|
||||||
|
}
|
||||||
|
if (GetStationTileFlags(layout, statspec).Test(StationSpec::TileFlag::Blocked)) {
|
||||||
|
/* Blocked station tile. */
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Non-blocked station tile. */
|
||||||
|
return default_pillar_flags[layout % 2];
|
||||||
|
}
|
||||||
|
|
||||||
|
static BridgePillarFlags GetRoadStopBlockedPillars(const RoadStopSpec *spec, bool drive_through, uint8_t layout)
|
||||||
|
{
|
||||||
|
static constexpr BridgePillarFlags default_pillar_flags_x{BridgePillarFlag::EdgeSW, BridgePillarFlag::EdgeNE};
|
||||||
|
static constexpr BridgePillarFlags default_pillar_flags_y{BridgePillarFlag::EdgeNW, BridgePillarFlag::EdgeSE};
|
||||||
|
|
||||||
|
if (spec != nullptr && spec->tilespecs[layout].disallowed_pillars != BRIDGEPILLARFLAGS_ALL) {
|
||||||
|
return spec->tilespecs[layout].disallowed_pillars;
|
||||||
|
}
|
||||||
|
if (drive_through) {
|
||||||
|
return HasBit(layout, 0) ? default_pillar_flags_y : default_pillar_flags_x;
|
||||||
|
}
|
||||||
|
return {BridgePillarFlag::EdgeNE + (DiagDirection)layout};
|
||||||
|
}
|
||||||
|
|
||||||
static void DrawTile_Station(TileInfo *ti)
|
static void DrawTile_Station(TileInfo *ti)
|
||||||
{
|
{
|
||||||
const NewGRFSpriteLayout *layout = nullptr;
|
const NewGRFSpriteLayout *layout = nullptr;
|
||||||
|
@ -3086,6 +3205,7 @@ static void DrawTile_Station(TileInfo *ti)
|
||||||
BaseStation *st = nullptr;
|
BaseStation *st = nullptr;
|
||||||
const StationSpec *statspec = nullptr;
|
const StationSpec *statspec = nullptr;
|
||||||
uint tile_layout = 0;
|
uint tile_layout = 0;
|
||||||
|
BridgePillarFlags blocked_pillars = {};
|
||||||
|
|
||||||
if (HasStationRail(ti->tile)) {
|
if (HasStationRail(ti->tile)) {
|
||||||
rti = GetRailTypeInfo(GetRailType(ti->tile));
|
rti = GetRailTypeInfo(GetRailType(ti->tile));
|
||||||
|
@ -3114,6 +3234,7 @@ static void DrawTile_Station(TileInfo *ti)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
blocked_pillars = GetRailStationBlockedPillars(statspec, GetStationGfx(ti->tile));
|
||||||
} else {
|
} else {
|
||||||
total_offset = 0;
|
total_offset = 0;
|
||||||
}
|
}
|
||||||
|
@ -3358,6 +3479,7 @@ draw_default_foundation:
|
||||||
uint sprite_offset = GetDriveThroughStopAxis(ti->tile) == AXIS_X ? 1 : 0;
|
uint sprite_offset = GetDriveThroughStopAxis(ti->tile) == AXIS_X ? 1 : 0;
|
||||||
DrawRoadOverlays(ti, PAL_NONE, road_rti, tram_rti, sprite_offset, sprite_offset);
|
DrawRoadOverlays(ti, PAL_NONE, road_rti, tram_rti, sprite_offset, sprite_offset);
|
||||||
}
|
}
|
||||||
|
blocked_pillars = GetRoadStopBlockedPillars(stopspec, true, view);
|
||||||
} else {
|
} else {
|
||||||
/* Non-drivethrough road stops are only valid for roads. */
|
/* Non-drivethrough road stops are only valid for roads. */
|
||||||
assert(road_rt != INVALID_ROADTYPE && tram_rt == INVALID_ROADTYPE);
|
assert(road_rt != INVALID_ROADTYPE && tram_rt == INVALID_ROADTYPE);
|
||||||
|
@ -3366,6 +3488,7 @@ draw_default_foundation:
|
||||||
SpriteID ground = GetCustomRoadSprite(road_rti, ti->tile, ROTSG_ROADSTOP);
|
SpriteID ground = GetCustomRoadSprite(road_rti, ti->tile, ROTSG_ROADSTOP);
|
||||||
DrawGroundSprite(ground + view, PAL_NONE);
|
DrawGroundSprite(ground + view, PAL_NONE);
|
||||||
}
|
}
|
||||||
|
blocked_pillars = GetRoadStopBlockedPillars(stopspec, false, view);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stopspec == nullptr || !stopspec->flags.Test(RoadStopSpecFlag::NoCatenary)) {
|
if (stopspec == nullptr || !stopspec->flags.Test(RoadStopSpecFlag::NoCatenary)) {
|
||||||
|
@ -3380,6 +3503,7 @@ draw_default_foundation:
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawRailTileSeq(ti, t, TO_BUILDINGS, total_offset, relocation, palette);
|
DrawRailTileSeq(ti, t, TO_BUILDINGS, total_offset, relocation, palette);
|
||||||
|
DrawBridgeMiddle(ti, blocked_pillars);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image)
|
void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image)
|
||||||
|
@ -5162,6 +5286,40 @@ uint FlowStatMap::GetFlowFromVia(StationID from, StationID via) const
|
||||||
return i->second.GetShare(via);
|
return i->second.GetShare(via);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost CheckBuildAbove_Station(TileIndex tile, DoCommandFlags flags, Axis, int height)
|
||||||
|
{
|
||||||
|
switch (GetStationType(tile)) {
|
||||||
|
case StationType::Rail:
|
||||||
|
case StationType::RailWaypoint: {
|
||||||
|
CommandCost ret = IsRailStationBridgeAboveOk(tile, GetStationSpec(tile), GetStationGfx(tile), height + 1);
|
||||||
|
if (ret.Failed()) {
|
||||||
|
if (ret.GetErrorMessage() != INVALID_STRING_ID) return ret;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return CommandCost();
|
||||||
|
}
|
||||||
|
|
||||||
|
case StationType::Bus:
|
||||||
|
case StationType::Truck:
|
||||||
|
case StationType::RoadWaypoint: {
|
||||||
|
CommandCost ret = IsRoadStopBridgeAboveOk(tile, GetRoadStopSpec(tile), IsDriveThroughStopTile(tile),
|
||||||
|
IsDriveThroughStopTile(tile) ? AxisToDiagDir(GetDriveThroughStopAxis(tile)) : GetBayRoadStopDir(tile), height + 1);
|
||||||
|
if (ret.Failed()) {
|
||||||
|
if (ret.GetErrorMessage() != INVALID_STRING_ID) return ret;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return CommandCost();
|
||||||
|
}
|
||||||
|
|
||||||
|
case StationType::Buoy:
|
||||||
|
return CommandCost();
|
||||||
|
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
|
}
|
||||||
|
|
||||||
extern const TileTypeProcs _tile_type_station_procs = {
|
extern const TileTypeProcs _tile_type_station_procs = {
|
||||||
DrawTile_Station, // draw_tile_proc
|
DrawTile_Station, // draw_tile_proc
|
||||||
GetSlopePixelZ_Station, // get_slope_z_proc
|
GetSlopePixelZ_Station, // get_slope_z_proc
|
||||||
|
@ -5177,4 +5335,5 @@ extern const TileTypeProcs _tile_type_station_procs = {
|
||||||
VehicleEnter_Station, // vehicle_enter_tile_proc
|
VehicleEnter_Station, // vehicle_enter_tile_proc
|
||||||
GetFoundation_Station, // get_foundation_proc
|
GetFoundation_Station, // get_foundation_proc
|
||||||
TerraformTile_Station, // terraform_tile_proc
|
TerraformTile_Station, // terraform_tile_proc
|
||||||
|
CheckBuildAbove_Station, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -745,8 +745,42 @@ static const std::span<const std::span<const PalSpriteID>> _bridge_sprite_table[
|
||||||
* @param nrl description of the rail bridge in query tool
|
* @param nrl description of the rail bridge in query tool
|
||||||
* @param nrd description of the road bridge in query tool
|
* @param nrd description of the road bridge in query tool
|
||||||
*/
|
*/
|
||||||
#define MBR(y, mnl, mxl, p, mxs, spr, plt, dsc, nrl, nrd) \
|
#define MBR(y, mnl, mxl, p, mxs, spr, plt, dsc, nrl, nrd, pillars) \
|
||||||
{TimerGameCalendar::Year{y}, mnl, mxl, p, mxs, spr, plt, dsc, { nrl, nrd }, {}, 0}
|
{TimerGameCalendar::Year{y}, mnl, mxl, p, mxs, spr, plt, dsc, { nrl, nrd }, {}, 0, {}, pillars}
|
||||||
|
|
||||||
|
static constexpr BridgePillarFlags BRIDGEPILLARFLAGS_ALL_CORNERS = {
|
||||||
|
BridgePillarFlag::CornerW, BridgePillarFlag::CornerS, BridgePillarFlag::CornerE, BridgePillarFlag::CornerN
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Pillar flags for bridges which have pillars on the all corners on each piece. */
|
||||||
|
static const std::array<std::array<BridgePillarFlags, AXIS_END>, NUM_BRIDGE_PIECES - 1> ALL_PILLARS = {{
|
||||||
|
{{BRIDGEPILLARFLAGS_ALL_CORNERS, BRIDGEPILLARFLAGS_ALL_CORNERS}},
|
||||||
|
{{BRIDGEPILLARFLAGS_ALL_CORNERS, BRIDGEPILLARFLAGS_ALL_CORNERS}},
|
||||||
|
{{BRIDGEPILLARFLAGS_ALL_CORNERS, BRIDGEPILLARFLAGS_ALL_CORNERS}},
|
||||||
|
{{BRIDGEPILLARFLAGS_ALL_CORNERS, BRIDGEPILLARFLAGS_ALL_CORNERS}},
|
||||||
|
{{BRIDGEPILLARFLAGS_ALL_CORNERS, BRIDGEPILLARFLAGS_ALL_CORNERS}},
|
||||||
|
{{BRIDGEPILLARFLAGS_ALL_CORNERS, BRIDGEPILLARFLAGS_ALL_CORNERS}},
|
||||||
|
}};
|
||||||
|
|
||||||
|
/** Pillar flags for suspension style bridges. */
|
||||||
|
static const std::array<std::array<BridgePillarFlags, AXIS_END>, NUM_BRIDGE_PIECES - 1> SUSPENSION_PILLARS = {{
|
||||||
|
{{{BridgePillarFlag::CornerW, BridgePillarFlag::CornerS}, {BridgePillarFlag::CornerS, BridgePillarFlag::CornerE}}},
|
||||||
|
{{{BridgePillarFlag::CornerE, BridgePillarFlag::CornerN}, {BridgePillarFlag::CornerW, BridgePillarFlag::CornerN}}},
|
||||||
|
{{{BridgePillarFlag::CornerE, BridgePillarFlag::CornerN}, {BridgePillarFlag::CornerW, BridgePillarFlag::CornerN}}},
|
||||||
|
{{{BridgePillarFlag::CornerW, BridgePillarFlag::CornerS}, {BridgePillarFlag::CornerS, BridgePillarFlag::CornerE}}},
|
||||||
|
{{BRIDGEPILLARFLAGS_ALL_CORNERS, BRIDGEPILLARFLAGS_ALL_CORNERS}},
|
||||||
|
{{{}, {}}},
|
||||||
|
}};
|
||||||
|
|
||||||
|
/** Pillar flags for cantilever style bridges. */
|
||||||
|
static const std::array<std::array<BridgePillarFlags, AXIS_END>, NUM_BRIDGE_PIECES - 1> CANTILEVER_PILLARS = {{
|
||||||
|
{{{}, {}}},
|
||||||
|
{{{BridgePillarFlag::CornerE, BridgePillarFlag::CornerN}, {BridgePillarFlag::CornerW, BridgePillarFlag::CornerN}}},
|
||||||
|
{{{BridgePillarFlag::CornerE, BridgePillarFlag::CornerN}, {BridgePillarFlag::CornerW, BridgePillarFlag::CornerN}}},
|
||||||
|
{{{BridgePillarFlag::CornerE, BridgePillarFlag::CornerN}, {BridgePillarFlag::CornerW, BridgePillarFlag::CornerN}}},
|
||||||
|
{{{BridgePillarFlag::CornerE, BridgePillarFlag::CornerN}, {BridgePillarFlag::CornerW, BridgePillarFlag::CornerN}}},
|
||||||
|
{{{BridgePillarFlag::CornerE, BridgePillarFlag::CornerN}, {BridgePillarFlag::CornerW, BridgePillarFlag::CornerN}}},
|
||||||
|
}};
|
||||||
|
|
||||||
const BridgeSpec _orig_bridge[] = {
|
const BridgeSpec _orig_bridge[] = {
|
||||||
/*
|
/*
|
||||||
|
@ -760,43 +794,43 @@ const BridgeSpec _orig_bridge[] = {
|
||||||
string with description name on rail name on road
|
string with description name on rail name on road
|
||||||
| | | | */
|
| | | | */
|
||||||
MBR( 0, 0, 0xFFFF, 80, 32, 0xA24, PAL_NONE,
|
MBR( 0, 0, 0xFFFF, 80, 32, 0xA24, PAL_NONE,
|
||||||
STR_BRIDGE_NAME_WOODEN, STR_LAI_BRIDGE_DESCRIPTION_RAIL_WOODEN, STR_LAI_BRIDGE_DESCRIPTION_ROAD_WOODEN),
|
STR_BRIDGE_NAME_WOODEN, STR_LAI_BRIDGE_DESCRIPTION_RAIL_WOODEN, STR_LAI_BRIDGE_DESCRIPTION_ROAD_WOODEN, ALL_PILLARS),
|
||||||
|
|
||||||
MBR( 0, 0, 2, 112, 48, 0xA26, PALETTE_TO_STRUCT_RED,
|
MBR( 0, 0, 2, 112, 48, 0xA26, PALETTE_TO_STRUCT_RED,
|
||||||
STR_BRIDGE_NAME_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CONCRETE),
|
STR_BRIDGE_NAME_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CONCRETE, ALL_PILLARS),
|
||||||
|
|
||||||
MBR(1930, 0, 5, 144, 64, 0xA25, PAL_NONE,
|
MBR(1930, 0, 5, 144, 64, 0xA25, PAL_NONE,
|
||||||
STR_BRIDGE_NAME_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL),
|
STR_BRIDGE_NAME_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL, ALL_PILLARS),
|
||||||
|
|
||||||
MBR( 0, 2, 10, 168, 80, 0xA22, PALETTE_TO_STRUCT_CONCRETE,
|
MBR( 0, 2, 10, 168, 80, 0xA22, PALETTE_TO_STRUCT_CONCRETE,
|
||||||
STR_BRIDGE_NAME_SUSPENSION_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_CONCRETE),
|
STR_BRIDGE_NAME_SUSPENSION_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_CONCRETE, SUSPENSION_PILLARS),
|
||||||
|
|
||||||
MBR(1930, 3, 0xFFFF, 185, 96, 0xA22, PAL_NONE,
|
MBR(1930, 3, 0xFFFF, 185, 96, 0xA22, PAL_NONE,
|
||||||
STR_BRIDGE_NAME_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL),
|
STR_BRIDGE_NAME_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL, SUSPENSION_PILLARS),
|
||||||
|
|
||||||
MBR(1930, 3, 0xFFFF, 192, 112, 0xA22, PALETTE_TO_STRUCT_YELLOW,
|
MBR(1930, 3, 0xFFFF, 192, 112, 0xA22, PALETTE_TO_STRUCT_YELLOW,
|
||||||
STR_BRIDGE_NAME_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL),
|
STR_BRIDGE_NAME_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL, SUSPENSION_PILLARS),
|
||||||
|
|
||||||
MBR(1930, 3, 7, 224, 160, 0xA23, PAL_NONE,
|
MBR(1930, 3, 7, 224, 160, 0xA23, PAL_NONE,
|
||||||
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL),
|
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL, CANTILEVER_PILLARS),
|
||||||
|
|
||||||
MBR(1930, 3, 8, 232, 208, 0xA23, PALETTE_TO_STRUCT_BROWN,
|
MBR(1930, 3, 8, 232, 208, 0xA23, PALETTE_TO_STRUCT_BROWN,
|
||||||
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL),
|
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL, CANTILEVER_PILLARS),
|
||||||
|
|
||||||
MBR(1930, 3, 9, 248, 240, 0xA23, PALETTE_TO_STRUCT_RED,
|
MBR(1930, 3, 9, 248, 240, 0xA23, PALETTE_TO_STRUCT_RED,
|
||||||
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL),
|
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL, CANTILEVER_PILLARS),
|
||||||
|
|
||||||
MBR(1930, 0, 2, 240, 256, 0xA27, PAL_NONE,
|
MBR(1930, 0, 2, 240, 256, 0xA27, PAL_NONE,
|
||||||
STR_BRIDGE_NAME_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL),
|
STR_BRIDGE_NAME_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL, ALL_PILLARS),
|
||||||
|
|
||||||
MBR(1995, 2, 0xFFFF, 255, 320, 0xA28, PAL_NONE,
|
MBR(1995, 2, 0xFFFF, 255, 320, 0xA28, PAL_NONE,
|
||||||
STR_BRIDGE_NAME_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL),
|
STR_BRIDGE_NAME_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL, CANTILEVER_PILLARS),
|
||||||
|
|
||||||
MBR(2005, 2, 0xFFFF, 380, 512, 0xA28, PALETTE_TO_STRUCT_YELLOW,
|
MBR(2005, 2, 0xFFFF, 380, 512, 0xA28, PALETTE_TO_STRUCT_YELLOW,
|
||||||
STR_BRIDGE_NAME_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL),
|
STR_BRIDGE_NAME_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL, CANTILEVER_PILLARS),
|
||||||
|
|
||||||
MBR(2010, 2, 0xFFFF, 510, 608, 0xA28, PALETTE_TO_STRUCT_CONCRETE,
|
MBR(2010, 2, 0xFFFF, 510, 608, 0xA28, PALETTE_TO_STRUCT_CONCRETE,
|
||||||
STR_BRIDGE_TUBULAR_SILICON, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL)
|
STR_BRIDGE_TUBULAR_SILICON, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL, CANTILEVER_PILLARS),
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef MBR
|
#undef MBR
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,6 +135,8 @@ typedef Foundation GetFoundationProc(TileIndex tile, Slope tileh);
|
||||||
*/
|
*/
|
||||||
typedef CommandCost TerraformTileProc(TileIndex tile, DoCommandFlags flags, int z_new, Slope tileh_new);
|
typedef CommandCost TerraformTileProc(TileIndex tile, DoCommandFlags flags, int z_new, Slope tileh_new);
|
||||||
|
|
||||||
|
using CheckBuildAboveProc = CommandCost(TileIndex tile, DoCommandFlags flags, Axis axis, int height);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set of callback functions for performing tile operations of a given tile type.
|
* Set of callback functions for performing tile operations of a given tile type.
|
||||||
* @see TileType
|
* @see TileType
|
||||||
|
@ -154,6 +156,7 @@ struct TileTypeProcs {
|
||||||
VehicleEnterTileProc *vehicle_enter_tile_proc; ///< Called when a vehicle enters a tile
|
VehicleEnterTileProc *vehicle_enter_tile_proc; ///< Called when a vehicle enters a tile
|
||||||
GetFoundationProc *get_foundation_proc;
|
GetFoundationProc *get_foundation_proc;
|
||||||
TerraformTileProc *terraform_tile_proc; ///< Called when a terraforming operation is about to take place
|
TerraformTileProc *terraform_tile_proc; ///< Called when a terraforming operation is about to take place
|
||||||
|
CheckBuildAboveProc *check_build_above_proc;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const TileTypeProcs * const _tile_type_procs[16];
|
extern const TileTypeProcs * const _tile_type_procs[16];
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -4130,6 +4130,7 @@ extern const TileTypeProcs _tile_type_town_procs = {
|
||||||
nullptr, // vehicle_enter_tile_proc
|
nullptr, // vehicle_enter_tile_proc
|
||||||
GetFoundation_Town, // get_foundation_proc
|
GetFoundation_Town, // get_foundation_proc
|
||||||
TerraformTile_Town, // terraform_tile_proc
|
TerraformTile_Town, // terraform_tile_proc
|
||||||
|
nullptr, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
||||||
std::span<const DrawBuildingsTileStruct> GetTownDrawTileData()
|
std::span<const DrawBuildingsTileStruct> GetTownDrawTileData()
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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))) {
|
||||||
|
|
|
@ -1031,4 +1031,5 @@ extern const TileTypeProcs _tile_type_trees_procs = {
|
||||||
nullptr, // vehicle_enter_tile_proc
|
nullptr, // vehicle_enter_tile_proc
|
||||||
GetFoundation_Trees, // get_foundation_proc
|
GetFoundation_Trees, // get_foundation_proc
|
||||||
TerraformTile_Trees, // terraform_tile_proc
|
TerraformTile_Trees, // terraform_tile_proc
|
||||||
|
nullptr, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "newgrf_object.h"
|
|
||||||
#include "viewport_func.h"
|
#include "viewport_func.h"
|
||||||
#include "command_func.h"
|
#include "command_func.h"
|
||||||
#include "town.h"
|
#include "town.h"
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
#include "ship.h"
|
#include "ship.h"
|
||||||
#include "roadveh.h"
|
#include "roadveh.h"
|
||||||
#include "pathfinder/yapf/yapf_cache.h"
|
#include "pathfinder/yapf/yapf_cache.h"
|
||||||
#include "pathfinder/water_regions.h"
|
|
||||||
#include "newgrf_sound.h"
|
#include "newgrf_sound.h"
|
||||||
#include "autoslope.h"
|
#include "autoslope.h"
|
||||||
#include "tunnelbridge_map.h"
|
#include "tunnelbridge_map.h"
|
||||||
|
@ -39,7 +37,6 @@
|
||||||
#include "object_base.h"
|
#include "object_base.h"
|
||||||
#include "water.h"
|
#include "water.h"
|
||||||
#include "company_gui.h"
|
#include "company_gui.h"
|
||||||
#include "station_func.h"
|
|
||||||
#include "tunnelbridge_cmd.h"
|
#include "tunnelbridge_cmd.h"
|
||||||
#include "landscape_cmd.h"
|
#include "landscape_cmd.h"
|
||||||
#include "terraform_cmd.h"
|
#include "terraform_cmd.h"
|
||||||
|
@ -278,6 +275,16 @@ static Money TunnelBridgeClearCost(TileIndex tile, Price base_price)
|
||||||
return base_cost;
|
return base_cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost CheckBuildAbove(TileIndex tile, DoCommandFlags flags, Axis axis, int height)
|
||||||
|
{
|
||||||
|
if (_tile_type_procs[GetTileType(tile)]->check_build_above_proc != nullptr) {
|
||||||
|
return _tile_type_procs[GetTileType(tile)]->check_build_above_proc(tile, flags, axis, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* A tile without a handler must be cleared. */
|
||||||
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a Bridge
|
* Build a Bridge
|
||||||
* @param flags type of operation
|
* @param flags type of operation
|
||||||
|
@ -434,6 +441,14 @@ CommandCost CmdBuildBridge(DoCommandFlags flags, TileIndex tile_end, TileIndex t
|
||||||
/* If bridge belonged to bankrupt company, it has a new owner now */
|
/* If bridge belonged to bankrupt company, it has a new owner now */
|
||||||
is_new_owner = (owner == OWNER_NONE);
|
is_new_owner = (owner == OWNER_NONE);
|
||||||
if (is_new_owner) owner = company;
|
if (is_new_owner) owner = company;
|
||||||
|
|
||||||
|
/* Check if the new bridge is compatible with tiles underneath. */
|
||||||
|
TileIndexDiff delta = (direction == AXIS_X ? TileDiffXY(1, 0) : TileDiffXY(0, 1));
|
||||||
|
for (TileIndex tile = tile_start + delta; tile != tile_end; tile += delta) {
|
||||||
|
CommandCost ret = CheckBuildAbove(tile, flags, direction, z_start);
|
||||||
|
if (ret.Failed()) return ret;
|
||||||
|
cost.AddCost(ret.GetCost());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Build a new bridge. */
|
/* Build a new bridge. */
|
||||||
|
|
||||||
|
@ -484,43 +499,9 @@ CommandCost CmdBuildBridge(DoCommandFlags flags, TileIndex tile_end, TileIndex t
|
||||||
return CommandCost(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
return CommandCost(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (GetTileType(tile)) {
|
ret = CheckBuildAbove(tile, flags, direction, z_start);
|
||||||
case MP_WATER:
|
if (ret.Failed()) return ret;
|
||||||
if (!IsWater(tile) && !IsCoast(tile)) goto not_valid_below;
|
cost.AddCost(ret.GetCost());
|
||||||
break;
|
|
||||||
|
|
||||||
case MP_RAILWAY:
|
|
||||||
if (!IsPlainRail(tile)) goto not_valid_below;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MP_ROAD:
|
|
||||||
if (IsRoadDepot(tile)) goto not_valid_below;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MP_TUNNELBRIDGE:
|
|
||||||
if (IsTunnel(tile)) break;
|
|
||||||
if (direction == DiagDirToAxis(GetTunnelBridgeDirection(tile))) goto not_valid_below;
|
|
||||||
if (z_start < GetBridgeHeight(tile)) goto not_valid_below;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MP_OBJECT: {
|
|
||||||
const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
|
|
||||||
if (!spec->flags.Test(ObjectFlag::AllowUnderBridge)) goto not_valid_below;
|
|
||||||
if (GetTileMaxZ(tile) + spec->height > z_start) goto not_valid_below;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case MP_CLEAR:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
not_valid_below:;
|
|
||||||
/* try and clear the middle landscape */
|
|
||||||
ret = Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
|
||||||
if (ret.Failed()) return ret;
|
|
||||||
cost.AddCost(ret.GetCost());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flags.Test(DoCommandFlag::Execute)) {
|
if (flags.Test(DoCommandFlag::Execute)) {
|
||||||
/* We do this here because when replacing a bridge with another
|
/* We do this here because when replacing a bridge with another
|
||||||
|
@ -1445,7 +1426,7 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||||
AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, *ti, rear_sep[tunnelbridge_direction]);
|
AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, *ti, rear_sep[tunnelbridge_direction]);
|
||||||
AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, *ti, front_sep[tunnelbridge_direction]);
|
AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, *ti, front_sep[tunnelbridge_direction]);
|
||||||
|
|
||||||
DrawBridgeMiddle(ti);
|
DrawBridgeMiddle(ti, {});
|
||||||
} else { // IsBridge(ti->tile)
|
} else { // IsBridge(ti->tile)
|
||||||
DrawFoundation(ti, GetBridgeFoundation(ti->tileh, DiagDirToAxis(tunnelbridge_direction)));
|
DrawFoundation(ti, GetBridgeFoundation(ti->tileh, DiagDirToAxis(tunnelbridge_direction)));
|
||||||
|
|
||||||
|
@ -1536,7 +1517,7 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawBridgeMiddle(ti);
|
DrawBridgeMiddle(ti, {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1574,11 +1555,26 @@ static BridgePieces CalcBridgePiece(uint north, uint south)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BridgePillarFlags GetBridgeTilePillarFlags(TileIndex tile, TileIndex rampnorth, TileIndex rampsouth, BridgeType type, TransportType transport_type)
|
||||||
|
{
|
||||||
|
if (transport_type == TRANSPORT_WATER) return BRIDGEPILLARFLAGS_ALL_CORNERS;
|
||||||
|
|
||||||
|
const BridgeSpec *spec = GetBridgeSpec(type);
|
||||||
|
if (!spec->ctrl_flags.Test(BridgeSpecCtrlFlag::InvalidPillarFlags)) {
|
||||||
|
BridgePieces piece = CalcBridgePiece(GetTunnelBridgeLength(tile, rampnorth) + 1, GetTunnelBridgeLength(tile, rampsouth) + 1);
|
||||||
|
Axis axis = TileX(rampnorth) == TileX(rampsouth) ? AXIS_Y : AXIS_X;
|
||||||
|
|
||||||
|
return spec->pillar_flags[piece][axis == AXIS_Y ? 1 : 0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return BRIDGEPILLARFLAGS_ALL_CORNERS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draw the middle bits of a bridge.
|
* Draw the middle bits of a bridge.
|
||||||
* @param ti Tile information of the tile to draw it on.
|
* @param ti Tile information of the tile to draw it on.
|
||||||
*/
|
*/
|
||||||
void DrawBridgeMiddle(const TileInfo *ti)
|
void DrawBridgeMiddle(const TileInfo *ti, BridgePillarFlags blocked_pillars)
|
||||||
{
|
{
|
||||||
/* Sectional view of bridge bounding boxes:
|
/* Sectional view of bridge bounding boxes:
|
||||||
*
|
*
|
||||||
|
@ -1602,6 +1598,7 @@ void DrawBridgeMiddle(const TileInfo *ti)
|
||||||
TileIndex rampsouth = GetSouthernBridgeEnd(ti->tile);
|
TileIndex rampsouth = GetSouthernBridgeEnd(ti->tile);
|
||||||
TransportType transport_type = GetTunnelBridgeTransportType(rampsouth);
|
TransportType transport_type = GetTunnelBridgeTransportType(rampsouth);
|
||||||
Axis axis = GetBridgeAxis(ti->tile);
|
Axis axis = GetBridgeAxis(ti->tile);
|
||||||
|
BridgePillarFlags pillars;
|
||||||
|
|
||||||
uint base_offset = GetBridgeMiddleAxisBaseOffset(axis);
|
uint base_offset = GetBridgeMiddleAxisBaseOffset(axis);
|
||||||
std::span<const PalSpriteID> psid;
|
std::span<const PalSpriteID> psid;
|
||||||
|
@ -1611,9 +1608,11 @@ void DrawBridgeMiddle(const TileInfo *ti)
|
||||||
drawfarpillar = !HasBit(GetBridgeSpec(bridge_type)->flags, 0);
|
drawfarpillar = !HasBit(GetBridgeSpec(bridge_type)->flags, 0);
|
||||||
base_offset += GetBridgeSpriteTableBaseOffset(transport_type, rampsouth);
|
base_offset += GetBridgeSpriteTableBaseOffset(transport_type, rampsouth);
|
||||||
psid = GetBridgeSpriteTable(bridge_type, CalcBridgePiece(GetTunnelBridgeLength(ti->tile, rampnorth) + 1, GetTunnelBridgeLength(ti->tile, rampsouth) + 1));
|
psid = GetBridgeSpriteTable(bridge_type, CalcBridgePiece(GetTunnelBridgeLength(ti->tile, rampnorth) + 1, GetTunnelBridgeLength(ti->tile, rampsouth) + 1));
|
||||||
|
pillars = GetBridgeTilePillarFlags(ti->tile, rampnorth, rampsouth, bridge_type, transport_type);
|
||||||
} else {
|
} else {
|
||||||
drawfarpillar = true;
|
drawfarpillar = true;
|
||||||
psid = _aqueduct_sprite_table_middle;
|
psid = _aqueduct_sprite_table_middle;
|
||||||
|
pillars = BRIDGEPILLARFLAGS_ALL_CORNERS;
|
||||||
}
|
}
|
||||||
psid = psid.subspan(base_offset, 3);
|
psid = psid.subspan(base_offset, 3);
|
||||||
|
|
||||||
|
@ -1682,6 +1681,7 @@ void DrawBridgeMiddle(const TileInfo *ti)
|
||||||
/* Do not draw anything more if bridges are invisible */
|
/* Do not draw anything more if bridges are invisible */
|
||||||
if (IsInvisibilitySet(TO_BRIDGES)) return;
|
if (IsInvisibilitySet(TO_BRIDGES)) return;
|
||||||
|
|
||||||
|
if (blocked_pillars.Any(pillars)) return;
|
||||||
DrawBridgePillars(psid[2], ti, axis, drawfarpillar, x, y, z);
|
DrawBridgePillars(psid[2], ti, axis, drawfarpillar, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2084,6 +2084,17 @@ static CommandCost TerraformTile_TunnelBridge(TileIndex tile, DoCommandFlags fla
|
||||||
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost CheckBuildAbove_TunnelBridge(TileIndex tile, DoCommandFlags flags, Axis axis, int height)
|
||||||
|
{
|
||||||
|
if (IsTunnel(tile)) return CommandCost();
|
||||||
|
|
||||||
|
if (axis != DiagDirToAxis(GetTunnelBridgeDirection(tile)) && height >= GetBridgeHeight(tile)) {
|
||||||
|
return CommandCost();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
|
}
|
||||||
|
|
||||||
extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
|
extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
|
||||||
DrawTile_TunnelBridge, // draw_tile_proc
|
DrawTile_TunnelBridge, // draw_tile_proc
|
||||||
GetSlopePixelZ_TunnelBridge, // get_slope_z_proc
|
GetSlopePixelZ_TunnelBridge, // get_slope_z_proc
|
||||||
|
@ -2099,4 +2110,5 @@ extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
|
||||||
VehicleEnter_TunnelBridge, // vehicle_enter_tile_proc
|
VehicleEnter_TunnelBridge, // vehicle_enter_tile_proc
|
||||||
GetFoundation_TunnelBridge, // get_foundation_proc
|
GetFoundation_TunnelBridge, // get_foundation_proc
|
||||||
TerraformTile_TunnelBridge, // terraform_tile_proc
|
TerraformTile_TunnelBridge, // terraform_tile_proc
|
||||||
|
CheckBuildAbove_TunnelBridge, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
|
@ -87,4 +87,5 @@ extern const TileTypeProcs _tile_type_void_procs = {
|
||||||
nullptr, // vehicle_enter_tile_proc
|
nullptr, // vehicle_enter_tile_proc
|
||||||
GetFoundation_Void, // get_foundation_proc
|
GetFoundation_Void, // get_foundation_proc
|
||||||
TerraformTile_Void, // terraform_tile_proc
|
TerraformTile_Void, // terraform_tile_proc
|
||||||
|
nullptr, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
|
@ -926,12 +926,12 @@ static void DrawTile_Water(TileInfo *ti)
|
||||||
switch (GetWaterTileType(ti->tile)) {
|
switch (GetWaterTileType(ti->tile)) {
|
||||||
case WATER_TILE_CLEAR:
|
case WATER_TILE_CLEAR:
|
||||||
DrawWaterClassGround(ti);
|
DrawWaterClassGround(ti);
|
||||||
DrawBridgeMiddle(ti);
|
DrawBridgeMiddle(ti, {});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WATER_TILE_COAST: {
|
case WATER_TILE_COAST: {
|
||||||
DrawShoreTile(ti->tileh);
|
DrawShoreTile(ti->tileh);
|
||||||
DrawBridgeMiddle(ti);
|
DrawBridgeMiddle(ti, {});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1410,6 +1410,11 @@ static CommandCost TerraformTile_Water(TileIndex tile, DoCommandFlags flags, int
|
||||||
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CommandCost CheckBuildAbove_Water(TileIndex tile, DoCommandFlags flags, Axis, int)
|
||||||
|
{
|
||||||
|
if (IsWater(tile) || IsCoast(tile)) return CommandCost();
|
||||||
|
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||||
|
}
|
||||||
|
|
||||||
extern const TileTypeProcs _tile_type_water_procs = {
|
extern const TileTypeProcs _tile_type_water_procs = {
|
||||||
DrawTile_Water, // draw_tile_proc
|
DrawTile_Water, // draw_tile_proc
|
||||||
|
@ -1426,4 +1431,5 @@ extern const TileTypeProcs _tile_type_water_procs = {
|
||||||
VehicleEnter_Water, // vehicle_enter_tile_proc
|
VehicleEnter_Water, // vehicle_enter_tile_proc
|
||||||
GetFoundation_Water, // get_foundation_proc
|
GetFoundation_Water, // get_foundation_proc
|
||||||
TerraformTile_Water, // terraform_tile_proc
|
TerraformTile_Water, // terraform_tile_proc
|
||||||
|
CheckBuildAbove_Water, // check_build_above_proc
|
||||||
};
|
};
|
||||||
|
|
|
@ -174,15 +174,15 @@ static CommandCost IsValidTileForWaypoint(TileIndex tile, Axis axis, StationID *
|
||||||
return CommandCost(STR_ERROR_FLAT_LAND_REQUIRED);
|
return CommandCost(STR_ERROR_FLAT_LAND_REQUIRED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsBridgeAbove(tile)) return CommandCost(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
|
||||||
|
|
||||||
return CommandCost();
|
return CommandCost();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void GetStationLayout(uint8_t *layout, uint numtracks, uint plat_len, const StationSpec *statspec);
|
extern void GetStationLayout(uint8_t *layout, uint numtracks, uint plat_len, const StationSpec *statspec);
|
||||||
extern CommandCost FindJoiningWaypoint(StationID existing_station, StationID station_to_join, bool adjacent, TileArea ta, Waypoint **wp, bool is_road);
|
extern CommandCost FindJoiningWaypoint(StationID existing_station, StationID station_to_join, bool adjacent, TileArea ta, Waypoint **wp, bool is_road);
|
||||||
extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta);
|
extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta);
|
||||||
extern CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool is_drive_through, StationType station_type, Axis axis, DiagDirection ddir, StationID *est, RoadType rt, Money unit_cost);
|
extern CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool is_drive_through, StationType station_type, const RoadStopSpec *roadstopspec, Axis axis, DiagDirection ddir, StationID *est, RoadType rt, Money unit_cost);
|
||||||
|
extern CommandCost IsRailStationBridgeAboveOk(TileIndex tile, const StationSpec *statspec, uint8_t layout);
|
||||||
|
|
||||||
extern CommandCost RemoveRoadWaypointStop(TileIndex tile, DoCommandFlags flags, int replacement_spec_index);
|
extern CommandCost RemoveRoadWaypointStop(TileIndex tile, DoCommandFlags flags, int replacement_spec_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -231,12 +231,22 @@ CommandCost CmdBuildRailWaypoint(DoCommandFlags flags, TileIndex start_tile, Axi
|
||||||
/* Make sure the area below consists of clear tiles. (OR tiles belonging to a certain rail station) */
|
/* Make sure the area below consists of clear tiles. (OR tiles belonging to a certain rail station) */
|
||||||
StationID est = StationID::Invalid();
|
StationID est = StationID::Invalid();
|
||||||
|
|
||||||
|
const StationSpec *spec = StationClass::Get(spec_class)->GetSpec(spec_index);
|
||||||
|
std::vector<uint8_t> layout(count);
|
||||||
|
if (spec != nullptr) {
|
||||||
|
/* For NewGRF waypoints we like to have their style. */
|
||||||
|
GetStationLayout(layout.data(), count, 1, spec);
|
||||||
|
}
|
||||||
|
|
||||||
/* Check whether the tiles we're building on are valid rail or not. */
|
/* Check whether the tiles we're building on are valid rail or not. */
|
||||||
TileIndexDiff offset = TileOffsByAxis(OtherAxis(axis));
|
TileIndexDiff offset = TileOffsByAxis(OtherAxis(axis));
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
TileIndex tile = start_tile + i * offset;
|
TileIndex tile = start_tile + i * offset;
|
||||||
CommandCost ret = IsValidTileForWaypoint(tile, axis, &est);
|
CommandCost ret = IsValidTileForWaypoint(tile, axis, &est);
|
||||||
if (ret.Failed()) return ret;
|
if (ret.Failed()) return ret;
|
||||||
|
|
||||||
|
ret = IsRailStationBridgeAboveOk(tile, spec, layout[i]);
|
||||||
|
if (ret.Failed()) return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Waypoint *wp = nullptr;
|
Waypoint *wp = nullptr;
|
||||||
|
@ -285,12 +295,6 @@ CommandCost CmdBuildRailWaypoint(DoCommandFlags flags, TileIndex start_tile, Axi
|
||||||
|
|
||||||
wp->UpdateVirtCoord();
|
wp->UpdateVirtCoord();
|
||||||
|
|
||||||
const StationSpec *spec = StationClass::Get(spec_class)->GetSpec(spec_index);
|
|
||||||
std::vector<uint8_t> layout(count);
|
|
||||||
if (spec != nullptr) {
|
|
||||||
/* For NewGRF waypoints we like to have their style. */
|
|
||||||
GetStationLayout(layout.data(), count, 1, spec);
|
|
||||||
}
|
|
||||||
uint8_t map_spec_index = AllocateSpecToStation(spec, wp, true);
|
uint8_t map_spec_index = AllocateSpecToStation(spec, wp, true);
|
||||||
|
|
||||||
Company *c = Company::Get(wp->owner);
|
Company *c = Company::Get(wp->owner);
|
||||||
|
@ -364,7 +368,7 @@ CommandCost CmdBuildRoadWaypoint(DoCommandFlags flags, TileIndex start_tile, Axi
|
||||||
unit_cost = _price[PR_BUILD_STATION_TRUCK];
|
unit_cost = _price[PR_BUILD_STATION_TRUCK];
|
||||||
}
|
}
|
||||||
StationID est = StationID::Invalid();
|
StationID est = StationID::Invalid();
|
||||||
CommandCost cost = CalculateRoadStopCost(roadstop_area, flags, true, StationType::RoadWaypoint, axis, AxisToDiagDir(axis), &est, INVALID_ROADTYPE, unit_cost);
|
CommandCost cost = CalculateRoadStopCost(roadstop_area, flags, true, StationType::RoadWaypoint, roadstopspec, axis, AxisToDiagDir(axis), &est, INVALID_ROADTYPE, unit_cost);
|
||||||
if (cost.Failed()) return cost;
|
if (cost.Failed()) return cost;
|
||||||
|
|
||||||
Waypoint *wp = nullptr;
|
Waypoint *wp = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue