diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2019-02-01 11:56:02 +0100 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2019-02-01 11:56:02 +0100 |
commit | e3bec4b4809201d5007f0ae8e9e997235344ee03 (patch) | |
tree | 67cbb78b824cb31f712ec06d8871109e4cc43d60 | |
parent | 7c8fb66acf964ba4cf6b5dd5af16b70b596c477b (diff) |
fix nonmatch in mauville old man
-rw-r--r-- | src/mauville_old_man.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 930f1f35b..1b4a25217 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -572,9 +572,6 @@ static void Task_BardSong(u8 taskId) struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; u8 *str = gStringVar4 + task->tCharIndex; u16 wordLen = 0; - // Can't get it to match without hacking - u32 temp; - register s16 zero asm("r1"); while (*str != CHAR_SPACE && *str != CHAR_NEWLINE @@ -588,17 +585,22 @@ static void Task_BardSong(u8 taskId) sUnknownBardRelated = MACRO2(bard->songLyrics[task->tCurrWord]); else sUnknownBardRelated = MACRO2(bard->temporaryLyrics[task->tCurrWord]); - temp = gBardSong.length / wordLen; - zero = 0; - gBardSong.length = temp; + + gBardSong.length /= wordLen; if (gBardSong.length <= 0) gBardSong.length = 1; task->tCurrWord++; + if (task->data[2] == 0) + { task->tState = 3; + task->data[1] = 0; + } else + { task->tState = 5; - task->data[1] = zero; + task->data[1] = 0; + } } break; case 5: |