diff options
author | Sierraffinity <sierra@domoreaweso.me> | 2020-05-20 19:28:17 -0700 |
---|---|---|
committer | Sierraffinity <sierra@domoreaweso.me> | 2020-05-20 19:33:40 -0700 |
commit | d301d438c1c48666f6d164ab53753e80cb525575 (patch) | |
tree | 5d6f1aa6243c5ffa4a357f526a90627137c291c0 | |
parent | 3617a064d2e4ecb1533e6447c5404fbe7627a884 (diff) |
Fix the fix
-rw-r--r-- | gflib/text.c | 4 | ||||
-rw-r--r-- | src/unk_text_util_2.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/gflib/text.c b/gflib/text.c index c5b4dab19..6e5af0e12 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -202,7 +202,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi } if (speed != TEXT_SPEED_FF) - CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, 2); + CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, 2); gTextPrinters[printerTemplate->windowId].active = 0; } gUnknown_03002F84 = 0; @@ -215,7 +215,7 @@ void RunTextPrinters(void) if (gUnknown_03002F84 == 0) { - for (i = 0; i < 0x20; ++i) + for (i = 0; i < NUM_TEXT_PRINTERS; ++i) { if (gTextPrinters[i].active) { diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index b1d2264e4..a0b1281a4 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -13,13 +13,13 @@ static void DecompressGlyphFont6(u16); u16 Font6Func(struct TextPrinter *textPrinter) { u16 char_; - struct TextPrinterSubStruct *sub; + struct TextPrinterSubStruct *subStruct; + subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - sub = &textPrinter->subUnion.sub; switch (textPrinter->state) { case 0: - if (gMain.heldKeys & (A_BUTTON | B_BUTTON) && sub->hasPrintBeenSpedUp) + if (gMain.heldKeys & (A_BUTTON | B_BUTTON) && subStruct->hasPrintBeenSpedUp) { textPrinter->delayCounter = 0; } @@ -28,7 +28,7 @@ u16 Font6Func(struct TextPrinter *textPrinter) textPrinter->delayCounter --; if (gTextFlags.canABSpeedUpPrint && gMain.newKeys & (A_BUTTON | B_BUTTON)) { - sub->hasPrintBeenSpedUp = TRUE; + subStruct->hasPrintBeenSpedUp = TRUE; textPrinter->delayCounter = 0; } return 3; @@ -81,7 +81,7 @@ u16 Font6Func(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentChar++; return 2; case 6: - sub->glyphId = *textPrinter->printerTemplate.currentChar; + subStruct->glyphId = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; case 7: @@ -94,7 +94,7 @@ u16 Font6Func(struct TextPrinter *textPrinter) textPrinter->state = 1; if (gTextFlags.autoScroll) { - sub->autoScrollDelay = 0; + subStruct->autoScrollDelay = 0; } return 3; case 10: |