Permalink
Browse files

Combine drawing of the Spiral and Mini RC (#5025)

  • Loading branch information...
1 parent 4f61cae commit 1c2458b6ddeef730524fa407ce281c0fcea2300f @Gymnasiast Gymnasiast committed on GitHub Jan 9, 2017
@@ -62,7 +62,6 @@
C64FDA771D6D9A2100F259B9 /* reverse_freefall_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CE1CDBC3B7009F9BFC /* reverse_freefall_coaster.c */; };
C64FDA781D6D9A2100F259B9 /* reverser_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CF1CDBC3B7009F9BFC /* reverser_roller_coaster.c */; };
C64FDA791D6D9A2100F259B9 /* side_friction_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D01CDBC3B7009F9BFC /* side_friction_roller_coaster.c */; };
- C64FDA7A1D6D9A2100F259B9 /* spiral_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D11CDBC3B7009F9BFC /* spiral_roller_coaster.c */; };
C64FDA7B1D6D9A2100F259B9 /* stand_up_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D21CDBC3B7009F9BFC /* stand_up_roller_coaster.c */; };
C64FDA7C1D6D9A2100F259B9 /* steeplechase.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D31CDBC3B7009F9BFC /* steeplechase.c */; };
C64FDA7D1D6D9A2100F259B9 /* suspended_swinging_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D41CDBC3B7009F9BFC /* suspended_swinging_coaster.c */; };
@@ -166,7 +165,6 @@
C686F91E1CDBC3B7009F9BFC /* reverse_freefall_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CE1CDBC3B7009F9BFC /* reverse_freefall_coaster.c */; };
C686F91F1CDBC3B7009F9BFC /* reverser_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CF1CDBC3B7009F9BFC /* reverser_roller_coaster.c */; };
C686F9201CDBC3B7009F9BFC /* side_friction_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D01CDBC3B7009F9BFC /* side_friction_roller_coaster.c */; };
- C686F9211CDBC3B7009F9BFC /* spiral_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D11CDBC3B7009F9BFC /* spiral_roller_coaster.c */; };
C686F9221CDBC3B7009F9BFC /* stand_up_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D21CDBC3B7009F9BFC /* stand_up_roller_coaster.c */; };
C686F9231CDBC3B7009F9BFC /* steeplechase.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D31CDBC3B7009F9BFC /* steeplechase.c */; };
C686F9241CDBC3B7009F9BFC /* suspended_swinging_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D41CDBC3B7009F9BFC /* suspended_swinging_coaster.c */; };
@@ -615,7 +613,6 @@
C686F8CE1CDBC3B7009F9BFC /* reverse_freefall_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = reverse_freefall_coaster.c; sourceTree = "<group>"; };
C686F8CF1CDBC3B7009F9BFC /* reverser_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = reverser_roller_coaster.c; sourceTree = "<group>"; };
C686F8D01CDBC3B7009F9BFC /* side_friction_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = side_friction_roller_coaster.c; sourceTree = "<group>"; };
- C686F8D11CDBC3B7009F9BFC /* spiral_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = spiral_roller_coaster.c; sourceTree = "<group>"; };
C686F8D21CDBC3B7009F9BFC /* stand_up_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stand_up_roller_coaster.c; sourceTree = "<group>"; };
C686F8D31CDBC3B7009F9BFC /* steeplechase.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = steeplechase.c; sourceTree = "<group>"; };
C686F8D41CDBC3B7009F9BFC /* suspended_swinging_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = suspended_swinging_coaster.c; sourceTree = "<group>"; };
@@ -1358,7 +1355,6 @@
C686F8CE1CDBC3B7009F9BFC /* reverse_freefall_coaster.c */,
C686F8CF1CDBC3B7009F9BFC /* reverser_roller_coaster.c */,
C686F8D01CDBC3B7009F9BFC /* side_friction_roller_coaster.c */,
- C686F8D11CDBC3B7009F9BFC /* spiral_roller_coaster.c */,
C686F8D21CDBC3B7009F9BFC /* stand_up_roller_coaster.c */,
C686F8D31CDBC3B7009F9BFC /* steeplechase.c */,
C686F8D41CDBC3B7009F9BFC /* suspended_swinging_coaster.c */,
@@ -2545,7 +2541,6 @@
C606CCBE1DB4054000FE4015 /* compat.c in Sources */,
C64FDA781D6D9A2100F259B9 /* reverser_roller_coaster.c in Sources */,
C64FDA791D6D9A2100F259B9 /* side_friction_roller_coaster.c in Sources */,
- C64FDA7A1D6D9A2100F259B9 /* spiral_roller_coaster.c in Sources */,
C64FDA7B1D6D9A2100F259B9 /* stand_up_roller_coaster.c in Sources */,
C606CCC61DB4054000FE4015 /* Printer.cpp in Sources */,
C64FDA7C1D6D9A2100F259B9 /* steeplechase.c in Sources */,
@@ -2652,7 +2647,6 @@
C686F8AC1CDBC37E009F9BFC /* banner.c in Sources */,
D44272671CC81B3200D84D28 /* land.c in Sources */,
D442726D1CC81B3200D84D28 /* mapgen.c in Sources */,
- C686F9211CDBC3B7009F9BFC /* spiral_roller_coaster.c in Sources */,
C686F9291CDBC3B7009F9BFC /* wooden_roller_coaster.c in Sources */,
D460DFD41E0123D1007BA2FE /* PlatformEnvironment.cpp in Sources */,
D44272A71CC81B3200D84D28 /* sprite.c in Sources */,
@@ -261,7 +261,6 @@
<ClCompile Include="ride\coaster\reverser_roller_coaster.c" />
<ClCompile Include="ride\coaster\reverse_freefall_coaster.c" />
<ClCompile Include="ride\coaster\side_friction_roller_coaster.c" />
- <ClCompile Include="ride\coaster\spiral_roller_coaster.c" />
<ClCompile Include="ride\coaster\stand_up_roller_coaster.c" />
<ClCompile Include="ride\coaster\steeplechase.c" />
<ClCompile Include="ride\coaster\suspended_swinging_coaster.c" />
@@ -6044,6 +6044,140 @@ static void mini_rc_track_right_banked_25_deg_down_to_flat(uint8 rideIndex, uint
mini_rc_track_flat_to_left_banked_25_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement);
}
+static void mini_rc_track_left_curved_lift_hill(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
+{
+ switch (trackSequence) {
+ case 0:
+ switch (direction) {
+ case 0:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19333, 0, 6, 32, 20, 3, height);
+ metal_a_supports_paint_setup(1, 4, 14, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 1:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19335, 0, 6, 32, 20, 3, height);
+ metal_a_supports_paint_setup(2, 4, 14, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 2:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19337, 0, 6, 32, 20, 3, height);
+ metal_a_supports_paint_setup(1, 4, 14, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 3:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19331, 0, 6, 32, 20, 3, height);
+ metal_a_supports_paint_setup(2, 4, 14, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ }
+ if (direction == 0 || direction == 3) {
+ paint_util_push_tunnel_rotated(direction, height, TUNNEL_6);
+ }
+ paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0);
+ paint_util_set_general_support_height(height + 72, 0x20);
+ break;
+ case 1:
+ paint_util_set_general_support_height(height + 56, 0x20);
+ break;
+ case 2:
+ paint_util_set_general_support_height(height + 56, 0x20);
+ break;
+ case 3:
+ switch (direction) {
+ case 0:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19332, 6, 0, 20, 32, 3, height);
+ metal_a_supports_paint_setup(2, 4, 17, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 1:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19334, 6, 0, 20, 32, 3, height);
+ metal_a_supports_paint_setup(1, 4, 17, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 2:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19336, 6, 0, 20, 32, 3, height);
+ metal_a_supports_paint_setup(2, 4, 17, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 3:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19330, 6, 0, 20, 32, 3, height);
+ metal_a_supports_paint_setup(1, 4, 17, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ }
+ switch (direction) {
+ case 2:
+ paint_util_push_tunnel_right(height + 16, TUNNEL_8);
+ break;
+ case 3:
+ paint_util_push_tunnel_left(height + 16, TUNNEL_8);
+ break;
+ }
+ paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0);
+ paint_util_set_general_support_height(height + 72, 0x20);
+ break;
+ }
+}
+
+static void mini_rc_track_right_curved_lift_hill(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
+{
+ switch (trackSequence) {
+ case 0:
+ switch (direction) {
+ case 0:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19322, 0, 6, 32, 20, 3, height);
+ metal_a_supports_paint_setup(1, 4, 14, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 1:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19324, 0, 6, 32, 20, 3, height);
+ metal_a_supports_paint_setup(2, 4, 14, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 2:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19326, 0, 6, 32, 20, 3, height);
+ metal_a_supports_paint_setup(1, 4, 14, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 3:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19328, 0, 6, 32, 20, 3, height);
+ metal_a_supports_paint_setup(2, 4, 14, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ }
+ if (direction == 0 || direction == 3) {
+ paint_util_push_tunnel_rotated(direction, height, TUNNEL_6);
+ }
+ paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0);
+ paint_util_set_general_support_height(height + 72, 0x20);
+ break;
+ case 1:
+ paint_util_set_general_support_height(height + 56, 0x20);
+ break;
+ case 2:
+ paint_util_set_general_support_height(height + 56, 0x20);
+ break;
+ case 3:
+ switch (direction) {
+ case 0:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19323, 6, 0, 20, 32, 3, height);
+ metal_a_supports_paint_setup(2, 4, 17, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 1:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19325, 6, 0, 20, 32, 3, height);
+ metal_a_supports_paint_setup(1, 4, 17, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 2:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19327, 6, 0, 20, 32, 3, height);
+ metal_a_supports_paint_setup(2, 4, 17, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ case 3:
+ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19329, 6, 0, 20, 32, 3, height);
+ metal_a_supports_paint_setup(1, 4, 17, height, gTrackColours[SCHEME_SUPPORTS]);
+ break;
+ }
+ switch (direction) {
+ case 0:
+ paint_util_push_tunnel_right(height + 16, TUNNEL_8);
+ break;
+ case 1:
+ paint_util_push_tunnel_left(height + 16, TUNNEL_8);
+ break;
+ }
+ paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0);
+ paint_util_set_general_support_height(height + 72, 0x20);
+ break;
+ }
+}
+
TRACK_PAINT_FUNCTION get_track_paint_function_mini_rc(int trackType, int direction)
{
switch (trackType) {
@@ -6313,6 +6447,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mini_rc(int trackType, int directi
return mini_rc_track_left_banked_25_deg_down_to_flat;
case TRACK_ELEM_RIGHT_BANKED_25_DEG_DOWN_TO_FLAT:
return mini_rc_track_right_banked_25_deg_down_to_flat;
+ case TRACK_ELEM_LEFT_CURVED_LIFT_HILL:
+ return mini_rc_track_left_curved_lift_hill;
+ case TRACK_ELEM_RIGHT_CURVED_LIFT_HILL:
+ return mini_rc_track_right_curved_lift_hill;
}
return NULL;
}
Oops, something went wrong.

0 comments on commit 1c2458b

Please sign in to comment.