Преглед изворни кода

Added vsync to avoid killing my eyes and a buffer fill to see what's rendered and what's left.

Florian DORMONT пре 10 година
родитељ
комит
d9806fc70f
2 измењених фајлова са 2 додато и 1 уклоњено
  1. 0 1
      src/Entity.cpp
  2. 2 0
      src/main.cpp

+ 0 - 1
src/Entity.cpp

@@ -23,4 +23,3 @@ void ENTITY::update(unsigned dt)
 		velocity += acceleration * dt;
 	 */
 }
-

+ 2 - 0
src/main.cpp

@@ -27,7 +27,9 @@ void map_loop(unsigned x, unsigned y, Map &map)
 		// Frameskip
 		if (timer_read(0) > loop_next)
 		{
+			buffer_fill(0xff0000);
 			map.render(camera, 1);
+			lcd_vsync();
 			buffer_swap();
 		}