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

@@ -5,13 +5,17 @@
#include <iostream>
#include "utils.h"
#pragma region OpenGLDrawFunctionality
void utils::SetColor( const Color4f& color )
{
glColor4f( color.r, color.g, color.b, color.a );
}
void utils::ClearBackground( const Color4f& color ) {
glClearColor(color.r, color.g, color.b, color.a);
glClear(GL_COLOR_BUFFER_BIT);
}
void utils::DrawPoint( float x, float y, float pointSize )
{
glPointSize( pointSize );
@@ -684,3 +688,7 @@ bool utils::IntersectRectLine(const Rectf& r, const Point2f& p1, const Point2f&
}
#pragma endregion CollisionFunctionality
int utils::randRange(int min, int max) {
return min + rand() % (( max + 1 ) - min);
}