22 files changed
+479
-455
No files matched your search
@@ -7,7 +7,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide::
|
||||
goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
|
||||
checkitem ITEM_SCANNER
|
||||
goto_if_eq VAR_RESULT, TRUE, AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner
|
||||
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
|
||||
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
|
||||
msgbox AbandonedShip_CaptainsOffice_Text_NoSuccessFindingScanner, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"trainer_type": "TRAINER_TYPE_NONE",
|
||||
"trainer_sight_or_berry_tree_id": "0",
|
||||
"script": "AbandonedShip_HiddenFloorRooms_EventScript_ItemScanner",
|
||||
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER"
|
||||
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",
|
||||
|
||||
@@ -64,9 +64,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics::
|
||||
MauvilleCity_PokemonCenter_1F_EventScript_Hipster::
|
||||
lock
|
||||
faceplayer
|
||||
setflag FLAG_SYS_HIPSTER_MEET
|
||||
setflag FLAG_UNLOCKED_TRENDY_SAYINGS
|
||||
msgbox MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening, MSGBOX_DEFAULT
|
||||
special GetHipsterSpokenFlag
|
||||
special HasHipsterTaughtWord
|
||||
goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord
|
||||
msgbox MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou, MSGBOX_DEFAULT
|
||||
release
|
||||
@@ -80,8 +80,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord::
|
||||
end
|
||||
|
||||
MauvilleCity_PokemonCenter_1F_EventScript_TeachWord::
|
||||
msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase, MSGBOX_DEFAULT
|
||||
special SetHipsterSpokenFlag
|
||||
msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfWord, MSGBOX_DEFAULT
|
||||
special SetHipsterTaughtWord
|
||||
release
|
||||
end
|
||||
|
||||
@@ -969,7 +969,7 @@ MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach:
|
||||
.string "what's hip and happening.\p"
|
||||
.string "I've got nothing new to teach you!$"
|
||||
|
||||
MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase:
|
||||
MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfWord:
|
||||
.string "Hey, have you heard about\n"
|
||||
.string "“{STR_VAR_1}”?\p"
|
||||
.string "What's it mean? Well…\n"
|
||||
|
||||
+2
-2
@@ -111,8 +111,8 @@ gSpecials::
|
||||
def_special Script_GetCurrentMauvilleMan
|
||||
def_special HasBardSongBeenChanged
|
||||
def_special SaveBardSongLyrics
|
||||
def_special GetHipsterSpokenFlag
|
||||
def_special SetHipsterSpokenFlag
|
||||
def_special HasHipsterTaughtWord
|
||||
def_special SetHipsterTaughtWord
|
||||
def_special HipsterTryTeachWord
|
||||
def_special PlayBardSong
|
||||
def_special SetMauvilleOldManObjEventGfx
|
||||
|
||||
@@ -1095,7 +1095,7 @@
|
||||
#define EC_WORD_OLD ((EC_GROUP_TRENDY_SAYING << EC_MASK_BITS) | 30)
|
||||
#define EC_WORD_YOUNG ((EC_GROUP_TRENDY_SAYING << EC_MASK_BITS) | 31)
|
||||
#define EC_WORD_UGLY ((EC_GROUP_TRENDY_SAYING << EC_MASK_BITS) | 32)
|
||||
#define NUM_ADDITIONAL_PHRASES 33
|
||||
#define NUM_TRENDY_SAYINGS 33
|
||||
|
||||
// Special Berry Masters Wife phrases
|
||||
#define NOT_SPECIAL_PHRASE 0
|
||||
|
||||
@@ -1123,7 +1123,7 @@
|
||||
#define FLAG_ITEM_NEW_MAUVILLE_ULTRA_BALL 0x433
|
||||
#define FLAG_ITEM_NEW_MAUVILLE_ESCAPE_ROPE 0x434
|
||||
#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_6_LUXURY_BALL 0x435
|
||||
#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER 0x436
|
||||
#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER 0x436
|
||||
#define FLAG_ITEM_SCORCHED_SLAB_TM11 0x437
|
||||
#define FLAG_ITEM_METEOR_FALLS_B1F_2R_TM02 0x438
|
||||
#define FLAG_ITEM_SHOAL_CAVE_ENTRANCE_BIG_PEARL 0x439
|
||||
@@ -1348,7 +1348,7 @@
|
||||
#define FLAG_UNUSED_0x863 (SYSTEM_FLAGS + 0x3) // Unused Flag
|
||||
#define FLAG_SYS_GAME_CLEAR (SYSTEM_FLAGS + 0x4)
|
||||
#define FLAG_SYS_CHAT_USED (SYSTEM_FLAGS + 0x5)
|
||||
#define FLAG_SYS_HIPSTER_MEET (SYSTEM_FLAGS + 0x6)
|
||||
#define FLAG_UNLOCKED_TRENDY_SAYINGS (SYSTEM_FLAGS + 0x6)
|
||||
|
||||
// Badges
|
||||
#define FLAG_BADGE01_GET (SYSTEM_FLAGS + 0x7)
|
||||
|
||||
@@ -190,6 +190,9 @@
|
||||
#define FRIENDSHIP_200_TO_254 5
|
||||
#define FRIENDSHIP_MAX 6
|
||||
|
||||
// Friendship value that the majority of species use. This was changed in Generation 8 to 50.
|
||||
#define STANDARD_FRIENDSHIP 70
|
||||
|
||||
#define MAX_FRIENDSHIP 255
|
||||
#define MAX_SHEEN 255
|
||||
#define MAX_CONDITION 255
|
||||
|
||||
+2
-2
@@ -128,11 +128,11 @@ void InitializeEasyChatWordArray(u16 *words, u16 length);
|
||||
u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows);
|
||||
bool8 IsBardWordInvalid(u16 word);
|
||||
u16 GetRandomEasyChatWordFromGroup(u16 group);
|
||||
u16 GetNewHipsterPhraseToTeach(void);
|
||||
u16 UnlockRandomTrendySaying(void);
|
||||
u16 EasyChat_GetNumWordsInGroup(u8);
|
||||
u16 GetRandomEasyChatWordFromUnlockedGroup(u16);
|
||||
void DoEasyChatScreen(u8 type, u16 *words, MainCallback callback, u8 displayedPersonType);
|
||||
void InitQuestionnaireWords(void);
|
||||
void UnlockAdditionalPhrase(u8 additionalPhraseId);
|
||||
void UnlockTrendySaying(u8 wordIndex);
|
||||
|
||||
#endif // GUARD_EASYCHAT_H
|
||||
@@ -32,7 +32,7 @@ bool8 TryDoDiveWarp(struct MapPosition *position, u16 b);
|
||||
int SetCableClubWarp(void);
|
||||
u8 TrySetDiveWarp(void);
|
||||
const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, u8 direction);
|
||||
u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position);
|
||||
const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position);
|
||||
void ClearPoisonStepCounter(void);
|
||||
|
||||
#endif // GUARD_FIELDCONTROLAVATAR_H
|
||||
+2
-2
@@ -48,8 +48,8 @@ void LoadSecondaryTilesetPalette(struct MapLayout const *mapLayout);
|
||||
void CopySecondaryTilesetToVramUsingHeap(struct MapLayout const *mapLayout);
|
||||
void CopyPrimaryTilesetToVram(const struct MapLayout *);
|
||||
void CopySecondaryTilesetToVram(const struct MapLayout *);
|
||||
struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection);
|
||||
struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y);
|
||||
const struct MapHeader *const GetMapHeaderFromConnection(const struct MapConnection *connection);
|
||||
const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y);
|
||||
void MapGridSetMetatileImpassabilityAt(int x, int y, bool32 impassable);
|
||||
|
||||
// field_region_map.c
|
||||
|
||||
+11
-11
@@ -50,10 +50,10 @@ struct MapLayout
|
||||
{
|
||||
/*0x00*/ s32 width;
|
||||
/*0x04*/ s32 height;
|
||||
/*0x08*/ u16 *border;
|
||||
/*0x0C*/ u16 *map;
|
||||
/*0x10*/ struct Tileset *primaryTileset;
|
||||
/*0x14*/ struct Tileset *secondaryTileset;
|
||||
/*0x08*/ const u16 *border;
|
||||
/*0x0C*/ const u16 *map;
|
||||
/*0x10*/ const struct Tileset *primaryTileset;
|
||||
/*0x14*/ const struct Tileset *secondaryTileset;
|
||||
};
|
||||
|
||||
struct BackupMapLayout
|
||||
@@ -98,7 +98,7 @@ struct CoordEvent
|
||||
u8 elevation;
|
||||
u16 trigger;
|
||||
u16 index;
|
||||
u8 *script;
|
||||
const u8 *script;
|
||||
};
|
||||
|
||||
struct BgEvent
|
||||
@@ -107,7 +107,7 @@ struct BgEvent
|
||||
u8 elevation;
|
||||
u8 kind; // The "kind" field determines how to access bgUnion union below.
|
||||
union {
|
||||
u8 *script;
|
||||
const u8 *script;
|
||||
struct {
|
||||
u16 item;
|
||||
u16 hiddenItemId;
|
||||
@@ -122,10 +122,10 @@ struct MapEvents
|
||||
u8 warpCount;
|
||||
u8 coordEventCount;
|
||||
u8 bgEventCount;
|
||||
struct ObjectEventTemplate *objectEvents;
|
||||
struct WarpEvent *warps;
|
||||
struct CoordEvent *coordEvents;
|
||||
struct BgEvent *bgEvents;
|
||||
const struct ObjectEventTemplate *objectEvents;
|
||||
const struct WarpEvent *warps;
|
||||
const struct CoordEvent *coordEvents;
|
||||
const struct BgEvent *bgEvents;
|
||||
};
|
||||
|
||||
struct MapConnection
|
||||
@@ -139,7 +139,7 @@ struct MapConnection
|
||||
struct MapConnections
|
||||
{
|
||||
s32 count;
|
||||
struct MapConnection *connections;
|
||||
const struct MapConnection *connections;
|
||||
};
|
||||
|
||||
struct MapHeader
|
||||
|
||||
+5
-5
@@ -27,8 +27,8 @@
|
||||
/// IDE support
|
||||
#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__)
|
||||
// We define these when using certain IDEs to fool preproc
|
||||
#define _(x) (x)
|
||||
#define __(x) (x)
|
||||
#define _(x) {x}
|
||||
#define __(x) {x}
|
||||
#define INCBIN(...) {0}
|
||||
#define INCBIN_U8 INCBIN
|
||||
#define INCBIN_U16 INCBIN
|
||||
@@ -133,7 +133,7 @@
|
||||
// values that don't appear in the Pokedex. NATIONAL_DEX_COUNT does not include these values.
|
||||
#define NUM_DEX_FLAG_BYTES ROUND_BITS_TO_BYTES(NUM_SPECIES)
|
||||
#define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT)
|
||||
#define NUM_ADDITIONAL_PHRASE_BYTES ROUND_BITS_TO_BYTES(NUM_ADDITIONAL_PHRASES)
|
||||
#define NUM_TRENDY_SAYING_BYTES ROUND_BITS_TO_BYTES(NUM_TRENDY_SAYINGS)
|
||||
|
||||
// This produces an error at compile-time if expr is zero.
|
||||
// It looks like file.c:line: size of array `id' is negative
|
||||
@@ -673,7 +673,7 @@ struct MauvilleManGiddy
|
||||
struct MauvilleManHipster
|
||||
{
|
||||
u8 id;
|
||||
bool8 alreadySpoken;
|
||||
bool8 taughtWord;
|
||||
u8 language;
|
||||
};
|
||||
|
||||
@@ -1031,7 +1031,7 @@ struct SaveBlock1
|
||||
/*0x2BC8*/ u16 easyChatBattleWon[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x2BE0*/ struct Mail mail[MAIL_COUNT];
|
||||
/*0x2E20*/ u8 additionalPhrases[NUM_ADDITIONAL_PHRASE_BYTES]; // bitfield for 33 additional phrases in easy chat system
|
||||
/*0x2E20*/ u8 unlockedTrendySayings[NUM_TRENDY_SAYING_BYTES]; // Bitfield for unlockable Easy Chat words in EC_GROUP_TRENDY_SAYING
|
||||
/*0x2E25*/ //u8 padding5[3];
|
||||
/*0x2E28*/ OldMan oldMan;
|
||||
/*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
|
||||
|
||||
+326
-326
File diff suppressed because it is too large.
Load diff
+58
-39
@@ -5109,7 +5109,7 @@ static bool8 IsEasyChatGroupUnlocked(u8 groupId)
|
||||
switch (groupId)
|
||||
{
|
||||
case EC_GROUP_TRENDY_SAYING:
|
||||
return FlagGet(FLAG_SYS_HIPSTER_MEET);
|
||||
return FlagGet(FLAG_UNLOCKED_TRENDY_SAYINGS);
|
||||
case EC_GROUP_EVENTS:
|
||||
case EC_GROUP_MOVE_1:
|
||||
case EC_GROUP_MOVE_2:
|
||||
@@ -5425,80 +5425,99 @@ void BufferDeepLinkPhrase(void)
|
||||
CopyEasyChatWord(gStringVar2, easyChatWord);
|
||||
}
|
||||
|
||||
static bool8 IsAdditionalPhraseUnlocked(u8 additionalPhraseId)
|
||||
/*
|
||||
### Trendy Sayings
|
||||
|
||||
Not to be confused with Dewford Town's "trendy phrase".
|
||||
|
||||
This is a group of easy chat words (EC_GROUP_TRENDY_SAYING) that are normally inaccessible.
|
||||
They can be unlocked either through Mystery Event (where they're referred to as "rare" words)
|
||||
or from the "Hipster" variety of the Mauville Old Man. The Hipster can unlock one word each
|
||||
time he is received via record mixing (and once if he is the player's default Old Man).
|
||||
|
||||
Which words have been unlocked is saved in the unlockedTrendySayings bitfield in SaveBlock1
|
||||
|
||||
Unlocked trendy saying words are only accessible if the flag FLAG_UNLOCKED_TRENDY_SAYINGS is set.
|
||||
It's set any time the player talks to the Hipster, but is not apparently set by Mystery Event,
|
||||
meaning trendy saying words unlocked via Mystery Event may not be available until the player has
|
||||
talked to the Hipster.
|
||||
*/
|
||||
static bool8 IsTrendySayingUnlocked(u8 wordIndex)
|
||||
{
|
||||
int byteOffset = additionalPhraseId / 8;
|
||||
int shift = additionalPhraseId % 8;
|
||||
return (gSaveBlock1Ptr->additionalPhrases[byteOffset] >> shift) & 1;
|
||||
int byteOffset = wordIndex / 8;
|
||||
int shift = wordIndex % 8;
|
||||
return (gSaveBlock1Ptr->unlockedTrendySayings[byteOffset] >> shift) & 1;
|
||||
}
|
||||
|
||||
void UnlockAdditionalPhrase(u8 additionalPhraseId)
|
||||
void UnlockTrendySaying(u8 wordIndex)
|
||||
{
|
||||
if (additionalPhraseId < NUM_ADDITIONAL_PHRASES)
|
||||
if (wordIndex < NUM_TRENDY_SAYINGS)
|
||||
{
|
||||
int byteOffset = additionalPhraseId / 8;
|
||||
int shift = additionalPhraseId % 8;
|
||||
gSaveBlock1Ptr->additionalPhrases[byteOffset] |= 1 << shift;
|
||||
int byteOffset = wordIndex / 8;
|
||||
int shift = wordIndex % 8;
|
||||
gSaveBlock1Ptr->unlockedTrendySayings[byteOffset] |= 1 << shift;
|
||||
}
|
||||
}
|
||||
|
||||
static u8 GetNumAdditionalPhrasesUnlocked(void)
|
||||
static u8 GetNumTrendySayingsUnlocked(void)
|
||||
{
|
||||
u8 i;
|
||||
u8 numAdditionalPhrasesUnlocked;
|
||||
u8 numUnlocked;
|
||||
|
||||
for (i = 0, numAdditionalPhrasesUnlocked = 0; i < NUM_ADDITIONAL_PHRASES; i++)
|
||||
for (i = 0, numUnlocked = 0; i < NUM_TRENDY_SAYINGS; i++)
|
||||
{
|
||||
if (IsAdditionalPhraseUnlocked(i))
|
||||
numAdditionalPhrasesUnlocked++;
|
||||
if (IsTrendySayingUnlocked(i))
|
||||
numUnlocked++;
|
||||
}
|
||||
|
||||
return numAdditionalPhrasesUnlocked;
|
||||
return numUnlocked;
|
||||
}
|
||||
|
||||
u16 GetNewHipsterPhraseToTeach(void)
|
||||
u16 UnlockRandomTrendySaying(void)
|
||||
{
|
||||
u16 i;
|
||||
u16 additionalPhraseId;
|
||||
u8 numAdditionalPhrasesUnlocked = GetNumAdditionalPhrasesUnlocked();
|
||||
if (numAdditionalPhrasesUnlocked == NUM_ADDITIONAL_PHRASES)
|
||||
u16 numToSkip;
|
||||
u8 numUnlocked = GetNumTrendySayingsUnlocked();
|
||||
if (numUnlocked == NUM_TRENDY_SAYINGS)
|
||||
return EC_EMPTY_WORD;
|
||||
|
||||
additionalPhraseId = Random() % (NUM_ADDITIONAL_PHRASES - numAdditionalPhrasesUnlocked);
|
||||
for (i = 0; i < NUM_ADDITIONAL_PHRASES; i++)
|
||||
numToSkip = Random() % (NUM_TRENDY_SAYINGS - numUnlocked);
|
||||
for (i = 0; i < NUM_TRENDY_SAYINGS; i++)
|
||||
{
|
||||
if (!IsAdditionalPhraseUnlocked(i))
|
||||
if (!IsTrendySayingUnlocked(i))
|
||||
{
|
||||
if (additionalPhraseId)
|
||||
if (numToSkip)
|
||||
{
|
||||
additionalPhraseId--;
|
||||
// Skip the first n locked words, as determined by the Random call above.
|
||||
numToSkip--;
|
||||
}
|
||||
else
|
||||
{
|
||||
UnlockAdditionalPhrase(i);
|
||||
UnlockTrendySaying(i);
|
||||
return EC_WORD(EC_GROUP_TRENDY_SAYING, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Would only be reached if there are no new words to teach, which is handled at the start.
|
||||
return EC_EMPTY_WORD;
|
||||
}
|
||||
|
||||
// Unused
|
||||
u16 GetRandomTaughtHipsterPhrase(void)
|
||||
static u16 GetRandomUnlockedTrendySaying(void)
|
||||
{
|
||||
u16 i;
|
||||
u16 additionalPhraseId = GetNumAdditionalPhrasesUnlocked();
|
||||
if (additionalPhraseId == 0)
|
||||
u16 n = GetNumTrendySayingsUnlocked();
|
||||
if (n == 0)
|
||||
return EC_EMPTY_WORD;
|
||||
|
||||
additionalPhraseId = Random() % additionalPhraseId;
|
||||
for (i = 0; i < NUM_ADDITIONAL_PHRASES; i++)
|
||||
n = Random() % n;
|
||||
for (i = 0; i < NUM_TRENDY_SAYINGS; i++)
|
||||
{
|
||||
if (IsAdditionalPhraseUnlocked(i))
|
||||
if (IsTrendySayingUnlocked(i))
|
||||
{
|
||||
if (additionalPhraseId)
|
||||
additionalPhraseId--;
|
||||
if (n)
|
||||
n--;
|
||||
else
|
||||
return EC_WORD(EC_GROUP_TRENDY_SAYING, i);
|
||||
}
|
||||
@@ -5569,10 +5588,10 @@ void InitEasyChatPhrases(void)
|
||||
// Mauville old man data is corrupted, which is initialized directly after
|
||||
// this function is called when starting a new game.
|
||||
for (i = 0; i < 64; i++)
|
||||
gSaveBlock1Ptr->additionalPhrases[i] = 0;
|
||||
gSaveBlock1Ptr->unlockedTrendySayings[i] = 0;
|
||||
#else
|
||||
for (i = 0; i < ARRAY_COUNT(gSaveBlock1Ptr->additionalPhrases); i++)
|
||||
gSaveBlock1Ptr->additionalPhrases[i] = 0;
|
||||
for (i = 0; i < ARRAY_COUNT(gSaveBlock1Ptr->unlockedTrendySayings); i++)
|
||||
gSaveBlock1Ptr->unlockedTrendySayings[i] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -5611,7 +5630,7 @@ static void SetUnlockedEasyChatGroups(void)
|
||||
sWordData->unlockedGroupIds[sWordData->numUnlockedGroups++] = EC_GROUP_MOVE_2;
|
||||
}
|
||||
|
||||
if (FlagGet(FLAG_SYS_HIPSTER_MEET))
|
||||
if (FlagGet(FLAG_UNLOCKED_TRENDY_SAYINGS))
|
||||
sWordData->unlockedGroupIds[sWordData->numUnlockedGroups++] = EC_GROUP_TRENDY_SAYING;
|
||||
|
||||
if (IsNationalPokedexEnabled())
|
||||
@@ -5800,7 +5819,7 @@ static bool8 IsEasyChatIndexAndGroupUnlocked(u16 wordIndex, u8 groupId)
|
||||
case EC_GROUP_MOVE_2:
|
||||
return TRUE;
|
||||
case EC_GROUP_TRENDY_SAYING:
|
||||
return IsAdditionalPhraseUnlocked(wordIndex);
|
||||
return IsTrendySayingUnlocked(wordIndex);
|
||||
default:
|
||||
return gEasyChatGroups[groupId].wordData.words[wordIndex].enabled;
|
||||
}
|
||||
|
||||
+12
-12
@@ -131,9 +131,9 @@ static void SetObjectEventDynamicGraphicsId(struct ObjectEvent *);
|
||||
static void RemoveObjectEventInternal(struct ObjectEvent *);
|
||||
static u16 GetObjectEventFlagIdByObjectEventId(u8);
|
||||
static void UpdateObjectEventVisibility(struct ObjectEvent *, struct Sprite *);
|
||||
static void MakeSpriteTemplateFromObjectEventTemplate(struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **);
|
||||
static void MakeSpriteTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **);
|
||||
static void GetObjectEventMovingCameraOffset(s16 *, s16 *);
|
||||
static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8);
|
||||
static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8);
|
||||
static void LoadObjectEventPalette(u16);
|
||||
static void RemoveObjectEventIfOutsideView(struct ObjectEvent *);
|
||||
static void SpawnObjectEventOnReturnToField(u8, s16, s16);
|
||||
@@ -147,7 +147,7 @@ static void SpriteCB_CameraObject(struct Sprite *);
|
||||
static void CameraObject_0(struct Sprite *);
|
||||
static void CameraObject_1(struct Sprite *);
|
||||
static void CameraObject_2(struct Sprite *);
|
||||
static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8, struct ObjectEventTemplate *, u8);
|
||||
static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8, const struct ObjectEventTemplate *, u8);
|
||||
static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *);
|
||||
static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8);
|
||||
static void SetSpriteDataForNormalStep(struct Sprite *, u8, u8);
|
||||
@@ -1267,7 +1267,7 @@ static u8 GetObjectEventIdByLocalId(u8 localId)
|
||||
return OBJECT_EVENTS_COUNT;
|
||||
}
|
||||
|
||||
static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup)
|
||||
static u8 InitObjectEventStateFromTemplate(const struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup)
|
||||
{
|
||||
struct ObjectEvent *objectEvent;
|
||||
u8 objectEventId;
|
||||
@@ -1398,7 +1398,7 @@ void RemoveAllObjectEventsExceptPlayer(void)
|
||||
}
|
||||
}
|
||||
|
||||
static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY)
|
||||
static u8 TrySetupObjectEventSprite(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY)
|
||||
{
|
||||
u8 spriteId;
|
||||
u8 paletteSlot;
|
||||
@@ -1458,7 +1458,7 @@ static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTempl
|
||||
return objectEventId;
|
||||
}
|
||||
|
||||
static u8 TrySpawnObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY)
|
||||
static u8 TrySpawnObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY)
|
||||
{
|
||||
u8 objectEventId;
|
||||
struct SpriteTemplate spriteTemplate;
|
||||
@@ -1512,7 +1512,7 @@ u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 l
|
||||
|
||||
u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup)
|
||||
{
|
||||
struct ObjectEventTemplate *objectEventTemplate;
|
||||
const struct ObjectEventTemplate *objectEventTemplate;
|
||||
s16 cameraX, cameraY;
|
||||
|
||||
objectEventTemplate = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup);
|
||||
@@ -1542,7 +1542,7 @@ static void CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(u16 graphics
|
||||
CopyObjectGraphicsInfoToSpriteTemplate(graphicsId, sMovementTypeCallbacks[movementType], spriteTemplate, subspriteTables);
|
||||
}
|
||||
|
||||
static void MakeSpriteTemplateFromObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables)
|
||||
static void MakeSpriteTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables)
|
||||
{
|
||||
CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(objectEventTemplate->graphicsId, objectEventTemplate->movementType, spriteTemplate, subspriteTables);
|
||||
}
|
||||
@@ -2374,7 +2374,7 @@ const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId)
|
||||
|
||||
static u16 GetObjectEventFlagIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup)
|
||||
{
|
||||
struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup);
|
||||
const struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup);
|
||||
#ifdef UBFIX
|
||||
// BUG: The function may return NULL, and attempting to read from NULL may freeze the game using modern compilers.
|
||||
if (obj == NULL)
|
||||
@@ -2421,9 +2421,9 @@ u8 GetObjectEventBerryTreeId(u8 objectEventId)
|
||||
return gObjectEvents[objectEventId].trainerRange_berryTreeId;
|
||||
}
|
||||
|
||||
static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup)
|
||||
static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup)
|
||||
{
|
||||
struct ObjectEventTemplate *templates;
|
||||
const struct ObjectEventTemplate *templates;
|
||||
const struct MapHeader *mapHeader;
|
||||
u8 count;
|
||||
|
||||
@@ -2441,7 +2441,7 @@ static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 loca
|
||||
return FindObjectEventTemplateByLocalId(localId, templates, count);
|
||||
}
|
||||
|
||||
static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count)
|
||||
static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, const struct ObjectEventTemplate *templates, u8 count)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
|
||||
+12
-12
@@ -60,8 +60,8 @@ static s8 GetWarpEventAtMapPosition(struct MapHeader *, struct MapPosition *);
|
||||
static void SetupWarp(struct MapHeader *, s8, struct MapPosition *);
|
||||
static bool8 TryDoorWarp(struct MapPosition *, u16, u8);
|
||||
static s8 GetWarpEventAtPosition(struct MapHeader *, u16, u16, u8);
|
||||
static u8 *GetCoordEventScriptAtPosition(struct MapHeader *, u16, u16, u8);
|
||||
static struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *, u16, u16, u8);
|
||||
static const u8 *GetCoordEventScriptAtPosition(struct MapHeader *, u16, u16, u8);
|
||||
static const struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *, u16, u16, u8);
|
||||
static bool8 TryStartCoordEventScript(struct MapPosition *);
|
||||
static bool8 TryStartWarpEventScript(struct MapPosition *, u16);
|
||||
static bool8 TryStartMiscWalkingScripts(u16);
|
||||
@@ -315,7 +315,7 @@ static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8
|
||||
|
||||
static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position, u8 metatileBehavior, u8 direction)
|
||||
{
|
||||
struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
const struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
|
||||
if (bgEvent == NULL)
|
||||
return NULL;
|
||||
@@ -497,7 +497,7 @@ static bool8 TryStartStepBasedScript(struct MapPosition *position, u16 metatileB
|
||||
|
||||
static bool8 TryStartCoordEventScript(struct MapPosition *position)
|
||||
{
|
||||
u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
const u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
|
||||
if (script == NULL)
|
||||
return FALSE;
|
||||
@@ -861,7 +861,7 @@ static bool8 TryDoorWarp(struct MapPosition *position, u16 metatileBehavior, u8
|
||||
static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation)
|
||||
{
|
||||
s32 i;
|
||||
struct WarpEvent *warpEvent = mapHeader->events->warps;
|
||||
const struct WarpEvent *warpEvent = mapHeader->events->warps;
|
||||
u8 warpCount = mapHeader->events->warpCount;
|
||||
|
||||
for (i = 0; i < warpCount; i++, warpEvent++)
|
||||
@@ -875,7 +875,7 @@ static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 e
|
||||
return WARP_ID_NONE;
|
||||
}
|
||||
|
||||
static u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent)
|
||||
static const u8 *TryRunCoordEventScript(const struct CoordEvent *coordEvent)
|
||||
{
|
||||
if (coordEvent != NULL)
|
||||
{
|
||||
@@ -895,10 +895,10 @@ static u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation)
|
||||
static const u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation)
|
||||
{
|
||||
s32 i;
|
||||
struct CoordEvent *coordEvents = mapHeader->events->coordEvents;
|
||||
const struct CoordEvent *coordEvents = mapHeader->events->coordEvents;
|
||||
u8 coordEventCount = mapHeader->events->coordEventCount;
|
||||
|
||||
for (i = 0; i < coordEventCount; i++)
|
||||
@@ -907,7 +907,7 @@ static u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16
|
||||
{
|
||||
if (coordEvents[i].elevation == elevation || coordEvents[i].elevation == 0)
|
||||
{
|
||||
u8 *script = TryRunCoordEventScript(&coordEvents[i]);
|
||||
const u8 *script = TryRunCoordEventScript(&coordEvents[i]);
|
||||
if (script != NULL)
|
||||
return script;
|
||||
}
|
||||
@@ -916,15 +916,15 @@ static u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position)
|
||||
const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position)
|
||||
{
|
||||
return GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
}
|
||||
|
||||
static struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation)
|
||||
static const struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation)
|
||||
{
|
||||
u8 i;
|
||||
struct BgEvent *bgEvents = mapHeader->events->bgEvents;
|
||||
const struct BgEvent *bgEvents = mapHeader->events->bgEvents;
|
||||
u8 bgEventCount = mapHeader->events->bgEventCount;
|
||||
|
||||
for (i = 0; i < bgEventCount; i++)
|
||||
|
||||
+16
-16
@@ -36,7 +36,7 @@ struct BackupMapLayout gBackupMapLayout;
|
||||
static const struct ConnectionFlags sDummyConnectionFlags = {0};
|
||||
|
||||
static void InitMapLayoutData(struct MapHeader *mapHeader);
|
||||
static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height);
|
||||
static void InitBackupMapLayoutData(const u16 *map, u16 width, u16 height);
|
||||
static void FillSouthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset);
|
||||
static void FillNorthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset);
|
||||
static void FillWestConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset);
|
||||
@@ -44,14 +44,14 @@ static void FillEastConnection(struct MapHeader const *mapHeader, struct MapHead
|
||||
static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader);
|
||||
static void LoadSavedMapView(void);
|
||||
static bool8 SkipCopyingMetatileFromSavedMap(u16 *mapBlock, u16 mapWidth, u8 yMode);
|
||||
static struct MapConnection *GetIncomingConnection(u8 direction, int x, int y);
|
||||
static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, struct MapConnection *connection);
|
||||
static const struct MapConnection *GetIncomingConnection(u8 direction, int x, int y);
|
||||
static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, const struct MapConnection *connection);
|
||||
static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax, int offset);
|
||||
|
||||
#define GetBorderBlockAt(x, y)({ \
|
||||
u16 block; \
|
||||
int i; \
|
||||
u16 *border = gMapHeader.mapLayout->border; \
|
||||
const u16 *border = gMapHeader.mapLayout->border; /* Unused, they read it again below */ \
|
||||
\
|
||||
i = (x + 1) & 1; \
|
||||
i += ((y + 1) & 1) * 2; \
|
||||
@@ -63,7 +63,7 @@ static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax,
|
||||
|
||||
#define GetMapGridBlockAt(x, y) (AreCoordsWithinMapGridBounds(x, y) ? gBackupMapLayout.map[x + gBackupMapLayout.width * y] : GetBorderBlockAt(x, y))
|
||||
|
||||
struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection)
|
||||
const struct MapHeader *const GetMapHeaderFromConnection(const struct MapConnection *connection)
|
||||
{
|
||||
return Overworld_GetMapHeaderByGroupAndId(connection->mapGroup, connection->mapNum);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ static void InitMapLayoutData(struct MapHeader *mapHeader)
|
||||
}
|
||||
}
|
||||
|
||||
static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height)
|
||||
static void InitBackupMapLayoutData(const u16 *map, u16 width, u16 height)
|
||||
{
|
||||
u16 *dest;
|
||||
int y;
|
||||
@@ -133,7 +133,7 @@ static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height)
|
||||
static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader)
|
||||
{
|
||||
int count;
|
||||
struct MapConnection *connection;
|
||||
const struct MapConnection *connection;
|
||||
int i;
|
||||
|
||||
if (mapHeader->connections)
|
||||
@@ -171,7 +171,7 @@ static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader)
|
||||
static void FillConnection(int x, int y, struct MapHeader const *connectedMapHeader, int x2, int y2, int width, int height)
|
||||
{
|
||||
int i;
|
||||
u16 *src;
|
||||
const u16 *src;
|
||||
u16 *dest;
|
||||
int mapWidth;
|
||||
|
||||
@@ -619,7 +619,7 @@ bool32 CanCameraMoveInDirection(int direction)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void SetPositionFromConnection(struct MapConnection *connection, int direction, int x, int y)
|
||||
static void SetPositionFromConnection(const struct MapConnection *connection, int direction, int x, int y)
|
||||
{
|
||||
struct MapHeader const *mapHeader;
|
||||
mapHeader = GetMapHeaderFromConnection(connection);
|
||||
@@ -647,7 +647,7 @@ static void SetPositionFromConnection(struct MapConnection *connection, int dire
|
||||
bool8 CameraMove(int x, int y)
|
||||
{
|
||||
int direction;
|
||||
struct MapConnection *connection;
|
||||
const struct MapConnection *connection;
|
||||
int old_x, old_y;
|
||||
gCamera.active = FALSE;
|
||||
direction = GetPostCameraMoveMapBorderId(x, y);
|
||||
@@ -675,11 +675,11 @@ bool8 CameraMove(int x, int y)
|
||||
return gCamera.active;
|
||||
}
|
||||
|
||||
static struct MapConnection *GetIncomingConnection(u8 direction, int x, int y)
|
||||
static const struct MapConnection *GetIncomingConnection(u8 direction, int x, int y)
|
||||
{
|
||||
int count;
|
||||
int i;
|
||||
struct MapConnection *connection;
|
||||
const struct MapConnection *connection;
|
||||
const struct MapConnections *connections = gMapHeader.connections;
|
||||
|
||||
#ifdef UBFIX // UB: Multiple possible null dereferences
|
||||
@@ -696,7 +696,7 @@ static struct MapConnection *GetIncomingConnection(u8 direction, int x, int y)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, struct MapConnection *connection)
|
||||
static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, const struct MapConnection *connection)
|
||||
{
|
||||
struct MapHeader const *mapHeader;
|
||||
mapHeader = GetMapHeaderFromConnection(connection);
|
||||
@@ -737,7 +737,7 @@ static int IsCoordInConnectingMap(int coord, int max)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int IsPosInConnectingMap(struct MapConnection *connection, int x, int y)
|
||||
static int IsPosInConnectingMap(const struct MapConnection *connection, int x, int y)
|
||||
{
|
||||
struct MapHeader const *mapHeader;
|
||||
mapHeader = GetMapHeaderFromConnection(connection);
|
||||
@@ -753,10 +753,10 @@ static int IsPosInConnectingMap(struct MapConnection *connection, int x, int y)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y)
|
||||
const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y)
|
||||
{
|
||||
int count;
|
||||
struct MapConnection *connection;
|
||||
const struct MapConnection *connection;
|
||||
int i;
|
||||
u8 direction;
|
||||
if (!gMapHeader.connections)
|
||||
|
||||
+3
-3
@@ -375,7 +375,7 @@ static bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *events, u8 ta
|
||||
static bool8 IsHiddenItemPresentAtCoords(const struct MapEvents *events, s16 x, s16 y)
|
||||
{
|
||||
u8 bgEventCount = events->bgEventCount;
|
||||
struct BgEvent *bgEvent = events->bgEvents;
|
||||
const struct BgEvent *bgEvent = events->bgEvents;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < bgEventCount; i++)
|
||||
@@ -391,7 +391,7 @@ static bool8 IsHiddenItemPresentAtCoords(const struct MapEvents *events, s16 x,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 IsHiddenItemPresentInConnection(struct MapConnection *connection, int x, int y)
|
||||
static bool8 IsHiddenItemPresentInConnection(const struct MapConnection *connection, int x, int y)
|
||||
{
|
||||
|
||||
u16 localX, localY;
|
||||
@@ -456,7 +456,7 @@ static void CheckForHiddenItemsInMapConnection(u8 taskId)
|
||||
|| var2 > y
|
||||
|| y >= height)
|
||||
{
|
||||
struct MapConnection *conn = GetMapConnectionAtPos(x, y);
|
||||
const struct MapConnection *conn = GetMapConnectionAtPos(x, y);
|
||||
if (conn && IsHiddenItemPresentInConnection(conn, x, y) == TRUE)
|
||||
SetDistanceOfClosestHiddenItem(taskId, x - playerX, y - playerY);
|
||||
}
|
||||
|
||||
+10
-9
@@ -88,7 +88,7 @@ static void SetupHipster(void)
|
||||
struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster;
|
||||
|
||||
hipster->id = MAUVILLE_MAN_HIPSTER;
|
||||
hipster->alreadySpoken = FALSE;
|
||||
hipster->taughtWord = FALSE;
|
||||
hipster->language = gGameLanguage;
|
||||
}
|
||||
|
||||
@@ -225,27 +225,28 @@ void PlayBardSong(void)
|
||||
ScriptContext_Stop();
|
||||
}
|
||||
|
||||
void GetHipsterSpokenFlag(void)
|
||||
void HasHipsterTaughtWord(void)
|
||||
{
|
||||
gSpecialVar_Result = (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken;
|
||||
gSpecialVar_Result = (&gSaveBlock1Ptr->oldMan.hipster)->taughtWord;
|
||||
}
|
||||
|
||||
void SetHipsterSpokenFlag(void)
|
||||
void SetHipsterTaughtWord(void)
|
||||
{
|
||||
(&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken = TRUE;
|
||||
(&gSaveBlock1Ptr->oldMan.hipster)->taughtWord = TRUE;
|
||||
}
|
||||
|
||||
void HipsterTryTeachWord(void)
|
||||
{
|
||||
u16 phrase = GetNewHipsterPhraseToTeach();
|
||||
u16 word = UnlockRandomTrendySaying();
|
||||
|
||||
if (phrase == EC_EMPTY_WORD)
|
||||
if (word == EC_EMPTY_WORD)
|
||||
{
|
||||
// All words already unlocked
|
||||
gSpecialVar_Result = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
CopyEasyChatWord(gStringVar1, phrase);
|
||||
CopyEasyChatWord(gStringVar1, word);
|
||||
gSpecialVar_Result = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -369,7 +370,7 @@ static void ResetBardFlag(void)
|
||||
|
||||
static void ResetHipsterFlag(void)
|
||||
{
|
||||
(&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken = FALSE;
|
||||
(&gSaveBlock1Ptr->oldMan.hipster)->taughtWord = FALSE;
|
||||
}
|
||||
|
||||
static void ResetTraderFlag(void)
|
||||
|
||||
@@ -293,7 +293,7 @@ bool8 MEScrCmd_givenationaldex(struct ScriptContext *ctx)
|
||||
|
||||
bool8 MEScrCmd_addrareword(struct ScriptContext *ctx)
|
||||
{
|
||||
UnlockAdditionalPhrase(ScriptReadByte(ctx));
|
||||
UnlockTrendySaying(ScriptReadByte(ctx));
|
||||
StringExpandPlaceholders(gStringVar4, gText_MysteryEventRareWord);
|
||||
ctx->mStatus = MEVENT_STATUS_SUCCESS;
|
||||
return FALSE;
|
||||
|
||||
+3
-3
@@ -156,7 +156,7 @@ static void InitMenuBasedScript(const u8 *);
|
||||
static void LoadCableClubPlayer(s32, s32, struct CableClubPlayer *);
|
||||
static bool32 IsCableClubPlayerUnfrozen(struct CableClubPlayer *);
|
||||
static bool32 CanCableClubPlayerPressStart(struct CableClubPlayer *);
|
||||
static u8 *TryGetTileEventScript(struct CableClubPlayer *);
|
||||
static const u8 *TryGetTileEventScript(struct CableClubPlayer *);
|
||||
static bool32 PlayerIsAtSouthExit(struct CableClubPlayer *);
|
||||
static const u8 *TryInteractWithPlayer(struct CableClubPlayer *);
|
||||
static u16 KeyInterCB_DeferToRecvQueue(u32);
|
||||
@@ -482,7 +482,7 @@ void LoadObjEventTemplatesFromHeader(void)
|
||||
|
||||
void LoadSaveblockObjEventScripts(void)
|
||||
{
|
||||
struct ObjectEventTemplate *mapHeaderObjTemplates = gMapHeader.events->objectEvents;
|
||||
const struct ObjectEventTemplate *mapHeaderObjTemplates = gMapHeader.events->objectEvents;
|
||||
struct ObjectEventTemplate *savObjTemplates = gSaveBlock1Ptr->objectEventTemplates;
|
||||
s32 i;
|
||||
|
||||
@@ -2714,7 +2714,7 @@ static bool32 CanCableClubPlayerPressStart(struct CableClubPlayer *player)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static u8 *TryGetTileEventScript(struct CableClubPlayer *player)
|
||||
static const u8 *TryGetTileEventScript(struct CableClubPlayer *player)
|
||||
{
|
||||
if (player->movementMode != MOVEMENT_MODE_SCRIPTED)
|
||||
return FACING_NONE;
|
||||
|
||||
+2
-1
@@ -685,7 +685,8 @@ static u16 GetMetatileForFloor(u8 floorId, u32 x, u32 y, u32 floorWidth) // floo
|
||||
void GenerateTrainerHillFloorLayout(u16 *mapArg)
|
||||
{
|
||||
s32 y, x;
|
||||
u16 *src, *dst;
|
||||
const u16 *src;
|
||||
u16 *dst;
|
||||
u8 mapId = GetCurrentTrainerHillMapId();
|
||||
|
||||
if (mapId == TRAINER_HILL_ENTRANCE)
|
||||
|
||||
Reference in new issue
Block a user