summaryrefslogtreecommitdiff
path: root/src/Rendering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Rendering.cpp')
-rw-r--r--src/Rendering.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Rendering.cpp b/src/Rendering.cpp
index 542c679..e5209cc 100644
--- a/src/Rendering.cpp
+++ b/src/Rendering.cpp
@@ -1,5 +1,26 @@
#include "Rendering.h"
int Rendering::RENDER_SCALE = 3;
+int Rendering::GRID_WIDTH = 400;
+int Rendering::GRID_HEIGHT = 300;
int Rendering::WIDTH = GRID_WIDTH * RENDER_SCALE;
int Rendering::HEIGHT = GRID_HEIGHT * RENDER_SCALE;
+
+void Rendering::set_grid_width(int new_value)
+{
+ GRID_WIDTH = new_value;
+ WIDTH = GRID_WIDTH * RENDER_SCALE;
+}
+
+void Rendering::set_grid_height(int new_value)
+{
+ GRID_HEIGHT = new_value;
+ HEIGHT = GRID_HEIGHT * RENDER_SCALE;
+}
+
+void Rendering::set_render_scale(int new_value)
+{
+ RENDER_SCALE = new_value;
+ WIDTH = GRID_WIDTH * RENDER_SCALE;
+ HEIGHT = GRID_HEIGHT * RENDER_SCALE;
+} \ No newline at end of file