Skip to content

Close #6326: Add support for RCTC SV6 files with 15000 entities #17878

Merged
Gymnasiast merged 4 commits into
OpenRCT2:developfrom
Gymnasiast:feature/flag15-import
Sep 4, 2022
Merged

Close #6326: Add support for RCTC SV6 files with 15000 entities #17878
Gymnasiast merged 4 commits into
OpenRCT2:developfrom
Gymnasiast:feature/flag15-import

Conversation

@Gymnasiast

Copy link
Copy Markdown
Member

No description provided.

@Gymnasiast Gymnasiast linked an issue Aug 21, 2022 that may be closed by this pull request
@Gymnasiast Gymnasiast requested a review from IntelOrca August 21, 2022 21:47
Comment thread src/openrct2/rct2/Limits.h Outdated
Comment thread src/openrct2/rct2/RCT2.h Outdated
// SC6[6]
uint32_t next_free_tile_element_pointer_index;
Entity sprites[Limits::MaxEntities];
Entity sprites[Limits::MaxEntitiesFlag15];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of doing it like this it means that this isn't the original RCT2 gamestate structure. I'd prefer if you just duplicated the structure and called it S6DataClassic

@Gymnasiast Gymnasiast Aug 23, 2022

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We modified about every RCT structure: rct_ride_object (and all other object types), rct_ride_entry, rct_ride_entry_vehicle, rct_track_design and countless others. I’m not sure why we would suddenly make an exception for this one. (Although I would be interested in undoing the changes to the aforementioned ones and have a clear split between RCT and OpenRCT2 structures. But only if we are consistent about it.)

Also, how would we read the entities from flag 15 files if this field has to remain at 10000? The code references _s6.sprites in quite a few places.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duncanspumpkin if you duplicated the struct, how would you be able to have all the import code work with both? There would be no common base class that you could use.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We modified about every RCT structure: rct_ride_object (and all other object types), rct_ride_entry, rct_ride_entry_vehicle, rct_track_design and countless others. I’m not sure why we would suddenly make an exception for this one. (Although I would be interested in undoing the changes to the aforementioned ones and have a clear split between RCT and OpenRCT2 structures. But only if we are consistent about it.)

Also, how would we read the entities from flag 15 files if this field has to remain at 10000? The code references _s6.sprites in quite a few places.

You'll notice we always kept the original structure with the original size under rct2/1 why does this one justify breaking that convention. In an ideal world it should read an s6 into an s6 structure, s4 into an s4 and a classic into a classic. Then that is converted into an openrct2. We can share the underlying sections.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duncanspumpkin can you show how the code that imports handles both variants of the struct? The only way I can see of it doing it is by adding a template parameter to the import code.

Comment thread src/openrct2/rct2/S6Importer.cpp Outdated
@Gymnasiast Gymnasiast force-pushed the feature/flag15-import branch from c723f81 to d8b5932 Compare August 31, 2022 20:45
@Gymnasiast Gymnasiast merged commit 8709b78 into OpenRCT2:develop Sep 4, 2022
@Gymnasiast Gymnasiast deleted the feature/flag15-import branch September 4, 2022 12:10
@tupaschoal tupaschoal added this to the v0.4.2 milestone Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RCTC parks can have more than 10000 sprites

4 participants