Move sub_98197C_rotated and sub_98199C_rotated to helpers source

Because paint.c can't be used by testpaint.
This commit is contained in:
Ted John 2016-09-18 13:43:43 +01:00
parent 9fe4a9b41f
commit fd4103d8f5
4 changed files with 50 additions and 30 deletions

View File

@ -151,6 +151,7 @@
<ClCompile Include="src\paint\map_element\scenery_multiple.c" />
<ClCompile Include="src\paint\map_element\surface.c" />
<ClCompile Include="src\paint\paint.c" />
<ClCompile Include="src\paint\paint_helpers.c" />
<ClCompile Include="src\paint\sprite\litter.c" />
<ClCompile Include="src\paint\sprite\misc.c" />
<ClCompile Include="src\paint\sprite\peep.c" />

View File

@ -524,36 +524,6 @@ paint_struct * sub_98199C(
return ps;
}
paint_struct * sub_98197C_rotated(
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,
sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z)
{
if (direction & 1) {
return sub_98197C(image_id, x_offset, y_offset, bound_box_length_y, bound_box_length_x, bound_box_length_z, z_offset, bound_box_offset_y, bound_box_offset_x, bound_box_offset_z, get_current_rotation());
} else {
return sub_98197C(image_id, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset, bound_box_offset_x, bound_box_offset_y, bound_box_offset_z, get_current_rotation());
}
}
paint_struct * sub_98199C_rotated(
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,
sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z)
{
if (direction & 1) {
return sub_98199C(image_id, x_offset, y_offset, bound_box_length_y, bound_box_length_x, bound_box_length_z, z_offset, bound_box_offset_y, bound_box_offset_x, bound_box_offset_z, get_current_rotation());
} else {
return sub_98199C(image_id, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset, bound_box_offset_x, bound_box_offset_y, bound_box_offset_z, get_current_rotation());
}
}
/**
* rct2: 0x006881D0
*

48
src/paint/paint_helpers.c Normal file
View File

@ -0,0 +1,48 @@
#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers
/*****************************************************************************
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
*
* OpenRCT2 is the work of many authors, a full list can be found in contributors.md
* For more information, visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* A full copy of the GNU General Public License can be found in licence.txt
*****************************************************************************/
#pragma endregion
#include "../interface/viewport.h"
#include "paint.h"
paint_struct * sub_98197C_rotated(
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,
sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z)
{
if (direction & 1) {
return sub_98197C(image_id, x_offset, y_offset, bound_box_length_y, bound_box_length_x, bound_box_length_z, z_offset, bound_box_offset_y, bound_box_offset_x, bound_box_offset_z, get_current_rotation());
} else {
return sub_98197C(image_id, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset, bound_box_offset_x, bound_box_offset_y, bound_box_offset_z, get_current_rotation());
}
}
paint_struct * sub_98199C_rotated(
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,
sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z)
{
if (direction & 1) {
return sub_98199C(image_id, x_offset, y_offset, bound_box_length_y, bound_box_length_x, bound_box_length_z, z_offset, bound_box_offset_y, bound_box_offset_x, bound_box_offset_z, get_current_rotation());
} else {
return sub_98199C(image_id, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset, bound_box_offset_x, bound_box_offset_y, bound_box_offset_z, get_current_rotation());
}
}

View File

@ -86,6 +86,7 @@
<ClInclude Include="intercept.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\paint\paint_helpers.c" />
<ClCompile Include="compat.c" />
<ClCompile Include="data.c" />
<ClCompile Include="intercept.c" />