Commit Graph

175 Commits

Author SHA1 Message Date
Duncan 8a8d3105f3
Remove snake_case from first chunk of Drawing (#19164)
* Remove snake_case from first chunk of Drawing

* Address formatting
2023-01-16 13:50:43 +00:00
Michael Steenbeek 412bf8f8be
Use ride references instead of pointers 2023-01-07 14:02:18 +01:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Gymnasiast 38f7c2a159
Allow using ImageId in widgets directly 2022-12-31 15:18:22 +01:00
Gymnasiast 162b01204d
Rename rct_widget to Widget 2022-12-31 15:18:22 +01:00
frutiemax 6d804f5323
Add RIDE_TYPE_FLAG_IS_MAZE 2022-12-14 14:21:21 +01:00
Duncan 482971710d
Apply code style to context functions 2022-11-06 21:49:07 +01:00
Duncan 7dd8989e70
Next chunk of World/Map.h snakes (#18296)
* Next chunk of World/Map.h snakes

* Apply clang-format
2022-10-12 06:35:20 +01:00
Duncan 67bbc8560d
Code style: Remove snakes from everything world apart from Map.h (#18273)
* Remove remaining snakes from world (outside of map)

* Initial few desnaking of Map.h
2022-10-11 19:39:24 +01:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Gymnasiast a088537b65
Rename rct_widgetindex to WidgetIndex 2022-08-21 18:49:23 +02:00
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
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Hielke Morsink a258008bef
Refactor window functions to take references 4 2022-07-31 17:23:16 +02:00
Hielke Morsink 76c1bc8980
Refactor window functions to take references 1 2022-07-31 17:23:15 +02:00
Michael Steenbeek 1a8660d59d
Pass window reference to tool_set (#17625) 2022-07-27 22:22:22 -03:00
Raymond Zhao 4f23e5e9ec
Refactor struct TrackDesignFileRef
- Refactors track_design_file_ref to TrackDesignFileRef and replaces the utf8* fields of that struct with u8string
- Gets rid of some String::Duplicate() and delete calls
- Uses a bunch of c_str() calls to interface with older functions
2022-07-26 16:12:46 +00:00
Ted John 0b9184b99b Avoid overwriting _currentTrackPieceDirection when placing TD 2022-05-10 22:41:09 +01:00
Teodor Sorescu 354f8bf506
Refactor window to class: TrackDesignPlace (#16669)
* Refactor window to class: TrackDesignPlace (#13811)

* Standardise names

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-03-05 15:26:25 +00:00
Ted John da89a4e413
Remove rct_window::enabled_widgets (#16643)
`enabled_widgets` was used to enable input for widgets. However I do not recall anywhere this being used to specifically disable a widget which doesn't use the dedicated `disabled_widgets` flag. I don't think there is any purpose in keeping this, so I have removed all uses of it.
2022-02-13 23:06:19 +00:00
ζeh Matt 4554d6d883
Fix all uses of RideId 2022-02-12 18:11:18 +02:00
ζeh Matt a2470c0573
Rename ride_id_t to RideId 2022-02-12 18:11:18 +02:00
GalBr f2f47aa492
Fix TrackDesignPreviewDrawOutlines using a local struct
TrackDesignPreviewDrawOutlines created and modified a local
TrackDesignState struct, so the calculated information was lost.
Now the function receives a ref to a TrackDesignState struct.
2022-01-15 21:24:59 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Gymnasiast ef6f2cceee
Create RideConstruction.h 2021-12-18 20:27:13 +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
ζeh Matt 83b911b193
#15634: Refactor passing GameActions::Result by copy (#15951)
* Refactor to result GameActions::Result as copy instead of unique_ptr

* Remove alias GameActions::Result::Ptr

* Remove MakeResult wrapper

* Remove type forwarder in TileInspector
2021-11-24 07:35:08 +00:00
Duncan bb2c7dbaca
Clang tidy Part 1: Ui Project Function Names (#15956)
* Add NOLINT around STL using classes and vendor functions

* Apply clang-tidy to ui project function names

* Undo scripting clang-format

* Upper case OpenRCT2 and RCT2
2021-11-23 13:18:07 +00:00
ζeh Matt d1e5a5d977
Refactor last uses of place_virtual_track 2021-10-29 02:06:59 +03:00
ζeh Matt 5ef99ef549
Use TrackDesignPreviewRemoveGhosts over place_virtual_track 2021-10-29 02:06:59 +03:00
ζeh Matt 162b0ce321
Use TrackDesignPreviewDrawOutlines over place_virtual_track 2021-10-29 02:06:59 +03:00
ζeh Matt 4ab6a3721d
Use TrackDesignGetZPlacement over place_virtual_track 2021-10-29 02:06:59 +03:00
ζeh Matt 545b01e7e1
Rename track design functions to PascalCase 2021-10-29 02:06:59 +03:00
ζeh Matt 8e06d84a09
Refactor result passing of TrackDesignAction 2021-10-20 16:08:21 +03:00
Hielke Morsink 9dd9b27db4
Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
ζeh Matt e5eb8f84cf
Apply review suggestions 2021-09-10 19:36:14 +03:00
ZehMatt 3ad72baaae
Cast fixes 2021-09-10 19:10:12 +03:00
Michael Steenbeek 624a32e93b
Make Coords isNull/setNull functions TitleCase (#15382) 2021-09-08 20:48:53 -03:00
frutiemax 450bf61ee4 Part of #13874: TrackSequenceProperties, Pricing and MirrorMap renamed 2021-08-29 10:45:17 -04:00
frutiemax 5f438535ad Part of #13874: Gymnasiast review 2021-08-27 17:57:10 -04:00
frutiemax 046c060e74 Part of #13874: Replace Track Sequence properties 2021-08-22 18:01:03 -04:00
frutiemax 382315b2c3 Part of #13874: Replace block tables 2021-08-22 17:57:56 -04:00
frutiemax 80418efafb Part of #13874: Replace TrackCoordinates 2021-08-22 17:49:00 -04:00
Gymnasiast 676ef7205e
Change all calls to DrawTextBasic to use Formatter 2021-08-01 15:14:43 +02:00
Ted John 77a46a3d34
Another money64 fix 2021-08-01 15:14:42 +02:00
Hielke Morsink e54dc7e466
Use consistent left-shift notation for widgets (#14956) 2021-06-26 14:23:15 +02:00
Ted John 2a0535d966
Fix #13986: OpenGL: Track preview, flip/rotate does not update thumbnail
Invalidate SPR_TEMP so that it is not cached in the OpenGL drawing engine.
2021-04-27 11:30:52 +02:00
Michael Steenbeek 7344b7fbfd
Use 16-bit ride_id_t thoughout and raise RIDE_ID_NULL (#14411)
* Replace RIDE_ENTRY_INDEX_NULL with OBJECT_ENTRY_INDEX_NULL

Ride entries are objects like any other, so there is little point having separate constants.

* Use ride_id_t in many more places

* Change RIDE_ID_NULL to 0xFFFF

* Increment network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-04-01 16:02:57 +01:00
Michael Steenbeek a5a63f839a
Allow passing ImageId into gfx_draw_sprite() 2021-03-23 11:58:09 +01:00
Gymnasiast d5f79b7972
Replace gfx_draw_string_centred() with DrawTextBasic() 2021-02-28 00:23:00 +01:00