Skip to content

Conversation

@Gymnasiast
Copy link
Member

No description provided.

@github-actions github-actions bot added build Pertains to compilation, language standard, external dependencies. plug-in Related to the plugin system of OpenRCT2. map generator Pertaining to the map generator component actions paint labels Jan 25, 2026
@Gymnasiast Gymnasiast force-pushed the refactor/colour-as-strong-enum branch 3 times, most recently from e23da59 to e6075e2 Compare January 25, 2026 17:00
@Gymnasiast Gymnasiast force-pushed the refactor/colour-as-strong-enum branch from e6075e2 to 9bf2a09 Compare January 26, 2026 21:07
Comment on lines +259 to +261
uint8_t trackPrimaryColour; // 0x01E
uint8_t trackSecondaryColour; // 0x01F
uint8_t trackSupportColour; // 0x020
Copy link
Member

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?

Copy link
Member Author

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.)

Copy link
Member

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?

Copy link
Member Author

@Gymnasiast Gymnasiast Jan 27, 2026

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.

@Gymnasiast Gymnasiast force-pushed the refactor/colour-as-strong-enum branch from 9bf2a09 to 8ac01ba Compare January 27, 2026 21:26
@Gymnasiast Gymnasiast added network version Network version needs updating - double check before merging! changelog This issue/PR deserves a changelog entry. labels Jan 27, 2026
@Gymnasiast Gymnasiast force-pushed the refactor/colour-as-strong-enum branch from 8ac01ba to aa6025a Compare January 27, 2026 21:56
@Gymnasiast Gymnasiast added this to the v0.4.31 milestone Jan 27, 2026
@Gymnasiast Gymnasiast enabled auto-merge (squash) January 27, 2026 21:57
@Gymnasiast Gymnasiast merged commit 343c7a7 into OpenRCT2:develop Jan 28, 2026
25 checks passed
@Gymnasiast Gymnasiast deleted the refactor/colour-as-strong-enum branch January 28, 2026 11:40
matheusvb3 pushed a commit to matheusvb3/OpenRCT2 that referenced this pull request Jan 31, 2026
janisozaur added a commit that referenced this pull request Feb 1, 2026
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

actions build Pertains to compilation, language standard, external dependencies. changelog This issue/PR deserves a changelog entry. map generator Pertaining to the map generator component network version Network version needs updating - double check before merging! network paint plug-in Related to the plugin system of OpenRCT2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants