From d4e9faaed00f447b2fe263fbb77216087b2da250 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sat, 21 May 2016 12:19:31 +0200 Subject: [PATCH] Share enum for floors --- src/ride/gentle/mini_golf.c | 11 ++++------- src/ride/shops/facility.c | 2 +- src/ride/shops/shop.c | 2 +- src/ride/track_paint.h | 3 +++ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ride/gentle/mini_golf.c b/src/ride/gentle/mini_golf.c index 731c7bb045..67f47b097e 100644 --- a/src/ride/gentle/mini_golf.c +++ b/src/ride/gentle/mini_golf.c @@ -24,9 +24,6 @@ #include "../../world/map.h" enum { - SPR_FLOOR_A = 3395, - SPR_FLOOR_B = 3396, - SPR_MINI_GOLF_FLAT_SW_NE = 14404, SPR_MINI_GOLF_FLAT_NW_SE = 14405, SPR_MINI_GOLF_FLAT_FENCE_BACK_SW_NE = 14406, @@ -718,7 +715,7 @@ static void paint_mini_golf_hole_ab(uint8 trackSequence, uint8 direction, int he sub_98197C(imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24, get_current_rotation()); if (drewSupports) { - imageId = (direction & 1 ? SPR_FLOOR_B : SPR_FLOOR_A) | RCT2_GLOBAL(0x00F4419C, uint32); + imageId = (direction & 1 ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | RCT2_GLOBAL(0x00F4419C, uint32); sub_98197C(imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height, get_current_rotation()); imageId = sprites[direction][trackSequence][0] | RCT2_GLOBAL(0x00F44198, uint32); @@ -777,7 +774,7 @@ static void paint_mini_golf_hole_c(uint8 rideIndex, uint8 trackSequence, uint8 d } if (drewSupports) { - imageId = (direction & 1 ? SPR_FLOOR_B : SPR_FLOOR_A) | RCT2_GLOBAL(0x00F4419C, uint32); + imageId = (direction & 1 ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | RCT2_GLOBAL(0x00F4419C, uint32); sub_98197C(imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height, get_current_rotation()); imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][0] | RCT2_GLOBAL(0x00F44198, uint32); @@ -843,7 +840,7 @@ static void paint_mini_golf_hole_d(uint8 rideIndex, uint8 trackSequence, uint8 d } if (drewSupports) { - imageId = (supportType & 1 ? SPR_FLOOR_B : SPR_FLOOR_A) | RCT2_GLOBAL(0x00F4419C, uint32); + imageId = (supportType & 1 ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | RCT2_GLOBAL(0x00F4419C, uint32); sub_98197C(imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height, get_current_rotation()); imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][0] | RCT2_GLOBAL(0x00F44198, uint32); @@ -908,7 +905,7 @@ static void paint_mini_golf_hole_e(uint8 rideIndex, uint8 trackSequence, uint8 d } if (drewSupports) { - imageId = (supportType & 1 ? SPR_FLOOR_B : SPR_FLOOR_A) | RCT2_GLOBAL(0x00F4419C, uint32); + imageId = (supportType & 1 ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | RCT2_GLOBAL(0x00F4419C, uint32); sub_98197C(imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height, get_current_rotation()); imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][0] | RCT2_GLOBAL(0x00F44198, uint32); diff --git a/src/ride/shops/facility.c b/src/ride/shops/facility.c index 2d92337ed9..a24fc11a35 100644 --- a/src/ride/shops/facility.c +++ b/src/ride/shops/facility.c @@ -45,7 +45,7 @@ static void facility_paint_setup(uint8 rideIndex, uint8 trackSequence, uint8 dir int lengthX = (direction & 1) == 0 ? 28 : 2; int lengthY = (direction & 1) == 0 ? 2 : 28; if (hasSupports) { - uint32 foundationImageId = (direction & 1 ? 3396 : 3395) | RCT2_GLOBAL(0x00F441A4, uint32); + uint32 foundationImageId = (direction & 1 ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | RCT2_GLOBAL(0x00F441A4, uint32); sub_98197C(foundationImageId, 0, 0, lengthX, lengthY, 29, height, direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height, rotation); // Door image or base diff --git a/src/ride/shops/shop.c b/src/ride/shops/shop.c index 691bae70de..d652fe90e9 100644 --- a/src/ride/shops/shop.c +++ b/src/ride/shops/shop.c @@ -45,7 +45,7 @@ static void shop_paint_setup(uint8 rideIndex, uint8 trackSequence, uint8 directi imageId += direction; if (hasSupports) { - uint32 foundationImageId = (direction & 1 ? 3396 : 3395) | RCT2_GLOBAL(0x00F441A4, uint32); + uint32 foundationImageId = (direction & 1 ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | RCT2_GLOBAL(0x00F441A4, uint32); sub_98197C(foundationImageId, 0, 0, 28, 28, 45, height, 2, 2, height, get_current_rotation()); sub_98199C(imageId, 0, 0, 28, 28, 45, height, 2, 2, height, get_current_rotation()); diff --git a/src/ride/track_paint.h b/src/ride/track_paint.h index 5d3edc91da..a43d7bffef 100644 --- a/src/ride/track_paint.h +++ b/src/ride/track_paint.h @@ -32,6 +32,9 @@ extern const uint8 track_map_4x4[][16]; extern const uint8 edges_4x4[]; enum { + SPR_FLOOR_PLANKS = 3395, + SPR_FLOOR_PLANKS_90_DEG = 3396, + SPR_FLOOR_METAL = 14567, SPR_FENCE_METAL_NE = 14568, SPR_FENCE_METAL_SE = 14569,