From 4f26a8e73a640195b1f77475c518cd48cbd14d87 Mon Sep 17 00:00:00 2001
From: MascaraSnake <jonassauer27@gmail.com>
Date: Wed, 1 Jan 2020 16:01:07 +0100
Subject: [PATCH] Move MAXFLATSIZE define to p_spec.h so p_spec.c doesn't have
 to redefine it

---
 src/p_setup.c | 4 ----
 src/p_spec.c  | 3 ---
 src/p_spec.h  | 3 +++
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/p_setup.c b/src/p_setup.c
index dc115ed19b..8b82e8c69b 100644
--- a/src/p_setup.c
+++ b/src/p_setup.c
@@ -1527,8 +1527,6 @@ static void TextmapParse(UINT32 dataPos, size_t num, void (*parser)(UINT32, char
 	}
 }
 
-#define MAXFLATSIZE (2048<<FRACBITS)
-
 /** Provides a fix to the flat alignment coordinate transform from standard Textmaps.
  */
 static void TextmapFixFlatOffsets(sector_t *sec)
@@ -1554,8 +1552,6 @@ static void TextmapFixFlatOffsets(sector_t *sec)
 	}
 }
 
-#undef MAXFLATSIZE
-
 /** Loads the textmap data, after obtaining the elements count and allocating their respective space.
   */
 static void P_LoadTextmap(void)
diff --git a/src/p_spec.c b/src/p_spec.c
index 4de488654f..a97d1f92ff 100644
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -52,9 +52,6 @@ mobj_t *skyboxcenterpnts[16]; // array of MT_SKYBOX centerpoint mobjs
 // Amount (dx, dy) vector linedef is shifted right to get scroll amount
 #define SCROLL_SHIFT 5
 
-// This must be updated whenever we up the max flat size - quicker to assume rather than figuring out the sqrt of the specific flat's filesize.
-#define MAXFLATSIZE (2048<<FRACBITS)
-
 /** Animated texture descriptor
   * This keeps track of an animated texture or an animated flat.
   * \sa P_UpdateSpecials, P_InitPicAnims, animdef_t
diff --git a/src/p_spec.h b/src/p_spec.h
index 630bcb3de1..4b64fe05d9 100644
--- a/src/p_spec.h
+++ b/src/p_spec.h
@@ -27,6 +27,9 @@ extern mobj_t *skyboxcenterpnts[16]; // array of MT_SKYBOX centerpoint mobjs
 //
 #define GETSECSPECIAL(i,j) ((i >> ((j-1)*4))&15)
 
+// This must be updated whenever we up the max flat size - quicker to assume rather than figuring out the sqrt of the specific flat's filesize.
+#define MAXFLATSIZE (2048<<FRACBITS)
+
 // at game start
 void P_InitPicAnims(void);
 
-- 
GitLab