foxygit / fake-08-xbox360 Log in
commit beecb9ed989d0ec4004b2b047242c42498258834
Merge: d13eb00 1f628ae
Author:     Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Fri Feb 10 20:56:35 2023 -0700
Commit:     Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Fri Feb 10 20:56:35 2023 -0700

    Merge branch 'master' into MoreControlCodes

 source/picoluaapi.cpp    |  6 ++++--
 source/printHelper.cpp   | 14 ++++++++++++--
 test/picoluaapitests.cpp | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 48 insertions(+), 4 deletions(-)

diff --cc source/printHelper.cpp
index 91151a7,07db8fa..3501faf
--- a/source/printHelper.cpp
+++ b/source/printHelper.cpp
@@@ -120,10 -128,20 +120,20 @@@ int print(std::string str, int x, int y
      int rhsWrap = -1;


 -	for (size_t n = 0; n < str.length(); n++) {
 +	for (size_t n = 0; n < length; n++) {
  		uint8_t ch = str[n];
          framesToPause = framesBetweenChars;
- 		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);