Commit Graph

10656 Commits

Author SHA1 Message Date
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
Ted John 41d1793355 Update changelog
[ci skip]
2017-01-22 21:35:44 +00:00
Michał Janiszewski da6fac62f1 Merge PR #4673 from zaxcav/paintClip: cut-away view
cut-away view
2017-01-22 21:31:22 +01: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
Marijn van der Werf d17c435c0e Update Xcode project 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 5155540b54 Remove calls to colour_scheme_update
Theses are causing segfaults.

Presumably the window is not set up correctly for this.

Window now actually opens.
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 0284667cc8 View Clipping UI
Missing file in previous commit

NOT INTENDED FOR MERGING
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 e952c607cc Add definition of gClipHeight to compat.c 2017-01-22 20:41:34 +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
Matthias Mailänder 91499e0942 Add a user friendly link for the OBS package. (#5102) 2017-01-22 14:49:22 +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
LRFLEW c70c1be3c1 Update Xcode Project 2017-01-21 19:09:03 -06: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
OpenRCT2 git bot 4b0f45a740 Merge Localisation/master into OpenRCT2/develop. 2017-01-21 04:00:20 +00:00
Lastorder 97063010d7 Update installer version to 0.0.6
Installer version was still 0.0.5.
#5095
2017-01-21 01:51:35 +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