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.
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.
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.
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.
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