Commit Graph

3883 Commits

Author SHA1 Message Date
Michał Janiszewski eca13b99ed
Merge pull request #8367 from ZehMatt/paint-refactor2
Paint refactor
2018-12-05 23:46:21 +01:00
Michał Janiszewski cec86469f0
Improve imported object handling (#8372)
Reject and report invalid objects rather than triggering assert.
2018-12-05 23:12:22 +01:00
Matt 468d94a6ca Remove gCurrentViewportFlags 2018-12-05 23:09:17 +01:00
Matt adb4aa69a6 Rename UnkF1AD28 to LastRootPS 2018-12-05 23:08:43 +01:00
Matt aa8b8d8415 Remove unused member in paint_session. 2018-12-05 23:08:43 +01:00
Michał Janiszewski f5f3bfe087
Fix invalid scenery entry (#8328) 2018-12-05 23:01:13 +01:00
ζeh Matt 940fff4bbf Fix dereferencing nullptr when game objects are missing. (#8360) 2018-12-05 22:59:15 +01:00
Michał Janiszewski f488c4bf35
Forward-declare json_t and reduce Json.hpp inclusion (#8368) 2018-12-05 20:31:32 +01:00
ζeh Matt 2da01caa1e Fix #8338: GAs using player id instead of index to log money spent. (#8361) 2018-12-05 07:39:57 +01:00
Michał Janiszewski c845924956
Validate news item type on import (#8334)
News items use queue split into two logical partitions. When detected an
invalid news item type, simply drop remaining items to avoid having to
handle all the possible cases of where the invalid items falls.
Additionally, as normal use case wouldn't have triggered such an invalid
type, it must have come from some invalid file anyway, so assume it is
fine to drop other items.
2018-12-03 20:06:05 +01:00
ζeh Matt 61ef7b1c9e Fix #8345: crash with deleted surface when using "Own all land" cheat (#8347) 2018-12-03 19:43:36 +01:00
Michael Steenbeek 3c63402e1d
Fix number of free sprites on SV6 import 2018-12-01 17:34:02 +01:00
Matt 862ef3018c Use gCurrentRealTimeTicks whenever appropriate. 2018-12-01 17:00:11 +01:00
Matt 4bc69a0111 Introduce gCurrentRealTimeTicks and refactor some variable names. 2018-12-01 16:36:00 +01:00
ZehMatt 36f75f89a0 Add "simulate" command. 2018-11-30 20:11:10 +01:00
Michał Janiszewski 0a9527fd7d
Include config.ini in the dump (#8316) 2018-11-30 12:42:53 +01:00
Michał Janiszewski a78e812a64 Add `dereference` command to aid testing breakpad 2018-11-29 21:40:59 +01:00
Michał Janiszewski fe2ab7a653 Add compressed sv6 to backtrace.io uploads 2018-11-29 21:40:59 +01:00
Michael Steenbeek a9a583dcd1
Fix #8200: Incorrect behaviour when removing entrances/exits on the same tile 2018-11-27 22:59:31 +01:00
Hielke Morsink 354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
ζeh Matt 1abb31a159 Implement game action logging. (#8138) 2018-11-20 06:04:42 +01:00
Michał Janiszewski 0d2751a54e
Hide the network class declaration to Network.cpp (#8276)
The Network class is not used by anyone other than free functions in
Network.cpp, nor should it be used by anyone with the current design.

This change leaves only the publicly-exposed functions left in the
header, drastically reducing amount of required headers in network.h,
one of the heaviest headers we had so far.
2018-11-19 23:10:54 +01:00
TELK 4cc2057b94 Add 'say' command in console (#8259)
* Add 'say' command in console

* Unifying space just before }
2018-11-18 20:38:55 +01:00
Michael Steenbeek 9446422aca
Fix #8272: Do not attempt to add blank DAT names in S4Importer 2018-11-18 10:35:00 +01:00
Gymnasiast 618a650ac2 Fix RCT1 import of white and light brown fence 2018-11-17 18:18:00 +01:00
Gymnasiast ace42a98a5 Fix RCT1 import if research list is gone 2018-11-17 18:18:00 +01:00
Michał Janiszewski af91a0ef61
Add abort and terminate to console
Often when testing things out there's a need to have a way of inducing a
crash. Rather than trying to figure out what might be the bug that would
cause such conditions on given version, compiler and OS, provide a
simple way to call std::abort() and std::terminate() via the in-game
console.

Additionally, sort the commands.
2018-11-17 00:26:27 +01:00
Michael Steenbeek de12a8dda1
Import S4 elements property-by-property 2018-11-13 21:48:20 +01:00
ζeh Matt 06c5508bab Fix #8212: Crash when opening rides with changed mode and no tracks. (#8216) 2018-11-12 20:13:42 +01:00
Felix Pelletier 4c5fccc9b6 Fix #7689: Deleting 0-tile maze gives a MONEY32_UNDEFINED (negative) refund 2018-11-11 21:01:06 +01:00
Michał Janiszewski 7582afe0b4
Fix #8248: Invalid tile element in footpath_element_insert (#8249)
* Fix #8248: Invalid tile element in footpath_element_insert

* Update Footpath.cpp
2018-11-11 19:17:08 +01:00
Michael Steenbeek 82aba96728 Cheats: use 'weather' instead of 'climate' (#8246) 2018-11-10 14:30:41 +01:00
Gymnasiast a2033bc8ab Add non-breaking spaces 2018-11-09 23:41:18 +01:00
Gymnasiast 72d2ebd4d7 Add Russian rouble sign 2018-11-09 23:40:18 +01:00
Hielke Morsink 18f1fab2cc
Merge pull request #8235 from Broxzier/ui/climate
Move climate setting from objective to scenario settings window
2018-11-09 00:10:52 +01:00
Hielke Morsink fb5343114e format NetworkActions::Actions 2018-11-08 23:45:40 +01:00
Hielke Morsink b45fabdc7d Add new action to 'edit scenario options' permission 2018-11-08 23:44:51 +01:00
Hielke Morsink 107faaf821 Add and use game action for setting the climate
Also reordered the registered game actions the same as headers, so they are easier to find.
2018-11-08 22:39:13 +01:00
Michael Steenbeek 94ce57929a
Fix #8236: Paths of track designs are built incorrectly 2018-11-08 22:13:44 +01:00
ζeh Matt 223ae74c6b Refactor code to obtain resolutions. (#8215) 2018-11-06 07:20:57 +01:00
Michael Steenbeek df768a3fad
Fix #8201: Only quarter scenery objects in one corner can be painted 2018-11-05 20:12:22 +01:00
Michael Steenbeek b01ff01e82 Extend support for 8 cars corrupt elements 2018-11-05 12:13:26 +01:00
Michael Steenbeek 00ba0c1f51 Define RCT12TileElement fields as private 2018-11-05 12:13:26 +01:00
Michael Steenbeek d4801e139d Import tile elements from SV6 using new methods 2018-11-05 11:55:33 +01:00
Michael Steenbeek fbecfe5a88 Define tile elements in save as RCT12TileElement 2018-11-05 11:55:33 +01:00
Michał Janiszewski da965cb1ad
Fix #8224: invalid access in peep_find_ride_to_look_at (#8225)
* Fix #8224: invalid access in peep_find_ride_to_look_at

* Update Guest.cpp
2018-11-05 06:25:46 +01:00
ζeh Matt 7831208f42 Fix #8199: Crash using player id as index. (#8210) 2018-11-02 22:48:45 +01:00
ζeh Matt 103cd8310f Fix #8204: Crash when tile element has no surface elements. (#8209) 2018-11-02 22:35:45 +01:00
ζeh Matt e083116bc7 Fix #8207: ride_create_command ignoring game action result. (#8208) 2018-11-02 21:13:41 +01:00
Felix Pelletier 0cd7f1e07c Fix #8142: Reliability of unbreakable rides can go below 100% 2018-11-02 09:04:27 +01:00
Michael Steenbeek f8add7f62e
Rename rct_tile_element to TileElement 2018-11-01 13:53:50 +01:00
Michael Steenbeek f55f323723
Allow building footpaths on 'corner down' terrain 2018-11-01 11:04:32 +01:00
Michael Steenbeek a8f526ae48
Allow on-ride photos and water S-bends on the Water Coaster 2018-11-01 10:12:45 +01:00
Felix Pelletier 6ba052e618 Make some arguments to format_string(...) and friends const 2018-11-01 09:25:04 +01:00
Hielke Morsink 698426dad7 Increase network version to avoid conflicts (#8194)
#8053 bumped the network version to 3, which we already had before but was reverted.
2018-10-31 20:47:35 +01:00
Michael Steenbeek 5f4cca3c7e Remove rest of access to footpath edges 2018-10-31 15:08:06 +01:00
Michael Steenbeek d89c3d9e67 Replace calls to get path edges
This replaces most calls/direct access to the footpath edges (i.e. the orthogonal directions, not the corners). This includes places where the whole byte was retrieved, but only compared against orthogonal directions.
2018-10-31 15:08:06 +01:00
Michael Steenbeek 1d214c0e4e Replace type comparisons with GetType()
This function is a bit odd, as it implicitly also checked if the rotation was 0. I assume this is a bug and it was only intended to check for type.
2018-10-31 13:12:11 +01:00
Michael Steenbeek 1dce29b9a7 Replace two more usages of type 2018-10-31 13:10:41 +01:00
Michael Steenbeek db3c2fcc46 Use calls to set queue from track designs 2018-10-31 13:10:34 +01:00
Michael Steenbeek 687fbc2a0a Modify game_command_set_scenery_colour() to only take the scenery quadrant 2018-10-31 13:10:26 +01:00
Michael Steenbeek af2c1e69d1 Remove residual access to path addition_status field 2018-10-31 13:10:07 +01:00
Michael Steenbeek 853e4c4a6a Remove residual access to path ride_index field 2018-10-31 13:09:53 +01:00
Michael Steenbeek 785dc43f6b Remove residual access to additions field
It looks like neighbour_list_push() never actually reads the contents of the station index, it just compares it to other tiles. Therefore, this should work.
2018-10-31 13:09:42 +01:00
Michael Steenbeek 0f4560598e Replace residual access to path element entry index field 2018-10-31 13:09:29 +01:00
Michael Steenbeek 66cde65f87 Replace C style function for getting slope direction 2018-10-31 13:09:19 +01:00
Michał Janiszewski a0c9e1b6c7
Update format string for size_t MAX_BANNERS 2018-10-31 12:51:06 +01:00
Topodic bf80f738c1 Fix #8187: Cannot set land ownership over ride entrances/exits 2018-10-31 12:25:02 +01:00
Michał Janiszewski 4c62f89110
Remove empty branch in Peep.cpp 2018-10-30 06:48:32 +01:00
Michał Janiszewski 74ee2cf741
Fix types of windows scenery tab selections (#8179) 2018-10-29 14:52:07 -07:00
ζeh Matt 83c3f3a905 Fix #8121: Crash renaming park with server logging enabled. (#8177) 2018-10-28 09:36:18 -07:00
Michał Janiszewski e521ade293
Replace gmtime with safer gmtime_r (#8174) 2018-10-27 15:04:15 -07:00
ζeh Matt 3e457436b1 Refactor some painting code. (#8144) 2018-10-26 10:49:27 -07:00
Michał Janiszewski 180655dafa
Fix printf format specifiers (#8160) 2018-10-26 06:09:12 -07:00
Michał Janiszewski 11005c9f77
Enable gzip-compression of minidumps, update information (#8159)
Enable gzip, but only for local save, as GitHub will accept
gzip-compressed files even if they don't advertise it explicitly. Update
changelog and GitHub issue template to reflect that.
2018-10-26 04:39:25 -07:00
Michał Janiszewski 80b75759b3
Merge pull request #8073 from janisozaur/breakpad-upload
Auto-upload crashes to backtrace.io
2018-10-26 09:43:14 +02:00
Michał Janiszewski 76b6bd82a0 Fix messagebox buttons 2018-10-25 23:18:19 +02:00
Michał Janiszewski 7238ced946 Disable gzip compression of dumps until this gets enabled on backtrace 2018-10-25 22:25:37 +02:00
Ted John f224f7181d
Search for Discord release of RCT2 (#8149) 2018-10-25 10:57:19 +01:00
Michał Janiszewski 5780914a58 Provide error messages after the dump has finished uploading 2018-10-25 00:00:00 +02:00
Ted John 3a839043ea Use native path separators 2018-10-24 23:36:14 +02:00
Michał Janiszewski 2d95052477 Compress minidumps with gzip 2018-10-24 23:36:14 +02:00
Michał Janiszewski 98aded2bff Update minidump upload token 2018-10-24 23:36:14 +02:00
Michał Janiszewski 23f930043b Auto-upload crashes to backtrace.io 2018-10-24 23:36:14 +02:00
Ted John 83ce76fb3f Do not load images when running scan-objects
This prevents CI spitting out warnings where it is unable to load any of the DAT objects.
2018-10-23 22:07:06 +01:00
ζeh Matt e5eb61d38d Fix scrolling banners drawing invalid text 2018-10-23 19:44:14 +02:00
Michael Steenbeek 15490010e1 Revert "Fix #8064: Prohibited high construction error is sometimes shown as (undefined string)"
This reverts commit a8e46f5eec.
2018-10-23 14:52:51 +02:00
Michael Steenbeek ed7aed405b Revert "Fix #8064: Check clearance height before alignment on correct z. (#8135)"
This reverts commit 45381b0997.
2018-10-23 14:52:30 +02:00
ζeh Matt 45381b0997 Fix #8064: Check clearance height before alignment on correct z. (#8135) 2018-10-22 18:51:36 +02:00
ζeh Matt a8e46f5eec Fix #8064: Prohibited high construction error is sometimes shown as (undefined string) 2018-10-21 20:51:41 +02:00
J. Lord 2802b9a5d3 Implement #8099: Add Powered Launch mode to Inverted RC (for RCT1 parity) 2018-10-21 13:45:09 +02:00
Topodic a320cd0eb8 Fix #8083: The mini roller coaster has access to spiral lifts 2018-10-17 21:52:27 +02:00
Ted John 211bd84cc3
Merge pull request #7806 from Gymnasiast/feature/rtl-rendering
Fix RTL text rendering for Linux / macOS
2018-10-16 22:26:45 +01:00
tombomp 6992be87c3 Fix #8090: Bug with maze design saving
The exit wasn't being saved - ride_get_entrance_location was mistakenly called twice
2018-10-15 22:58:59 +02:00
Berbe 102a2ee234 Add player hash to server log message on join (#7946) 2018-10-15 21:40:22 +02:00
tombomp 18307e3841 Add a "current_rotation" variable to the console (#8080)
This is a value from 0-3 showing current rotation of main window, 3
being the default and lower going counter clockwise. Possible to set as
well.
2018-10-14 23:44:45 +02:00
Robert Lewicki 694608624d Add save_park command (#8078)
Added save_park command that enable to save current state of the game
using command line.
2018-10-14 22:36:41 +02:00
Michał Janiszewski d5be45e27a
Add missing argument to format (#8082) 2018-10-11 06:20:01 +02:00
Michał Janiszewski 63c6486a7f
Add missing header guards (#8081) 2018-10-10 23:27:25 +02:00
Michał Janiszewski 7660dc8042
Automatically detect fts.h presence when compiling (#8071)
This should support libc-s that don't ship with glibc-like fts.h, e.g.
musl
2018-10-10 00:06:50 +02:00
Gymnasiast 461342a915 Fix #8048: Crash when opening Six Flags Carolina 2018-10-09 22:20:18 +02:00
Gymnasiast 90f04cf478 Fix #8057: Game crashes when placing an entrance 2018-10-09 22:12:29 +02:00
Bart Ribbers 8e6eb08275 Fix compilation on musl (#8067) 2018-10-09 20:42:02 +02:00
Michał Janiszewski 1334b745dc
Refactor search for OpenRCT2 data on Linux (#8054)
It should now cover all use cases supported previously, with added
benefit of automatically checking and prioritising installed directories
(including DESTDIR=.) as well as path relative to $PWD.
2018-10-08 22:45:01 +02:00
Michael Steenbeek 7fd0571b9c
Merge pull request #8046 from Gymnasiast/tile-elementor-strikes-again
Port path elements to new structure, part 1
2018-10-05 12:19:48 +02:00
Gymnasiast 774d26306f Fix formatting 2018-10-04 14:54:13 +02:00
Gymnasiast b1f737d985 Remove remaining access to additions field 2018-10-04 14:54:12 +02:00
Gymnasiast a6885ea464 Replace C-style functions for getting direction 2018-10-04 14:54:12 +02:00
Berbe 30f6d2b31f Correct client IP address not being propagated/stored 2018-10-04 12:27:38 +01:00
Gymnasiast 015ece94c6 Replace C-style functions for getting path entries 2018-10-04 12:13:17 +02:00
Gymnasiast ecd6247462 Replace C-style functions for checking getting path additions 2018-10-04 12:13:17 +02:00
Gymnasiast ee05438953 Replace C-style functions for checking path addition ghost status 2018-10-04 12:13:17 +02:00
Gymnasiast e159ac65a6 Replace C-style functions for IsWide() and SetWide() 2018-10-04 12:13:17 +02:00
Gymnasiast f9f233dbb1 Replace C-style function for HasQueueBanner() 2018-10-04 12:13:17 +02:00
Gymnasiast 37f59e17dc Replace C-style isSloped() function 2018-10-04 12:13:17 +02:00
LRFLEW c41f862920 Fix some memory leaks 2018-10-04 09:42:22 +02:00
Ted John 82107e5666
Merge pull request #7957 from TheAssassin/appimage
Add build scripts to create an AppImage.
2018-10-04 07:50:06 +01:00
Gymnasiast 0231fd7ca6 Fix #8007: Track design preview window shows nothing 2018-10-03 22:27:20 +02:00
Michał Janiszewski b05e66e67d Fix invalid access to font descriptor 2018-10-03 21:20:04 +02:00
Gymnasiast 88f3e9be75 Fix crash 2018-10-03 19:38:18 +02:00
Michael Steenbeek d3da8634d8 Use ClearAs in two places 2018-10-03 14:11:30 +02:00
Michael Steenbeek 0af198aa45 Use constants for flags 2018-10-03 12:31:02 +02:00
Michael Steenbeek 28e8b4e12b Modify game_command_remove_scenery to take unshifted scenery quadrant 2018-10-03 12:31:02 +02:00
Michael Steenbeek 90d7e146f7 Clean up small scenery GC calls a bit 2018-10-03 12:31:02 +02:00
Michael Steenbeek 28d302d653 Remove more direct access to TileElement->type 2018-10-03 12:31:02 +02:00
Michael Steenbeek 02cfffcb1e Remove some direct usage of TileElement->type 2018-10-03 12:18:21 +02:00
Michael Steenbeek 882a65e4c0 Port queue functions 2018-10-03 12:18:21 +02:00
Michael Steenbeek deeb34f4aa Add fields to PathElement, port GetRCT1Path() 2018-10-03 10:38:46 +02:00
Hielke Morsink 6e62186d01 Fix #8034: screenshot command outputs broken sprites (#8041)
Check for no-graphics instead of headless when creating objects.
2018-10-02 20:09:08 +01:00
Michael Steenbeek ef6f09cf5b Fix formatting [ci skip] 2018-09-29 22:44:19 +02:00
Michael Steenbeek 3d74c51959 Add missing include 2018-09-29 22:44:19 +02:00
Michael Steenbeek 0ad2c74f0a Do RTL fixes when loading language pack into memory 2018-09-29 22:44:18 +02:00
Michael Steenbeek 11ed9418fc Use ICU namespace (fixes compilation on macOS) 2018-09-29 22:41:56 +02:00
Gymnasiast 87edac1e85 Fix word order in mixed strings 2018-09-29 22:41:56 +02:00
Gymnasiast b2550e9522 Fix RTL rendering (WIP) 2018-09-29 22:41:56 +02:00
Ted John 9da9a9968a Add /../share/openrct2 as possible install location
This allows AppImage to work correctly.
2018-09-29 13:58:38 +01:00
Gymnasiast 3738cdaf5e Make CIs happy 2018-09-29 10:51:27 +02:00
Gymnasiast fa67883caf Fix crash and address most line notes 2018-09-27 22:51:56 +02:00
Michael Steenbeek f8483b4726 Fix formatting 2018-09-27 22:15:04 +02:00
Michael Steenbeek 3b7fc4cf8c Port rest of banner functions 2018-09-27 22:15:04 +02:00
Michael Steenbeek d01b21a1ac Port banner index 2018-09-27 22:15:04 +02:00
Michael Steenbeek a8e087b560 Return actual entrance elements from map functions 2018-09-27 22:15:04 +02:00
Michael Steenbeek 995c6debf1 Port entrance path type lookup 2018-09-27 22:15:04 +02:00
Michael Steenbeek 3c93aca727 Port entrance station index and sequence lookup 2018-09-27 22:15:04 +02:00
Michael Steenbeek c7eaa1ba80 Port entrance ride index lookup 2018-09-27 22:15:04 +02:00
Michael Steenbeek cc7f8e612d Port entrance type lookup 2018-09-27 22:15:04 +02:00
Michael Steenbeek 757d705e13 Add private fields 2018-09-27 22:15:04 +02:00
Michael Steenbeek 9ff79e65aa
Implement #4418: Steep slopes for the Side-Friction RC 2018-09-27 08:55:29 +02:00
Gymnasiast 4a94f02910 Fix crash in vehicle_next_tower_element_is_top() 2018-09-26 21:30:22 +02:00
Gymnasiast 539d274297 Fix crash in ride_set_map_tooltip() 2018-09-26 21:11:24 +02:00
Michael Steenbeek 49506a57cf Fix error in RideDemolishAction.hpp 2018-09-26 11:29:38 +02:00
Gymnasiast ed616b0fb5 Add assert; fix crash 2018-09-25 21:57:21 +02:00
Gymnasiast 07c4593d46 Create ClearAs function 2018-09-25 21:57:21 +02:00
Gymnasiast 253c5a8171 Fix two crashes 2018-09-25 21:57:21 +02:00
Gymnasiast eecf465e3b Fix formatting 2018-09-25 21:57:21 +02:00
Gymnasiast fc136230d8 Fix crash 2018-09-25 21:57:21 +02:00
Michael Steenbeek 3eaea47689 Remove rct_tile_element_track_properties 2018-09-25 21:57:21 +02:00
Michael Steenbeek 3f17782692 Move direct access to maze entry to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek 75b5c45a97 Remove residual direct access to most track fields 2018-09-25 21:57:21 +02:00
Michael Steenbeek 104d4f2f58 Move photo functions to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek b965377080 Move green light functions to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek 897a2982a0 Move brake/booster speed functions to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek d7f226592c Remove direct access of track sequence 2018-09-25 21:57:21 +02:00
Michael Steenbeek e6d5638815 Move inverted() functions to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek 0cea008c18 Move cable lift functions to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek 69f02400f9 Move GetColourScheme to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek a3e9c63fc3 Move GetRideIndex to struct methods 2018-09-25 21:57:21 +02:00
Michael Steenbeek 650971bc68 Move HasChain to struct methods 2018-09-25 21:57:21 +02:00
Gymnasiast 5d260ea85b Properly set new tile elements to 0 2018-09-25 21:57:21 +02:00
Gymnasiast 67d7d5c022 Move getting station index to struct methods 2018-09-25 21:57:21 +02:00
Gymnasiast 6bd732ce5a Move getting seat rotation to struct methods 2018-09-25 21:57:21 +02:00
Gymnasiast ae4c464ce7 Move getting track sequence to struct methods 2018-09-25 21:57:21 +02:00
Gymnasiast 3b80d049ef Move door state functions to struct methods 2018-09-25 21:57:21 +02:00
Gymnasiast 8908f3f47e Move getting track type to struct methods 2018-09-25 21:57:21 +02:00
jensj12 eac9b720ee Add #7726: Shortcut to advance one tick (#7851) 2018-09-23 23:40:47 +02:00
Michael Steenbeek fd12aff8f7
Add D and E with caron
This also adds the Unicode codepoints for the remaining Czech letters.
2018-09-23 22:23:37 +02:00
Christian Schubert 16936d4ea1 Fix #7828: Copied entrances and exits stay when demolishing ride (#7932) 2018-09-23 17:38:59 +02:00
Gymnasiast f07e677af1 Replace switch towers with std::map 2018-09-23 11:31:04 +02:00
Gymnasiast 7d7d0aeab5 Adopt OpenLoco's UTF-8 handling 2018-09-23 11:31:04 +02:00
Lars Toenning d0e318a2a2 Removed unnecessary null-pointer-check (#8013) 2018-09-22 16:52:29 +02:00
Michael Steenbeek 231e46fb2b
en-GB: Replace character codes with actual Unicode characters 2018-09-21 21:37:30 +02:00
Ted John 900465a392 Don't attempt to load server list if file doesn't exist 2018-09-18 12:50:34 +01:00
Ted John 2da2aa5622 Fix platform_get_username for unicode on Windows 2018-09-18 12:37:42 +01:00
Ted John 8ce6cde2b7 Fix building sprite file for unicode paths on Windows 2018-09-18 12:37:42 +01:00
Michael Steenbeek c83c30dafb Fix #8003: Crash when placing small scenery (#8004) 2018-09-18 10:05:29 +02:00
Michael Steenbeek a6a5e3e315
Merge pull request #8001 from Gymnasiast/elementary-my-dear-watson
Port Wall elements to new tile element structure; remove some access to ->type
2018-09-17 21:03:36 +02:00
Aaron van Geffen 4db936d3e1
Fix loading of 4-byte UTF-8 codepoints. (#8002) 2018-09-17 20:16:07 +02:00
Gymnasiast c8063a3c38 Fix scenery doors closing the wrong 2018-09-17 20:03:56 +02:00
Michael Steenbeek f1c98a4475 Make fields private 2018-09-17 16:12:11 +02:00
Michael Steenbeek 6062960390 Port remaining wall stuff to struct methods 2018-09-17 15:42:34 +02:00
Michael Steenbeek 508276b081 Remove lots of direct access to ->type fields 2018-09-17 15:18:07 +02:00
Michael Steenbeek 345e03d41b Move animation frame and rct1 wall functions to methods 2018-09-17 14:48:27 +02:00
Michael Steenbeek dcabdeb805 Move wall colour functions over to the struct methods 2018-09-17 14:22:17 +02:00
Michael Steenbeek 533e937926 Create slope and colour functions for WallElement 2018-09-17 14:10:05 +02:00
Michael Steenbeek 66f9e9d646 Properly reset surface objects 2018-09-17 13:17:47 +02:00
Gymnasiast a7eb005501 Fix bug in map_init() 2018-09-16 22:02:03 +02:00
Gymnasiast d1b576b4a5 Fix bugs in park fences 2018-09-16 21:53:12 +02:00
Gymnasiast 0235137010 Fix typo in SetSlope() 2018-09-16 21:34:51 +02:00
Gymnasiast f7a03895f6 Put some stuff into temporary variables 2018-09-16 21:34:51 +02:00
Gymnasiast 74578fcc08 Use constants for map_height_from_slope() 2018-09-16 21:34:51 +02:00
Gymnasiast 737b73d30c Fix refactor bug in set_water_height() 2018-09-16 21:34:51 +02:00
Gymnasiast 75877e82f8 Fix access to path element 2018-09-16 21:34:51 +02:00
Gymnasiast 9fb58a3453 Fix constants in map_height_from_slope() 2018-09-16 21:34:51 +02:00
Gymnasiast 0f08128657 Fix formatting 2018-09-16 21:34:51 +02:00
Gymnasiast 09ea209c48 Fix sign mismatch 2018-09-16 21:34:51 +02:00
Michael Steenbeek 74ccf010e6 Port surface elements to new structure 2018-09-16 21:34:51 +02:00
Michael Steenbeek 35b4724626 Port large scenery to new structure 2018-09-16 21:34:50 +02:00
Michael Steenbeek 1d3baef9b7 Remove some C-style tile element functions 2018-09-16 21:34:04 +02:00
Gymnasiast 2d8b93e514 Fix #7995: Crash when interacting with large scenery 2018-09-16 20:21:54 +02:00
Gymnasiast c46155bbda Use constant instead of raw number 2018-09-16 15:07:32 +02:00
Aaron van Geffen 47eea292b5 Allow assigning a keyboard shortcut for opening the tile inspector (#7994)
* Allow assigning a keyboard shortcut for opening the tile inspector.

* Only open when debug tools are enabled.

* Add changelog entry
2018-09-15 08:57:50 +02:00
Michael Steenbeek 0e998c2d78
Merge pull request #7988 from Gymnasiast/tile-element-makeover
Change tile elements to use the OpenLoco structure
2018-09-14 10:56:19 +02:00
Michael Steenbeek 1a825a4045 Small fixes 2018-09-14 10:18:46 +02:00
Aaron van Geffen a5ad9a3729
Merge pull request #7971 from Osmodium/7930-part2-Add-open-folder-button
#7930 part2 add open folder button
2018-09-14 00:03:58 +02:00
Aaron van Geffen d6769fafe2 Move title menu buttons up to compensate for new item. 2018-09-13 23:20:17 +02:00
Aaron van Geffen cf6f8a356f
Merge pull request #7920 from ZehMatt/sprite-structs
Simplify sprite structs
2018-09-13 23:04:02 +02:00
Gymnasiast dfdb3b4681 Rename STR_OPEN_CUSTOM_USER_FOLDER 2018-09-13 22:20:45 +02:00
Christian Schubert b1ac76910e Removed methods from Context, added headers and functionality only in TitleMenu.cpp 2018-09-13 22:20:45 +02:00
Christian Schubert 97ebf50035 Removed c styled method. 2018-09-13 22:19:51 +02:00
Christian Schubert 48d6e2f58f Added 'open custom content folder' button to toolbar menu. 2018-09-13 22:18:09 +02:00
Gymnasiast 865a497115 Fix formatting 2018-09-13 20:14:44 +02:00
Gymnasiast d0f4b45bd2 Fix Testpaint 2018-09-13 20:14:44 +02:00
Michael Steenbeek a31176b7e7 Remove remnants of old small scenery code 2018-09-13 18:12:20 +02:00
Michael Steenbeek b5bb4c7fb9 Do not access old small scenery age field 2018-09-13 17:26:36 +02:00
Michael Steenbeek 00429e6836 Replace rest of calls to Small Scenery entry index 2018-09-13 17:10:45 +02:00
Michael Steenbeek e9993f78de Replace read access of small scenery entry index 2018-09-13 17:02:38 +02:00
Michael Steenbeek a02d360df6 Change TileElement to use OpenLoco's structure 2018-09-13 15:36:32 +02:00
Ted John c07a57eb73
Merge pull request #7980 from IntelOrca/improve-portable-builds
Improve portable builds
2018-09-13 08:22:41 +01:00
wolfreak99 28bfab0c9b Draw dangerous G forces on graph in red 2018-09-09 00:03:35 +02:00
Ted John b9c2fdedd1 Resolve absolute path when indexing files
This ensures scenarios are displayed with their full path in the scenario select window rather than as specified in config or command line.
2018-09-08 22:17:21 +01:00
Ted John 94592f50e6 Allow RCT1 path to be specified as cmdline argument 2018-09-08 22:07:44 +01:00
deurklink a5cbcb448c Fix #7975: Clear inspection due flag when interval set to Never 2018-09-07 13:08:26 +02:00
Michał Janiszewski a1fd033822
Add RISC-V architecture information (#7966) 2018-09-03 10:22:36 +02:00
Gymnasiast 3b5a766f34 Add glyphs for Ő, ő, Ű and ű 2018-09-01 21:03:56 +02:00
Gymnasiast 3b97f6d9f6 Add y with acute 2018-09-01 20:42:24 +02:00
Gymnasiast ab1044d2de Add C with caron 2018-09-01 20:42:24 +02:00
Christian Schubert f1d5989bc3 Implement #7930: automatically create custom user content folders 2018-09-01 20:36:18 +02:00
Matt 1ca41da2aa Unload objects from context destructor. 2018-08-31 07:18:51 +02:00
Matt ccf12befd5 Formating. 2018-08-31 07:18:51 +02:00
Matt 8c6f6a18ab Remove unused passing of object manager. 2018-08-31 07:18:50 +02:00
Matt 71e1b1c21a Remove unnecessary call that can cause null dereference. 2018-08-31 07:18:50 +02:00
Matt 2ac6262293 Use std::unique_ptr for LocalisationService 2018-08-31 07:18:50 +02:00
Matt 837c0a9e7f Use std::unique_ptr for ObjectManager and ObjectRepository 2018-08-31 07:18:49 +02:00
Matt 04928d4b84 Refactor reference over std::shared_ptr. 2018-08-31 07:18:48 +02:00
Michał Janiszewski f9600ccfd9 Only provide strcasestr for WIN32 toolchains
All the other toolchains appear to be providing this function and only
MSVC+mingw are missing out.

cf. https://github.com/OpenRCT2/OpenRCT2/pull/7942
2018-08-30 22:56:14 +02:00
pkubaj 03cd16220e Change ordering of includes (#7941)
It fixes build with LLVM 6.0.1 and GCC 7.3.0 on FreeBSD 11.2-RELEASE
2018-08-30 21:19:46 +02:00
Michael Steenbeek 5cd4057c76
Remove remnants of STEX support 2018-08-29 23:29:45 +02:00
Michał Janiszewski 8ac731e212 Release 0.2.1
- Feature: [#5993] Ride window prices can now be set via text input.
- Feature: [#6998] Guests now wait for passing vehicles before crossing railway tracks.
- Feature: [#7658] Add option to always use system file browsing window.
- Feature: [#7694] Debug option to visualize paths that the game detects as wide.
- Feature: [#7713] The virtual floor now takes land ownership rights into account.
- Feature: [#7771] Danish translation.
- Feature: [#7797, #7802, #7821, #7830] Add sprite font glyphs for Danish, Norwegian, Russian, Turkish, Catalan and Romanian.
- Feature: [#7848] Add a master volume slider to audio options screen.
- Feature: [#7868] Placing scenery while holding shift now scales appropriately with zoom levels.
- Feature: [#7882] Auto-detect Steam and GOG installations of RCT1.
- Feature: [#7885] Turkish translation.
- Fix: [#3177] Wrong keys displayed in shortcut menu.
- Fix: [#4039] No sprite font glyph for German opening quotation mark.
- Fix: [#5548] platform_get_locale_date_format is not implemented for Linux.
- Fix: [#7204] Object source filters do not work for RCT1, AA and LL.
- Fix: [#7440] Memory leak. All system memory used.
- Fix: [#7462] Guest window goes beyond the map edge on a spiral slide.
- Fix: [#7533] Screenshot is incorrectly named/file is not generated in CJK language.
- Fix: [#7628] Always-researched items can be modified in the inventory list.
- Fix: [#7643] No Money scenarios with funding set to zero.
- Fix: [#7653] Finances money spinner is too narrow for big loans.
- Fix: [#7673] Vehicle names are cut off in invention list.
- Fix: [#7674] Rides show up as random numbers in guest's ride list.
- Fix: [#7678] Crash when loading or starting a new game while having object selection window open.
- Fix: [#7683] 'Arbitrary ride type' dropdown state is shared between windows.
- Fix: [#7697] Some scenery groups in RCT1 saves are never invented.
- Fix: [#7711] Inverted Hairpin Coaster allows building invisible banked pieces.
- Fix: [#7734] Title sequence not included in macOS builds as of 0.2.0 release.
- Fix: [#7756] Steam RCT2 path not correctly checked on macOS and Linux.
- Fix: [#7765] Crash when opening ride list window on Windows Vista.
- Fix: [#7773] Once research has been completed, player is still charged for research.
- Fix: [#7786] Crash when importing a track design.
- Fix: [#7793] Duplicate private keys generated.
- Fix: [#7817] No sprite font glyph for interpunct.
- Fix: [#7823] You can build mazes in pause mode.
- Fix: [#7804] Russian ride descriptions are cut off.
- Fix: [#7872] CJK tooltips are often cut off.
- Fix: [#7895] Import of Mega Park and the RCT1 title music do not work on some RCT1 sources.
- Improved: [#7899] Timestamps in the load/save screen are now displayed using local timezone instead of GMT.
- Improved: [#7918] Better RCT2 detection if both disc and GOG/Steam versions are installed.
2018-08-26 22:20:13 +02:00
Michał Janiszewski 72a9729928 Add missing separator to dump file path 2018-08-25 23:13:36 +02:00
Michał Janiszewski 75a3e638ea Update MSVC libraries to v18 to re-enable breakpad 2018-08-25 22:00:21 +02:00
Aaron van Geffen e553cc3962
Merge pull request #7919 from ZehMatt/gameaction-paused
Fix #7910: Allow game actions while paused if requested from callee.
2018-08-25 17:19:17 +02:00
Matt 673d9861ee Bump up network version. 2018-08-23 13:29:04 +02:00
Aaron van Geffen a22ff5f8ea Apply clang-format. 2018-08-22 12:18:27 +02:00
Hielke Morsink e7af3290c0 Fix system file browser not populating properly (#7916) 2018-08-21 23:19:32 +02:00
Michael Steenbeek 28c5221f6d
Fix missing comma 2018-08-21 21:51:50 +02:00
Matt e5dd0be813 Remove unnecessary GetActionFlags overrides. 2018-08-20 21:14:32 +02:00
Matt dcc4827833 Use reference instead of copy. 2018-08-20 21:12:06 +02:00
Matt a89b352fb2 Rename rct_sprite::unknown to rct_sprite::generic 2018-08-20 18:27:40 +02:00
Matt 57fe4b6756 Simplify sprite structures. 2018-08-20 18:16:57 +02:00
Michael Steenbeek 7743d0e8e7
Prefer Steam and GOG installs to disc during autodetection
Some people apparently have both a disc version and a Steam version of RCT2 installed. The problem is that the former does not always include the expansions, while the latter does. The same applies to RCT1.

By checking for Steam/GOG versions first, these problems can be avoided.
2018-08-20 17:48:52 +02:00
Matt ec5ab09943 Fix #7910: Allow game actions while paused if requested from callee. 2018-08-20 17:41:48 +02:00
Aaron van Geffen c4f93e24b5 Rename heightmap load/save type; add heightmap dir. 2018-08-18 13:28:27 +02:00
Aaron van Geffen 25170fda45 Implement #7658: Add option to always use system file browsing window. 2018-08-18 13:28:27 +02:00
Hielke Morsink c99d28116f Fix muting game sounds instead of master sound
Clicking mute from the top toolbar or from with the hotkey will toggle the master volume instead of the game volume now, and invalidates the options window to immediately make the checkbox visible.
2018-08-17 22:14:11 +02:00
Sijmen Schoon 0cdd7c8cc8 Add master sound checkbox and master volume slider
Also includes some rewriting of rct_scroll code that I did while
debugging the issue with more than two rct_scrolls in one window. I
decided to leave it in.
2018-08-17 22:14:11 +02:00
Michael Steenbeek 9f891bfdcc
Allow opening SV7 files 2018-08-16 16:16:56 +02:00
Aaron van Geffen 7cc5bc87e9 Check result of FileTimeToLocalFileTime; add to changelog. 2018-08-15 00:15:06 +02:00
Hielke Morsink 4a442d0d6d Convert filetime to local time on Windows 2018-08-15 00:14:47 +02:00
Aaron van Geffen 786806e116 Use localtime instead of gmtime in file browser. 2018-08-15 00:14:47 +02:00
Hielke Morsink c0becabcb8
Fix converting of megapark file when path fails to resolve (#7904)
This fixes a small regression from #7895.
2018-08-14 21:45:53 +02:00
Michael Steenbeek f9d60ea106
Allow loading CSS17.DAT and MP.DAT on all three RCT1 sources
This should equalise the three in terms of supported features.
2018-08-14 15:41:51 +02:00
Gymnasiast 6fc86d5766 Fix #7872: CJK tooltips are often cut off 2018-08-13 21:41:10 +02:00
Gymnasiast 3a8bf352ac Fix #7804: Russian ride descriptions cut off 2018-08-13 20:35:46 +02:00
Michael Steenbeek 6d530002bc
Add ellipsis character 2018-08-13 19:57:43 +02:00
Michael Steenbeek 13c326eb50
Fix part of #7415: Korean scenario descriptions are mangled
OpenRCT2 used to incorrectly write UTF-8 to SV6 names and descriptions. This fixes reading such scenarios. It should also fix the game crashing when attempting to load such a scenario.

What this doesn't do is add support for the encoding that vanilla used for CJK, or add support for creating scenarios with Korean descriptions. That will only be feasible when switching to our own format.
2018-08-13 15:53:44 +02:00
Michael Steenbeek 0a1b53e1c2
Auto-detect RCT1 files location (#7882) 2018-08-13 15:50:45 +02:00
Michael Steenbeek 9e517a52ff
Add Turkish translation 2018-08-13 00:16:11 +02:00
Sijmen Schoon 56b174432d Implement platform_get_locale_date_format for Linux
Note that this currently, this isn't implemented in the C++ standard
library. This means that date_order() will always return no_order,
causing this function to always return the default
DATE_FORMAT_DAY_MONTH_YEAR, as is the case before this commit too.

Once date_order() will be properly implemented in the standard library
someday, it will however start returning the right order for the current
locale, causing this function to start working as intended.
2018-08-12 23:03:32 +02:00
Linus Unnebäck 2b3370228b
Remove the last usage of Math.hpp 2018-08-12 16:47:12 +01:00
Linus Unnebäck fd07be587a
Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
Gymnasiast 7af0609de0 Remove some more strings 2018-08-12 15:58:52 +02:00
Gymnasiast 45b8ca9421 Remove more strings, fix error 2018-08-12 15:56:47 +02:00
Gymnasiast c615d08d78 Remove many unused strings 2018-08-12 15:56:47 +02:00
Michael Steenbeek 49c30600b7
Merge pull request #7755 from Gymnasiast/fix/7204
Fix #7204: add a dedicated source parameter to JSON objects
2018-08-12 15:47:39 +02:00
ζeh Matt 228861c95f Release memory from json_dumps and decrement references (#7836) 2018-08-12 11:46:30 +02:00
TELK 688741428c Fix #7870: Tiny typo in console message (#7879) [ci skip] 2018-08-12 10:32:30 +02:00
ζeh Matt b2005c3b9f Implement FootpathRemoveAction as a GameAction (#7867) 2018-08-12 10:31:00 +02:00
ζeh Matt e87e9f1b2e Update virtual floor to better indicate blocked areas (#7837) 2018-08-07 15:39:52 +02:00
Sijmen Schoon f3f4776afd Properly fix maze building when paused (#7852)
Also fixes two relevant bugs:
- The error message having no title
- Fixes the controls in the construction window activating when the initial placement fails because of e.g. the game being paused.
2018-08-04 14:30:13 +02:00
Sijmen Schoon faa5cc2472 Fix #7823: You can build mazes while paused 2018-08-03 21:58:49 +02:00
Gymnasiast 7f4bb206af Correct identification of 'Utopia Park'
Utopia Park is the only scenario in RCT1 that uses different names in the scenario list and for the park. Since we use the former to identify scenarios, correct it.
Also add an alias to keep the very popular pack by Crappage working.
2018-08-03 18:41:33 +02:00
Gymnasiast 0ba233efa4 Fix formatting 2018-07-31 22:27:00 +02:00
Gymnasiast edaebd5163 Protect against Sources being null 2018-07-30 22:01:04 +02:00
Gymnasiast 8ff6831c57 Fix rebase errors 2018-07-30 21:52:45 +02:00
Gymnasiast c879bb5708 Modify SetSourceGames signature 2018-07-30 21:41:45 +02:00
Gymnasiast b257619418 Use vector for source games 2018-07-30 21:41:12 +02:00
Michael Steenbeek 2a64ec7aff Use sourceGame parameter in JSON files instead of originalId 2018-07-30 21:39:27 +02:00
Ted John ec0d35bac7 Add new source field to ORI struct 2018-07-30 21:32:07 +02:00
Michael Steenbeek 5ce76e1603 Attempt at showing secondary source game 2018-07-30 21:28:55 +02:00
Michael Steenbeek 7f1960d375 Remove old source game tables 2018-07-30 21:22:32 +02:00