From 5795810a85f51e3d9bfae4a6b6f078d2145191e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 12 Feb 2018 23:01:54 +0100 Subject: [PATCH] Remove rotation argument from sub_98198C --- src/openrct2/paint/Paint.cpp | 19 +++++++++++-------- src/openrct2/paint/Paint.h | 13 ++++++++++++- src/openrct2/paint/Supports.cpp | 27 +++++++++------------------ 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index 9e204bc29e..980cff2dcf 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -973,17 +973,20 @@ paint_struct * sub_98197C( * @param bound_box_offset_x (0x009DEA52) * @param bound_box_offset_y (0x009DEA54) * @param bound_box_offset_z (0x009DEA56) -* @param rotation (ebp) * @return (ebp) paint_struct on success (CF == 0), nullptr on failure (CF == 1) */ paint_struct * sub_98198C( - paint_session * session, - uint32 image_id, - sint8 x_offset, sint8 y_offset, - sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z, - uint32 rotation) + paint_session * session, + uint32 image_id, + sint8 x_offset, + sint8 y_offset, + sint16 bound_box_length_x, + sint16 bound_box_length_y, + sint8 bound_box_length_z, + sint16 z_offset, + sint16 bound_box_offset_x, + sint16 bound_box_offset_y, + sint16 bound_box_offset_z) { assert((uint16)bound_box_length_x == bound_box_length_x); assert((uint16)bound_box_length_y == bound_box_length_y); diff --git a/src/openrct2/paint/Paint.h b/src/openrct2/paint/Paint.h index abf011ce59..d59a615399 100644 --- a/src/openrct2/paint/Paint.h +++ b/src/openrct2/paint/Paint.h @@ -197,7 +197,18 @@ paint_struct * sub_98197C( sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z); -paint_struct * sub_98198C(paint_session * session, uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, sint16 z_offset, sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z, uint32 rotation); +paint_struct * sub_98198C( + paint_session * session, + uint32 image_id, + sint8 x_offset, + sint8 y_offset, + sint16 bound_box_length_x, + sint16 bound_box_length_y, + sint8 bound_box_length_z, + sint16 z_offset, + sint16 bound_box_offset_x, + sint16 bound_box_offset_y, + sint16 bound_box_offset_z); paint_struct * sub_98199C(paint_session * session, uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, sint16 z_offset, sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z, uint32 rotation); paint_struct * sub_98196C_rotated(paint_session * session, uint8 direction, uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, sint16 z_offset); diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index ce761abaf3..e2d14d3bf1 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -369,7 +369,6 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, bool hasSupports = false; bool drawFlatPiece = false; - sint32 rotation = get_current_rotation(); // Draw base support (usually shaped to the slope) sint32 slope = session->Support.slope; @@ -468,7 +467,9 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, hasSupports = true; } else { hasSupports = true; - paint_struct* ps = sub_98198C(session, 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( + session, imageId, 0, 0, bBox.length.x, bBox.length.y, bBox.length.z, z, bBox.offset.x, bBox.offset.y, + bBox.offset.z + z); if (ps != nullptr) { paint_struct* edi = session->WoodenSupportsPrependTo; edi->var_20 = ps; @@ -610,14 +611,9 @@ bool wooden_b_supports_paint_setup(paint_session * session, sint32 supportType, baseHeight, boundBox.offset.x, boundBox.offset.y, boundBox.offset.z + baseHeight); _9E32B1 = true; } else { - paint_struct * paintStruct = sub_98198C(session, - imageId | imageColourFlags, - 0, 0, - boundBox.length.x, boundBox.length.y, boundBox.length.z, - baseHeight, - boundBox.offset.x, boundBox.offset.y, boundBox.offset.z + baseHeight, - get_current_rotation() - ); + paint_struct * paintStruct = sub_98198C( + session, imageId | imageColourFlags, 0, 0, boundBox.length.x, boundBox.length.y, boundBox.length.z, + baseHeight, boundBox.offset.x, boundBox.offset.y, boundBox.offset.z + baseHeight); _9E32B1 = true; if (paintStruct != nullptr) { session->WoodenSupportsPrependTo->var_20 = paintStruct; @@ -1084,14 +1080,9 @@ bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, si boundBox.offset.x, boundBox.offset.y, baseHeight + boundBox.offset.z); hasSupports = true; } else { - paint_struct * paintStruct = sub_98198C(session, - imageId | imageColourFlags, - 0, 0, - boundBox.length.y, boundBox.length.x, boundBox.length.z, - baseHeight, - boundBox.offset.x, boundBox.offset.y, baseHeight + boundBox.offset.z, - get_current_rotation() - ); + paint_struct * paintStruct = sub_98198C( + session, imageId | imageColourFlags, 0, 0, boundBox.length.y, boundBox.length.x, boundBox.length.z, baseHeight, + boundBox.offset.x, boundBox.offset.y, baseHeight + boundBox.offset.z); hasSupports = true; if (paintStruct != nullptr) { session->WoodenSupportsPrependTo->var_20 = paintStruct;