Commit Graph
295 Commits
Author SHA1 Message Date
Hielke Morsink 7f29e4e39c Make rct_windowclass strong type WindowClass
This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
2022-08-21 18:38:25 +02:00
Hielke Morsink d05d675ed9 Refactor window functions to take references 6 2022-07-31 17:23:17 +02:00
Michael Steenbeek 0bfc151ab9 Remove remaining usages of gGameCommandErrorText 2022-07-30 18:04:59 +02:00
Raymond Zhao 71ad3af930 Use more smart pointers in openrct2-ui (#17582)
* Use more smart ptrs

* Use move instead of copy ctor
2022-07-22 11:48:43 +01:00
Ted John 9f96b0df33 Separate map.change and map.changed events
Also fix network plugin logic.
2022-03-21 23:09:40 +00:00
Ted John 84fdd44e6a Add map changed hook 2022-03-21 21:42:30 +00:00
Ted John dbf83f018c Implement lifetime logic of transient plugins 2022-03-21 21:42:30 +00:00
Ted John 90718ca81c Refactor patrol area class to new file 2022-03-11 18:39:04 +00:00
Silent 159a76d7ec Refactor uses of safe_strcat_path 2022-03-10 20:18:17 +01:00
Ted John b7b8816db7 Add plugin hook for map save 2022-03-07 21:40:48 +01:00
Michael Steenbeek c334c7a176 Merge pull request #16724 from Gymnasiast/refactor/remove-path_get_filename
Remove four old path functions
2022-03-02 22:25:08 +01:00
Hielke Morsink 6ba0a3bd49 Use u8 strings when dealing with file paths 2022-03-01 22:12:39 +01:00
Gymnasiast 33edc59883 Replace path_remove_extension() 2022-02-26 18:26:24 +01:00
Gymnasiast 49b414a40e Replace calls to path_get_filename() 2022-02-26 17:20:07 +01:00
Hielke Morsink f47c1b9f96 Close #16468: Use TIdentifier for StationIndex 2022-02-18 23:11:07 +02:00
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
ζeh Matt 52047805db Use correct type for EntityId and fix issues 2022-02-16 18:56:43 +02:00
ζeh Matt d7f5003943 Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02:00
Ted John 454bfb0a8f Refactor map size to allow for rectangle maps 2022-02-14 23:15:59 +00:00
ζeh Matt 06e430157f Use RideId::GetNull and RideId::IsNull over constant 2022-02-12 18:11:18 +02:00
Duncan 5157b57a15 OpenRCT2 Limits (#16088)
* Move over max rides to limits file

* Move max stations to limits file

* Move over max inversions, golf holes, helices, custhistsize

* Move over max trains per ride

* Bring over Max cars per train and max circuits per ride

* Port over NumColourSchemes and max vehicle colours

* Fix compilation

* Move over max awards

* Move over max peep spawns and park entrances

* Fix rebase issues

* Remove future work

* Switch style

* Update copyright
2022-02-01 20:59:48 +00:00
Michael Steenbeek f43a4344ce Remove platform_get_user_directory() (#16530) 2022-01-29 09:01:05 -03:00
Michael Steenbeek 149b164ee8 Use u8string for custom paths 2022-01-27 14:21:46 +01:00
Michael Steenbeek 4192fc5cc8 Fix leftover references to SC6 2022-01-24 20:03:20 +01:00
Gymnasiast eb2b0c1537 Move platform_update_palette() to Drawing.cpp 2022-01-16 13:17:54 +01:00
Gymnasiast 6bcf848b2f Use C++ filesystem for more file/path functions 2022-01-08 19:07:48 +01:00
Gymnasiast 919c73d030 C++-ify most path handling 2022-01-08 16:58:57 +01:00
Duncan ee297e9ed3 Fix #16287: Incorrect sv6 extension using console or system browser 2021-12-22 16:19:02 +01:00
Duncan 7037524759 Remove and cleanup RCT2 string code 2021-11-28 22:53:40 +01:00
Duncan cc22b584fd Introduce RCT2 namespace (#16037)
* Introduce RCT2 namespace

* Drop RCT2:: prefix where possible

* Drop RCT2 from structure names

* Reduce header includes
2021-11-28 16:51:38 +00:00
Duncan eba42a9584 Introduce Limits headers. (#15329)
* Move RCT12 limits to seperate file and namespace

* Remove prefix from constants

* Add rct1 limits file

* Rename constants to remove prefix

* Add RCT2 limits file

* Remove RCT2 prefix from constants

* Move constant to correct header

* Fix rebase mistakes

* Drop prefix
2021-11-27 16:20:05 +00:00
ζeh Matt 9f23449ffb Move Staff/Guest/Peep to entity 2021-11-26 18:26:19 +02:00
ζeh Matt 03fb9b390f Rename Sprite to EntityRegistry 2021-11-24 17:04:12 +02:00
ζeh Matt 7c726e2a0c Fix includes 2021-11-24 16:48:33 +02:00
ζeh Matt c6242fd310 More renaming 2021-11-24 15:50:18 +02:00
Cory Sanin 68ee0a7804 Use .park file extension for save_park or autosave (#15957)
Use correct file extension when saving from the console or when performing an autosave. Otherwise .park files are generated with the old .sv6 extension.
2021-11-22 09:41:44 +00:00
34128dc262 Add new .park save format
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
2021-11-21 22:43:22 +01:00
Michał Janiszewski 6067048fd5 Reduce inclusion of NewsItem.h 2021-10-09 22:12:18 +02:00
Michael Steenbeek 317e562845 Merge pull request #15495 from ZehMatt/refactor/xyz-access
Use GetLocation in more places
2021-10-01 14:02:34 +02:00
Hielke Morsink 429e34d7f3 Make uses of window_get_main use (const) auto* 2021-09-30 14:36:06 +02:00
Hielke Morsink 94144bcd89 Remove some dead code
Reported by clang
clang-analyzer-deadcode.DeadStores
2021-09-30 10:40:32 +02:00
ζeh Matt eb2de0222b Use GetLocation in more places 2021-09-28 03:16:04 +03:00
Silent 94da3cf422 Fix #13445: Make FileScanner::ScanDirectory return a unique_ptr
Also fixes a resource leak in TitleSequence::GetSaves.
2021-05-20 19:22:36 +02:00
Ted John c63e072974 Fix logging of replay info to stdout (#14430)
Use Console::WriteLine and replace \n with \r\n.
2021-05-09 19:11:04 +01:00
Duncan df7a284822 Entity type 2: Remove sprite_identifier (#14334)
* Start changing the underlying type

* Further work

* Complete refactor

* Further cleanup

* Remove pointless check

* Increment network and plugin versions

* Add defaults

* Further defaults

* Fix test paint

* Update replays
2021-03-17 08:04:41 +00:00
Duncan 6ec379cd0e Split Entity Lists by Entity type (#14326)
* Make initial changes to add entity type

* Make further corrections

* Revert header changes

* Fix mistakes
2021-03-16 11:18:06 +00:00
Michał Janiszewski ac6e4fc0d6 Move SPRITE_INDEX_NULL, MAX_SPRITES to their new homes 2021-02-25 10:56:27 +01:00
Ted John 1523597b50 Fix test failures 2021-02-16 20:25:11 +00:00
Ted John 3f5698b1e0 Fix REPL write line on Linux 2021-02-16 20:24:51 +00:00
Matt 1aa75f04b7 Add templated version for tile element insertion and cleanup code 2021-02-05 12:22:34 +02:00