Explorar o código

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

Florian DORMONT %!s(int64=10) %!d(string=hai) anos
pai
achega
d9806fc70f
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  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();
 		}