1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00
Commit Graph

252 Commits

Author SHA1 Message Date
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
duncanspumpkin
6ed17b4ff9 Remove FOR_ALL_PEEPS/GUESTS/STAFF macros
Replaced with an EntityList iterator

Fix formatting

Fix nullptr issues
2020-06-16 20:27:44 +01:00
duncanspumpkin
904e6c6987 Implement GetSprite and use it in a number of places
This will eventually replace all of the get_sprite and try_get_sprite calls

Further use of GetSprite

Use GetSprite in all remaining easy to use functions

Correct formatting

Rename GetSprite to GetEntity

Make suggested changes

Remove const to allow for building

Fix crashes due to next sprite
2020-06-16 20:21:56 +01:00
Tulio Leao
e54a3d89f2 Rename some Peep member variables to use TitleCase (#11931)
* Rename Peep::destination_tolerance to use TitleCase

* Rename Peep::destination_y to use TitleCase

* Rename Peep::destination_x to use TitleCase

* Rename Peep::trousers_colour to use Title Case

* Rename Peep::tshirt_colour to use TitleCase

* Rename Peep::no_of_rides to use Title Case

* Rename Peep::staff_type to use TitleCase

* Rename Peep::type to use TitleCase

* Rename Peep::sprite_type to use TitleCase

* Rename Peep::sub_state to use TitleCase

* Rename Peep::state to use TitleCase

* Rename Peep::outside_of_park to use TitleCase

* Rename Peep::next_flags to use TitleCase

* Rename Peep::name to use TitleCase

* Rename Peep::NoOfRides to GuestNoOfRides

* Rename Peep::Type to AssignedPeepType

* Rename Peep::GuestNoOfRides to GuestNumRides
2020-06-14 06:31:08 +01:00
Tulio Leao
ccd76f8fc4 Rename Peep::current_ride to CurrentRide 2020-06-08 17:36:35 -03:00
Tulio Leao
c302b16386 Rename Peep::current_ride_station to use TitleCase 2020-06-08 17:36:34 -03:00
Michael Steenbeek
a0c6752ff3 Merge pull request #11882 from tupaschoal/prevent-shadow-peep-4
Rename some Peep member variables to use TitleCase
2020-06-07 23:35:23 +02:00
Michael Steenbeek
9ef8d6da42 Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
Tulio Leao
4cdfccb338 Rename Peep::id to Id 2020-06-06 11:53:51 -03:00
Ted John
626178a70e Add constants for palette indexes 2020-05-28 22:37:50 +01:00
Gymnasiast
11472f909d Convert sprite_move to method 2020-05-13 10:47:32 +02:00
Hielke Morsink
ec0a734511 Fix: Silent replay record message gets overwritten (#11600) 2020-05-02 11:40:21 -03:00
Ted John
c67962577a Rename __ENABLE_SCRIPTING__ to ENABLE_SCRIPTING 2020-04-26 14:35:08 +01:00
Ted John
2f525e0539 Apply more code review comments 2020-04-26 14:35:07 +01:00
Ted John
bac91cd563 Allow scripting to be compile-disabled 2020-04-26 14:35:03 +01:00
Ted John
dc64d3541d Transfer server-client scripts over network 2020-04-26 14:35:03 +01:00
Ted John
e6915e8799 Do not load plugins on title screen 2020-04-26 14:35:01 +01:00
Breno Rodrigues Guimarães
a0619d04cf Replace usage of set_format_arg by Formatter::Common() (#11412) 2020-04-25 18:44:14 -03:00
Tulio Leao
c17127f65b Use named casts on openrct2 root folder (#11139) 2020-04-17 21:36:25 +02:00
Aaron van Geffen
0cbd700290 Warn to console if no autosave could be saved (#11255)
* Warn to console if no autosave could be saved.

* Use std::fprintf as suggested.

* Update src/openrct2/Game.cpp

Co-Authored-By: Michał Janiszewski <janisozaur@users.noreply.github.com>

Co-authored-by: Michał Janiszewski <janisozaur@users.noreply.github.com>
2020-04-12 11:32:39 +02:00