1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

Partially integrate data at 0x9DE574

This commit is contained in:
Marijn van der Werf
2016-09-12 13:00:04 +02:00
parent 2232f63973
commit 9b3470be3b
3 changed files with 11 additions and 8 deletions

View File

@@ -34,6 +34,7 @@
#include "../supports.h"
#ifdef NO_RCT2
rct_xy16 gPaintMapPosition;
bool gDidPassSurface;
rct_map_element * gSurfaceElement;
tunnel_entry gLeftTunnels[65];
@@ -153,8 +154,8 @@ static void sub_68B3FB(int x, int y)
RCT2_GLOBAL(0x9DE56A, uint16_t) = x;
RCT2_GLOBAL(0x9DE56E, uint16_t) = y;
RCT2_GLOBAL(0x9DE574, uint16_t) = x;
RCT2_GLOBAL(0x9DE576, uint16_t) = y;
gPaintMapPosition.x = x;
gPaintMapPosition.y = y;
rct_map_element* map_element = map_get_first_element_at(x >> 5, y >> 5);
uint8 rotation = get_current_rotation();
@@ -235,7 +236,7 @@ static void sub_68B3FB(int x, int y)
int direction = (map_element->type + rotation) & MAP_ELEMENT_DIRECTION_MASK;
int height = map_element->base_height * 8;
uint32_t dword_9DE574 = RCT2_GLOBAL(0x9DE574, uint32_t);
rct_xy16 dword_9DE574 = gPaintMapPosition;
g_currently_drawn_item = map_element;
//setup the painting of for example: the underground, signs, rides, scenery, etc.
switch (map_element_get_type(map_element))
@@ -274,7 +275,7 @@ static void sub_68B3FB(int x, int y)
// An undefined map element is most likely a corrupt element inserted by 8 cars' MOM feature to skip drawing of all elements after it.
return;
}
RCT2_GLOBAL(0x9DE574, uint32_t) = dword_9DE574;
gPaintMapPosition = dword_9DE574;
} while (!map_element_is_last_for_tile(map_element++));
if (!gShowSupportSegmentHeights) {

View File

@@ -68,6 +68,7 @@ typedef struct tunnel_entry {
} tunnel_entry;
#ifdef NO_RCT2
extern rct_xy16 gPaintMapPosition;
extern bool gDidPassSurface;
extern rct_map_element * gSurfaceElement;
extern tunnel_entry gLeftTunnels[65];
@@ -76,6 +77,7 @@ extern tunnel_entry gRightTunnels[65];
extern uint8 gRightTunnelCount;
extern uint8 gVerticalTunnelHeight;
#else
#define gPaintMapPosition RCT2_GLOBAL(0x009DE574, rct_xy16)
#define gDidPassSurface RCT2_GLOBAL(0x009DE57C, bool)
#define gSurfaceElement RCT2_GLOBAL(0x009E3250, rct_map_element *)
#define gLeftTunnels RCT2_ADDRESS(0x009E3138, tunnel_entry)

View File

@@ -167,8 +167,8 @@ static paint_struct * sub_9819_c(uint32 image_id, rct_xyz16 offset, rct_xyz16 bo
ps->var_20 = NULL;
ps->sprite_type = gPaintInteractionType;
ps->var_29 = RCT2_GLOBAL(0x9DE571, uint8);
ps->map_x = RCT2_GLOBAL(0x9DE574, uint16);
ps->map_y = RCT2_GLOBAL(0x9DE576, uint16);
ps->map_x = gPaintMapPosition.x;
ps->map_y = gPaintMapPosition.y;
ps->mapElement = g_currently_drawn_item;
return ps;
@@ -288,8 +288,8 @@ paint_struct * sub_98196C(
ps->var_20 = NULL;
ps->sprite_type = gPaintInteractionType;
ps->var_29 = RCT2_GLOBAL(0x9DE571, uint8);
ps->map_x = RCT2_GLOBAL(0x9DE574, uint16);
ps->map_y = RCT2_GLOBAL(0x9DE576, uint16);
ps->map_x = gPaintMapPosition.x;
ps->map_y = gPaintMapPosition.y;
ps->mapElement = g_currently_drawn_item;
g_ps_F1AD28 = ps;