Commit Graph

10607 Commits

Author SHA1 Message Date
Ted John 6fd56d140d Remove remaining uses of platform_enumerate_files_begin 2018-01-18 11:38:52 +01:00
Ted John d8b3fb01a7 Fix FileScanner not taking notice of recurse flag 2018-01-18 11:38:52 +01:00
Michał Janiszewski 4eb2ceac47 Fix #7004: Placing track design makes the park disappear 2018-01-18 10:30:34 +01:00
Grant Barker 52ad1e1795 fix make error on macOS 2018-01-17 23:54:57 +00:00
Aaron van Geffen a1e7a18a67 Cheats window: format braces et cetera. 2018-01-16 23:22:52 +01:00
Aaron van Geffen c951c7b539 Ride cheats: reorder and group cheats in boxes by function.
* Change button order.
* Move checkboxes into a more logical order.
* Add group boxes around checkboxes.
2018-01-16 23:22:52 +01:00
Michał Janiszewski 3ba0cc3dae Add missed constexprs 2018-01-14 16:13:37 +01:00
Ted John 888f60c583 Use new platform functions in theme.cpp
Also uses std::string instead of C strings in most places.
2018-01-14 01:17:04 +00:00
Ted John ca7f9dec8e Move function out of C extern 2018-01-14 01:06:47 +00:00
Ted John 9afbfe02ab Add new helper to check if raining 2018-01-14 01:06:47 +00:00
Ted John 742690b4f4 Add enums for weather effect and rain level 2018-01-14 01:06:47 +00:00
Ted John 68202db51c Make ClimateWeatherData and ClimateWeatherGloomColours internal to Climate.cpp 2018-01-14 01:06:47 +00:00
Ted John 83cdd56825 Unify current and next climate state into common struct 2018-01-14 01:06:47 +00: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
Michael Steenbeek 037b236d8f Add the RCT1 edge styles 2018-01-13 15:39:22 +01:00
deurklink c1c6413337 Fix #7011: Swinging and bobsleigh cars going backwards swing in the wrong direction
This fix will make swinging rides like the suspended swinging coaster and the bobsleigh coaster back to the outside of corners when moving backwards (For example during a rollback). This was an original bug in RCT2.
2018-01-13 15:28:07 +01:00
Aaron van Geffen c581656693 Add extra padding to label text in track install window.
Also fixes the window height, not just to accommodate the extra padding,
but also to accommodate the 'space required' field.
2018-01-12 22:29:32 +01:00
Richard Jenkins 8fb5f5c2be
Fix #6993: Inverting track design causes a crash 2018-01-12 15:42:02 +00:00
ZehMatt 84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +01:00
Aaron van Geffen 81398d9225 Reset resize widget's top position properly when invalidating. 2018-01-11 20:27:40 +01:00
Aaron van Geffen 4d219c3abe Refactor name and path into std::string, too. 2018-01-11 20:27:40 +01:00
Aaron van Geffen eb0ad92e6d Use std::vector as LoadSaveListItem container. 2018-01-11 20:27:40 +01:00
Aaron van Geffen fce2996a73 Format braces in LoadSave.cpp. 2018-01-11 20:27:40 +01:00
Aaron van Geffen 6a404eb5dc Make MINGW happy, too. 2018-01-11 20:27:40 +01:00
Richard Jenkins 4a4aa80f31 Fix Windows implementation 2018-01-11 20:27:40 +01:00
Aaron van Geffen aa82df2647 Experimental: use system date/time settings on Windows. 2018-01-11 20:27:40 +01:00
Aaron van Geffen ada31ede29 Change header/sort button appearance. 2018-01-11 20:27:40 +01:00
Aaron van Geffen 9d96377e9b Infer optimal date width when opening load/save window.
In order to accomodate MSVC, we're not using strptime.
2018-01-11 20:27:40 +01:00
Aaron van Geffen 004e60ccc6 Use virtual columns to align date and time.
This also makes the date column use a fixed width. Useful when resizing.
2018-01-11 20:27:40 +01:00
Aaron van Geffen ca172b46c1 Make load/save window resizeable. 2018-01-11 20:27:40 +01:00
Aaron van Geffen c77b00898d Show formatted dates in load/save window. 2018-01-11 20:27:40 +01:00
Michael Steenbeek 1787af8084 Fix #7003: Building sloped paths trough flat ones causes glitches 2018-01-11 16:30:11 +01:00
Michael Steenbeek 47a23603ae Remove unused functions 2018-01-11 13:25:09 +01:00
Michael Steenbeek a0d43d2bd3 Fix Math::Clamp calls 2018-01-11 13:25:09 +01:00
Michael Steenbeek cd5a1ba888 Compile files in world folder as C++ 2018-01-11 13:25:09 +01:00
Aaron van Geffen 1d7bec8a11 Make the virtual floor optional, on by default. 2018-01-11 10:37:40 +01:00
Aaron van Geffen 0527f50c7f Take previous virtual floor area into account when invalidating. 2018-01-11 10:37:40 +01:00
Aaron van Geffen 87ad60be31 Adjust virtual floor height by path construction direction. 2018-01-11 10:37:40 +01:00
Richard Jenkins 9e5502afe3 Enable virtual floor for paths 2018-01-11 10:37:40 +01:00
Aaron van Geffen cccaab37fe Fix track height computation for non-track rides. 2018-01-11 10:37:40 +01:00
Michael Steenbeek a410872fec Move VirtualFloor.cpp to the paint folder and fix Xcode project 2018-01-11 10:37:40 +01:00
Aaron van Geffen c835832e79 Compile the virtual floor code as C++.
Add a proper header file for the virtual floor in the process.
2018-01-11 10:37:40 +01:00
Aaron van Geffen 84026529b4 Introduce new variable gMapVirtualFloorVisible to determine visibility.
This addresses compilation issues for projects that contain no UI code.
Also working towards better invalidation for the software renderer.
2018-01-11 10:37:40 +01:00
Aaron van Geffen 4246b84130 Invalidate virtual floor once selection has changed.
Cache the position of the last invalidate call to prevent a big dip in performance.
2018-01-11 10:37:40 +01:00
Jeroen D Stout fb745d1575 Implement invalidate virtual floor tiles function 2018-01-11 10:37:40 +01:00
Jeroen D Stout dd2e69cf7a Place virtual floor at the effective z-position when placing track pieces 2018-01-11 10:37:40 +01:00
Michał Janiszewski c031f6c5fa Don't reference virtual floor from testpaint 2018-01-11 10:37:40 +01:00
Jeroen D Stout ea37c599e3 Let virtual floor set height function take visibility into account 2018-01-11 10:37:40 +01:00
Jeroen D Stout 3516cb944c Correct check for virtual floor in map 2018-01-11 10:37:40 +01:00
Jeroen D Stout c8785bac55 Add virtual floor removal check to input 2018-01-11 10:37:40 +01:00
Jeroen D Stout 4354aae958 Correct the handling of edges 2018-01-11 10:37:40 +01:00
Jeroen D Stout e4b53dc68a Add more generic virtual floor tile check 2018-01-11 10:37:40 +01:00
Jeroen D Stout d31a911725 Add remove virtual function and clarify invalidate todo 2018-01-11 10:37:40 +01:00
Jeroen D Stout c8e63de802 Refactor tile property checks and code conventions 2018-01-11 10:37:40 +01:00
Jeroen D Stout 8e8dc89068 Improve floor visuals with glassy transparent surface 2018-01-11 10:37:40 +01:00
Jeroen D Stout b9faed7437 Mark being inside a piece of sloped terrain as being occupied 2018-01-11 10:37:40 +01:00
Jeroen D Stout cee9129601 Improve visual quality of virtual floor 2018-01-11 10:37:40 +01:00
Jeroen D Stout 0268be92cb Prevent ride construction from setting tiles when scenery tool is active 2018-01-11 10:37:40 +01:00
Jeroen D Stout 58321ec2cd Fix underground check for sloped surfaces / clipping improvement 2018-01-11 10:37:40 +01:00
Jeroen D Stout 79fa16138a Move virtual_floor_paint to own file / add edge highlighting 2018-01-11 10:37:40 +01:00
Jeroen D Stout d67aba09ad Make placing scenery set virtual floor height 2018-01-11 10:37:40 +01:00
Jeroen D Stout 2849561eb6 Make ride editing set virtual floor height 2018-01-11 10:37:40 +01:00
Jeroen D Stout 128cff60db Add virtual floor painting functions. 2018-01-11 10:37:40 +01:00
Michał Janiszewski 19d35e6898 MSVC fixes pt 5 2018-01-11 09:30:09 +01:00
Michał Janiszewski f50ce343a2 MSVC fixes pt 4 2018-01-11 09:30:09 +01:00
Michał Janiszewski 96744fdaad MSVC fixes pt 3 2018-01-11 09:30:09 +01:00
Michał Janiszewski 6cdf3db245 MSVC fixes pt 2 2018-01-11 09:30:09 +01:00
Michał Janiszewski 469e142c7b Change casing of header files 2018-01-11 09:30:09 +01:00
Michał Janiszewski 156ecb7277 MSVC fixes pt 1 2018-01-11 09:30:09 +01:00
Michał Janiszewski f1fa9f7106 Format TrackPaint.cpp 2018-01-11 09:30:09 +01:00
Michał Janiszewski a9767c801e Clang-format guards 2018-01-11 09:30:09 +01:00
Michał Janiszewski 70505f4fa0 Refactor track_paint to C++ 2018-01-11 09:30:09 +01:00
Michał Janiszewski 82dfde4419 Refactor ride_data to C++ 2018-01-11 09:30:09 +01:00
Michał Janiszewski 5a8cfb16c8 Clang-format guards for static data
This guards most of the hardcoded data from clang-format.

