Commit graph

4677 commits

Author SHA1 Message Date
duncanspumpkin
fef7445f0c Use flags where known. Refactor large 3d signs slightly 2017-02-04 08:12:44 +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
Broxzier
5fef1a5d0b fix paste button becomes active after sorting tile
Remove unneeded call to window_tileinspector_set_page
2017-02-03 21:10:20 +01: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
5c1f2f4c43 Replace IS4Importer with IParkImporter 2017-02-02 22:00:01 +00:00
Ted John
2b045ddb9b Use streams for reading parks in S4 importer 2017-02-02 22:00:01 +00:00
Ted John
f30a3b315c Add common load method for S4 importer 2017-02-02 22:00:01 +00:00
Michał Janiszewski
04a2734593 Merge pull request #5162 from duncanspumpkin/refactor
Small refactor of world files
2017-02-02 22:53:37 +01:00
Michał Janiszewski
6ac6b272c4 Bump network version 2017-02-02 22:46:37 +01:00
Ted John
676903e65c Reduce false positive desync
The staff list window modifies the sprites purely for local state causing a false positive desync warning to pop up in multiplayer. This now causes it to only happen if the map window is also open. This is also a performance improvement.

#5164
2017-02-02 21:31:36 +00:00
Michael Steenbeek
695f7c33bf Fix all known incorrect land ownership in RCT1 2017-02-02 22:21:05 +01:00
Michael Steenbeek
cad39c788a Remove more magic values from metal_a_supports_paint_setup 2017-02-02 21:54:19 +01:00
Broxzier
81a8a1a939 Minor tile inspector improvements
- Fix tile unselectable after closing the window
- Remove unused code (scenery has no dropdown)
- Drawing dashes in X/Y spinners when no tile is selected
2017-02-02 21:28:18 +01:00
duncanspumpkin
e384b9a508 Label known offsets and flags of wall/fence 2017-02-02 18:52:35 +00:00
duncanspumpkin
e1ea820111 Remove unnecessery read. Add offsets 2017-02-02 18:20:16 +00:00
duncanspumpkin
6a9cddf2d8 Label water object offsets 2017-02-02 18:13:51 +00:00
duncanspumpkin
e749285e48 Label PARK_FLAGS_18 and adjust SCENARIO_NO_MONEY comment 2017-02-02 17:59:23 +00:00
Gymnasiast
2381bd5cfb Fix RCT1 Splash Boats import 2017-02-02 15:47:08 +01:00
Michael Steenbeek
eb45ec95ce Merge pull request #5145 from IntelOrca/feature/rct1-scenario-select
Enable RCT1 SC4s for scenario select
2017-02-01 18:32:45 +01:00
muemart
a64dae573a Fix data path command line on windows 2017-01-31 19:41:26 +00:00
Ted John
72800acd5c Fix std::string used as char * 2017-01-31 17:59:42 +00:00
Ted John
4670d2f770 Fix some SC enum items missing prefix 2017-01-31 17:57:10 +00:00
Ted John
612e268e5f Allow SC4s to be loaded by title seq player 2017-01-31 17:54:39 +00:00
Ted John
daaf6c69a3 Use missing SC IDs in scenario sources 2017-01-31 17:54:39 +00:00
Ted John
a8e329ef99 Implement getting sc entries from SC4s 2017-01-31 17:54:39 +00:00
Ted John
c9d7cd8216 Refactor loading of SC6 information when scanning scenarios 2017-01-31 17:54:39 +00:00
Michael Steenbeek
94d38b9f7a Don't remove vehicles when removing all guests, name some interaction fields 2017-01-30 23:51:01 +01:00
Michał Janiszewski
bde17f2b30 Start v0.0.7 2017-01-29 23:35:17 +00:00
wolfreak99
99c68439b1 define MAX_PEEP_SPAWNS and MAX_PARK_ENTRANCES (#5119) 2017-01-29 22:27:14 +01:00
wolfreak99
70a855c395 Fix #5029: Invalid window limit can cause crash
#5121
2017-01-29 18:03:23 +00:00
duncanspumpkin
35b91037e8 Refactor of footpath labeling enums 2017-01-29 10:15:29 +00:00
duncanspumpkin
e2efb66d3d Minor refactor of banner and footpath enums 2017-01-29 09:40:43 +00:00
Michał Janiszewski
723e13cb16 Prevent some crashes when title sequence is not present 2017-01-28 21:13:36 +00:00
Michał Janiszewski
f6cc743da6 Fix #5096: Crash on park with out of bounds sprite coordinates 2017-01-28 21:12:07 +00:00
Michał Janiszewski
cb1911280a Don't crash if path to RCT2 is NULL
This can happen when `game_path` entry gets removed from `config.ini`
2017-01-28 21:31:33 +01:00
Michał Janiszewski
404fceaed9 Guard against invalid fence better 2017-01-28 21:04:08 +01:00
duncanspumpkin
3633b86405 Minor refactor of track design to label enums 2017-01-28 09:28:11 +00:00
Michał Janiszewski
0e7c94d98a Guard fence from null entry
Allows loading
http://www.nedesigns.com/park/3626/mediterranean-mysteries/
2017-01-28 00:12:49 +01:00
Michał Janiszewski
834cee311b Fix typos in RCT1-related code 2017-01-27 22:13:49 +01:00
Michał Janiszewski
51523df50a Fix left-shifts in research.c 2017-01-27 21:46:10 +01:00
Ted John
233a3040e1 Merge pull request #5007 from IntelOrca/feature/rct1/import-vehicles
RCT1: import vehicles
2017-01-27 07:49:20 +00:00
Michał Janiszewski
6bd9e3eca8 Make sure various fields are initialised properly 2017-01-27 07:35:48 +01:00
Gymnasiast
24b546b789 Fix import of peep sprites 2017-01-27 00:50:49 +01:00
Ted John
e115227c08 Sort includes 2017-01-26 23:36:33 +00:00
Ted John
b5505c9fc9 Improve function names 2017-01-26 23:36:21 +00:00
Ted John
f019aa5db5 Remove commented out code 2017-01-26 23:35:01 +00:00
Ted John
f3fc09cb9a Fix switch brace syntax 2017-01-26 23:32:46 +00:00
Ted John
438926c08c Protect ride_mechanic_status_update from null mechanic 2017-01-26 23:30:16 +00:00
Gymnasiast
2da90b9808 Fix erroneous messages about stalling 2017-01-26 23:30:16 +00:00
Ted John
c24127bafe Fix loading scenario details from SV4 2017-01-26 23:30:16 +00:00
Gymnasiast
c92792a973 Also import news items in S4 files correctly 2017-01-26 23:30:16 +00:00
Gymnasiast
6d8a617712 Count block sections when importing an SC4/SV4 file 2017-01-26 23:30:16 +00:00
Gymnasiast
a7e91ad556 Use the actual scenario number in the S4 file rather than the file name 2017-01-26 23:30:16 +00:00
Gymnasiast
bd68624c92 Fix unbuyable land tiles in Katie's Dreamland 2017-01-26 23:30:16 +00:00
Gymnasiast
84754ec30f Correctly import Heide-Parks Compact Inverted Coaster 2017-01-26 23:30:16 +00:00
Gymnasiast
585e28b67f Temporarily fix non-ascii import 2017-01-26 23:30:16 +00:00
Gymnasiast
e621cd37cc Fix mechanics facing the wrong direction 2017-01-26 23:30:16 +00:00
Ted John
1cb6dbbe1f Convert RCT1 strings to UTF-8 2017-01-26 23:30:16 +00:00
Ted John
67b668c54e Use spite_move when importing misc sprites 2017-01-26 23:30:16 +00:00
Ted John
1a5bec7846 Fix and refactor sprite index mapping 2017-01-26 23:30:16 +00:00
Gymnasiast
79f9cf611d Guard better against incorrect subtypes 2017-01-26 23:30:16 +00:00
Gymnasiast
91c3b5c592 Fix lifecycle flags import 2017-01-26 23:30:16 +00:00
Gymnasiast
d476176d73 Import more fields, name mechanic flags, fix booster behaviour 2017-01-26 23:30:16 +00:00
Gymnasiast
39d413b781 Fix Megaworld Park crashing on opening, fix some colour schemes 2017-01-26 23:30:16 +00:00
Gymnasiast
476f1fad2b Use constants for null sprite location and maximum vehicles 2017-01-26 23:30:16 +00:00
Gymnasiast
02da9caf5d Fix formatting and remove warning silencer 2017-01-26 23:30:16 +00:00
Gymnasiast
803c4ddfe5 Fix minigolf import 2017-01-26 23:30:16 +00:00
Gymnasiast
653be68b98 Don't assert on incorrect colour or sprite type 2017-01-26 23:30:16 +00:00
Gymnasiast
69a79fd00a Import water colour 2017-01-26 23:30:16 +00:00
Gymnasiast
3d0c357fbf Fix vehicle direction 2017-01-26 23:30:16 +00:00
Michael Steenbeek
b47694a9f7 Fix typo 2017-01-26 23:30:16 +00:00
Gymnasiast
54c4f0f1f3 Fix import of more vehicles, fix some colours 2017-01-26 23:30:16 +00:00
Gymnasiast
cc4576b72a Fix colour lookup for vehicle sprites 2017-01-26 23:30:16 +00:00
Gymnasiast
51c812458e Extract colour lookup functions 2017-01-26 23:30:16 +00:00
Gymnasiast
d077cd1341 Create table for converting colour schemes, fix some vehicles, fix river rapids 2017-01-26 23:30:16 +00:00
Gymnasiast
63d639db5d Fix negative queue lengths, fix monorail, fix chairlift crashes 2017-01-26 23:30:16 +00:00
Ted John
c1d532be01 Fix colour conversion out of range 2017-01-26 23:30:16 +00:00
duncanspumpkin
e3e435c9f7 Fix trains splitting up into multiple vehicles 2017-01-26 23:30:16 +00:00
Gymnasiast
dacfba9eda Import more fields, correct more vehicles 2017-01-26 23:30:16 +00:00
Gymnasiast
fc7b03747e Import ride measurements (with bugs) 2017-01-26 23:30:16 +00:00
Gymnasiast
e3d197e856 Import Corkscrew train correctly, import colours 2017-01-26 23:30:16 +00:00
Gymnasiast
f7f744f59b Use a map to convert vehicle subentry and restore seat rotation 2017-01-26 23:30:16 +00:00
Gymnasiast
8646f5d4ee Use speed, friction from source vehicle 2017-01-26 23:30:16 +00:00
Ted John
6c339787ee Fix peep links in vehicles 2017-01-26 23:30:16 +00:00
Gymnasiast
748d82f517 Import peeps in vehicles as well 2017-01-26 23:30:16 +00:00
Ted John
390a03a540 Remove seat rotation from RCT1 vehicle struct 2017-01-26 23:30:16 +00:00
Ted John
f52286a442 Import and fix vehicle links 2017-01-26 23:30:16 +00:00
Ted John
604e17007f Copy over some properties 2017-01-26 23:30:16 +00:00
Ted John
7a4ca989ba Add beginnings of vehicle importing 2017-01-26 23:30:16 +00:00
Ted John
53c788d9d9 Fix #5003: Able to remove entrance/exit of unedittable rides 2017-01-26 23:24:59 +00:00
Michał Janiszewski
8d1fbcf188 Raise network version to 33 2017-01-26 23:00:56 +01:00
zaxcav
f5ae931406 Replace reuse of test_edge with new variable next_test_edge
Value of test_edge is needed for checking all path tiles placed with
zero clearance at that location.
2017-01-26 22:59:54 +01:00
duncanspumpkin
61bb44cd22 Bump network version just in case 2017-01-26 19:52:01 +00:00
Michał Janiszewski
aeef3a7d5d Remove trailing whitespace 2017-01-26 19:51:31 +00:00
duncanspumpkin
98f483e4bb Fix trailing white space. Fixed space indent 2017-01-26 19:51:31 +00:00
duncanspumpkin
d951c500c5 Refactor of peep data and label known addresses
Fixes #4545. Incorrect sprite image for chicken and juice
2017-01-26 19:51:30 +00:00
duncanspumpkin
7cddd36feb Fix RCT2 builds
Due to increased warnings unreachable code warning was causing a failure to compile.
2017-01-25 18:35:28 +00:00
Ted John
7eac99c9f0 Merge pull request #5113 from IntelOrca/feature/random-entertainer-skin
Set hired entertainers to a random costume.
2017-01-25 12:35:08 +00:00
Gymnasiast
8f81485c46 Correct spelling of 'block brakes', use constant 2017-01-25 02:33:17 +01:00
zaxcav
5424e7774c Display cut height in Units when Height Label: Units is selected in the options. (#5115) 2017-01-25 00:53:25 +01:00
Ted John
93762bf15f Fix issues 2017-01-24 17:32:17 +00:00
Ted John
c40df001ca Use sint32 2017-01-24 17:04:03 +00:00
Ted John
c699c91348 Pick random entertainer costume 2017-01-24 13:06:23 +00:00
Ted John
2900f38cc3 Allow entertainer costume to be given to game command 2017-01-24 13:06:23 +00:00
Michał Janiszewski
ceb77b489d Fix map_get_path_element_at to not consider ghosts 2017-01-24 11:30:39 +01:00
Michał Janiszewski
88113ca952 Fix some ghost consideration in peep AI
This is a continuation of
https://github.com/OpenRCT2/OpenRCT2/pull/5094.

While the previous PR cured some desyncs, the real issue remained –
logic of the game considers ghost elements. This change fixes it, to
some extent.

The problem here is we already remove ghosts when interacting over
network (e.g. `footpath_provisional_remove` in `footpath_place_real`),
but this happens only when such a game command is executed in OpenRCT2.
Whenever SV6 gets imported, path map elements already have had edges
calculated for them, neighbours being ghost or not, and we don't update
it. OpenRCT2/OpenRCT2#5094 is one, naïve, way to solve, the other option
would be to recalculate all the paths whenever we load SV6.
2017-01-24 11:29:58 +01:00
Michael Steenbeek
a4d5f764f4 Implement diagonal flat-to-steep slopes on the Junior RC, fixes #4584 2017-01-24 09:26:30 +01:00
Aaron van Geffen
990b9b8708 Fix #5005: The Right Arrow in Horizontal scroll bars does not work anymore. (#5107)
Both horizontal and vertical scrollbars had a malfunctioning widget: both the
right and bottom widgets weren't fired properly.

The bug was less noticeable for vertical scrollbars, as clicking the widget would
be treated as clicking empty space, which did not happen for the horizontal
scrollbar.

This patch fixes the underlying inconsistencies, making sure the widgets for
both types of scrollbars work -- when using either scrollbar, or when combined.
2017-01-23 19:06:53 +01:00
Ted John
3379143011 Improve S4 / S6 import initialisation 2017-01-23 13:00:46 +00:00
Ted John
a0fc01d54e Clean up game init a bit more 2017-01-23 12:55:59 +00:00
Ted John
288f4782b6 Make dedicated method for window set location 2017-01-23 12:48:10 +00:00
Ted John
abac2ca614 Consolidate game initialisation into single method 2017-01-23 12:44:27 +00:00
Ted John
ef6fa35323 Merge pull request #5106 from IntelOrca/refactor/use-scenario-repo
Refactor / use scenario repository as dependency
2017-01-23 12:08:23 +00:00
Aaron van Geffen
3437b26db8 Clean up switch statement for map window 2017-01-22 23:06:56 +01:00
Ted John
e36dc622ad Pass scenario repository dependency to TitleSequencePlayer 2017-01-22 22:04:07 +00:00
Ted John
d5f2ea814a Use scenario repository to load SFMM in title sequence 2017-01-22 21:57:14 +00:00
Ted John
efb64603eb Only create OpenGL window when necessary
Currently the game window is always created with an OpenGL context which then means that opengl32.dll and other modules are loaded. The OpenGL window flag will now only be used if the config drawing engine is set to OpenGL. This now means that a restart of the game is required when switching to the OpenGL drawing engine for Windows.

#5104
2017-01-22 21:38:08 +00:00
zaxcav
a4b476ac92 Minor changes as requested by reviewer. 2017-01-22 21:21:00 +01:00
zaxcav
80b0df3b74 Add formatting to tooltip texts; Fix printing of raw clip height value. 2017-01-22 21:21:00 +01:00
zaxcav
6a4ced856e Minor code changes per reviewer comments. 2017-01-22 21:17:08 +01:00
zaxcav
0d81835224 Correct mistakes during rebase. 2017-01-22 21:17:08 +01:00
zaxcav
93e5e80e26 Correct code alignment in widget placement code (tab based). 2017-01-22 21:11:42 +01:00
zaxcav
e8f97da2c6 Implement further changes as requested by reviewer.
Add toggling displayed clip height value between the raw value and value in units.
2017-01-22 21:11:42 +01:00
zaxcav
25e57ca50d Updated code as requested by reviewer.
Removed display of raw cut height value.

Changed display of cut height in METRIC/SI from 1DP to 2DP to display odd raw heights with accurate value.

Changed display of cut height in IMPERIAL to 1DP to display odd raw heights with accurate value.
2017-01-22 21:02:19 +01:00
zaxcav
87a80ac956 Minor code cleanups.
Adjusted sprite trimming.
2017-01-22 20:57:17 +01:00
zaxcav
e287b4ec3e Fix typo. 2017-01-22 20:57:17 +01:00
Broxzier
ef5f4a5f5a Add spinners for better control of clip-height
This commit also changes the step size to 1 (I did not notice anything
strange).
2017-01-22 20:57:17 +01:00
Broxzier
e87da61436 Fix screen invalidation on drag
The window size did not match the sizes given to window_create, causing
the window to think it was actually smaller, and as a result not clearing
the screen properly. This commit adds the WW and WH macros and uses them.

This commit also has a few formatting changes.
2017-01-22 20:57:17 +01:00
zaxcav
f76628bff0 Recorrect errors identified by AppVeyor. 2017-01-22 20:57:17 +01:00
zaxcav
d06d37e862 Revise previous error corrections 2017-01-22 20:57:17 +01:00
zaxcav
c91871822b Correct more errors detected by AppVeyor 2017-01-22 20:57:17 +01:00
zaxcav
c615368115 Correct errors identified by AppVeyor 2017-01-22 20:57:17 +01:00
zaxcav
77e3827935 Add view_clipping.c to openrct2.vcxproj 2017-01-22 20:57:17 +01:00
zaxcav
a30c9b3717 Minor code cleanups 2017-01-22 20:57:17 +01:00
zaxcav
a008dcb186 Display clip height in METRIC/SI units with 1DP. 2017-01-22 20:57:17 +01:00
zaxcav
c97f624965 Move view_clipping.c to under src/openrct2/windows 2017-01-22 20:50:39 +01:00
zaxcav
c3aabede64 Initial prototype of paint clipping.
Paint clipping is a possible future feature to assist players building in cluttered areas of a park by controlling which map elements and sprites are rendered, providing a clearer view for construction, inspection, etc.

Only clip height is supported in this prototype.

Map elements are clipped according to the map element base height (meaning *all* scenery on that map element is currently clipped with it).

Sprites are clipped according to their z value being within the "sprite volume" of any non-clipped map element (which means below clip height + 2).

Control is only provided through the console in this prototype - use the command: set paint_clip_height _value_

To turn clipping off use the command: set paint_clip_height 255

Clip heights are limited to multiples of two to coincide with the native heights of map elements.

Command "get paint_clip_height" prints the clip height as a raw value as well as the equivalent height in ft and m as used when displaying heights in-game.

At this time only painting of the main viewport is affected. There is no change to any input control handling.
2017-01-22 20:50:39 +01:00
zaxcav
0620321fb2 Re-added initialisation of scrollbar.
Added window theme, so window displays correctly everytime.

Changed strings.

Other minor tweaks to window.
2017-01-22 20:50:39 +01:00
zaxcav
c6da3fa862 Scrollbar for clipping height now works.
Initialisatation of scrollbar with clip height is temporarily disabled.

Revised view menu entry bahaviour.

Other minor window tweaks.
2017-01-22 20:45:21 +01:00
zaxcav
5f03047c40 View clipping window fixes.
Cleaned up widget positions - looks like a proper interface now.

Remaining Issues:

- Window only displays correctly every second time it is opened;

- Clip height in Units (ft/m) is displayed without the decimal point;

- Scroll bar is not working;

- Decide how the View menu entry should work.
2017-01-22 20:45:21 +01:00
zaxcav
fc8da2086f Fix view menu so view clipping entry shows 2017-01-22 20:45:21 +01:00
zaxcav
e8d6cba5be Initial attempt at paintClip UI
Compiles but untested.

NOT INTENDED FOR MERGING
2017-01-22 20:45:21 +01:00
zaxcav
1e5b83c631 Initial prototype of paint clipping.
Paint clipping is a possible future feature to assist players building in cluttered areas of a park by controlling which map elements and sprites are rendered, providing a clearer view for construction, inspection, etc.

Only clip height is supported in this prototype.

Map elements are clipped according to the map element base height (meaning *all* scenery on that map element is currently clipped with it).

Sprites are clipped according to their z value being within the "sprite volume" of any non-clipped map element (which means below clip height + 2).

Control is only provided through the console in this prototype - use the command: set paint_clip_height _value_

To turn clipping off use the command: set paint_clip_height 255

Clip heights are limited to multiples of two to coincide with the native heights of map elements.

Command "get paint_clip_height" prints the clip height as a raw value as well as the equivalent height in ft and m as used when displaying heights in-game.

At this time only painting of the main viewport is affected. There is no change to any input control handling.
2017-01-22 20:41:34 +01: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
Gymnasiast
0a83bb8b15 Fix importing custom peep/staff names, fix formatting 2017-01-22 16:54:58 +01:00
Ted John
ed940ab41c Merge pull request #5098 from IntelOrca/enable-lightfx
Resolve #5048: Enable light FX
2017-01-22 01:31:56 +00:00
Ted John
66c2dcaa59 Remove unncessary extern from functions definitions. 2017-01-21 21:57:09 +00:00
Michael Steenbeek
d60b0def60 Fix loading zoomed sprites from RCT1 2017-01-21 21:48:12 +00:00
Ted John
a7edba27aa Enable light FX in builds 2017-01-21 12:02:41 +00:00
Ted John
fc66f42c31 Add config option to enable / disable light FX 2017-01-21 12:01:01 +00:00
wolfreak99
a15a3fedf7 Create "misc_commands" enum 2017-01-21 12:43:16 +01: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
Michael Steenbeek
936ec799fa Add constants for CSG1 large surface sprites 2017-01-20 12:40:06 +00:00
Michael Steenbeek
a5b280e115 Whitespace correction 2017-01-19 20:28:29 +01:00
Michael Steenbeek
5a3f2e01ab Add note explaining the start address of CSG1 2017-01-19 20:27:35 +01:00
Ted John
ebc0d03601 Rename terrain edge constant arrays 2017-01-19 15:00:21 +01:00
Ted John
ebebd3836c Refactor edge image arrays and add constants 2017-01-19 15:00:21 +01:00
Ted John
a102a566d2 Allocate image IDs for RCT1 images 2017-01-19 15:00:20 +01:00
Ted John
4bffc4b131 Add ability to import RCT1 graphics 2017-01-19 15:00:18 +01:00
wolfreak99
55972f17f8 Remove empty extern
[ci skip]
2017-01-19 08:37:11 +01:00
Michael Steenbeek
41bab044a6 Log number of exported objects as verbose, fixes #5063 2017-01-18 10:52:07 +01:00
Michael Steenbeek
f6b55b4a0d Merge pull request #5087 from marijnvdwerf/fix/vertical-tunnels
Test vertical tunnels properly
2017-01-18 10:04:25 +01:00
Marijn van der Werf
2c6100afcb Fix wrong vertical tunnel offsets 2017-01-18 00:01:58 +01:00
Marijn van der Werf
2ffbbe0678 Test vertical tunnels properly 2017-01-17 23:57:53 +01:00
Jonathan Haas
2fda0c8a1f Fix width of park rating bar in bottom toolbar 2017-01-17 23:11:12 +01:00
Ted John
d57069c3d3 Name news flags 2017-01-17 17:23:03 +00:00
Ted John
94cb5818b7 Remove 256 text length constraint 2017-01-17 17:19:03 +00:00
Ted John
8b46b32031 Protect score structs from C 2017-01-17 17:07:29 +00:00
Ted John
71f83cd7a7 Dissociate rct_news_item from RCT2 2017-01-17 12:51:02 +00:00
Ted John
8fb55a1f06 Move scores.dat structs to rct2.h 2017-01-17 12:21:57 +00:00
Ted John
6daf6c567a Convert tabs to spaces for rct2.h 2017-01-17 12:08:54 +00:00
Michael Steenbeek
6016339773 Fix two usages of raw RIDE4 flag usages, rename one, add comment
#5065
2017-01-17 12:00:47 +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
Marijn van der Werf
24f9a0c0ef Fix #5081: Crash on fetching server list 2017-01-16 14:29:49 +00:00
Ted John
0da434bb8a Fix tall ride consideration
The consideration of tall rides was probably not working properly as it was doing a straight comparrison of a flags variable.
This instead removes it as it already checks if the ride has ratings anyway. I've also added a status check so that guests do not attempt to walk to a ride far away that isn't open.
2017-01-16 14:30:54 +01:00
wolfreak99
3e621d75f6 Check finance_payment for int overflows 2017-01-16 14:29:03 +01:00
Broxzier
2235390ce2 Fix 5079 don't remove walls when building stalls and footpaths 2017-01-16 14:28:16 +01:00
Ted John
7edf1e8b7f Merge pull request #4936 from Broxzier/short
Because of a comment on a diff in #4878 asking for clearer and more consistent type usage. What this PR changes:

No unsigned long long found
(signed) long long -> sint64
unsigned int -> uint32
(signed) int -> sint32
(signed) long -> sint32
unsigned short -> uint16
(signed) short -> sint16
unsigned char -> uint8
No signed chars found
plain char is implementation-defined, so I left those in.
2017-01-14 23:41:47 +00:00
Ted John
0d51bdde3f Fix broken code alignment 2017-01-14 23:40:46 +00:00
Ted John
fe389be7c9 Remove unused ride entry flags 2017-01-14 17:37:15 +00:00
Ted John
8f57e514fe Name more ride entry flags 2017-01-14 17:36:47 +00:00
Ted John
769d86e7cc Refactor vehicle_update_boat_location 2017-01-14 17:36:32 +00:00
Ted John
f4cea0e6c8 Name a couple of ride entry flags and format enum 2017-01-14 16:48:56 +00:00
Broxzier
b80b71cf81 Fixed typos and warnings after rebase 2017-01-14 14:31:06 +01:00
Broxzier
2bf1b4cd2f Fox linux builds (hopefully) 2017-01-14 12:37:34 +01:00
Broxzier
a26eac91ef Use typedef for diagnostic levels, small refactor 2017-01-14 12:37:33 +01:00
Broxzier
d857ebb2ad Move type definitions before the first include
This way the last remaining uses of int could be replaced with sint32 as
well. Before this change there was a circular dependancy which made the
types unknown in diagnostic.h.
2017-01-14 12:37:32 +01:00
Broxzier
60603ae10a Use types from common.h 2017-01-14 12:37:31 +01:00
Michał Janiszewski
d88635307f Merge pull request #5062 from janisozaur/cmake-warnings
More warnings for CMake
2017-01-13 19:46:30 +01:00
Ted John
baed215984 Add helper: ride_has_ratings
#5066
2017-01-13 18:14:38 +00:00
Ted John
aed5c0aa60 Name flag: RIDE_TYPE_FLAG_26 2017-01-13 13:20:16 +00:00
Ted John
ae7048b2a7 Name flag: RIDE_TYPE_FLAG_30 2017-01-13 13:16:51 +00:00
Ted John
053f8a70bf Name flag: RIDE_TYPE_FLAG_18 2017-01-13 13:13:24 +00:00
Ted John
cf0c489d40 Name flag: RIDE_TYPE_FLAG_13 2017-01-13 13:08:56 +00:00
Ted John
bdc5078003 Name flag: RIDE_TYPE_FLAG_6 2017-01-13 13:04:11 +00:00
Ted John
ef2ddbf462 Name flag: RIDE_TYPE_FLAG_20 2017-01-13 12:55:47 +00:00
Michał Janiszewski
09ecf0b73c Fix possible null dereferences 2017-01-13 12:35:26 +01:00
Michał Janiszewski
0a36af19e4 Mark classes as final to help devirtualisation 2017-01-13 12:12:50 +01:00
Michał Janiszewski
411d1fff18 Make GCC suggest final, override keywords 2017-01-13 11:44:14 +01:00
Michał Janiszewski
33dcb1a506 Rename types to avoid shadowing 2017-01-13 10:57:00 +01:00
Michał Janiszewski
ecf77e3609 Remove redundant declarations 2017-01-13 10:02:17 +01:00
Michał Janiszewski
cf670deb10 Add -Wshadow to CMakeLists and fix offenders 2017-01-13 10:02:17 +01:00
Michael Steenbeek
2a435bfdae Use constants for block brakes and some other elements 2017-01-13 09:49:29 +01:00
Ted John
7875fd1f3a Ensure object list pointer is updated after realloc
Also update changelog for fix to #4944.
2017-01-12 22:20:27 +00:00
Ted John
4090522901 Fix #4944: Game crashes upon selecting objects in scenario editor
When the filter caused no results to be shown in the list, it would try to realloc for 0 bytes which returns NULL. The error shown in the console was a minor bug, the more serious issue was the the original memory was freed but the list pointer not updated. Instead just check for 0 items, dispose the list and return.
2017-01-12 22:12:21 +00:00
Ted John
d70cd3775e Fix silent warnings 2017-01-12 18:40:49 +00:00
Ted John
ab4bb3101c Use static inline 2017-01-12 18:29:29 +00:00
Ted John
1bf7a0ffdb Fix Win32 warnings 2017-01-12 18:28:51 +00:00
Ted John
868bb54383 Fix remaining warnings 2017-01-12 18:20:22 +00:00
Ted John
b79af110c7 Fix more warnings 2017-01-12 18:02:28 +00:00
Ted John
50d0d69815 Fix name warnings for NetworkPacket 2017-01-12 17:45:48 +00:00
Ted John
18597bacb1 Fix more warnings 2017-01-12 17:36:05 +00:00
Ted John
ec07d61d7b Fix name warnings for Network 2017-01-12 13:26:12 +00:00
Ted John
d2cf97d0a1 Fix name warnings for NetworkPlayer 2017-01-12 13:23:16 +00:00
Ted John
3a9b6f4bb0 Fix more warnings 2017-01-12 13:16:00 +00:00
Ted John
13a8eee1b4 More warning fixes, more warnings disabled 2017-01-12 13:12:53 +00:00
Ted John
ca9c3cc5ee Fix more warnings, disable others 2017-01-12 13:00:12 +00:00
Ted John
bd732b99c7 Fix cast warnings 2017-01-12 12:41:47 +00:00
Ted John
e67d8b4122 Use inline instead of static for header C functions 2017-01-12 12:28:19 +00:00
Michał Janiszewski
171d973e55 Initialise fields of MemoryStream in header
This makes all the constructors use these defaulted values
2017-01-12 09:58:57 +01:00
Ferdinand Thiessen
afbe1dda0f Fix 'No real prototype' warnings 2017-01-12 09:52:44 +01:00
LRFLEW
47c532d020 Don't zoom to cursor for keyboard or toolbar inputs (#5028) 2017-01-11 17:43:11 -06:00
Michael Steenbeek
e3cf32342b Use constant for random colour 2017-01-11 23:00:28 +01:00
Gymnasiast
7767f506be Fix balloon stall 2017-01-11 22:59:45 +01:00
Michael Steenbeek
92feea1612 Clean up metal supports 2017-01-11 20:23:47 +01:00
Ted John
e6dc4f179d Fix Debug | Win32 (RCT2) builds for VS 2017-01-11 18:33:08 +00:00
Marijn van der Werf
b8bb3924a7 Fix cheat window colours (#5041) 2017-01-11 00:39:52 +01:00
wolfreak99
0316decb6b Update network version for Add/set money commands (#5042) 2017-01-11 00:35:22 +01:00
wolfreak99
8932f61a67 Add cheats to set/add money by custom amounts 2017-01-10 23:43:42 +01:00
Ted John
f94daa08df Merge pull request #5027 from IntelOrca/refactor/vs-static-lib
This merge does several things:
* Changes all the code to be built as a static library, `libopenrct2.lib`
* Adds two new projects to produce `openrct2.dll` and `openrct2.exe`
* Adds a build step to create `openrct2.com`

This is to remove the test configurations and make building the test projects quicker and simpler.
It also distributes two very small shims, `openrct2.exe` and `openrct2.com` which are a GUI windows app and console app respectively. This simplifies the experience of using openrct2 on the command line as .com has higher precedence. `--console` is therefore no longer necessary.

`libopenrct2.lib` will probably be the beginning of several static libraries which make up the game as we will split up the UI from the core logic and possibly more.
2017-01-10 22:23:33 +00:00
Ted John
191c4ab998 Fix mingw build 2017-01-10 17:58:04 +00:00
Ted John
21bb7b9da6 Add back main entry point for mingw 2017-01-10 17:29:55 +00:00
Ted John
d535e290d3 Remove --console CLI switch 2017-01-10 17:29:52 +00:00
Ted John
b7b58817bb Rename openrct2-lib to libopenrct2 2017-01-10 17:29:03 +00:00
Ted John
7d6ea1f5cd Create DLL for openrct2 with win as a wrapper 2017-01-10 17:29:03 +00:00
Ted John
73b21b5880 Convert openrct2 to static library 2017-01-10 17:29:02 +00:00
Christian F. Coors
06d1d2116f Remove unnecessary code 2017-01-10 12:44:30 +01:00
Christian F. Coors
e0a6955924 Remove openssl dependency when building without network support 2017-01-10 12:44:30 +01:00
X123M3-256
7c7b67f665 Do not deselect boosters after building one, fixes #4975 2017-01-09 22:51:16 +01:00
Michael Steenbeek
1c2458b6dd Combine drawing of the Spiral and Mini RC (#5025) 2017-01-09 22:09:33 +01:00
Michael Steenbeek
4f61cae8a8 Merge pull request #4997 from zaxcav/restrictBacktrack
Restrict backtracking during peep pathfinding
2017-01-09 21:55:23 +01:00
wolfreak99
bdc34b608d Make tile inspector selector draggable 2017-01-09 19:30:42 +00:00
Ted John
acba8ee63f Fix code style 2017-01-08 23:51:22 +00:00
Gymnasiast
9521911719 Import money effect 2017-01-08 23:35:30 +00:00
Gymnasiast
8c1926e41c Import jumping fountain water 2017-01-08 23:35:30 +00:00
Gymnasiast
5a51f28ba0 Fix balloons, import balloons, ducks and steam particles 2017-01-08 23:35:29 +00:00
Gymnasiast
70f6f638ca Fix negative queue lengths, fix guests thoughts, import litter, import more fields, fix monorail, fix chairlift crashes 2017-01-08 23:35:26 +00:00
Ted John
9c11b051ee Add some max constants for RCT1 2017-01-08 23:34:49 +00:00
Ted John
3037e6fb59 Merge pull request #5013 from IntelOrca/refactor/imageio
Refactor image_io
2017-01-08 22:30:58 +00:00
duncanspumpkin
ac5b0b0cf5 Rename sprite list vehicle to train to reflect true use
This was found during the rct1 vehicle import branch. When importing it would load all vehicles into this list only to find that each car was treated as a seperate train.
2017-01-07 16:59:46 +00:00
Michał Janiszewski
1a2227289a Limit vehicle search to valid ones only 2017-01-07 14:54:30 +00:00
Ted John
4680aeab9b Use FileStream instead of SDL2 2017-01-07 12:23:59 +00:00
Ted John
a21cbae82a Move image_io to C++ 2017-01-07 12:10:42 +00:00
Michał Janiszewski
3f8f513a47 Verify access to RCT1 fields 2017-01-07 11:19:04 +00:00
Ted John
44d9464d6b Merge pull request #4995 from IntelOrca/refactor/track-design-repository-stdstring
Refactor track design repository to use std::string
2017-01-06 21:48:37 +00:00
Ted John
e7a7704efb Fix RCT1 (original) imported parks having no ride music 2017-01-06 21:48:27 +00:00
zaxcav
9772c34cee Update debugging messages to reflect changes in how pathfind_history[].direction is updated. 2017-01-06 12:26:23 +01:00
Michał Janiszewski
bd140e78fb Compile fixes for MinGW (#4998)
* Fix mismatched condition in CMakeLists.txt

* Fix MinGW release builds
2017-01-06 07:04:25 +01:00
zaxcav
64a2d105e5 Reword comments with "from from". 2017-01-05 21:43:57 +01:00
Ted John
038ea82777 Fix #4996: Objects unloaded after loading landscape 2017-01-05 19:55:36 +00:00
zaxcav
78715fa1c0 Increment network version 2017-01-05 20:46:14 +01:00
Ted John
60cb84fd9d Handle nullptr for object when getting track designs 2017-01-05 18:19:20 +00:00
Ted John
e1ace9528d Use std::string for File and FileScanner 2017-01-05 18:19:01 +00:00
Ted John
11477c5869 Refactor more of TrackDesignRepository to std::string 2017-01-05 17:51:31 +00:00
zaxcav
f98b8e9de9 Restrict peep backtracking further via pathfind_history[i].direction
Dependent on the path layout it is possible for peeps to get stuck in backtracking cycles between two or more path tiles - each such tile is a turn around point because from that tile, the reachable tile on the search boundary that is closest to the peep destination is in the direction the peep came from.

When storing/updating the pathfind_histroy, remove the direction the peep came from (in addition to the chosen direction) from the directions left to try to prevent such backtracking.
2017-01-05 17:45:18 +01:00
Ted John
be035dcdb2 Refactor various methods to use std::string 2017-01-05 13:13:22 +00:00
Ted John
f201a8b43a Refactor TrackDesignRepository.cpp 2017-01-05 12:55:41 +00:00
Ted John
4fbecc2f60 Replace magic numbers with constant SPRITE_INDEX_NULL 2017-01-05 12:49:42 +00:00
Michael Steenbeek
2b35986746 Add and use constant for number of ride types 2017-01-05 09:19:22 +01:00
Michał Janiszewski
6684851115 Fix MinGW builds 2017-01-04 18:28:39 +00:00
Ted John
a2e3f10ca1 Update VS project files 2017-01-04 18:28:37 +00:00
Ted John
25bc798ff8 Move contents of src into project sub directory 2017-01-04 17:44:12 +00:00