Change entry index size of Small and Large scenery elements

This commit is contained in:
Gymnasiast 2020-03-04 15:57:54 +01:00
parent 1b38289490
commit 383d5d99e1
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
4 changed files with 13 additions and 13 deletions

View File

@ -56,7 +56,7 @@ DEFINE_GAME_ACTION(SmallSceneryPlaceAction, GAME_COMMAND_PLACE_SCENERY, SmallSce
private:
CoordsXYZD _loc;
uint8_t _quadrant;
uint8_t _sceneryType;
uint16_t _sceneryType;
uint8_t _primaryColour;
uint8_t _secondaryColour;

View File

@ -69,7 +69,7 @@ void LargeSceneryElement::SetIsAccounted(bool isAccounted)
}
}
uint32_t LargeSceneryElement::GetEntryIndex() const
uint16_t LargeSceneryElement::GetEntryIndex() const
{
return EntryIndex;
}
@ -84,7 +84,7 @@ uint8_t LargeSceneryElement::GetSequenceIndex() const
return SequenceIndex;
}
void LargeSceneryElement::SetEntryIndex(uint32_t newIndex)
void LargeSceneryElement::SetEntryIndex(uint16_t newIndex)
{
EntryIndex = newIndex;
}

View File

@ -92,12 +92,12 @@ void SmallSceneryElement::SetSceneryQuadrant(uint8_t newQuadrant)
type |= (newQuadrant << 6);
}
uint8_t SmallSceneryElement::GetEntryIndex() const
uint16_t SmallSceneryElement::GetEntryIndex() const
{
return this->entryIndex;
}
void SmallSceneryElement::SetEntryIndex(uint8_t newIndex)
void SmallSceneryElement::SetEntryIndex(uint16_t newIndex)
{
this->entryIndex = newIndex;
}

View File

@ -359,18 +359,18 @@ assert_struct_size(TrackElement, 16);
struct SmallSceneryElement : TileElementBase
{
private:
uint8_t entryIndex; // 4
uint16_t entryIndex; // 4
uint8_t age; // 5
uint8_t colour_1; // 6
uint8_t colour_2; // 7
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
uint8_t pad_08[8];
uint8_t pad_09[7];
#pragma clang diagnostic pop
public:
uint8_t GetEntryIndex() const;
void SetEntryIndex(uint8_t newIndex);
uint16_t GetEntryIndex() const;
void SetEntryIndex(uint16_t newIndex);
rct_scenery_entry* GetEntry() const;
uint8_t GetAge() const;
void SetAge(uint8_t newAge);
@ -390,18 +390,18 @@ assert_struct_size(SmallSceneryElement, 16);
struct LargeSceneryElement : TileElementBase
{
private:
uint32_t EntryIndex;
uint16_t EntryIndex;
::BannerIndex BannerIndex;
uint8_t SequenceIndex;
uint8_t Colour[3];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
uint8_t pad[2];
uint8_t pad[4];
#pragma clang diagnostic pop
public:
uint32_t GetEntryIndex() const;
void SetEntryIndex(uint32_t newIndex);
uint16_t GetEntryIndex() const;
void SetEntryIndex(uint16_t newIndex);
rct_scenery_entry* GetEntry() const;
uint8_t GetSequenceIndex() const;