From e0c63e78afbc5a4ea34462376fae223da0385c03 Mon Sep 17 00:00:00 2001
From: Claudio Hoffmann <hoffmanncl72341@th-nuernberg.de>
Date: Mon, 18 Jan 2021 16:35:57 +0100
Subject: [PATCH] GameLoop: Remove the ancient border around the framebuffer

---
 main.cpp | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/main.cpp b/main.cpp
index db2aa15..22d9de7 100644
--- a/main.cpp
+++ b/main.cpp
@@ -60,14 +60,7 @@ class GameLoop {
     Score Highscore = {screenWidth,screenHeigth};
 public:
     void run(Platform& platform, FloatSeconds const &frame_time, Level &level, Player &player_) {
-        for(int y = 0; y < framebuffer.h(); ++y) {
-            for(int x = 0; x < framebuffer.w(); ++x) {
-                framebuffer.at({ x, y }) =
-                    (y == 0 || y == (framebuffer.h() - 1)) ? _t :
-                    (x == 0 || x == (framebuffer.w() - 1)) ? _t :
-                    _0;
-            }
-        }
+        framebuffer.clear(_0);
 
         if(frame_time.count() != 0.0f) {
             if(!debug){
-- 
GitLab