From bc0e21343ae187c84c46c6cc7ea5a6b8fb5054bf Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 7 May 2016 09:15:22 +0200 Subject: [PATCH] Use a define for maximum station length --- src/ride/track.c | 2 +- src/ride/track.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ride/track.c b/src/ride/track.c index c4fca46766..b5fab55775 100644 --- a/src/ride/track.c +++ b/src/ride/track.c @@ -4186,7 +4186,7 @@ static bool track_add_station_element(int x, int y, int z, int direction, int ri return false; } - if (stationLength > 32) { + if (stationLength > MAX_STATION_PLATFORM_LENGTH) { gGameCommandErrorText = STR_STATION_PLATFORM_TOO_LONG; return false; } diff --git a/src/ride/track.h b/src/ride/track.h index 7be90759d6..190ed0d6fa 100644 --- a/src/ride/track.h +++ b/src/ride/track.h @@ -117,6 +117,8 @@ enum { #define TRACK_PREVIEW_IMAGE_SIZE (370 * 217) +#define MAX_STATION_PLATFORM_LENGTH 32 + /** * Track design structure. * size: 0x4E72B