mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 03:57:38 +01:00
fix nonmatch in mauville old man
This commit is contained in:
parent
7c8fb66acf
commit
e3bec4b480
@ -572,9 +572,6 @@ static void Task_BardSong(u8 taskId)
|
|||||||
struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
|
struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
|
||||||
u8 *str = gStringVar4 + task->tCharIndex;
|
u8 *str = gStringVar4 + task->tCharIndex;
|
||||||
u16 wordLen = 0;
|
u16 wordLen = 0;
|
||||||
// Can't get it to match without hacking
|
|
||||||
u32 temp;
|
|
||||||
register s16 zero asm("r1");
|
|
||||||
|
|
||||||
while (*str != CHAR_SPACE
|
while (*str != CHAR_SPACE
|
||||||
&& *str != CHAR_NEWLINE
|
&& *str != CHAR_NEWLINE
|
||||||
@ -588,17 +585,22 @@ static void Task_BardSong(u8 taskId)
|
|||||||
sUnknownBardRelated = MACRO2(bard->songLyrics[task->tCurrWord]);
|
sUnknownBardRelated = MACRO2(bard->songLyrics[task->tCurrWord]);
|
||||||
else
|
else
|
||||||
sUnknownBardRelated = MACRO2(bard->temporaryLyrics[task->tCurrWord]);
|
sUnknownBardRelated = MACRO2(bard->temporaryLyrics[task->tCurrWord]);
|
||||||
temp = gBardSong.length / wordLen;
|
|
||||||
zero = 0;
|
gBardSong.length /= wordLen;
|
||||||
gBardSong.length = temp;
|
|
||||||
if (gBardSong.length <= 0)
|
if (gBardSong.length <= 0)
|
||||||
gBardSong.length = 1;
|
gBardSong.length = 1;
|
||||||
task->tCurrWord++;
|
task->tCurrWord++;
|
||||||
|
|
||||||
if (task->data[2] == 0)
|
if (task->data[2] == 0)
|
||||||
|
{
|
||||||
task->tState = 3;
|
task->tState = 3;
|
||||||
|
task->data[1] = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
task->tState = 5;
|
task->tState = 5;
|
||||||
task->data[1] = zero;
|
task->data[1] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
Loading…
Reference in New Issue
Block a user