Skip to content

Changes scrollbar types to 32 bits to account for very large scroll content sizes#3216

Merged
LeftofZen merged 5 commits intoOpenLoco:masterfrom
LeftofZen:32bitTypesForScrollBars
Aug 20, 2025
Merged

Changes scrollbar types to 32 bits to account for very large scroll content sizes#3216
LeftofZen merged 5 commits intoOpenLoco:masterfrom
LeftofZen:32bitTypesForScrollBars

Conversation

@LeftofZen
Copy link
Copy Markdown
Contributor

@LeftofZen LeftofZen commented Aug 19, 2025

Changes scrollbar types to 32 bits to account for very large scroll content sizes. Changing the height is necessary, but changing the width isn't that necessary since there are no large-horizontally-scrolling windows in the game currently

@LeftofZen
Copy link
Copy Markdown
Contributor Author

Closes #1682

Comment on lines +51 to +56
uint32_t hThumbLeft; // 0x06
uint32_t hThumbRight; // 0x08
int32_t contentOffsetY; // 0x0A
int32_t contentHeight; // 0x0C
uint32_t vThumbTop; // 0x0E
uint32_t vThumbBottom; // 0x10
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.

Just make them all int32_t, the amount of static_casts would be vastly reduced. You probably have to adjust the signature of getScrollSize as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fair point, i've made the changes

@LeftofZen LeftofZen force-pushed the 32bitTypesForScrollBars branch from 7d44cdf to 7c447b9 Compare August 19, 2025 14:11
@LeftofZen LeftofZen force-pushed the 32bitTypesForScrollBars branch from 7c447b9 to 86cdcc4 Compare August 19, 2025 14:12
@LeftofZen LeftofZen added the changelog Requires a changelog entry label Aug 19, 2025
@LeftofZen LeftofZen enabled auto-merge (squash) August 20, 2025 00:00
@LeftofZen LeftofZen disabled auto-merge August 20, 2025 00:01
@LeftofZen LeftofZen merged commit ff5f4d4 into OpenLoco:master Aug 20, 2025
10 checks passed
@LeftofZen LeftofZen deleted the 32bitTypesForScrollBars branch August 20, 2025 00:30
@duncanspumpkin duncanspumpkin added this to the v25.07+ milestone Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Requires a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants