Commit Graph

4242 Commits

Author SHA1 Message Date
duncanspumpkin 7484b3f00e Fix formating. Add correct includes 2019-03-02 16:06:03 +00:00
duncanspumpkin aef3f24178 Remove reference to game command 2019-03-02 16:06:03 +00:00
duncanspumpkin 61cb84e0ca Add WaterSetHeightAction 2019-03-02 16:06:03 +00:00
Duncan ec60781a2b
Merge pull request #8796 from duncanspumpkin/entranceexit_place_ga
Entranceexit place ga
2019-03-02 16:04:01 +00:00
Duncan 46ae0934f8 Fix #8809. Check for valid colours ignored special cases (#8813)
Due to the special cases the colour check would fail and this would mean that the ride type could not be changed. 255 and 0 are both used to indicate that the ride should use different colours for each train.
2019-03-02 12:51:27 +01:00
duncanspumpkin 87a21d6cda Increment network version 2019-03-02 07:25:28 +00:00
duncanspumpkin e128a78b91 Fix formating and other issues
Refactor as per comments.

Simplified some of the code as well

Use constants
2019-03-02 07:24:42 +00:00
duncanspumpkin c55ff1288d Add conversion from old command 2019-03-02 07:24:42 +00:00
duncanspumpkin f10391c98d Remove references to old command 2019-03-02 07:24:42 +00:00
duncanspumpkin 7f586f50e1 Move all callees to the game action framework. Fix CoordXY bug 2019-03-02 07:24:41 +00:00
duncanspumpkin 27046c2468 Simplify game action by creating seperate function for track design ptd1 2019-03-02 07:24:41 +00:00
duncanspumpkin 6081aa4720 Create place game action 2019-03-02 07:24:41 +00:00
ζeh Matt e776faee97
Merge pull request #8812 from ZehMatt/import-export-fixes
Fix #8811: Import export fields not copied correctly.
2019-03-02 07:47:36 +01:00
Matt 538526f075 Bump up network version. 2019-03-02 04:51:20 +01:00
Matt 8b6012a44b Add missing field "no_of_food" to importer/exporter. 2019-03-02 04:46:31 +01:00
Matt 5f6ae6ac8c Fix copying the wrong field. 2019-03-02 04:45:47 +01:00
ζeh Matt dcf750f004
Merge pull request #8805 from ZehMatt/ga-toplevel-pause
Fix nested query not working in paused game state.
2019-03-01 10:56:57 +01:00
Matt df5dfa6863 Bump up network version. 2019-03-01 10:21:09 +01:00
Matt 6350a3b0b4 Fix nested query not working in paused game state. 2019-03-01 08:26:03 +01:00
ζeh Matt 4805c1c082
Merge pull request #8801 from ZehMatt/mp-playerinfo
Synchronize player info
2019-02-28 20:41:00 +01:00
Ted John cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
Matt d14b07a748 Bump up network version. 2019-02-28 20:15:32 +01:00
Matt 0000e9741f Fix #8798: Player info not being synchronized over network. 2019-02-28 20:15:11 +01:00
duncanspumpkin 6c91d54255 Increment network version 2019-02-28 09:13:11 +00:00
duncanspumpkin 5d82760cf0 Use more sensible flags 2019-02-28 08:22:52 +00:00
duncanspumpkin 1565982f18 Fix formating 2019-02-28 08:22:52 +00:00
duncanspumpkin 7fdc482e7d Make review changes. Fix formating 2019-02-28 08:21:58 +00:00
duncanspumpkin 245a7fe64d Remove old game command 2019-02-28 08:21:58 +00:00
duncanspumpkin f4791f9d96 Remove allow while paused 2019-02-28 08:21:58 +00:00
duncanspumpkin 705fe17362 Implement RideEntranceExitRemoveAction
Move all calls to the game action framework
2019-02-28 08:21:58 +00:00
Duncan 8ed824f285
Merge pull request #8773 from duncanspumpkin/scenery_place_ga
Implement SmallSceneryPlaceAction
Fix #8793, Fix #8787
2019-02-28 08:21:02 +00:00
duncanspumpkin de1ec264b0 Increment network version 2019-02-28 08:03:00 +00:00
Duncan f0092b7aae
Merge pull request #8781 from duncanspumpkin/flag_refactor
Flag refactor
2019-02-27 19:18:02 +00:00
duncanspumpkin cbb02ec98a Use game action for track design. Fix error titles.
Add files to xcode project (#20)

Finally get the placement code working

Use game action for ghosts. Fix basequarter

Remove references to old command

Fix formating remove unused var

Fix clang format
2019-02-27 18:51:54 +00:00
duncanspumpkin 4714350216 Implement SmallSceneryPlaceAction 2019-02-27 18:46:51 +00:00
jensj12 89066759eb Fix #8264: Rides and scenery placeable outside of map with ZC and Sandbox mode enabled (#8715)
* Fix #8264: Rides and scenery placeable outside of map with ZC and Sandbox mode enabled

map_can_construct_with_clear_at first checks whether it is inside the map, and then checks gCheatsDisableClearanceChecks, making earlier checks for gCheatsDisableClearanceChecks unnecessary.

* Increase network version
2019-02-27 18:46:18 +00:00
Michael Steenbeek 6d3200aacc
Merge pull request #8772 from IntelOrca/refactor/sprite-import-export-2
Refactor in-game sprite structs
2019-02-27 13:29:13 +01:00
duncanspumpkin 9d78bb0d4e Fix compile and formating 2019-02-27 10:54:08 +00:00
duncanspumpkin 584c4d5134 Prevent a dereference of nullptr 2019-02-27 10:49:48 +00:00
duncanspumpkin d3c0a76259 Use correct functions where defined 2019-02-27 10:49:48 +00:00
duncanspumpkin 47b0c779de Use correct function call.
SMALL_SCENERY_FLAG_ANIMATED is for SmallScenery not for SmallSceneryElements
2019-02-27 10:49:48 +00:00
duncanspumpkin 83f7547bf2 Use Is/Set BlockBrakeClosed 2019-02-27 10:49:48 +00:00
duncanspumpkin 92cdbfb0a8 Use Is/Set Indestructible 2019-02-27 10:49:48 +00:00
duncanspumpkin 411e5c47a2 Use Is/Set Accounted 2019-02-27 10:49:48 +00:00
duncanspumpkin fae15fceca Use IsBroken 2019-02-27 10:49:48 +00:00
duncanspumpkin 7840f6a7f7 Use SetIsBroken 2019-02-27 10:49:48 +00:00
duncanspumpkin 6495ffdb34 Use IsBlockedByVehicle 2019-02-27 10:49:48 +00:00
duncanspumpkin 354cce71eb Introduce new functions to stop direct access 2019-02-27 10:49:48 +00:00
duncanspumpkin c68af628c2 Increment network version 2019-02-27 10:18:52 +00:00
duncanspumpkin 93873c5e74 Make review changes. Fix formating
Reorder includes
2019-02-27 08:15:11 +00:00
duncanspumpkin 9d76c609f3 Provide conversion from gamecommand in replay manager 2019-02-27 08:15:11 +00:00
duncanspumpkin e1977d1a2f Remove references to game command 2019-02-27 08:15:11 +00:00
duncanspumpkin d01dfe44d5 Add RideSetSettingAction
Use game action for calling

Use correct error titles for operation mode changes
2019-02-27 08:15:07 +00:00
Ted John aa7d181070 Define constants for vehicle type 2019-02-26 16:49:29 +00:00
duncanspumpkin d5ad6b7b0f Move game command calls to a single call site 2019-02-26 12:47:44 +00:00
Michael Steenbeek 5b0367ea0e
Merge pull request #8774 from duncanspumpkin/ghost_refactor
Use IsGhost() to access ghost state
2019-02-26 12:46:16 +01:00
duncanspumpkin eb9ecea92e Add IsGhost to the testpaint calls 2019-02-26 08:50:04 +00:00
duncanspumpkin 5facc32100 Increment network version 2019-02-26 08:15:32 +00:00
duncanspumpkin 07b372f4c6 Make review changes fix clang format 2019-02-26 08:14:57 +00:00
duncanspumpkin c1546a92b7 Implement RideSetVehicleAction
Move all callees to the new action.
Required rework on how the ride type change worked.
2019-02-26 08:14:57 +00:00
Michał Janiszewski b957ad5e9e
Remove redundant move (#8778) 2019-02-26 06:41:01 +01:00
Ted John a3af56f285 Fix formatting 2019-02-25 22:31:14 +00:00
duncanspumpkin 112b40910b Pass a bool to the set function. Make review changes 2019-02-25 20:44:12 +00:00
Matt f0366b84e4 Fix ride_shop_connected dereferencing null. 2019-02-25 20:58:41 +01:00
Ted John bac3168a23 Refactor IsChild to IsHead 2019-02-25 17:58:22 +00:00
Ted John ca807c5ed4 Refactor some IsChild references to GetHead 2019-02-25 17:51:25 +00:00
duncanspumpkin 737c308e4e Use IsGhost() to access ghost state
Added set and clear ghost to further prevent direct access to flags
2019-02-25 15:12:35 +00:00
duncanspumpkin 6890f4f756 Use quarter tile for map can construct at
Make callees of map_can_construct_with_clear use QuarterTile

Use quarter tile for small scenery rotation

Fix clang format

Further clang format
2019-02-25 13:51:08 +00:00
duncanspumpkin f9fe09634c Move quarter tile class to the tile element header.
Refactor flags slightly
2019-02-25 13:51:07 +00:00
duncanspumpkin 921062d073 Start transferring trackdata to use the seperate values
Finish the conversion
2019-02-25 13:51:04 +00:00
duncanspumpkin dffa56aca2 Create a class for the quarter tile
Finish implementing TrackQuarterTile

Rename class
2019-02-25 13:51:00 +00:00
Ted John 520b1b4819 Try out changed sprite structs for main game 2019-02-25 12:29:31 +00:00
Ted John 08e560da28
Merge pull request #8735 from IntelOrca/refactor/sprite-import-export
Refactor sprite import / export
2019-02-25 12:25:59 +00:00
Duncan 94b5133388
Merge pull request #8737 from duncanspumpkin/load_or_quit_ga
Add LoadOrQuitAction
2019-02-25 11:28:57 +00:00
Michael Steenbeek ec2d609200
Merge pull request #8734 from Broxzier/feature/multiplayer-tweaks
Disable kick button when unable to use it + slight refactor
2019-02-25 10:34:56 +01:00
Ted John 08508cc638
Fix #8739: savegame from original game crashes when cruising through map (#8746) 2019-02-24 23:23:41 +00:00
Ted John a6e7041f49 Fix #8769: Segmentation fault on host 2019-02-24 23:22:43 +00:00
duncanspumpkin 2d1ed8ce05 Fix interactive console staff set costume command.
After the refactor to GameActions, forgot to actually issue the command after generating it.
2019-02-24 18:10:07 +00:00
ζeh Matt 92b6ed5a94
Merge pull request #8751 from ZehMatt/fix-8741
utf8* string refactor.
2019-02-24 17:33:37 +01:00
Duncan 6a0cff2676 Fix being unable to refund when in negative money 2019-02-24 17:31:43 +01:00
Ted John d31e92e652 Fix #8742: access violation in vehicle_update_sound_params 2019-02-24 16:49:03 +01:00
Ted John 81d41895d2 Fix divide by zero in ride_prepare_breakdown 2019-02-24 11:57:05 +00:00
Nathaniel Ngo 300fd3a589 Fix for Issue#8725: refactoring _currentTrackBegin and _previousTrackPiece to use CoordsXYZ struct (#8759)
* Refactored _currentTrackBeginX, _currentTrackBeginY, _currentTrackBeginZ to use a CoordsXYZ struct

* Refactored _previousTracPieceX, _previousTrackPieceY, _previousTrackPieceZ to use a CoordsXYZ struct

* Refactored _currentTrackBegin and _previousTrackPiece in source files

* Fixed clang formatting
2019-02-24 09:15:31 +00:00
Matt a7f8c8aa36 Refactor utf8* use over std::string 2019-02-24 00:08:05 +01:00
duncanspumpkin b60d97ef55 Use enum values for the savePromptMode 2019-02-22 09:08:04 +00:00
duncanspumpkin dac1b9ab4a Fix ci issues 2019-02-22 09:01:40 +00:00
duncanspumpkin c24c6bdf0a Remove references to old game command 2019-02-22 09:01:39 +00:00
duncanspumpkin eadef45ffd Add LoadOrQuiteAction 2019-02-22 09:00:38 +00:00
Hielke Morsink d460443305 Introduce network permission enum
This enum needs to match the vector. To make sure their sizes are equal,
the vector has been changed to an std::array.
2019-02-21 19:50:07 +01:00
duncanspumpkin a8cf6381da Make changes for set last network position change 2019-02-21 16:04:26 +00:00
duncanspumpkin 71bdd28022 Increment network version 2019-02-21 16:00:31 +00:00
duncanspumpkin 7cbed69816 Make changes from review 2019-02-21 16:00:31 +00:00
duncanspumpkin 1227bc09fc Remove references to game command 2019-02-21 16:00:31 +00:00
duncanspumpkin 3a615c2126 Use new game action for callees 2019-02-21 16:00:31 +00:00
duncanspumpkin e8b2c0f16f Add TrackRemoveAction 2019-02-21 16:00:31 +00:00
Matt 92d73e2fab Set last player position based on game action result. 2019-02-21 15:51:00 +01:00
Ted John 3b7b46706c Export sprites field by field 2019-02-20 23:51:43 +00:00
Ted John b77bc56a52 Copy vehicle structure for S6 2019-02-20 23:31:14 +00:00
Ted John c0e4eff9f1 Start copying sprite structures for RCT1 and RCT2 2019-02-20 23:31:14 +00:00
Ted John ddaddf59c6 Import misc sprites field by field 2019-02-20 23:31:14 +00:00
Ted John 67ae973ac8 Import peep field by field 2019-02-20 23:31:14 +00:00
Ted John 1b83b9881b Import vehicle field by field 2019-02-20 23:31:14 +00:00
Ted John 9960397f2c Import litter field by field 2019-02-20 23:31:14 +00:00
Duncan 9a746c4fc1
Merge pull request #8733 from duncanspumpkin/fix_pause
Fix pause
2019-02-20 19:41:56 +00:00
duncanspumpkin 768321c517 Increment network version 2019-02-20 19:14:24 +00:00
duncanspumpkin 3467941310 Fix #8732 GameActions not working when in negative money.
Related to the simplification to the finance code
2019-02-20 19:14:10 +00:00
Ted John 440511afc5 Use uint16_t for marketing probability 2019-02-20 16:51:19 +00:00
Michael Steenbeek dfa0c528c2 Rename command to forbid_marketing_campaigns
Co-Authored-By: IntelOrca <ted@brambles.org>
2019-02-20 16:49:03 +00:00
Ted John 4013479094 Refactor marketing to be a single vector 2019-02-20 16:49:02 +00:00
Ted John 261dd32697
Refactor peep_interact_with_path to prevent null ride warnings (#8728) 2019-02-20 16:47:38 +00:00
duncanspumpkin d959657346 Increment network version 2019-02-19 15:22:29 +00:00
duncanspumpkin 9b6fdd41aa Remove redundant code. Rename to standard style 2019-02-19 15:20:55 +00:00
duncanspumpkin 6375d2537a Move and refactor shop interact with path code to prevent possible desync 2019-02-19 15:20:49 +00:00
duncanspumpkin 09bb99d9e8 Fix clang format and travis errors
Minor refactor

Move key callback code into callbacks. Fixes shop placement

Use rotate_map_coordinates
2019-02-19 12:31:22 +00:00
duncanspumpkin 4d3c594e47 Provide a translation for the replay manager 2019-02-19 12:31:22 +00:00
duncanspumpkin 8bf3689d42 Introduce flag to prevent ghosts in multiplayer
Fix error message arguments

Remove dead code. Fix clang format
2019-02-19 12:31:11 +00:00
duncanspumpkin 77b25714ff Move callbacks into GameActionCallbacks
Remove remaining references to game command
2019-02-19 12:30:42 +00:00
duncanspumpkin 650e8291d0 Start moving track place into GameAction framework 2019-02-19 12:30:33 +00:00
Ted John cce979f96b
Remove logic for required objects (#8718)
This allows TARMAC to be removed when `remove_unused_objects` is called.
2019-02-19 11:55:43 +00:00
ζeh Matt 8a6dd5c4dd Fix #8720: Desync due to boats colliding with ghost pieces 2019-02-19 11:39:48 +01:00
Matt d7ff3854a9 Bump up network version. 2019-02-18 17:20:18 +01:00
Matt a6c6d6ddc3 Update checks for when money is required. 2019-02-18 17:19:44 +01:00
Matt 21e4c52853 Use finance_check_affordability instead of CheckActionAffordability 2019-02-18 17:19:44 +01:00
Matt 914bf3a0c6 Add finance_check_money_required and finance_check_affordability helper functions. 2019-02-18 17:19:44 +01:00
ζeh Matt a1d1669492
Merge pull request #8713 from ZehMatt/replay-bpb
Add bpb.sv6 to the replays with 7000 ticks.
2019-02-18 13:38:22 +01:00
Matt 3f07fd6bed Bump up network version. 2019-02-17 10:12:02 +01:00
Matt 7a18fc4b96 Fix ClearAction breaking out of the loop too early. 2019-02-17 10:12:02 +01:00
Matt 597b0956fc Fix SmallSceneryRemoveAction returning no error on invalid coordinates. 2019-02-17 10:12:02 +01:00
Matt 5f02c480c2 Fix FootpathRemoveAction crashing with invalid coordinates. 2019-02-17 10:12:02 +01:00
Matt 2d78eace05 Use QueryInternal in ExecuteInternal. 2019-02-17 10:12:02 +01:00
Matt a630c17e92 Fix ReplayManager testing checksums out of order. 2019-02-16 09:10:05 +01:00
ζeh Matt 416915c883
Merge pull request #8711 from ZehMatt/ga-toplevel
Refactor direct calls to Query and Execute on game actions.
2019-02-15 17:07:53 +01:00
Matt 00be865ff1 Use ExecuteNested/QueryNested instead of passing a parameter. 2019-02-15 16:32:11 +01:00
Duncan 79ccc8ca32
Merge pull request #8705 from phillipwalters/develop
Removed dead code per issue 8677 (https://github.com/OpenRCT2/OpenRCT2/issues/8677)
2019-02-15 13:58:57 +00:00
Matt 16e371c792 Bump up network version. 2019-02-15 09:01:38 +01:00
Matt 60ec1da0f8 Remove direct calls to Execute Query on action. 2019-02-15 08:55:01 +01:00
Matt 22811e0e85 Remove direct calls to Execute Query on action. 2019-02-15 08:50:48 +01:00
Matt 46c9bcc4bc Remove direct calls to Execute Query on action. 2019-02-15 08:47:07 +01:00
Matt caa490642c Refactor GameActions to allow non-top level actions. 2019-02-15 08:43:05 +01:00
Michael Steenbeek 2a4215a30f
Create constant for SCROLLING_MODE_NONE 2019-02-14 22:41:48 +01:00
ζeh Matt d143c7b7c6 Fix 8698 (#8709) 2019-02-14 22:09:16 +01:00
Ted John 8c2872ad1e Fix gcc 2019-02-13 22:51:10 +00:00
Ted John eaa671632f Fix formatting 2019-02-13 20:31:55 +00:00
Ted John ba445cb6ef Pass Ride* instead of ride_id_t 2019-02-13 20:16:42 +00:00
Phillip Walters b7787daa9f More formatting changes. 2019-02-12 18:02:33 -08:00
Phillip Walters 11ff0b6688 Cleaned up some formatting 2019-02-12 17:53:39 -08:00
Ted John fdf9f36fab Pass Ride* instead of ride_id_t 2019-02-12 23:58:45 +00:00
Ted John 9e461b2e34 Pass Ride* instead of ride_id_t 2019-02-12 23:29:38 +00:00
Ted John fd090f5ef3 Refactor PickRideToGoOn 2019-02-12 23:29:38 +00:00
Ted John 9706dd8675 Pass Ride* instead of ride_id_t 2019-02-12 23:29:37 +00:00
Ted John e361655b10 Pass Ride* instead of ride_id_t 2019-02-12 23:29:37 +00:00
Ted John aaacece0ea Pass Ride* instead of ride_id_t 2019-02-12 23:29:37 +00:00
Phillip Walters 28d4446da4 Re-added some code that shouldn't have been removed and removed some other code that I missed last time. 2019-02-11 18:58:56 -08:00
duncanspumpkin af65bc33e7 Increment network version 2019-02-11 10:57:58 +00:00
duncanspumpkin c87430e09d Turn off clang format 2019-02-11 10:57:31 +00:00
duncanspumpkin 866d143930 Move Pause Toggle into the GameAction framework 2019-02-11 10:46:12 +00:00
Phillip Walters 14835b9e31 Removed dead code per issue 8677 (https://github.com/OpenRCT2/OpenRCT2/issues/8677) 2019-02-10 18:17:05 -08:00
Michael Steenbeek 76603ad1b3
Fix #8696: Setting land height costs money in no-money scenarios 2019-02-10 22:14:23 +01:00
Michał Janiszewski 5e74f7487d
Merge pull request #8700 from janisozaur/icc-fixes
Icc fixes
2019-02-10 12:21:33 +01:00
ζeh Matt 20989ae4d8
Merge pull request #8675 from tomlankhorst/compress-replays
.sv6r version 2: introducing compression
2019-02-10 11:01:26 +01:00
Michał Janiszewski 9da931d5e7 Remove offsetof for non-POD data 2019-02-10 00:20:34 +01:00
Michał Janiszewski 838289abce Mark functions as static 2019-02-10 00:20:34 +01:00
Michał Janiszewski 379fd42dc4 Fix types passed to ride_type_has_flag 2019-02-10 00:04:52 +01:00
Michał Janiszewski 70ef8151fc Fix types passed to printf-like functions 2019-02-10 00:04:52 +01:00
ζeh Matt be491d3c6f Bump network version 2019-02-09 23:27:26 +01:00
Matt 02a14d3883 Move setting common price into RideSetCommonPrice 2019-02-08 18:03:06 +01:00
Matt 9508044aa7 Add missing member to serialisation. 2019-02-08 18:03:06 +01:00
Matt d87ca57e72 Replace game command references with new game action. 2019-02-08 18:03:06 +01:00
Matt a5e48e759d Implement RideSetPriceAction. 2019-02-08 18:03:06 +01:00
duncanspumpkin 640337159a Increment network version 2019-02-08 14:08:55 +00:00
duncanspumpkin 44cd8c3150 Refactor. Add CoordsXY to data serialiser 2019-02-08 14:08:26 +00:00
duncanspumpkin ea585950f6 Refactor. Split out into multiple functions. 2019-02-08 14:08:26 +00:00
duncanspumpkin fd7f9fefca Move Land Set Height over to GameAction Framework 2019-02-08 14:08:26 +00:00
Ted John 907e43acd8
Merge pull request #8670 from IntelOrca/feature/download-objects
Auto-download missing objects
2019-02-08 12:55:05 +00:00
ζeh Matt 436f15f22e
Merge pull request #8692 from ZehMatt/gameaction-things
Handle unregistered game actions with error logging.
2019-02-07 23:39:11 +01:00
Ted John 535b075310 Reduce button text further and add tooltips 2019-02-07 22:00:30 +00:00
Ted John 3aa55ff875 Refactor and improve download of objects 2019-02-07 21:59:15 +00:00
Ted John 5fb3c10c3a Make download objects async with progress 2019-02-07 21:59:15 +00:00
Ted John 27f70e3656 Get basic object downloading working 2019-02-07 21:58:34 +00:00
ζeh Matt f5e24bd973
Merge pull request #8652 from ZehMatt/network-window
Network window
2019-02-07 21:10:03 +01:00
Duncan d03bd95598
Register the ride set appearance action to prevent server crash (#8691)
* Register the ride set appearance action to prevent server crash

* Bump network version

* Copy the type back when deserialising

This should really be fixed by adding RideSetAppearanceType to the dataserialiser

* Switch the types to prevent possible serialiser issues
2019-02-07 19:53:09 +00:00
Matt 598ea08529 Update copyright. 2019-02-07 18:50:58 +01:00
Matt 0d1c8b8d31 Fix CircularBuffer push_back method. 2019-02-07 18:50:58 +01:00
Matt 57eccef347 Move format_readable_size and format_readable_speed into Localisation 2019-02-07 18:50:58 +01:00
Matt 16bf190f7a Use localisation for speed and size information. 2019-02-07 18:50:58 +01:00
Matt a26e9231cf Simplify CircularBuffer 2019-02-07 18:50:58 +01:00
Matt ecd4f61115 Add Network window 2019-02-07 18:50:58 +01:00
Matt 2931ac6e31 Track bytes sent and received in Network. 2019-02-07 18:50:58 +01:00
Matt e4f1b12fa4 Add CircularBuffer. 2019-02-07 18:50:58 +01:00
Matt 1553cf8c58 Bump up network version. 2019-02-07 18:36:44 +01:00
Matt b071be49bd Add checks for unregistered game actions and report errors. 2019-02-07 18:35:03 +01:00
Matt ee00143f3a Throw assert only in debug builds for missing game actions. 2019-02-07 18:23:58 +01:00
Aaron van Geffen 3be6137fde
Rename event_07 to periodic_update. (#8684) 2019-02-07 17:46:52 +01:00
duncanspumpkin bca79da193 Check for null id 2019-02-07 11:41:54 +00:00
duncanspumpkin 5e319a4a37 Increment network version 2019-02-07 10:16:20 +00:00
duncanspumpkin 892d6dc5f7 Be explicit about nullptr checks.
Keep travis happy
2019-02-07 10:16:01 +00:00
duncanspumpkin 11c16955c5 Small refactor to use enum class 2019-02-07 08:14:45 +00:00
duncanspumpkin 201db19d0a Move Ride Set Appearance into action framework 2019-02-07 08:14:45 +00:00
Aaron van Geffen 2a416dce81
Set more maze error messages in MazeSetTrackAction. (#8683) 2019-02-07 00:29:50 +01:00
Duncan b27923093c Fix #7987: Broken track designs increase money by MONEY32_UNDEFINED 2019-02-06 22:20:42 +01:00
Michał Janiszewski c42ded66b2 Fix #8674: Negative values not displaying correctly 2019-02-06 22:18:58 +01:00
Michał Janiszewski ad888fbf9d
Require at least 1.4 version of benchmark (#8681) 2019-02-06 21:30:33 +01:00
Tom Lankhorst ddfbaac13f
Fix MSVC type conversion warning 2019-02-06 12:13:59 +01:00
Tom Lankhorst 72519d8bb8
do not use designated initializer 2019-02-06 11:28:39 +01:00
Tom Lankhorst e24314bb5a
Fix syntax error and add <memory> 2019-02-06 11:06:16 +01:00
Tom Lankhorst 706d1be865
Avoid illegal ptr conversions 2019-02-06 10:38:25 +01:00
Tom Lankhorst f48f347798
Internally compress (zlib lvl.9) replay files
This effort reduces the size of replays by a factor 2 to 10 depending on
the park complexity. ZLIB is used as the compression backend.

- The replay file version is bumped to 2.
- An `sv6r` file still starts with a magic number and a version.
- If version = 1, the file stream is consumed by the ReplayRecordData
serializer.
- If version > 1, the file stream is decompressed and the resulting
stream is consumed by the ReplayRecordData serializer.
- Introduced `Compatible` that indicates whether a file with a version
mismatch is compatible. E.g.: v1 is compatible with this `ReplayManager`
2019-02-06 10:12:21 +01:00
Duncan 57471edc47
Merge pull request #8672 from Xkeeper0/i/8662
Fix for #8662 paint_haunted_house_structure crash
2019-02-06 07:46:57 +00:00
duncanspumpkin 752df2607a Increment network version 2019-02-05 20:39:53 +00:00
duncanspumpkin 8a69b89df6 Move Staff Set Orders into game action framework.
Split up costume and order game commands
2019-02-05 20:38:18 +00:00
Duncan c436a656ad
Merge pull request #8666 from cgdolan/develop
Implement game action for sign set style
2019-02-05 20:35:11 +00:00
duncanspumpkin 50b241d20d Add missing include and rework to use Coords 2019-02-05 19:27:30 +00:00
Xkeeper 2828cbb2fc
Fix crash in FerrisWheel paint
[OpenRCT2/OpenRCT2#8662]
2019-02-05 11:14:17 -08:00
Xkeeper a22260b56a
Fix crash in MapAnimation re: small scenery
[OpenRCT2/OpenRCT2#8662]
2019-02-05 11:02:22 -08:00
Xkeeper 2bb8813c41
Fix crash in paint_haunted_house_structure
[OpenRCT2/OpenRCT2#8662]
2019-02-05 11:01:23 -08:00
Michał Janiszewski 4192ffe57e
Improve cmake for MSVC (#8581)
* Improve cmake for MSVC

* Fix mingw builds
2019-02-05 16:12:58 +01:00
Christopher G. Dolan 19a58fa5fe Fix format, move validation logic to query, update network version 2019-02-04 17:30:45 -08:00
Michał Janiszewski 8a395e3706
Fix misaligned access (#8665)
Platforms like ARM are very sensitive to unaligned access. This change
makes sure the addresses obey the C++ standard and are properly aligned.
2019-02-04 23:15:14 +01:00
Christopher G. Dolan a8864092c0 fix format and serialize all ivars 2019-02-03 23:02:00 -08:00
Christopher G. Dolan 075983da0f Implement game action for sign set style 2019-02-03 22:20:01 -08:00
Michał Janiszewski 6bdbe248fd
Merge pull request #8641 from tomlankhorst/use-lto
Detect availability of LTO, apply when available
2019-02-04 00:06:37 +01:00
Tom Lankhorst ce6e08c633
Introduce SET_CHECK_CXX_FLAGS 2019-02-03 23:32:51 +01:00
Tom Lankhorst 521948139c Chat toggle button (#8648)
* Add chat_available()

* Add appropriate strings

* Add new Chat icon

* Implement Chat button

* CS

* Fix chat icon

* Make chat icon a bit smaller and less bright

* Update chat icon

* Update changelog
2019-02-03 23:30:34 +01:00
Michał Janiszewski 604da7ce01
Merge pull request #8661 from tomlankhorst/refactor-random
Refactor random engine
2019-02-03 23:29:10 +01:00
Tom Lankhorst 045692993a
Make template params adhere to code style 2019-02-03 21:16:09 +01:00
Tom Lankhorst 422d5f2ef1
Replace '_N' by '_num' 2019-02-01 21:54:00 +01:00
Tom Lankhorst d660c9d45f
Merge branch 'refactor-random' of github.com:tomlankhorst/OpenRCT2 into refactor-random 2019-02-01 21:51:28 +01:00
Tom Lankhorst 1e65db371b
Use single underscore prefix for template parameters 2019-02-01 21:51:01 +01:00
Tom Lankhorst ec8caa5636
Drop <sstream> 2019-02-01 21:47:47 +01:00
Tom Lankhorst dfe7f0614c
Consistency 2019-02-01 21:00:19 +01:00
Tom Lankhorst 16691b22ba
Use state struct 2019-02-01 19:29:43 +01:00
Tom Lankhorst 2ea347f15f
MSVC SFINAE compatibility 2019-02-01 15:50:09 +01:00
Tom Lankhorst 1a81d60609
Expose gScenarioRand, add <algorithm> 2019-02-01 14:48:45 +01:00
Tom Lankhorst 6a42a95495
Refactor random engine
Introduce RotateEngine and Rct2Engine, FixedSeedSequence and Rct2Seed.
Adhere respectively to requirements `RandomNumberEngine` and `SeedSequence`.
Can be used with C++11 adaptors and distributions in <random>.
2019-02-01 14:32:04 +01:00
Michał Janiszewski 57897d4cb5 Attach screenshot to backtrace.io report 2019-01-31 23:36:41 +01:00
Michał Janiszewski 7655ba7746 Make screenshot return path to file 2019-01-31 23:36:41 +01:00
Matt 0237eaf498 Refactor number values to SPRITE_INDEX_NULL 2019-01-30 15:02:52 +01:00
Matt 7ad59bbb37 Refactor number values to RIDE_VALUE_UNDEFINED 2019-01-30 14:59:06 +01:00
ζeh Matt 6668a1fa86 Refactor remaining number values to RideStation::NO_TRAIN (#8655) 2019-01-30 13:49:46 +00:00
Matt 4026ead774 Fix #8653: crash when peeps attempt to enter a ride with no vehicles. 2019-01-30 13:16:45 +01:00
ζeh Matt 3aad9a4b2e Refactor footpath_update_path_wide_flags 2019-01-29 19:07:00 +01:00
Tom Lankhorst 3ab73018ec Quiet CMake find package 'benchmark' (#8628)
`benchmark` is an optional package. CMake can be quiet about not finding it.
2019-01-28 21:44:50 +01:00
Tom Lankhorst 0233795add Fix #8642: Likely mistake in entrance fee check 2019-01-28 11:15:49 +01:00
Tom Lankhorst 4c015edaf6 Templatise `rorN` and `rolN` with `N` in {8, 16, 32, 64} 2019-01-28 10:55:24 +01:00
Tom Lankhorst 06600440fe
Enable LTO/IPO on Clang and GCC 2019-01-27 12:58:19 +01:00
Michael Steenbeek 3d9702dfd4
Fix #8141: Attempting to build entrance/exit on station 2 does not work 2019-01-27 10:38:47 +01:00
Michael Steenbeek 3b176cd6eb
Fix #8585: Part of track missing on air powered vertical coaster (#8635) 2019-01-25 22:09:12 +01:00
Gymnasiast 66c571370e Fix #8572: Steel Twister track pieces ID 64 and 65 drawn incorrectly 2019-01-24 20:25:01 +01:00
Tom Lankhorst 01a52d236c Use vector<string> in InteractiveConsole
Issue #8597 shows Valgrind result indicating a memory leak in
InteractiveConsole. This is fixed in #8619 by ensuring that free() is
called appropriately.
This commit takes that a step further by removing all manual memory
management in favour of using vector<string>.

- argc is now gone in favour of argv.empty()/argv.size()
- argv_t is a vector of strings of utf8's
- console_command_func's signature is changed accordingly
2019-01-24 16:12:49 +01:00
Michael Steenbeek 247e89eb53
Revert duck fix 2019-01-24 10:40:04 +01:00