Rendering player and tiles now works.

This commit is contained in:
2016-11-27 13:53:18 +02:00
parent 914ae0de0d
commit 8173937797
35 changed files with 1160 additions and 230 deletions

10
src/math/GameMath.cpp Normal file
View File

@@ -0,0 +1,10 @@
/*
* Math.cpp
*
* Created on: Nov 26, 2016
* Author: tibi
*/
#include <math/GameMath.h>

25
src/math/GameMath.h Normal file
View File

@@ -0,0 +1,25 @@
/*
* Math.h
*
* Created on: Nov 26, 2016
* Author: tibi
*/
#ifndef MATH_GAMEMATH_H_
#define MATH_GAMEMATH_H_
template<typename TVal, typename TMin, typename TMax>
TVal clamp (TVal value, TMin min, TMax max)
{
if (value < min)
return min;
if (value > max)
return max;
return value;
}
#endif /* MATH_GAMEMATH_H_ */