[ci skip]
2018-01-11 09:19:56 +01:00
Michał Janiszewski 6a65f791b6 Add const to arguments 2018-01-10 23:58:57 +01:00
Gymnasiast ce9a72a4e9 Fix export of invented scenery items 2018-01-10 23:24:10 +01:00
Gymnasiast 9f8e3240d3 Fix #6992: Crash when hovering over an RCT1 track design in Track Manager 2018-01-10 21:20:46 +01:00
Gymnasiast 8fb0046136 Fix #6990: Scenery not correctly marked as available 2018-01-10 20:29:20 +01:00
Michael Steenbeek ddd8479827 Move some research logic out of the Inventions window 2018-01-10 16:31:13 +01:00
Michael Steenbeek 37cec95ce2 Move research list import/export to separate functions 2018-01-10 16:31:13 +01:00
Michael Steenbeek 4db3323973 Create scenery_group_set_invented() 2018-01-10 16:31:13 +01:00
Michael Steenbeek 0995ab9910 Fold gResearchNextCategory into gResearchNextItem 2018-01-10 15:31:47 +01:00
Michael Steenbeek b11f59ba6c Refactor gResearchedSceneryItems 2018-01-10 15:31:47 +01:00
Michael Steenbeek d2de1a4a95 Abstract access to gResearchedRide{Types,Entries} 2018-01-10 15:31:47 +01:00
Michael Steenbeek ea4eb7775a Create scenery_set_(not_)invented() 2018-01-10 12:28:36 +01:00
Michael Steenbeek 3d9466a2f6 Fix refactor mistake 2018-01-10 12:05:06 +01:00
Michał Janiszewski c098eaa25d MSVC fix 2018-01-09 23:52:22 +01:00
Michał Janiszewski 517b27c1a4 Format refactored files 2018-01-09 23:52:22 +01:00
Michał Janiszewski 384df8f52c Clang-format guards 2018-01-09 23:52:22 +01:00
Michał Janiszewski 09fbce741d Refactor vehicle_paint to C++ 2018-01-09 23:52:22 +01:00
Michał Janiszewski 5c494c5894 Refactor vehicle_data to C++ 2018-01-09 23:52:22 +01:00
Michael Steenbeek a116bb530f Remove unused ORI_RIDE_FLAG_SEPARATE 2018-01-09 21:35:10 +01:00
Michael Steenbeek 55b473d866 Rename gResearchLastItemSubject to gResearchLastItem 2018-01-09 21:35:10 +01:00
Michael Steenbeek 0ae5d7d476 Remove research_remove_non_separate_vehicle_types()
This removes more usages of the SEPARATE_RIDE flag.
2018-01-09 21:35:10 +01:00
Michael Steenbeek e15c8f8b3b Import broken vehicle and car from S4 2018-01-09 14:06:11 +01:00
Michael Steenbeek f508402317 Fix RCT1 research naming to match RCT2's 2018-01-09 13:51:54 +01:00
Michael Steenbeek 6a88d6e04d Move and rename RCT{1,2,12}.h 2018-01-09 13:36:41 +01:00
Michael Steenbeek 0296608623 Name/fix various RCT1/RCT2 limits 2018-01-09 13:36:41 +01:00
Michał Janiszewski 9c84ae30fb Hide colliding "struct VDStruct" definitions to anon namespaces 2018-01-09 11:01:03 +00:00
Michael Steenbeek 6088a084a2 Replace 0x40 with COLOUR_FLAG_INSET 2018-01-09 10:37:09 +01:00
Michael Steenbeek 857e64590d Name some rct(1)_peep fields 2018-01-09 10:35:07 +01:00
Michael Steenbeek 647f085098
Merge pull request #6925 from AaronVanGeffen/widgets/cleanup-1
Clean up and name remaining widgets
2018-01-09 09:52:15 +01:00
Michał Janiszewski e602162fdb Include openrct2-cli in default `all` target 2018-01-08 13:15:11 +01:00
Michał Janiszewski 6b06ada801 Fix Android compilation 2018-01-08 10:03:31 +01:00
Aaron van Geffen c9b48beea0 Replace WWT_CLOSEBOX with WWT_BUTTON where not used as a close button. 2018-01-08 00:02:25 +01:00
Aaron van Geffen aa885c661e Always apply vertical alignment to button texts.
This has no effect on the appearance as of this commit, yet.
2018-01-08 00:01:45 +01:00
Aaron van Geffen bbef07f514 Refactor widget_text_unknown into widget_text_centred. 2018-01-08 00:01:45 +01:00
Aaron van Geffen e61194961f Rename WWT_25 to WWT_PLACEHOLDER.
This is only used in the bottom toolbar as a placeholder,
while still capturing events.
2018-01-08 00:01:45 +01:00
Aaron van Geffen 12e3e171f1 Refactor WWT_24 into WWT_LABEL. 2018-01-08 00:01:45 +01:00
Aaron van Geffen ecc1cfed2a Rename WWT_DROPDOWN_BUTTON to WWT_BUTTON.
The previous name implied an exclusive association with dropdowns.
While used to display the dropdown triangle button, this is not an
exclusive use.
2018-01-08 00:01:32 +01:00
Aaron van Geffen 7b4c71ff68 Remove unused WWT_4, WWT_5, WWT_11, WWT_18. 2018-01-07 23:54:51 +01:00
Aaron van Geffen 8ad1bc9b86 Rename WWT_14 to WWT_LABEL.
This is used for left-aligned label text.
2018-01-07 23:54:51 +01:00
Aaron van Geffen fad8494ccc Rename WWT_12 to WWT_LABEL_CENTRED.
This is used for centred textual labels.
2018-01-07 23:54:51 +01:00
Aaron van Geffen 9a2d3b226c Rename WWT_13 to WWT_TABLE_HEADER.
This is used for left-aligned header buttons for data tables.
2018-01-07 23:54:51 +01:00
Aaron van Geffen c023f6a3f7 Moved console command, window invalidation, fix help. 2018-01-07 23:53:47 +01:00
Aaron van Geffen bf1bb33b86 Properly invalidate widgets after using date spinners. 2018-01-07 23:53:47 +01:00
Harrison Gentry 752d9bc89d Add cheat and console command to set game date.
Run "date" command on cmdline to set date.

