Added the Grid, Camera, Level system

Basic player
Started (Barely) on the TextureManager
And other fixes
This commit is contained in:
Bram Verhulst
2024-03-11 03:29:44 +01:00
parent f7c2262e10
commit d6bb3add26
35 changed files with 991 additions and 62 deletions

View File

@@ -20,6 +20,21 @@ Point2f::Point2f()
Point2f::Point2f(float x, float y)
: x { x }, y { y } {
}
Point2f Point2f::operator+(const Point2f& other) const {
return Point2f { x + other.x, y + other.y };
}
Point2f Point2f::operator*(float other) const {
return Point2f { x * other, y * other };
}
Point2f Point2f::operator*(const Point2f& other) const {
return Point2f { x * other.x, y * other.y };
}
Point2f Point2f::operator*(int other) const {
return Point2f { x * float(other), y * float(other) };
}
Point2f Point2f::operator/(float other) const {
return Point2f { x / other, y / other };
}
// Point2f::Point2f(int x, int y)
// : x { (float)x }, y { (float)y } {