Commit Graph
21 Commits
Author SHA1 Message Date
Richard Fine 41b1cd01bc Refactor: more use of the Direction type and helpers (#27237)
Advance adoption of the 'Direction' type for cardinal directions:

* Split `Direction` and its helpers out to their own header (`Direction.h`)
* Replace loops that iterate all four directions with range-based loops
* Replace some math with calls to helper functions. I also introduced a new `DirectionRotate()` function, a generalisation of `DirectionNext()`/`DirectionPrev()`.
* Replace `uint8_t`/`int32_t` with `Direction` in some function signatures and field types, if the thing being passed/stored is supposed to be a cardinal direction

In the process I also fixed two defects in the code:
* The bitmask used to select the direction from a TD6EntranceElement was too wide - it was grabbing the low 4 bits, but only needs the low 2.
* `CoordsXYZD.toTileCentre()` was taking the tile corner and adding a `CoordsXYZD` value to it, to add half-tile offsets to X and Y. So, it's more correct to add a `CoordsXY` value instead, and skip the unnecessary Z and D dimensions.
2026-10-11 11:26:19 +02:00
Michael Steenbeek ed32dddd48 Close #16014: Allow recolouring of terrain surfaces/edges (#27151) 2026-09-27 16:13:27 +00:00
James Cranston 42dd7e5d0e Improve default station selection logic (#26812)
Legacy object selections can leave station object slot zero empty.  Use the first loaded station object as the fallback.
2026-09-23 22:01:33 +00:00
Gymnasiast 83cbac90ec Move stuff that affects the whole screen/viewport out of Drawing.{cpp,h} 2026-09-06 19:40:56 +02:00
Gymnasiast 5491820d02 Move game palette-related stuff into Palette.{cpp.h} 2026-09-06 18:46:07 +02:00
Aaron van Geffen 21e37e12f9 Rework EditorBottomToolbar into EditorStepController (#26961)
* Rename EditorBottomToolbar to EditorStepController

* Split off EditorStatusLine to its own window

* Simplify step/jump functions by making them static

* Split EditorStepController into two instances

* Resize new editor panels when game window is resized

* Move kEditorStepNames defs into EditorController to share between windows
2026-08-29 20:23:20 +00:00
Harry Hopkinson 35898a258c Refactor TRACK_ELEMENT_*_MASK and ObjectSelectionFlag to constexpr/enum class (#26986) 2026-08-27 17:30:36 +02:00
Michael Steenbeek a74f7437b9 Rename symbols of Peep (#26949) 2026-08-17 23:42:30 +02:00
Gymnasiast 7b1b014fce Create enum class for EntranceSequence 2026-08-12 18:42:22 +02:00
Gymnasiast d943171fae Create enum class for EntranceType 2026-08-12 16:16:07 +02:00
Gymnasiast 631804fd13 Make WallElement members adhere to code style 2026-08-12 15:17:55 +02:00
Gymnasiast 25865dce31 Make SurfaceElement members adhere to code style 2026-08-12 15:17:44 +02:00
Gymnasiast d3c54532ca Make SmallSceneryElement members adhere to code style 2026-08-12 15:17:39 +02:00
Gymnasiast 2f9db0a5d4 Make PathElement members adhere to code style 2026-08-12 15:17:34 +02:00
Gymnasiast 95025ba916 Make LargeSceneryElement members adhere to code style 2026-08-12 15:17:29 +02:00
Gymnasiast 4af2e9d1fd Make EntranceElement members adhere to code style 2026-08-12 15:17:23 +02:00
Gymnasiast be98df4081 Make BannerElement.h adhere to code style 2026-08-11 22:19:46 +02:00
Harry Hopkinson f967ebc2d2 Remove openrct2/scenes includes 2026-08-07 23:54:08 +01:00
Michael Steenbeek 1be4d6d94b Update TileElementType to use new codestyle (#26766) 2026-07-09 17:50:25 +00:00
Aaron van Geffen 35180cbefe Fold remaining Editor unit into EditorController 2026-06-27 14:49:12 +02:00
Aaron van Geffen 2e4f21b1b0 Rename EditorObjectSelectionSession to EditorController and namespace (#26729)
* Rename EditorObjectSelectionSession to EditorController

* Move EditorController into Editor namespace
2026-06-30 22:56:35 +02:00