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

147 Commits

Author SHA1 Message Date
Ted John
81d7c3f02b Make tile elements dynamic and resizeable 2021-06-05 21:17:03 +01:00
Duncan
39fcc5d078 Split up Sprite header (#14764)
* Remove fields from rct_sprite union

* more header fun

* Fix guest include
2021-05-29 06:01:32 +01:00
Margen67
66f3f5d52e Partially solve #5165 (#14617) 2021-05-11 12:27:39 +01: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
Gymnasiast
b3bbdcbfd5 Remove hardcoded terrain style constants from RCT1 and MapGen 2021-03-27 17:34:10 +01:00
Duncan
1be7457e30 Use entity list rather than MAX_ENTITIES loop (#14384)
* Use entity list rather than MAX_ENTITIES loop

* Use guest for variable names
2021-03-25 08:08:26 +00: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
Michael Steenbeek
28c680f97f Merge pull request #14163 from Gymnasiast/refactor/get-rtd
Use GetRideTypeDescriptor() in more places
2021-02-26 10:46:38 +01:00
Gymnasiast
44d0e77afb Make all access to RTD table use the bounds checking function 2021-02-26 10:01:00 +01:00
Michał Janiszewski
ac6e4fc0d6 Move SPRITE_INDEX_NULL, MAX_SPRITES to their new homes 2021-02-25 10:56:27 +01:00
Michał Janiszewski
67b61478cf Reduce inclusion of EntityList.h 2021-02-25 10:56:27 +01:00
Ted John
762b6ee816 Refactor viewport interaction flags and add plugin API 2021-02-18 18:10:29 +00:00
ζeh Matt
8eab5d167e Merge pull request #13869 from ZehMatt/feature/timescale
Allow the main game loop to scale the delta time
2021-01-27 06:09:51 +02:00
Duncan
f80531070b Implement EntityLists (#13853)
* Implement EntityLists

* Remove dead code

* Use alternative name for iterator

* Add comments

* Increment network version

* Update replays

* Remove further dead code

* Update replays again
2021-01-21 18:36:34 +00:00
Matt
f684ebd7d9 Allow the main game loop to scale the delta time 2021-01-20 23:13:02 +02:00
Matt
efa1db826e Refactor invalidation logic to be generic to the callee 2021-01-02 16:22:28 +02: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
Ted John
b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Łukasz Pękalski
fc4ad82ac1 resolve: integrated changes from comments 2020-11-11 16:08:39 +01:00
Łukasz Pękalski
dc93cacbee bugHunt: correcting code to compile
code does not compile yet
2020-11-11 16:07:01 +01:00
Łukasz Pękalski
832fd69822 refactor: changed ObjectType enum to strong enum
code does not compile yet
2020-11-11 16:07:01 +01:00
Łukasz Pękalski
6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Michael Steenbeek
58f099a644 Merge pull request #13286 from tupaschoal/research-refactor
Small research releated refactor
2020-11-07 20:18:18 +01:00
Tulio Leao
8a35f27cfc Add converter from RideCategory to ResearchCategory 2020-11-07 11:14:55 -03:00
Tulio Leao
19ab8f1211 Use ResearchCategory Enum for ResearchItem 2020-11-07 11:14:55 -03:00
ju-pinheiro
bb16ca075b Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum 2020-10-27 13:26:27 -03:00
Hielke Morsink
257ada4617 Introduce constant for ticks per month (#13253) 2020-10-20 21:05:27 -03:00
ζeh Matt
645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Gymnasiast
eb2f40f35c Fix typo in WC_EDITOR_OBJECTIVE_OPTIONS 2020-10-11 19:28:25 +02:00
ζeh Matt
54edba2272 Merge pull request #13023 from gsckoco/make_add_news_item_assoc_optional
Make add_news_item assoc optional
2020-09-28 20:28:45 +03:00
Łukasz Pękalski
065da23b3b Close #12437, refactor: RIDE_MODE_* to strong enums (#12833)
* partial refactor: RIDE_MODE_* to strong enums

* Close #12437, refactor: RIDE_MODE_* to strong enums

* chore: code formatting

* refactor: RideMode, change enum names to CamelCase

and resolve casting order.

* chore: refactor due to code formatting

* Close #12437, refactor: RIDE_MODE_* to strong enums

Resolved comments

* chore: Formatting correction.

* Use EnumsToFlags constexpr

* refactor: resolved comments

added newline at the end of file

* refactor: Change case stack to default in Switch

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-09-28 14:09:59 +01:00
gsckoco
391dabc4f9 Made add_news_item argument assoc optional 2020-09-28 12:28:31 +01:00
Michael Steenbeek
3c07a9e49b Allow opening Objective options via console (#13000) 2020-09-27 21:53:31 -03:00
Tulio Leao
c1729c8a87 Merge pull request #12858 from ju-pinheiro/network-strong-enums
NETWORK_PERMISSION and NETWORK_AUTH replaced by strong enums
2020-09-15 08:07:19 -03:00
ju-pinheiro
214620951f Close #12421: Refactor NETWORK_AUTH to use strong enum
Replacing enum NETWORK_AUTH with enum class NetworkAuth.
2020-09-10 19:32:28 -03:00
Jacob Schwartz
fe71ce437d Close #12434: Refactor ENTERTAINER_COSTUME to use strong enum (#12865) 2020-09-08 16:29:18 -03:00
Simon Ellmann
5f3fe62f83 Close #12432: Refactor STAFF_MODE to use strong enum (#12752)
* Refactor STAFF_MODE to use strong enum

Closes #12432

* Change type of gStaffModes to StaffMode
2020-09-02 12:48:40 -03:00
Sidney
5330f7fb86 closes #12445 Refactor CLIMATE to use strong enum (#12551) 2020-08-21 09:43:57 +01:00
ryan-bello
cc2bb33892 changed enum STAFF_TYPE to strong enum StaffType, moved it to Peep.h 2020-08-17 22:59:02 -04:00
ryan-bello
54a33cbde8 renamed StaffType to AssignedStaffType 2020-08-17 20:16:09 -04:00
pizza2004
d217dfa9b9 Refactor NewsItem into namespace and Pascal Case (#12511) 2020-08-02 23:14:00 -03:00
Duncan
733bc5a981 Close #12518: Viewport Refactor (#12541)
* Remove viewport pointer from get_map_coordinates_from_pos

* Removed viewport from get_window

* Return a InteractionInfo from get_map_coord...

* Remove viewport_interaction_info struct

* Add Entity union to simplify code

* Name the enum used for viewport interaction

* Simplify functions further by returning the info struct

* Add default switches
2020-08-02 08:32:59 +01:00
Duncan
c6e26267a4 Reduce the use of GET_VEHICLE (#12494)
* Start removing GET_VEHICLE macro use

* Further work

* Remove further GET_VEHICLE's

* Further removal of GET_VEHICLE

* Remove the last of GET_VEHICLE

* Fix testpaint

* Fix nullptr deref

* Make review changes

Also swapped in helper functions and used a standard patern for iterating the train cars

* Further simplify loops for train cars
2020-07-31 07:48:27 +01:00
Tulio Leao
63f683853e Merge pull request #12479 from pizza2004/news-enum
Refactor NewsItem to use strong enums
2020-07-28 18:21:45 -03:00
pizza2004
cee7f8d34c Close #12397: Refactor NEWS_ITEM_* to use strong enum 2020-07-28 12:54:18 -06:00
Duncan
8a378ad236 Remove uses of GET_PEEP macro and replace with GetEntity (#12467)
* Use TryGetEntity and GetEntity instead of macro

* Use GetEntity for ui guest window

* Remove final GET_PEEP macro uses

* Fix remaining issues
2020-07-26 17:42:02 +01:00
Matt
fa2bd4cad6 Refactor PeepType to use strong enum 2020-07-25 11:54:37 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax
f49149222e Close #12245: Use coords objects for SetLocation (Window_internal.h) 2020-07-16 23:01:42 +02:00