1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00
Commit Graph

202 Commits

Author SHA1 Message Date
Aaron van Geffen
225d3bda2c ParkImporter: rename GetDetails to PopulateIndexEntry 2025-02-18 15:53:53 +01:00
orbifant
e77d9c0c30 Fix #23743: Park with > 32k guests goal not in scenario list
Creating the scenario cache file tried to read the guest count as signed 16 bit value which doesn't work for values > 32k.  In addition ObjectiveArg3 (variable to store guest count) is an signed value, unable to store 50k guests.
2025-03-01 19:51:10 +00:00
Aaron van Geffen
a380413c56 Remove Scenario.h include from many units (#23901)
* Reduce includes/dependencies for Scenario.h

* Remove Scenario.h include from many units
2025-03-01 17:32:32 +01:00
Aaron van Geffen
cb3dd87943 Drop unused parameter from GetLegacyPeepAnimationObjects (#23877) 2025-02-22 16:52:41 +00:00
Briar
376cb7980c Fix #9999-#10003: translations have truncated strings
This issue, along with several related language-specific
trunctions, was traced back to the fact that ScenarioIndexEntry
uses a fixed-length array of utf8 characters to store the name,
internal name, and scenario details. In some cases, this does
not provide enough characters to contain the full description
and so the safe copy methods truncate them to fit in the
available buffer.

Since the use of fixed-size arrays is a holdover from earlier
C code, this commit addresses the issue by changing ScenarioIndexEntry
to use proper utf8 strings and string views, which do not require
truncation.
2025-02-15 00:18:24 +01:00
Aaron van Geffen
bb94ee8bc0 Rename ObjectType enum to follow recent code style (#23810) 2025-02-13 23:07:55 +01:00
Aaron van Geffen
6933af25ae Rename 'Climate' properties to Weather (#23786)
* Rename ClimateState to WeatherState

* Rename ClimateCurrent to WeatherCurrent

* Rename ClimateNext to WeatherNext

* Rename ClimateUpdateTimer to WeatherUpdateTimer

* Use named initialisers for weather state import in S4/S6 importers

* Rename S4::ClimateTimer to WeatherUpdateTimer as well

* Rename WeatherState struct properties to lowerCamelCase
2025-02-13 07:38:45 -03:00
Aaron van Geffen
2302f0d2e3 Rework Localisation includes (#23789)
* Clean up internal localisation header includes

* Remove some external localisation includes

* Remove dependency on FormatCodes.h from InteractiveConsole.h

* Reduce Formatter.h, Localisation.Date.h includes
2025-02-07 22:36:42 +01:00
Aaron van Geffen
cf448753c1 Move WindowInvalidate and WidgetInvalidate families into WindowManager (#23692)
* Move WindowInvalidate and WidgetInvalidate families into WindowManager

* Use InvalidateWidget shorthand in more places

* Cut back on UiContext includes

* Cut back on Window.h includes

* Remove outdated parameter comments
2025-01-25 13:46:08 +01:00
Michael Steenbeek
b0c99fcb6c Refactor more constants to kConstant notation 2025-01-22 16:16:55 +00:00
Aaron van Geffen
a8773dd805 Move WindowClose family into WindowManager (#23646)
* Replace WindowClose() calls with Close method calls where possible

* Move WindowClose family into WindowManager

* Remove UpdateSceneryGroupIndexes hack
2025-01-19 18:49:18 +01:00
Michael Steenbeek
be9f27e4f9 Mass rename constants (#23656) 2025-01-19 15:59:45 +00:00
Aaron van Geffen
90143b2e38 Address review comments 2025-01-09 12:34:45 +01:00
Aaron van Geffen
a786c89603 Start working on peep entity animation object conversion 2024-12-02 17:15:51 +01:00
Aaron van Geffen
fb9a5239b2 Introduce peep animation objects to object selection window 2024-11-25 17:57:15 +09:00
Aaron van Geffen
fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Aaron van Geffen
35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Aaron van Geffen
4f32028e01 Move RideManager struct into its own compilation unit (#23379)
* Move RideManager struct into its own compilation unit

* Move RidesEndOfUsedRange into GameState_t

* Let RideManager keep a GameState_t& internally
2024-12-11 15:54:45 +01:00
Aaron van Geffen
f90954b1a4 Reduce dependencies for Research.h (#23268) 2024-11-25 14:32:16 +00:00
Aaron van Geffen
f8ea776dba Rework AppendRequiredObjects to take a std::string_view instead 2024-10-30 22:58:47 +01:00
Aaron van Geffen
80b63a5ae7 Add line breaks after template declarations (#23086)
* Add line breaks after template declarations

* Additional clang-format patches
2024-10-29 16:54:01 +01:00
Michael Steenbeek
a2ed026264 Split up remaining tile elements 2024-10-15 22:02:31 +02:00
Michael Steenbeek
71ce725a2a Split off BannerElement and TrackElement (#22955) 2024-10-14 14:26:10 +02:00
Aaron van Geffen
931f0705ce Introduce PeepNamesObjects for 'real' names of peeps (#22758)
* Add initial PeepNamesObject implementation

* Add peep names object to default objects

* Append peep names object to object list for older saves

* Deduplicate AppendRequiredObjects functions

* Remove built-in 'real name' tables

* Increment park version; introduce kPeepNamesObjectsVersion

* Update objects dependency to v1.4.8
2024-09-29 15:05:55 +02:00
Michael Bernardi
fbf95075f7 Bump PARK_FILE_MIN_VERSION 2024-09-27 04:41:54 +10:00
Michael Bernardi
ab558c931a Increase park rating history size from 8 bits to 16 bits 2024-09-27 04:32:33 +10:00
Harry Hopkinson
2fe36661ab Refactor Limits.h constants to kCamelCase 2024-09-24 20:43:18 +00:00
Aaron van Geffen
584f6b8661 Rename Peep::SpriteType to AnimationGroup 2024-09-22 16:54:33 +02:00
Aaron van Geffen
b70aaea31e Rename ActionSpriteImageOffset to AnimationImageIdOffset 2024-09-22 16:13:49 +02:00
Aaron van Geffen
24b36915ef Rename ActionFrame to AnimationFrameNum 2024-09-22 16:12:04 +02:00
Aaron van Geffen
ee7bb61bb0 Rename WalkingFrameNum to WalkingAnimationFrameNum 2024-09-22 16:10:04 +02:00
Aaron van Geffen
2edf8b472a Rename (Next)ActionSpriteType to (Next)AnimationType 2024-09-22 16:08:58 +02:00
Gymnasiast
c0720d608f Make pre-existing wooden flat-to-steep pieces invisible 2024-09-20 21:34:28 +02:00
Aaron van Geffen
cf516db6dc Split StringTypes.h off from String.hpp; adjust header includes 2024-09-10 23:55:53 +02:00
Harry Hopkinson
5f0d657bf2 Move gScenarioFileName to GameState 2024-09-07 12:20:32 +02:00
Aaron van Geffen
960bea7aae Prefer using passed game state in save import classes (#22682)
* Wrap global game state in a unique_ptr

* Make ImportTileElements, SetTileElements use game state passed

* Make ImportParkName, ImportSavedView use game state passed

* Make ImportPeepSpawns use game state passed

* Make FixEntrancePositions use game state passed
2024-09-06 23:04:14 +02:00
Harry Hopkinson
4744c7416d Refactor object and network constants to kCamelCase 2024-08-11 20:21:24 +00:00
Aaron van Geffen
6de514c387 Address minor code style violation in unsigned suffix (#22306) 2024-07-15 21:16:30 +02:00
Aaron van Geffen
3d5c19de08 Drop Localisation.h include where not required 2024-07-13 13:33:32 +02:00
Aaron van Geffen
3fd91038c3 Rename Date.h to Localisation.Date.h to match unit file 2024-07-12 22:18:43 +02:00
Aaron van Geffen
8cef18cd2f Include cassert as needed at unit level 2024-07-09 16:43:03 +02:00
Aaron van Geffen
51873dc0f6 Include Diagnostic.h at unit level 2024-07-09 16:23:31 +02:00
Gymnasiast
64230380af Sync more TrackDesign fields with their Ride counterparts 2024-07-04 00:29:41 +02:00
Gymnasiast
56accb3790 Use RatingTuple across the codebase 2024-07-04 00:29:40 +02:00
Gymnasiast
2c7d2fff7c Move track design appearance to its own struct 2024-07-02 22:35:19 +02:00
Harry-Hopkinson
c829854b88 Rename MaxAwards to kMaxAwards 2024-05-27 07:42:25 +00:00
Harry Hopkinson
3c04e67ece Refactor constant notation in Limits.h 2024-05-26 17:54:31 +02:00
Harry Hopkinson
ef8618209e Move gMarketingCampaigns to GameState_t 2024-05-17 21:20:27 +02:00
Claudio Tiecher
10a5d790c6 Part of #21421: replace define with constexpr (#21760)
* Part of #21421: refactor TUNNEL_MAX_COUNT

* Part of #21421: deleted unused OBJECT_SELECTION_NOT_...

* Part of #21421: refactor MAX_SERVER_DESCRIPTION_LENGTH

* Part of #21421: refactor EXPENDITURE_TABLE_MONTH_COUNT

* Part of #21421: refactor FINANCE_GRAPH_SIZE

* Part of #21421: refactor NETWORK_STREAM_VERSION and _ID

* Part of #21421: MONEY_STRING_MAXLENGTH

* Part of #21421: deleted MAX_USER_STRINGS

* Part of #21421: refactor USER_STRING_MAX_LENGTH

* Part of #21421: deleted USER_STRING_END

* Part of #21421: refactor REAL_NAME_START

* Part of #21421: refactor REAL_NAME_END

* Part of #21421: deleted FONT(X) and FONT_OPENRCT2_SPRITE

* Part of #21421: refactor CURRENCY_SYMBOL_MAX_SIZE

* Part of #21421: refactor CURRENCY_RATE_MAX_NUM_DIGITS

* Part of #21421: refactor SCROLLABLE_ROW_HEIGHT

* Part of #21421: refactor ADD_CLAMP_BODY

* Part of #21421: applied clang-format to Util.cpp

* Part of #21421: incorporate feedback from #21760

* Part of #21421: revert to nbsp in Currency.cpp

* Part of #21421: fix merge conflict

* Part of #21421: fix more merge conflict

* Part of #21421: apply clang format

* Part of #21421: using std::numerics for finding bounds

* Part of #21421: fix reference to kAddClampBody

* Part of #21421: improved on comments about AddClamp func

* Part of #21421: apply correct network stream version number

* Part of #21421: apply clang-format
2024-05-09 08:59:03 -03:00
Michael Steenbeek
271a22d00e Merge pull request #21681 from AaronVanGeffen/obj-list-refactor
Move various object list properties out of ObjectTypes header
2024-04-12 11:54:13 +02:00