From 1bb7da173afd766fb7dd04330d35262f17b6dd6b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 20 Jun 2020 18:17:49 +0200 Subject: [PATCH] - removed a few more dependencies on Build includes. --- source/build/include/compat.h | 5 +-- source/core/intvec.h | 53 +++++++++++++++++++++++++++++ source/core/searchpaths.cpp | 1 - source/core/textures/buildtiles.cpp | 4 +-- source/core/textures/buildtiles.h | 4 +-- 5 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 source/core/intvec.h diff --git a/source/build/include/compat.h b/source/build/include/compat.h index bd950a9a0..178d914d6 100644 --- a/source/build/include/compat.h +++ b/source/build/include/compat.h @@ -9,6 +9,7 @@ #include "xs_Float.h" #include "m_alloc.h" +#include "intvec.h" ////////// Compiler detection ////////// @@ -629,10 +630,6 @@ typedef struct MAY_ALIAS { int32_t x, y; } vec2_t; -typedef struct MAY_ALIAS { - int16_t x, y; -} vec2_16_t; - typedef struct { uint32_t x, y; } vec2u_t; diff --git a/source/core/intvec.h b/source/core/intvec.h new file mode 100644 index 000000000..97fcad844 --- /dev/null +++ b/source/core/intvec.h @@ -0,0 +1,53 @@ +#pragma once + +struct vec2_16_t +{ + int16_t x, y; +}; + + +#if 0 +struct vec2_t +{ + int32_t x, y; +}; + +struct vec2u_t +{ + uint32_t x, y; +}; + +struct vec2f_t +{ + float x, y; +}; + +struct vec2d_t +{ + double x, y; +}; + +struct vec3_t +{ + union + { + struct + { + int32_t x, y, z; + }; + vec2_t vec2; + }; +}; + +struct vec3_16_t +{ + union + { + struct + { + int16_t x, y, z; + }; + vec2_16_t vec2; + }; +}; +#endif \ No newline at end of file diff --git a/source/core/searchpaths.cpp b/source/core/searchpaths.cpp index 31e0c341f..c0ede06df 100644 --- a/source/core/searchpaths.cpp +++ b/source/core/searchpaths.cpp @@ -35,7 +35,6 @@ #include "m_crc32.h" #include "i_specialpaths.h" #include "i_system.h" -#include "compat.h" #include "gameconfigfile.h" #include "cmdlib.h" #include "utf8.h" diff --git a/source/core/textures/buildtiles.cpp b/source/core/textures/buildtiles.cpp index e666fab5e..086e012ee 100644 --- a/source/core/textures/buildtiles.cpp +++ b/source/core/textures/buildtiles.cpp @@ -524,8 +524,8 @@ void BuildTiles::PostLoadSetup() if (rep.palnum == DETAILPAL) { detailTex = rep.faces[0]; - scalex = rep.scale.x; - scaley = rep.scale.y; + scalex = rep.scale.X; + scaley = rep.scale.Y; } } if (!detailTex && !glowTex && !normalTex && !specTex) continue; // if there's no layers there's nothing to do. diff --git a/source/core/textures/buildtiles.h b/source/core/textures/buildtiles.h index 432f0f748..c43cefc3f 100644 --- a/source/core/textures/buildtiles.h +++ b/source/core/textures/buildtiles.h @@ -3,7 +3,7 @@ #include "textures.h" #include "image.h" #include "i_time.h" -#include "compat.h" +#include "intvec.h" // picanm[].sf: // |bit(1<<7) @@ -70,7 +70,7 @@ struct rottile_t struct HightileReplacement { FGameTexture* faces[6]; // only one gets used by a texture, the other 5 are for skyboxes only - vec2f_t scale; + FVector2 scale; float alphacut, specpower, specfactor; uint16_t palnum, flags; };