Basic screen system

This commit is contained in:
Bram Verhulst
2024-04-02 10:17:20 +02:00
parent 0f9bb76973
commit df9e2f0b64
15 changed files with 404 additions and 410 deletions

View File

@@ -2,7 +2,7 @@
#include "utils.h"
#include "../Game/Player.h"
#include "../Game/WorldTile.h"
#include "../Game/GridSystem/WorldTile.h"
namespace Collision
{

View File

@@ -65,6 +65,7 @@ Rectf::Rectf(float left, float bottom, float width, float height)
, width { width }
, height { height } {
}
Rectf::Rectf(Point2f pos, Point2f size): left(pos.x), bottom(pos.y), width(size.x), height(size.y) {}
// Rectf::Rectf(int left, int bottom, int width, int height) : left { (float)left }, bottom { (float)bottom }, width { (float)width }, height { (float)height } {
// }

View File

@@ -38,6 +38,7 @@ struct Rectf
{
Rectf( );
explicit Rectf( float left, float bottom, float width, float height );
Rectf(Point2f pos, Point2f size);
//explicit Rectf( int left, int bottom, int width, int height ); //Stupid fix for it giving an error (same as Point2f)
Point2f BottomLeft() const { return Point2f{ left, bottom }; }

File diff suppressed because it is too large Load Diff

View File

@@ -111,4 +111,6 @@ namespace utils
bool isMouseDown(int button);
bool isKeyUp(int keycode);
Point2f GetMousePos();
}