mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
(Partially) implement gCurrentViewportFlags
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include "window.h"
|
||||
|
||||
//#define DEBUG_SHOW_DIRTY_BOX
|
||||
uint16 gCurrentViewportFlags = 0;
|
||||
|
||||
rct_viewport g_viewport_list[MAX_VIEWPORT_COUNT];
|
||||
rct_viewport *g_music_tracking_viewport;
|
||||
@@ -675,6 +676,10 @@ void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, int left, i
|
||||
*/
|
||||
void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, int left, int top, int right, int bottom){
|
||||
gCurrentViewportFlags = viewport->flags;
|
||||
//This should still be updated until the rest of supports, etc, is reverse-engineered. Otherwise
|
||||
// Wooden Coaster supports (and a few other coaster supports) will still appear even if "invisible supports"
|
||||
// are enabled.
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_VIEWPORT_FLAGS, uint16) = viewport->flags;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_ZOOM, uint16) = viewport->zoom;
|
||||
|
||||
uint16 width = right - left;
|
||||
|
||||
@@ -92,7 +92,7 @@ typedef struct viewport_interaction_info {
|
||||
#define gSavedViewZoom RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_ZOOM, uint8)
|
||||
#define gSavedViewRotation RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_ROTATION, uint8)
|
||||
#define gCurrentRotation RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8)
|
||||
#define gCurrentViewportFlags RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_VIEWPORT_FLAGS, uint16)
|
||||
extern uint16 gCurrentViewportFlags;
|
||||
|
||||
// rct2: 0x014234BC
|
||||
extern rct_viewport g_viewport_list[MAX_VIEWPORT_COUNT];
|
||||
|
||||
Reference in New Issue
Block a user