1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00
Commit Graph

271 Commits

Author SHA1 Message Date
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
IntelOrca
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
Matt
71174b8de7 Make the insertion of tile elements type explicit 2021-02-04 19:00:59 +02:00
Ted John
19f0d8dfe9 Fix #13842: News is imported incorrectly 2021-01-20 12:35:11 +01:00
Tulio Leao
af0ec60bed Close #13626: Refactor RCT2LanguageId to strong enum 2020-12-23 20:07:54 -03:00
Adam
f09b14ef2b Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
Łukasz Pękalski
4adf745237 Close #12403: Refactor FILTER_PALETTE_ID to use strong enum (#13273) 2020-12-05 15:13:59 -03:00
Łukasz Pękalski
6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Michael Steenbeek
92a5f1aa24 Merge pull request #13310 from ju-pinheiro/sprite-identifier-strong-enum
Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum
2020-11-06 16:55:01 +01:00
evilclownattack
3277153e87 Fix #13289: Litter and vomit sometimes not loading with RCT1 saves (#13322)
Issue was actually caused by loading RCT1 saves from certain rotations, and fixed by reseting sprite quadrants when loading. Wasn't an issue with RCT2 saves as litter screen coordinates are set directly from the save, rather than calculated based on rotation and sprite width/height.
2020-10-31 11:32:32 +00:00
ju-pinheiro
bb16ca075b Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum 2020-10-27 13:26:27 -03:00
Keith Stellyes
f550f8f5a5 Fix #13282: Autosaves are not deleted when limit is reached 2020-10-25 09:35:42 +01:00
Hielke Morsink
0cf049c2f7 Replace deprecated function call 2020-10-17 20:00:38 +02:00
Hielke Morsink
085a0e9452 Reduce branching and duplicated lines in limit_autosave_count 2020-10-17 20:00:38 +02:00
Matt
091145037e Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Julia Pinheiro
6a76547c5b Close #12412: Refactor PROMPT_MODE to use strong enum (#13076) 2020-10-02 23:04:59 -03:00
Duncan
4ec10837a6 Remove Formatter::Common where not required (#12972)
* Remove Formatter::Common where not required

* Remove common from Guest window where possible
2020-09-27 21:09:08 -03:00
Duncan
2660df85ed Reset sprite spatial index on all inits (#12746) 2020-08-22 05:09:42 +01:00
pizza2004
d217dfa9b9 Refactor NewsItem into namespace and Pascal Case (#12511) 2020-08-02 23:14:00 -03:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Gymnasiast
0dd5b3bbda Clean up current_ride 2020-07-07 21:13:09 +02:00
Duncan
94b3598102 Tiny GetEntity Refactor (#12124)
* Use default template parameter instead of specialising

* Fix null deref issues
2020-07-06 22:02:25 +01:00
duncanspumpkin
e51bbeed23 Convert SPRITE_LIST to an enum class 2020-07-04 07:38:11 +01:00
frutiemax
26ae2dbf04 Part of #11437: Move PlatformFileExists to Platform2.h (#12077) 2020-07-02 12:03:31 -03:00
frutiemax
5ae592ec79 Part of #11437: Move GetDateLocal and GetTimeLocal in Platform2.h 2020-06-28 21:46:14 +02:00
frutiemax
fec55f590f Part of #11159: limit_autosave_count uses std::vector instead of utf8** (#12054) 2020-06-28 09:12:13 +01:00