mirror of https://github.com/OpenRCT2/OpenRCT2.git
Use return value of paint funcs. Fix issue with support function
This commit is contained in:
parent
c9883ef5be
commit
3b8a0c56e1
|
@ -298,7 +298,7 @@ paint_struct * sub_98196C(
|
||||||
RCT2_GLOBAL(0x00F1AD10, uint32) = edi;
|
RCT2_GLOBAL(0x00F1AD10, uint32) = edi;
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT2_GLOBAL(0xEE7888, uint32) += 0x34;
|
RCT2_GLOBAL(0xEE7888, paint_struct*) ++;
|
||||||
|
|
||||||
return ps;
|
return ps;
|
||||||
}
|
}
|
||||||
|
@ -469,7 +469,7 @@ paint_struct * sub_98199C(
|
||||||
z_offset,
|
z_offset,
|
||||||
bound_box_offset_x, bound_box_offset_y, bound_box_offset_z,
|
bound_box_offset_x, bound_box_offset_y, bound_box_offset_z,
|
||||||
rotation
|
rotation
|
||||||
) == 1;
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
rct_xyz16 offset = {.x = x_offset, .y = y_offset, .z = z_offset};
|
rct_xyz16 offset = {.x = x_offset, .y = y_offset, .z = z_offset};
|
||||||
|
@ -596,7 +596,7 @@ void sub_685EBC(money32 amount, uint16 string_id, sint16 y, sint16 z, sint8 y_of
|
||||||
ps->x = coord.x + offset_x;
|
ps->x = coord.x + offset_x;
|
||||||
ps->y = coord.y;
|
ps->y = coord.y;
|
||||||
|
|
||||||
RCT2_GLOBAL(0xEE7888, uint32) += 0x1E;
|
RCT2_GLOBAL(0xEE7888, paint_string_struct*)++;
|
||||||
|
|
||||||
paint_string_struct * oldPs = RCT2_GLOBAL(0xF1AD24, paint_string_struct*);
|
paint_string_struct * oldPs = RCT2_GLOBAL(0xF1AD24, paint_string_struct*);
|
||||||
|
|
||||||
|
|
|
@ -295,9 +295,10 @@ bool wooden_a_supports_paint_setup(int supportType, int special, int height, uin
|
||||||
hasSupports = true;
|
hasSupports = true;
|
||||||
} else {
|
} else {
|
||||||
hasSupports = true;
|
hasSupports = true;
|
||||||
if (sub_98198C(imageId, 0, 0, bBox.length.x, bBox.length.y, bBox.length.z, z, bBox.offset.x, bBox.offset.y, bBox.offset.z + z, rotation)) {
|
paint_struct* ps = sub_98198C(imageId, 0, 0, bBox.length.x, bBox.length.y, bBox.length.z, z, bBox.offset.x, bBox.offset.y, bBox.offset.z + z, rotation);
|
||||||
int edi = RCT2_GLOBAL(0x009DEA58, uint32);
|
if (ps != NULL) {
|
||||||
RCT2_GLOBAL(edi + 0x20, uint32) = imageColourFlags;
|
paint_struct* edi = RCT2_GLOBAL(0x009DEA58, paint_struct*);
|
||||||
|
edi->var_20 = ps;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,14 +43,15 @@ void vehicle_visual_observation_tower(int x, int imageDirection, int y, int z, r
|
||||||
}
|
}
|
||||||
|
|
||||||
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
||||||
if (sub_98197C(image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1, get_current_rotation())) {
|
paint_struct* ps = sub_98197C(image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1, get_current_rotation());
|
||||||
paint_struct* ps = RCT2_GLOBAL(0xEE7888, paint_struct*) - 1; // sub_98197C increments this but need original
|
if (ps != NULL) {
|
||||||
ps->tertiary_colour = vehicle->colours_extended;
|
ps->tertiary_colour = vehicle->colours_extended;
|
||||||
}
|
}
|
||||||
|
|
||||||
image_id++;
|
image_id++;
|
||||||
if (sub_98197C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, get_current_rotation())) {
|
|
||||||
paint_struct* ps = RCT2_GLOBAL(0xEE7888, paint_struct*) - 1; // sub_98197C increments this but need original
|
ps = sub_98197C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, get_current_rotation());
|
||||||
|
if (ps != NULL) {
|
||||||
ps->tertiary_colour = vehicle->colours_extended;
|
ps->tertiary_colour = vehicle->colours_extended;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -900,8 +900,8 @@ void vehicle_sprite_paint(rct_vehicle *vehicle, int ebx, int ecx, int z, const r
|
||||||
baseImage_id += vehicle->var_C5;
|
baseImage_id += vehicle->var_C5;
|
||||||
}
|
}
|
||||||
int image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
int image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
||||||
if (sub_98197C(image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z, get_current_rotation())) {
|
paint_struct* ps = sub_98197C(image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z, get_current_rotation());
|
||||||
paint_struct* ps = RCT2_GLOBAL(0xEE7888, paint_struct*) - 1; // sub_98197C increments this but need original
|
if (ps != NULL) {
|
||||||
ps->tertiary_colour = vehicle->colours_extended;
|
ps->tertiary_colour = vehicle->colours_extended;
|
||||||
}
|
}
|
||||||
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
|
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
|
||||||
|
|
|
@ -51,14 +51,14 @@ void vehicle_visual_submarine(int x, int imageDirection, int y, int z, rct_vehic
|
||||||
vehicle_boundbox bb = VehicleBoundboxes[vehicleEntry->draw_order][imageDirection / 2];
|
vehicle_boundbox bb = VehicleBoundboxes[vehicleEntry->draw_order][imageDirection / 2];
|
||||||
|
|
||||||
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
||||||
if (sub_98197C(image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z, get_current_rotation())) {
|
paint_struct* ps = sub_98197C(image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z, get_current_rotation());
|
||||||
paint_struct* ps = RCT2_GLOBAL(0xEE7888, paint_struct*) - 1; // sub_98197C increments this but need original
|
if (ps != NULL) {
|
||||||
ps->tertiary_colour = vehicle->colours_extended;
|
ps->tertiary_colour = vehicle->colours_extended;
|
||||||
}
|
}
|
||||||
|
|
||||||
image_id = (baseImage_id + 1) | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
image_id = (baseImage_id + 1) | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
||||||
if (sub_98197C(image_id, 0, 0, bb.length_x, bb.length_y, 2, z, bb.offset_x, bb.offset_y, bb.offset_z + z - 10, get_current_rotation())) {
|
ps = sub_98197C(image_id, 0, 0, bb.length_x, bb.length_y, 2, z, bb.offset_x, bb.offset_y, bb.offset_z + z - 10, get_current_rotation());
|
||||||
paint_struct* ps = RCT2_GLOBAL(0xEE7888, paint_struct*) - 1; // sub_98197C increments this but need original
|
if (ps != NULL) {
|
||||||
ps->tertiary_colour = vehicle->colours_extended;
|
ps->tertiary_colour = vehicle->colours_extended;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue