| @@ -12,5 +12,7 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/types/bigint.h" | #include "private/types/bigint.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -12,5 +12,7 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/image/color.h" | #include "private/image/color.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -12,5 +12,7 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/sys/getopt.h" | #include "private/sys/getopt.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -12,5 +12,7 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/types/half.h" | #include "private/types/half.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -12,8 +12,10 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/math/constants.h" | #include "private/math/constants.h" | ||||
| #include "private/math/functions.h" | #include "private/math/functions.h" | ||||
| #include "private/math/rand.h" | #include "private/math/rand.h" | ||||
| #include "private/math/polynomial.h" | #include "private/math/polynomial.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -17,7 +17,9 @@ | |||||
| // ——————————————— | // ——————————————— | ||||
| // | // | ||||
| #include "private/push_macros.h" | |||||
| #include "private/math/gradient.h" | #include "private/math/gradient.h" | ||||
| #include "private/math/perlin.h" | #include "private/math/perlin.h" | ||||
| #include "private/math/simplex.h" | #include "private/math/simplex.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -24,13 +24,6 @@ | |||||
| #include <stdint.h> | #include <stdint.h> | ||||
| #if _MSC_VER | |||||
| # pragma push_macro("min") | |||||
| # pragma push_macro("max") | |||||
| # undef min | |||||
| # undef max | |||||
| #endif | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -167,8 +160,3 @@ template<typename T, typename T2 = T, typename DUMMY = LOL_T_UNSIGNED> | |||||
| [[nodiscard]] static inline T2 sign(T x) { return (T)((T)0 < x); } | [[nodiscard]] static inline T2 sign(T x) { return (T)((T)0 < x); } | ||||
| } // namespace lol | } // namespace lol | ||||
| #if _MSC_VER | |||||
| # pragma pop_macro("min") | |||||
| # pragma pop_macro("max") | |||||
| #endif | |||||
| @@ -22,13 +22,6 @@ | |||||
| #include <ostream> // std::ostream | #include <ostream> // std::ostream | ||||
| #include <cmath> // std::fabs | #include <cmath> // std::fabs | ||||
| #if _WIN32 | |||||
| # pragma push_macro("near") | |||||
| # pragma push_macro("far") | |||||
| # undef near | |||||
| # undef far | |||||
| #endif | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -610,9 +603,3 @@ template<typename T> | |||||
| mat_t<T,4,4> const mat_t<T,4,4>::identity = mat_t<T,4,4>((T)1); | mat_t<T,4,4> const mat_t<T,4,4>::identity = mat_t<T,4,4>((T)1); | ||||
| } /* namespace lol */ | } /* namespace lol */ | ||||
| #if _WIN32 | |||||
| # pragma pop_macro("near") | |||||
| # pragma pop_macro("far") | |||||
| #endif | |||||
| @@ -16,17 +16,6 @@ | |||||
| #include <cmath> // std::tan | #include <cmath> // std::tan | ||||
| #include <algorithm> // std::max | #include <algorithm> // std::max | ||||
| #if _MSC_VER | |||||
| # pragma push_macro("min") | |||||
| # pragma push_macro("max") | |||||
| # pragma push_macro("near") | |||||
| # pragma push_macro("far") | |||||
| # undef min | |||||
| # undef max | |||||
| # undef near | |||||
| # undef far | |||||
| #endif | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -291,12 +280,4 @@ inline mat4 mat4::shifted_perspective(float fov_y, float screen_size, | |||||
| mat4::translate(.0f, .0f, -dist_scr); | mat4::translate(.0f, .0f, -dist_scr); | ||||
| } | } | ||||
| } /* namespace lol */ | |||||
| #if _WIN32 | |||||
| # pragma pop_macro("min") | |||||
| # pragma pop_macro("max") | |||||
| # pragma pop_macro("near") | |||||
| # pragma pop_macro("far") | |||||
| #endif | |||||
| } // namespace lol | |||||
| @@ -28,13 +28,6 @@ | |||||
| #include "ops.h" | #include "ops.h" | ||||
| #if _MSC_VER | |||||
| # pragma push_macro("min") | |||||
| # pragma push_macro("max") | |||||
| # undef min | |||||
| # undef max | |||||
| #endif | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -1438,8 +1431,3 @@ typedef ivec12 int12; | |||||
| } // namespace lol | } // namespace lol | ||||
| #include "vector.ipp" | #include "vector.ipp" | ||||
| #if _MSC_VER | |||||
| # pragma pop_macro("min") | |||||
| # pragma pop_macro("max") | |||||
| #endif | |||||
| @@ -0,0 +1,20 @@ | |||||
| // | |||||
| // Lol Engine | |||||
| // | |||||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||||
| // | |||||
| // Lol Engine is free software. It comes without any warranty, to | |||||
| // the extent permitted by applicable law. You can redistribute it | |||||
| // and/or modify it under the terms of the Do What the Fuck You Want | |||||
| // to Public License, Version 2, as published by the WTFPL Task Force. | |||||
| // See http://www.wtfpl.net/ for more details. | |||||
| // | |||||
| // Restore macros that push_macros.h disabled. | |||||
| #if _MSC_VER | |||||
| # pragma pop_macro("min") | |||||
| # pragma pop_macro("max") | |||||
| # pragma pop_macro("near") | |||||
| # pragma pop_macro("far") | |||||
| #endif | |||||
| @@ -0,0 +1,25 @@ | |||||
| // | |||||
| // Lol Engine | |||||
| // | |||||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||||
| // | |||||
| // Lol Engine is free software. It comes without any warranty, to | |||||
| // the extent permitted by applicable law. You can redistribute it | |||||
| // and/or modify it under the terms of the Do What the Fuck You Want | |||||
| // to Public License, Version 2, as published by the WTFPL Task Force. | |||||
| // See http://www.wtfpl.net/ for more details. | |||||
| // | |||||
| // Undefine some intrusive macros from the Windows headers but allow | |||||
| // to restore them afterwards if that’s what the user really wants. | |||||
| #if _MSC_VER | |||||
| # pragma push_macro("min") | |||||
| # pragma push_macro("max") | |||||
| # pragma push_macro("near") | |||||
| # pragma push_macro("far") | |||||
| # undef min | |||||
| # undef max | |||||
| # undef near | |||||
| # undef far | |||||
| #endif | |||||
| @@ -28,13 +28,6 @@ | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| #if _WIN32 | |||||
| # pragma push_macro("near") | |||||
| # pragma push_macro("far") | |||||
| # undef near | |||||
| # undef far | |||||
| #endif | |||||
| namespace half_ops { struct base {}; } | namespace half_ops { struct base {}; } | ||||
| class [[nodiscard]] half | class [[nodiscard]] half | ||||
| @@ -335,8 +328,3 @@ DECLARE_HALF_BOOL_OPS(<=) | |||||
| } // namespace half_ops | } // namespace half_ops | ||||
| } // namespace lol | } // namespace lol | ||||
| #if _WIN32 | |||||
| # pragma pop_macro("near") | |||||
| # pragma pop_macro("far") | |||||
| #endif | |||||
| @@ -24,13 +24,6 @@ | |||||
| #include <string> // std::string | #include <string> // std::string | ||||
| #include <stdint.h> // int64_t etc. | #include <stdint.h> // int64_t etc. | ||||
| #if _MSC_VER | |||||
| # pragma push_macro("min") | |||||
| # pragma push_macro("max") | |||||
| # undef min | |||||
| # undef max | |||||
| #endif | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -266,8 +259,3 @@ typedef real_t<uint32_t> real; | |||||
| } // namespace lol | } // namespace lol | ||||
| #include "real.ipp" | #include "real.ipp" | ||||
| #if _MSC_VER | |||||
| # pragma pop_macro("min") | |||||
| # pragma pop_macro("max") | |||||
| #endif | |||||
| @@ -12,5 +12,7 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/types/real.h" | #include "private/types/real.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -12,5 +12,7 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/sys/threading.h" | #include "private/sys/threading.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -12,5 +12,7 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/math/transform.h" | #include "private/math/transform.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -12,5 +12,7 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/lolunit.h" | #include "private/lolunit.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -12,9 +12,11 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/features.h" | #include "private/features.h" | ||||
| #include "private/base/env.h" | #include "private/base/env.h" | ||||
| #include "private/base/string.h" | #include "private/base/string.h" | ||||
| #include "private/base/containers.h" | #include "private/base/containers.h" | ||||
| #include "private/base/misc.h" | #include "private/base/misc.h" | ||||
| #include "private/pop_macros.h" | |||||
| @@ -12,5 +12,7 @@ | |||||
| #pragma once | #pragma once | ||||
| #include "private/push_macros.h" | |||||
| #include "private/math/vector.h" | #include "private/math/vector.h" | ||||
| #include "private/pop_macros.h" | |||||