Remove rotation argument from sub_98198C

This commit is contained in:
Michał Janiszewski 2018-02-12 23:01:54 +01:00 committed by Michał Janiszewski
parent 3f92471ffb
commit 5795810a85
3 changed files with 32 additions and 27 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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;