mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Add support for importing RCT Modified ride entrances (#11938)
This commit is contained in:
committed by
GitHub
parent
8f29810e04
commit
aff920c874
@@ -133,6 +133,24 @@ enum
|
||||
RCT12_FOOTPATH_PROPERTIES_ADDITIONS_FLAG_GHOST = (1 << 7),
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
RCT12_STATION_STYLE_PLAIN,
|
||||
RCT12_STATION_STYLE_WOODEN,
|
||||
RCT12_STATION_STYLE_CANVAS_TENT,
|
||||
RCT12_STATION_STYLE_CASTLE_GREY,
|
||||
RCT12_STATION_STYLE_CASTLE_BROWN,
|
||||
RCT12_STATION_STYLE_JUNGLE,
|
||||
RCT12_STATION_STYLE_LOG_CABIN,
|
||||
RCT12_STATION_STYLE_CLASSICAL,
|
||||
RCT12_STATION_STYLE_ABSTRACT,
|
||||
RCT12_STATION_STYLE_SNOW,
|
||||
RCT12_STATION_STYLE_PAGODA,
|
||||
RCT12_STATION_STYLE_SPACE,
|
||||
|
||||
RCT12_STATION_STYLE_INVISIBLE, // Added by OpenRCT2
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
struct RCT12xy8
|
||||
|
||||
@@ -66,6 +66,7 @@ private:
|
||||
const utf8* _s6Path = nullptr;
|
||||
rct_s6_data _s6{};
|
||||
uint8_t _gameVersion = 0;
|
||||
bool _isSV7 = false;
|
||||
|
||||
public:
|
||||
S6Importer(IObjectRepository& objectRepository)
|
||||
@@ -147,6 +148,12 @@ public:
|
||||
_objectRepository.ExportPackedObject(stream);
|
||||
}
|
||||
|
||||
if (path)
|
||||
{
|
||||
auto extension = path_get_extension(path);
|
||||
_isSV7 = _stricmp(extension, ".sv7") == 0;
|
||||
}
|
||||
|
||||
if (isScenario)
|
||||
{
|
||||
chunkReader.ReadChunk(&_s6.objects, sizeof(_s6.objects));
|
||||
@@ -754,7 +761,14 @@ public:
|
||||
}
|
||||
|
||||
dst->music = src->music;
|
||||
dst->entrance_style = src->entrance_style;
|
||||
|
||||
auto entranceStyle = src->entrance_style;
|
||||
// In SV7, "plain" entrances are invisible.
|
||||
if (_isSV7 && entranceStyle == RCT12_STATION_STYLE_PLAIN)
|
||||
{
|
||||
entranceStyle = RCT12_STATION_STYLE_INVISIBLE;
|
||||
}
|
||||
dst->entrance_style = entranceStyle;
|
||||
dst->vehicle_change_timeout = src->vehicle_change_timeout;
|
||||
dst->num_block_brakes = src->num_block_brakes;
|
||||
dst->lift_hill_speed = src->lift_hill_speed;
|
||||
|
||||
Reference in New Issue
Block a user