mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 11:33:03 +01:00
Partially integrate 0x009DEA58
This commit is contained in:
@@ -321,6 +321,10 @@ const uint16 word_97B3C4[] = {
|
||||
0,
|
||||
};
|
||||
|
||||
#ifdef NO_RCT2
|
||||
paint_struct * gWoodenSupportsPrependTo;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Adds paint structs for wooden supports.
|
||||
* rct2: 0x006629BC
|
||||
@@ -449,14 +453,14 @@ bool wooden_a_supports_paint_setup(int supportType, int special, int height, uin
|
||||
|
||||
unk_supports_desc_bound_box bBox = byte_97B23C[special].bounding_box;
|
||||
|
||||
if (byte_97B23C[special].var_6 == 0 || RCT2_GLOBAL(0x009DEA58, paint_struct*) == NULL) {
|
||||
if (byte_97B23C[special].var_6 == 0 || gWoodenSupportsPrependTo == NULL) {
|
||||
sub_98197C(imageId, 0, 0, bBox.length.x, bBox.length.y, bBox.length.z, z, bBox.offset.x, bBox.offset.y, bBox.offset.z + z, rotation);
|
||||
hasSupports = true;
|
||||
} else {
|
||||
hasSupports = true;
|
||||
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);
|
||||
if (ps != NULL) {
|
||||
paint_struct* edi = RCT2_GLOBAL(0x009DEA58, paint_struct*);
|
||||
paint_struct* edi = gWoodenSupportsPrependTo;
|
||||
edi->var_20 = ps;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
#include "../common.h"
|
||||
#include "../world/footpath.h"
|
||||
|
||||
#ifdef NO_RCT2
|
||||
extern paint_struct * gWoodenSupportsPrependTo;
|
||||
#else
|
||||
#define gWoodenSupportsPrependTo RCT2_GLOBAL(0x009DEA58, paint_struct *)
|
||||
#endif
|
||||
|
||||
bool wooden_a_supports_paint_setup(int supportType, int special, int height, uint32 imageColourFlags, bool* underground);
|
||||
bool wooden_b_supports_paint_setup(int supportType, int special, int height, uint32 imageColourFlags);
|
||||
bool metal_a_supports_paint_setup(int supportType, int segment, int special, int height, uint32 imageColourFlags);
|
||||
|
||||
@@ -271,7 +271,7 @@ static void paint_virginia_reel_track_25_deg_up(uint8 rideIndex, uint8 trackSequ
|
||||
}
|
||||
|
||||
if (direction == 1 || direction == 2) {
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
}
|
||||
|
||||
switch (direction) {
|
||||
@@ -316,14 +316,14 @@ static void paint_virginia_reel_track_flat_to_25_deg_up(uint8 rideIndex, uint8 t
|
||||
break;
|
||||
case 1:
|
||||
ps = sub_98197C(imageId, 0, 0, 27, 32, 2, height, 2, 0, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
|
||||
wooden_a_supports_paint_setup(1, 2, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
paint_util_push_tunnel_right(height, TUNNEL_8);
|
||||
break;
|
||||
case 2:
|
||||
ps = sub_98197C(imageId, 0, 0, 32, 27, 2, height, 0, 2, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
|
||||
wooden_a_supports_paint_setup(0, 3, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
paint_util_push_tunnel_left(height, TUNNEL_8);
|
||||
@@ -360,7 +360,7 @@ static void paint_virginia_reel_track_25_deg_up_to_flat(uint8 rideIndex, uint8 t
|
||||
}
|
||||
|
||||
if (direction == 1 || direction == 2) {
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
}
|
||||
|
||||
switch (direction) {
|
||||
|
||||
@@ -173,7 +173,7 @@ static void paint_go_karts_track_25_deg_up(uint8 rideIndex, uint8 trackSequence,
|
||||
}
|
||||
|
||||
if (direction == 1 || direction == 2) {
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
}
|
||||
|
||||
imageId = go_karts_track_pieces_25_deg_up[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
@@ -220,7 +220,7 @@ static void paint_go_karts_track_flat_to_25_deg_up(uint8 rideIndex, uint8 trackS
|
||||
}
|
||||
|
||||
if (direction == 1 || direction == 2) {
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
}
|
||||
|
||||
imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
@@ -267,7 +267,7 @@ static void paint_go_karts_track_25_deg_up_to_flat(uint8 rideIndex, uint8 trackS
|
||||
}
|
||||
|
||||
if (direction == 1 || direction == 2) {
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
}
|
||||
|
||||
imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
|
||||
@@ -310,7 +310,7 @@ static void paint_river_rapids_track_25_deg(uint8 direction, int height, const u
|
||||
case 1:
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
ps = sub_98197C(imageId, 0, 0, 24, 32, 4, height, 4, 0, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 1, 32, 34, height, 27, 0, height + 16, get_current_rotation());
|
||||
@@ -322,7 +322,7 @@ static void paint_river_rapids_track_25_deg(uint8 direction, int height, const u
|
||||
case 2:
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
ps = sub_98197C(imageId, 0, 0, 32, 24, 4, height, 0, 4, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 32, 1, 34, height, 0, 27, height + 16, get_current_rotation());
|
||||
@@ -367,7 +367,7 @@ static void paint_river_rapids_track_25_deg_to_flat_a(uint8 direction, int heigh
|
||||
case 1:
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
ps = sub_98197C(imageId, 0, 0, 24, 32, 4, height, 4, 0, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 1, 32, 18, height, 27, 0, height + 16, get_current_rotation());
|
||||
@@ -379,7 +379,7 @@ static void paint_river_rapids_track_25_deg_to_flat_a(uint8 direction, int heigh
|
||||
case 2:
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
ps = sub_98197C(imageId, 0, 0, 32, 24, 4, height, 0, 4, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 32, 1, 18, height, 0, 27, height + 16, get_current_rotation());
|
||||
@@ -424,7 +424,7 @@ static void paint_river_rapids_track_25_deg_to_flat_b(uint8 direction, int heigh
|
||||
case 1:
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
ps = sub_98197C(imageId, 0, 0, 24, 32, 11, height, 4, 0, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 1, 32, 26, height, 27, 0, height + 16, get_current_rotation());
|
||||
@@ -436,7 +436,7 @@ static void paint_river_rapids_track_25_deg_to_flat_b(uint8 direction, int heigh
|
||||
case 2:
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
ps = sub_98197C(imageId, 0, 0, 32, 24, 11, height, 0, 4, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
gWoodenSupportsPrependTo = ps;
|
||||
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 32, 1, 26, height, 0, 27, height + 16, get_current_rotation());
|
||||
|
||||
Reference in New Issue
Block a user