Commit Graph

1738 Commits

Author SHA1 Message Date
LRFLEW 11cdcea72b Fix RCTC g1.dat rendering issues 2017-09-30 19:18:31 -05:00
Olivier Wervers 1de4b2650b Fix #6229: Scenery costs nothing in track designs 2017-09-30 00:11:14 +02:00
Michael Steenbeek 0c4d184a9a Use constants for map elements and the scenery window 2017-09-29 20:25:17 +02:00
Olivier Wervers f2c9fc58d5 Implement #1329: Add remove-unused-objects command (#6324) 2017-09-29 16:32:30 +02:00
LRFLEW e177811115 Add RCTC g1.dat support 2017-09-29 10:44:23 +02:00
Michael Steenbeek eea40edf0a Use more constants 2017-09-29 10:06:05 +02:00
Michał Janiszewski 5ab9f938a7 Update files missed in the great extern "C" cleanup of 2017 2017-09-28 23:29:16 +02:00
Gymnasiast 6c9e73bff2 Allow loading objects from RCTC
These are technically same as those from RCT2, but with a .POB extension, rather than .DAT
2017-09-28 21:42:58 +02:00
Jeroen D Stout 71317c5f7a Adapt to coding convention 2017-09-28 17:37:48 +02:00
Jeroen D Stout 35b9038807 Refactor adjacency distance constant + loop fix 2017-09-28 17:37:48 +02:00
Jeroen D Stout 3b7ec7daa1 Alllow check_for_adjacent_station to check farther 2017-09-28 17:37:48 +02:00
Jeroen D Stout a6993bdb9f Introduce constant for max adjacency distance 2017-09-28 17:37:48 +02:00
Jeroen D Stout 202bea59c8 Increased network stream version 2017-09-28 17:37:48 +02:00
Jeroen D Stout b032aaacac Deal with map size / multiple stations 2017-09-28 17:37:48 +02:00
Jeroen D Stout 015d95749c Increase ride synchronisation range 2017-09-28 17:37:48 +02:00
Michael Steenbeek 950ab0062f Unify "separate ride" and "separate ride name" flags
They're always set together, and only setting one will probably cause undefined behaviour. Deprecate the "separate ride name" flag and instead check the "separate ride" flag in all places.
2017-09-28 17:37:07 +02:00
Michael Steenbeek 289e154fe4 Fix #6315: Not all researched items in S4 are available 2017-09-28 16:24:44 +02:00
ZehMatt 5187946bc9 Fix #6309: Lightfx being enabled with incompatible drawing engine. 2017-09-28 08:01:25 +02:00
TELK 40b026a4f1 Switch to utf8_remove_formatting() in Twitch integration to support non-latin characters 2017-09-26 15:54:24 +02:00
Martin Müller e38a77da2a Set gScenarioFileName when loading an RCT1 park
This fixes bugs when completing an RCT1 scenario, where the highscore
would be saved for the wrong park because gScenarioFileName hasn't been updated on load.
2017-09-26 15:53:06 +02:00
ZehMatt c238265834 Minor performance improvements 2017-09-26 15:52:04 +02:00
Marijn van der Werf 09517caa88 Fix #6300: Saving track triggers assertion 2017-09-25 22:14:50 +02:00
Marijn van der Werf 8a47308786 Check whether intent data is set before accessing 2017-09-24 22:41:49 +02:00
Marijn van der Werf efa87bf931 Try different opaque pointer 2017-09-24 22:41:49 +02:00
Marijn van der Werf 9d80f7efed Apply recommended fixes 2017-09-24 22:41:49 +02:00
Marijn van der Werf 7795ec35dd Add assertions to Intent 2017-09-24 22:41:49 +02:00
Marijn van der Werf 34ee3df318 Refactor intent 2017-09-24 22:41:49 +02:00
Marijn van der Werf 6df955dd27 Add missing window initializers 2017-09-24 22:41:49 +02:00
Marijn van der Werf 162eea0924 [fixup] Cast pointer 2017-09-24 22:41:49 +02:00
Marijn van der Werf 7ede9a3f58 Add extra casts 2017-09-24 22:41:49 +02:00
Marijn van der Werf b7164c5eac Rename intent extra keys 2017-09-24 22:41:49 +02:00
Marijn van der Werf 619733ba05 Move track design windows 2017-09-24 22:41:49 +02:00
Marijn van der Werf d18e59ff17 Move loadsave dialog 2017-09-24 22:41:49 +02:00
Marijn van der Werf 9b1b2b5c62 WIP window moving 2017-09-24 22:41:49 +02:00
Marijn van der Werf 59e1a8ac25 Trying to use intents 2017-09-24 22:41:49 +02:00
Marijn van der Werf 700a82e200 Make more data and functions static 2017-09-24 22:41:49 +02:00
Marijn van der Werf ac910a5979 Move Error, Campaign and Ride Demolition windows 2017-09-24 22:41:49 +02:00
Marijn van der Werf a49a777047 Move Banner, Player and Sign windows 2017-09-24 22:41:49 +02:00
Marijn van der Werf 8503b8e204 Move Finances and Park windows 2017-09-24 22:41:49 +02:00
Michał Janiszewski cbeeea2a49
Remove workaround for mingw
We have udapted MinGW-64 in use, so the workaround should not be needed
anymore
2017-09-22 23:26:02 +02:00
Michael Steenbeek 1fd1d8c26b Move editor to C++; add defines for object limits 2017-09-22 07:56:24 +02:00
Michael Steenbeek 5c2870c0e0 Name RCT2_LANGUAGE_ID_8 (Japanese) 2017-09-21 10:34:31 +02:00
Michael Steenbeek c8d6cf12e3 Add experimental Arabic language support 2017-09-21 09:24:06 +02:00
Michael Steenbeek fa5ec031f1 Clean up ride naming 2017-09-20 21:19:55 +02:00
Michał Janiszewski 00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Michael Steenbeek 6ab0f2f905 Name some rct_ride_entry_vehicle properties 2017-09-15 18:25:28 +02:00
Michael Steenbeek c4a89e4192 Merge pull request #6269 from Gymnasiast/small-cleanup
Slightly refactor loading of vehicle entries
2017-09-14 15:17:04 +02:00
Michael Steenbeek a4802983c2 Make var_02/_03 calculation methods private and static 2017-09-14 14:30:09 +02:00
Michael Steenbeek 4164d3aedd Clarify comment
[ci skip]
2017-09-14 14:12:13 +02:00
Michael Steenbeek 8954303d99 Add comment about special_frames
[ci skip]
2017-09-14 14:10:35 +02:00
Michael Steenbeek 9cba5436e5 Split off frame calculations; don't set var_02 and _03 2017-09-14 14:07:55 +02:00
Michael Steenbeek 98e15f1cd9 Rewrite confusing if statement 2017-09-14 13:48:14 +02:00
Michael Steenbeek 735b96ac18 Bump network version for the 'Enable all drawable elements' cheat 2017-09-13 22:51:01 +02:00
Michael Steenbeek d4cc97165c Clean up brake speed in ride construction window, fix #6271 2017-09-13 21:57:36 +02:00
Ted John 8677793624 Fix #6267: Ride count is 255 for clients that join a server
For S6 export and import, unused ride slots were not set to RIDE_TYPE_NULL.
2017-09-13 20:04:55 +01:00
Michael Steenbeek 597d40b25b Add cheat to show all drawable track elements 2017-09-13 19:38:30 +02:00
Michael Steenbeek 671a7bcbe1 Improve and extend constant usage 2017-09-13 18:13:38 +02:00
Michael Steenbeek 8c33240c38 Slightly refactor loading of vehicle entries 2017-09-13 10:45:28 +02:00
Marijn van der Werf dfbce1ad4c Fix Cmake compilation on macOS 10.12.6 2017-09-12 21:19:56 +02:00
Ted John 3a9cafd2f0 Remove gTrackColours macro (#6266) 2017-09-12 19:48:18 +01:00
Gymnasiast f174530ace Add comment to the Ride struct about Testpaint
[ci skip]
2017-09-12 14:03:46 +02:00
Gymnasiast 3a65ef79a7 Use field-wise assignments for rides in S6Exporter
Also fixes some limit constant usage
2017-09-12 14:00:56 +02:00
Gymnasiast 654ee4c95e Add missing pragma pack(pop) 2017-09-12 11:42:47 +02:00
Gymnasiast a28509e24c Split Ride and rct2_ride 2017-09-12 11:16:57 +02:00
Gymnasiast 179e4dd368 Do not disable ride modes in select-by-track-type mode
The idea of a ride group is to have the ride group determine stuff like this, not the vehicle itself
2017-09-12 10:40:19 +02:00
wolfreak99 e1f40352b6 Fix various currently loaded map marker issues
* create gCurrentLoadedPath for Load/Save dialog

* Clear gCurrentLoadedPath upon quitting game/loading titlescreen

* Mark loaded landscapes in load dialog
2017-09-12 08:09:54 +02:00
Gymnasiast 74961118bb Add drawing routines for inverted helices on the Lay-down RC, fixes #4991 2017-09-11 21:05:40 +02:00
Chris Guillott 5944d5be4d remove redundant line 2017-09-10 21:21:49 +02:00
Chris Guillott 5991c25919 trap getaddrinfo return codes 2017-09-10 21:21:49 +02:00
muemart e5bfd241ea Import staff patrol areas from RCT1 save files and fix #5445 2017-09-10 12:54:57 +02:00
Michał Janiszewski 45de7ebd22 Remove superfluous argument 2017-09-08 11:57:24 +02:00
Michał Janiszewski a8ba58ab9a Update wrong method name 2017-09-08 11:57:24 +02:00
Ted John 1eb3d07b3d Reduce static access and call from anonymous function 2017-09-08 11:57:24 +02:00
Michał Janiszewski 100a63a743 Pass context object as argument, don't use singleton 2017-09-08 11:57:24 +02:00
Michał Janiszewski 23ec1d29e7 Don't report elevated process on Emscripten 2017-09-08 11:57:24 +02:00
Michał Janiszewski 56ab344603 Add Emscripten platform and architecture defines 2017-09-08 11:57:24 +02:00
Michał Janiszewski 7a0a344014 Don't use unavailable fts.h for Emscripten 2017-09-08 11:57:24 +02:00
Michał Janiszewski 2577e92860 Adapt Context to Emscripten 2017-09-08 11:57:24 +02:00
Michał Janiszewski a13c30795d Add fcntl.h include to POSIX platform
Required for `open()`, etc.
2017-09-03 14:48:50 +02:00
Michał Janiszewski 5d3c58611a Report path of failed directory creation 2017-09-03 14:48:50 +02:00
Ted John 11d0639d5e Merge pull request #6244 from IntelOrca/paint/use-paint-session-tracks
Pass paint session to remaining functions
2017-09-03 10:19:18 +01:00
Duncan 04e217a04c Remove unused global palette pointer (#6247)
Moved one use of the palette pointer into a parameter
2017-09-03 10:16:51 +01:00
Ted John 43c6f7fda0 Pass paint session to ps functions 2017-09-03 02:27:07 +01:00
Ted John f6dbf560a2 Pass paint session to ps rotated helpers 2017-09-03 02:18:01 +01:00
Ted John 3880134b40 Change gTrackColours to use session 2017-09-03 02:01:29 +01:00
Ted John f2b8cf181e Pass paint session to remaining support functions 2017-09-03 01:56:56 +01:00
Ted John 1cc82d1cb5 Pass paint session to tunnel functions 2017-09-03 01:51:59 +01:00
Ted John 972a3bf111 Pass paint session to track_paint helpers 2017-09-03 01:42:08 +01:00
Ted John dce007feaa Pass paint session to support functions 2017-09-03 01:04:23 +01:00
Ted John 0f9784a423 Pass paint session to many specific track helpers 2017-09-03 00:34:33 +01:00
Ted John 90f4478f48 Pass paint session to all track functions 2017-09-03 00:19:17 +01:00
Ted John f81ee49015 Pass paint session to remaining non-track called functions 2017-09-02 23:41:02 +01:00
Ted John 2980be0667 Pass paint session to more ps functions 2017-09-02 23:22:19 +01:00
Ted John ae6c820662 Pass paint session to all vehicle paint functions 2017-09-02 23:13:10 +01:00
Ted John 6a9cd63874 Pass paint session to some vehicle paint functions 2017-09-02 23:05:58 +01:00
Ted John 3b9a86500a Pass paint session to sprite_paint_setup 2017-09-02 22:56:15 +01:00
Ted John a60a33e665 Pass paint session to track_paint 2017-09-02 22:47:07 +01:00
Ted John 6b3f3ddb70 Pass paint session to scenery_paint 2017-09-02 22:44:39 +01:00
Ted John 8456639b47 Pass paint session to entrance_paint 2017-09-02 22:43:45 +01:00
Ted John 1f6f83163a Pass paint session to fence_paint 2017-09-02 22:41:36 +01:00
Ted John 00cde34b39 Pass paint session to scenery_multiple_paint 2017-09-02 22:40:19 +01:00
Ted John 5c8700d054 Pass paint session to banner_paint 2017-09-02 22:38:26 +01:00
Ted John 4c78827c45 Pass paint session to path_paint 2017-09-02 22:31:39 +01:00
Ted John 47521335fa Pass paint session to surface_paint 2017-09-02 22:25:45 +01:00
Ted John f9414d1d82 Pass paint session to viewport functions 2017-09-02 22:15:09 +01:00
Ted John bf60fdcc7e Create alloc and free functions for paint_session 2017-09-02 20:56:52 +01:00
Ted John 46c2e52b5c Pass paint_session to more functions 2017-09-02 20:25:03 +01:00
Michał Janiszewski 450029a29e Export sprite BBox comparator to its own function 2017-09-02 21:14:48 +02:00
Michał Janiszewski 941607053a Expose paint_arrange_structs_helper for testing 2017-09-02 21:14:48 +02:00
Ted John b314cc4d74 Redirect gTrackColours to gPaintSession 2017-09-02 17:11:59 +01:00
Ted John a0f5f1243f Remove more map element paint globals 2017-09-02 17:11:59 +01:00
Ted John 6c1d1c43e5 Remove tunnel globals 2017-09-02 17:11:59 +01:00
Ted John eb7b1e7b7e Remove global, gPaintMapPosition 2017-09-02 17:11:59 +01:00
Ted John 5730a36555 Simplify gPaintMapPosition to rct_xy16 2017-09-02 17:11:59 +01:00
Ted John d794057f8c Remove gWoodenSupportsPrependTo global 2017-09-02 17:11:59 +01:00
Ted John 1d04f334e3 Change more paint globals to use gPaintSession 2017-09-02 17:11:58 +01:00
Ted John cb09357bba Create paint_session to replace paint globals 2017-09-02 17:11:58 +01:00
ζeh Matt 1f3ccae8b1 Refactor remaining image flag constants to defined G1_* flags. (#6217)
Refactor gUnk9DE568 and gUnk9DE56C to be type of rct_xy16 called gPaintSpritePosition
Rename unk_9ABDA4 to gCurrentColourPalette.
Rename gUnkEDF81C to gCurrentImageType.
Rename sub_679236_679662_679B0D_679FF1 to pixel_is_present.
Remove unused variables _unk9ABDAE, _unk9AC149, unk_9E3CE4, only ever assigned but never read.
Remove unreferenced variable unk_9E3CDC.
Clean up some parts in sub_679236_679662_679B0D_679FF1.
Remove function sub_68371D and references, it assigns variables that are never used.
Add assert determine if unused code.
2017-09-02 14:01:08 +01:00
Michael Steenbeek ddb557a0fe Fix TD4 vehicle colour import, move track_design to C++ 2017-09-01 13:38:21 +02:00
Ted John c40b73d5a4 Merge pull request #6235 from IntelOrca/feature/dirty-visuals
Add drawing debug option for showing visuals when and where blocks of the screen are painted.
This will currently only work in hardware display drawing engine.
2017-09-01 11:30:32 +01:00
Ted John 87c8204602 Merge pull request #6218 from IntelOrca/feature/cache-scenario-repo
Create index file for scenario repository and refactor object repository and track design repository to share the same code for creating index files.
2017-09-01 11:29:49 +01:00
Ted John 3f1991804a Add debug option to show dirty blocks 2017-08-31 22:36:15 +01:00
Michał Janiszewski 4708af474d Fix MinGW builds in release mode 2017-08-31 23:24:47 +02:00
Ted John c8169758d3 Re-implement scan-objects command line tool 2017-08-31 18:34:21 +01:00
Ted John 50735c0f68 Do not log 0 conflicts 2017-08-31 18:02:39 +01:00
Ted John 0df10cc41d Log exception messages 2017-08-31 18:02:39 +01:00
Ted John dcb78b18d9 Add HeaderSize to FileIndexHeader to increase rebuild chance when alignment changes 2017-08-31 18:02:39 +01:00
Gymnasiast dba7d6053e Clarify elevated permissions warning, insert line break in data files message, fixes #6215 2017-08-31 10:55:33 +02:00
Ted John f371d5c65f Remove unnecessary fields in ObjectRepository 2017-08-30 22:05:12 +01:00
Ted John f2cd0b2f3b Refactor ObjectRepository to use FileIndex 2017-08-30 21:58:43 +01:00
Ted John 8808444562 Refactor TrackDesignRepository to use FileIndex 2017-08-30 21:01:07 +01:00
Ted John 92b17b149c Remove old index code from ScenarioRepository 2017-08-30 19:35:43 +01:00
Ted John a118b09e79 Rebuild index if language has changed 2017-08-30 19:32:28 +01:00
Ted John ed8483f5c3 Time index building and handle bad files 2017-08-30 19:27:25 +01:00
Ted John ff6f257a87 Clean up mega park import 2017-08-30 19:11:39 +01:00
Ted John c5760a22bd Add more logging and comments 2017-08-30 18:57:11 +01:00
Ted John e417d2f8b0 Fix all errors 2017-08-30 18:40:42 +01:00
Ted John 4f3669f279 Start work on new FileIndex base class
[ci skip]
2017-08-29 19:18:13 +01:00
Ted John 2646ac3f56 Create index file for scenario repository
Speeds up load time for game and scenario select window.
2017-08-29 17:58:35 +01:00
Michał Janiszewski 2b64615c3a Don't access mainWindow in headless mode 2017-08-27 22:47:38 +02:00
wolfreak99 8e93c69e47 Implement console scrolling by pageup and pagedown 2017-08-26 18:19:03 +02:00
Michał Janiszewski 90ea8eee88 Include time.h for time_t 2017-08-24 17:10:08 +02:00
Michał Janiszewski 99d6bcf811 Only include fontconfig when TTF is enabled 2017-08-24 08:49:25 +02:00
Richard Jenkins 71e580a58f Refactor game load functions, resolves #6011 2017-08-23 08:04:36 +02:00
Michael Steenbeek 5089dbe0c9 Add comment about rand() range
[ci skip]
2017-08-22 13:42:19 +02:00
rwjuk c2b862ee51 Clean up and improve UI of track install window
Clean up and improve UI of track install window

Cleanup window def

Clean up and improve track install window

Name track_list.var_484

Format widget definitions

Use get_friendly_track_type_name()

Guard against NULL
2017-08-22 11:52:26 +02:00
rwjuk 5bda207c2c Fix #5417: Crooked House tracked rides do not dispatch vehicles 2017-08-22 11:52:01 +02:00
Tomas Dittmann 7d8695394c Add guards for nullptr and (-1) pointer accesses 2017-08-22 10:20:59 +02:00
Bernd Buschinski 0bb0c3b60f Initialize result pointer
This fixes a crash in case getaddrinfo returns an error.
2017-08-20 23:05:16 +02:00
Keatzee b89e01de8b Fix #5788: Empty scenario name becomes invisible list entry (#6197) 2017-08-19 07:49:35 +02:00