|
@@ -1,3 +1,5 @@
|
|
|
|
|
+#include <cstdio>
|
|
|
|
|
+#include <cstdarg>
|
|
|
#include <os.h>
|
|
#include <os.h>
|
|
|
#include "timers.h"
|
|
#include "timers.h"
|
|
|
#include "Graphics.h"
|
|
#include "Graphics.h"
|
|
@@ -11,6 +13,14 @@ using namespace WalrusRPG;
|
|
|
using namespace WalrusRPG::Graphics;
|
|
using namespace WalrusRPG::Graphics;
|
|
|
using namespace WalrusRPG::Graphics::Text;
|
|
using namespace WalrusRPG::Graphics::Text;
|
|
|
|
|
|
|
|
|
|
+void print_debug_camera_data(const Camera &camera) {
|
|
|
|
|
+ print_format(0,8, "CAM : X : %d Y: %d", camera.get_x(), camera.get_y());
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void print_debug_map_data(const Map &map) {
|
|
|
|
|
+ print_format(0,16, "MAP : W: %d, H:%d", map.get_width(), map.get_height());
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void map_loop(unsigned x, unsigned y, Map &map)
|
|
void map_loop(unsigned x, unsigned y, Map &map)
|
|
|
{
|
|
{
|
|
|
timer_mode(0, 0b0000010); // Free-running, no interrupts, divider = 1, 32 bit, wrapping
|
|
timer_mode(0, 0b0000010); // Free-running, no interrupts, divider = 1, 32 bit, wrapping
|
|
@@ -35,6 +45,10 @@ void map_loop(unsigned x, unsigned y, Map &map)
|
|
|
buffer_fill(pix);
|
|
buffer_fill(pix);
|
|
|
map.render(camera, loop_next);
|
|
map.render(camera, loop_next);
|
|
|
print_string("WalrusRPG test build \001", 0, 0);
|
|
print_string("WalrusRPG test build \001", 0, 0);
|
|
|
|
|
+
|
|
|
|
|
+ print_debug_camera_data(camera);
|
|
|
|
|
+ print_debug_map_data(map);
|
|
|
|
|
+
|
|
|
lcd_vsync();
|
|
lcd_vsync();
|
|
|
buffer_swap();
|
|
buffer_swap();
|
|
|
}
|
|
}
|