From d9714fb284b807073ce6c5ae7fa4032b03897306 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Thu, 5 Dec 2019 22:03:05 -0500 Subject: [PATCH] Add more stuff to debug information. --- infimap.lua | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/infimap.lua b/infimap.lua index 3a67fb0..5ff8bb2 100644 --- a/infimap.lua +++ b/infimap.lua @@ -16,14 +16,19 @@ function _draw() -- the screen is 128x128 pixels, so we can only draw 16x16 sprites map(camera_pos[1], camera_pos[2], 0, 0, 16, 16) draw_player() - debug_me_baby() -end - -function debug_me_baby() if debug then - clip(0, 0, 32, 8) - rectfill(0, 0, 32, 8, 0) - print(stat(0), 0, 0, 15) - clip() + render_debug_info() end end + +function render_debug_info() + clip(0, 0, 32, 32) + rectfill(0, 0, 32, 32, 0) + print(stat(0), 0, 0, 15) + print(camera_pos[1], 0, 8, 15) + print(camera_pos[2], 16, 8, 15) + print(facing[1], 0, 16, 15) + print(facing[2], 16, 16, 15) + print(player_lookup[facing], 0, 24, 15) + clip() +end