Commit graph

146 commits

Author SHA1 Message Date
Gymnasiast
2c8ab6fb68 Fix #7065: Guests cannot enter Great Wall Of China scenario 2018-01-23 19:03:00 +01:00
Ted John
aa0d7645da Refactor ride_ratings.c to C++ 2018-01-18 22:33:06 +00:00
Ted John
83cdd56825 Unify current and next climate state into common struct 2018-01-14 01:06:47 +00:00
Michael Steenbeek
cd5a1ba888 Compile files in world folder as C++ 2018-01-11 13:25:09 +01:00
Gymnasiast
8fb0046136 Fix #6990: Scenery not correctly marked as available 2018-01-10 20:29:20 +01:00
Michael Steenbeek
37cec95ce2 Move research list import/export to separate functions 2018-01-10 16:31:13 +01:00
Michael Steenbeek
0995ab9910 Fold gResearchNextCategory into gResearchNextItem 2018-01-10 15:31:47 +01:00
Michael Steenbeek
b11f59ba6c Refactor gResearchedSceneryItems 2018-01-10 15:31:47 +01:00
Michael Steenbeek
d2de1a4a95 Abstract access to gResearchedRide{Types,Entries} 2018-01-10 15:31:47 +01:00
Michael Steenbeek
55b473d866 Rename gResearchLastItemSubject to gResearchLastItem 2018-01-09 21:35:10 +01:00
Michael Steenbeek
0296608623 Name/fix various RCT1/RCT2 limits 2018-01-09 13:36:41 +01:00
Michael Steenbeek
7d5de63484 Refactor rct_research_item, refactor access to rct_research_item
This takes away a lot of the bitshift and bit mask trickery previously used.
2018-01-07 15:33:44 +01:00
Ted John
f18595a1c1 Refactor viewport.c to C++ 2018-01-07 12:39:58 +01:00
Michael Steenbeek
c3e79b1948 Fix Amity Airport coordinate adjustment 2018-01-06 21:46:18 +01:00
Michael Steenbeek
755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Ted John
02c58a6c5a Remove custom base Exception class 2018-01-05 18:11:47 +00:00
Michael Steenbeek
31bf792538 Refactor research - spike 1
This involves refactoring gResearchedRideTypes and gResearchedRideEntries
and the functions involved.

Also renames some functions in order to better express what they do.
2018-01-04 17:44:51 +01:00
Ted John
49f5611bd1 Rename scenario.c|h to cpp 2018-01-03 15:07:17 +01:00
Michael Steenbeek
c5e966292b Fix #3171: Guests entering from the corner of the tile in Amity Airfield 2018-01-02 16:07:39 +01:00
Gymnasiast
1626f86acc Compile park.c as C++ 2018-01-01 01:18:12 +01:00
Gymnasiast
23d70a4ac9 Compile ride.c as C++ 2017-12-31 20:43:17 +01:00
Michael Steenbeek
c4f44e5e7a Compile files in paint folder as C++ 2017-12-17 17:24:36 +01:00
Michael Steenbeek
1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Michael Steenbeek
3868b100df Stop encrypting money
It serves no purpose any more. Of course, we still need the ENCRYPT_MONEY() and DECRYPT_MONEY() functions for importing and exporting S6 files.
2017-12-07 23:22:24 +01:00
Michael Steenbeek
60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Michael Steenbeek
b0aaf13cec Clean up and future-proof peep spawn import 2017-11-30 23:08:59 +01:00
Michael Steenbeek
7feb0f8f7e Fix #4760: Correct guest entry points on loading scenario 2017-11-29 09:10:09 +01:00
Michael Steenbeek
1011d6172d
Clean up string IDs 2017-11-23 15:52:06 +01:00
Martin Müller
7089ec80fc Fix highscores for savegames
When loading a savegame, its filename gets stored as gScenarioFileName.
However, that isn't necessarily the same name as the filename of the
corresponding scenario (or any, for that matter, due to the different
file extension). This broke highscores, so for savegames we have to
take the scenario filename stored in the file.
2017-11-05 12:25:40 +01:00
Martin Müller
8422556bc1 Fix #6566 and #6573: Highscores don't get saved
For some RCT2 parks the scenario name in the sv6 file is wrong, so take the real filename.
2017-11-02 19:31:01 +01:00
Christian F. Coors
06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Michael Steenbeek
3d8ec4e393 Warn when loading incompatible RCTC saves 2017-11-01 20:23:06 +01:00
Michael Steenbeek
af845beb61 Replace mapElement with tileElement 2017-10-31 19:59:06 +01:00
Michael Steenbeek
ce8d9cc71b Rename map_element to tile_element 2017-10-31 19:59:06 +01:00
Ted John
be4fe7b681 Rename total ride value to total ride value for money 2017-10-25 13:38:06 +02:00
Michael Steenbeek
ce4899c60c Compile station.c as C++ 2017-10-23 14:47:12 +02:00
Tomas Dittmann
e393ff1f22 Stop using (void*)-1 for invalid pointers 2017-10-15 15:53:16 +02:00
Michał Janiszewski
ab3835719a Compile peep and staff logic as C++ 2017-10-13 10:06:36 +02:00
Michael Steenbeek
3a2aeda398 Refactor expenditure table and history graph 2017-10-12 20:35:59 +02:00
Michael Steenbeek
42d6a10952 Compile management as C++ 2017-10-11 21:38:26 +02:00
Michael Steenbeek
17557569d0 Turn 'unlock all prices' into a regular option
This uses a previously unused S6 flag to save this option persistently.
This should not make S6 import much harder, but should reduce the amount of questions about S4 import.

