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

159 Commits

Author SHA1 Message Date
Duncan
e09f27df3c Rename snake_case Class names (Remaining Bits) (#19237)
* Rename snake_case Class names

* Clang format

* Fix build issues
2023-01-21 19:57:17 +00:00
Duncan
859b071ddc Rename classes with snakes OpenRCT2/A*-F* (#19215)
* Rename classes with snakes OpenRCT2/A*-F*

* Clang format files
2023-01-19 08:16:44 +00:00
Hielke Morsink
6b7dc8fcdb Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Duncan
8504c8d05e Finish Removing snake_case from Drawing Methods 2023-01-16 22:31:34 +00:00
Gymnasiast
5309c80e29 Remove snake_case in interface folder 2023-01-16 22:20:41 +01:00
Hielke Morsink
6dafbbfb65 Rename global window functions to TitleCase (#19167) 2023-01-16 20:13:42 +00:00
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
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
Duncan
482971710d Apply code style to context functions 2022-11-06 21:49:07 +01:00
Hielke Morsink
5fa53ad528 Rename global config functions to use TitleCase 2022-10-16 21:46:08 +02:00
Hielke Morsink
abac080d3e Rename public general config data members 2022-10-16 21:46:01 +02: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
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
Michał Janiszewski
a9fe4da279 Use SDL_ShowMessageBox's 'close' value for dummy UI context 2022-08-04 18:42:34 +02:00
Michał Janiszewski
a6e84fab5c Add a message box with buttons to UiContext 2022-08-04 18:42:33 +02:00
Raymond Zhao
7399163a3c Use more smart ptrs and u8strings (#17611)
* Use smart ptr for PlatformUiContext and WindowManager

* Remove more delete calls

* Apply PR feedback
2022-07-28 18:19:38 +01:00
Cory Sanin
05f1007dd9 Fix #16989: Re-focusing maximised window triggers a restore and maximise
Fixes #16989 by removing an SDL hack. Originally added to address issue #2158, I can't reproduce this issue with the hack removed. Tested on Linux (by CorySanin) and Windows (by Broxzier).
2022-07-02 21:48:43 +02:00
Hielke Morsink
1fc2312abd Move most command logic from sequence player
This commit also moves everything related to the OpenRCT2::Title namespace.

Can be compiled with ENABLE_SCRIPTING disabled.
2022-06-28 21:57:26 +02:00
Ted John
585ebed600 Fix #17297: Crash when switching language (#17370)
* Refactor all uses of IAudioChannel and the audio mixer.
* Use shared_ptr to avoid dead pointers hanging about.
* Reload particular audio channels where necessary after object reload.
2022-06-27 17:41:53 +01:00
Ted John
b441cf768c Log SDL2 version on startup 2022-05-10 21:54:04 +02:00
Tulio Leao
397bc51e68 Rename _sdlfsFlags to _sdlFullscreenFlags 2022-03-18 00:38:26 -03:00
duncanspumpkin
f835a5b521 Apply clang-tidy to static variables 2022-03-18 00:38:26 -03:00
Michael Steenbeek
5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Gymnasiast
98cd39a375 Always use SNN for non-integer scaling 2022-01-24 17:46:22 +01:00
ζeh Matt
94e20ba7fe Rename some Update functions to Tick 2021-12-13 19:04:48 +02:00
Hielke Morsink
9dd20ec619 Improve array formatting
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02:00
ζeh Matt
05e58cda11 Merge pull request #15538 from ZehMatt/feature/parallel-draw
Implement multithreaded drawing
2021-10-09 05:53:48 -07:00
Gaven Rendell
86cf0dc916 Remove Windows check 2021-10-08 21:27:48 +01:00
Gaven Rendell
33fa31e6d0 Exclude Win/Mac from ignoring mod key 2021-10-08 21:25:36 +01:00
Gaven Rendell
7787bb46e0 Handle mod key edge-cases in tiling WMs
This commit ignores keypresses when the mod key is held.

The reasoning is that an odd interaction happens between SDL applications and
tiling window managers. Tiling window managers like Xmonad and i3 usually use
the mod ("windows") key and a number to change workspaces. When changing
workspaces, however, the WMs still send the number key through instead of
"eating" it. It's not clear why, exactly, but it seems universal.

Mod+1 -> Goes to workspace #1
Mod+2 -> Goes to workspace #2
...
Mod+9 -> Goes to workspace #9

Most applications don't even see the number key being sent, so if you move to
workspace 1, Firefox won't type "1" into the browser bar, Vim won't type "1"
into your file, etc. But SDL applications, for whatever reason, DO see this
keydown. Of course, they'll handle it like a regular key press. So if you move
to workspace 1, which contains OpenRCT, it inadvertently toggles x-ray mode.

I first found this bug in another SDL game, The Powder Toy. After some
discussion with the devs, they fixed it like this, by ignoring keydown events
when the mod key is pressed, since the mod key is reserved for the window
manager anyway. It works well and should be in the next release.

c7619387ac...93b920a57f

I did the same thing here.
2021-10-08 21:25:33 +01:00
ζeh Matt
a0e7752f26 Pass rct_drawpixelinfo explicit to avoid races 2021-10-06 23:48:07 +03:00
Hielke Morsink
c887a049d2 Fix various Cppcheck warnings (#15081) 2021-07-24 23:41:50 +02:00
Ted John
b3f6437092 Apply suggestions from code review 2021-02-21 03:14:19 +00:00
Ted John
cacfb8be07 Refactor dead key handling 2021-02-21 03:14:19 +00:00
Gymnasiast
d5eb1cc036 Fix dead key handling
This fixes deadkey handling on at least US International on Linux.
2021-02-21 03:14:19 +00:00
Ted John
59b4be6a12 Move InputManager to UiContext 2021-02-21 03:14:19 +00:00
Ted John
e7ae9f9f15 Read legacy shortcuts and move to constants 2021-02-21 03:14:17 +00:00
Ted John
9964df5335 Implement gamepad support 2021-02-21 03:13:28 +00:00
Ted John
c8f31dea7f Process keyboard input events 2021-02-21 03:13:28 +00:00
Ted John
ccae533978 Add input manager 2021-02-21 03:13:27 +00:00
Keith Stellyes
268e39d12a GOG installer extraction for POSIX 2021-01-03 17:53:14 +01:00
Gymnasiast
d963438c4f Check if platform has a file picker 2020-11-08 14:06:42 +01:00
Łukasz Pękalski
88a6a085e4 Close #12455: Refactor MOUSE_STATE to use strong enum (#13361)
* Close #12455: Refactor MOUSE_STATE to use strong enum

refactor: MouseState to strong enum

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-03 18:41:19 -03:00
pizza2004
b0fd5f93d7 Refactor UI/Interface misc to TitleCase (#13354)
* Refactor LandTool to Namespace

* Refactor Theme to TitleCase

* Refactor ViewportInteraction to TitleCase
2020-11-03 10:59:00 +00:00
pizza2004
1643c62939 Refactor UI/Input MouseInput to Title Case 2020-11-02 07:05:33 -07:00
Łukasz Pękalski
9dcbf6d4e6 Close #4865: Offer an option to disable inhibiting the monitor power (#13243)
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2020-10-20 22:02:44 +02:00
Aidan Waite
d287653cb5 Fix #4022: Mac cursor offset on launch (#13095)
Update config when forcing windowed mode
2020-10-17 11:57:03 +02:00
Julia Pinheiro
cba1d48226 Close #12408: Refactor CURSOR_ID to use strong enum 2020-10-11 18:01:14 +02:00
Julia Pinheiro
8800c32e52 Close #12404: Refactor DRAWING_ENGINE to use strong enum (#13070) 2020-10-02 22:41:30 -03:00
Michał Janiszewski
0ae86d0558 Don't use empty resolutions (#12980) 2020-09-20 23:13:10 -03:00