Commit Graph

202 Commits

Author SHA1 Message Date
Hielke Morsink 204dd4439b Mark unused arguments in the libopenrct2 project
For dummy classes and functions with empty bodies I've only commented out the arguments, for all others I used C++17's [[maybe_unused]].
2018-06-06 21:03:11 +02:00
Aaron van Geffen bf44007197 Allow fine-tuning the virtual floor style (#7577)
The virtual floor by @JeroenDStout, introduced in the v0.1.2 release, has generally been well-received. However, some players find it too intrusive in its current appearance (cf. #7221). This PR gives them the option of a toned-down version, rather than having to turn it off completely.

![screenshot_20180528_221350](https://user-images.githubusercontent.com/604665/40628292-6e71358e-62c4-11e8-9293-e166e75d0da6.png)

The clear/transparent style, introduced by this PR, looks like the virtual floor as originally introduced in #6338:
![](https://user-images.githubusercontent.com/14242454/31050274-e3f0e62e-a645-11e7-9b10-ec26b733d631.gif)

The glassy/translucent style is the virtual floor as we've come to know it since the v0.1.2 release, and remains the default setting.
2018-05-30 13:09:50 +02:00
Park Joon-Kyu 30fa405eb3 Make Twitch integration API URL configurable. (#7555) 2018-05-28 22:01:37 +02:00
Ted John 7b610fd3c0 Use shared_ptr more for UiContext in relation to DrawingEngine 2018-05-11 20:37:48 +01:00
Hielke Morsink 8d10bfb5a1 Add namespace closing comments 2018-05-04 22:54:43 +02:00
thyeggman ccb1b330a5 Option for early scenario completion (#7187) 2018-03-20 12:58:59 +01:00
Michał Janiszewski 3303246b09 Reduce header inclusions 2018-03-20 00:27:58 +01:00
Michał Janiszewski 764520076f
Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Hielke Morsink 5115cdddd8 Remove unused screenshot_format configuration 2018-03-09 15:58:29 +01:00
Hielke Morsink 55979a3fff Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +01:00
Ted John e996c83b70 Create config directory if it doesn't exist 2018-02-11 10:39:15 +00:00
Gymnasiast 34a6b5ef92 Remove __cplusplus ifdefs 2018-02-05 16:20:15 +01:00
Gymnasiast 778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Michael Steenbeek b4018d398c
Add more object source filters 2018-01-31 13:07:20 +01:00
Michał Janiszewski 48c3225cb7 Fix types of caught exception in IniReader.cpp 2018-01-18 19:06:05 +01:00
Adakite Systems 0681ba4e04 Read and set edge scrolling speed via config
- For future reference, the default edge scrolling speed
value of 12 is retained.
2018-01-14 00:51:51 +00:00
ZehMatt 84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +01:00
Aaron van Geffen 1d7bec8a11 Make the virtual floor optional, on by default. 2018-01-11 10:37:40 +01:00
Ted John c3eab7ead6 Refactor window.c to C++ 2018-01-07 12:39:58 +01:00
Michael Steenbeek 755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Ted John 02c58a6c5a Remove custom base Exception class 2018-01-05 18:11:47 +00:00
Michał Janiszewski 4d0c88fb94 Mark constructors explicit (#6928) 2018-01-04 01:12:34 +00:00
Ted John 49f5611bd1 Rename scenario.c|h to cpp 2018-01-03 15:07:17 +01:00
Tobias Kohlbau 7a8c5c2842 multiplayer: Adds option to pause server
OpenRCT2 does not provide a simple function to pause a server
while no client is connected. This patch adds a so called
"pause_server_if_no_clients" flag within network section of
config.ini. By default this flag is set to false to be backward
compatible with running servers. After setting this flag to
true the game is paused on launch and gets unpaused on first
connection.

Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>
2017-12-31 12:55:07 +01:00
Michał Janiszewski c4c5439943 Add missing include guards 2017-12-26 22:16:03 +01:00
LRFLEW eed00ea363 Add Vsync Toggle to Options 2017-12-14 11:18:28 +01:00
Michael Steenbeek e3c52360db Remove most usages of separate flag
This removes most usages of the separate flag, instead relying on ride groups to do its job.
Research is more complicated and will follow in another commit.
2017-12-08 10:28:29 +01:00
Aaron van Geffen c000263bbb Remove construction marker colour option. 2017-12-04 11:26:53 +01:00
Aaron van Geffen 837b177d9d Simplify UI scaling display quality options (#6764)
Simplify UI scaling display quality options.

This removes three options:
* 'Use NN scaling at integer scales', as NN is decidedly preferable at integer scales.
* Anisotropic scaling, as it produces results very similar (if not equal) to linear scaling.
* NN as a selectable option in the dropdown - NN is forced on integer scales and unavailable for non-integer scales.
2017-12-03 22:35:16 +01:00
Ted John 66a6aa95f6 Redirect platform_get_user_directory to IPlatformEnvironment
- Remove old code for getting user directory, redirect to IPlatformEnvironment.
- Fix config loading so that it uses path straight from IPlatformEnvironment.
- Add more special folder implementation in Platform2.
2017-12-01 21:09:52 +00:00
Philip Goto 4dfcb32d85 Fix spelling errors in neighbour 2017-11-06 23:05:21 +01:00
Philip Goto 6377ac7bfb Create enum for scale quality 2017-11-06 23:05:21 +01:00
Christian F. Coors 06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Robert Jordan c9c0c07eca RCT2 Steam path locator: improve OS support
Now looks for RCT2 install within OS-specific steam install directories.
Also checks the registry in Windows in case Steam has a custom install
path.
2017-10-24 18:36:40 +02:00
TELK 1043be5bd5 Fix Twitch config not being read correctly 2017-10-21 09:42:41 +02:00
Liam Parker b2a781dc1d Fix #6518: Correctly load guest left park from config
OpenRCT2 was reading a "guest_entered_left_park" value for the notification setting.

The value is saved as "guest_left_park" however. Mistake made during refactor.
2017-10-19 21:58:49 +01:00
Aaron van Geffen 551fdabc7f Make the hinting threshold configurable per font.
This addresses the issue that tofu would not show up in Arial on macOS if the
threshold was set to 60. It being the fallback font, it is important that they
do, which requires lowering to at most 43.

However, it is even more important that the threshold is left at 60 for kanji
in e.g. Japanese to render properly.

Hence, for the moment, Arial is the only font now using a hinting threshold
of 40, for now.
2017-10-15 22:31:11 +02:00
Aaron van Geffen 2dcf9c73e7 Make font hinting optional through config.ini. 2017-10-15 22:31:11 +02:00
Michał Janiszewski 00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Gymnasiast dba7d6053e Clarify elevated permissions warning, insert line break in data files message, fixes #6215 2017-08-31 10:55:33 +02:00
Michał Janiszewski 6ee9bf6799 Free listen_address when releasing config 2017-08-02 23:16:00 +02:00
Ted John 354a26a9d2 Use std::string for player name
Removes memory leak.
2017-07-22 09:48:34 +01:00
Keatzee ea87e87750 Fix #4301: Remove leading/trailing space from playername 2017-07-22 09:43:24 +01:00
Ted John f08db17d94 Merge pull request #5713 from rwjuk/fix5707
Fix #5707: Usernames aren't detected for multiplayer
2017-06-27 13:27:21 +01:00
Richard Jenkins 1893326b62 Check for file existence before releasing config in config_open() (#5712) 2017-06-27 13:23:16 +01:00
rwjuk c904fa9fe2 Duplicate string literal for assignment to utf8* var 2017-06-26 20:58:36 +01:00
rwjuk 3162b9c221 Use String::IsNullOrEmpty() 2017-06-26 19:10:55 +01:00
rwjuk 3236701d51 Fix #5707: Usernames aren't detected for multiplayer 2017-06-26 18:59:01 +01:00
Ted John f275e5ba9b Remove all platform.h includes from header files
System headers, particularly windows.h polute the namespace too much with macros and unwanted definitions. Do not use them in header files.
2017-06-25 18:59:56 +01:00
Marijn van der Werf 8766ec37a1 Add Android project 2017-06-15 14:22:15 +02:00
Richard Jenkins 4c67ef1d6a Implement persistent 'real names of guests' setting 2017-06-12 14:05:19 +02:00
Ted John dfa1b47a4f Move keyboard shortcut code to libopenrct2ui. 2017-06-11 16:52:15 +01:00
Ted John a52190ae44 Create C version of FULLSCREEN_MODE enum 2017-06-10 17:14:07 +01:00
delebota f69e7ac89e Setup server action logging for server admins in multiplayer
Squash commit containing:
- 398d978 Setup server action logging for server admins in multiplayer
- 13330ae Added server action logging for using cheats in multiplayer
- b619019 Added server action logging for demolishing rides in multiplayer
- 93de752 Added server action logging for editing ride properties in multiplayer
- 8a3d932 Added server action logging for editing park properties in multiplayer
- c78b6e7 Moved duplicate chat and server logging code into new network methods
- c8f66bf Changed logging variable types to avoid deprecated conversion errors in CI builds
- 454e527 Added improved server action logging for using cheats in multiplayer
- 1194305 Moved server action logging code in game.c into a separate method to reduce clutter
- d59cd42 Added server action logging for add/edit/remove scenery in multiplayer
- c41ae0e Added server action logging for clients in multiplayer
- c383341 Removed unused variable to fix CI build error
- 2d1d8e3 Added server action logging for ride creation in multiplayer
2017-06-06 23:07:54 +02:00
Sam Olsen b9e9b8320f Add enhancement to show money effect when peeps make purchases 2017-06-05 21:02:05 +01:00
Leurak c002df1abf Keep address parameter in BeginServer 2017-06-04 00:42:13 +01:00
Leurak 7914484ea0 Fix indentation 2017-06-04 00:42:13 +01:00
Leurak 14c46a659c Add config option for socket listen address 2017-06-04 00:42:13 +01:00
Ted John f47d7f27a5 Suppress hotkey.cfg error if not found
Running the game without hotkeys.cfg existing used to show a warning message. This is unnecessary as it will not exist on first install.
2017-06-03 22:17:52 +01:00
Ted John af91b9f4b4 Fix #5521: Infinite loop on first run if neither Zenity nor kdialog are installed (#5526) 2017-06-03 22:13:20 +01:00
Michał Janiszewski 79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Ted John 3ca1b48384 Open the game window on the last remembered display 2017-05-29 22:39:17 +02:00
Ted John 3fcd42fe2b Move more window code to UiContext 2017-05-29 22:38:43 +02:00
CraigCraig 26287f5a3e More readability, grammar, spelling fixes 2017-05-15 09:28:43 +02:00
Pulkit 89baa54633 Fixed the whitespaces 2017-04-30 17:33:26 +01:00
Pulkit f7d01e3983 Modified the Mute button Like the Cheat
I implemented the Mute button but for some reason I am unable to enable
the checkbox. Could someone kindly look into it
2017-04-30 17:33:26 +01:00
CraigCraig e0b875398b Tons of spelling fixes (#5413)
[ci skip]
2017-04-30 06:39:24 +02:00
duncanspumpkin 8dcf6b43f1 Fix #5371. Custom currency now correctly saves to config.
Mistake made during refactoring. Failed to account for the custom currency when saving the current currency.
2017-04-16 13:09:40 +01:00
Marco Costa f1a1639c8c Auto-detect locale on first run 2017-04-08 22:39:19 -04:00
David CARLIER d50a1592fa Prevent double allocations of string allocated config values
Prevent double allocations of string allocated config values since they can be set by default and then set again by reading the config file.
2017-03-28 10:32:22 +02:00
duncanspumpkin 76c154a567 Fix #5285. Config file not read correctly.
When the hashing function finds a collision such as on play_intro and auto_staff_placement it has to do a string compare to find out if two map entries are different. Due to a mistype this comparison would always return true. This meant that the auto_staff_placement value would overwrite the play_intro value. Mistake caused when fixing previous bug
2017-03-08 20:32:21 +00:00
LRFLEW 8e55b6ef22 Make the INI keys case insensitive 2017-03-06 09:22:44 -06:00
Joël Troch 8167ff9678 Fix #1730: Add keyboard shortcuts for track construction (#5200) 2017-03-03 09:35:42 +01:00
Michał Janiszewski 3b3f0b2e6b Return actual instead of default value in IniReader::GetString 2017-02-24 23:39:01 +01:00
Michał Janiszewski 58da1cde84 Make IniReader not throw while parsing invalid values 2017-02-24 20:26:49 +01:00
Michał Janiszewski 1784543e14 Set default first section to true 2017-02-23 23:26:39 +01:00
Michał Janiszewski 9c32cb3a62 Don't break on too short INI streams 2017-02-23 23:26:39 +01:00
Ted John 9ba51f221b Add summary comments 2017-02-22 18:00:19 +00:00
Ted John 40eb2c55fd Reduce duplicated code in IniReader 2017-02-22 17:58:50 +00:00
Ted John d72ced4ea9 Remove final from struct 2017-02-22 17:54:37 +00:00
Ted John 4dc792bc1d Use IStream for IniReader and IniWriter 2017-02-22 17:52:33 +00:00
Ted John 6e9d22e99d Use hpp for header files
...as they contain C++ implementation code.
2017-02-22 17:46:10 +00:00
Ted John a9ffe5bf6d Convert tabs to spaces in KeyboardShortcuts.cpp 2017-02-21 12:11:19 +00:00
Ted John 80c4e4309d Remove duplicate entries and in wrong enum 2017-02-20 20:04:05 +00:00
Ted John a473740efd Fix build errors 2017-02-19 21:41:36 +00:00
Ted John 87be032adc Space out sections when writing config.ini 2017-02-19 21:37:06 +00:00
Ted John fb2c835d52 Include new config header 2017-02-18 15:45:10 +00:00
Ted John 4457749b35 Move keyboard shortcut loading to C++ 2017-02-18 15:30:54 +00:00
Ted John 6bda8eba0f Move remaining config functions to C++ 2017-02-18 15:16:19 +00:00
Ted John 87e3a8f8b0 Move config enums to more suitable places 2017-02-18 14:51:35 +00:00
Ted John 6a2b7b1200 Start moving config definitions over to C++ 2017-02-18 10:54:13 +00:00
Ted John bd6d31fed6 Write config fields 2017-02-18 10:17:26 +00:00
Ted John 23fef54b14 Implement IniWriter 2017-02-18 10:17:26 +00:00
Ted John 2fc5012670 Fix build errors 2017-02-18 10:17:26 +00:00
Ted John 0542338d4d Use interface for config enum 2017-02-18 10:17:26 +00:00
Ted John d8fae61e0c Add remaining config reading 2017-02-18 10:17:26 +00:00
Ted John aee1222829 Read more config 2017-02-18 10:17:26 +00:00
Ted John 6f15fc2cee Refactor config reading to different files 2017-02-18 10:17:26 +00:00
Ted John a582cc0cca Add support for config enums 2017-02-18 10:17:26 +00:00
Ted John 3255a1b88c Support reading quoted strings 2017-02-18 10:17:26 +00:00
Ted John f8f60a69a7 Implement reading of config values 2017-02-18 10:17:26 +00:00
Ted John d5ee210797 Begin writing IniReader 2017-02-18 10:17:26 +00:00