From 4dcc758f6f32a59201bc417345263291665a8530 Mon Sep 17 00:00:00 2001 From: Jon Bell Date: Sat, 2 Dec 2023 09:07:07 -0700 Subject: [PATCH] add logging, comment out stuff --- source/logger.cpp | 4 ++-- source/p8GlobalLuaFunctions.h | 22 +++++++++++----------- source/printHelper.cpp | 6 ++++-- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/source/logger.cpp b/source/logger.cpp index 87eba077..7fac296d 100644 --- a/source/logger.cpp +++ b/source/logger.cpp @@ -4,9 +4,9 @@ #include "logger.h" -#define LOGGER_ENABLED false +#define LOGGER_ENABLED true -#define PRINT_TO_CONSOLE false +#define PRINT_TO_CONSOLE true FILE * m_file = nullptr; bool m_enabled = false; diff --git a/source/p8GlobalLuaFunctions.h b/source/p8GlobalLuaFunctions.h index 943ea79b..2cf71cb0 100644 --- a/source/p8GlobalLuaFunctions.h +++ b/source/p8GlobalLuaFunctions.h @@ -352,17 +352,17 @@ function load(arg) success, msg = __load(arg), "" - /* - if success then - print('ok') - else - color(14) - print('failed') - local x,y = cursor() - cursor(0, y) - print(msg) - end - */ + + --if success then + -- print('ok') + --else + -- color(14) + -- print('failed') + -- local x,y = cursor() + -- cursor(0, y) + -- print(msg) + --end + end --todo: make this bettter/verify the list diff --git a/source/printHelper.cpp b/source/printHelper.cpp index c7b435bc..9656571b 100644 --- a/source/printHelper.cpp +++ b/source/printHelper.cpp @@ -230,7 +230,8 @@ int print(std::string str, int x, int y, uint8_t c) { //pause for x num frames int frameCount = pow2(p0CharToNum(commandChar) - 1); while (frameCount > 0){ - _ph_vm->vm_flip(); + //TODO: yield here? not sure how to handle this + //_ph_vm->vm_flip(); frameCount--; } @@ -484,7 +485,8 @@ int print(std::string str, int x, int y, uint8_t c) { forceCharHeight); while (framesToPause > 0){ - _ph_vm->vm_flip(); + //TODO: yield here? not sure how to handle this + //_ph_vm->vm_flip(); framesToPause--; }