mirror of https://github.com/OpenRCT2/OpenRCT2.git
implement wooden_a_supports_paint_setup
This commit is contained in:
parent
0ec91d62b5
commit
96b9a4ed18
|
@ -45,6 +45,7 @@
|
|||
<ClCompile Include="..\src\drawing\scrolling_text.c" />
|
||||
<ClCompile Include="..\src\drawing\sprite.c" />
|
||||
<ClCompile Include="..\src\drawing\string.c" />
|
||||
<ClCompile Include="..\src\drawing\supports.c" />
|
||||
<ClCompile Include="..\src\editor.c" />
|
||||
<ClCompile Include="..\src\game.c" />
|
||||
<ClCompile Include="..\src\hook.c" />
|
||||
|
@ -212,6 +213,7 @@
|
|||
<ClInclude Include="..\src\diagnostic.h" />
|
||||
<ClInclude Include="..\src\drawing\drawing.h" />
|
||||
<ClInclude Include="..\src\drawing\font.h" />
|
||||
<ClInclude Include="..\src\drawing\supports.h" />
|
||||
<ClInclude Include="..\src\editor.h" />
|
||||
<ClInclude Include="..\src\game.h" />
|
||||
<ClInclude Include="..\src\hook.h" />
|
||||
|
@ -509,4 +511,4 @@ xcopy /YS "$(SolutionDir)..\Data" "$(TargetDir)Data"</Command>
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -552,6 +552,9 @@
|
|||
<ClCompile Include="..\src\addresses.c">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\drawing\supports.c">
|
||||
<Filter>Source\Drawing</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\management\award.h">
|
||||
|
@ -827,5 +830,8 @@
|
|||
<ClInclude Include="..\src\core\Util.hpp">
|
||||
<Filter>Source\Core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\drawing\supports.h">
|
||||
<Filter>Source\Drawing</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,333 @@
|
|||
#include "../addresses.h"
|
||||
#include "../interface/viewport.h"
|
||||
#include "supports.h"
|
||||
|
||||
typedef struct {
|
||||
uint16 full;
|
||||
uint16 half;
|
||||
uint16 flat;
|
||||
uint16 unk;
|
||||
} supports_id_desc;
|
||||
|
||||
/* 0x0097B1C4 */
|
||||
const supports_id_desc WoodenSupportImageIds[] = {
|
||||
{ 3392, 3393, 3394, 3536 },
|
||||
{ 3390, 3391, 3394, 3514 },
|
||||
{ 3558, 3559, 3560, 3570 },
|
||||
{ 3561, 3562, 3563, 3592 },
|
||||
{ 3564, 3565, 3566, 3614 },
|
||||
{ 3567, 3568, 3569, 3636 },
|
||||
{ 3677, 3678, 3680, 3739 },
|
||||
{ 3675, 3676, 3679, 3717 },
|
||||
{ 3761, 3762, 3763, 3773 },
|
||||
{ 3764, 3765, 3766, 3795 },
|
||||
{ 3767, 3768, 3769, 3817 },
|
||||
{ 3770, 3771, 3772, 3839 },
|
||||
};
|
||||
|
||||
/* 0x0097B224 */
|
||||
const uint16 WoodenCurveSupportImageIds[] = {
|
||||
3465,
|
||||
3465,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
3681,
|
||||
3681,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
uint8 var_0;
|
||||
uint8 var_1;
|
||||
uint8 var_2;
|
||||
uint8 var_3;
|
||||
uint8 var_4;
|
||||
uint8 var_5;
|
||||
uint8 var_6;
|
||||
uint8 var_7;
|
||||
} unk_supports_desc;
|
||||
|
||||
/* 0x0097B23C */
|
||||
const unk_supports_desc byte_97B23C[] = {
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 10, 0, 0, 10, 32, 44, 1, 1 },
|
||||
{ 0, 10, 0, 32, 10, 44, 1, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 10, 0, 0, 10, 32, 44, 1, 1 },
|
||||
{ 0, 10, 0, 32, 10, 44, 1, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 10, 0, 2, 10, 32, 76, 1, 1 },
|
||||
{ 0, 10, 2, 32, 10, 76, 1, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 4, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 4, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 4, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 4, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 0, 0, 0, 1, 1, 8, 0, 1 },
|
||||
{ 2, 2, 1, 28, 28, 2, 0, 1 },
|
||||
};
|
||||
|
||||
/* 0x0097B3C4 */
|
||||
const uint16 word_97B3C4[] = {
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
14,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
17,
|
||||
0,
|
||||
16,
|
||||
15,
|
||||
0,
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006629BC
|
||||
* dx: height
|
||||
* ax: unknown
|
||||
* ebp: imageColourFlags
|
||||
* edi: unknown
|
||||
* @returns true if any supports have been drawn.
|
||||
*/
|
||||
bool wooden_a_supports_paint_setup(int height, uint16 ax, uint32 imageColourFlags, int supportType)
|
||||
{
|
||||
// {
|
||||
// int eax = ax, ebx = 0, ecx = 0, edx = height, esi = 0, _edi = supportType, ebp = imageColourFlags;
|
||||
// RCT2_CALLFUNC_X(0x006629BC, &eax, &ebx, &ecx, &edx, &esi, &_edi, &ebp);
|
||||
// return eax & 0xFF;
|
||||
// }
|
||||
|
||||
RCT2_GLOBAL(0x009E32B1, uint8) = 0;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_VIEWPORT_FLAGS, uint16) & VIEWPORT_FLAG_INVISIBLE_SUPPORTS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(0x0141E9DB, uint8) & 1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int z = floor2(RCT2_GLOBAL(0x00141E9D8, uint16) + 15, 16);
|
||||
height -= z;
|
||||
if (height < 0) {
|
||||
return true;
|
||||
}
|
||||
height /= 16;
|
||||
|
||||
bool drawFlatPiece = false;
|
||||
int ecx = RCT2_GLOBAL(0x0141E9DA, uint8);
|
||||
if (ecx & (1 << 5)) {
|
||||
drawFlatPiece = true;
|
||||
} else if (ecx & (1 << 4)) {
|
||||
height -= 2;
|
||||
if (height < 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int imageId = WoodenSupportImageIds[supportType].unk;
|
||||
if (imageId != 0) {
|
||||
ecx &= 0x1F;
|
||||
imageId += word_97B3C4[ecx];
|
||||
imageId |= imageColourFlags;
|
||||
|
||||
RCT2_GLOBAL(0x009DEA52, uint16) = 0;
|
||||
RCT2_GLOBAL(0x009DEA54, uint16) = 0;
|
||||
RCT2_GLOBAL(0x009DEA56, uint16) = z + 2;
|
||||
sub_98197C(0, 11, imageId, 0, z, 32, 32, get_current_rotation());
|
||||
|
||||
RCT2_GLOBAL(0x009E32B1, uint8) = 1;
|
||||
z += 32;
|
||||
} else {
|
||||
z += 32;
|
||||
drawFlatPiece = true;
|
||||
}
|
||||
} else if (ecx & 0x0F) {
|
||||
height--;
|
||||
if (height < 0) {
|
||||
return true;
|
||||
}
|
||||
int imageId = WoodenSupportImageIds[supportType].unk;
|
||||
if (imageId == 0) {
|
||||
z += 16;
|
||||
drawFlatPiece = true;
|
||||
} else {
|
||||
ecx &= 0x1F;
|
||||
imageId += word_97B3C4[ecx];
|
||||
imageId |= imageColourFlags;
|
||||
|
||||
RCT2_GLOBAL(0x009DEA52, uint16) = 0;
|
||||
RCT2_GLOBAL(0x009DEA54, uint16) = 0;
|
||||
RCT2_GLOBAL(0x009DEA56, uint16) = z + 2;
|
||||
sub_98196C(0, 11, imageId, 0, z, 32, 32, get_current_rotation());
|
||||
z += 16;
|
||||
RCT2_GLOBAL(0x009E32B1, uint8) = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (drawFlatPiece) {
|
||||
int imageId = WoodenSupportImageIds[supportType].flat | imageColourFlags;
|
||||
sub_98197C(0, 0, imageId, 0, z - 2, 32, 32, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009E32B1, uint8) = 1;
|
||||
}
|
||||
|
||||
while (height != 0) {
|
||||
if ((z & 16) == 0 && height >= 2 && z + 16 != RCT2_GLOBAL(0x00141E9DC, uint16)) {
|
||||
// Full support
|
||||
int imageId = WoodenSupportImageIds[supportType].full | imageColourFlags;
|
||||
uint8 ah = ax == 2 ? 23 : 28;
|
||||
sub_98196C(0, ah, imageId, 0, z, 32, 32, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009E32B1, uint8) = 1;
|
||||
z += 32;
|
||||
height -= 2;
|
||||
} else {
|
||||
// Half support
|
||||
int imageId = WoodenSupportImageIds[supportType].half | imageColourFlags;
|
||||
uint8 ah = ax == 1 ? 7 : 12;
|
||||
sub_98196C(0, ah, imageId, 0, z, 32, 32, get_current_rotation());
|
||||
z += 16;
|
||||
RCT2_GLOBAL(0x009E32B1, uint8) = 1;
|
||||
height -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (ax != 0) {
|
||||
int eax = (ax - 1) & 0xFFFF;
|
||||
int imageId = WoodenCurveSupportImageIds[supportType];
|
||||
if (imageId != 0 && byte_97B23C[eax].var_7 != 0) {
|
||||
imageId += eax;
|
||||
imageId |= imageColourFlags;
|
||||
RCT2_GLOBAL(0x009DEA52, uint16) = byte_97B23C[eax].var_0;
|
||||
RCT2_GLOBAL(0x009DEA54, uint16) = byte_97B23C[eax].var_1;
|
||||
RCT2_GLOBAL(0x009DEA56, uint16) = byte_97B23C[eax].var_2 + z;
|
||||
uint16 lengthY = byte_97B23C[eax].var_3;
|
||||
uint16 lengthX = byte_97B23C[eax].var_4;
|
||||
uint8 ah = byte_97B23C[eax].var_5;
|
||||
if (byte_97B23C[eax].var_6 == 0 || RCT2_GLOBAL(0x009DEA58, uint32) == 0) {
|
||||
sub_98197C(0, ah, imageId, 0, z, lengthY, lengthX, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009E32B1, uint8) = 1;
|
||||
} else {
|
||||
RCT2_GLOBAL(0x009E32B1, uint8) = 1;
|
||||
if (!sub_98198C(0, ah, imageId, 0, z, lengthY, lengthX, get_current_rotation())) {
|
||||
int edi = RCT2_GLOBAL(0x009DEA58, uint32);
|
||||
RCT2_GLOBAL(edi + 0x20, uint32) = imageColourFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wooden supports
|
||||
* rct2: 0x00662D5C
|
||||
*/
|
||||
bool wooden_b_supports_paint_setup(int height, uint16 ax, uint32 imageColourFlags, int supportType)
|
||||
{
|
||||
int eax = ax, ebx = 0, ecx = 0, edx = height, esi = 0, _edi = supportType, ebp = imageColourFlags;
|
||||
RCT2_CALLFUNC_X(0x00662D5C, &eax, &ebx, &ecx, &edx, &esi, &_edi, &ebp);
|
||||
return eax & 0xFF;
|
||||
}
|
||||
|
||||
/**
|
||||
* Metal pole supports
|
||||
* rct2: 0x00663105
|
||||
*/
|
||||
bool metal_a_wooden_a_supports_paint_setup(int height, uint16 ax, uint32 imageColourFlags, int supportType)
|
||||
{
|
||||
int eax = ax, ebx = 0, ecx = 0, edx = height, esi = 0, _edi = supportType, ebp = imageColourFlags;
|
||||
RCT2_CALLFUNC_X(0x00663105, &eax, &ebx, &ecx, &edx, &esi, &_edi, &ebp);
|
||||
return eax & 0xFF;
|
||||
}
|
||||
|
||||
/**
|
||||
* Metal pole supports
|
||||
* rct2: 0x00663584
|
||||
*/
|
||||
bool metal_b_wooden_a_supports_paint_setup(int height, uint16 ax, uint32 imageColourFlags, int supportType)
|
||||
{
|
||||
int eax = ax, ebx = 0, ecx = 0, edx = height, esi = 0, _edi = supportType, ebp = imageColourFlags;
|
||||
RCT2_CALLFUNC_X(0x00663584, &eax, &ebx, &ecx, &edx, &esi, &_edi, &ebp);
|
||||
return eax & 0xFF;
|
||||
}
|
||||
|
||||
/**
|
||||
* Some kind of supports
|
||||
* rct2: 0x006A2ECC
|
||||
*/
|
||||
bool sub_6A2ECC(int height, uint16 ax, uint32 imageColourFlags, int supportType)
|
||||
{
|
||||
int eax = ax, ebx = 0, ecx = 0, edx = height, esi = 0, _edi = supportType, ebp = imageColourFlags;
|
||||
RCT2_CALLFUNC_X(0x006A2ECC, &eax, &ebx, &ecx, &edx, &esi, &_edi, &ebp);
|
||||
return eax & 0xFF;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006A326B
|
||||
*/
|
||||
bool path_wooden_a_supports_paint_setup(int height, uint16 ax, uint32 imageColourFlags, int supportType)
|
||||
{
|
||||
int eax = ax, ebx = 0, ecx = 0, edx = height, esi = 0, _edi = supportType, ebp = imageColourFlags;
|
||||
RCT2_CALLFUNC_X(0x006A326B, &eax, &ebx, &ecx, &edx, &esi, &_edi, &ebp);
|
||||
return eax & 0xFF;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef _DRAWING_SUPPORTS_H_
|
||||
#define _DRAWING_SUPPORTS_H_
|
||||
|
||||
#include "../common.h"
|
||||
|
||||
bool wooden_a_supports_paint_setup(int height, uint16 ax, uint32 image_id, int supportType);
|
||||
|
||||
#endif
|
|
@ -21,6 +21,7 @@
|
|||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../drawing/supports.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../ride/ride_data.h"
|
||||
#include "../ride/track_data.h"
|
||||
|
@ -870,6 +871,24 @@ int sub_98199C(sint8 al, sint8 ah, int image_id, sint8 cl, int height, sint16 le
|
|||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006861AC, 0x00686337, 0x006864D0, 0x0068666B, 0x0098196C
|
||||
*/
|
||||
int sub_98196C(sint8 al, sint8 ah, int image_id, sint8 cl, int height, sint16 length_y, sint16 length_x, uint32 rotation)
|
||||
{
|
||||
RCT2_CALLPROC_X(RCT2_ADDRESS(0x0098196C, uint32)[get_current_rotation()],
|
||||
al | (ah << 8),
|
||||
image_id,
|
||||
cl,
|
||||
height,
|
||||
length_y,
|
||||
length_x,
|
||||
rotation
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x00686806, 0x006869B2, 0x00686B6F, 0x00686D31, 0x0098197C
|
||||
|
@ -1036,6 +1055,24 @@ int sub_98197C(sint8 al, sint8 ah, int image_id, sint8 cl, int height, sint16 le
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x00686EF0, 0x00687056, 0x006871C8, 0x0068733C, 0x0098198C
|
||||
*/
|
||||
int sub_98198C(sint8 al, sint8 ah, int image_id, sint8 cl, int height, sint16 length_y, sint16 length_x, uint32 rotation)
|
||||
{
|
||||
RCT2_CALLPROC_X(RCT2_ADDRESS(0x0098196C, uint32)[get_current_rotation()],
|
||||
al | (ah << 8),
|
||||
image_id,
|
||||
cl,
|
||||
height,
|
||||
length_y,
|
||||
length_x,
|
||||
rotation
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006D4244
|
||||
|
@ -1203,23 +1240,6 @@ void sprite_paint_setup(uint16 eax, uint16 ecx){
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006629BC
|
||||
* returns al
|
||||
* ebp: image_id
|
||||
* ax: unknown
|
||||
* dx: height
|
||||
* edi: unknown
|
||||
*/
|
||||
bool sub_6629BC(int height, uint16 ax, uint32 image_id, int edi){
|
||||
int eax = ax, ebx = 0, ecx = 0, edx = height, esi = 0, _edi = edi, ebp = image_id;
|
||||
|
||||
RCT2_CALLFUNC_X(0x006629BC, &eax, &ebx, &ecx, &edx, &esi, &_edi, &ebp);
|
||||
|
||||
return eax & 0xFF;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x0066508C, 0x00665540
|
||||
|
@ -1365,11 +1385,10 @@ void viewport_ride_entrance_exit_paint_setup(uint8 direction, int height, rct_ma
|
|||
image_id = 0x20B80000;
|
||||
}
|
||||
|
||||
if (direction & 1){
|
||||
sub_6629BC(height, 0, image_id, 1);
|
||||
}
|
||||
else{
|
||||
sub_6629BC(height, 0, image_id, 0);
|
||||
if (direction & 1) {
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, 1);
|
||||
} else {
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, 0);
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x141E9B4, uint16) = 0xFFFF;
|
||||
|
@ -1486,11 +1505,10 @@ void viewport_park_entrance_paint_setup(uint8 direction, int height, rct_map_ele
|
|||
image_id = 0x20B80000;
|
||||
}
|
||||
|
||||
if (direction & 1){
|
||||
sub_6629BC(height, 0, image_id, 1);
|
||||
}
|
||||
else{
|
||||
sub_6629BC(height, 0, image_id, 0);
|
||||
if (direction & 1) {
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, 1);
|
||||
} else {
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, 0);
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x141E9B4, uint16) = 0xFFFF;
|
||||
|
|
|
@ -131,9 +131,10 @@ void painter_setup();
|
|||
void sub_688485();
|
||||
void sub_688217();
|
||||
|
||||
int sub_98196C(sint8 al, sint8 ah, int image_id, sint8 cl, int height, sint16 length_y, sint16 length_x, uint32 rotation);
|
||||
int sub_98197C(sint8 al, sint8 ah, int image_id, sint8 cl, int height, sint16 length_y, sint16 length_x, uint32 rotation);
|
||||
int sub_98198C(sint8 al, sint8 ah, int image_id, sint8 cl, int height, sint16 length_y, sint16 length_x, uint32 rotation);
|
||||
int sub_98199C(sint8 al, sint8 ah, int image_id, sint8 cl, int height, sint16 length_y, sint16 length_x, uint32 rotation);
|
||||
bool sub_6629BC(int height, uint16 ax, uint32 image_id, int edi);
|
||||
|
||||
void viewport_invalidate(rct_viewport *viewport, int left, int top, int right, int bottom);
|
||||
|
||||
|
|
|
@ -21,12 +21,13 @@
|
|||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../drawing/supports.h"
|
||||
#include "../interface/viewport.h"
|
||||
#include "../interface/window.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../sprites.h"
|
||||
#include "../world/map.h"
|
||||
#include "../world/sprite.h"
|
||||
#include "../interface/viewport.h"
|
||||
#include "../interface/window.h"
|
||||
#include "ride_data.h"
|
||||
#include "track_data.h"
|
||||
#include "track_paint.h"
|
||||
|
@ -37,7 +38,7 @@
|
|||
*/
|
||||
static void top_spin_paint_tile_0(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement) {
|
||||
uint32 image_id = RCT2_GLOBAL(0x00F441A0, uint32);
|
||||
sub_6629BC(height, 0, image_id, direction & 1);
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, direction & 1);
|
||||
|
||||
image_id = 22137 | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
|
@ -341,7 +342,7 @@ static void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 di
|
|||
*/
|
||||
static void top_spin_paint_tile_1(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement) {
|
||||
uint32 image_id = RCT2_GLOBAL(0x00F441A0, uint32);
|
||||
sub_6629BC(height, 0, image_id, direction & 1);
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, direction & 1);
|
||||
|
||||
image_id = 22137 | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
|
@ -410,7 +411,7 @@ static void top_spin_paint_tile_1(uint8 rideIndex, uint8 trackSequence, uint8 di
|
|||
*/
|
||||
static void top_spin_paint_tile_2(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement) {
|
||||
uint32 image_id = RCT2_GLOBAL(0x00F441A0, uint32);
|
||||
sub_6629BC(height, 0, image_id, direction & 1);
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, direction & 1);
|
||||
|
||||
image_id = 22137 | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
|
@ -460,7 +461,7 @@ static void top_spin_paint_tile_2(uint8 rideIndex, uint8 trackSequence, uint8 di
|
|||
*/
|
||||
static void top_spin_paint_tile_4(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement) {
|
||||
uint32 image_id = RCT2_GLOBAL(0x00F441A0, uint32);
|
||||
sub_6629BC(height, 0, image_id, direction & 1);
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, direction & 1);
|
||||
|
||||
image_id = 22137 | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
|
@ -510,7 +511,7 @@ static void top_spin_paint_tile_4(uint8 rideIndex, uint8 trackSequence, uint8 di
|
|||
*/
|
||||
static void top_spin_paint_tile_3(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement) {
|
||||
uint32 image_id = RCT2_GLOBAL(0x00F441A0, uint32);
|
||||
sub_6629BC(height, 0, image_id, direction & 1);
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, direction & 1);
|
||||
|
||||
image_id = 22136 | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
|
@ -579,7 +580,7 @@ static void top_spin_paint_tile_3(uint8 rideIndex, uint8 trackSequence, uint8 di
|
|||
*/
|
||||
static void top_spin_paint_tile_5(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement) {
|
||||
uint32 image_id = RCT2_GLOBAL(0x00F441A0, uint32);
|
||||
sub_6629BC(height, 0, image_id, direction & 1);
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, direction & 1);
|
||||
|
||||
image_id = 22136 | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
|
@ -630,7 +631,7 @@ static void top_spin_paint_tile_5(uint8 rideIndex, uint8 trackSequence, uint8 di
|
|||
*/
|
||||
static void top_spin_paint_tile_6(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement) {
|
||||
uint32 image_id = RCT2_GLOBAL(0x00F441A0, uint32);
|
||||
sub_6629BC(height, 0, image_id, direction & 1);
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, direction & 1);
|
||||
|
||||
image_id = 22135 | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
|
@ -699,7 +700,7 @@ static void top_spin_paint_tile_6(uint8 rideIndex, uint8 trackSequence, uint8 di
|
|||
*/
|
||||
static void top_spin_paint_tile_7(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement) {
|
||||
uint32 image_id = RCT2_GLOBAL(0x00F441A0, uint32);
|
||||
sub_6629BC(height, 0, image_id, direction & 1);
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, direction & 1);
|
||||
|
||||
image_id = 22134 | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
|
@ -768,7 +769,7 @@ static void top_spin_paint_tile_7(uint8 rideIndex, uint8 trackSequence, uint8 di
|
|||
*/
|
||||
static void top_spin_paint_tile_8(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement) {
|
||||
uint32 image_id = RCT2_GLOBAL(0x00F441A0, uint32);
|
||||
sub_6629BC(height, 0, image_id, direction & 1);
|
||||
wooden_a_supports_paint_setup(height, 0, image_id, direction & 1);
|
||||
|
||||
image_id = 22135 | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
|
@ -990,7 +991,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_topspin(int trackType, int directi
|
|||
*/
|
||||
static void shop_paint_setup(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement)
|
||||
{
|
||||
bool hasSupports = sub_6629BC(height, 0, RCT2_GLOBAL(0x00F441A4, uint32), direction & 1);
|
||||
bool hasSupports = wooden_a_supports_paint_setup(height, 0, RCT2_GLOBAL(0x00F441A4, uint32), direction & 1);
|
||||
|
||||
RCT2_GLOBAL(0x0141E9D0, sint16) = -1;
|
||||
RCT2_GLOBAL(0x0141E9C4, sint16) = -1;
|
||||
|
@ -1052,6 +1053,8 @@ TRACK_PAINT_FUNCTION get_track_paint_function_shop(int trackType, int direction)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static int tempi = 0;
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x00763234
|
||||
|
@ -1061,7 +1064,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_shop(int trackType, int direction)
|
|||
*/
|
||||
static void facility_paint_setup(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement)
|
||||
{
|
||||
bool hasSupports = sub_6629BC(height, 0, RCT2_GLOBAL(0x00F441A4, uint32), direction & 1);
|
||||
bool hasSupports = wooden_a_supports_paint_setup(height, 0, RCT2_GLOBAL(0x00F441A4, uint32), direction & 1);
|
||||
|
||||
RCT2_GLOBAL(0x0141E9D0, sint16) = -1;
|
||||
RCT2_GLOBAL(0x0141E9C4, sint16) = -1;
|
||||
|
|
Loading…
Reference in New Issue