mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 14:41:49 +01:00
Added the Grid, Camera, Level system
Basic player Started (Barely) on the TextureManager And other fixes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user