Commit Graph

10992 Commits

Author SHA1 Message Date
Ted John ee8d72ea8d Replace magic numbers with CONSOLE_INPUT_SIZE 2018-03-22 20:16:58 +00:00
Michał Janiszewski 24c2fcbb6c Add threading library to CLI 2018-03-22 20:16:58 +00:00
Michał Janiszewski af0967e95e Add missing headers 2018-03-22 20:16:58 +00:00
Ted John e3eff999a7 Fix building for mingw 2018-03-22 20:16:58 +00:00
Ted John 2c627b43ba Optionally use terminal colour codes 2018-03-22 20:16:58 +00:00
Ted John 6d526d020c Fix for MSVC 2018-03-22 20:16:58 +00:00
Ted John f7dafa9bbb Only enable interactive console for headless 2018-03-22 20:16:58 +00:00
Ted John dd0573b235 Move in game console to UI library 2018-03-22 20:16:58 +00:00
Ted John 395f124a0b Fix console exit for stdin/out 2018-03-22 20:16:58 +00:00
Ted John ec9e812ea7 Replace gConsoleOpen with function 2018-03-22 20:16:58 +00:00
Ted John 5188c3612a Move in game console variables to class 2018-03-22 20:16:58 +00:00
Ted John c29efc7573 Separate consoles to different sources 2018-03-22 20:16:58 +00:00
Ted John 65eb908025 Create new in-game console class 2018-03-22 20:16:58 +00:00
Ted John d18f416370 Add basic interactive console using linenoise 2018-03-22 20:16:58 +00:00
Michael Steenbeek 61ddbd918b Add option to freeze all staff to Cheats window 2018-03-22 09:32:20 +01:00
Michał Janiszewski 7d67291910 Synchronise definition guards with declarations for str utils 2018-03-21 22:39:19 +01:00
Michał Janiszewski 06e97ab6e2 Fix linkage on macOS 2018-03-21 22:39:19 +01:00
Michał Janiszewski fc97c8c5db Reduce inclusion of <string> header 2018-03-21 22:39:19 +01:00
Michael Steenbeek 919533d7c2 Show ride and vehicle names in research list 2018-03-21 22:04:10 +01:00
Michał Janiszewski 2545d01db4 Use libc++-provided strndup on Android 2018-03-21 16:05:00 +01:00
pkubaj 7adde37f56 Fix build with FreeBSD 2018-03-21 14:26:38 +01:00
pkubaj 38cdf5e8c9 Corrected fix to use AVX on FreeBSD>10 2018-03-20 23:15:28 +01:00
pkubaj 1191f64091 Fix build on FreeBSD 10
NOTE: This can be reverted once FreeBSD 10.4-RELEASE goes EoL.
2018-03-20 23:15:28 +01:00
zaxcav 9d3e1fbedf Fix #7176 pending breakdown interfering with mechanic heading to inspection (#7201)
* Fix pending breakdown interfering with mechanic heading to inspection

* Rename peep_fixing sub states per suggestions.

Reset ride->mechanic_status to UNDEFINED in sub-state finish fix/inspect (previously sub_state_13).

