summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-03-31 15:53:01 -0400
committerGriffinR <griffin.g.richards@gmail.com>2021-03-31 16:08:42 -0400
commit86856098a35b58eabb74db1d41cb9a2853c6746f (patch)
tree0c102af56810d59c51b521e150ef5425032c5086 /include
parentc40fb9288cf02f2cba1b72c7377d6272a0eef6f2 (diff)
Document Dewford Trend
Diffstat (limited to 'include')
-rw-r--r--include/constants/flags.h2
-rw-r--r--include/constants/global.h1
-rw-r--r--include/dewford_trend.h5
-rw-r--r--include/global.h13
-rw-r--r--include/tv.h2
5 files changed, 12 insertions, 11 deletions
diff --git a/include/constants/flags.h b/include/constants/flags.h
index 21b730de3..798b42d4d 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -1402,7 +1402,7 @@
#define FLAG_SYS_TV_HOME (SYSTEM_FLAGS + 0x30)
#define FLAG_SYS_TV_WATCH (SYSTEM_FLAGS + 0x31)
#define FLAG_SYS_TV_START (SYSTEM_FLAGS + 0x32)
-#define FLAG_SYS_POPWORD_INPUT (SYSTEM_FLAGS + 0x33)
+#define FLAG_SYS_CHANGED_DEWFORD_TREND (SYSTEM_FLAGS + 0x33)
#define FLAG_SYS_MIX_RECORD (SYSTEM_FLAGS + 0x34)
#define FLAG_SYS_CLOCK_SET (SYSTEM_FLAGS + 0x35)
#define FLAG_SYS_NATIONAL_DEX (SYSTEM_FLAGS + 0x36)
diff --git a/include/constants/global.h b/include/constants/global.h
index 213ccca5b..9b0c46ce4 100644
--- a/include/constants/global.h
+++ b/include/constants/global.h
@@ -52,6 +52,7 @@
#define NUM_CONTEST_WINNERS 13
#define UNION_ROOM_KB_ROW_COUNT 10
#define GIFT_RIBBONS_COUNT 11
+#define SAVED_TRENDS_COUNT 5
#define PYRAMID_BAG_ITEMS_COUNT 10
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
diff --git a/include/dewford_trend.h b/include/dewford_trend.h
index a7ed006f0..6a3194468 100644
--- a/include/dewford_trend.h
+++ b/include/dewford_trend.h
@@ -2,10 +2,9 @@
#define GUARD_DEWFORDTREND_H
void InitDewfordTrend(void);
-void UpdateDewfordTrendPerDay(u16);
void UpdateDewfordTrendPerDay(u16 days);
-bool8 IsPhraseTrendy(u16 *a);
-void ReceiveEasyChatPairsData(struct EasyChatPair *a, size_t b, u8 unused);
+bool8 TrySetTrendyPhrase(u16 *phrase);
+void ReceiveDewfordTrendData(struct DewfordTrend *linkedTrends, size_t size, u8 unused);
#endif // GUARD_DEWFORDTREND_H
diff --git a/include/global.h b/include/global.h
index 7806c0b59..497fb40b1 100644
--- a/include/global.h
+++ b/include/global.h
@@ -587,12 +587,13 @@ struct RamScript
struct RamScriptData data;
};
-struct EasyChatPair
+// See dewford_trend.c
+struct DewfordTrend
{
- u16 unk0_0:7;
- u16 unk0_7:7;
- u16 unk1_6:1;
- u16 unk2;
+ u16 trendiness:7;
+ u16 maxTrendiness:7;
+ u16 gainingTrendiness:1;
+ u16 rand;
u16 words[2];
}; /*size = 0x8*/
@@ -1021,7 +1022,7 @@ struct SaveBlock1
/*0x2BE0*/ struct MailStruct mail[MAIL_COUNT];
/*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system
/*0x2E28*/ OldMan oldMan;
- /*0x2e64*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
+ /*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
/*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_*
/*0x3030*/ struct DayCare daycare;
/*0x3150*/ struct LinkBattleRecords linkBattleRecords;
diff --git a/include/tv.h b/include/tv.h
index 482909499..f94c5b7e5 100644
--- a/include/tv.h
+++ b/include/tv.h
@@ -31,7 +31,7 @@ void AlertTVThatPlayerPlayedRoulette(u16 nCoinsSpent);
void AlertTVOfNewCoinTotal(u16 nCoinsPaidOut);
void TryPutSecretBaseSecretsOnAir(void);
void TryPutTodaysRivalTrainerOnAir(void);
-void sub_80EDC60(const u16 *words);
+void TryPutTrendWatcherOnAir(const u16 *words);
void sub_80EDA80(void);
void ReceivePokeNewsData(void *src, u32 size, u8 masterIdx);
void sub_80F0BB8(void);