Ex:
$ date 0004 06 13
sets date to June 13th, year 4
2018-01-07 23:53:47 +01:00
Gymnasiast 2ecbac1550 Fix #6972: Last development field is identical to progress field 2018-01-07 22:28:08 +01:00
Michał Janiszewski 77c4fa00bc Use nullptr instead of NULL in C++ 2018-01-07 21:43:37 +01:00
Michał Janiszewski 2c8528798f Use explicit boolean values, compare with nullptr 2018-01-07 21:38:02 +01:00
Michael Steenbeek 7d5de63484 Refactor rct_research_item, refactor access to rct_research_item
This takes away a lot of the bitshift and bit mask trickery previously used.
2018-01-07 15:33:44 +01:00
Richard Jenkins 59439b778b Fix #6919: Shops don't connect to newly-placed paths 2018-01-07 13:40:37 +01:00
Ted John c3eab7ead6 Refactor window.c to C++ 2018-01-07 12:39:58 +01:00
Ted John 83d1b6eb8f Refactor widget.c to C++ 2018-01-07 12:39:58 +01:00
Ted John f18595a1c1 Refactor viewport.c to C++ 2018-01-07 12:39:58 +01:00
Ted John 0b84c7bb43 Refactor viewport_interaction.c to C++ 2018-01-07 12:39:58 +01:00
Ted John c974daf467 Refactor console.c to C++ 2018-01-07 12:39:58 +01:00
Ted John 630a5065db Refactor colour.c to C++ 2018-01-07 12:39:58 +01:00
Ted John b781291b58 Refactor chat.c to C++ 2018-01-07 12:39:58 +01:00
ZehMatt df9854813f Use templates for bounding box test, better branch prediction 2018-01-07 02:18:12 +00:00
ZehMatt d25c46ef93 Refactor image cache to fixed size. 2018-01-07 02:18:12 +00:00
TELK d0ec5e95f8 Add park and company value to console 'get' command
This allows getting the park and company value in scenario that don't display them such as Bumbly Bazaar.
2018-01-06 22:00:28 +01:00
Michael Steenbeek c3e79b1948 Fix Amity Airport coordinate adjustment 2018-01-06 21:46:18 +01:00
Richard Jenkins c966faf9c2 Fix #6242: Scenery invalidated when there is no visual change 2018-01-06 19:20:39 +00:00
Michael Steenbeek 755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Michael Steenbeek 1fa25739fb
Fix #5398: Mini Maze.TD4 causes weird behaviour and crashes 2018-01-06 18:26:28 +01:00
Aaron van Geffen 15a4f67f14 Restore tab-specific widget dimensions for Finances window. 2018-01-06 16:42:48 +00:00
rwjuk 285fc9d11c network version bump 2018-01-06 13:49:29 +00:00
Richard Jenkins 9bb7b66157 Fix #6948 & #6949: Removing or trying to build a ride freezes game 2018-01-06 13:49:29 +00:00
Michael Steenbeek 0430cfb6db Fix #6963: Demolishing ride 0 causes freezes 2018-01-06 14:46:02 +01:00
duncanspumpkin 9e30bfe313 Fix #6954. Readd Error Message for too many rides
Removed during refactor of game actions
2018-01-06 07:48:37 +00:00
Michał Janiszewski 94946ce13b Use min/max instead of clamp for limiting tree count in RMG
Call to `clamp` may not guarantee correct result when `high` < `low`,
use calls to `max()` and `min()` explicitly instead.
2018-01-05 23:44:59 +00:00
Michael Steenbeek 3882715c38 Fix Xcode project 2018-01-05 23:04:52 +01:00
Ted John 3dcbebcf68 Refactor drawing.c to C++ 2018-01-05 22:57:57 +01:00
Ted John 144dbf431c Refactor ttf.c to C++ 2018-01-05 22:57:55 +01:00
Ted John 0c3c998177 Refactor lightfx.c to C++ 2018-01-05 22:57:55 +01:00
Ted John 559ec8a404 Refactor font.c to C++ 2018-01-05 22:57:54 +01:00
Ted John 36d4e7753f Refactor scrolling_text.c to C++ 2018-01-05 19:58:15 +00:00
Ted John cb468cadb6 Refactor string.c to C++ 2018-01-05 19:58:15 +00:00
Ted John 90b63b09f8 Refactor rect.c to C++ 2018-01-05 19:58:15 +00:00