Commit Graph

683 Commits

Author SHA1 Message Date
Michael Steenbeek 0cea008c18 Move cable lift functions to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek 69f02400f9 Move GetColourScheme to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek a3e9c63fc3 Move GetRideIndex to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek 650971bc68 Move HasChain to struct methods 2018-09-25 21:57:21 +02:00
Gymnasiast 67d7d5c022 Move getting station index to struct methods 2018-09-25 21:57:21 +02:00
Gymnasiast 6bd732ce5a Move getting seat rotation to struct methods 2018-09-25 21:57:21 +02:00
Gymnasiast ae4c464ce7 Move getting track sequence to struct methods 2018-09-25 21:57:21 +02:00
Gymnasiast 8908f3f47e Move getting track type to struct methods 2018-09-25 21:57:21 +02:00
jensj12 eac9b720ee Add #7726: Shortcut to advance one tick (#7851) 2018-09-23 23:40:47 +02:00
Gymnasiast 7d7d0aeab5 Adopt OpenLoco's UTF-8 handling 2018-09-23 11:31:04 +02:00
Michael Steenbeek 6062960390 Port remaining wall stuff to struct methods 2018-09-17 15:42:34 +02:00
Michael Steenbeek 508276b081 Remove lots of direct access to ->type fields 2018-09-17 15:18:07 +02:00
Michael Steenbeek dcabdeb805 Move wall colour functions over to the struct methods 2018-09-17 14:22:17 +02:00
Gymnasiast 0f08128657 Fix formatting 2018-09-16 21:34:51 +02:00
Michael Steenbeek 74ccf010e6 Port surface elements to new structure 2018-09-16 21:34:51 +02:00
Michael Steenbeek d186a04e4f Remove case of direct access to direction 2018-09-16 21:34:51 +02:00
Michael Steenbeek 35b4724626 Port large scenery to new structure 2018-09-16 21:34:50 +02:00
Michael Steenbeek 1d3baef9b7 Remove some C-style tile element functions 2018-09-16 21:34:04 +02:00
Aaron van Geffen 47eea292b5 Allow assigning a keyboard shortcut for opening the tile inspector (#7994)
* Allow assigning a keyboard shortcut for opening the tile inspector.

* Only open when debug tools are enabled.

* Add changelog entry
2018-09-15 08:57:50 +02:00
Michael Steenbeek 0e998c2d78
Merge pull request #7988 from Gymnasiast/tile-element-makeover
Change tile elements to use the OpenLoco structure
2018-09-14 10:56:19 +02:00
Michael Steenbeek 1a825a4045 Small fixes 2018-09-14 10:18:46 +02:00
Aaron van Geffen a5ad9a3729
Merge pull request #7971 from Osmodium/7930-part2-Add-open-folder-button
#7930 part2 add open folder button
2018-09-14 00:03:58 +02:00
Aaron van Geffen d6769fafe2 Move title menu buttons up to compensate for new item. 2018-09-13 23:20:17 +02:00
Aaron van Geffen cf6f8a356f
Merge pull request #7920 from ZehMatt/sprite-structs
Simplify sprite structs
2018-09-13 23:04:02 +02:00
Gymnasiast dfdb3b4681 Rename STR_OPEN_CUSTOM_USER_FOLDER 2018-09-13 22:20:45 +02:00
Christian Schubert b1ac76910e Removed methods from Context, added headers and functionality only in TitleMenu.cpp 2018-09-13 22:20:45 +02:00
Christian Schubert 97ebf50035 Removed c styled method. 2018-09-13 22:19:51 +02:00
Christian Schubert 48d6e2f58f Added 'open custom content folder' button to toolbar menu. 2018-09-13 22:18:09 +02:00
Gymnasiast 865a497115 Fix formatting 2018-09-13 20:14:44 +02:00
Michael Steenbeek a31176b7e7 Remove remnants of old small scenery code 2018-09-13 18:12:20 +02:00
Michael Steenbeek b5bb4c7fb9 Do not access old small scenery age field 2018-09-13 17:26:36 +02:00
Michael Steenbeek e9993f78de Replace read access of small scenery entry index 2018-09-13 17:02:38 +02:00
Michael Steenbeek a02d360df6 Change TileElement to use OpenLoco's structure 2018-09-13 15:36:32 +02:00
Viktor Friberg 574fd83882 Improve #2940: Staff patrol areas can now be mouse-painted in singleplayer 2018-09-13 09:25:12 +02:00
Hielke Morsink 64c52fa796 Improve readability 2018-09-09 00:16:46 +02:00
wolfreak99 28bfab0c9b Draw dangerous G forces on graph in red 2018-09-09 00:03:35 +02:00
Matt 04928d4b84 Refactor reference over std::shared_ptr. 2018-08-31 07:18:48 +02:00
Michael Steenbeek 5cd4057c76
Remove remnants of STEX support 2018-08-29 23:29:45 +02:00
Aaron van Geffen f8c765f798
Fix #7912: 'New folder' and 'New file' buttons are missing (#7926) 2018-08-22 00:00:44 +02:00
Hielke Morsink e7af3290c0 Fix system file browser not populating properly (#7916) 2018-08-21 23:19:32 +02:00
Matt a89b352fb2 Rename rct_sprite::unknown to rct_sprite::generic 2018-08-20 18:27:40 +02:00
Hielke Morsink 3e2f8148c5
Fix #7911: Unable to save new scenarios (#7914)
The problem was that the filters have changed so they included the '*' character. This got appended to the path, which caused the check for valid filenames to fail.

This commit reverts the offending strings and code lines to how it was before.
2018-08-19 19:49:49 +02:00
Aaron van Geffen c4f93e24b5 Rename heightmap load/save type; add heightmap dir. 2018-08-18 13:28:27 +02:00
Aaron van Geffen 4b4510b347 Refactor common code to their own functions. 2018-08-18 13:28:27 +02:00
Aaron van Geffen 25170fda45 Implement #7658: Add option to always use system file browsing window. 2018-08-18 13:28:27 +02:00
Hielke Morsink 01608baeb6 Draw sound effects and music checkboxes as disabled when appropirate 2018-08-17 22:15:58 +02:00
Hielke Morsink c99d28116f Fix muting game sounds instead of master sound
Clicking mute from the top toolbar or from with the hotkey will toggle the master volume instead of the game volume now, and invalidates the options window to immediately make the checkbox visible.
2018-08-17 22:14:11 +02:00
Aaron van Geffen 69d76a3263 Pause/unpause audio when disabling channels. 2018-08-17 22:14:11 +02:00
Sijmen Schoon 1b805d94e7 Change window_options_scrollgetsize width to 500px 2018-08-17 22:14:11 +02:00
Sijmen Schoon a7d17a6b41 Fix widget_index type and scroll_index -> _id 2018-08-17 22:14:11 +02:00
Sijmen Schoon 1a1ad56336 Refactor volume slider initialization 2018-08-17 22:14:11 +02:00
Sijmen Schoon 9583368b7c clang-format Options.cpp 2018-08-17 22:14:11 +02:00
Sijmen Schoon 0cdd7c8cc8 Add master sound checkbox and master volume slider
Also includes some rewriting of rct_scroll code that I did while
debugging the issue with more than two rct_scrolls in one window. I
decided to leave it in.
2018-08-17 22:14:11 +02:00
Michael Steenbeek 9f891bfdcc
Allow opening SV7 files 2018-08-16 16:16:56 +02:00
Gymnasiast 6fc86d5766 Fix #7872: CJK tooltips are often cut off 2018-08-13 21:41:10 +02:00
Michael Steenbeek 0a1b53e1c2
Auto-detect RCT1 files location (#7882) 2018-08-13 15:50:45 +02:00
Aaron van Geffen a0360124b7 Tweak staff list name columns a little (#7890) 2018-08-13 14:05:52 +02:00
Linus Unnebäck fd07be587a
Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
Gymnasiast 45b8ca9421 Remove more strings, fix error 2018-08-12 15:56:47 +02:00
Gymnasiast c615d08d78 Remove many unused strings 2018-08-12 15:56:47 +02:00
Michael Steenbeek 49c30600b7
Merge pull request #7755 from Gymnasiast/fix/7204
Fix #7204: add a dedicated source parameter to JSON objects
2018-08-12 15:47:39 +02:00
ζeh Matt b25cb8c793 Scale mouse delta by zoom when using shift. (#7868)
* Scale mouse delta by zoom when using shift.

* Clamp maximum height of object drag.

* Address code review comments; add changelog entry.
2018-08-12 11:47:46 +02:00
ζeh Matt b2005c3b9f Implement FootpathRemoveAction as a GameAction (#7867) 2018-08-12 10:31:00 +02:00
moTechPlz 8784dfbf41 Fix #7462: Guest window goes beyond the map edge on a spiral slide. (#7752) 2018-08-07 16:20:51 +02:00
Sijmen Schoon f3f4776afd Properly fix maze building when paused (#7852)
Also fixes two relevant bugs:
- The error message having no title
- Fixes the controls in the construction window activating when the initial placement fails because of e.g. the game being paused.
2018-08-04 14:30:13 +02:00
Gymnasiast 0ba233efa4 Fix formatting 2018-07-31 22:27:00 +02:00
Gymnasiast edaebd5163 Protect against Sources being null 2018-07-30 22:01:04 +02:00
Gymnasiast b257619418 Use vector for source games 2018-07-30 21:41:12 +02:00
Michael Steenbeek 2a64ec7aff Use sourceGame parameter in JSON files instead of originalId 2018-07-30 21:39:27 +02:00
Michael Steenbeek 71bd110526 Fix filtering 2018-07-30 21:33:31 +02:00
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 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
clang-format e558660860 clang-format UI windows 2018-07-23 16:00:14 +02:00
Ted John 3d85ec4ea1
Fix #7786: Crash when importing a track design (#7790) 2018-07-18 21:19:25 +01: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
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
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
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
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