-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Change colour to a strong enum #25873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change colour to a strong enum #25873
Conversation
e23da59 to
e6075e2
Compare
e6075e2 to
9bf2a09
Compare
| uint8_t trackPrimaryColour; // 0x01E | ||
| uint8_t trackSecondaryColour; // 0x01F | ||
| uint8_t trackSupportColour; // 0x020 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the rationale behind moving these to bare ints?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RCT1 colours are different and need mapping. (Ideally, they’d get their own enum, but I think that's best left for another PR.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. The Colour type does seem to be used in other RCT1 instances, which is why it stood out to me. Maybe best to type strongly for now and tackle it altogether later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think it's much worse giving something the wrong strong type than not giving it a strong type at all.
The Colour type does seem to be used in other RCT1 instances
None of the fields in RCT1-specific structures is marked as Drawing::Colour, all of them are plain uint8_t.
9bf2a09 to
8ac01ba
Compare
8ac01ba to
aa6025a
Compare
- Feature: [#25844] The sprite builder now also supports adding JSON-based palettes. - Improved: [#3788] Self-intersecting track designs can now be placed. - Improved: [#25719] The weather change dropdown now shows icons next to the weather types for easier selection. - Improved: [#25765] The ‘View options’ and ‘Special track elements’ dropdowns no longer need click-and-hold. - Improved: [#25858] macOS now supports the onboarding menu. - Improved: [#25882] Maze construction now auto-removes trees. - Improved: [objects#421] The vehicle tab of some rides now shows more of the vehicle. - Change: [#25018] Add upkeep cost to booster pieces. - Fix: [#4643, #25167] Many metal supports draw with a filled in top when they didn’t in vanilla, causing some slight misalignment and glitching. - Fix: [#15009] Landscaping tools do not display estimates when the game is paused (original bug). - Fix: [#18441] Replacing footpaths sometimes results in a spurious “Footpath in the way” error (original bug). - Fix: [#20620] In-game console caret does not update when pasting. - Fix: [#20652] Twister Roller Coaster design ‘u(0241)’ has no preview and cannot be built (bug in track design). - Fix: [#23859] Wrong banner text displayed after loading a different park. - Fix: [#25221] When trying to cancel game file discovery, the prompt reappears. - Fix: [#25703, #25889] Crash when scanning scenarios with packed objects in parallel. - Fix: [#25739] Game freezes when a tab in the New Ride window contains more than 384 items. - Fix: [#25745] Crash when a player connection is aborted early. - Fix: [#25775] Network download sizes are in bytes instead of the listed kibibytes. - Fix: [#25799] The animated options tab icon of the news window does not always redraw. - Fix: [#25850] Guests do not have their happiness penalised by low energy, high hunger, high thirst, high toilet. - Fix: [#25850] Ride nausea generation is different compared to vanilla. - Fix: [#25854] When a guest is at 0 happiness or energy, the game draws too big of a bar in the guest stats window. - Fix: [#25862] Diagonal and inclined brakes are not counted when calculating upkeep cost. - Fix: [#25873] Repainting a banner in OpenRCT2-specific colours results in an error message. - Fix: [#25879] Guest window viewport doesn’t follow vehicle when they board a ride. - Fix: [#25908] Crash from use-after-free in banner text formatting during multithreaded rendering. - Fix: [objects#419] Alignment of RCT2 red, yellow and green queue previews is off. - Fix: [objects#424] Jet Aeroplane decor has a hole in it. - Fix: [objects#425] Capacity of ‘Blob from outer space ride’ is incorrectly listed.
No description provided.