From 053aa9e91a7247775c488eff33253c8404dd255d Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 10 Oct 2018 11:39:26 +0100 Subject: [PATCH] Rect class GetX, GetY, GetW, GetH now exist for camera calculations in the future --- crumpet-engine/rect.cpp | 16 ++++++++++++++++ crumpet-engine/rect.h | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/crumpet-engine/rect.cpp b/crumpet-engine/rect.cpp index 42fe968..5bcd28f 100644 --- a/crumpet-engine/rect.cpp +++ b/crumpet-engine/rect.cpp @@ -116,6 +116,22 @@ int Rect::Area() { return (w + h); } +int Rect::GetX() { + return x; +} + +int Rect::GetY() { + return y; +} + +int Rect::GetW() { + return w; +} + +int Rect::GetH() { + return h; +} + void Rect::SetRect(int x, int y, int w, int h) { this->x = x; this->y = y; diff --git a/crumpet-engine/rect.h b/crumpet-engine/rect.h index e2b6484..f3e7ae5 100644 --- a/crumpet-engine/rect.h +++ b/crumpet-engine/rect.h @@ -50,6 +50,11 @@ public: int Perimiter(); int Area(); + int GetX(); + int GetY(); + int GetW(); + int GetH(); + void SetRect(int x, int y, int w, int h); void SetSize(Vec2* size); void SetPos(Vec2* pos);