mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix some CC base blocks
This commit is contained in:
@@ -17,10 +17,12 @@
|
||||
#include "../core/IStream.hpp"
|
||||
#include "../core/Math.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "SmallSceneryObject.h"
|
||||
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../localisation/language.h"
|
||||
#include "../world/scenery.h"
|
||||
|
||||
SmallSceneryObject::~SmallSceneryObject()
|
||||
{
|
||||
@@ -81,6 +83,8 @@ void SmallSceneryObject::Load()
|
||||
{
|
||||
_legacyType.small_scenery.frame_offsets = _frameOffsets;
|
||||
}
|
||||
|
||||
PerformFixes();
|
||||
}
|
||||
|
||||
void SmallSceneryObject::Unload()
|
||||
@@ -150,3 +154,23 @@ uint8 * SmallSceneryObject::ReadFrameOffsets(IStream * stream)
|
||||
data.push_back(frameOffset);
|
||||
return Memory::Duplicate(data.data(), data.size());
|
||||
}
|
||||
|
||||
void SmallSceneryObject::PerformFixes()
|
||||
{
|
||||
std::string identifier = GetIdentifier();
|
||||
|
||||
// ToonTowner's base blocks. Make them allow supports on top and put them in the Walls and Roofs group.
|
||||
if (String::Equals(identifier, "XXBBCL01") ||
|
||||
String::Equals(identifier, "XXBBMD01") ||
|
||||
String::Equals(identifier, "XXBBBR01") ||
|
||||
String::Equals(identifier, "ARBASE2 "))
|
||||
{
|
||||
static const rct_object_entry * scgWalls = object_list_find_by_name("SCGWALLS");
|
||||
if (scgWalls != nullptr)
|
||||
{
|
||||
SetPrimarySceneryGroup((rct_object_entry *)scgWalls);
|
||||
}
|
||||
|
||||
_legacyType.small_scenery.flags |= SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ public:
|
||||
|
||||
private:
|
||||
static uint8 * ReadFrameOffsets(IStream * stream);
|
||||
void PerformFixes();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -73,7 +73,7 @@ typedef enum {
|
||||
SMALL_SCENERY_FLAG_NO_SUPPORTS = (1 << 20), // 0x100000
|
||||
SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED = (1 << 21), // 0x200000
|
||||
SMALL_SCENERY_FLAG_COG = (1 << 22), // 0x400000
|
||||
SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP = (1 << 23), // 0x800000
|
||||
SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP = (1 << 23), // 0x800000; means supports can be built on this object. Used for base blocks.
|
||||
SMALL_SCENERY_FLAG_HALF_SPACE = (1 << 24), // 0x1000000
|
||||
SMALL_SCENERY_FLAG_THREE_QUARTERS = (1 << 25), // 0x2000000
|
||||
SMALL_SCENERY_FLAG_PAINT_SUPPORTS = (1 << 26), // 0x4000000; used for scenery items which are support structures
|
||||
|
||||
Reference in New Issue
Block a user