diff --git a/source/main.cpp b/source/main.cpp index dda44c2..93fdefd 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -467,9 +467,9 @@ static void __attribute__((noinline)) show_intro() { fade = abs(((get_frame_count() / 6) % 24) - 12); global_next_frame(); - start_pressed = key_hit(KEY_START) | key_hit(KEY_A); + start_pressed = key_hit(KEY_START) | key_hit(KEY_A) | true; REG_BLDALPHA = BLDA_BUILD(0b10000, fade); - }; + } } int main(void) diff --git a/source/text_engine.cpp b/source/text_engine.cpp index da63cd7..65fe827 100644 --- a/source/text_engine.cpp +++ b/source/text_engine.cpp @@ -341,13 +341,18 @@ int ptgb_write(const byte *text, bool instant, int length) wait_for_user_to_continue(true); break; case 0xFC: + ch = *str; + str++; + num += 1; if (DISPLAY_CONTROL_CHAR) { - tc->drawgProc(0xB9); + for (uint i = 0; i < ch; i++){ + tc->drawgProc(0xB9); + } } else { - tc->cursorX += tc->font->widths[0xFC]; + tc->cursorX += tc->font->widths[0xFC] * ch; } break; case 0xFE: diff --git a/tools/text_helper/main.py b/tools/text_helper/main.py index 344b5ca..6e8005b 100644 --- a/tools/text_helper/main.py +++ b/tools/text_helper/main.py @@ -204,9 +204,8 @@ def split_sentence_into_lines(sentence, offset, pixelsPerChar, pixelsInLine, cen offset = 0 if (centered and (len(words) > 0) and words[0] != 'ɑ'): count = ((pixelsInLine - lineLength) // 2) - for i in range(count): - currLine = "_" + currLine - lineLength += 1 # This character should *always* be one pixel wide + currLine = f'_[{count}]{currLine}' + lineLength += count outStr += currLine return lineLength + offset, lineCount, outStr, centered @@ -383,8 +382,20 @@ def convert_item(ogDict, lang): byteStr = "" arr = charArrayOfLanguage[lang]["array"] - for char in outStr[:-1]: - byteStr += f"{convert_char_to_byte(ord(char), arr, lang):02x} " + i = 0 + while i < len(outStr[:-1]): + char = outStr[i] + if (char == '['): + val = '' + i += 1 + while outStr[i] != ']': + val = val + outStr[i] + i += 1 + num = int(val) + byteStr += f"{num:02x} " + else: + byteStr += f"{convert_char_to_byte(ord(char), arr, lang):02x} " + i += 1 if (len(outStr) > 0 and outStr[-1] != ' '): # Check if the last char is a space byteStr += f"{convert_char_to_byte(ord(outStr[-1]), arr, lang):02x} "