diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/berry.c | 5 | ||||
-rw-r--r-- | src/easy_chat.c | 7 | ||||
-rw-r--r-- | src/mail.c | 2 | ||||
-rw-r--r-- | src/pokemon_size_record.c | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/src/berry.c b/src/berry.c index 456ab1565..b92a41ed4 100644 --- a/src/berry.c +++ b/src/berry.c @@ -916,7 +916,10 @@ const struct UnkStruct_0858AB24 gUnknown_83DFC9C[] = { // Leftover from R/S const struct BerryTree gBlankBerryTree = {}; -#define ENIGMA_BERRY_STRUCT ({const struct Berry2 *berries = (const struct Berry2 *)gBerries;berries[ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX];}) +#define ENIGMA_BERRY_STRUCT ({ \ + const struct Berry2 * berries = (const struct Berry2 *)gBerries; \ + berries[ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX]; \ +}) void sub_809C718(void) { diff --git a/src/easy_chat.c b/src/easy_chat.c index 089991e73..ab998a2ae 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -51,7 +51,7 @@ static u16 GetUnlockedWordsInECGroup(u16); static u16 GetUnlockedWordsInAlphabeticalGroup(u16); static bool8 UnlockedECMonOrMove(u16, u8); static int EC_IsDeoxys(u16 species); -static u8 IsWordUnlocked(u16 word); +static bool8 IsWordUnlocked(u16 word); #include "data/easy_chat/easy_chat_groups.h" #include "data/easy_chat/easy_chat_words_by_letter.h" @@ -496,7 +496,7 @@ void ResetSomeMEventECBuffer_3120_338(void) bool8 InitEasyChatSelection(void) { sEasyChatSelectionData = Alloc(sizeof(*sEasyChatSelectionData)); - if (!sEasyChatSelectionData) + if (sEasyChatSelectionData == NULL) return FALSE; PopulateECGroups(); @@ -731,7 +731,7 @@ static int EC_IsDeoxys(u16 species) return FALSE; } -static u8 IsWordUnlocked(u16 easyChatWord) +static bool8 IsWordUnlocked(u16 easyChatWord) { u8 groupId = EC_GROUP(easyChatWord); u32 index = EC_INDEX(easyChatWord); @@ -740,4 +740,3 @@ static u8 IsWordUnlocked(u16 easyChatWord) else return UnlockedECMonOrMove(index, groupId); } - diff --git a/src/mail.c b/src/mail.c index 7d5e33944..dbdf48ac7 100644 --- a/src/mail.c +++ b/src/mail.c @@ -62,7 +62,7 @@ struct MailViewResources { u8 authorNameBuffer[12]; void (*savedCallback)(void); void (*showMailCallback)(void); - struct MailStruct *mail; + struct MailStruct * mail; bool8 messageExists; u8 nameX; u8 mailType; diff --git a/src/pokemon_size_record.c b/src/pokemon_size_record.c index c5223c153..06e23618d 100644 --- a/src/pokemon_size_record.c +++ b/src/pokemon_size_record.c @@ -209,7 +209,7 @@ void GiveGiftRibbonToParty(u8 index, u8 ribbonId) { struct Pokemon * mon = &gPlayerParty[i]; - if (GetMonData(mon, MON_DATA_SPECIES) != 0 && GetMonData(mon, MON_DATA_SANITY_IS_EGG) == 0) + if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE && !GetMonData(mon, MON_DATA_SANITY_IS_EGG)) { SetMonData(mon, array[index], &data); gotRibbon = TRUE; |