ZehMatt
b9e0eede44
Code cleanup
2018-04-26 21:26:30 +02:00
ZehMatt
64d9109226
Add progress report back.
2018-04-26 21:26:30 +02:00
ZehMatt
bee0fc25b1
Move all code into JobPool.hpp
2018-04-26 21:26:30 +02:00
ZehMatt
ac6b3fb225
Change order of members.
2018-04-26 21:26:30 +02:00
ZehMatt
8c2ac904b4
Add missing vector include.
2018-04-26 21:26:30 +02:00
ZehMatt
6b649e6b29
Remove unused includes.
2018-04-26 21:26:30 +02:00
ZehMatt
dfcec4d9da
Refactor file indexing to use the job pool instead of threads.
2018-04-26 21:26:30 +02:00
ZehMatt
254aedefd4
Add generic job pool implementation.
2018-04-26 21:26:30 +02:00
ZehMatt
e841c5b20b
Use multiple threads to generate object index cache.
2018-04-26 21:26:30 +02:00
Michael Steenbeek
2d92ecf10b
Fix #7436 : Only the first 32 vehicles of a train can be painted
2018-04-26 10:33:54 +02:00
Hielke Morsink
49cf840f28
Fix memset byte value too big ( #7447 )
...
`memset` takes an integer as argument which gets converted to an unsigned byte. `SPRITE_INDEX_NULL` has a value of 0xFFFF, essentially cutting it to 0xFF. Calling `std::fill_n` instead of `memcpy` assigns the given value to each element in its range rather than setting the bytes. In this case, the result is the same.
None of the other calls to `memset` in the project use values bigger than 0xFF.
2018-04-25 14:47:03 +02:00
Michael Steenbeek
3aac52cf44
Fix rendering of inverted exclamation mark
2018-04-25 13:47:07 +02:00
Ted John
42f46d15e3
Merge pull request #7414 from OpenRCT2/refactor/string-conversions
...
Refactor string conversion between RCT2 and UTF8
2018-04-25 10:14:39 +01:00
Hielke Morsink
bf4f68fe33
Use enum type that guarantee to support its values
...
By default enumerators use type `int` which can store values up to `1 << 31 - 1`. The clang compiler generates this error for enums values that use the sign bit: `enumerator value is not representable in the underlying type 'int'.`
To get rid of those warnings (and technically improve the code) the erroneous enums are now of type of `uint32`.
Note: I've skipped peep.h to prevent conflicts with the peep refactor branch.
2018-04-24 16:51:42 +02:00
Hielke Morsink
5327c9feb4
Remove unused windows_get_registry_install_info ( #7442 )
2018-04-23 20:20:03 +02:00
Ted John
41b3a33af4
Merge pull request #7430 from IntelOrca/fix/scan-objects
...
Fix scan objects and run before tests
2018-04-22 22:11:03 +01:00
Hielke Morsink
30063984e6
Delete unused function arguments or mark them so ( #7426 )
...
This aims to make future refactoring easier. The arguments are removed where possible, but kept and marked with C++17's [[maybe_unused]] where they could not be removed (e.g. when they are used as a callback, rather than called directly).
I've skipped the rides/<category>/* and peep/* source files, because the rides source files are mostly generated and have a ton of unused variables, and the peep source files are being refactored.
I've also skipped most of window/* source files, because most of the functions are used as callbacks and will be bulk-renamed at some point.
2018-04-20 13:56:37 +02:00
Manuel Vögele
588e6f32c4
Rename vehicle_is_boat_on_water to better reflect the actual functionality ( #7421 )
...
* Rename and refactor `vehicle_is_boat_on_water` to better reflect the actual functionality
New name is `vehicle_boat_is_location_accessible`
* Refactor `vehicle_boat_is_location_accessible` take `TileCoordsXYZ` as parameter
2018-04-20 12:50:11 +01:00
Ted John
4ce4101ac5
Ensure correct language is used for scan-objects
2018-04-20 00:12:40 +01:00
Ted John
edb9dc39ab
Pass object repository as a dependency when loading objects
2018-04-19 23:51:05 +01:00
Ted John
6d76d76f98
Protect against bad RCT2 strings
2018-04-19 22:36:14 +01:00
Ted John
6526f9f6cb
Fix scan-objects CLI action
...
Ensure a context is available when objects are loaded.
2018-04-19 13:26:19 +01:00
Ted John
947a0625c8
Fix mingw builds
2018-04-18 13:16:20 +02:00
Ted John
deaa60f8f1
Refactor string conversion between RCT2 and UTF8
...
Use Win32 API for conversion on Windows for non-1252 code pages instead of built-in tables.
2018-04-18 13:16:20 +02:00
Hielke Morsink
f661d48d90
Add tests for tile_element_wants_path_connection_towards
2018-04-17 20:43:49 +02:00
Hielke Morsink
99d8c83807
Fix #7402 Properly check for entrance location before disconnecting paths
2018-04-17 20:43:49 +02:00
Albert Morgese
a3b04a67b2
Implement #1675 : Auto-rotate shops to face footpaths
2018-04-16 20:02:46 +02:00
Ted John
d0ad94bb5e
Merge pull request #7412 from IntelOrca/cmake/msvc
...
Add basic support for MSVC to cmake scripts
2018-04-14 22:30:57 +01:00
Manuel Vögele
e4b42f58a5
Fix the order predicate for GameCommands
...
This commit bumps the network stream version
2018-04-14 22:47:41 +02:00
Ted John
f24b1bdfa6
Enable curl, openssl and freetype libraries for msvc
2018-04-13 19:21:03 +01:00
woj1993
4b372120f1
Fix #6141 : CSS50.dat is never loaded ( #7357 )
2018-04-13 11:29:31 +01:00
Gymnasiast
4c676e6000
Fix #6134 : Scenarios incorrectly categorised when using Polish version of RCT2
2018-04-13 09:07:01 +02:00
Ted John
b8d8d24d21
Get cmake working with msvc for basic game
2018-04-12 23:07:18 +01:00
Gymnasiast
60b864441a
Fix encoding of scenario index names
2018-04-12 13:13:14 +02:00
duncanspumpkin
c2c5afa62c
Fix mistaken assignment
2018-04-11 18:58:48 +01:00
duncanspumpkin
e4e514c743
Fix travis errors. Revert mistaken rename.
...
Use enum where known
Remove unused cases
2018-04-11 18:16:23 +01:00
duncanspumpkin
e954865b49
Fix waypoints for json changes
2018-04-11 18:16:16 +01:00
duncanspumpkin
765500adfa
Label offsets and functions
...
Actually save before commiting
Label more peep vars.
Remove unread var
Further refactoring
Fix mistake in map element type
2018-04-11 18:16:09 +01:00
duncanspumpkin
a24c2672fd
Label all peep ride sub states
...
Add additional notes to function.
Perform exorcism on code base
Use vector for carArray
2018-04-11 18:15:47 +01:00
duncanspumpkin
376c40f1d4
Make peep loading positions nicer
...
Change name to waypoints. Rework
2018-04-11 18:15:28 +01:00
duncanspumpkin
c96c7b29df
Breakup substate 1 add asserts
2018-04-11 18:13:19 +01:00
duncanspumpkin
fc14f6e635
Refactor peep update ride sub state 0
2018-04-11 18:13:17 +01:00
Ted John
1cd88a1641
Fix #7367 : 'invalid name for park' shown when opening a scenario ( #7394 )
...
Apply extra changes from my own implementation of ParkSetNameAction
which re-introduces logging and calls the action directly from the UI
layer.
2018-04-10 17:14:32 +01:00
Hielke Morsink
dc673a64d8
Give context the ownership of repositories and the object manager ( #7340 )
...
This makes them no longer a singleton, which fixes annoying behaviour when launching multiple contexts in one game session.
2018-04-10 13:19:23 +01:00
Michael Steenbeek
7ebd7f1194
Increase network version
2018-04-09 16:50:17 +02:00
Michael Steenbeek
92ba2dfb01
Make seatsInPairs default to true
2018-04-09 16:05:21 +02:00
Ted John
dea5d2754b
Search ObjData recursively
...
Enable recursive searching ObjData for Windows and non-Windows. This allows players to continue using sub directories for their official objects, e.g. WW and TT. There will be a slight performance hit if all objects are in a sub directory as a search is done for each official object that is loaded.
2018-04-08 19:03:33 +01:00
Ted John
9dba4a87cc
Fix #7389 : Path items cannot be placed on sloped paths
...
Handle isAllowedOnQueue and isAllowedOnSlope separately
2018-04-08 18:46:01 +01:00
Duncan
0ab3d0955c
Merge pull request #7310 from OpenRCT2/json-objects
...
Add support for new JSON object format
2018-04-08 10:45:55 +01:00
Michał Janiszewski
b26d484726
Fix remaining headers
2018-03-31 23:48:15 +02:00
Hielke Morsink
a51462b0fd
Include necessary files for compiling headers
...
This commits works towards #7289 . It includes files that it depends on, or forward declares types when possible. It may seem like this only increases compilation time, but before this commit they depended on the other includes of the source files that use them.
2018-03-31 23:07:14 +02:00
Fusxfaranto
74361dcf87
Add different titles for multiplayer window tabs ( #2989 )
2018-03-31 10:54:41 +02:00
Ted John
63e9275b60
Protect against unknown ride types
2018-03-30 16:58:12 +01:00
Ted John
375deb0c9f
Include string not cstring
2018-03-30 16:53:55 +01:00
Hielke Morsink
aa7fb35839
Remove use of 'using namespace' from headers
2018-03-30 17:14:10 +02:00
Michał Janiszewski
3b7864957a
Cleanly shutdown in case of invalid g1.dat ( #7361 )
2018-03-30 15:38:22 +01:00
Michał Janiszewski
7443c66025
Fix validation of rct_ride_entry_vehicle for 32 bit builds
...
Also enables packing only for testpaint
2018-03-30 14:06:33 +02:00
Michał Janiszewski
64af3d25d4
Provide error message for older version of static_assert
2018-03-30 13:42:25 +02:00
Michał Janiszewski
4e44d6ef9c
Validate alignment of peep_loading_positions at compile time
2018-03-30 13:16:26 +02:00
deurklink
e960b3f150
Increment network version ( #7359 )
...
Both PRs #7343 and #7347 changed the network version from '1' to '2'.
2018-03-29 21:20:26 +02:00
Ted John
bb5b531f0c
Use resize instead of push_back
2018-03-29 17:59:49 +01:00
Michael Steenbeek
855baadd4c
Remove incorrect sujeonggwa spelling
2018-03-29 14:31:17 +02:00
Michael Steenbeek
cfb5a6b39d
Correct spelling of 'sujonkwa'
2018-03-29 13:00:01 +02:00
Michał Janiszewski
dcc834ae0a
Mark ObjectJsonHelpers::GetFlags<T> as static
2018-03-28 23:45:48 +02:00
Ted John
742edd45da
Update loading object images to use inclusive ranges
2018-03-28 22:26:13 +01:00
Gymnasiast
5eeecd82bd
Remove fixes to vanilla objects (moved to JSON)
2018-03-28 22:41:57 +02:00
Ted John
b8ae3f5e91
Fix cookie json item name
2018-03-28 21:13:59 +01:00
Hielke Morsink
a2fe309be0
Merge pull request #7355 from Broxzier/fix/virtual-floor-zero-height
...
Fix #7303 Visual glitch with virtual floor near map edges
2018-03-28 12:48:39 +02:00
Hielke Morsink
8c23f16502
Merge pull request #7354 from Broxzier/fix/clip-height-assumes-order
...
Fix clipheight assuming tile order
2018-03-28 12:48:03 +02:00
Ted John
617c14b868
Do not overwrite car.flags
2018-03-27 22:36:31 +01:00
Michał Janiszewski
ce06550b8f
Fix mismatched deleter in ~ImageTable()
2018-03-27 23:17:35 +02:00
Hielke Morsink
8adfd9a87c
Fix #7303 Visual glitch with virtual floor near map edges
2018-03-27 23:09:41 +02:00
Ted John
808296e91f
Change json shop names to OpenRCT2 names
2018-03-27 21:55:38 +01:00
Hielke Morsink
9f7d4f1bc4
Fix clipheight assuming tile order
...
Instead of breaking the loop when running into an element that's above the clip height, only skip it - the next element may still be below the clip height.
The check for the first tile could be removed entirely. The screen gets cleared every frame when the clip height flag is set already.
2018-03-27 22:17:58 +02:00
Michał Janiszewski
c4d5920140
Fix catching of polymorphic exception
2018-03-27 20:45:02 +02:00
Gymnasiast
566af0c4f7
Remove residual usages of rideEntry->enabledTrackPieces
2018-03-27 20:40:50 +02:00
Duncan
1b2b020246
Merge pull request #7343 from ZehMatt/ga-stringbased
...
Implement some game actions for naming things
2018-03-27 18:55:28 +01:00
ZehMatt
bcbe6ecbff
Remove unnecessary include
2018-03-27 16:29:56 +02:00
ZehMatt
adbe35b11c
Increment network version.
2018-03-27 16:29:55 +02:00
ZehMatt
417a2586b6
Implement game action for banner naming.
2018-03-27 16:29:53 +02:00
ZehMatt
b45609a278
Implement game action for park naming.
2018-03-27 16:29:52 +02:00
Gymnasiast
d1a81b1ade
Don't set now-unused SEPARATE_RIDE flag
2018-03-26 22:20:28 +02:00
Ted John
918562f622
Apply review fixes
2018-03-26 21:38:10 +02:00
Ted John
6616ce0a67
Load new peep loading position json format
2018-03-26 21:38:10 +02:00
Ted John
04fecf64e4
Do not prepend the position data size
2018-03-26 21:38:10 +02:00
Ted John
be000f9ba6
Sort string table when loading strings from JSON
2018-03-26 21:38:10 +02:00
Gymnasiast
860127e898
Fix rides selling balloons
2018-03-26 21:38:09 +02:00
Gymnasiast
195ca24086
Fix crash when spawning flat rides
2018-03-26 21:38:09 +02:00
Gymnasiast
f43937a0fd
Fix initial car index values
2018-03-26 21:38:09 +02:00
Ted John
f91449190a
Allow game to run without RCT2 install path
2018-03-26 21:38:09 +02:00
Ted John
f3c125853b
Do not load images for objects if in headless mode
2018-03-26 21:38:09 +02:00
Gymnasiast
e7408f188c
Fix train dropdown not being shown
2018-03-26 21:38:09 +02:00
Ted John
83ce94fd9e
Search for object file, case insensitive
2018-03-26 21:38:09 +02:00
Ted John
dfa40ccd46
Read objects from OpenRCT2 data instead of RCT2
2018-03-26 21:38:09 +02:00
Ted John
668f9fd18b
Correct some ride JSON names
2018-03-26 21:38:09 +02:00
Ted John
7ea5c1f099
Fix errors
2018-03-26 21:38:09 +02:00
Gymnasiast
b207797ad2
Fix rebase errors
2018-03-26 21:38:08 +02:00
Gymnasiast
81a2c28e1b
Small fixes
2018-03-26 21:37:24 +02:00
Ted John
1d0799fc0d
Import named car flags
2018-03-26 21:37:23 +02:00
Ted John
2917336e75
Fix import of ride type and category
2018-03-26 21:37:23 +02:00
Ted John
34168b6ecc
Import sprite flags as named flags
2018-03-26 21:37:23 +02:00
Ted John
f700c661d8
Allow cars property to be a single object
2018-03-26 21:37:23 +02:00
Ted John
a695dc953e
Fix import of JSON cars
2018-03-26 21:37:23 +02:00
Ted John
43c3eca185
Add remaining flags
2018-03-26 21:37:23 +02:00
Ted John
aec6da1420
Load loading positions from JSON and convert to vector
2018-03-26 21:37:23 +02:00
Ted John
7190894ec6
Read JSON colour presets for rides
2018-03-26 21:37:23 +02:00
Ted John
afbdb6dfc7
Continue work on ride JSON loading
2018-03-26 21:37:23 +02:00
Ted John
01067eebad
Revert 287d97a8937eb4985da060063f09816291219b78
...
Caused all food stalls to incorrectly have colour tab.
2018-03-26 21:37:23 +02:00
Ted John
85f9f3ad09
Read a shape property instead of individual flags
2018-03-26 21:37:23 +02:00
Ted John
a03b58501b
Add JSON loading for small scenery
2018-03-26 21:37:23 +02:00
Ted John
7d26492961
Fix removal price for large scenery
2018-03-26 21:37:23 +02:00
Ted John
44e2f1d577
Add JSON loading for 3D fonts in large scenery
2018-03-26 21:37:23 +02:00
Ted John
1668374d2c
Fix loading of JSON large scenery tiles
2018-03-26 21:37:23 +02:00
Ted John
1e3ce8754e
Add JSON loading for large scenery
2018-03-26 21:37:23 +02:00
Ted John
7c05e22cd0
Refactor large scenery tile flags field
2018-03-26 21:37:23 +02:00
Ted John
f11973f692
Fix typo, hasGrass -> hasGlass
2018-03-26 21:37:23 +02:00
Ted John
971e2dcaa2
Add JSON loading for walls
2018-03-26 21:37:23 +02:00
Ted John
f6a6169ca2
Don't report object conflicts
2018-03-26 21:37:23 +02:00
Ted John
ede51ded86
Add JSON loading for scenery groups
2018-03-26 21:37:23 +02:00
Ted John
3ead0f4289
Finish loading water JSON objects
2018-03-26 21:37:23 +02:00
Ted John
40f775c39a
Add JSON loading for water
2018-03-26 21:37:23 +02:00
Ted John
12d2523752
Add JSON loading for footpath banners
2018-03-26 21:37:23 +02:00
Ted John
ec446ac9d6
Return image and string table by reference
2018-03-26 21:37:23 +02:00
Ted John
c3f075d18c
Write helper method for parsing flags
2018-03-26 21:37:23 +02:00
Ted John
900bc48efa
Write common JSON string loader
2018-03-26 21:37:22 +02:00
Ted John
d56f1445f8
Add JSON loading for footpath items
2018-03-26 21:35:44 +02:00
Michael Steenbeek
e8b28965cc
Fix extracting ranges from object .DATs
2018-03-26 21:35:44 +02:00
Ted John
d27a90f068
Implement footpath JSON reading
2018-03-26 21:35:44 +02:00
Michael Steenbeek
27a055653c
Fix rebase errors
2018-03-26 21:35:44 +02:00
Ted John
2d037fb3ae
Read JSON for park entrance objects
2018-03-26 21:35:44 +02:00
Ted John
1e4a8c0da7
Refactor common JSON methods to new helper namespace
2018-03-26 21:35:44 +02:00
Ted John
4fdbf1ca93
Parse category and shop item
2018-03-26 21:35:44 +02:00
Ted John
a7a7b2f1b4
Fix memory corruption in ImageTable::AddImage
2018-03-26 21:35:44 +02:00
Ted John
ddd0df4a60
Parse ride type with lookup table
2018-03-26 21:35:44 +02:00
Ted John
5eba067aba
Load images from OBJDATA DATs
2018-03-26 21:35:44 +02:00
Ted John
773ab868fe
Parse new form of original id
2018-03-26 21:35:44 +02:00
Ted John
bf7c3931e7
Parse images from JSON
2018-03-26 21:35:44 +02:00
Ted John
f6fd79eca4
Move length calculation to ImageTable.cpp
2018-03-26 21:35:44 +02:00
Ted John
32d588d765
Fix toilets image loading
2018-03-26 21:35:44 +02:00
Michael Steenbeek
ad21e962ee
Allow import of RCT1 Ice Cream Stall
2018-03-26 21:35:44 +02:00
Michael Steenbeek
7d3489a151
Avoid toilets selling balloons
2018-03-26 21:35:44 +02:00
Michael Steenbeek
e3b202989f
Read more from JSON, attempt at supporting more types of stalls
2018-03-26 21:35:44 +02:00
Michael Steenbeek
3ffdfd1e5d
Draw the building
2018-03-26 21:35:43 +02:00
Michael Steenbeek
9ab0164b6f
Fix compiling and loading on macOS, load description
2018-03-26 21:35:43 +02:00
Ted John
a1f360ab7d
Spike 1: Add RCT1 toilets JSON
2018-03-26 21:35:43 +02:00
Michael Steenbeek
beb352d97a
Increase network version
2018-03-26 20:36:16 +02:00
Michael Steenbeek
695d3762e5
Remove last usages of SEPARATE_RIDE flag
2018-03-26 20:36:16 +02:00
Hielke Morsink
d7c198388e
Fix #7327 : Draw transparent images see-through too
...
This removes the check for transparent images before applying the hardcoded colours. It sets the transparency flag anyway.
2018-03-26 10:28:10 +02:00
Gymnasiast
ca17f03ff2
Add large half loops to the Vertical Drop Roller Coaster
2018-03-25 16:32:06 +02:00
Hielke Morsink
c5aececcb1
Set scenario save path upon successfully loading a park
...
Instead of setting the path when clicking on a file in the loadsave dialog, it's now set when the park gets actually loaded.
This fixes the System Dialog not showing when saving a park loaded from command.
2018-03-24 13:24:39 +01:00