From a633e89e41934b3d341be8292ad79257c3128b73 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Sun, 25 Feb 2018 18:15:04 +0500 Subject: [PATCH] Remove dublicated WaveForm.h --- src/utils/xrSE_Factory/xrSE_Factory.vcxproj | 2 +- .../xrSE_Factory/xrSE_Factory.vcxproj.filters | 6 +- src/xrEngine/WaveForm.h | 8 +- src/xrGame/xrGame.vcxproj | 2 +- src/xrGame/xrGame.vcxproj.filters | 6 +- src/xrServerEntities/PropertiesListTypes.h | 2 +- src/xrServerEntities/WaveForm.h | 76 ------------------- 7 files changed, 13 insertions(+), 89 deletions(-) delete mode 100644 src/xrServerEntities/WaveForm.h diff --git a/src/utils/xrSE_Factory/xrSE_Factory.vcxproj b/src/utils/xrSE_Factory/xrSE_Factory.vcxproj index c0ea1b6e7f5..49affc4d99c 100644 --- a/src/utils/xrSE_Factory/xrSE_Factory.vcxproj +++ b/src/utils/xrSE_Factory/xrSE_Factory.vcxproj @@ -97,6 +97,7 @@ + @@ -142,7 +143,6 @@ - diff --git a/src/utils/xrSE_Factory/xrSE_Factory.vcxproj.filters b/src/utils/xrSE_Factory/xrSE_Factory.vcxproj.filters index 432415b6ecb..223d9dd4004 100644 --- a/src/utils/xrSE_Factory/xrSE_Factory.vcxproj.filters +++ b/src/utils/xrSE_Factory/xrSE_Factory.vcxproj.filters @@ -360,9 +360,6 @@ ServerStuff\ServerEntities\editor_properties - - ServerStuff\ServerEntities\editor_properties - ServerStuff\ServerEntities\editor_properties @@ -402,6 +399,9 @@ ServerStuff\ServerEntities\movement_manager_holder + + ServerStuff\ServerEntities\editor_properties + diff --git a/src/xrEngine/WaveForm.h b/src/xrEngine/WaveForm.h index 9e672d1627a..bb4ce793f9e 100644 --- a/src/xrEngine/WaveForm.h +++ b/src/xrEngine/WaveForm.h @@ -1,6 +1,8 @@ #pragma once -#ifndef WAVEFORM_H -#define WAVEFORM_H +#include +#include "xrCore/_types.h" +#include "xrCore/math_constants.h" +#include "xrCommon/math_funcs_inline.h" #pragma pack(push, 4) struct WaveForm @@ -68,6 +70,4 @@ struct WaveForm return true; } }; - #pragma pack(pop) -#endif diff --git a/src/xrGame/xrGame.vcxproj b/src/xrGame/xrGame.vcxproj index 3dd5b1171c5..56699b92bda 100644 --- a/src/xrGame/xrGame.vcxproj +++ b/src/xrGame/xrGame.vcxproj @@ -140,6 +140,7 @@ + @@ -185,7 +186,6 @@ - diff --git a/src/xrGame/xrGame.vcxproj.filters b/src/xrGame/xrGame.vcxproj.filters index 0d55de72fdd..4e213188680 100644 --- a/src/xrGame/xrGame.vcxproj.filters +++ b/src/xrGame/xrGame.vcxproj.filters @@ -5565,9 +5565,6 @@ Core\Server\Editor - - Core\Server\Editor - Core\Server\Editor @@ -6674,6 +6671,9 @@ UI\Common\PDA\FractionWar + + Core\Server\Editor + diff --git a/src/xrServerEntities/PropertiesListTypes.h b/src/xrServerEntities/PropertiesListTypes.h index bb41bbc7c16..ae26f044f09 100644 --- a/src/xrServerEntities/PropertiesListTypes.h +++ b/src/xrServerEntities/PropertiesListTypes.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- #pragma once -#include "WaveForm.h" +#include "xrEngine/WaveForm.h" #include "gametype_chooser.h" #include "xrCommon/xr_string.h" #include "xrCommon/xr_vector.h" diff --git a/src/xrServerEntities/WaveForm.h b/src/xrServerEntities/WaveForm.h deleted file mode 100644 index 6d6d5549dea..00000000000 --- a/src/xrServerEntities/WaveForm.h +++ /dev/null @@ -1,76 +0,0 @@ -#pragma once -#ifndef WAVEFORM_H -#define WAVEFORM_H -#include -#include "xrCore/_types.h" -#include "xrCore/math_constants.h" -#include "xrCommon/math_funcs_inline.h" - -#pragma pack(push, 4) -struct WaveForm -{ - enum EFunction - { - fCONSTANT = 0, - fSIN, - fTRIANGLE, - fSQUARE, - fSAWTOOTH, - fINVSAWTOOTH, - fFORCE32 = u32(-1) - }; - IC float signf(float t) { return t / _abs(t); } - IC float Func(float t) - { - switch (F) - { - case fCONSTANT: return 0; - case fSIN: return _sin(t * PI_MUL_2); - case fTRIANGLE: return asinf(_sin((t - 0.25f) * PI_MUL_2)) / PI_DIV_2; - case fSQUARE: return signf(_cos(t * PI)); - case fSAWTOOTH: return atanf(tanf((t + 0.5f) * PI)) / PI_DIV_2; - case fINVSAWTOOTH: return -(atanf(tanf((t + 0.5f) * PI)) / PI_DIV_2); - } - return 0.f; - } - -public: - EFunction F; - float arg[4]; - - IC float Calculate(float t) - { - // y = arg0 + arg1*func( (time+arg2)*arg3 ) - float x = (t + arg[2]) * arg[3]; - return arg[0] + arg[1] * Func(x - floorf(x)); - } - - WaveForm() - { - F = fCONSTANT; - arg[0] = 0; - arg[1] = 1; - arg[2] = 0; - arg[3] = 1; - } - - IC BOOL Similar(const WaveForm& W) const - { - if (!fsimilar(arg[0], W.arg[0], EPS_L)) - return FALSE; - if (!fsimilar(arg[1], W.arg[1], EPS_L)) - return FALSE; - if (fis_zero(arg[1], EPS_L)) - return TRUE; - if (F != W.F) - return FALSE; - if (!fsimilar(arg[2], W.arg[2], EPS_L)) - return FALSE; - if (!fsimilar(arg[3], W.arg[3], EPS_L)) - return FALSE; - return TRUE; - } -}; - -#pragma pack(pop) -#endif