Also refactor the checks whether the user can ask money for rides or entry. This should make it a lot easier
when our own save format comes around.
2017-10-11 08:33:17 +02:00
Michael Steenbeek
31e1ad43a8 Compile finance.c as C++, clean up 2017-10-07 16:28:35 +02:00
Michael Steenbeek
25b72260d7 Compile research.cpp as C++, small refactor 2017-10-06 21:41:50 +02:00
Michael Steenbeek
7cb464af6e Clean up animated object limit and import 2017-10-06 11:33:55 +02:00
Michał Janiszewski
5ab9f938a7 Update files missed in the great extern "C" cleanup of 2017 2017-09-28 23:29:16 +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
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
671a7bcbe1 Improve and extend constant usage 2017-09-13 18:13:38 +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
a28509e24c Split Ride and rct2_ride 2017-09-12 11:16:57 +02:00
Richard Jenkins
71e580a58f Refactor game load functions, resolves #6011 2017-08-23 08:04:36 +02:00
Gymnasiast
8eec684545 Use more constants, isolate SV6 limits further 2017-08-14 19:56:29 +02:00
Ted John
8b2eb8a13e Move screen variables to OpenRCT2.h 2017-07-29 20:29:29 +01:00
CharlesLove
88290337f6 Fix #5881: gCheatsUnlockAllPrices persists when loading new scenarios 2017-07-22 22:20:52 +02:00
Ted John
4852633a1b Fix #5966: Issue with Ride Time 2017-07-22 09:24:51 +01:00
Michael Steenbeek
343e436e45 Import rides in SV6 files per ride and per field 2017-07-19 22:00:48 +02:00
Ted John
c33a9f06d9 Remove subsitute_path and refactor gScenarioFilename 2017-07-16 23:25:11 +01:00
Michał Janiszewski
12500dd802 Fixup the disjoint null sprites 2017-07-07 00:14:45 +02:00
rwjuk
247d72b1aa Implement sprite cycle checking 2017-07-06 19:57:37 +02:00
Michał Janiszewski
ec7bcfce34 Revert "Fix #5795: Implement sprite cycle checking" 2017-07-06 11:13:12 +02:00
rwjuk
22f88f80b0 Implement sprite cycle checking 2017-07-05 23:34:47 +01:00
Ted John
ddb96ec267 Refactor load park result
Use a C++ struct and pass that to C.
2017-07-01 01:29:35 +01:00
rwjuk
ab38c07fb9 Make object window work with S4s and scenarios 2017-07-01 01:29:34 +01:00
rwjuk
214bf3988b Implement 'missing objects' window
Implement 'missing objects' window

Basic implementation of 'bad objects' window

Add new object_load_error.c

Add object_load_error.c

Faffing about

String stuff

Stuff

Get window basically displaying

Proper col header for object

Display object types

Display file name and explanatory message

Probably about time I added myself to the dev list

Cleanup and comments

Make bad object window work with SC6

Fix whitespace, string IDs, flip core function sense

Fix spacing in string_ids.h

Fix string ID snafu

Fix HasNoInvalidObjects() sense

Attempt to refactor this to pass data properly

Move typedefs to separate header

Fix up signatures

Add park_load_result_types.h

Clean up includes and remnants of prev implementation

Split duplication into function, free invalid entries list on close

Use pointer for object_validity_result param

Fixup string IDs

Use LoadObject() directly

Use dependency injection, fix string termination

Xcode fix, make helper function static

Fix buffer overrun and memory leak

Use SDL for clipboard functionality

Fix function & variable declarations

Rework editor_read_s6() to use new park load result type

Update changelog for #5624

[ci skip]

