Commit Graph

970 Commits

Author SHA1 Message Date
Michael Steenbeek 897a2982a0 Move brake/booster speed functions to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek e6d5638815 Move inverted() functions to struct methods 2018-09-25 21:57:21 +02:00
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
Michał Janiszewski fbb71c7c47
Fix Android builds after #7971 (#8009) 2018-09-20 21:53:34 +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 e1d6585423 Simplify EscapePathForShell by using std functions. 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 e84348309c Add function to shell-escape path 2018-09-13 22:20:45 +02:00
Gymnasiast dfdb3b4681 Rename STR_OPEN_CUSTOM_USER_FOLDER 2018-09-13 22:20:45 +02:00
Gymnasiast 40cd64c916 Add Linux support 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 6e6753aaf1 Added MacOS OpenFolder support. 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
ζeh Matt 65659e2ab6 Fix OpenGL renderer stuttering when loading new textures into atlas 2018-09-07 10:21:28 +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
Aaron van Geffen d4591a1492 Draw disabled checkboxes inset. 2018-08-17 22:14:11 +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 5f8c7ef04d Refactor widget_hscrollbar_draw to be more readable 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
Sijmen Schoon 2e95c64a7c Fix issue with more than two rct_scrolls not working 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 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