* Increment network version. Fix tabs/spaces
2018-03-20 21:55:30 +00:00
Ted John 5245b35a90
Merge pull request #7286 from IntelOrca/refactor/gameaction-parksetloan
Implement some more basic game actions:
- ParkMarketingAction
- ParkSetLoanAction
- ParkSetResearchFundingAction
- StaffSetColourAction
2018-03-20 13:38:56 +00:00
thyeggman ccb1b330a5 Option for early scenario completion (#7187) 2018-03-20 12:58:59 +01:00
Michał Janiszewski af7fd94859 Add missing includes 2018-03-20 09:34:19 +01:00
Ted John 9b604310a2 Implement game action for staff set colour 2018-03-20 09:31:39 +01:00
Ted John 6a8ea7e8d4 Create helper method to create the game action result 2018-03-20 09:31:39 +01:00
Ted John 708843b526 Implement game action for park marketing 2018-03-20 09:31:39 +01:00
Ted John 5a803d2551 Implement game action for park set research funding 2018-03-20 09:31:39 +01:00
Ted John 16a7e21ffa Implement game action for park set loan 2018-03-20 09:31:39 +01:00
Hielke Morsink 9c568105f2 Fix debug builds
Regression from #7261.
2018-03-20 08:19:53 +01:00
Michał Janiszewski d0ec97bab2
Fix missing PATH_MAX on some Linux toolchains
Some toolchains (e.g. clang 7) require explicit include of <linux/limits.h> for PATH_MAX.
2018-03-20 08:18:56 +01:00
Michał Janiszewski 67f74119cf Fix missing headers 2018-03-20 00:27:58 +01:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Michał Janiszewski 3303246b09 Reduce header inclusions 2018-03-20 00:27:58 +01:00
Hielke Morsink 2d1d60294c Improved raising land near edge map
Rather than showing the user an 'off edge map!' error, this simply makes the affected area smaller.
2018-03-19 14:08:37 +01:00
Aaron van Geffen 7bc63dc30a Themes window: use header widgets; minor code clean up. 2018-03-19 10:36:39 +01:00
Aaron van Geffen 8ab568a6a9 Multiplayer: use table header widgets for column headers. 2018-03-19 10:36:39 +01:00
Aaron van Geffen f6933aea4e Multiplayer information: take font line height into account. 2018-03-19 08:34:16 +01:00
Aaron van Geffen a61c84d3b0 Increase button height in server list window. 2018-03-19 08:34:16 +01:00
Aaron van Geffen ca4e1a36fb Fix widget dimensions for 'Start server' window. 2018-03-19 08:34:16 +01:00
Aaron van Geffen 686fedc671 Player window: use LIST_ROW_HEIGHT. 2018-03-19 08:34:16 +01:00
Aaron van Geffen 32e0f12f5b Multiplayer window: use SCROLLABLE_ROW_HEIGHT in scrollpaint. 2018-03-19 08:34:16 +01:00
Aaron van Geffen c0bc2da529 Increase button height in save prompt window. 2018-03-19 08:34:16 +01:00
xp4xbox 463cb7ab26 Fix #5339: Change scenery eyedropper to use a relevant icon. 2018-03-19 08:33:59 +01:00
Michał Janiszewski f1ab13f56e Fix sorting and missed floor() usage 2018-03-18 23:29:13 +01:00
LRFLEW d4cfad8ab2 Fix 'different language linkage' error with Xcode 2018-03-18 23:29:13 +01:00
Michał Janiszewski 4dd0995efb Move cmath out of common.h 2018-03-18 23:29:13 +01:00
Michał Janiszewski 5c6e28284b Move cstddef out of common.h 2018-03-18 23:29:13 +01:00
Michał Janiszewski 28391eaf5d Move cstring out of common.h 2018-03-18 23:29:13 +01:00
Michał Janiszewski f3bdc431e1 Add lost headers 2018-03-18 23:29:13 +01:00
Michał Janiszewski 54cc1ebcdf Reduce includes in common.h 2018-03-18 23:29:13 +01:00
Nick Overdijk fe59637823 Adds constructors to convert from Coords to TileCoords 2018-03-18 23:13:36 +01:00
Nick Overdijk e799dc2962 Document the code by using named functions/variables/comments 2018-03-18 23:13:36 +01:00
Michael Steenbeek 997551e36f
Fix #7305: overflow during park rating calculation 2018-03-18 22:58:09 +01:00
Aaron van Geffen bab1ef465a Automatically scroll once a new month appears in Finances. 2018-03-18 22:41:34 +01:00
Aaron van Geffen df6a86d9bf Leverage more historical data in Finances window.
This adds a horizontal scrollbar to the summary page.
2018-03-18 22:41:34 +01:00
Michał Janiszewski 6cdcda2c65 Start v0.1.3 2018-03-18 22:06:31 +01:00
Aaron van Geffen 9e95488d63 Update title sequence to v0.1.2 release. 2018-03-18 21:04:31 +01:00
Thomas den Hollander af8adfeb40 Fix dithering error in sprite importer 2018-03-18 12:58:50 +01:00
Hielke Morsink 1cd3e5e49c use GAME_COMMAND_FLAG_APPLY instead of hardcoded value 2018-03-18 12:21:24 +01:00
Michał Janiszewski bb98618847 Fix compilation errors in Footpath.cpp 2018-03-18 10:19:17 +01:00
Michał Janiszewski 62000236a8 Add missing Guard.hpp header in Footpath.cpp 2018-03-18 10:19:17 +01:00
Hielke Morsink f9307c8c9e Proplerly check for element to be removed
The element that gets removed is only a ghost while using the path tool, other tools just remove the path immediately.
2018-03-18 10:19:17 +01:00
Hielke Morsink d0471bcbfd un-fill corners that were filled by the ghost
Old behaviour: connected edge and corners get removed.
New behaviour: connected edge may stay connected, but corners will be removed.
2018-03-18 10:19:17 +01:00
Hielke Morsink 16c575c115 Keep paths connected when wanted
A tile can have multiple connections to a path when building with clearance checks disables, but the function that removes the edges doesn't assume this. This PR makes it so that it first checks if there are no other tile elements that want to stay connected to a path before removing an edge.
2018-03-18 10:19:17 +01:00
Duncan e383ac02af Fix #7295: peep_should_go_on_ride_again() checked balloon colour instead of toilet need 2018-03-17 19:49:11 +01:00
Michał Janiszewski f045370fcf Improve track preview window with OpenGL renderer
This adds a warning to track preview window explaining it's not
supported with OpenGL renderer. Also fixes the issue whereby no stats
were printed because of early exit.
2018-03-16 22:41:08 +01:00
Gymnasiast ddd03fb045 Fix #7284: Rotating a maze track rotates each piece individually 2018-03-15 22:32:33 +01:00
Michał Janiszewski 4b323f401f Initialise dl in Surface.cpp 2018-03-14 22:11:30 +01:00
Michał Janiszewski 9e1dfffee8 Remove unnecessary checks for __cplusplus 2018-03-14 22:11:30 +01:00
Michał Janiszewski c27307820e Remove more C-only code from common header 2018-03-14 22:11:30 +01:00
Michał Janiszewski 9b0fe5f09e Don't use registers struct where not strictly required
The only advantage of `struct registers` is the union hierarchy. If this
is not being actively exploited, it is detrimental to use this struct.
2018-03-14 22:11:30 +01:00
Michał Janiszewski 789c176517 Update common header 2018-03-14 22:11:30 +01:00
Michał Janiszewski 10dabfa15c Fix strncpy usage in GuestList.cpp 2018-03-14 22:11:01 +01:00
Michał Janiszewski d1d32456a5 Fix generating screenshot path for GCC8
GCC8 rightfully complains about using improperly-sized buffers in call
to snprintf.
2018-03-14 22:11:01 +01:00
Ted John edb7e7112a Fix import of park entrance locations
gParkEntrances was changed to sint32 positions from sint16 positions in f4ac2b4d5b. This caused a regression as the locations were not being sign extended when imported from S6 files.
2018-03-14 21:30:43 +01:00
Aaron van Geffen c21143505f Fix #7203: Undefined string in custom currency window. 2018-03-14 13:35:51 +01:00
Michał Janiszewski edbca00d66 Fix #7198: Update Android dependencies to 0.8 2018-03-14 01:30:00 +01:00
Aaron van Geffen a68c5301eb Use a range-based for loop in NetworkGroup::Write, too. 2018-03-14 01:25:10 +01:00
Aaron van Geffen e514b2c9cb Fix #6804: Network permissions are not visible. 2018-03-14 01:25:10 +01:00
Hielke Morsink 69867bcecd Fix typo 'instad' -> 'instead' [ci skip] 2018-03-13 23:44:34 +01:00
Gymnasiast 14b22c9801 Fix missing include 2018-03-13 21:07:26 +01:00
Gymnasiast 8e37ee26c9 Avoid warning spam during park entrance drawing 2018-03-13 20:48:16 +01:00
Hielke Morsink b78bd587b7 define BANNER_INDEX_NULL 2018-03-13 19:45:48 +01:00
Gymnasiast 38d3c3eff3 Use tile_element_[gs]et_banner_index() 2018-03-13 19:45:48 +01:00
Hielke Morsink 087519ca62 Fix #5261 Deleting the sign after copy/pasting it will crash the game
Prior to the previous commit, signs could be duplicated by pasting them using the tile inspector, which results in some funky behaviour. A duplicated sign refers to the same banner index (which in turn refers to the same user string ID), making the player unable to modify it. Deleting it would previously even crash the game.
This commit looks for such signs when loading a scenario, and attempts to fix them, by creating a new banner entry (and user string if one is used).
2018-03-13 19:45:48 +01:00
Hielke Morsink d2479e0de0 Create new banner entry and string upon pasting one
Previously pasted banners would refer to the same banner entry and same string ID, possibly causing crashes when deleting one.
2018-03-13 19:45:48 +01:00
Michał Janiszewski afb0c48ebd Sink some arrays 2018-03-13 13:37:41 +01:00
Michał Janiszewski 764520076f
Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Michael Steenbeek bf580625f8 Fix calcutation of number of riders on import
Made a little mistake with this last time. This will now use the same logic as the Guest List window and the increment/decrement counters.
2018-03-13 11:45:06 +01:00
duncanspumpkin 33a6a5a994 Fix #7209: Reset spatial index before removeing peeps on fix save.
If the spatial index is corrupted such as in IndianaJones then deleting multiple peeps from the same spatial index will cause an infinite loop. Therefore this will now reset and remake the spatial index if there are peeps that require removing. Note it doesn't reset the spatial index for all saves as it is not required
2018-03-12 11:27:43 +00:00
deurklink e0c4f88295 Fix #7229: Exploding guests cheat gets rides stuck and freezes game 2018-03-12 10:23:46 +01:00
Michał Janiszewski c4f3643be1 Fix #7246: Android build fails with java.lang.UnsatisfiedLinkError
JNI DETECTED ERROR IN APPLICATION: JNI GetObjectClass called with
pending exception java.lang.UnsatisfiedLinkError: No implementation
found for long website.openrct2.ZipArchive.allocBytes(byte[], int)
(tried Java_website_openrct2_ZipArchive_allocBytes and
Java_website_openrct2_ZipArchive_allocBytes___3BI)
2018-03-11 23:57:50 +01:00
Michał Janiszewski 93041bbce5 Fix mismatched deleter in TryClassifyAsTD4_TD6 2018-03-11 21:19:26 +01:00
Ted John 42490b64fc Show entrance / exit fix messages as verbose only
This is because some title sequences have parks which need fixes and they end up showing on stdout every game launch.
2018-03-10 15:18:25 +01:00
Ted John 74228ed35f Use iterators again for removing empty headings
Improving on f00aa15096, continue to use iterator and just set it to the result of erase.
2018-03-10 13:58:49 +00:00
Ted John f00aa15096 Fix assert in debug mode in initialise_list_items
Erasing vector iterators causes the iterator to become invalid, so use an index instead for the loop.
2018-03-10 10:52:32 +00:00
Hielke Morsink 4bfeaf0c72 Fix #6870 Crash when loading groena lund
This crash only occurs when the option "no test crashes" was enable. With this commit the sprite index will be checked before the vehicle gets checked.
2018-03-10 06:50:45 +00:00
Michał Janiszewski 8cf8db01d3 Fix #7180: Compiler error: trackType may be used uninitialised 2018-03-10 07:49:24 +01:00
Michał Janiszewski 4b2881b48e Improve declaration of deleter type in S4Importer.cpp 2018-03-09 21:34:24 +01:00
Michael Steenbeek 5411c77358 Clean up more direct access to tile elements 2018-03-09 19:40:16 +01:00
Michael Steenbeek 44524d1e6f Name unknown variable 2018-03-09 19:40:16 +01:00
Michał Janiszewski 229c793b33 Fix NO_TTF builds for Windows and macOS 2018-03-09 16:40:40 +01:00
Hielke Morsink 35f3d9f4c9 Fix #7251: "Own all land" cheat does not work
`x` was not set back to `min` in the second for loop, causing all second iterations to immediately stop.
2018-03-09 16:39:04 +01:00
Ted John 39a38dc193 Include SDL2 using sub directory 2018-03-09 16:28:47 +01:00
Ted John e318e0948a Fix a few assertions that were found when using debug CRT 2018-03-09 16:28:47 +01:00
Ted John d2864a139b Use new dependencies split format 2018-03-09 16:28:47 +01:00
Hielke Morsink 5115cdddd8 Remove unused screenshot_format configuration 2018-03-09 15:58:29 +01:00
Hielke Morsink a8f167c45d Fix a few typos
'vehichle' -> 'vehicle'
'none zero' and 'non zero' -> 'nonzero'
2018-03-09 15:58:12 +01:00
Michael Steenbeek 88af2d3954 Rename sub_6CA2DF() to window_ride_construction_update_state() 2018-03-09 09:17:24 +01:00
Joshua Moerman d6c28b2fa4 Using some more CoordsXY instead of separate xy in Map.cpp 2018-03-08 23:41:33 +01:00
Joshua Moerman 426c21eb56 Uses some more informative types in Map.cpp 2018-03-08 23:41:33 +01:00
Joshua Moerman c2eb735871 Replaces magic numbers with appropriate constants 2018-03-08 23:41:33 +01:00
Joshua Moerman e5d143b748 Simplifies map_window_get_pixel_colour_ride
- Splits uint32 into two uint16
- Reuse code for unowned land colour
2018-03-08 23:41:33 +01:00
Aaron van Geffen 887619a87e Use correct fonts for simplified and traditional Chinese. 2018-03-08 22:33:17 +01:00
Michael Steenbeek c7a78807e6 Remove unused function tile_element_check_address() 2018-03-08 12:47:19 +01:00
Michael Steenbeek 7a982503a8 Remove some hard coded numbers 2018-03-08 12:45:38 +01:00
deurklink 87bdd4d079 Fix #7239: Remove all guests cheat crashes with ferris wheel 2018-03-08 09:20:32 +01:00
Gymnasiast ad4e50d728 Fix #7233: Steep slopes unavailable on Hyper-Twister
Also removes powered lift from Hyper-Twister, which was included by mistake.
2018-03-07 19:30:53 +01:00
Michael Steenbeek 1fa2fa8f80
Refactor ride->entrances and ride->exits 2018-03-07 19:10:50 +01:00
Michael Steenbeek ab54d6c370
Increase network version 2018-03-07 11:01:09 +01:00
deurklink 3648f288e5 Fix #7223: 'Remove all guests' does not remove their mass 2018-03-07 10:52:22 +01:00
Aaron van Geffen 8069a04d67 Fix logic error in setting virtual floor height. 2018-03-05 00:24:38 +01:00
ZehMatt e3708c0593 Split special direction to new parameter. 2018-03-05 00:17:34 +01:00
ZehMatt 49d8d37748 Add serialization traits for bool. 2018-03-05 00:17:34 +01:00
ZehMatt bdc1cf8adc Refactor GAME_COMMAND_MAZE_SET_TRACK to game action. 2018-03-05 00:17:34 +01:00
ZehMatt c8328610ee Optimise the algorithm for virtual floor invalidation. 2018-03-04 19:28:56 +01:00
Aaron van Geffen ba1d269227 Move all Virtual Floor code from Map to its own file. 2018-03-04 19:28:56 +01:00
ZehMatt fdf7adecd9 Fix #7002: Always invalidate virtual floor regardless of selection. 2018-03-04 19:28:56 +01:00
Gymnasiast cd8d40d8a5 Include missing header 2018-03-01 20:10:34 +01:00
Michał Janiszewski ad059a540b Round tweened positions to avoid bumping up and down 2018-03-01 14:09:14 +01:00
Ted John 0ee3c45d37 Fix #7196: Crowd Noises Absent
Sounds loaded into memory that matched the target audio format were returning a failed result.
2018-02-25 02:40:36 +00:00
Aaron van Geffen e53741812f Fix deleting of multibyte characters. 2018-02-24 10:47:52 +01:00
Aaron van Geffen 88cfd14ce5 Fix #7020: end key not working in text input. 2018-02-24 10:47:52 +01:00
Michael Steenbeek c86dfe5f1b Replace hard coded max map size 2018-02-22 10:22:47 +01:00
Gymnasiast f0805c3f59 Increase network version 2018-02-21 22:37:54 +01:00
Gymnasiast 7a2a73b418 Fix #7205: Park entrance fee cannot be set higher than £100 2018-02-21 22:37:54 +01:00
Michał Janiszewski 08bcbe3912 Make network version a variable to reduce recompilations 2018-02-21 22:21:09 +01:00
Gymnasiast a34eec2d3a Increase network version 2018-02-21 20:08:25 +01:00
Michael Steenbeek 701ed1554a Make entrances/exits at station height take precedence 2018-02-21 20:08:25 +01:00
Michael Steenbeek c28f4987d3 Remove some entrance/exit height assumptions 2018-02-21 20:08:25 +01:00
Gymnasiast fb806b572d Increase network version 2018-02-21 09:50:07 +01:00
Michael Steenbeek 2de6529cf5 Use big coordinates for PeepSpawn's Z coordinate 2018-02-21 09:50:07 +01:00
Gymnasiast d92883eee9 Replace NULL with nullptr 2018-02-21 09:50:07 +01:00
Michael Steenbeek ea0566a3f5 Split PeepSpawn and rct12_peep_spawn 2018-02-21 09:50:07 +01:00
wolfreak99 2d8c473f75 Sync Peep Spawn over network 2018-02-19 21:11:14 +01:00
Michał Janiszewski 32619f460b Remove remaining calls to get_current_rotation in paint code 2018-02-17 13:11:07 +01:00