summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPokeCodec <67983839+PokeCodec@users.noreply.github.com>2020-09-09 17:02:52 -0400
committerPokeCodec <67983839+PokeCodec@users.noreply.github.com>2020-09-09 17:02:52 -0400
commit08696108e1848e79397ac6b843a18280fa3c3596 (patch)
tree7d4bcdaa02d400d4eafe447cc60ad24f86075c42 /src
parentf50ecf5c66a0abbb2ab5777843e1e029f22d150d (diff)
Match dewford
Diffstat (limited to 'src')
-rw-r--r--src/dewford_trend.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/dewford_trend.c b/src/dewford_trend.c
index ff1b09041..392a880ae 100644
--- a/src/dewford_trend.c
+++ b/src/dewford_trend.c
@@ -219,20 +219,37 @@ void BufferTrendyPhraseString(void)
ConvertEasyChatWordsToString(gStringVar1, s->words, 2, 1);
}
+#ifndef NONMATCHING
void TrendyPhraseIsOld(void)
{
- u16 result = 0;
+ u8 result = 0;
+
+ do
+ {
+ if (gSaveBlock1Ptr->easyChatPairs[0].unk0_0 - gSaveBlock1Ptr->easyChatPairs[1].unk0_0 > 1)
+ break;
+ if (gSaveBlock1Ptr->easyChatPairs[0].unk1_6)
+ break;
+ if (!gSaveBlock1Ptr->easyChatPairs[1].unk1_6)
+ break;
+ result = 1;
+ } while (0);
+
+ gSpecialVar_Result = result;
+}
+#else
+void TrendyPhraseIsOld(void)
+{
+ u8 result = 0;
if (gSaveBlock1Ptr->easyChatPairs[0].unk0_0 - gSaveBlock1Ptr->easyChatPairs[1].unk0_0 < 2)
{
- #ifndef NONMATCHING
- asm("":::"r2"); //Force the compiler to store address of gSaveBlock1 in r3 instead of r2
- #endif
if (!gSaveBlock1Ptr->easyChatPairs[0].unk1_6 && gSaveBlock1Ptr->easyChatPairs[1].unk1_6)
result = 1;
}
gSpecialVar_Result = result;
}
+#endif
void GetDewfordHallPaintingNameIndex(void)
{