mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove some unused stuff (#19474)
* Remove unused symbols * Remove unused SceneryObject.cpp * Remove GetScgWallsHeader() and GetScgPiratHeader()
This commit is contained in:
parent
777d43ae18
commit
be52b55980
|
@ -68,7 +68,6 @@ ScreenCoordsXY gSavedView;
|
|||
ZoomLevel gSavedViewZoom;
|
||||
uint8_t gSavedViewRotation;
|
||||
|
||||
PaintEntry* gNextFreePaintStruct;
|
||||
uint8_t gCurrentRotation;
|
||||
|
||||
static uint32_t _currentImageType;
|
||||
|
|
|
@ -117,7 +117,6 @@ extern ScreenCoordsXY gSavedView;
|
|||
extern ZoomLevel gSavedViewZoom;
|
||||
extern uint8_t gSavedViewRotation;
|
||||
|
||||
extern PaintEntry* gNextFreePaintStruct;
|
||||
extern uint8_t gCurrentRotation;
|
||||
|
||||
void ViewportInitAll();
|
||||
|
|
|
@ -817,7 +817,6 @@
|
|||
<ClCompile Include="object\ResourceTable.cpp" />
|
||||
<ClCompile Include="object\RideObject.cpp" />
|
||||
<ClCompile Include="object\SceneryGroupObject.cpp" />
|
||||
<ClCompile Include="object\SceneryObject.cpp" />
|
||||
<ClCompile Include="object\SmallSceneryObject.cpp" />
|
||||
<ClCompile Include="object\StationObject.cpp" />
|
||||
<ClCompile Include="object\StringTable.cpp" />
|
||||
|
@ -1028,4 +1027,4 @@
|
|||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -99,7 +99,6 @@ const char* LanguageGetString(StringId id);
|
|||
bool LanguageOpen(int32_t id);
|
||||
|
||||
uint32_t UTF8GetNext(const utf8* char_ptr, const utf8** nextchar_ptr);
|
||||
int32_t UTF8InsertCodepoint(utf8* dst, uint32_t codepoint);
|
||||
bool UTF8IsCodepointStart(const utf8* text);
|
||||
int32_t UTF8GetCodepointLength(char32_t codepoint);
|
||||
int32_t UTF8Length(const utf8* text);
|
||||
|
|
|
@ -46,14 +46,6 @@ bool gDebugStringFormatting = false;
|
|||
#endif
|
||||
|
||||
// clang-format off
|
||||
const StringId SpeedNames[] = {
|
||||
STR_SPEED_NORMAL,
|
||||
STR_SPEED_QUICK,
|
||||
STR_SPEED_FAST,
|
||||
STR_SPEED_TURBO,
|
||||
STR_SPEED_HYPER,
|
||||
};
|
||||
|
||||
const StringId ObjectiveNames[] = {
|
||||
STR_OBJECTIVE_NONE,
|
||||
STR_OBJECTIVE_GUESTS_BY,
|
||||
|
|
|
@ -59,7 +59,6 @@ extern const char* real_names[1024];
|
|||
extern thread_local char gCommonStringFormatBuffer[CommonTextBufferSize];
|
||||
extern bool gDebugStringFormatting;
|
||||
|
||||
extern const StringId SpeedNames[5];
|
||||
extern const StringId ObjectiveNames[12];
|
||||
extern const StringId ResearchFundingLevelNames[4];
|
||||
extern const StringId MarketingCampaignNames[ADVERTISING_CAMPAIGN_COUNT][3];
|
||||
|
|
|
@ -50,19 +50,6 @@ uint32_t UTF8GetNext(const utf8* char_ptr, const utf8** nextchar_ptr)
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts the given codepoint at the given address, shifting all characters after along.
|
||||
* @returns the size of the inserted codepoint.
|
||||
*/
|
||||
int32_t UTF8InsertCodepoint(utf8* dst, uint32_t codepoint)
|
||||
{
|
||||
int32_t shift = UTF8GetCodepointLength(codepoint);
|
||||
utf8* endPoint = GetStringEnd(dst);
|
||||
memmove(dst + shift, dst, endPoint - dst + 1);
|
||||
UTF8WriteCodepoint(dst, codepoint);
|
||||
return shift;
|
||||
}
|
||||
|
||||
bool UTF8IsCodepointStart(const utf8* text)
|
||||
{
|
||||
if ((text[0] & 0x80) == 0)
|
||||
|
|
|
@ -143,11 +143,6 @@ std::string Object::GetString(int32_t language, ObjectStringID index) const
|
|||
return GetStringTable().GetString(language, index);
|
||||
}
|
||||
|
||||
ObjectEntryDescriptor Object::GetScgWallsHeader() const
|
||||
{
|
||||
return ObjectEntryDescriptor("rct2.scenery_group.scgwalls");
|
||||
}
|
||||
|
||||
ObjectEntryDescriptor Object::GetScgPathXHeader() const
|
||||
{
|
||||
return ObjectEntryDescriptor("rct2.scenery_group.scgpathx");
|
||||
|
|
|
@ -315,7 +315,6 @@ public:
|
|||
return _imageTable;
|
||||
}
|
||||
|
||||
ObjectEntryDescriptor GetScgWallsHeader() const;
|
||||
ObjectEntryDescriptor GetScgPathXHeader() const;
|
||||
RCTObjectEntry CreateHeader(const char name[9], uint32_t flags, uint32_t checksum);
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
/*****************************************************************************
|
||||
* Copyright (c) 2014-2023 OpenRCT2 developers
|
||||
*
|
||||
* For a complete list of all authors, please refer to contributors.md
|
||||
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
||||
*
|
||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "SceneryObject.h"
|
|
@ -155,14 +155,13 @@ std::vector<uint8_t> SmallSceneryObject::ReadFrameOffsets(OpenRCT2::IStream* str
|
|||
void SmallSceneryObject::PerformFixes()
|
||||
{
|
||||
auto identifier = GetLegacyIdentifier();
|
||||
static const auto& scgWalls = Object::GetScgWallsHeader();
|
||||
|
||||
// ToonTowner's base blocks. Put them in the Walls and Roofs group.
|
||||
if (identifier == "XXBBCL01" ||
|
||||
identifier == "XXBBMD01" ||
|
||||
identifier == "ARBASE2 ")
|
||||
{
|
||||
SetPrimarySceneryGroup(scgWalls);
|
||||
SetPrimarySceneryGroup(ObjectEntryDescriptor("rct2.scenery_group.scgwalls"));
|
||||
}
|
||||
|
||||
// ToonTowner's Pirate roofs. Make them show up in the Pirate Theming.
|
||||
|
@ -171,17 +170,11 @@ void SmallSceneryObject::PerformFixes()
|
|||
identifier == "TTPRF10 " ||
|
||||
identifier == "TTPRF11 ")
|
||||
{
|
||||
static const auto& scgPirat = GetScgPiratHeader();
|
||||
SetPrimarySceneryGroup(scgPirat);
|
||||
SetPrimarySceneryGroup(ObjectEntryDescriptor("rct2.scenery_group.scgpirat"));
|
||||
}
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
ObjectEntryDescriptor SmallSceneryObject::GetScgPiratHeader() const
|
||||
{
|
||||
return ObjectEntryDescriptor("rct2.scenery_group.scgpirat");
|
||||
}
|
||||
|
||||
void SmallSceneryObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
{
|
||||
Guard::Assert(root.is_object(), "SmallSceneryObject::ReadJson expects parameter root to be object");
|
||||
|
|
|
@ -38,5 +38,4 @@ private:
|
|||
static std::vector<uint8_t> ReadFrameOffsets(OpenRCT2::IStream* stream);
|
||||
static std::vector<uint8_t> ReadJsonFrameOffsets(json_t& jFrameOffsets);
|
||||
void PerformFixes();
|
||||
ObjectEntryDescriptor GetScgPiratHeader() const;
|
||||
};
|
||||
|
|
|
@ -49,7 +49,6 @@ extern uint8_t gSceneryQuadrant;
|
|||
|
||||
extern money32 gSceneryPlaceCost;
|
||||
extern ScenerySelection gSceneryPlaceObject;
|
||||
extern uint16_t gSceneryPlaceObjectEntryIndex;
|
||||
extern int16_t gSceneryPlaceZ;
|
||||
extern uint8_t gSceneryPlaceRotation;
|
||||
|
||||
|
|
Loading…
Reference in New Issue