fix ldflags typo and other compile errors
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace blitz {
|
namespace blitz {
|
||||||
|
|
||||||
struct EMASmoother {
|
class EMASmoother {
|
||||||
private:
|
private:
|
||||||
float Alpha;
|
float Alpha;
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -1,36 +1,30 @@
|
|||||||
#include <cmath>>
|
#include <cmath>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include "blitz/common/Smoothing.h"
|
||||||
|
|
||||||
namespace blitz {
|
namespace blitz {
|
||||||
|
|
||||||
struct EMASmoother {
|
EMASmoother::EMASmoother() : Alpha(1.0f), Current(0.0f) {}
|
||||||
private:
|
|
||||||
float Alpha;
|
|
||||||
public:
|
|
||||||
float Current;
|
|
||||||
|
|
||||||
EMASmoother::EMASmoother() : Alpha(1.0f), Current(0.0f) {}
|
void EMASmoother::TickUnitT(float target) {
|
||||||
|
|
||||||
void TickUnitT(float target) {
|
|
||||||
Current += Alpha * (target - Current);
|
Current += Alpha * (target - Current);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tick(float target, float delta) {
|
void EMASmoother::Tick(float target, float delta) {
|
||||||
Current += std::powf(Alpha, delta) * (target - Current);
|
Current += std::powf(Alpha, delta) * (target - Current);
|
||||||
}
|
}
|
||||||
|
|
||||||
float GetAlpha() {
|
float EMASmoother::GetAlpha() {
|
||||||
return Alpha;
|
return Alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAlpha(float alpha) {
|
void EMASmoother::SetAlpha(float alpha) {
|
||||||
assert(0.0f < alpha && alpha <= 1.0f);
|
assert(0.0f < alpha && alpha <= 1.0f);
|
||||||
Alpha = alpha;
|
Alpha = alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetSmoothingTime(float t) {
|
void EMASmoother::SetSmoothingTime(float t) {
|
||||||
Alpha = 0.999f;
|
Alpha = 0.999f;
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -64,7 +64,7 @@ target("BlitzClient")
|
|||||||
if is_plat("macosx") then
|
if is_plat("macosx") then
|
||||||
add_frameworks("OpenGL")
|
add_frameworks("OpenGL")
|
||||||
elseif is_plat("windows") then
|
elseif is_plat("windows") then
|
||||||
add_ldflags("/LCTG") -- fix compiltation of glbinding
|
add_ldflags("/LTCG") -- fix compiltation of glbinding
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Assets
|
-- Assets
|
||||||
|
|||||||
Reference in New Issue
Block a user