commit 1f628aeaebbcf30de14bd4d14cadace4bdd8794c
Author: Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Fri Feb 10 20:55:23 2023 -0700
Commit: Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Fri Feb 10 20:55:23 2023 -0700
Fi whitespace
---
source/picoluaapi.cpp | 8 ++++----
source/printHelper.cpp | 22 +++++++++++-----------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/source/picoluaapi.cpp b/source/picoluaapi.cpp
index 9cdb4b1..bef7550 100644
--- a/source/picoluaapi.cpp
+++ b/source/picoluaapi.cpp
@@ -310,12 +310,12 @@ int print(lua_State *L){
str = "[nil]";
}
else if (lua_isstring(L, 1)){
- size_t len;
- const char *raw_string = lua_tolstring(L, 1, &len);
- str = std::string(raw_string, len);
+ size_t len;
+ const char *raw_string = lua_tolstring(L, 1, &len);
+ str = std::string(raw_string, len);
}
else if (lua_isnumber(L, 1)){
- str = lua_tolstring(L, 1, nullptr) ;
+ str = lua_tolstring(L, 1, nullptr);
}
else if (lua_isboolean(L, 1)){
str = lua_toboolean(L, 1) ? "true" : "false";
diff --git a/source/printHelper.cpp b/source/printHelper.cpp
index e1bccbb..07db8fa 100644
--- a/source/printHelper.cpp
+++ b/source/printHelper.cpp
@@ -131,17 +131,17 @@ int print(std::string str, int x, int y, uint8_t c) {
for (size_t n = 0; n < str.length(); n++) {
uint8_t ch = str[n];
framesToPause = framesBetweenChars;
- if (ch == 0) { // null stop printing
- _ph_mem->drawState.text_x=x;
- _ph_mem->drawState.text_y=y;
-
- //restore palette
- for(int i = 0; i < 16; i++) {
- _ph_mem->drawState.drawPaletteMap[i] = prevDrawPal[i];
- }
- return x;
- }
- else if (ch == 1) { // "\*{p0}" repeat the next character p0 times
+ if (ch == 0) { // null stop printing
+ _ph_mem->drawState.text_x=x;
+ _ph_mem->drawState.text_y=y;
+
+ //restore palette
+ for(int i = 0; i < 16; i++) {
+ _ph_mem->drawState.drawPaletteMap[i] = prevDrawPal[i];
+ }
+ return x;
+ }
+ else if (ch == 1) { // "\*{p0}" repeat the next character p0 times
uint8_t timesChr = str[++n];
int times = p0CharToNum(timesChr);