Commit Graph

839 Commits

Author SHA1 Message Date
Ted John ec0d35bac7 Add new source field to ORI struct 2018-07-30 21:32:07 +02:00
Michael Steenbeek 5ce76e1603 Attempt at showing secondary source game 2018-07-30 21:28:55 +02:00
Hielke Morsink 25eea49983 Add trailing commas to some window source files 2018-07-23 16:00:23 +02:00
clang-format d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +02:00
clang-format b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
Hielke Morsink 73a7e935c3 Correct formatting for files in the project root 2018-07-23 16:00:17 +02:00
clang-format 9c022606f1 clang-format UI root 2018-07-23 16:00:14 +02:00
clang-format e558660860 clang-format UI windows 2018-07-23 16:00:14 +02:00
clang-format f13e3e83d7 clang-format UI title 2018-07-23 16:00:13 +02:00
clang-format 949a34646e clang-format UI interface 2018-07-23 16:00:13 +02:00
clang-format 2151b8d75a clang-format UI input 2018-07-23 16:00:13 +02:00
clang-format 16720f0182 clang-format UI drawing 2018-07-23 16:00:13 +02:00
clang-format ebb17929a7 clang-format UI audio 2018-07-23 16:00:12 +02:00
Hielke Morsink 4d38475f12 Undefine keywords to fix macOS build 2018-07-23 15:58:01 +02:00
Hielke Morsink ce59ed0ba2 Fix include order and defines for Windows builds 2018-07-23 15:57:59 +02:00
Michał Janiszewski 4a77801cb3
Increase the allowed aspect ratio epsilon (#7775) 2018-07-18 22:33:20 +01:00
Ted John 3d85ec4ea1
Fix #7786: Crash when importing a track design (#7790) 2018-07-18 21:19:25 +01:00
Brian Callahan 66bfd42551 Do not print which(1) errors to the console
On first launch of the game, OpenRCT2 tries to find Gnome or KDE eyecandy dialog programs zenity and kdialog to inform the user to set the `game_path`. It will fall back to an SDL popup with manual instructions if neither is found, which looks fine. However, if OpenRCT2 is launched from the command line, which will print "file not found" errors if you don't have zenity and/or kdialog installed, which might potentially confuse the user.

This patch routes the error messages to `/dev/null`, as we don't really care if those programs are not found.

See this thread on the OpenBSD mailing list: https://marc.info/?l=openbsd-ports&m=153020454402268&w=2
2018-07-07 20:53:50 +02:00
muemart 6365eaba66 Fix #3177: Wrong keys displayed in shortcut menu
SDL_GetScancodeName doesn't actually translate the scancode to the physical key, so first we need to convert the scancode to a keycode and then turn the keycode into a string.
2018-07-03 20:48:28 +02:00
Ted John fe76c807aa Fix #7707: Opening scenario editor closes game
Ensure w is updated after closing the dropdown window.
2018-06-27 11:11:50 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Michael Steenbeek ec3a1e575e
Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +02:00
Ted John 98905fdbc3 Change g_window_list to use the heap for windows 2018-06-16 16:04:01 +01:00
Ted John 0f6138f8b6 Convert g_window_list to a std::vector 2018-06-16 16:04:01 +01:00
Ted John a716b4aa28 Remove use of window list in Viewport.cpp 2018-06-16 16:04:01 +01:00
Aaron van Geffen 1f5572fe28 Fix #7701: Strings overflow in drawing debug windows. (#7702)
The last widget was not taken into account.
2018-06-16 14:41:18 +01:00
Ted John 26666b1da9 Remove empty function: viewport_update_pointers 2018-06-15 23:15:52 +01:00
Hielke Morsink 14d6625c15
Merge pull request #7695 from Broxzier/wide-path-debug
Add debug option to visualize wide path flags.
2018-06-15 17:07:50 +02:00
Hielke Morsink 0528a455e9 Automatically resize debug window to fit strings 2018-06-15 16:13:47 +02:00
Hielke Morsink 0fda25d365 Add debug option to visualize wide path flags.
This implements #7694
2018-06-15 16:08:25 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Michael Steenbeek 74dd8a4eac
Merge pull request #5993 from wolfreak99/improved_window_inputs/ride_price_textinput
Make ride window prices allow text input
2018-06-15 10:09:37 +02:00
Michael Steenbeek 7bd4244797
Merge pull request #7628 from Chaosmeister/unpickable-research-items
make always researched researchitems unpickable.
2018-06-15 09:47:08 +02:00
Aaron van Geffen ee64daae58 Fix event list. 2018-06-15 09:36:17 +02:00
Gymnasiast fe54cf5ee6 Allow forcing decimals 2018-06-15 09:36:17 +02:00
wolfreak99 961d25dbb9 Make ride window prices allow text input 2018-06-15 09:36:17 +02:00
Ted John fdb1d98868
Move rain window loop to libopenrct2ui (#7684) 2018-06-15 07:46:04 +01:00
Hielke Morsink c3cff07b91 Disallow placing items in-between always researched items
This adds a loop that iterates down the list, until it reaches either a researched item or the end.
2018-06-15 00:34:30 +02:00
Hielke Morsink c437f438f1 Remove invalid cast 2018-06-15 00:34:30 +02:00
Hielke Morsink 30b9d3a338 Move always_researched checks and add comments 2018-06-15 00:34:30 +02:00
Chaosmeister 308ae4b357 Make always-researched research items unpickable. 2018-06-15 00:34:30 +02:00
Michael Steenbeek 8a9dfa6033
Stop ride type dropdown state sharing among ride windows
This eliminates the _rideType variable, which was necessary when we still used a spinner and an Apply button, but is now no longer needed.
2018-06-14 20:15:31 +02:00
Michael Steenbeek 9436dab66c
Fix #7655: Large portions of the screen do not invalidate properly
Also fixes #7676.
Error was introduced during refactoring in 85dc161c5a.
2018-06-14 12:01:55 +02:00
Ted John 9e9c2c072e Fix #7678: Crash when Loading or starting a new game...
...while having object selection window open

Close the object manager window before loading the next park.
2018-06-13 23:29:05 +01:00
Hielke Morsink 6b22a9d38b
Merge pull request #7586 from Broxzier/refactor/banner-ride-index
Banner code cleanups
2018-06-13 21:48:04 +02:00
Andy Ford 2ab3bd515d Fix #7673: Vehicle names cut in invention list (#7675)
* Fix #7673: Vehicle names cut in invention list

The string formatting was formatting based on the size of the
pointer to the buffer, not the buffer itself, this truncated all
vehicle names to 8 characters.

* Adjust Long Vehicle Names For Vertical Scrollbar

The ellipsis in long vehicle names were being cut off by
the scrollbar. Reduced the string formatting length by
vertical scrollbar size - 1. The extra 1 is for the fact
that the second column starts + 1 from the middlepoint of the box.
2018-06-13 21:44:25 +02:00
Ted John 86ca6be58b Fix #7674: Rides show up as random numbers in guest's ride list 2018-06-13 18:32:00 +01:00
Ted John dea935314e Add null check for showing guest's favourite ride 2018-06-13 18:27:32 +01:00
Ted John 7373987f0a
Merge pull request #6978 from tobiaskohlbau/refactor/network
HTTP: Refactor into modern C++
2018-06-12 21:50:46 +01:00