Fix mem leak, function signature and whitespace
2017-07-01 01:28:51 +01:00
Ted John
b9e9ddfc1c Use more dependency injection 2017-06-24 09:56:51 +02:00
Michael Steenbeek
e725672d23 Clean up alternative track pieces and types, remove remnants of researched track pieces 2017-05-16 19:11:51 +02:00
Michał Janiszewski
ee7ad17a30 Align field assignments in S6Importer.cpp 2017-04-24 22:40:22 +02:00
duncanspumpkin
ffeb1fa527 Initial refactor of entrance 2017-03-13 17:33:46 +00:00
Ted John
bcc0bfa485 Rename climate.h to Climate.h 2017-03-11 22:59:33 +00:00
Ted John
fb2c835d52 Include new config header 2017-02-18 15:45:10 +00:00
Ted John
5e812d5315 Merge pull request #5209 from IntelOrca/refactor/remove-c-rwops
Refactor and remove RWops from C code
2017-02-12 10:48:51 +00:00
Ted John
5e483b3288 Merge pull request #5153 from wolfreak99/refactor_peep_spawns_park_entrances
Refactor park entrance to a struct
2017-02-11 21:14:59 +00:00
wolfreak99
e9726a8121 Include compatibility comment 2017-02-11 15:33:22 -05:00
wolfreak99
e41f8108b7 Remove tabs 2017-02-11 14:07:05 -05:00
Ted John
fb7f0a21d2 Remove game_load_sv6 that uses RWops 2017-02-11 12:03:03 +00:00
wolfreak99
f85dc8ced0 Code fixups 2017-02-08 21:46:54 -05:00
Ted John
410376356d Remove scenario_load_rw, no longer used 2017-02-08 22:06:27 +00:00
Ted John
d124f4fad0 Use streams for network load and save 2017-02-08 18:16:33 +00:00
wolfreak99
b0cc772990 Replace gParkEntranceX/Y/Z/Direction with rct_xyzd16 gParkEntrance 2017-02-08 09:39:04 -05:00
Ted John
2518362112 Use streams for SV6 export 2017-02-05 15:45:23 +00:00
Ted John
7ab2723936 Create a reader class for sawyer encoded chunks. 2017-02-05 02:40:50 +00:00
Ted John
601a8e633c Fix #5171: Latest build doesn't allow server connection
Network park streams do not have checksums so do not try to validate.
2017-02-04 11:05:25 +00:00
Ted John
afc8943e34 Fix #5169: Parks containing packed objects fail to open
Regression from 3b02b05dc6. Forgot to implement reading packed objects with IStream.
2017-02-04 00:34:14 +00:00
Ted John
44120b2e7e Fix build issues 2017-02-02 22:00:01 +00:00
Ted John
bb62bbebb3 Re-introduce checksum validation 2017-02-02 22:00:01 +00:00
Ted John
fed4c248e3 Remove use of SDL RWOps from title sequence player 2017-02-02 22:00:01 +00:00
Ted John
5d7a712672 Use new S6 importer for title screen and fix issues 2017-02-02 22:00:01 +00:00
Ted John
8998b2ae18 Refactor S6 importer to use IParkImporter interface 2017-02-02 22:00:01 +00:00
Ted John
3379143011 Improve S4 / S6 import initialisation 2017-01-23 13:00:46 +00:00
Ted John
8d959fa519 Merge pull request #5085 from IntelOrca/refactor/structs/various
Create new OpenRCT2 news item struct
2017-01-22 16:15:42 +00:00
Michał Janiszewski
64fc76009a Strip ghost flag from elements on loading
Ghost elements are notoriously a reason of network desyncs, because they
don't get transferred over network. They are meant to be local only and
disregarded by any logic, but it is not yet the case in many places.

Upon saving, we *remove* all the ghost elements (by calling
`scenario_fix_ghosts`), based on assumption they can only be caused by
local interaction. Testing has shown there are `sv6`s in the wild that
have elements marked as ghosts and this could lead to a situation where
we strip away parts of the park. This also causes network desyncs for
reason stated above.

As we strip elements with ghost flag from saves anyway, it should be
safe to assume none of our saves introduce ghosts and this issue is
limited to hacked parks only. One example of such park is [Cocopa
Bay](http://www.nedesigns.com/park/3473/cocopa-bay/).

This change removes the flag on all map elements while importing. This
is much less invasive than removing all ghost elements on importing, as
they may contain some actual data. This ~~fixes~~ hides the desync that
could be seen in the Cocopa Bay park.

As this doesn't change any in-game logic, no network version update is
necessary.

#5094
2017-01-21 00:21:10 +00:00
Ted John
71f83cd7a7 Dissociate rct_news_item from RCT2 2017-01-17 12:51:02 +00:00
Ted John
f6dee8c58d Unify rct1_award and rct2_award 2017-01-16 18:41:16 +00:00
Ted John
5efd23dbe5 Create new OpenRCT2 award struct 2017-01-16 18:00:04 +00:00
Broxzier
60603ae10a Use types from common.h 2017-01-14 12:37:31 +01:00
Ted John
25bc798ff8 Move contents of src into project sub directory 2017-01-04 17:44:12 +00:00
Renamed from src/rct2/S6Importer.cpp (Browse further)