Commit Graph

11604 Commits

Author SHA1 Message Date
Ted John b043428cf0
Merge pull request #6998 from JeroenDStout/railway-crossings-wait
Railway crossing behaviour for peeps and vehicles
2018-06-11 09:09:07 +01:00
Michał Janiszewski 841fea1eb0 Revert "Update SDL2 includes to non-system"
This reverts commit b43a9a6ccf, as SDL2
fails -Wdocumentation check
2018-06-11 09:52:54 +02:00
Michał Janiszewski 1d28826b79 Fix -Wdocumentation and add it to default warnings 2018-06-11 09:52:54 +02:00
Aaron van Geffen 8ef5f4e02e Update Xcode project. 2018-06-11 01:22:24 +02:00
Ted John 510786fc1a Fix Linux builds 2018-06-11 01:22:18 +02:00
Ted John 3096c4de00 Remove window internals from TileInspector logic 2018-06-11 00:09:00 +01:00
Ted John 04da3be824 Move Widget.cpp to libopenrct2ui 2018-06-11 00:04:41 +01:00
Ted John a4d6a45e78 Move window_all_wheel_input to libopenrct2ui 2018-06-10 23:56:05 +01:00
Ted John 370a6300c0 Move ViewportInteraction to libopenrct2ui 2018-06-10 23:39:56 +01:00
Ted John ae6af47341 Move TitleSequencePlayer to libopenrct2ui 2018-06-10 23:39:56 +01:00
Ted John bc1d2252aa Remove window dependency from Ride.cpp 2018-06-10 23:34:36 +01:00
Ted John 5a368ce6d9 Move theme code to libopenrct2ui 2018-06-10 23:34:27 +01:00
Ted John e6e61c3a2f Move create window code to libopenrct2ui 2018-06-10 23:34:20 +01:00
Ted John e38f4df575 [wip] Move themes to libopenrct2ui 2018-06-10 23:34:12 +01:00
Ted John 85dc161c5a Add SetMainView to WindowManager 2018-06-10 23:33:52 +01:00
Ted John fac0960c6e Increment network version 2018-06-10 23:01:27 +01:00
Ted John b4d3806614 Unblock tiles when vehicles are removed from ride 2018-06-10 22:59:58 +01:00
Ted John d1d9f0a86a Add debug drawing option for blocked tiles
Replace old unused original drawing code toggle options with new option to show which tiles are blocked by vehicles.
2018-06-10 22:59:58 +01:00
Ted John c300f873f5 Refactor peep check for vehicle 2018-06-10 22:59:58 +01:00
Ted John e9069e4f0a Add const qualifiers 2018-06-10 22:59:58 +01:00
Jeroen D Stout ad684b1e57 Add claxon to vehicle reserving initial crossing tile 2018-06-10 22:59:58 +01:00
Jeroen D Stout 13017568db Prevent peep from being blocked while already on blocked tile 2018-06-10 22:59:58 +01:00
Jeroen D Stout 299d2e82ab Limit amount of path being reserved at single crossing 2018-06-10 22:59:58 +01:00
Jeroen D Stout 547973066c Add check for peep walking update to prevent walking onto blocked tiles 2018-06-10 22:59:58 +01:00
Jeroen D Stout 244209df56 Add vehicle_update_crossings for validating crossing tiles upon entering a tile 2018-06-10 22:59:58 +01:00
Jeroen D Stout 1f7dbe1178 Debug-show tiles which are blocked by vehicles as coloured 2018-06-10 22:59:58 +01:00
Jeroen D Stout f4c94c4c1b Add 'blocked by vehicle' flag for tile elements 2018-06-10 22:59:58 +01:00
Michał Janiszewski 0aff800d40 Release 0.2.0
- Feature: [#1417] Allow saving track designs for flat rides.
- Feature: [#1675] Auto-rotate shops to face footpaths.
- Feature: [#3473] Add button in ride window's maintainance tab to refurbish the ride.
- Feature: [#6510] Ability to select edges or a row of tiles by holding down Ctrl using the land tool.
- Feature: [#7187] Option for early scenario completion.
- Feature: [#7266] Make headless instances use an interactive terminal with access to the in-game console API.
- Feature: [#7267] Leverage more historical data in Finances window.
- Feature: [#7316] Cheat to allow freezing all staff
- Feature: [#7332] Keyboard shortcuts for view path issues and cutaway view.
- Feature: [#7348] Add large half loops to the Vertical Drop Roller Coaster.
- Feature: [#7459] Allow opening and closing of parks that use no money.
- Feature: [#7579] New horizontal +/- spinner widgets to make adjusting values easier.
- Fix: [#2053] When clearance checks are disabled, a track piece ghost can remove non-ghost track pieces.
- Fix: [#2611] Some objects show (undefined string) instead of a description in Korean.
- Fix: [#3596] Saving parks, landscapes and tracks with a period in the filenames don't get their extension.
- Fix: [#5210] Default system dialog not accessible from saving landscape window.
- Fix: [#6134] Scenarios incorrectly categorised when using Polish version of RCT2.
- Fix: [#6141] CSS50.dat is never loaded.
- Fix: [#6647] Changelog window causes FPS drop.
- Fix: [#6938] Banner do not correctly capitalise non-ASCII characters.
- Fix: [#7176] Mechanics sometimes fall down from rides.
- Fix: [#7303] Visual glitch with virtual floor near map edges.
- Fix: [#7313] Loading an invalid path with openrct2 produces results different than expected.
- Fix: [#7327] Abstract scenery and stations don't get fully See-Through when hiding them (original bug).
- Fix: [#7331] Invention list in scenario editor crashes upon removing previously-enabled ride/stall entries.
- Fix: [#7341] Staff may auto-spawn on guests walking outside of paths.
- Fix: [#7354] Cut-away view does not draw tile elements that have been moved down on the list.
- Fix: [#7358] Peeps and staff entering rides still have the slope speed penalty set.
- Fix: [#7382] Opening the mini-map reverts the size of the land tool to 1x1, regardless of what was selected before.
- Fix: [#7402] Edges of neigbouring footpaths stay connected after removing a path that's underneath a ride entrance.
- Fix: [#7405] Rides can be covered by placing scenery underneath them.
- Fix: [#7418] Staff walk off paths with a connection but no adjacent path.
- Fix: [#7434] Diagonal ride segments cannot be deleted if they are isolated.
- Fix: [#7436] Only the first 32 vehicles of a train can be painted.
- Fix: [#7480] Graphs skip values of 0.
- Fix: [#7505] Game crashes when trying to make path over map edge while having clearance checks disabled.
- Fix: [#7528] In park entrance pricing tab, switching tabs happens on mouse-down instead of mouse-up
- Fix: [#7544] Starting a headless server with no arguments causes the game to freeze.
- Fix: [#7571] Hovering a ride design over scenery or tracks will give tons of money.
- Improved: [#2989] Multiplayer window now changes title when tab changes.
- Improved: [#5339] Change eyedropper icon to actual eyedropper and change cursor to crosshair.
- Improved: [#5832] Resize tile inspector automatically when selecting a tile element.
- Improved: [#6221] The scenario editor's invention list is now resizeable.
- Improved: [#7069] The arbitrary ride type selection dropdown is now sorted orthographically, and has its spinners removed.
- Improved: [#7302] Raising land near the map edge makes the affected area smaller instead of showing an 'off edge map' error.
- Improved: [#7435] Object indexing now supports multi-threading.
- Improved: [#7510] Add horizontal clipping to cut-away view options.
- Improved: [#7531] "Save track design" dropdown now stays open.
- Improved: [#7548] Ctrl-clicking with the tile inspector open now directly selects an element and its tile.
- Improved: [#7555] Allow setting the Twitch API URL, allowing custom API servers.
- Improved: [#7567] Improve the performance of loading parks and the title sequence.
- Improved: [#7577] Allow fine-tuning the virtual floor style.
- Improved: [#7608] The vehicle selection dropdown is now sorted orthographically.
- Improved: [#7613] Resizing the staff window now resizes the name and action columns too.
- Improved: [#7627] Allow scrolling up and down on spinners to change their values.
2018-06-10 22:30:51 +02:00
Hielke Morsink 36d123b272
Revert renaming of spinners (#7650) 2018-06-10 21:31:08 +02:00
Hielke Morsink 82370c36c6
Allow holding down spinners in tile inspector (#7647)
This basically moves much of the event handling from mouseup to mousedown, and adds a new array with widget indices for the spinners. This automatically enables scrolling for them as well.
2018-06-10 18:55:44 +02:00
Andy Ford 1acb1c4b35 Fix #7434: Diagonal ride segments cannot be deleted if they are isolated
Mimic vanilla RCT2:

- If the isolated track is the last piece on the ride, delete and
set the construction mode to a straight piece. Rotate said piece
45 degrees anti-clockwise.
- If other track still exists, delete and rotate as above but
set the track type to station-platform.
- If banked, set track type to the turn that entered the previous
orientation. For example, north west banked track would continue
with a banked 45 degree turn starting facing west.
2018-06-10 17:34:37 +02:00
Michał Janiszewski 798bb99239 Update libopenrct2.vcxproj (#7644) 2018-06-10 01:31:37 +02:00
Hielke Morsink 0fc4cad80f
Fix tile inspector errors for banner (#7640)
This is likely the least used page of the tile inspector, since two things have been broken for months apparently.

- The checkboxes for the blocked edges weren't being positioned correctly
- Rotating a banner that has either 0 or more than 1 edges blocked, the blocked edges weren't updated correctly
2018-06-09 17:16:04 +02:00
Aaron van Geffen e920871d67
Fix #7601: Always-researched items not rendered with inset. (#7638)
This re-introduces the use of buffers to work around colours not being set properly.

For clipping strings, we also now manually invoke `gfx_clip_string` instead of relying
on `gfx_draw_string_left_clipped` to do it for us. The latter resets the current font,
meaning it prevents the use of `MEDIUM_EXTRA_DARK` bases. This issue should be addressed
in a later commit.
2018-06-08 22:57:29 +02:00
Aaron van Geffen ee4b8c11ae Prevent invoking a copy constructor in some ranged for loops. 2018-06-08 22:29:42 +02:00
Aaron van Geffen b2b997c328
Fix #6647: Prevent changelog window from painting lines out of view. (#7611) 2018-06-08 09:30:20 +02:00
Michał Janiszewski a4e803c03f
Update Windows linked libraries in CMakeLists.txt 2018-06-07 23:06:45 +02:00
Michał Janiszewski bfffa50180 Provide static_assert checking for EAGAIN == EWOULDBLOCK
Allows turning on -Wlogical-op
2018-06-06 22:31:35 +02:00
Michał Janiszewski 320eee0d59
Fix -Wunreachable-code-break and add it to deafult warnings (#7634) 2018-06-06 22:30:21 +02:00
Michał Janiszewski cee74a06e1
Fix #7595: Docker image fails to build (#7633) 2018-06-06 22:23:01 +02:00
Hielke Morsink 8c1ed596ce Apply review changes
- Print warning/error code in log message
- Remove attribute from Object::SetSourceGame which has a FIXME comment already instead
2018-06-06 21:03:11 +02:00
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
Michał Janiszewski 27b684e785
Merge pull request #7629 from Broxzier/missing-field-initializers
Fix missing field initializers
2018-06-06 20:28:41 +02:00
Hielke Morsink b9590f14b1
Merge pull request #7627 from Broxzier/scrolling-spin-uh-steppers
Allow scrolling on spinners/steppers
2018-06-06 20:00:38 +02:00
Ted John f94018ef37 Fix #7630: Server disconnects clients immediately
Clear the length of the sprite hash buffer. It was growing longer and longer every time the hash was calculated.
2018-06-05 23:19:31 +01:00
Hielke Morsink 184c46992c Fix remaining non-empty list initializers 2018-06-05 16:07:54 +02:00
Hielke Morsink de3cab59bb Fix warnings reported by travis 2018-06-05 16:07:54 +02:00
Hielke Morsink 832da93a87 Fix type error in openrct2-dll project 2018-06-05 14:38:14 +02:00
Hielke Morsink 8aa122f54e Use empty initializer lists in the openrct2ui project 2018-06-05 14:37:24 +02:00
Hielke Morsink 9c8c2a2820 Missing field initializers part 2
This commit tackles the more difficult-to-fix warnings that -Wmissing-field-initializers reported. I've compares the new tables in TrackData with the old ones through a script to make sure they are in fact the same.
2018-06-05 00:18:07 +02:00
Hielke Morsink 5d0022a5cb Remove argument list from zero-initializers with zero/false/nullptr value 2018-06-04 19:50:46 +02:00
Michael Steenbeek a14d59028f
Modify some commands to use CoordsXY 2018-06-04 19:18:52 +02:00
Aaron van Geffen 5b6ae9d9cb Fix appearance of brake/booster speed widgets 2018-06-04 18:51:37 +02:00
Hielke Morsink cb1c55def5 Add extra checks to verify the widget belongs to a toolsize or stepper
It's possible that widgets are arranged in such a way that the roder of buttons matches the order of tool-size widgets or steppers. Now instead of just checking the types, also their content will be checked.
2018-06-04 15:49:05 +02:00
Hielke Morsink 32c4dab6c8 Move cut-away stepper logic to mousedown handler
This makes scrolling work for the stepper widget, and overrides behaviour for scrolling anywhere else in the window.
2018-06-04 13:41:27 +02:00
Michał Janiszewski 30e6cf1787 Remove OpenGLAPIProc.h from headers check target 2018-06-04 12:05:54 +02:00
Michał Janiszewski 798a4fe1a7 Add header verification for openrct2-ui 2018-06-04 12:05:54 +02:00
Michał Janiszewski 6307d3532b
Make headers-check an object library
This will skip linking step
2018-06-04 07:49:29 +02:00
Hielke Morsink 15c908e4af Remove no longer needed global widget indices 2018-06-04 01:11:00 +02:00
Hielke Morsink a82d6cb195 Allow scrolling up and down on steppers to change their values 2018-06-04 01:10:57 +02:00
Michał Janiszewski 32b419c868
Mark set_format_arg_body as maybe_unused 2018-06-03 23:20:58 +02:00
Michał Janiszewski 949321762b Verify compilability of headers on Travis v2
Using approach described in
https://github.com/OpenRCT2/OpenRCT2/pull/7369#issuecomment-393973857
with updates to ease readability and maintenance.

Submitted as different PR, to keep history of the old approach.
Supersedes #7369.
2018-06-03 22:56:34 +02:00
Michał Janiszewski b43a9a6ccf Update SDL2 includes to non-system 2018-06-03 22:32:10 +02:00
Michał Janiszewski 93370ec956 Switch libzip to non-system includes
This should now work after many changes to upstream
2018-06-03 22:31:00 +02:00
Michał Janiszewski 995d72f262 Remove function unused with HTTP disabled 2018-06-03 19:56:11 +02:00
Michał Janiszewski 6e72ac350f Remove function unused in no-network builds 2018-06-03 19:56:11 +02:00
Michał Janiszewski f0525d23ae Remove unused function
Last call was removed in 66a6aa95f6
2018-06-03 19:56:11 +02:00
Aaron van Geffen 35242f4815 Improve scrolling behaviour in object selection window (#7607) 2018-06-03 14:46:17 +02:00
Ted John 3b8c0703f4
Merge pull request #7609 from IntelOrca/refactor/openssl-usage
Refactor OpenSSL usage
2018-06-02 22:22:04 +01:00
Hielke Morsink 7aada25ed2 Clarify disabling of warnings for unused function (#7617) 2018-06-02 22:30:41 +02:00
Michał Janiszewski debb6cd46c Remove declarations of unimplemented functions (#7615) 2018-06-02 13:51:23 +02:00
Aaron van Geffen 9ee1a1f4df
Fix #7613: Improve scrolling behaviour in staff list. (#7614) 2018-06-02 13:06:38 +02:00
Michał Janiszewski 58bde442dd
Fix headers to ensure they carry all their dependencies (#7610) 2018-06-02 09:46:14 +02:00
Aaron van Geffen 635eab3305
Merge pull request #7579 from AaronVanGeffen/widgets/spinners
Make widget spinners horizontal
2018-06-02 00:03:20 +02:00
Ted John a413d43cda Fix mingw 2018-06-01 22:44:25 +01:00
Aaron van Geffen f2b0f7457e Terminology change: rename spinners to steppers. 2018-06-01 23:25:07 +02:00
Aaron van Geffen 0e930287c6 Change spinners for MapGen, Editor{Objective,Scenario}Options. 2018-06-01 23:25:07 +02:00
Michał Janiszewski cb536a15fa Drop static function declarations from header 2018-06-01 22:44:14 +02:00
Aaron van Geffen 53b66fd250 Add Crypt files to Xcode project. 2018-06-01 22:41:42 +02:00
Ted John ae81af7965 Fix Linux 2018-06-01 21:28:27 +01:00
Ted John 72293f2208 Implement new Crypt code and remove CNG for now 2018-06-01 21:27:34 +01:00
Ted John b8d37548ed Implement PEM writing for CNG implementation 2018-06-01 21:27:34 +01:00
Ted John 9467438c1c Implement PEM reading for CNG implementation 2018-06-01 21:27:34 +01:00
Ted John 3b2b15c0f3 Implement CNG implementation bar pem reading 2018-06-01 21:27:34 +01:00
Ted John 9e214258c3 Finish OpenSSL RSA implementation 2018-06-01 21:27:33 +01:00
Ted John fe7e8a17de Start implementing RSA for OpenSSL 2018-06-01 21:27:33 +01:00
Ted John 865bfb7b1b Refactor implementations to different files 2018-06-01 21:27:33 +01:00
Ted John ea22c672d0 Only reuse CNG object if Windows 8+ 2018-06-01 21:27:33 +01:00
Ted John 320b149b58 Change Windows builds to use CNG API 2018-06-01 21:27:33 +01:00
Ted John f880290b00 Create WinSSL implementation and refactor to class 2018-06-01 21:27:33 +01:00
Ted John e40a8d2cf5
Merge pull request #7591 from OpenRCT2/performance/msbuild
Improve msbuild performance

Ensure source file names are unique so that all object files can be written to a single directory which allows a single MSVC instance to compile all source files in parallel.
2018-06-01 21:26:15 +01:00
Aaron van Geffen 03020530ef Order vehicle type dropdown orthographically. 2018-06-01 20:35:52 +02:00
Aaron van Geffen 9806ab878d Refactor current vehicle dropdown preparation into its own function.
Splitting the lot off to window_ride_show_vehicle_type_dropdown.
2018-06-01 18:48:27 +02:00
Aaron van Geffen af0d8fea36 Change spinners for Cheats and Map windows. 2018-06-01 15:29:56 +02:00
Aaron van Geffen e5f184b01b Spinners for CustomCurrency, RideConstruction, ServerStart, ViewClipping. 2018-06-01 15:20:13 +02:00
Aaron van Geffen 64b04cccd1 Change spinners in Tile Inspector to new +/- buttons. 2018-06-01 15:20:13 +02:00
Aaron van Geffen 88955543d1 Spinners for Finances, NewCampaign, Park windows. 2018-06-01 15:20:13 +02:00
Aaron van Geffen 262409a8d4 Fix #7578: Clicking same price throughout park on accident. 2018-06-01 15:20:13 +02:00
Aaron van Geffen 2181e35b95 Replace spinner widgets with horizontal +/- buttons.
Limited to Options and Ride windows so far.
2018-06-01 15:20:13 +02:00
Michael Steenbeek e91777bd7e
Small cleanup to ride window price box 2018-06-01 14:23:46 +02:00
Hielke Morsink d0b8a0ec61 Remove spaces from screenshot options 2018-06-01 12:53:20 +02:00
Hielke Morsink 20fb4501d0 Fix #7505: Crash when building path off map edge (#7587)
Validate map location before looping over the tile elements.
2018-06-01 11:30:41 +02:00
jensj12 b94f5ea9d8 Fix #7568: Demolish button causes hang
Fixed by adding the standard infinite loop check. Also makes the save button save the entire track again. Affects cost of refurbishing.
2018-06-01 10:34:32 +02:00
Ted John 92f6ac7333 Rename header files to match renamed source files 2018-06-01 09:38:30 +02:00
Ted John b3c17b215f Use single output folder for msbuild obj files
This requires unique named source files within a project.
2018-06-01 09:37:49 +02:00
Aaron van Geffen df1e8af737
Merge pull request #5979 from IntelOrca/refactor/gamestate
Create new GameState class
2018-06-01 00:05:59 +02:00
Hielke Morsink 2fed57d792
Check for ghost flag when removing track blocks (#7596) 2018-05-31 22:36:45 +02:00
Ted John 056b596124 Use reference types in TitleSequencePlayer 2018-05-31 12:49:09 +01:00
Michał Janiszewski 3137469272
Merge pull request #7593 from janisozaur/remove-extra-decls
Remove superfluous declarations
2018-05-31 00:53:50 +02:00
Hielke Morsink f805c8db1a Fix #7589: Error in ride window's hold_down_widgets 2018-05-31 00:24:48 +02:00
Michał Janiszewski bda9ae13be Remove obsolete defines
Replaced already by constexprs
2018-05-31 00:22:37 +02:00
Michał Janiszewski 58ea1b3446 Add missing #pragma once 2018-05-31 00:22:19 +02:00
Michał Janiszewski c419f2f50b Remove superfluous declarations 2018-05-31 00:01:43 +02:00
Ted John 58529b3726 Fix #7588: Objects are broken in multiplay servers
Load objects when importing maps in network games.
2018-05-30 18:21:07 +01:00
Ted John 9d617958cf Return date and park by reference from game state 2018-05-30 13:12:19 +01:00
Hielke Morsink c5d5e639eb Update changelog and network version. 2018-05-30 14:00:32 +02:00
Hielke Morsink 9396da9b71 Fix #7571 Track design ghost generates money
The problem was that when placing a ride ghost, some clearance checks are performed to see if nothing stands in the way, and if it does, it tries to raise the ride to a height where it's possible to place. When this happens, it removes all ghost track pieces that have already been placed, and tries at the next height. With clearance checks disabled, this check was still performed, while it should ignore clearance altogether.
2018-05-30 13:59:52 +02:00
Ted John 1e7560e7da Do not include GameState.h in Context.h 2018-05-30 12:50:25 +01: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
Aaron van Geffen dcff6895b5 Refactor game_init_all into GameState::InitAll. 2018-05-30 11:53:32 +02:00
Ted John eb62e26773 Use tick frequency rather than date for park size update 2018-05-30 11:53:32 +02:00
Ted John d57867e722 Use the Date class in GameState. 2018-05-30 11:53:32 +02:00
Ted John f1ee5cad83 Call Park from GameState. 2018-05-30 11:53:32 +02:00
Ted John 4d4e7ba4b1 Create new GameState class for updating the game 2018-05-30 11:53:30 +02:00
Aaron van Geffen 2127a0170e
Merge pull request #7567 from IntelOrca/performance/park-loading
Improve performance of park loading
2018-05-30 11:51:16 +02:00
Ted John d6ac74f4bd Fix loading SC6 files in editor 2018-05-29 18:39:13 +01:00
Ted John 376b6d04d8 Fix Linux builds 2018-05-29 18:39:13 +01:00
Ted John c28a42d877 Optimise SawyerChunkReader for MSVC debug builds
- Change std::copy_n and std::fill_n back to std::memcpy and std::memset. They do not have the overhead of checks.
- Change std::malloc to HeapAlloc as 16 MiB allocations are very slow due to it initialising all the memory to 0xCC.
2018-05-29 18:39:13 +01:00
Ted John 3d98e1ad1d Do not reset title sequence when loading the title screen 2018-05-29 18:39:12 +01:00
Ted John f5e77a9e15 Load objects for title editor and scenario editor 2018-05-29 18:39:12 +01:00
Ted John f9d7ee93fc Revert changes to libopenrct2.vcxproj 2018-05-29 18:39:12 +01:00
Ted John 3a708ea112 Refactor parallelism to re-usable method 2018-05-29 18:39:12 +01:00
Ted John 1766abde91 Multi-thread object loading 2018-05-29 18:39:12 +01:00
Ted John fbe0f5d04f Throw object load exception if unable to load any objects 2018-05-29 18:39:12 +01:00
Ted John 820fedb3df Fix loading title sequence parks 2018-05-29 18:39:12 +01:00
Ted John 6af0cb2b88 Fix import of S4 and S6 2018-05-29 18:39:12 +01:00
Ted John 96a0a22cd1 Make start on loading objects only once 2018-05-29 18:39:12 +01:00
Aaron van Geffen 6eadf00a33 Order ride type dropdown orthographically. 2018-05-29 19:09:56 +02:00
Aaron van Geffen 8a1de9d8fd Turn ride type selection into a normal dropdown.
This removes the spinner aspect that previously worked around dropdown item limits.
2018-05-29 19:09:56 +02:00
Park Joon-Kyu 30fa405eb3 Make Twitch integration API URL configurable. (#7555) 2018-05-28 22:01:37 +02:00
Hielke Morsink 617372fd38 Check for page correctly 2018-05-27 18:07:05 +02:00
Hielke Morsink 15ae358946
Fix #7569: Assertion hit when using the XY spinners (#7570)
The X/Y spinners change the currently tile selected, and reset the element selection index. Previously this would also set the page to default immediately, but since that's now done on invalidation instead, the page would not be correct. This is fixed by checking the index of the selected element too, instead of only the selected page, in the mouse_up event.
2018-05-27 18:03:34 +02:00
Hielke Morsink f5c8ad2189
Merge pull request #7562 from AaronVanGeffen/windows/inventions-resize
Resizeable invention list window
2018-05-27 15:28:18 +02:00
Ted John cce37698e8 Fix #7454: Rides list windows has weird strings...
The ride list assumed the ride structure had 0 packing. Format the name by explicitly setting format arguments to the ride's name arguments.
2018-05-27 13:27:43 +01:00
Aaron van Geffen 1a2958df84 Make text painting adapt to scrollview width as well. 2018-05-27 00:45:50 +02:00
Aaron van Geffen 248585281c Fix #6221: Make invention list resizeable. 2018-05-27 00:37:45 +02:00
Aaron van Geffen 7a107264df Tile inspector: clip overly long object name strings. 2018-05-26 01:20:46 +02:00
Aaron van Geffen 146235931f Tile inspector: use SCROLLABLE_ROW_HEIGHT constant.
The tile inspector window was using its own LIST_ITEM_HEIGHT constant,
instead of the SCROLLABLE_ROW_HEIGHT constant commonly used in other windows.

This fixes CJK text overlapping.
2018-05-26 01:20:29 +02:00
Hielke Morsink 1a9dc7beee
Fix #7564 Some buttons are not greyed out when they should (#7565) 2018-05-25 23:09:52 +02:00
Aaron van Geffen 8a724c3983 Hide speed and length statistics for flat ride TD6 files (#7563)
This hides the speed and length statistics in the track design list when viewing designs for non-tracked rides.

Fixes #7507.
2018-05-25 23:01:27 +02:00
Aaron van Geffen a2f39079a7
Merge pull request #7556 from Gymnasiast/tile-element-cleanup
Replace all occurrences of tile_element_is_last_for_tile()
2018-05-25 13:34:28 +02:00
Aaron van Geffen 2420a16e9e
Prevent peeps from spawning in the scenario editor.
Regression from 721dc00778.
2018-05-25 12:32:40 +02:00
Hielke Morsink 39b46d3083 Bump network version 2018-05-25 00:47:19 +02:00
Hielke Morsink c50011aa3e Re-add zebra stripes and light text 2018-05-25 00:46:21 +02:00
Hielke Morsink 59c7b097ee Add Ctrl + Click to select tile elements
Co-authored-by: wolfreak99 <jbminor1991@gmail.com>
2018-05-25 00:46:20 +02:00
Hielke Morsink 0d77c279aa Fix: buttons sometimes stay pressed
In the invalidate function of the tile inspector, the checkboxes get checked to match the selected tile element. Some of those checkboxes share their widget index with buttons from other pages. When a checkbox is checked, the it's set to be "pressed", which causes the butons in the other tabs so appear that way. This behaviour is fixed by unpressing widgets when switching to another page.
2018-05-25 00:46:20 +02:00
Hielke Morsink fe40005372 Automatically set the correct page
Instead of having to set the page and setup the widgets correctly when a new elements gets selected, it now switches automatically on invalidation to the correct tab. This fixes the issue where pasted elements were selected but the page for them not shown, and removes two of the intents that were made for the tile inspector.
2018-05-25 00:46:20 +02:00
Hielke Morsink 4b25a71924 #5832 Resize tile inspector automatically when selecting a tile element 2018-05-25 00:46:19 +02:00
Hielke Morsink f79589527d Adjust list style to match other lists
- No odd/even checked colours
- Black text (white on hover)
- Darker background
- Solid fill background for hovered and selected element
2018-05-25 00:46:19 +02:00
Hielke Morsink 4c1097d5b1 Minor code cleanups 2018-05-25 00:46:19 +02:00
Aaron van Geffen 85575b612e Apply formatting to string_to_money. 2018-05-24 17:17:44 +02:00
Aaron van Geffen 1d7d8a8043 Do not reallocate to prefix decimal money with '0'. 2018-05-24 17:17:44 +02:00
Aaron van Geffen 847d4e8b03 Process string_to_money's worst case in O(n) rather than O(n²). 2018-05-24 15:03:15 +02:00
Michael Steenbeek b9186ce83d Make argument const 2018-05-24 13:44:09 +02:00
Gymnasiast ef7b8b8da0 Return MONEY32_UNDEFINED on unsalvagable string_to_money() input 2018-05-24 13:22:25 +02:00
Michael Steenbeek b573bd49b3 Replace all occurrences of tile_element_is_last_for_tile() 2018-05-24 11:44:53 +02:00
Aaron van Geffen 0d248dd6f4 Bump network version. 2018-05-23 16:34:01 +02:00
Aaron van Geffen ca16fe8e62 Fix refurbishment confirmation window not closing in multiplayer mode. 2018-05-23 16:33:37 +02:00
jensj12 3f0308a517 Fix Travis builds 2018-05-23 16:33:37 +02:00
jensj12 b6b3486a3d Fix cost being shown as 0 while paused 2018-05-23 16:33:37 +02:00
jensj12 56fcd2ec94 Use ride_get_start_of_track in TrackDesignSave 2018-05-23 16:33:37 +02:00
jensj12 ce0bf28cb5 Fix not enough cash error showing incorrectly 2018-05-23 16:33:37 +02:00
jensj12 50e3f8b4f6 Cleanup of ride_demolish 2018-05-23 16:33:37 +02:00
jensj12 23dc6bb9d3 Add button to refurbish ride
Add a button to refurbish the selected ride. The cost for this is 35% of the
build price and may only be done if the ride is closed and empty.
2018-05-23 16:33:37 +02:00
Aaron van Geffen b836ad050d Rewrite CodePageFromUTF8 as CodePageFromUnicode. 2018-05-22 19:51:34 +02:00
Aaron van Geffen 3fd75906b6 Fix String::ToUtf8 and String::ToUtf16 on Linux.
wchar_t typically uses UTF-32 codepoints on Linux, unlike Windows, which uses UTF-16.
2018-05-22 19:51:34 +02:00
Aaron van Geffen bab66d1eaf Fix MinGW compilation. 2018-05-22 17:37:07 +02:00
Ted John 71a2cb46d2 Fix ToUpper tests on Windows
LCMapStringEx does not unfold ligatures if there is no uppercase equivalent.
2018-05-22 17:37:07 +02:00
Aaron van Geffen bf1fd997d0 Do not require ICU on MinGW and MSVC targets. 2018-05-22 17:37:07 +02:00
Aaron van Geffen 13e35285f1 Replace non-Windows versions of ToUtf8 and ToUtf16 with ICU calls. 2018-05-22 17:37:07 +02:00
Ted John 6109a9bf17 Improve Windows implementation of ToUpper 2018-05-22 17:37:07 +02:00
Ted John 085d85585a Use Windows API for utf8-utf16 conversions 2018-05-22 17:37:07 +02:00
Aaron van Geffen 8e919d2f84 Change ICU variant of String::ToUpper for string_view argument. 2018-05-22 17:37:07 +02:00
Ted John 386ab1b0fa Add windows implementation for ToUpper 2018-05-22 17:37:07 +02:00
Aaron van Geffen 392459f038 Remove dependency on iconv. 2018-05-22 17:37:07 +02:00
Fusxfaranto a91dd6a356 Implement ICU support for uppercasing, with tests. 2018-05-22 17:37:07 +02:00
Aaron van Geffen f29b42cc26 Allow converting strings between code pages in both directions.
Co-authored-by: Fusxfaranto <fusxfaranto@gmail.com>
2018-05-22 17:37:07 +02:00
Aaron van Geffen ea80f0ea56 Split off GetIcuCodePage to its own function. 2018-05-22 17:37:07 +02:00
Aaron van Geffen ee8bf9bd4a Use ICU for converting strings to UTF-8 instead of our own tables.
Co-authored-by: Fusxfaranto <fusxfaranto@gmail.com>
2018-05-22 17:37:07 +02:00
Aaron van Geffen 3ed6a25bbb
Fix park value regression from #7543. 2018-05-22 11:42:21 +02:00
Michael Steenbeek d44d727fac
Merge pull request #7543 from AaronVanGeffen/refactor/park
Create new Park class
2018-05-21 10:17:38 +02:00
Ted John 080330070b Write file index even if there are no files 2018-05-20 18:40:06 +01:00
Ted John efc14fe8b6 Do not create title sequences directory unnecessarily 2018-05-20 18:39:52 +01:00
Ted John 46300f216f Fix #7544: Freeze when starting headless server with no arguments
Fixes #7313: Loading an invalid path with openrct2 produces results different than expected

Do not load title sequences in headless mode and prevent use of null audio mixer when ride music is stopped.
2018-05-20 02:21:44 +01:00
Aaron van Geffen bfa5bf6ecc Refactor procedural park methods into Park calls. 2018-05-19 20:21:18 +02:00
Hielke Morsink 72b66c6c9d
Merge pull request #7483 from oli414/new-new-offroad-staff
Fix #7418: Staff walk off paths with a connection but no adjacent path
2018-05-19 19:55:24 +02:00
Aaron van Geffen c211ac5a7b Replace singleton Park with relevant Context call. 2018-05-19 19:51:47 +02:00
Michał Janiszewski 8b3cad5ca0 Ensure park_init is only called on constructed parks 2018-05-19 19:44:01 +02:00
Ted John 665f34326b Move week update for park to park class 2018-05-19 19:44:01 +02:00
Ted John 1db2a4986f Rename gTotalRideValue to gTotalRideValueForMoney 2018-05-19 19:44:01 +02:00