1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00
Commit Graph

152 Commits

Author SHA1 Message Date
Gymnasiast
10301507a9 Fix Android 2022-01-08 16:58:57 +01:00
Gymnasiast
e4496c41bd Upgrade platform_sanitise_filename() 2022-01-05 15:26:52 +01:00
frutiemax
adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Hielke Morsink
1ba75205e9 Add comment and use more consistent naming 2021-12-01 00:17:49 +01:00
Hielke Morsink
0f2dffcc16 Apply review suggestions 2021-12-01 00:11:45 +01:00
Hielke Morsink
dbd50d08c6 Split double meaning of "max zoom" in screenshot code
One being the max value, the other being the max amount of zoom levels.
2021-12-01 00:08:41 +01:00
Hielke Morsink
53d9bfa8b4 Update implicit zoom conversions 2021-12-01 00:08:35 +01:00
Sijmen
cec8447c6f Refactor Viewport.cpp to use ScreenRect (#15790) 2021-10-27 00:13:38 -03:00
Hielke Morsink
4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
ζeh Matt
59a6c34db4 Make use of std::optional strict 2021-09-13 20:02:32 +03:00
Cory Sanin
57c950958b Feature: Add option for taking transparent screenshots 2021-02-22 22:48:51 +01:00
Ted John
3f5698b1e0 Fix REPL write line on Linux 2021-02-16 20:24:51 +00:00
skdltmxn
c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09: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
Ghlen Nagels
8c55d1ea9f Close #12446: Refactor WEATHER to use strong enum (#13434) 2020-11-22 17:34:30 +00:00
Matt
091145037e Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Julia Pinheiro
8800c32e52 Close #12404: Refactor DRAWING_ENGINE to use strong enum (#13070) 2020-10-02 22:41:30 -03:00
Matt
ccde06ab0f Explicitly pass formatter arguments to ShowError and family 2020-09-17 22:14:36 +03:00
Gymnasiast
31d20cefb2 Rename rain to weather where appropriate
Co-authored-by: Brett Penzer <brettpenzer123@live.co.uk>
2020-09-14 21:57:54 +02:00
frutiemax
6598ae14aa Close #12457: Rename INTRO_STATE to use PascalCase 2020-07-26 09:32:53 -04:00
frutiemax
0f1788d273 Part of #12457: Refactor INTRO_STATE to use strong enum 2020-07-26 09:25:29 -04: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
Ted John
46bb30f8a1 Refactor rct_palette to GamePalette 2020-05-27 20:52:51 +01:00
Ted John
45d32bec68 [Plugin] Add API for taking captures and giant captures of the park 2020-05-09 13:55:24 +02:00
Duncan
32eb7071a1 Fix #11550: Use std::nullopt instead of empty brace (#11595)
This is technically a gcc bug from the looks of it but since std::nullopt is slightly easier to read I've gone through the codebase and used that over empty braces. In addition noticed a mistake on the scripting viewport get widgetIndex function where it would return an incorrect widgetIndex.
2020-05-02 10:09:12 +02:00
Breno Rodrigues Guimarães
a0619d04cf Replace usage of set_format_arg by Formatter::Common() (#11412) 2020-04-25 18:44:14 -03:00
Michał Janiszewski
2323cc1596 Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Ted John
d34dec9c27 Create ZoomLevel struct to add two new zoom levels 2020-03-23 15:54:03 +00:00
Tulio Leao
2cfac98342 Make gSavedView use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao
09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
Michael Steenbeek
e3f5eb7275 Merge pull request #10847 from tupaschoal/const-ref-coords
Prefer const ref to send (Tile)CoordsXY(ZD) over
2020-03-01 14:38:39 +01:00
Tulio Leao
475eed0a56 Receive CoordsXY by const ref instead of copy 2020-02-29 01:16:19 -03:00
Tulio Leao
1b3f0e9a44 Create ScreenCoordsXY gSavedView from separate x,y variables 2020-02-22 16:01:21 -03:00
Gymnasiast
ca2f37ae7f Remove opt::optional polyfill
std::optional is supported by Xcode 10. The non-polyfill variant was already used in our code, so this is not likely to break anything that wasn't broken before.
2020-02-01 22:25:03 +01:00
Michael Steenbeek
77494bbc73 Create definitions for some coords related stuff (#10456)
* Create definitions for some coords related stuff

* Use constexpr; add define for Z step
2019-12-30 15:03:51 +00:00
Tulio Leao
a2c7ecc6e5 Make Map::map_get_first_element_at() use CoordsXY (#10413)
* Make Map::map_get_first_element_at() use CoordsXY

* Fix clang-format on ClearAction.hpp

* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction

* Use named Direction constants

* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
Matt
d3103b6397 Refactor benchgfx 2019-11-08 08:52:45 +01:00
Ted John
c211292fdd Fix #9941: Giant screenshot's made from command line aren't positioned right 2019-08-26 14:50:47 +01:00
Ted John
8d543a056d Prevent cropping top of giant screenshot (#9934)
Search through every single tile on the map for the highest element in 2D space. Use that as reference for top of screenshot.
2019-08-24 16:33:03 +01:00
Ted John
2dda23d82e Refactor benchgfx 2019-08-21 20:12:26 +01:00
Ted John
f4079434dc Fix #4927: Giant screenshot cut off at bottom and top 2019-08-21 20:11:06 +01:00
duncanspumpkin
927c8a4e85 Create ScreenCoords struct. Refactor 3d_to_2d again 2019-08-19 20:04:58 +01:00
duncanspumpkin
c6452095ca Refactor tile_element_height to use CoordsXY 2019-08-19 20:04:57 +01:00
Duncan
ab5f5b20cd Use enum class for RCT2_SOUND (#9618)
* Use enum class for RCT2_SOUND

* Fix formatting. Fix mistaken declaration.

* Change name of enum to SoundId

* Fix clang format
2019-07-22 19:02:45 +01:00
Ted John
5733d666b3 Do not store park name as a user string 2019-07-21 11:33:15 +02:00
Hielke Morsink
e2d7b2cf03 Use new setting in screenshot command too 2019-06-09 11:03:01 +02:00
Hielke Morsink
5418eb6e34 Add transparency setting to options window 2019-06-09 11:03:01 +02:00
Hielke Morsink
bffc012d16 Implement #1260: --transparent switch for screenshot command 2019-06-09 11:03:00 +02:00
Hielke Morsink
f5ac98c1e2 Early out when context creation fails 2019-06-09 11:03:00 +02:00