mirror of https://github.com/OpenRCT2/OpenRCT2.git
Conditionally integrate gUnk9DE568 and gUnk9DE56C
This commit is contained in:
parent
b43ff24c3e
commit
0f8cd56c1a
|
@ -130,8 +130,8 @@ static void blank_tiles_paint(int x, int y)
|
|||
dx -= 20;
|
||||
dx -= dpi->height;
|
||||
if (dx >= dpi->y) return;
|
||||
RCT2_GLOBAL(0x9DE568, sint16) = x;
|
||||
RCT2_GLOBAL(0x9DE56C, sint16) = y;
|
||||
gUnk9DE568 = x;
|
||||
gUnk9DE56C = y;
|
||||
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
sub_98196C(3123, 0, 0, 32, 32, -1, 16, get_current_rotation());
|
||||
}
|
||||
|
@ -198,8 +198,8 @@ static void sub_68B3FB(int x, int y)
|
|||
0x20900C27;
|
||||
int arrowZ = gMapSelectArrowPosition.z;
|
||||
|
||||
RCT2_GLOBAL(0x9DE568, sint16) = x;
|
||||
RCT2_GLOBAL(0x9DE56C, sint16) = y;
|
||||
gUnk9DE568 = x;
|
||||
gUnk9DE56C = y;
|
||||
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
sub_98197C(imageId, 0, 0, 32, 32, 0xFF, arrowZ, 0, 0, arrowZ + 18, rotation);
|
||||
|
@ -232,8 +232,8 @@ static void sub_68B3FB(int x, int y)
|
|||
if (dx >= dpi->y)
|
||||
return;
|
||||
|
||||
RCT2_GLOBAL(0x9DE568, sint16) = x;
|
||||
RCT2_GLOBAL(0x9DE56C, sint16) = y;
|
||||
gUnk9DE568 = x;
|
||||
gUnk9DE56C = y;
|
||||
gDidPassSurface = false;
|
||||
do {
|
||||
int direction = (map_element->type + rotation) & MAP_ELEMENT_DIRECTION_MASK;
|
||||
|
|
|
@ -205,8 +205,8 @@ void scenery_paint(uint8 direction, int height, rct_map_element* mapElement) {
|
|||
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG15) {
|
||||
// 6E02F6:
|
||||
int image_id = gCurrentTicks;
|
||||
image_id += RCT2_GLOBAL(0x009DE568, sint16) / 4;
|
||||
image_id += RCT2_GLOBAL(0x009DE56C, sint16) / 4;
|
||||
image_id += gUnk9DE568 / 4;
|
||||
image_id += gUnk9DE56C / 4;
|
||||
image_id = (image_id / 4) & 15;
|
||||
image_id += entry->image;
|
||||
if (dword_F64EB0 != 0) {
|
||||
|
@ -220,7 +220,7 @@ void scenery_paint(uint8 direction, int height, rct_map_element* mapElement) {
|
|||
int esi = gCurrentTicks;
|
||||
if (!(entry->small_scenery.flags & SMALL_SCENERY_FLAG22)) {
|
||||
// 6E01F8:
|
||||
esi += ((RCT2_GLOBAL(0x9DE568, sint16) / 4) + (RCT2_GLOBAL(0x9DE56C, sint16) / 4));
|
||||
esi += ((gUnk9DE568 / 4) + (gUnk9DE56C / 4));
|
||||
esi += (mapElement->type & 0xC0) / 16;
|
||||
}
|
||||
// 6E0222:
|
||||
|
|
|
@ -974,8 +974,8 @@ void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement)
|
|||
uint32 surfaceShape = viewport_surface_paint_setup_get_relative_slope(mapElement, rotation);
|
||||
|
||||
rct_xy16 base = {
|
||||
.x = RCT2_GLOBAL(0x9DE568, sint16),
|
||||
.y = RCT2_GLOBAL(0x9DE56C, sint16)
|
||||
.x = gUnk9DE568,
|
||||
.y = gUnk9DE56C
|
||||
};
|
||||
|
||||
corner_height ch = corner_heights[surfaceShape];
|
||||
|
|
|
@ -111,8 +111,8 @@ static paint_struct * sub_9819_c(uint32 image_id, rct_xyz16 offset, rct_xyz16 bo
|
|||
rotate_map_coordinates(&offset.x, &offset.y, 1);
|
||||
break;
|
||||
}
|
||||
offset.x += RCT2_GLOBAL(0x9DE568, sint16);
|
||||
offset.y += RCT2_GLOBAL(0x9DE56C, sint16);
|
||||
offset.x += gUnk9DE568;
|
||||
offset.y += gUnk9DE56C;
|
||||
|
||||
rct_xy16 map = coordinate_3d_to_2d(&offset, rotation);
|
||||
|
||||
|
@ -157,13 +157,13 @@ static paint_struct * sub_9819_c(uint32 image_id, rct_xyz16 offset, rct_xyz16 bo
|
|||
break;
|
||||
}
|
||||
|
||||
ps->bound_box_x_end = boundBoxSize.x + boundBoxOffset.x + RCT2_GLOBAL(0x9DE568, sint16);
|
||||
ps->bound_box_x_end = boundBoxSize.x + boundBoxOffset.x + gUnk9DE568;
|
||||
ps->bound_box_z = boundBoxOffset.z;
|
||||
ps->bound_box_z_end = boundBoxOffset.z + boundBoxSize.z;
|
||||
ps->bound_box_y_end = boundBoxSize.y + boundBoxOffset.y + RCT2_GLOBAL(0x009DE56C, sint16);
|
||||
ps->bound_box_y_end = boundBoxSize.y + boundBoxOffset.y + gUnk9DE56C;
|
||||
ps->flags = 0;
|
||||
ps->bound_box_x = boundBoxOffset.x + RCT2_GLOBAL(0x9DE568, sint16);
|
||||
ps->bound_box_y = boundBoxOffset.y + RCT2_GLOBAL(0x009DE56C, sint16);
|
||||
ps->bound_box_x = boundBoxOffset.x + gUnk9DE568;
|
||||
ps->bound_box_y = boundBoxOffset.y + gUnk9DE56C;
|
||||
ps->attached_ps = NULL;
|
||||
ps->var_20 = NULL;
|
||||
ps->sprite_type = gPaintInteractionType;
|
||||
|
@ -254,8 +254,8 @@ paint_struct * sub_98196C(
|
|||
break;
|
||||
}
|
||||
|
||||
coord_3d.x += RCT2_GLOBAL(0x9DE568, sint16);
|
||||
coord_3d.y += RCT2_GLOBAL(0x9DE56C, sint16);
|
||||
coord_3d.x += gUnk9DE568;
|
||||
coord_3d.y += gUnk9DE56C;
|
||||
|
||||
ps->bound_box_x_end = coord_3d.x + boundBox.x;
|
||||
ps->bound_box_y_end = coord_3d.y + boundBox.y;
|
||||
|
@ -625,7 +625,7 @@ void sub_685EBC(money32 amount, rct_string_id string_id, sint16 y, sint16 z, sin
|
|||
ps->args[3] = 0;
|
||||
ps->y_offsets = (uint8 *) y_offsets;
|
||||
|
||||
rct_xyz16 position = {.x = RCT2_GLOBAL(0x9DE568, sint16), .y = RCT2_GLOBAL(0x9DE56C, sint16), .z = z};
|
||||
rct_xyz16 position = {.x = gUnk9DE568, .y = gUnk9DE56C, .z = z};
|
||||
rct_xy16 coord = coordinate_3d_to_2d(&position, rotation);
|
||||
|
||||
ps->x = coord.x + offset_x;
|
||||
|
|
|
@ -30,11 +30,15 @@ struct paint_struct;
|
|||
typedef struct paint_struct paint_struct;
|
||||
|
||||
#ifdef NO_RCT2
|
||||
extern void *g_currently_drawn_item;
|
||||
extern paint_struct * g_ps_EE7880;
|
||||
extern void *g_currently_drawn_item;
|
||||
extern paint_struct * g_ps_EE7880;
|
||||
extern sint16 gUnk9DE568;
|
||||
extern sint16 gUnk9DE56C;
|
||||
#else
|
||||
#define g_currently_drawn_item RCT2_GLOBAL(0x9DE578, void*)
|
||||
#define g_ps_EE7880 RCT2_GLOBAL(0xEE7880, paint_struct *)
|
||||
#define g_currently_drawn_item RCT2_GLOBAL(0x009DE578, void*)
|
||||
#define g_ps_EE7880 RCT2_GLOBAL(0x00EE7880, paint_struct *)
|
||||
#define gUnk9DE568 RCT2_GLOBAL(0x009DE568, sint16)
|
||||
#define gUnk9DE56C RCT2_GLOBAL(0x009DE56C, sint16)
|
||||
#endif
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
|
|
@ -60,9 +60,9 @@ void sprite_paint_setup(const uint16 eax, const uint16 ecx) {
|
|||
|
||||
g_currently_drawn_item = spr;
|
||||
|
||||
RCT2_GLOBAL(0x9DE568, sint16) = spr->unknown.x;
|
||||
gUnk9DE568 = spr->unknown.x;
|
||||
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE;
|
||||
RCT2_GLOBAL(0x9DE56C, sint16) = spr->unknown.y;
|
||||
gUnk9DE56C = spr->unknown.y;
|
||||
|
||||
switch (spr->unknown.sprite_identifier) {
|
||||
case SPRITE_IDENTIFIER_VEHICLE:
|
||||
|
|
|
@ -32,7 +32,7 @@ void vehicle_visual_reverser(int x, int imageDirection, int y, int z, rct_vehicl
|
|||
x = (v1->x + v2->x) / 2;
|
||||
y = (v1->y + v2->y) / 2;
|
||||
z = (v1->z + v2->z) / 2;
|
||||
RCT2_GLOBAL(0x9DE568, sint16) = x;
|
||||
RCT2_GLOBAL(0x9DE56C, sint16) = y;
|
||||
gUnk9DE568 = x;
|
||||
gUnk9DE56C = y;
|
||||
vehicle_visual_default(x, imageDirection, y, z, vehicle, vehicleEntry);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ void vehicle_visual_splash_boats_or_water_coaster(int x, int imageDirection, int
|
|||
}
|
||||
g_currently_drawn_item = vehicle;
|
||||
imageDirection = ((get_current_rotation() * 8) + vehicle->sprite_direction) & 0x1F;
|
||||
RCT2_GLOBAL(0x9DE568, sint16) = vehicle->x;
|
||||
RCT2_GLOBAL(0x9DE56C, sint16) = vehicle->y;
|
||||
gUnk9DE568 = vehicle->x;
|
||||
gUnk9DE56C = vehicle->y;
|
||||
vehicle_paint(vehicle, imageDirection);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue