mirror of
https://github.com/pret/pokeemerald.git
synced 2026-03-21 17:54:57 -05:00
This commit is contained in:
parent
74bf498aaa
commit
16357c7e29
|
|
@ -218,11 +218,11 @@ struct StatsArray
|
|||
|
||||
struct BattleResources
|
||||
{
|
||||
struct SecretBase* secretBase;
|
||||
struct SecretBase *secretBase;
|
||||
struct ResourceFlags *flags;
|
||||
struct BattleScriptsStack* battleScriptsStack;
|
||||
struct BattleCallbacksStack* battleCallbackStack;
|
||||
struct StatsArray* beforeLvlUp;
|
||||
struct BattleScriptsStack *battleScriptsStack;
|
||||
struct BattleCallbacksStack *battleCallbackStack;
|
||||
struct StatsArray *beforeLvlUp;
|
||||
struct AI_ThinkingStruct *ai;
|
||||
struct BattleHistory *battleHistory;
|
||||
struct BattleScriptsStack *AI_ScriptsStack;
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ void BtlController_EmitPlayFanfareOrBGM(u8 bufferId, u16 songId, bool8 playBGM);
|
|||
void BtlController_EmitFaintingCry(u8 bufferId);
|
||||
void BtlController_EmitIntroSlide(u8 bufferId, u8 environmentId);
|
||||
void BtlController_EmitIntroTrainerBallThrow(u8 bufferId);
|
||||
void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 flags);
|
||||
void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus *hpAndStatus, u8 flags);
|
||||
void BtlController_EmitHidePartyStatusSummary(u8 bufferId);
|
||||
void BtlController_EmitEndBounceEffect(u8 bufferId);
|
||||
void BtlController_EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ void BufferMoveToLearnIntoBattleTextBuff2(void);
|
|||
void HandleBattleWindow(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags);
|
||||
bool8 UproarWakeUpCheck(u8 battler);
|
||||
|
||||
extern void (* const gBattleScriptingCommandsTable[])(void);
|
||||
extern void (*const gBattleScriptingCommandsTable[])(void);
|
||||
extern const u8 gBattlePalaceNatureToMoveGroupLikelihood[NUM_NATURES][4];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPT_COMMANDS_H
|
||||
|
|
|
|||
|
|
@ -290,11 +290,11 @@ struct ContestResources
|
|||
struct ContestGraphicsState *gfxState;
|
||||
struct ContestMoveAnimData *moveAnim;
|
||||
struct ContestTV *tv;
|
||||
struct ContestUnused * unused;
|
||||
u8 * contestBgTilemaps[CONTESTANT_COUNT];
|
||||
void * boxBlinkTiles1;
|
||||
void * boxBlinkTiles2;
|
||||
void * animBgTileBuffer;
|
||||
struct ContestUnused *unused;
|
||||
u8 *contestBgTilemaps[CONTESTANT_COUNT];
|
||||
void *boxBlinkTiles1;
|
||||
void *boxBlinkTiles2;
|
||||
void *animBgTileBuffer;
|
||||
};
|
||||
|
||||
#define eContest (*gContestResources->contest)
|
||||
|
|
|
|||
|
|
@ -1070,7 +1070,7 @@ struct SaveBlock1
|
|||
// sizeof: 0x3D88
|
||||
};
|
||||
|
||||
extern struct SaveBlock1* gSaveBlock1Ptr;
|
||||
extern struct SaveBlock1 *gSaveBlock1Ptr;
|
||||
|
||||
struct MapPosition
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 pocketPos);
|
|||
u16 BagGetQuantityByPocketPosition(u8 pocketId, u16 pocketPos);
|
||||
void CompactItemsInBagPocket(struct BagPocket *bagPocket);
|
||||
void SortBerriesOrTMHMs(struct BagPocket *bagPocket);
|
||||
void MoveItemSlotInList(struct ItemSlot* itemSlots_, u32 from, u32 to_);
|
||||
void MoveItemSlotInList(struct ItemSlot *itemSlots_, u32 from, u32 to_);
|
||||
void ClearBag(void);
|
||||
u16 CountTotalItemQuantityInBag(u16 itemId);
|
||||
bool8 AddPyramidBagItem(u16 itemId, u16 count);
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ void ResetBagScrollPositions(void);
|
|||
void ChooseBerryForMachine(void (*exitCallback)(void));
|
||||
void CB2_ChooseBerry(void);
|
||||
void Task_FadeAndCloseBagMenu(u8 taskId);
|
||||
void BagMenu_YesNo(u8 taskId, u8 windowType, const struct YesNoFuncTable* funcTable);
|
||||
void BagMenu_YesNo(u8 taskId, u8 windowType, const struct YesNoFuncTable *funcTable);
|
||||
void UpdatePocketItemList(u8 pocketId);
|
||||
void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u8 taskId));
|
||||
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ struct Link
|
|||
|
||||
struct BlockRequest
|
||||
{
|
||||
void * address;
|
||||
void *address;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ struct ListMenuItem
|
|||
struct ListMenuTemplate
|
||||
{
|
||||
const struct ListMenuItem *items;
|
||||
void (* moveCursorFunc)(s32 itemIndex, bool8 onInit, struct ListMenu *list);
|
||||
void (* itemPrintFunc)(u8 windowId, u32 itemId, u8 y);
|
||||
void (*moveCursorFunc)(s32 itemIndex, bool8 onInit, struct ListMenu *list);
|
||||
void (*itemPrintFunc)(u8 windowId, u32 itemId, u8 y);
|
||||
u16 totalItems;
|
||||
u16 maxShowed;
|
||||
u8 windowId;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ void SetMauvilleOldMan(void);
|
|||
u8 GetCurrentMauvilleOldMan(void);
|
||||
void SetMauvilleOldManObjEventGfx(void);
|
||||
void SanitizeMauvilleOldManForRuby(OldMan *dest);
|
||||
void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language);
|
||||
void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 version, u32 language);
|
||||
void SanitizeReceivedRubyOldMan(union OldMan *oldMan, u32 version, u32 language);
|
||||
void SanitizeReceivedEmeraldOldMan(union OldMan *oldMan, u32 version, u32 language);
|
||||
void ResetMauvilleOldManFlag(void);
|
||||
|
||||
#endif // GUARD_MAUVILLE_OLD_MAN_H
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ void GetConditionMenuMonNameAndLocString(u8 *locationDst, u8 *nameDst, u16 boxId
|
|||
void GetConditionMenuMonConditions(struct ConditionGraph *graph, u8 *sheen, u16 boxId, u16 monId, u16 partyId, u16 id, u16 numMons, bool8 excludesCancel);
|
||||
void GetConditionMenuMonGfx(void *tilesDst, void *palDst, u16 boxId, u16 monId, u16 partyId, u16 numMons, bool8 excludesCancel);
|
||||
void LoadConditionMonPicTemplate(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal);
|
||||
void LoadConditionSelectionIcons(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals);
|
||||
void LoadConditionSelectionIcons(struct SpriteSheet *sheets, struct SpriteTemplate *template, struct SpritePalette *pals);
|
||||
s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst);
|
||||
|
||||
// Condition sparkles
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
|
||||
#else
|
||||
|
||||
s32 mini_vsnprintf(char* buffer, u32 buffer_len, const char *fmt, va_list va);
|
||||
s32 mini_vpprintf(void* buf, const char *fmt, va_list va);
|
||||
s32 mini_vsnprintf(char *buffer, u32 buffer_len, const char *fmt, va_list va);
|
||||
s32 mini_vpprintf(void *buf, const char *fmt, va_list va);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -75,16 +75,16 @@ struct MysteryGiftClient
|
|||
u32 funcId;
|
||||
u32 funcState;
|
||||
u32 cmdidx;
|
||||
void * sendBuffer;
|
||||
void * recvBuffer;
|
||||
struct MysteryGiftClientCmd * script;
|
||||
void * msg;
|
||||
void *sendBuffer;
|
||||
void *recvBuffer;
|
||||
struct MysteryGiftClientCmd *script;
|
||||
void *msg;
|
||||
struct MysteryGiftLink link;
|
||||
bool32 isWonderNews;
|
||||
};
|
||||
|
||||
void MysteryGiftClient_Create(bool32 isWonderNews);
|
||||
u32 MysteryGiftClient_Run(u16 * endVal);
|
||||
u32 MysteryGiftClient_Run(u16 *endVal);
|
||||
void MysteryGiftClient_AdvanceState(void);
|
||||
void * MysteryGiftClient_GetMsg(void);
|
||||
void MysteryGiftClient_SetParam(u32 value);
|
||||
|
|
|
|||
|
|
@ -34,16 +34,16 @@ struct MysteryGiftLink
|
|||
u16 sendCounter;
|
||||
u16 sendCRC;
|
||||
u16 sendSize;
|
||||
void * recvBuffer;
|
||||
const void * sendBuffer;
|
||||
void *recvBuffer;
|
||||
const void *sendBuffer;
|
||||
u32 (*recvFunc)(struct MysteryGiftLink *);
|
||||
u32 (*sendFunc)(struct MysteryGiftLink *);
|
||||
};
|
||||
|
||||
void MysteryGiftLink_Init(struct MysteryGiftLink * link, u32 sendPlayerId, u32 recvPlayerId);
|
||||
void MysteryGiftLink_InitSend(struct MysteryGiftLink * link, u32 ident, const void * src, u32 size);
|
||||
bool32 MysteryGiftLink_Recv(struct MysteryGiftLink * link);
|
||||
bool32 MysteryGiftLink_Send(struct MysteryGiftLink * link);
|
||||
void MysteryGiftLink_InitRecv(struct MysteryGiftLink * link, u32 ident, void * dest);
|
||||
void MysteryGiftLink_Init(struct MysteryGiftLink *link, u32 sendPlayerId, u32 recvPlayerId);
|
||||
void MysteryGiftLink_InitSend(struct MysteryGiftLink *link, u32 ident, const void *src, u32 size);
|
||||
bool32 MysteryGiftLink_Recv(struct MysteryGiftLink *link);
|
||||
bool32 MysteryGiftLink_Send(struct MysteryGiftLink *link);
|
||||
void MysteryGiftLink_InitRecv(struct MysteryGiftLink *link, u32 ident, void *dest);
|
||||
|
||||
#endif //GUARD_MYSTERY_GIFT_LINK_H
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ struct MysteryGiftServerCmd
|
|||
{
|
||||
u32 instr;
|
||||
u32 parameter;
|
||||
const void * ptr;
|
||||
const void *ptr;
|
||||
};
|
||||
|
||||
struct MysteryGiftServer
|
||||
|
|
@ -80,14 +80,14 @@ struct MysteryGiftServer
|
|||
u32 param;
|
||||
u32 funcId;
|
||||
u32 cmdidx;
|
||||
const struct MysteryGiftServerCmd * script;
|
||||
void * recvBuffer;
|
||||
struct WonderCard * card;
|
||||
struct WonderNews * news;
|
||||
struct MysteryGiftLinkGameData * linkGameData;
|
||||
const void * ramScript;
|
||||
const struct MysteryGiftServerCmd *script;
|
||||
void *recvBuffer;
|
||||
struct WonderCard *card;
|
||||
struct WonderNews *news;
|
||||
struct MysteryGiftLinkGameData *linkGameData;
|
||||
const void *ramScript;
|
||||
u32 ramScriptSize;
|
||||
const void * clientScript;
|
||||
const void *clientScript;
|
||||
u32 clientScriptSize;
|
||||
u32 stamp;
|
||||
struct MysteryGiftLink link;
|
||||
|
|
@ -95,6 +95,6 @@ struct MysteryGiftServer
|
|||
|
||||
void MysterGiftServer_CreateForCard();
|
||||
void MysterGiftServer_CreateForNews();
|
||||
u32 MysterGiftServer_Run(u16 * endVal);
|
||||
u32 MysterGiftServer_Run(u16 *endVal);
|
||||
|
||||
#endif //GUARD_MYSTERY_GIFT_SERVER_H
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ enum {
|
|||
NEWS_INPUT_NONE = 0xFF
|
||||
};
|
||||
|
||||
bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * metadata);
|
||||
bool32 WonderNews_Init(const struct WonderNews * news);
|
||||
bool32 WonderCard_Init(struct WonderCard *card, struct WonderCardMetadata *metadata);
|
||||
bool32 WonderNews_Init(const struct WonderNews *news);
|
||||
s32 WonderCard_Enter(void);
|
||||
s32 WonderNews_Enter(void);
|
||||
s32 WonderCard_Exit(bool32 flag);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ typedef void (*PokenavListBufferItemFunc)(struct PokenavListItem *, u8 *);
|
|||
|
||||
struct PokenavListTemplate
|
||||
{
|
||||
struct PokenavListItem * list;
|
||||
struct PokenavListItem *list;
|
||||
u16 count;
|
||||
u16 startIndex;
|
||||
u8 itemSize;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
extern const u32 gTilesetTiles_General[];
|
||||
extern const u16 gTilesetPalettes_General[][16];
|
||||
|
||||
extern const struct Tileset * const gTilesetPointer_SecretBase;
|
||||
extern const struct Tileset * const gTilesetPointer_SecretBaseRedCave;
|
||||
extern const struct Tileset *const gTilesetPointer_SecretBase;
|
||||
extern const struct Tileset *const gTilesetPointer_SecretBaseRedCave;
|
||||
|
||||
#endif //GUARD_tilesets_H
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
static const char AgbLibFlashVersion[] = "FLASH1M_V103";
|
||||
|
||||
static const struct FlashSetupInfo * const sSetupInfos[] =
|
||||
static const struct FlashSetupInfo *const sSetupInfos[] =
|
||||
{
|
||||
&MX29L010,
|
||||
&LE26FV10N1TS,
|
||||
|
|
@ -14,7 +14,7 @@ u16 IdentifyFlash(void)
|
|||
{
|
||||
u16 result;
|
||||
u16 flashId;
|
||||
const struct FlashSetupInfo * const *setupInfo;
|
||||
const struct FlashSetupInfo *const *setupInfo;
|
||||
|
||||
REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | WAITCNT_SRAM_8;
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ EWRAM_DATA u8 gAnimCustomPanning = 0;
|
|||
|
||||
#include "data/battle_anim.h"
|
||||
|
||||
static void (* const sScriptCmdTable[])(void) =
|
||||
static void (*const sScriptCmdTable[])(void) =
|
||||
{
|
||||
Cmd_loadspritegfx, // 0x00
|
||||
Cmd_unloadspritegfx, // 0x01
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ static void AnimUnusedBubbleThrow(struct Sprite *sprite)
|
|||
sprite->callback = TranslateAnimSpriteToTargetMonLocation;
|
||||
}
|
||||
|
||||
static void AnimWhirlwindLine(struct Sprite * sprite)
|
||||
static void AnimWhirlwindLine(struct Sprite *sprite)
|
||||
{
|
||||
u16 offset;
|
||||
u8 mult;
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ static const struct CompressedSpriteSheet sBattleArenaJudgmentSymbolsSpriteSheet
|
|||
{0}
|
||||
};
|
||||
|
||||
static void (* const sArenaFunctions[])(void) =
|
||||
static void (*const sArenaFunctions[])(void) =
|
||||
{
|
||||
[BATTLE_ARENA_FUNC_INIT] = InitArenaChallenge,
|
||||
[BATTLE_ARENA_FUNC_GET_DATA] = GetArenaData,
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ static const struct WindowTemplate sBattleArenaWindowTemplates[] =
|
|||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
const struct WindowTemplate * const gBattleWindowTemplates[] =
|
||||
const struct WindowTemplate *const gBattleWindowTemplates[] =
|
||||
{
|
||||
[B_WIN_TYPE_NORMAL] = sStandardBattleWindowTemplates,
|
||||
[B_WIN_TYPE_ARENA] = sBattleArenaWindowTemplates,
|
||||
|
|
|
|||
|
|
@ -1496,7 +1496,7 @@ void BtlController_EmitIntroTrainerBallThrow(u8 bufferId)
|
|||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 flags)
|
||||
void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus *hpAndStatus, u8 flags)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
|
|||
|
|
@ -997,7 +997,7 @@ static const union AnimCmd sSpriteAnim_TourneyTreePokeballSelected[] =
|
|||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sSpriteAnimTable_TourneyTreePokeball[] =
|
||||
static const union AnimCmd *const sSpriteAnimTable_TourneyTreePokeball[] =
|
||||
{
|
||||
sSpriteAnim_TourneyTreePokeballNormal,
|
||||
sSpriteAnim_TourneyTreePokeballSelected,
|
||||
|
|
@ -1027,7 +1027,7 @@ static const union AnimCmd sSpriteAnim_TourneyTreeCancelButtonSelected[] =
|
|||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sSpriteAnimTable_TourneyTreeCancelButton[] =
|
||||
static const union AnimCmd *const sSpriteAnimTable_TourneyTreeCancelButton[] =
|
||||
{
|
||||
sSpriteAnim_TourneyTreeCancelButtonNormal,
|
||||
sSpriteAnim_TourneyTreeCancelButtonSelected,
|
||||
|
|
@ -1056,7 +1056,7 @@ static const union AnimCmd sSpriteAnim_TourneyTreeExitButtonSelected[] =
|
|||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sSpriteAnimTable_TourneyTreeExitButton[] =
|
||||
static const union AnimCmd *const sSpriteAnimTable_TourneyTreeExitButton[] =
|
||||
{
|
||||
sSpriteAnim_TourneyTreeExitButtonNormal,
|
||||
sSpriteAnim_TourneyTreeExitButtonSelected,
|
||||
|
|
@ -1097,13 +1097,13 @@ static const union AnimCmd sSpriteAnim_RightArrow[] =
|
|||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sSpriteAnimTable_VerticalScrollArrow[] =
|
||||
static const union AnimCmd *const sSpriteAnimTable_VerticalScrollArrow[] =
|
||||
{
|
||||
sSpriteAnim_UpArrow,
|
||||
sSpriteAnim_DownArrow,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sSpriteAnimTable_HorizontalScrollArrow[] =
|
||||
static const union AnimCmd *const sSpriteAnimTable_HorizontalScrollArrow[] =
|
||||
{
|
||||
sSpriteAnim_LeftArrow,
|
||||
sSpriteAnim_RightArrow,
|
||||
|
|
@ -1134,7 +1134,7 @@ static const struct SpriteTemplate sVerticalScrollArrowSpriteTemplate =
|
|||
// Organized by seed starting position, i.e. seed 0 battles seed 8 first
|
||||
static const u8 sTourneyTreeTrainerIds[DOME_TOURNAMENT_TRAINERS_COUNT] = {0, 8, 12, 4, 7, 15, 11, 3, 2, 10, 14, 6, 5, 13, 9, 1};
|
||||
|
||||
static void (* const sBattleDomeFunctions[])(void) =
|
||||
static void (*const sBattleDomeFunctions[])(void) =
|
||||
{
|
||||
[BATTLE_DOME_FUNC_INIT] = InitDomeChallenge,
|
||||
[BATTLE_DOME_FUNC_GET_DATA] = GetDomeData,
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ static const u16 *const sMoveStyles[FACTORY_NUM_STYLES - 1] =
|
|||
[FACTORY_STYLE_WEATHER - 1] = sMoves_DependsOnTheBattlesFlow,
|
||||
};
|
||||
|
||||
static void (* const sBattleFactoryFunctions[])(void) =
|
||||
static void (*const sBattleFactoryFunctions[])(void) =
|
||||
{
|
||||
[BATTLE_FACTORY_FUNC_INIT] = InitFactoryChallenge,
|
||||
[BATTLE_FACTORY_FUNC_GET_DATA] = GetBattleFactoryData,
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ static const struct SpritePalette sSelect_SpritePalettes[] =
|
|||
{},
|
||||
};
|
||||
|
||||
u8 static (* const sSelect_MenuOptionFuncs[])(void) =
|
||||
u8 static (*const sSelect_MenuOptionFuncs[])(void) =
|
||||
{
|
||||
Select_OptionSummary,
|
||||
Select_OptionRentDeselect,
|
||||
|
|
@ -517,17 +517,17 @@ static const union AnimCmd sAnim_Select_Pokeball_Moving[] =
|
|||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_Select_Interface[] =
|
||||
static const union AnimCmd *const sAnims_Select_Interface[] =
|
||||
{
|
||||
sAnim_Select_Interface,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_Select_MonPicBgAnim[] =
|
||||
static const union AnimCmd *const sAnims_Select_MonPicBgAnim[] =
|
||||
{
|
||||
sAnim_Select_MonPicBgAnim,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_Select_Pokeball[] =
|
||||
static const union AnimCmd *const sAnims_Select_Pokeball[] =
|
||||
{
|
||||
sAnim_Select_Pokeball_Still,
|
||||
sAnim_Select_Pokeball_Moving,
|
||||
|
|
@ -569,7 +569,7 @@ static const union AffineAnimCmd sAffineAnim_Select_MonPicBg_Open[] =
|
|||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd * const sAffineAnims_Select_MonPicBgAnim[] =
|
||||
static const union AffineAnimCmd *const sAffineAnims_Select_MonPicBgAnim[] =
|
||||
{
|
||||
sAffineAnim_Select_MonPicBg_Opening,
|
||||
sAffineAnim_Select_MonPicBg_Closing,
|
||||
|
|
@ -772,17 +772,17 @@ static const union AnimCmd sAnim_Swap_Pokeball_Moving[] =
|
|||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_Swap_Interface[] =
|
||||
static const union AnimCmd *const sAnims_Swap_Interface[] =
|
||||
{
|
||||
sAnim_Swap_Interface,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_Swap_MonPicBgAnim[] =
|
||||
static const union AnimCmd *const sAnims_Swap_MonPicBgAnim[] =
|
||||
{
|
||||
sAnim_Swap_MonPicBgAnim,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_Swap_Pokeball[] =
|
||||
static const union AnimCmd *const sAnims_Swap_Pokeball[] =
|
||||
{
|
||||
sAnim_Swap_Pokeball_Still,
|
||||
sAnim_Swap_Pokeball_Moving,
|
||||
|
|
@ -824,7 +824,7 @@ static const union AffineAnimCmd sAffineAnim_Swap_MonPicBg_Open[] =
|
|||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd * const sAffineAnims_Swap_MonPicBgAnim[] =
|
||||
static const union AffineAnimCmd *const sAffineAnims_Swap_MonPicBgAnim[] =
|
||||
{
|
||||
sAffineAnim_Swap_MonPicBg_Opening,
|
||||
sAffineAnim_Swap_MonPicBg_Closing,
|
||||
|
|
@ -886,7 +886,7 @@ static const struct SpriteTemplate sSpriteTemplate_Swap_MonPicBgAnim =
|
|||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
void static (* const sSwap_MenuOptionFuncs[])(u8 taskId) =
|
||||
void static (*const sSwap_MenuOptionFuncs[])(u8 taskId) =
|
||||
{
|
||||
Swap_OptionSummary,
|
||||
Swap_OptionSwap,
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#include "constants/battle_palace.h"
|
||||
|
||||
extern const u8 gBattlePalaceNatureToMoveTarget[];
|
||||
extern const u8 * const gBattleAnims_General[];
|
||||
extern const u8 * const gBattleAnims_Special[];
|
||||
extern const u8 *const gBattleAnims_General[];
|
||||
extern const u8 *const gBattleAnims_Special[];
|
||||
extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow;
|
||||
extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow;
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ EWRAM_DATA u32 gBattleTypeFlags = 0;
|
|||
EWRAM_DATA u8 gBattleEnvironment = 0;
|
||||
EWRAM_DATA u32 gUnusedFirstBattleVar1 = 0; // Never read
|
||||
EWRAM_DATA struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE] = {0};
|
||||
EWRAM_DATA static struct MultiPartnerMenuPokemon* sMultiPartnerPartyBuffer = NULL;
|
||||
EWRAM_DATA static struct MultiPartnerMenuPokemon *sMultiPartnerPartyBuffer = NULL;
|
||||
EWRAM_DATA u8 *gBattleAnimBgTileBuffer = NULL;
|
||||
EWRAM_DATA u8 *gBattleAnimBgTilemapBuffer = NULL;
|
||||
EWRAM_DATA u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200] = {0};
|
||||
|
|
@ -533,7 +533,7 @@ const struct TrainerMoney gTrainerMoneyTable[] =
|
|||
|
||||
#include "data/text/abilities.h"
|
||||
|
||||
static void (* const sTurnActionsFuncsTable[])(void) =
|
||||
static void (*const sTurnActionsFuncsTable[])(void) =
|
||||
{
|
||||
[B_ACTION_USE_MOVE] = HandleAction_UseMove,
|
||||
[B_ACTION_USE_ITEM] = HandleAction_UseItem,
|
||||
|
|
@ -551,7 +551,7 @@ static void (* const sTurnActionsFuncsTable[])(void) =
|
|||
[B_ACTION_NOTHING_FAINTED] = HandleAction_NothingIsFainted,
|
||||
};
|
||||
|
||||
static void (* const sEndTurnFuncsTable[])(void) =
|
||||
static void (*const sEndTurnFuncsTable[])(void) =
|
||||
{
|
||||
[0] = HandleEndTurn_ContinueBattle,
|
||||
[B_OUTCOME_WON] = HandleEndTurn_BattleWon,
|
||||
|
|
@ -574,7 +574,7 @@ const u8 gStatusConditionString_IceJpn[] = _("こおり$$$$");
|
|||
const u8 gStatusConditionString_ConfusionJpn[] = _("こんらん$$$");
|
||||
const u8 gStatusConditionString_LoveJpn[] = _("メロメロ$$$");
|
||||
|
||||
const u8 * const gStatusConditionStringsTable[][2] =
|
||||
const u8 *const gStatusConditionStringsTable[][2] =
|
||||
{
|
||||
{gStatusConditionString_PoisonJpn, gText_Poison},
|
||||
{gStatusConditionString_SleepJpn, gText_Sleep},
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ static const u8 sText_SpDef2[] = _("SP. DEF");
|
|||
static const u8 sText_Accuracy[] = _("accuracy");
|
||||
static const u8 sText_Evasiveness[] = _("evasiveness");
|
||||
|
||||
const u8 * const gStatNamesTable[NUM_BATTLE_STATS] =
|
||||
const u8 *const gStatNamesTable[NUM_BATTLE_STATS] =
|
||||
{
|
||||
[STAT_HP] = sText_HP2,
|
||||
[STAT_ATK] = sText_Attack2,
|
||||
|
|
@ -449,7 +449,7 @@ static const u8 sText_PokeblockWasTooSweet[] = _("was too sweet!");
|
|||
static const u8 sText_PokeblockWasTooBitter[] = _("was too bitter!");
|
||||
static const u8 sText_PokeblockWasTooSour[] = _("was too sour!");
|
||||
|
||||
const u8 * const gPokeblockWasTooXStringTable[FLAVOR_COUNT] =
|
||||
const u8 *const gPokeblockWasTooXStringTable[FLAVOR_COUNT] =
|
||||
{
|
||||
[FLAVOR_SPICY] = sText_PokeblockWasTooSpicy,
|
||||
[FLAVOR_DRY] = sText_PokeblockWasTooDry,
|
||||
|
|
@ -514,7 +514,7 @@ static const u8 sText_Trainer2WinText[];
|
|||
static const u8 sText_TwoInGameTrainersDefeated[];
|
||||
static const u8 sText_Trainer2LoseText[];
|
||||
|
||||
const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT - BATTLESTRINGS_TABLE_START] =
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT - BATTLESTRINGS_TABLE_START] =
|
||||
{
|
||||
[STRINGID_TRAINER1LOSETEXT - BATTLESTRINGS_TABLE_START] = sText_Trainer1LoseText,
|
||||
[STRINGID_PKMNGAINEDEXP - BATTLESTRINGS_TABLE_START] = sText_PkmnGainedEXP,
|
||||
|
|
@ -1293,7 +1293,7 @@ static const u8 sText_SpAtk[] = _("SP. ATK");
|
|||
static const u8 sText_SpDef[] = _("SP. DEF");
|
||||
|
||||
// Unused
|
||||
static const u8 * const sStatNamesTable2[] =
|
||||
static const u8 *const sStatNamesTable2[] =
|
||||
{
|
||||
sText_HP, sText_SpAtk, sText_Attack,
|
||||
sText_SpDef, sText_Defense, sText_Speed
|
||||
|
|
@ -1406,7 +1406,7 @@ static const u8 sText_LostToOpponentByReferee[] = _("{B_PLAYER_MON1_NAME} lost t
|
|||
static const u8 sText_TiedOpponentByReferee[] = _("{B_PLAYER_MON1_NAME} tied the opponent\n{B_OPPONENT_MON1_NAME} in a REFEREE's decision!");
|
||||
static const u8 sText_RefCommenceBattle[] = _("REFEREE: {B_PLAYER_MON1_NAME} VS {B_OPPONENT_MON1_NAME}!\nCommence battling!");
|
||||
|
||||
const u8 * const gRefereeStringsTable[] =
|
||||
const u8 *const gRefereeStringsTable[] =
|
||||
{
|
||||
[B_MSG_REF_NOTHING_IS_DECIDED] = sText_RefIfNothingIsDecided,
|
||||
[B_MSG_REF_THATS_IT] = sText_RefThatsIt,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ static void SetRandomPalacePrize(void);
|
|||
static void GivePalacePrize(void);
|
||||
|
||||
// Const rom data.
|
||||
static void (* const sBattlePalaceFunctions[])(void) =
|
||||
static void (*const sBattlePalaceFunctions[])(void) =
|
||||
{
|
||||
[BATTLE_PALACE_FUNC_INIT] = InitPalaceChallenge,
|
||||
[BATTLE_PALACE_FUNC_GET_DATA] = GetPalaceData,
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ static const u8 sFrontierBrainStreakAppearances[NUM_FRONTIER_FACILITIES][4] =
|
|||
[FRONTIER_FACILITY_PYRAMID] = {21, 70, 35, 0},
|
||||
};
|
||||
|
||||
static void (* const sBattlePikeFunctions[])(void) =
|
||||
static void (*const sBattlePikeFunctions[])(void) =
|
||||
{
|
||||
[BATTLE_PIKE_FUNC_SET_ROOM_TYPE] = SetRoomType,
|
||||
[BATTLE_PIKE_FUNC_GET_DATA] = GetBattlePikeData,
|
||||
|
|
@ -531,7 +531,7 @@ static const u8 sNumMonsToHealBeforePikeQueen[][3] =
|
|||
{0, 1, 2},
|
||||
};
|
||||
|
||||
static bool8 (* const sStatusInflictionScreenFlashFuncs[])(struct Task *) =
|
||||
static bool8 (*const sStatusInflictionScreenFlashFuncs[])(struct Task *) =
|
||||
{
|
||||
StatusInflictionFadeOut, StatusInflictionFadeIn
|
||||
};
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ static const u8 sHintTextTypes[] =
|
|||
HINT_EXIT_SHORT_REMAINING_ITEMS,
|
||||
};
|
||||
|
||||
static void (* const sBattlePyramidFunctions[])(void) =
|
||||
static void (*const sBattlePyramidFunctions[])(void) =
|
||||
{
|
||||
[BATTLE_PYRAMID_FUNC_INIT] = InitPyramidChallenge,
|
||||
[BATTLE_PYRAMID_FUNC_GET_DATA] = GetBattlePyramidData,
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ static const union AnimCmd sAnim_PyramidBag[] =
|
|||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_PyramidBag[] =
|
||||
static const union AnimCmd *const sAnims_PyramidBag[] =
|
||||
{
|
||||
sAnim_PyramidBag,
|
||||
};
|
||||
|
|
@ -352,7 +352,7 @@ enum {
|
|||
ANIM_BAG_SHAKE,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd * const sAffineAnims_PyramidBag[] =
|
||||
static const union AffineAnimCmd *const sAffineAnims_PyramidBag[] =
|
||||
{
|
||||
[ANIM_BAG_STILL] = sAffineAnim_PyramidBag_Still,
|
||||
[ANIM_BAG_SHAKE] = sAffineAnim_PyramidBag_Shake,
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ static void Cmd_finishaction(void);
|
|||
static void Cmd_finishturn(void);
|
||||
static void Cmd_trainerslideout(void);
|
||||
|
||||
void (* const gBattleScriptingCommandsTable[])(void) =
|
||||
void (*const gBattleScriptingCommandsTable[])(void) =
|
||||
{
|
||||
Cmd_attackcanceler, //0x0
|
||||
Cmd_accuracycheck, //0x1
|
||||
|
|
|
|||
|
|
@ -799,7 +799,7 @@ struct
|
|||
|
||||
#include "data/battle_frontier/battle_tent.h"
|
||||
|
||||
static void (* const sBattleTowerFuncs[])(void) =
|
||||
static void (*const sBattleTowerFuncs[])(void) =
|
||||
{
|
||||
[BATTLE_TOWER_FUNC_INIT] = InitTowerChallenge,
|
||||
[BATTLE_TOWER_FUNC_GET_DATA] = GetTowerData,
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ static s16 IsTrainerPicSlideDone(s16);
|
|||
static bool8 TransitionIntro_FadeToGray(struct Task *);
|
||||
static bool8 TransitionIntro_FadeFromGray(struct Task *);
|
||||
static bool8 IsIntroTaskDone(void);
|
||||
static bool16 UpdateRectangularSpiralLine(const s16 * const *, struct RectangularSpiralLine *);
|
||||
static bool16 UpdateRectangularSpiralLine(const s16 *const *, struct RectangularSpiralLine *);
|
||||
static void SpriteCB_FldEffPokeballTrail(struct Sprite *);
|
||||
static void SpriteCB_MugshotTrainerPic(struct Sprite *);
|
||||
static void SpriteCB_WhiteBarFade(struct Sprite *);
|
||||
|
|
@ -3281,7 +3281,7 @@ static bool8 RectangularSpiral_End(struct Task *task)
|
|||
}
|
||||
|
||||
// Returns TRUE if a tile should be drawn, FALSE otherwise
|
||||
static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, struct RectangularSpiralLine *line)
|
||||
static bool16 UpdateRectangularSpiralLine(const s16 *const *moveDataTable, struct RectangularSpiralLine *line)
|
||||
{
|
||||
const s16 *moveData = moveDataTable[line->state];
|
||||
|
||||
|
|
|
|||
|
|
@ -1207,7 +1207,7 @@ static void CreateBerrySprite(u16 itemId, u8 playerId)
|
|||
sBerrySpriteData[playerId][4]);
|
||||
}
|
||||
|
||||
static void ConvertItemToBlenderBerry(struct BlenderBerry* berry, u16 itemId)
|
||||
static void ConvertItemToBlenderBerry(struct BlenderBerry *berry, u16 itemId)
|
||||
{
|
||||
const struct Berry *berryInfo = GetBerryInfo(ITEM_TO_BERRY(itemId));
|
||||
|
||||
|
|
@ -1539,7 +1539,7 @@ static u8 GetArrowProximity(u16 arrowPos, u8 playerId)
|
|||
return PROXIMITY_MISS;
|
||||
}
|
||||
|
||||
static void SetOpponentsBerryData(u16 playerBerryItemId, u8 playersNum, struct BlenderBerry* playerBerry)
|
||||
static void SetOpponentsBerryData(u16 playerBerryItemId, u8 playersNum, struct BlenderBerry *playerBerry)
|
||||
{
|
||||
u16 opponentSetId = 0;
|
||||
u16 opponentBerryId;
|
||||
|
|
@ -2243,7 +2243,7 @@ static void Blender_DummiedOutFunc(s16 bgX, s16 bgY)
|
|||
|
||||
}
|
||||
|
||||
static bool8 AreBlenderBerriesSame(struct BlenderBerry* berries, u8 a, u8 b)
|
||||
static bool8 AreBlenderBerriesSame(struct BlenderBerry *berries, u8 a, u8 b)
|
||||
{
|
||||
// First check to itemId is pointless (and wrong anyway?), always false when this is called
|
||||
// Only used to determine if two enigma berries are equivalent
|
||||
|
|
@ -2260,7 +2260,7 @@ static bool8 AreBlenderBerriesSame(struct BlenderBerry* berries, u8 a, u8 b)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static u32 CalculatePokeblockColor(struct BlenderBerry* berries, s16 *_flavors, u8 numPlayers, u8 negativeFlavors)
|
||||
static u32 CalculatePokeblockColor(struct BlenderBerry *berries, s16 *_flavors, u8 numPlayers, u8 negativeFlavors)
|
||||
{
|
||||
s16 flavors[FLAVOR_COUNT + 1];
|
||||
s32 i, j;
|
||||
|
|
@ -2491,7 +2491,7 @@ static void CalculatePokeblock(struct BlenderBerry *berries, struct Pokeblock *p
|
|||
flavors[i] = sPokeblockFlavors[i];
|
||||
}
|
||||
|
||||
static void UNUSED Debug_CalculatePokeblock(struct BlenderBerry* berries, struct Pokeblock* pokeblock, u8 numPlayers, u8 *flavors, u16 maxRPM)
|
||||
static void UNUSED Debug_CalculatePokeblock(struct BlenderBerry *berries, struct Pokeblock *pokeblock, u8 numPlayers, u8 *flavors, u16 maxRPM)
|
||||
{
|
||||
CalculatePokeblock(berries, pokeblock, numPlayers, flavors, maxRPM);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -914,7 +914,7 @@ static const u8 *const sResultsTexts[] =
|
|||
[RESULTS_PAGE_POWER + NUM_RESULTS_PAGES] = gText_PressingPowerRankings,
|
||||
};
|
||||
|
||||
static u32 (*const sBerryCrushCommands[])(struct BerryCrushGame * game, u8 * data) =
|
||||
static u32 (*const sBerryCrushCommands[])(struct BerryCrushGame *game, u8 *data) =
|
||||
{
|
||||
[CMD_NONE] = NULL,
|
||||
[CMD_FADE] = Cmd_BeginNormalPaletteFade,
|
||||
|
|
@ -1590,14 +1590,14 @@ static void PrintTextCentered(u8 windowId, u8 left, u8 colorId, const u8 *string
|
|||
AddTextPrinterParameterized3(windowId, FONT_SHORT, left, 0, sTextColorTable[colorId], 0, string);
|
||||
}
|
||||
|
||||
static void PrintResultsText(struct BerryCrushGame * game, u8 page, u8 sp14, u8 baseY)
|
||||
static void PrintResultsText(struct BerryCrushGame *game, u8 page, u8 sp14, u8 baseY)
|
||||
{
|
||||
u8 i, j;
|
||||
u8 playerId = 0;
|
||||
u8 ranking = 0;
|
||||
s32 x;
|
||||
u8 stat;
|
||||
struct BerryCrushGame_Results * results = &game->results;
|
||||
struct BerryCrushGame_Results *results = &game->results;
|
||||
u32 xOffset;
|
||||
s32 y;
|
||||
|
||||
|
|
@ -1942,7 +1942,7 @@ static void DrawPlayerNameWindows(struct BerryCrushGame *game)
|
|||
static void CopyPlayerNameWindowGfxToBg(struct BerryCrushGame *game)
|
||||
{
|
||||
u8 i = 0;
|
||||
u8 * windowGfx;
|
||||
u8 *windowGfx;
|
||||
|
||||
LZ77UnCompWram(gBerryCrush_TextWindows_Tilemap, gDecompressionBuffer);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ struct {
|
|||
u8 curScene;
|
||||
u16 timer;
|
||||
struct MultiBootParam mb;
|
||||
} static * sBerryFix;
|
||||
} static *sBerryFix;
|
||||
|
||||
static void BerryFix_Main(void);
|
||||
static void BerryFix_GpuSet(void);
|
||||
|
|
|
|||
4
src/bg.c
4
src/bg.c
|
|
@ -916,7 +916,7 @@ void CopyToBgTilemapBufferRect(u8 bg, const void *src, u8 destX, u8 destY, u8 wi
|
|||
{
|
||||
case BG_TYPE_NORMAL:
|
||||
{
|
||||
const u16 * srcCopy = src;
|
||||
const u16 *srcCopy = src;
|
||||
for (destY16 = destY; destY16 < (destY + height); destY16++)
|
||||
{
|
||||
for (destX16 = destX; destX16 < (destX + width); destX16++)
|
||||
|
|
@ -928,7 +928,7 @@ void CopyToBgTilemapBufferRect(u8 bg, const void *src, u8 destX, u8 destY, u8 wi
|
|||
}
|
||||
case BG_TYPE_AFFINE:
|
||||
{
|
||||
const u8 * srcCopy = src;
|
||||
const u8 *srcCopy = src;
|
||||
mode = GetBgMetricAffineMode(bg, 0x1);
|
||||
for (destY16 = destY; destY16 < (destY + height); destY16++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ static const union AffineAnimCmd sAffineAnim_SliderHeart_SpinAppear[] =
|
|||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd* const sAffineAnims_SliderHeart[] =
|
||||
static const union AffineAnimCmd *const sAffineAnims_SliderHeart[] =
|
||||
{
|
||||
[SLIDER_HEART_ANIM_NORMAL] = sAffineAnim_SliderHeart_Normal,
|
||||
[SLIDER_HEART_ANIM_DISAPPEAR] = sAffineAnim_SliderHeart_SpinDisappear,
|
||||
|
|
@ -2855,7 +2855,7 @@ void SetContestants(u8 contestType, u8 rank)
|
|||
u8 opponentsCount = 0;
|
||||
u8 opponents[100];
|
||||
bool8 allowPostgameContestants = FALSE;
|
||||
const u8 * filter;
|
||||
const u8 *filter;
|
||||
|
||||
TryPutPlayerLast();
|
||||
|
||||
|
|
@ -3011,7 +3011,7 @@ static void DrawContestantWindowText(void)
|
|||
|
||||
static u8 *Contest_CopyStringWithColor(const u8 *string, u8 color)
|
||||
{
|
||||
u8 * ptr = StringCopy(gDisplayedStringBattle, gText_ColorTransparent);
|
||||
u8 *ptr = StringCopy(gDisplayedStringBattle, gText_ColorTransparent);
|
||||
ptr[-1] = color; // Overwrites the "{COLOR TRANSPARENT}" part of the string.
|
||||
ptr = StringCopy(ptr, string);
|
||||
|
||||
|
|
|
|||
|
|
@ -948,7 +948,7 @@ static const u8 sQuestionPossibilities[MAX_APPRENTICE_QUESTIONS] =
|
|||
QUESTION_ID_WIN_SPEECH
|
||||
};
|
||||
|
||||
static void (* const sApprenticeFunctions[])(void) =
|
||||
static void (*const sApprenticeFunctions[])(void) =
|
||||
{
|
||||
[APPRENTICE_FUNC_GAVE_LVLMODE] = Script_GivenApprenticeLvlMode,
|
||||
[APPRENTICE_FUNC_SET_LVLMODE] = Script_SetApprenticeLvlMode,
|
||||
|
|
|
|||
|
|
@ -636,8 +636,8 @@ const struct Tileset gTileset_SecretBase =
|
|||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset * const gTilesetPointer_SecretBase = &gTileset_SecretBase;
|
||||
const struct Tileset * const gTilesetPointer_SecretBaseRedCave = &gTileset_SecretBaseRedCave;
|
||||
const struct Tileset *const gTilesetPointer_SecretBase = &gTileset_SecretBase;
|
||||
const struct Tileset *const gTilesetPointer_SecretBaseRedCave = &gTileset_SecretBaseRedCave;
|
||||
|
||||
const struct Tileset gTileset_EliteFour =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -275,13 +275,13 @@ struct DodrioGame
|
|||
/*0x3308*/ struct DodrioGame_ScoreResults scoreResults[MAX_RFU_PLAYERS];
|
||||
}; // size = 0x3330
|
||||
|
||||
EWRAM_DATA static struct DodrioGame * sGame = NULL;
|
||||
EWRAM_DATA static u16 * sDodrioSpriteIds[MAX_RFU_PLAYERS] = {NULL};
|
||||
EWRAM_DATA static u16 * sCloudSpriteIds[NUM_CLOUDS] = {NULL};
|
||||
EWRAM_DATA static u16 * sBerrySpriteIds[NUM_BERRY_COLUMNS] = {NULL};
|
||||
EWRAM_DATA static u16 * sBerryIconSpriteIds[NUM_BERRY_TYPES] = {NULL};
|
||||
EWRAM_DATA static struct StatusBar * sStatusBar = NULL;
|
||||
EWRAM_DATA static struct DodrioGame_Gfx * sGfx = NULL;
|
||||
EWRAM_DATA static struct DodrioGame *sGame = NULL;
|
||||
EWRAM_DATA static u16 *sDodrioSpriteIds[MAX_RFU_PLAYERS] = {NULL};
|
||||
EWRAM_DATA static u16 *sCloudSpriteIds[NUM_CLOUDS] = {NULL};
|
||||
EWRAM_DATA static u16 *sBerrySpriteIds[NUM_BERRY_COLUMNS] = {NULL};
|
||||
EWRAM_DATA static u16 *sBerryIconSpriteIds[NUM_BERRY_TYPES] = {NULL};
|
||||
EWRAM_DATA static struct StatusBar *sStatusBar = NULL;
|
||||
EWRAM_DATA static struct DodrioGame_Gfx *sGfx = NULL;
|
||||
|
||||
static bool32 sExitingGame;
|
||||
|
||||
|
|
@ -695,7 +695,7 @@ static void ResetTasksAndSprites(void)
|
|||
FreeAllSpritePalettes();
|
||||
}
|
||||
|
||||
static void InitDodrioGame(struct DodrioGame * game)
|
||||
static void InitDodrioGame(struct DodrioGame *game)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
|
|
@ -1433,7 +1433,7 @@ static void Task_NewGameIntro(u8 taskId)
|
|||
|
||||
static void Task_CommunicateMonInfo(u8 taskId)
|
||||
{
|
||||
s16 * data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u8 i;
|
||||
|
||||
switch (tState)
|
||||
|
|
@ -1759,7 +1759,7 @@ static void HandleSound_Member(void)
|
|||
}
|
||||
for (i = berryStart; i < berryEnd; i++)
|
||||
{
|
||||
struct DodrioGame_Berries * berries = &sGame->players[sGame->multiplayerId].berries;
|
||||
struct DodrioGame_Berries *berries = &sGame->players[sGame->multiplayerId].berries;
|
||||
if (berries->fallDist[i] >= MAX_FALL_DIST)
|
||||
{
|
||||
if (!sGame->playingSquishSound[i])
|
||||
|
|
@ -1802,7 +1802,7 @@ static void VBlankCB_DodrioGame(void)
|
|||
ProcessSpriteCopyRequests();
|
||||
}
|
||||
|
||||
static void InitMonInfo(struct DodrioGame_MonInfo * monInfo, struct Pokemon *mon)
|
||||
static void InitMonInfo(struct DodrioGame_MonInfo *monInfo, struct Pokemon *mon)
|
||||
{
|
||||
monInfo->isShiny = IsMonShiny(mon);
|
||||
}
|
||||
|
|
@ -1861,7 +1861,7 @@ static void InitFirstWaveOfBerries(void)
|
|||
|
||||
for (i = berryStart; i < berryEnd; i++)
|
||||
{
|
||||
struct DodrioGame_Berries * berries = &sGame->player.berries;
|
||||
struct DodrioGame_Berries *berries = &sGame->player.berries;
|
||||
berries->fallDist[i] = (i % 2 == 0) ? 1 : 0;
|
||||
berries->ids[i] = BERRY_BLUE;
|
||||
}
|
||||
|
|
@ -1995,7 +1995,7 @@ static bool32 TryPickBerry(u8 playerId, u8 pickState, u8 column)
|
|||
{
|
||||
s32 pick = 0;
|
||||
u8 numPlayersIdx = sGame->numPlayers - 1;
|
||||
struct DodrioGame_Berries * berries = &sGame->player.berries;
|
||||
struct DodrioGame_Berries *berries = &sGame->player.berries;
|
||||
|
||||
switch (pickState)
|
||||
{
|
||||
|
|
@ -3841,7 +3841,7 @@ static void LoadDodrioGfx(void)
|
|||
LoadSpritePalette(&shiny);
|
||||
}
|
||||
|
||||
static void CreateDodrioSprite(struct DodrioGame_MonInfo * monInfo, u8 playerId, u8 id, u8 numPlayers)
|
||||
static void CreateDodrioSprite(struct DodrioGame_MonInfo *monInfo, u8 playerId, u8 id, u8 numPlayers)
|
||||
{
|
||||
struct SpriteTemplate template =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ static u8 GetTrainerHillUnkVal(void)
|
|||
return (gSaveBlock1Ptr->trainerHill.unused + 1) % 256;
|
||||
}
|
||||
|
||||
static bool32 ValidateTrainerChecksum(struct EReaderTrainerHillTrainer * hillTrainer)
|
||||
static bool32 ValidateTrainerChecksum(struct EReaderTrainerHillTrainer *hillTrainer)
|
||||
{
|
||||
int checksum = CalcByteArraySum((u8 *)hillTrainer, offsetof(typeof(*hillTrainer), checksum));
|
||||
if (checksum != hillTrainer->checksum)
|
||||
|
|
@ -387,7 +387,7 @@ static bool32 ValidateTrainerChecksum(struct EReaderTrainerHillTrainer * hillTra
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 ValidateTrainerHillData(struct EReaderTrainerHillSet * hillSet)
|
||||
bool8 ValidateTrainerHillData(struct EReaderTrainerHillSet *hillSet)
|
||||
{
|
||||
u32 i;
|
||||
u32 checksum;
|
||||
|
|
@ -426,7 +426,7 @@ static bool32 ValidateTrainerHillChecksum(struct EReaderTrainerHillSet *hillSet)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static bool32 TryWriteTrainerHill_Internal(struct EReaderTrainerHillSet * hillSet, struct TrainerHillChallenge * challenge)
|
||||
static bool32 TryWriteTrainerHill_Internal(struct EReaderTrainerHillSet *hillSet, struct TrainerHillChallenge *challenge)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -465,7 +465,7 @@ static bool32 TryWriteTrainerHill_Internal(struct EReaderTrainerHillSet * hillSe
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 TryWriteTrainerHill(struct EReaderTrainerHillSet * hillSet)
|
||||
bool32 TryWriteTrainerHill(struct EReaderTrainerHillSet *hillSet)
|
||||
{
|
||||
void *buffer = AllocZeroed(SECTOR_SIZE);
|
||||
bool32 result = TryWriteTrainerHill_Internal(hillSet, buffer);
|
||||
|
|
@ -473,7 +473,7 @@ bool32 TryWriteTrainerHill(struct EReaderTrainerHillSet * hillSet)
|
|||
return result;
|
||||
}
|
||||
|
||||
static bool32 TryReadTrainerHill_Internal(struct EReaderTrainerHillSet * dest, u8 * buffer)
|
||||
static bool32 TryReadTrainerHill_Internal(struct EReaderTrainerHillSet *dest, u8 *buffer)
|
||||
{
|
||||
if (TryReadSpecialSaveSector(SECTOR_ID_TRAINER_HILL, buffer) != SAVE_STATUS_OK)
|
||||
return FALSE;
|
||||
|
|
@ -485,7 +485,7 @@ static bool32 TryReadTrainerHill_Internal(struct EReaderTrainerHillSet * dest, u
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static bool32 TryReadTrainerHill(struct EReaderTrainerHillSet * hillSet)
|
||||
static bool32 TryReadTrainerHill(struct EReaderTrainerHillSet *hillSet)
|
||||
{
|
||||
u8 *buffer = AllocZeroed(SECTOR_SIZE);
|
||||
bool32 result = TryReadTrainerHill_Internal(hillSet, buffer);
|
||||
|
|
@ -501,7 +501,7 @@ bool32 ReadTrainerHillAndValidate(void)
|
|||
return result;
|
||||
}
|
||||
|
||||
int EReader_Send(int size, const void * src)
|
||||
int EReader_Send(int size, const void *src)
|
||||
{
|
||||
int result;
|
||||
int sendStatus;
|
||||
|
|
@ -542,7 +542,7 @@ int EReader_Send(int size, const void * src)
|
|||
return result;
|
||||
}
|
||||
|
||||
int EReader_Recv(void * dest)
|
||||
int EReader_Recv(void *dest)
|
||||
{
|
||||
int result;
|
||||
int recvStatus;
|
||||
|
|
@ -619,7 +619,7 @@ static void OpenSerial32(void)
|
|||
sCounter2 = 0;
|
||||
}
|
||||
|
||||
int EReaderHandleTransfer(u8 mode, size_t size, const void * data, void * recvBuffer)
|
||||
int EReaderHandleTransfer(u8 mode, size_t size, const void *data, void *recvBuffer)
|
||||
{
|
||||
switch (sSendRecvMgr.state)
|
||||
{
|
||||
|
|
@ -712,7 +712,7 @@ static u16 DetermineSendRecvState(u8 mode)
|
|||
return resp;
|
||||
}
|
||||
|
||||
static void SetUpTransferManager(size_t size, const void * data, void * recvBuffer)
|
||||
static void SetUpTransferManager(size_t size, const void *data, void *recvBuffer)
|
||||
{
|
||||
if (sSendRecvMgr.isParent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ void EvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u
|
|||
u8 name[POKEMON_NAME_BUFFER_SIZE];
|
||||
u16 currSpecies;
|
||||
u32 trainerId, personality;
|
||||
const struct CompressedSpritePalette* pokePal;
|
||||
const struct CompressedSpritePalette *pokePal;
|
||||
u8 id;
|
||||
|
||||
SetHBlankCallback(NULL);
|
||||
|
|
@ -311,7 +311,7 @@ void EvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u
|
|||
static void CB2_EvolutionSceneLoadGraphics(void)
|
||||
{
|
||||
u8 id;
|
||||
const struct CompressedSpritePalette* pokePal;
|
||||
const struct CompressedSpritePalette *pokePal;
|
||||
u16 postEvoSpecies;
|
||||
u32 trainerId, personality;
|
||||
struct Pokemon *mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskId].tPartyId];
|
||||
|
|
@ -420,7 +420,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
|||
break;
|
||||
case 4:
|
||||
{
|
||||
const struct CompressedSpritePalette* pokePal;
|
||||
const struct CompressedSpritePalette *pokePal;
|
||||
u32 trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
||||
u32 personality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies],
|
||||
|
|
@ -470,7 +470,7 @@ void TradeEvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, u8 preEvoSprit
|
|||
u8 name[POKEMON_NAME_BUFFER_SIZE];
|
||||
u16 currSpecies;
|
||||
u32 trainerId, personality;
|
||||
const struct CompressedSpritePalette* pokePal;
|
||||
const struct CompressedSpritePalette *pokePal;
|
||||
u8 id;
|
||||
|
||||
GetMonData(mon, MON_DATA_NICKNAME, name);
|
||||
|
|
|
|||
|
|
@ -604,7 +604,7 @@ static const u16 sBattledBrainBitFlags[NUM_FRONTIER_FACILITIES][2] =
|
|||
[FRONTIER_FACILITY_PYRAMID] = {1 << 12, 1 << 13},
|
||||
};
|
||||
|
||||
static void (* const sFrontierUtilFuncs[])(void) =
|
||||
static void (*const sFrontierUtilFuncs[])(void) =
|
||||
{
|
||||
[FRONTIER_UTIL_FUNC_GET_STATUS] = GetChallengeStatus,
|
||||
[FRONTIER_UTIL_FUNC_GET_DATA] = GetFrontierData,
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ static void Task_HofPC_HandlePaletteOnExit(u8 taskId);
|
|||
static void Task_HofPC_HandleExit(u8 taskId);
|
||||
static void Task_HofPC_ExitOnButtonPress(u8 taskId);
|
||||
static void SpriteCB_GetOnScreenAndAnimate(struct Sprite *sprite);
|
||||
static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u8 unused2);
|
||||
static void HallOfFame_PrintMonInfo(struct HallofFameMon *currMon, u8 unused1, u8 unused2);
|
||||
static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2);
|
||||
static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2);
|
||||
static void Task_DoDomeConfetti(u8 taskId);
|
||||
|
|
@ -296,7 +296,7 @@ static const union AnimCmd sAnim_WhiteConfettiC[] =
|
|||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_Confetti[] =
|
||||
static const union AnimCmd *const sAnims_Confetti[] =
|
||||
{
|
||||
sAnim_PinkConfettiA,
|
||||
sAnim_RedConfettiA,
|
||||
|
|
@ -563,7 +563,7 @@ static void Task_Hof_DisplayMon(u8 taskId)
|
|||
s16 startX, startY, destX, destY;
|
||||
|
||||
u16 currMonId = gTasks[taskId].tDisplayedMonId;
|
||||
struct HallofFameMon* currMon = &sHofMonPtr->mon[currMonId];
|
||||
struct HallofFameMon *currMon = &sHofMonPtr->mon[currMonId];
|
||||
|
||||
if (gTasks[taskId].tMonNumber > PARTY_SIZE / 2)
|
||||
{
|
||||
|
|
@ -597,7 +597,7 @@ static void Task_Hof_DisplayMon(u8 taskId)
|
|||
static void Task_Hof_PrintMonInfoAfterAnimating(u8 taskId)
|
||||
{
|
||||
u16 currMonId = gTasks[taskId].tDisplayedMonId;
|
||||
struct HallofFameMon* currMon = &sHofMonPtr->mon[currMonId];
|
||||
struct HallofFameMon *currMon = &sHofMonPtr->mon[currMonId];
|
||||
struct Sprite *monSprite = &gSprites[gTasks[taskId].tMonSpriteId(currMonId)];
|
||||
|
||||
if (monSprite->callback == SpriteCallbackDummy)
|
||||
|
|
@ -612,7 +612,7 @@ static void Task_Hof_PrintMonInfoAfterAnimating(u8 taskId)
|
|||
static void Task_Hof_TryDisplayAnotherMon(u8 taskId)
|
||||
{
|
||||
u16 currPokeID = gTasks[taskId].tDisplayedMonId;
|
||||
struct HallofFameMon* currMon = &sHofMonPtr->mon[currPokeID];
|
||||
struct HallofFameMon *currMon = &sHofMonPtr->mon[currPokeID];
|
||||
|
||||
if (gTasks[taskId].tFrameCount != 0)
|
||||
{
|
||||
|
|
@ -889,7 +889,7 @@ static void Task_HofPC_CopySaveData(u8 taskId)
|
|||
static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
{
|
||||
struct HallofFameTeam *savedTeams = sHofMonPtr;
|
||||
struct HallofFameMon* currMon;
|
||||
struct HallofFameMon *currMon;
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < gTasks[taskId].tCurrTeamNo; i++)
|
||||
|
|
@ -955,7 +955,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
|||
static void Task_HofPC_PrintMonInfo(u8 taskId)
|
||||
{
|
||||
struct HallofFameTeam *savedTeams = sHofMonPtr;
|
||||
struct HallofFameMon* currMon;
|
||||
struct HallofFameMon *currMon;
|
||||
u16 i;
|
||||
u16 currMonID;
|
||||
|
||||
|
|
@ -1111,7 +1111,7 @@ static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2)
|
|||
CopyWindowToVram(0, COPYWIN_FULL);
|
||||
}
|
||||
|
||||
static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u8 unused2)
|
||||
static void HallOfFame_PrintMonInfo(struct HallofFameMon *currMon, u8 unused1, u8 unused2)
|
||||
{
|
||||
u8 text[max(32, POKEMON_NAME_LENGTH + 1)];
|
||||
u8 *stringPtr;
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@ void SortBerriesOrTMHMs(struct BagPocket *bagPocket)
|
|||
}
|
||||
}
|
||||
|
||||
void MoveItemSlotInList(struct ItemSlot* itemSlots_, u32 from, u32 to_)
|
||||
void MoveItemSlotInList(struct ItemSlot *itemSlots_, u32 from, u32 to_)
|
||||
{
|
||||
// dumb assignments needed to match
|
||||
struct ItemSlot *itemSlots = itemSlots_;
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ void MgbaClose(void)
|
|||
*REG_DEBUG_ENABLE = 0;
|
||||
}
|
||||
|
||||
void MgbaPrintf(s32 level, const char* ptr, ...)
|
||||
void MgbaPrintf(s32 level, const char *ptr, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ void ClearSav1(void)
|
|||
// Offset is the sum of the trainer id bytes
|
||||
void SetSaveBlocksPointers(u16 offset)
|
||||
{
|
||||
struct SaveBlock1** sav1_LocalVar = &gSaveBlock1Ptr;
|
||||
struct SaveBlock1 **sav1_LocalVar = &gSaveBlock1Ptr;
|
||||
|
||||
offset = (offset + Random()) & (SAVEBLOCK_MOVE_RANGE - 4);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
// Some of these functions have different signatures, so we need to make this
|
||||
// an array of void pointers or a struct. It's simpler to just make it an array
|
||||
// for now.
|
||||
void * const gMPlayJumpTableTemplate[] =
|
||||
void *const gMPlayJumpTableTemplate[] =
|
||||
{
|
||||
ply_fine,
|
||||
ply_goto,
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ static const u8 sText_PyramidFloor6[] = _("PYRAMID FLOOR 6");
|
|||
static const u8 sText_PyramidFloor7[] = _("PYRAMID FLOOR 7");
|
||||
static const u8 sText_Pyramid[] = _("PYRAMID");
|
||||
|
||||
static const u8 * const sBattlePyramid_MapHeaderStrings[FRONTIER_STAGES_PER_CHALLENGE + 1] =
|
||||
static const u8 *const sBattlePyramid_MapHeaderStrings[FRONTIER_STAGES_PER_CHALLENGE + 1] =
|
||||
{
|
||||
sText_PyramidFloor1,
|
||||
sText_PyramidFloor2,
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ static u8 sSelectedStory;
|
|||
COMMON_DATA struct BardSong gBardSong = {0};
|
||||
|
||||
static EWRAM_DATA u16 sUnusedPitchTableIndex = 0;
|
||||
static EWRAM_DATA struct MauvilleManStoryteller * sStorytellerPtr = NULL;
|
||||
static EWRAM_DATA struct MauvilleManStoryteller *sStorytellerPtr = NULL;
|
||||
static EWRAM_DATA u8 sStorytellerWindowId = 0;
|
||||
|
||||
static const u16 sDefaultBardSongLyrics[NUM_BARD_SONG_WORDS] = {
|
||||
|
|
@ -46,7 +46,7 @@ static const u16 sDefaultBardSongLyrics[NUM_BARD_SONG_WORDS] = {
|
|||
EC_WORD_DANCE
|
||||
};
|
||||
|
||||
static const u8 * const sGiddyAdjectives[] = {
|
||||
static const u8 *const sGiddyAdjectives[] = {
|
||||
GiddyText_SoPretty,
|
||||
GiddyText_SoDarling,
|
||||
GiddyText_SoRelaxed,
|
||||
|
|
@ -60,7 +60,7 @@ static const u8 * const sGiddyAdjectives[] = {
|
|||
// Non-random lines Giddy can say. Not all are strictly
|
||||
// questions, but most are, and the player will receive
|
||||
// a Yes/No prompt afterwards regardless.
|
||||
static const u8 * const sGiddyQuestions[GIDDY_MAX_QUESTIONS] = {
|
||||
static const u8 *const sGiddyQuestions[GIDDY_MAX_QUESTIONS] = {
|
||||
GiddyText_ISoWantToGoOnAVacation,
|
||||
GiddyText_IBoughtCrayonsWith120Colors,
|
||||
GiddyText_WouldntItBeNiceIfWeCouldFloat,
|
||||
|
|
@ -176,9 +176,9 @@ void SaveBardSongLyrics(void)
|
|||
static void PrepareSongText(void)
|
||||
{
|
||||
struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
|
||||
u16 * lyrics = !gSpecialVar_0x8004 ? bard->songLyrics : bard->newSongLyrics;
|
||||
u8 * wordEnd = gStringVar4;
|
||||
u8 * str = wordEnd;
|
||||
u16 *lyrics = !gSpecialVar_0x8004 ? bard->songLyrics : bard->newSongLyrics;
|
||||
u8 *wordEnd = gStringVar4;
|
||||
u8 *str = wordEnd;
|
||||
u16 paragraphNum;
|
||||
|
||||
// Easy chat "words" aren't strictly single words, e.g. EC_WORD_MATCH_UP is the string "MATCH UP".
|
||||
|
|
@ -454,12 +454,12 @@ static void EnableTextPrinters(void)
|
|||
gDisableTextPrinters = FALSE;
|
||||
}
|
||||
|
||||
static void DisableTextPrinters(struct TextPrinterTemplate * printer, u16 renderCmd)
|
||||
static void DisableTextPrinters(struct TextPrinterTemplate *printer, u16 renderCmd)
|
||||
{
|
||||
gDisableTextPrinters = TRUE;
|
||||
}
|
||||
|
||||
static void DrawSongTextWindow(const u8 * str)
|
||||
static void DrawSongTextWindow(const u8 *str)
|
||||
{
|
||||
DrawDialogueFrame(0, FALSE);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 0, 1, 1, DisableTextPrinters);
|
||||
|
|
@ -750,7 +750,7 @@ void SetMauvilleOldManObjEventGfx(void)
|
|||
|
||||
// Language fixers?
|
||||
|
||||
void SanitizeMauvilleOldManForRuby(union OldMan * oldMan)
|
||||
void SanitizeMauvilleOldManForRuby(union OldMan *oldMan)
|
||||
{
|
||||
s32 i;
|
||||
u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
|
|
@ -759,7 +759,7 @@ void SanitizeMauvilleOldManForRuby(union OldMan * oldMan)
|
|||
{
|
||||
case MAUVILLE_MAN_TRADER:
|
||||
{
|
||||
struct MauvilleOldManTrader * trader = &oldMan->trader;
|
||||
struct MauvilleOldManTrader *trader = &oldMan->trader;
|
||||
for (i = 0; i < NUM_TRADER_ITEMS; i++)
|
||||
{
|
||||
if (trader->language[i] == LANGUAGE_JAPANESE)
|
||||
|
|
@ -769,7 +769,7 @@ void SanitizeMauvilleOldManForRuby(union OldMan * oldMan)
|
|||
}
|
||||
case MAUVILLE_MAN_STORYTELLER:
|
||||
{
|
||||
struct MauvilleManStoryteller * storyteller = &oldMan->storyteller;
|
||||
struct MauvilleManStoryteller *storyteller = &oldMan->storyteller;
|
||||
for (i = 0; i < NUM_STORYTELLER_TALES; i++)
|
||||
{
|
||||
if (storyteller->gameStatIDs[i] != 0)
|
||||
|
|
@ -790,7 +790,7 @@ void SanitizeMauvilleOldManForRuby(union OldMan * oldMan)
|
|||
}
|
||||
}
|
||||
|
||||
static void UNUSED SetMauvilleOldManLanguage(union OldMan * oldMan, u32 language1, u32 language2, u32 language3)
|
||||
static void UNUSED SetMauvilleOldManLanguage(union OldMan *oldMan, u32 language1, u32 language2, u32 language3)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -798,7 +798,7 @@ static void UNUSED SetMauvilleOldManLanguage(union OldMan * oldMan, u32 language
|
|||
{
|
||||
case MAUVILLE_MAN_TRADER:
|
||||
{
|
||||
struct MauvilleOldManTrader * trader = &oldMan->trader;
|
||||
struct MauvilleOldManTrader *trader = &oldMan->trader;
|
||||
|
||||
for (i = 0; i < NUM_TRADER_ITEMS; i++)
|
||||
{
|
||||
|
|
@ -811,7 +811,7 @@ static void UNUSED SetMauvilleOldManLanguage(union OldMan * oldMan, u32 language
|
|||
break;
|
||||
case MAUVILLE_MAN_STORYTELLER:
|
||||
{
|
||||
struct MauvilleManStoryteller * storyteller = &oldMan->storyteller;
|
||||
struct MauvilleManStoryteller *storyteller = &oldMan->storyteller;
|
||||
|
||||
for (i = 0; i < NUM_STORYTELLER_TALES; i++)
|
||||
{
|
||||
|
|
@ -824,7 +824,7 @@ static void UNUSED SetMauvilleOldManLanguage(union OldMan * oldMan, u32 language
|
|||
break;
|
||||
case MAUVILLE_MAN_BARD:
|
||||
{
|
||||
struct MauvilleManBard * bard = &oldMan->bard;
|
||||
struct MauvilleManBard *bard = &oldMan->bard;
|
||||
|
||||
if (language3 == LANGUAGE_JAPANESE)
|
||||
bard->language = language1;
|
||||
|
|
@ -834,7 +834,7 @@ static void UNUSED SetMauvilleOldManLanguage(union OldMan * oldMan, u32 language
|
|||
break;
|
||||
case MAUVILLE_MAN_HIPSTER:
|
||||
{
|
||||
struct MauvilleManHipster * hipster = &oldMan->hipster;
|
||||
struct MauvilleManHipster *hipster = &oldMan->hipster;
|
||||
|
||||
if (language3 == LANGUAGE_JAPANESE)
|
||||
hipster->language = language1;
|
||||
|
|
@ -844,7 +844,7 @@ static void UNUSED SetMauvilleOldManLanguage(union OldMan * oldMan, u32 language
|
|||
break;
|
||||
case MAUVILLE_MAN_GIDDY:
|
||||
{
|
||||
struct MauvilleManGiddy * giddy = &oldMan->giddy;
|
||||
struct MauvilleManGiddy *giddy = &oldMan->giddy;
|
||||
|
||||
if (language3 == LANGUAGE_JAPANESE)
|
||||
giddy->language = language1;
|
||||
|
|
@ -855,13 +855,13 @@ static void UNUSED SetMauvilleOldManLanguage(union OldMan * oldMan, u32 language
|
|||
}
|
||||
}
|
||||
|
||||
void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 version, u32 language)
|
||||
void SanitizeReceivedEmeraldOldMan(union OldMan *oldMan, u32 version, u32 language)
|
||||
{
|
||||
u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
s32 i;
|
||||
if (oldMan->common.id == MAUVILLE_MAN_STORYTELLER && language == LANGUAGE_JAPANESE)
|
||||
{
|
||||
struct MauvilleManStoryteller * storyteller = &oldMan->storyteller;
|
||||
struct MauvilleManStoryteller *storyteller = &oldMan->storyteller;
|
||||
|
||||
for (i = 0; i < NUM_STORYTELLER_TALES; i++)
|
||||
{
|
||||
|
|
@ -878,7 +878,7 @@ void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 version, u32 langu
|
|||
}
|
||||
}
|
||||
|
||||
void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language)
|
||||
void SanitizeReceivedRubyOldMan(union OldMan *oldMan, u32 version, u32 language)
|
||||
{
|
||||
bool32 isRuby = (version == VERSION_SAPPHIRE || version == VERSION_RUBY);
|
||||
|
||||
|
|
@ -886,14 +886,14 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language
|
|||
{
|
||||
case MAUVILLE_MAN_TRADER:
|
||||
{
|
||||
struct MauvilleOldManTrader * trader = &oldMan->trader;
|
||||
struct MauvilleOldManTrader *trader = &oldMan->trader;
|
||||
s32 i;
|
||||
|
||||
if (isRuby)
|
||||
{
|
||||
for (i = 0; i < NUM_TRADER_ITEMS; i++)
|
||||
{
|
||||
u8 * str = trader->playerNames[i];
|
||||
u8 *str = trader->playerNames[i];
|
||||
if (str[0] == EXT_CTRL_CODE_BEGIN && str[1] == EXT_CTRL_CODE_JPN)
|
||||
{
|
||||
StripExtCtrlCodes(str);
|
||||
|
|
@ -920,7 +920,7 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language
|
|||
case MAUVILLE_MAN_STORYTELLER:
|
||||
{
|
||||
|
||||
struct MauvilleManStoryteller * storyteller = &oldMan->storyteller;
|
||||
struct MauvilleManStoryteller *storyteller = &oldMan->storyteller;
|
||||
s32 i;
|
||||
|
||||
if (isRuby)
|
||||
|
|
@ -935,7 +935,7 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language
|
|||
break;
|
||||
case MAUVILLE_MAN_BARD:
|
||||
{
|
||||
struct MauvilleManBard * bard = &oldMan->bard;
|
||||
struct MauvilleManBard *bard = &oldMan->bard;
|
||||
|
||||
if (isRuby)
|
||||
{
|
||||
|
|
@ -945,7 +945,7 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language
|
|||
break;
|
||||
case MAUVILLE_MAN_HIPSTER:
|
||||
{
|
||||
struct MauvilleManHipster * hipster = &oldMan->hipster;
|
||||
struct MauvilleManHipster *hipster = &oldMan->hipster;
|
||||
|
||||
if (isRuby)
|
||||
{
|
||||
|
|
@ -955,7 +955,7 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language
|
|||
break;
|
||||
case MAUVILLE_MAN_GIDDY:
|
||||
{
|
||||
struct MauvilleManGiddy * giddy = &oldMan->giddy;
|
||||
struct MauvilleManGiddy *giddy = &oldMan->giddy;
|
||||
|
||||
if (isRuby)
|
||||
{
|
||||
|
|
@ -1299,9 +1299,9 @@ static void GetStoryByStattellerPlayerName(u32 player, void *dst)
|
|||
memcpy(dst, name, PLAYER_NAME_LENGTH);
|
||||
}
|
||||
|
||||
static void StorytellerSetPlayerName(u32 player, const u8 * src)
|
||||
static void StorytellerSetPlayerName(u32 player, const u8 *src)
|
||||
{
|
||||
u8 * name = sStorytellerPtr->trainerNames[player];
|
||||
u8 *name = sStorytellerPtr->trainerNames[player];
|
||||
memset(name, EOS, PLAYER_NAME_LENGTH);
|
||||
memcpy(name, src, PLAYER_NAME_LENGTH);
|
||||
}
|
||||
|
|
@ -1317,7 +1317,7 @@ static void StorytellerRecordNewStat(u32 player, u32 stat)
|
|||
sStorytellerPtr->language[player] = gGameLanguage;
|
||||
}
|
||||
|
||||
static void ScrambleStatList(u8 * arr, s32 count)
|
||||
static void ScrambleStatList(u8 *arr, s32 count)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
|
|||
|
|
@ -1194,7 +1194,7 @@ void LoadConditionMonPicTemplate(struct SpriteSheet *sheet, struct SpriteTemplat
|
|||
*pal = dataPal;
|
||||
}
|
||||
|
||||
void LoadConditionSelectionIcons(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals)
|
||||
void LoadConditionSelectionIcons(struct SpriteSheet *sheets, struct SpriteTemplate *template, struct SpritePalette *pals)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
|
|
|
|||
|
|
@ -214,11 +214,11 @@ static s32 mini_itoa(s32 value, u32 radix, s32 uppercase, bool32 unsig, char *bu
|
|||
return len;
|
||||
}
|
||||
|
||||
static s32 mini_pad(char* ptr, s32 len, char pad_char, s32 pad_to, char *buffer)
|
||||
static s32 mini_pad(char *ptr, s32 len, char pad_char, s32 pad_to, char *buffer)
|
||||
{
|
||||
s32 i;
|
||||
bool32 overflow = FALSE;
|
||||
char * pbuffer = buffer;
|
||||
char *pbuffer = buffer;
|
||||
if(pad_to == 0)
|
||||
pad_to = len;
|
||||
if (len > pad_to)
|
||||
|
|
@ -260,7 +260,7 @@ s32 mini_vsnprintf(char *buffer, u32 buffer_len, const char *fmt, va_list va)
|
|||
return b.pbuffer - b.buffer;
|
||||
}
|
||||
|
||||
s32 mini_vpprintf(void* buf, const char *fmt, va_list va)
|
||||
s32 mini_vpprintf(void *buf, const char *fmt, va_list va)
|
||||
{
|
||||
char bf[24];
|
||||
char bf2[24];
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ enum {
|
|||
FUNC_RUN_BUFFER,
|
||||
};
|
||||
|
||||
EWRAM_DATA static struct MysteryGiftClient * sClient = NULL;
|
||||
EWRAM_DATA static struct MysteryGiftClient *sClient = NULL;
|
||||
|
||||
static void MysteryGiftClient_Init(struct MysteryGiftClient *, u32, u32);
|
||||
static u32 MysteryGiftClient_CallFunc(struct MysteryGiftClient *);
|
||||
|
|
@ -34,7 +34,7 @@ void MysteryGiftClient_Create(bool32 isWonderNews)
|
|||
sClient->isWonderNews = isWonderNews;
|
||||
}
|
||||
|
||||
u32 MysteryGiftClient_Run(u16 * endVal)
|
||||
u32 MysteryGiftClient_Run(u16 *endVal)
|
||||
{
|
||||
u32 result;
|
||||
if (sClient == NULL)
|
||||
|
|
@ -64,7 +64,7 @@ void MysteryGiftClient_SetParam(u32 val)
|
|||
sClient->param = val;
|
||||
}
|
||||
|
||||
static void MysteryGiftClient_Init(struct MysteryGiftClient * client, u32 sendPlayerId, u32 recvPlayerId)
|
||||
static void MysteryGiftClient_Init(struct MysteryGiftClient *client, u32 sendPlayerId, u32 recvPlayerId)
|
||||
{
|
||||
client->unused = 0;
|
||||
client->funcId = FUNC_INIT;
|
||||
|
|
@ -76,7 +76,7 @@ static void MysteryGiftClient_Init(struct MysteryGiftClient * client, u32 sendPl
|
|||
MysteryGiftLink_Init(&client->link, sendPlayerId, recvPlayerId);
|
||||
}
|
||||
|
||||
static void MysteryGiftClient_Free(struct MysteryGiftClient * client)
|
||||
static void MysteryGiftClient_Free(struct MysteryGiftClient *client)
|
||||
{
|
||||
Free(client->sendBuffer);
|
||||
Free(client->recvBuffer);
|
||||
|
|
@ -84,20 +84,20 @@ static void MysteryGiftClient_Free(struct MysteryGiftClient * client)
|
|||
Free(client->msg);
|
||||
}
|
||||
|
||||
static void MysteryGiftClient_CopyRecvScript(struct MysteryGiftClient * client)
|
||||
static void MysteryGiftClient_CopyRecvScript(struct MysteryGiftClient *client)
|
||||
{
|
||||
memcpy(client->script, client->recvBuffer, MG_LINK_BUFFER_SIZE);
|
||||
client->cmdidx = 0;
|
||||
}
|
||||
|
||||
static void MysteryGiftClient_InitSendWord(struct MysteryGiftClient * client, u32 ident, u32 word)
|
||||
static void MysteryGiftClient_InitSendWord(struct MysteryGiftClient *client, u32 ident, u32 word)
|
||||
{
|
||||
CpuFill32(0, client->sendBuffer, MG_LINK_BUFFER_SIZE);
|
||||
*(u32 *)client->sendBuffer = word;
|
||||
MysteryGiftLink_InitSend(&client->link, ident, client->sendBuffer, sizeof(word));
|
||||
}
|
||||
|
||||
static u32 Client_Init(struct MysteryGiftClient * client)
|
||||
static u32 Client_Init(struct MysteryGiftClient *client)
|
||||
{
|
||||
memcpy(client->script, gMysteryGiftClientScript_Init, MG_LINK_BUFFER_SIZE);
|
||||
client->cmdidx = 0;
|
||||
|
|
@ -106,13 +106,13 @@ static u32 Client_Init(struct MysteryGiftClient * client)
|
|||
return CLI_RET_INIT;
|
||||
}
|
||||
|
||||
static u32 Client_Done(struct MysteryGiftClient * client)
|
||||
static u32 Client_Done(struct MysteryGiftClient *client)
|
||||
{
|
||||
return CLI_RET_END;
|
||||
}
|
||||
|
||||
|
||||
static u32 Client_Recv(struct MysteryGiftClient * client)
|
||||
static u32 Client_Recv(struct MysteryGiftClient *client)
|
||||
{
|
||||
if (MysteryGiftLink_Recv(&client->link))
|
||||
{
|
||||
|
|
@ -122,7 +122,7 @@ static u32 Client_Recv(struct MysteryGiftClient * client)
|
|||
return CLI_RET_ACTIVE;
|
||||
}
|
||||
|
||||
static u32 Client_Send(struct MysteryGiftClient * client)
|
||||
static u32 Client_Send(struct MysteryGiftClient *client)
|
||||
{
|
||||
if (MysteryGiftLink_Send(&client->link))
|
||||
{
|
||||
|
|
@ -132,10 +132,10 @@ static u32 Client_Send(struct MysteryGiftClient * client)
|
|||
return CLI_RET_ACTIVE;
|
||||
}
|
||||
|
||||
static u32 Client_Run(struct MysteryGiftClient * client)
|
||||
static u32 Client_Run(struct MysteryGiftClient *client)
|
||||
{
|
||||
// process command
|
||||
struct MysteryGiftClientCmd * cmd = &client->script[client->cmdidx];
|
||||
struct MysteryGiftClientCmd *cmd = &client->script[client->cmdidx];
|
||||
client->cmdidx++;
|
||||
switch (cmd->instr)
|
||||
{
|
||||
|
|
@ -245,7 +245,7 @@ static u32 Client_Run(struct MysteryGiftClient * client)
|
|||
return CLI_RET_ACTIVE;
|
||||
}
|
||||
|
||||
static u32 Client_Wait(struct MysteryGiftClient * client)
|
||||
static u32 Client_Wait(struct MysteryGiftClient *client)
|
||||
{
|
||||
if (client->funcState)
|
||||
{
|
||||
|
|
@ -255,7 +255,7 @@ static u32 Client_Wait(struct MysteryGiftClient * client)
|
|||
return CLI_RET_ACTIVE;
|
||||
}
|
||||
|
||||
static u32 Client_RunMysteryEventScript(struct MysteryGiftClient * client)
|
||||
static u32 Client_RunMysteryEventScript(struct MysteryGiftClient *client)
|
||||
{
|
||||
switch (client->funcState)
|
||||
{
|
||||
|
|
@ -274,7 +274,7 @@ static u32 Client_RunMysteryEventScript(struct MysteryGiftClient * client)
|
|||
return CLI_RET_ACTIVE;
|
||||
}
|
||||
|
||||
static u32 Client_RunBufferScript(struct MysteryGiftClient * client)
|
||||
static u32 Client_RunBufferScript(struct MysteryGiftClient *client)
|
||||
{
|
||||
// exec arbitrary code
|
||||
u32 (*func)(u32 *, struct SaveBlock2 *, struct SaveBlock1 *) = (void *)gDecompressionBuffer;
|
||||
|
|
@ -286,7 +286,7 @@ static u32 Client_RunBufferScript(struct MysteryGiftClient * client)
|
|||
return CLI_RET_ACTIVE;
|
||||
}
|
||||
|
||||
static u32 MysteryGiftClient_CallFunc(struct MysteryGiftClient * client)
|
||||
static u32 MysteryGiftClient_CallFunc(struct MysteryGiftClient *client)
|
||||
{
|
||||
u32 (*funcs[])(struct MysteryGiftClient *) = {
|
||||
[FUNC_INIT] = Client_Init,
|
||||
|
|
|
|||
|
|
@ -26,17 +26,17 @@ struct SendRecvHeader
|
|||
static u32 MGL_Receive(struct MysteryGiftLink *);
|
||||
static u32 MGL_Send(struct MysteryGiftLink *);
|
||||
|
||||
u32 MysteryGiftLink_Recv(struct MysteryGiftLink * link)
|
||||
u32 MysteryGiftLink_Recv(struct MysteryGiftLink *link)
|
||||
{
|
||||
return link->recvFunc(link);
|
||||
}
|
||||
|
||||
u32 MysteryGiftLink_Send(struct MysteryGiftLink * link)
|
||||
u32 MysteryGiftLink_Send(struct MysteryGiftLink *link)
|
||||
{
|
||||
return link->sendFunc(link);
|
||||
}
|
||||
|
||||
void MysteryGiftLink_Init(struct MysteryGiftLink * link, u32 sendPlayerId, u32 recvPlayerId)
|
||||
void MysteryGiftLink_Init(struct MysteryGiftLink *link, u32 sendPlayerId, u32 recvPlayerId)
|
||||
{
|
||||
link->sendPlayerId = sendPlayerId;
|
||||
link->recvPlayerId = recvPlayerId;
|
||||
|
|
@ -53,7 +53,7 @@ void MysteryGiftLink_Init(struct MysteryGiftLink * link, u32 sendPlayerId, u32 r
|
|||
link->recvFunc = MGL_Receive;
|
||||
}
|
||||
|
||||
void MysteryGiftLink_InitSend(struct MysteryGiftLink * link, u32 ident, const void * src, u32 size)
|
||||
void MysteryGiftLink_InitSend(struct MysteryGiftLink *link, u32 ident, const void *src, u32 size)
|
||||
{
|
||||
link->state = 0;
|
||||
link->sendIdent = ident;
|
||||
|
|
@ -66,7 +66,7 @@ void MysteryGiftLink_InitSend(struct MysteryGiftLink * link, u32 ident, const vo
|
|||
link->sendBuffer = src;
|
||||
}
|
||||
|
||||
void MysteryGiftLink_InitRecv(struct MysteryGiftLink * link, u32 ident, void * dest)
|
||||
void MysteryGiftLink_InitRecv(struct MysteryGiftLink *link, u32 ident, void *dest)
|
||||
{
|
||||
link->state = 0;
|
||||
link->recvIdent = ident;
|
||||
|
|
@ -76,7 +76,7 @@ void MysteryGiftLink_InitRecv(struct MysteryGiftLink * link, u32 ident, void * d
|
|||
link->recvBuffer = dest;
|
||||
}
|
||||
|
||||
static void MGL_ReceiveBlock(u32 playerId, void * dest, size_t size)
|
||||
static void MGL_ReceiveBlock(u32 playerId, void *dest, size_t size)
|
||||
{
|
||||
memcpy(dest, gBlockRecvBuffer[playerId], size);
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ static void MGL_ResetReceived(u32 playerId)
|
|||
ResetBlockReceivedFlag(playerId);
|
||||
}
|
||||
|
||||
static bool32 MGL_Receive(struct MysteryGiftLink * link)
|
||||
static bool32 MGL_Receive(struct MysteryGiftLink *link)
|
||||
{
|
||||
struct SendRecvHeader header;
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ static bool32 MGL_Receive(struct MysteryGiftLink * link)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 MGL_Send(struct MysteryGiftLink * link)
|
||||
static bool32 MGL_Send(struct MysteryGiftLink *link)
|
||||
{
|
||||
struct SendRecvHeader header;
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ struct MysteryGiftTaskData
|
|||
bool8 isWonderNews;
|
||||
bool8 sourceIsFriend;
|
||||
u8 msgId;
|
||||
u8 * clientMsg;
|
||||
u8 *clientMsg;
|
||||
};
|
||||
|
||||
static const struct BgTemplate sBGTemplates[] = {
|
||||
|
|
@ -485,8 +485,8 @@ void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void)
|
|||
// Print the text window at the top of the screen with the title and control instructions
|
||||
void PrintMysteryGiftOrEReaderHeader(bool8 isEReader, bool32 useCancel)
|
||||
{
|
||||
const u8 * title;
|
||||
const u8 * options;
|
||||
const u8 *title;
|
||||
const u8 *options;
|
||||
FillWindowPixelBuffer(WIN_HEADER, 0);
|
||||
if (!isEReader)
|
||||
{
|
||||
|
|
@ -597,7 +597,7 @@ static void ShowDownArrow(void)
|
|||
DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]);
|
||||
}
|
||||
|
||||
static bool32 UNUSED HideDownArrowAndWaitButton(u8 * textState)
|
||||
static bool32 UNUSED HideDownArrowAndWaitButton(u8 *textState)
|
||||
{
|
||||
switch (*textState)
|
||||
{
|
||||
|
|
@ -614,7 +614,7 @@ static bool32 UNUSED HideDownArrowAndWaitButton(u8 * textState)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 PrintStringAndWait2Seconds(u8 * counter, const u8 * str)
|
||||
static bool32 PrintStringAndWait2Seconds(u8 *counter, const u8 *str)
|
||||
{
|
||||
if (*counter == 0)
|
||||
MG_AddMessageTextPrinter(str);
|
||||
|
|
@ -631,7 +631,7 @@ static bool32 PrintStringAndWait2Seconds(u8 * counter, const u8 * str)
|
|||
}
|
||||
}
|
||||
|
||||
static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whichMenu)
|
||||
static u32 MysteryGift_HandleThreeOptionMenu(u8 *unused0, u16 *unused1, u8 whichMenu)
|
||||
{
|
||||
struct ListMenuTemplate listMenuTemplate = sListMenuTemplate_ThreeOptions;
|
||||
struct WindowTemplate windowTemplate = sWindowTemplate_ThreeOptions;
|
||||
|
|
@ -662,7 +662,7 @@ static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whi
|
|||
return response;
|
||||
}
|
||||
|
||||
s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, const u8 * str)
|
||||
s8 DoMysteryGiftYesNo(u8 *textState, u16 *windowId, bool8 yesNoBoxPlacement, const u8 *str)
|
||||
{
|
||||
struct WindowTemplate windowTemplate;
|
||||
s8 input;
|
||||
|
|
@ -719,7 +719,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c
|
|||
}
|
||||
|
||||
// Handle the "Receive/Send/Toss" menu that appears when selecting Wonder Card/News
|
||||
static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotToss, bool32 cannotSend)
|
||||
static s32 HandleGiftSelectMenu(u8 *textState, u16 *windowId, bool32 cannotToss, bool32 cannotSend)
|
||||
{
|
||||
struct WindowTemplate UNUSED windowTemplate;
|
||||
s32 input;
|
||||
|
|
@ -786,7 +786,7 @@ static bool32 ValidateCardOrNews(bool32 isWonderNews)
|
|||
return ValidateSavedWonderNews();
|
||||
}
|
||||
|
||||
static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 isWonderNews)
|
||||
static bool32 HandleLoadWonderCardOrNews(u8 *state, bool32 isWonderNews)
|
||||
{
|
||||
switch (*state)
|
||||
{
|
||||
|
|
@ -852,7 +852,7 @@ static bool32 ExitWonderCardOrNews(bool32 isWonderNews, bool32 useCancel)
|
|||
}
|
||||
}
|
||||
|
||||
static s32 AskDiscardGift(u8 * textState, u16 * windowId, bool32 isWonderNews)
|
||||
static s32 AskDiscardGift(u8 *textState, u16 *windowId, bool32 isWonderNews)
|
||||
{
|
||||
if (!isWonderNews)
|
||||
return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_IfThrowAwayCardEventWontHappen);
|
||||
|
|
@ -860,7 +860,7 @@ static s32 AskDiscardGift(u8 * textState, u16 * windowId, bool32 isWonderNews)
|
|||
return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_OkayToDiscardNews);
|
||||
}
|
||||
|
||||
static bool32 PrintThrownAway(u8 * textState, bool32 isWonderNews)
|
||||
static bool32 PrintThrownAway(u8 *textState, bool32 isWonderNews)
|
||||
{
|
||||
if (!isWonderNews)
|
||||
return PrintMysteryGiftMenuMessage(textState, gText_WonderCardThrownAway);
|
||||
|
|
@ -868,7 +868,7 @@ static bool32 PrintThrownAway(u8 * textState, bool32 isWonderNews)
|
|||
return PrintMysteryGiftMenuMessage(textState, gText_WonderNewsThrownAway);
|
||||
}
|
||||
|
||||
static bool32 SaveOnMysteryGiftMenu(u8 * state)
|
||||
static bool32 SaveOnMysteryGiftMenu(u8 *state)
|
||||
{
|
||||
switch (*state)
|
||||
{
|
||||
|
|
@ -897,9 +897,9 @@ static bool32 SaveOnMysteryGiftMenu(u8 * state)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static const u8 * GetClientResultMessage(bool32 * successMsg, bool8 isWonderNews, bool8 sourceIsFriend, u32 msgId)
|
||||
static const u8 * GetClientResultMessage(bool32 *successMsg, bool8 isWonderNews, bool8 sourceIsFriend, u32 msgId)
|
||||
{
|
||||
const u8 * msg = NULL;
|
||||
const u8 *msg = NULL;
|
||||
*successMsg = FALSE;
|
||||
|
||||
switch (msgId)
|
||||
|
|
@ -969,7 +969,7 @@ static const u8 * GetClientResultMessage(bool32 * successMsg, bool8 isWonderNews
|
|||
return msg;
|
||||
}
|
||||
|
||||
static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer)
|
||||
static bool32 PrintSuccessMessage(u8 *state, const u8 *msg, u16 *timer)
|
||||
{
|
||||
switch (*state)
|
||||
{
|
||||
|
|
@ -996,9 +996,9 @@ static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static const u8 * GetServerResultMessage(bool32 * wonderSuccess, bool8 sourceIsFriend, u32 msgId)
|
||||
static const u8 * GetServerResultMessage(bool32 *wonderSuccess, bool8 sourceIsFriend, u32 msgId)
|
||||
{
|
||||
const u8 * result = gText_CommunicationError;
|
||||
const u8 *result = gText_CommunicationError;
|
||||
*wonderSuccess = FALSE;
|
||||
switch (msgId)
|
||||
{
|
||||
|
|
@ -1053,10 +1053,10 @@ static const u8 * GetServerResultMessage(bool32 * wonderSuccess, bool8 sourceIsF
|
|||
return result;
|
||||
}
|
||||
|
||||
static bool32 PrintServerResultMessage(u8 * state, u16 * timer, bool8 sourceIsFriend, u32 msgId)
|
||||
static bool32 PrintServerResultMessage(u8 *state, u16 *timer, bool8 sourceIsFriend, u32 msgId)
|
||||
{
|
||||
bool32 wonderSuccess;
|
||||
const u8 * str = GetServerResultMessage(&wonderSuccess, sourceIsFriend, msgId);
|
||||
const u8 *str = GetServerResultMessage(&wonderSuccess, sourceIsFriend, msgId);
|
||||
if (wonderSuccess)
|
||||
return PrintSuccessMessage(state, str, timer);
|
||||
else
|
||||
|
|
@ -1111,7 +1111,7 @@ enum {
|
|||
static void CreateMysteryGiftTask(void)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_MysteryGift, 0);
|
||||
struct MysteryGiftTaskData * data = (void *)gTasks[taskId].data;
|
||||
struct MysteryGiftTaskData *data = (void *)gTasks[taskId].data;
|
||||
data->state = MG_STATE_TO_MAIN_MENU;
|
||||
data->textState = 0;
|
||||
data->unused4 = 0;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ enum {
|
|||
FUNC_RUN,
|
||||
};
|
||||
|
||||
EWRAM_DATA static struct MysteryGiftServer * sServer = NULL;
|
||||
EWRAM_DATA static struct MysteryGiftServer *sServer = NULL;
|
||||
|
||||
static void MysteryGiftServer_Init(struct MysteryGiftServer *, const void *, u32, u32);
|
||||
static void MysteryGiftServer_Free(struct MysteryGiftServer *);
|
||||
|
|
@ -34,7 +34,7 @@ void MysterGiftServer_CreateForCard(void)
|
|||
MysteryGiftServer_Init(sServer, gMysteryGiftServerScript_SendWonderCard, 0, 1);
|
||||
}
|
||||
|
||||
u32 MysterGiftServer_Run(u16 * endVal)
|
||||
u32 MysterGiftServer_Run(u16 *endVal)
|
||||
{
|
||||
u32 result;
|
||||
if (sServer == NULL)
|
||||
|
|
@ -49,7 +49,7 @@ u32 MysterGiftServer_Run(u16 * endVal)
|
|||
return result;
|
||||
}
|
||||
|
||||
static void MysteryGiftServer_Init(struct MysteryGiftServer * svr, const void * script, u32 sendPlayerId, u32 recvPlayerId)
|
||||
static void MysteryGiftServer_Init(struct MysteryGiftServer *svr, const void *script, u32 sendPlayerId, u32 recvPlayerId)
|
||||
{
|
||||
svr->unused = 0;
|
||||
svr->funcId = FUNC_INIT;
|
||||
|
|
@ -62,7 +62,7 @@ static void MysteryGiftServer_Init(struct MysteryGiftServer * svr, const void *
|
|||
MysteryGiftLink_Init(&svr->link, sendPlayerId, recvPlayerId);
|
||||
}
|
||||
|
||||
static void MysteryGiftServer_Free(struct MysteryGiftServer * svr)
|
||||
static void MysteryGiftServer_Free(struct MysteryGiftServer *svr)
|
||||
{
|
||||
Free(svr->card);
|
||||
Free(svr->news);
|
||||
|
|
@ -70,7 +70,7 @@ static void MysteryGiftServer_Free(struct MysteryGiftServer * svr)
|
|||
Free(svr->linkGameData);
|
||||
}
|
||||
|
||||
static void MysteryGiftServer_InitSend(struct MysteryGiftServer * svr, u32 ident, const void * src, u32 size)
|
||||
static void MysteryGiftServer_InitSend(struct MysteryGiftServer *svr, u32 ident, const void *src, u32 size)
|
||||
{
|
||||
AGB_ASSERT(size <= MG_LINK_BUFFER_SIZE);
|
||||
MysteryGiftLink_InitSend(&svr->link, ident, src, size);
|
||||
|
|
@ -78,7 +78,7 @@ static void MysteryGiftServer_InitSend(struct MysteryGiftServer * svr, u32 ident
|
|||
|
||||
// Given the command pointer parameter and the 'default' normal data.
|
||||
// If the command's pointer is not empty use that as the send data, otherwise use the default.
|
||||
static const void * MysteryGiftServer_GetSendData(const void * dynamicData, const void * defaultData)
|
||||
static const void * MysteryGiftServer_GetSendData(const void *dynamicData, const void *defaultData)
|
||||
{
|
||||
if (dynamicData != NULL)
|
||||
return dynamicData;
|
||||
|
|
@ -86,7 +86,7 @@ static const void * MysteryGiftServer_GetSendData(const void * dynamicData, cons
|
|||
return defaultData;
|
||||
}
|
||||
|
||||
static u32 MysteryGiftServer_Compare(const void * a, const void * b)
|
||||
static u32 MysteryGiftServer_Compare(const void *a, const void *b)
|
||||
{
|
||||
if (b < a)
|
||||
return 0;
|
||||
|
|
@ -96,36 +96,36 @@ static u32 MysteryGiftServer_Compare(const void * a, const void * b)
|
|||
return 2;
|
||||
}
|
||||
|
||||
static u32 Server_Init(struct MysteryGiftServer * svr)
|
||||
static u32 Server_Init(struct MysteryGiftServer *svr)
|
||||
{
|
||||
svr->funcId = FUNC_RUN;
|
||||
return SVR_RET_INIT;
|
||||
}
|
||||
|
||||
static u32 Server_Done(struct MysteryGiftServer * svr)
|
||||
static u32 Server_Done(struct MysteryGiftServer *svr)
|
||||
{
|
||||
return SVR_RET_END;
|
||||
}
|
||||
|
||||
static u32 Server_Recv(struct MysteryGiftServer * svr)
|
||||
static u32 Server_Recv(struct MysteryGiftServer *svr)
|
||||
{
|
||||
if (MysteryGiftLink_Recv(&svr->link))
|
||||
svr->funcId = FUNC_RUN;
|
||||
return SVR_RET_ACTIVE;
|
||||
}
|
||||
|
||||
static u32 Server_Send(struct MysteryGiftServer * svr)
|
||||
static u32 Server_Send(struct MysteryGiftServer *svr)
|
||||
{
|
||||
if (MysteryGiftLink_Send(&svr->link))
|
||||
svr->funcId = FUNC_RUN;
|
||||
return SVR_RET_ACTIVE;
|
||||
}
|
||||
|
||||
static u32 Server_Run(struct MysteryGiftServer * svr)
|
||||
static u32 Server_Run(struct MysteryGiftServer *svr)
|
||||
{
|
||||
// process command
|
||||
const struct MysteryGiftServerCmd * cmd = &svr->script[svr->cmdidx];
|
||||
const void * ptr;
|
||||
const struct MysteryGiftServerCmd *cmd = &svr->script[svr->cmdidx];
|
||||
const void *ptr;
|
||||
svr->cmdidx++;
|
||||
|
||||
switch (cmd->instr)
|
||||
|
|
@ -280,7 +280,7 @@ static u32 (*const sFuncTable[])(struct MysteryGiftServer *) = {
|
|||
[FUNC_RUN] = Server_Run
|
||||
};
|
||||
|
||||
static u32 MysteryGiftServer_CallFunc(struct MysteryGiftServer * svr)
|
||||
static u32 MysteryGiftServer_CallFunc(struct MysteryGiftServer *svr)
|
||||
{
|
||||
u32 response;
|
||||
AGB_ASSERT(svr->funcId < ARRAY_COUNT(sFuncTable));
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ struct WonderGraphics
|
|||
u8 bodyTextPal:4;
|
||||
u8 footerTextPal:4; // Card only
|
||||
u8 stampShadowPal:4; // Card only
|
||||
const u32 * tiles;
|
||||
const u32 * map;
|
||||
const u16 * pal;
|
||||
const u32 *tiles;
|
||||
const u32 *map;
|
||||
const u16 *pal;
|
||||
};
|
||||
|
||||
//======================
|
||||
|
|
@ -52,7 +52,7 @@ struct WonderCardData
|
|||
{
|
||||
/*0000*/ struct WonderCard card;
|
||||
/*014c*/ struct WonderCardMetadata cardMetadata;
|
||||
/*0170*/ const struct WonderGraphics * gfx;
|
||||
/*0170*/ const struct WonderGraphics *gfx;
|
||||
/*0174*/ u8 enterExitState;
|
||||
/*0175*/ u8 statFooterWidth;
|
||||
/*0176*/ u16 windowIds[CARD_WIN_COUNT];
|
||||
|
|
@ -68,7 +68,7 @@ struct WonderCardData
|
|||
/*045C*/ u8 bgTilemapBuffer[0x1000];
|
||||
};
|
||||
|
||||
EWRAM_DATA static struct WonderCardData * sWonderCardData = NULL;
|
||||
EWRAM_DATA static struct WonderCardData *sWonderCardData = NULL;
|
||||
|
||||
static void BufferCardText(void);
|
||||
static void DrawCardWindow(u8 whichWindow);
|
||||
|
|
@ -184,7 +184,7 @@ static const struct WonderGraphics sCardGraphics[NUM_WONDER_BGS] = {
|
|||
{.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 7, .tiles = sWonderCardBgGfx8, .map = sWonderCardBgTilemap8, .pal = sWonderCardBgPal8}
|
||||
};
|
||||
|
||||
bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * metadata)
|
||||
bool32 WonderCard_Init(struct WonderCard *card, struct WonderCardMetadata *metadata)
|
||||
{
|
||||
if (card == NULL || metadata == NULL)
|
||||
return FALSE;
|
||||
|
|
@ -551,7 +551,7 @@ enum {
|
|||
struct WonderNewsData
|
||||
{
|
||||
/*0000*/ struct WonderNews news;
|
||||
/*01bc*/ const struct WonderGraphics * gfx;
|
||||
/*01bc*/ const struct WonderGraphics *gfx;
|
||||
/*01c0*/ u8 arrowsRemoved:1;
|
||||
u8 enterExitState:7;
|
||||
/*01c1*/ u8 arrowTaskId;
|
||||
|
|
@ -569,7 +569,7 @@ struct WonderNewsData
|
|||
/*03a4*/ u8 bgTilemapBuffer[0x1000];
|
||||
};
|
||||
|
||||
EWRAM_DATA static struct WonderNewsData * sWonderNewsData = NULL;
|
||||
EWRAM_DATA static struct WonderNewsData *sWonderNewsData = NULL;
|
||||
|
||||
static void BufferNewsText(void);
|
||||
static void DrawNewsWindows(void);
|
||||
|
|
@ -640,7 +640,7 @@ static const struct WonderGraphics sNewsGraphics[NUM_WONDER_BGS] = {
|
|||
{.titleTextPal = 1, .bodyTextPal = 0, .tiles = sWonderNewsGfx8, .map = sWonderNewsTilemap8, .pal = sWonderNewsPal8}
|
||||
};
|
||||
|
||||
bool32 WonderNews_Init(const struct WonderNews * news)
|
||||
bool32 WonderNews_Init(const struct WonderNews *news)
|
||||
{
|
||||
if (news == NULL)
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -4587,7 +4587,7 @@ static void UNUSED PrintDecimalNum(u8 windowId, u16 num, u8 left, u8 top)
|
|||
static void DrawFootprint(u8 windowId, u16 dexNum)
|
||||
{
|
||||
u8 footprint4bpp[TILE_SIZE_4BPP * NUM_FOOTPRINT_TILES];
|
||||
const u8 * footprintGfx = gMonFootprintTable[NationalPokedexNumToSpecies(dexNum)];
|
||||
const u8 *footprintGfx = gMonFootprintTable[NationalPokedexNumToSpecies(dexNum)];
|
||||
u16 tileIdx = 0;
|
||||
u16 i, j;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ static const u32 sPokedexAreaMapAffine_Tilemap[] = INCBIN_U32("graphics/pokedex/
|
|||
void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template)
|
||||
{
|
||||
u8 mode;
|
||||
void * tilemap;
|
||||
void *tilemap;
|
||||
sPokedexAreaMapBgNum = Alloc(sizeof(sPokedexAreaMapBgNum));
|
||||
mode = template->mode;
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ struct
|
|||
/*0x6E8*/ u8 *screenSwitchState;
|
||||
/*0x6EC*/ struct RegionMap regionMap;
|
||||
/*0xF70*/ u8 charBuffer[64];
|
||||
/*0xFB0*/ struct Sprite * areaUnknownSprites[3];
|
||||
/*0xFB0*/ struct Sprite *areaUnknownSprites[3];
|
||||
/*0xFBC*/ u8 areaUnknownGraphicsBuffer[0x600];
|
||||
} static EWRAM_DATA *sPokedexAreaScreen = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -4429,7 +4429,7 @@ static u8 CopyMonToPC(struct Pokemon *mon)
|
|||
{
|
||||
for (boxPos = 0; boxPos < IN_BOX_COUNT; boxPos++)
|
||||
{
|
||||
struct BoxPokemon* checkingMon = GetBoxedMonPtr(boxNo, boxPos);
|
||||
struct BoxPokemon *checkingMon = GetBoxedMonPtr(boxNo, boxPos);
|
||||
if (GetBoxMonData(checkingMon, MON_DATA_SPECIES, NULL) == SPECIES_NONE)
|
||||
{
|
||||
MonRestorePP(mon);
|
||||
|
|
@ -6992,7 +6992,7 @@ static bool8 ShouldSkipFriendshipChange(void)
|
|||
#define ALLOC_FAIL_STRUCT (1 << 1)
|
||||
#define GFX_MANAGER_ACTIVE 0xA3 // Arbitrary value
|
||||
|
||||
static void InitMonSpritesGfx_Battle(struct MonSpritesGfxManager* gfx)
|
||||
static void InitMonSpritesGfx_Battle(struct MonSpritesGfxManager *gfx)
|
||||
{
|
||||
u16 i, j;
|
||||
for (i = 0; i < gfx->numSprites; i++)
|
||||
|
|
@ -7005,7 +7005,7 @@ static void InitMonSpritesGfx_Battle(struct MonSpritesGfxManager* gfx)
|
|||
}
|
||||
}
|
||||
|
||||
static void InitMonSpritesGfx_FullParty(struct MonSpritesGfxManager* gfx)
|
||||
static void InitMonSpritesGfx_FullParty(struct MonSpritesGfxManager *gfx)
|
||||
{
|
||||
u16 i, j;
|
||||
for (i = 0; i < gfx->numSprites; i++)
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ static const u8 sVerticalShakeData[][2] =
|
|||
{-1, 0}
|
||||
};
|
||||
|
||||
static void (* const sMonAnimFunctions[])(struct Sprite *sprite) =
|
||||
static void (*const sMonAnimFunctions[])(struct Sprite *sprite) =
|
||||
{
|
||||
[ANIM_V_SQUISH_AND_BOUNCE] = Anim_VerticalSquishBounce,
|
||||
[ANIM_CIRCULAR_STRETCH_TWICE] = Anim_CircularStretchTwice,
|
||||
|
|
|
|||
|
|
@ -799,7 +799,7 @@ static void RecvLinkData_Leader(void)
|
|||
sPokemonJump->allPlayersReady = TRUE;
|
||||
}
|
||||
|
||||
static bool32 (* const sPokeJumpLeaderFuncs[])(void) =
|
||||
static bool32 (*const sPokeJumpLeaderFuncs[])(void) =
|
||||
{
|
||||
[FUNC_GAME_INTRO] = GameIntro_Leader,
|
||||
[FUNC_WAIT_ROUND] = WaitRound_Leader,
|
||||
|
|
@ -898,7 +898,7 @@ static void RecvLinkData_Member(void)
|
|||
}
|
||||
}
|
||||
|
||||
static bool32 (* const sPokeJumpMemberFuncs[])(void) =
|
||||
static bool32 (*const sPokeJumpMemberFuncs[])(void) =
|
||||
{
|
||||
[FUNC_GAME_INTRO] = GameIntro_Member,
|
||||
[FUNC_WAIT_ROUND] = WaitRound_Member,
|
||||
|
|
|
|||
|
|
@ -2094,7 +2094,7 @@ static void ExitMovePositionSwitchMode(u8 taskId, bool8 swapMoves)
|
|||
|
||||
static void SwapMonMoves(struct Pokemon *mon, u8 moveIndex1, u8 moveIndex2)
|
||||
{
|
||||
struct PokeSummary* summary = &sMonSummaryScreen->summary;
|
||||
struct PokeSummary *summary = &sMonSummaryScreen->summary;
|
||||
|
||||
u16 move1 = summary->moves[moveIndex1];
|
||||
u16 move2 = summary->moves[moveIndex2];
|
||||
|
|
@ -2129,7 +2129,7 @@ static void SwapMonMoves(struct Pokemon *mon, u8 moveIndex1, u8 moveIndex2)
|
|||
|
||||
static void SwapBoxMonMoves(struct BoxPokemon *mon, u8 moveIndex1, u8 moveIndex2)
|
||||
{
|
||||
struct PokeSummary* summary = &sMonSummaryScreen->summary;
|
||||
struct PokeSummary *summary = &sMonSummaryScreen->summary;
|
||||
|
||||
u16 move1 = summary->moves[moveIndex1];
|
||||
u16 move2 = summary->moves[moveIndex2];
|
||||
|
|
|
|||
|
|
@ -238,27 +238,27 @@ static u32 GetReturningFromGraph(void)
|
|||
|
||||
static struct PokenavMonListItem * GetSearchResultsMonDataList(void)
|
||||
{
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
return menu->monList->monData;
|
||||
}
|
||||
|
||||
static u16 GetSearchResultsMonListCount(void)
|
||||
{
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
return menu->monList->listCount;
|
||||
}
|
||||
|
||||
// data below has been set by ConvertConditionsToListRanks
|
||||
static s32 GetSearchResultsSelectedMonRank(void)
|
||||
{
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
s32 i = PokenavList_GetSelectedIndex();
|
||||
return menu->monList->monData[i].data;
|
||||
}
|
||||
|
||||
static u16 GetSearchResultsCurrentListIndex(void)
|
||||
{
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
return menu->monList->currIndex;
|
||||
}
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ static u32 BuildPartyMonSearchResults(s32 state)
|
|||
{
|
||||
s32 i;
|
||||
struct PokenavMonListItem item;
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
|
||||
menu->monList->listCount = 0;
|
||||
menu->monList->currIndex = 0;
|
||||
|
|
@ -294,7 +294,7 @@ static u32 BuildPartyMonSearchResults(s32 state)
|
|||
|
||||
static u32 InitBoxMonSearchResults(s32 state)
|
||||
{
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
menu->monId = 0;
|
||||
menu->boxId = 0;
|
||||
return LT_INC_AND_CONTINUE;
|
||||
|
|
@ -302,7 +302,7 @@ static u32 InitBoxMonSearchResults(s32 state)
|
|||
|
||||
static u32 BuildBoxMonSearchResults(s32 state)
|
||||
{
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
s32 boxId = menu->boxId;
|
||||
s32 monId = menu->monId;
|
||||
s32 boxCount = 0;
|
||||
|
|
@ -340,7 +340,7 @@ static u32 BuildBoxMonSearchResults(s32 state)
|
|||
// The condition value in data is then overwritten with their ranking.
|
||||
static u32 ConvertConditionsToListRanks(s32 state)
|
||||
{
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
s32 listCount = menu->monList->listCount;
|
||||
s32 prevCondition = menu->monList->monData[0].data;
|
||||
s32 i;
|
||||
|
|
@ -698,12 +698,12 @@ static void CreateSearchResultsList(void)
|
|||
CreatePokenavList(&sConditionSearchResultBgTemplates[1], &template, 0);
|
||||
}
|
||||
|
||||
static void BufferSearchMonListItem(struct PokenavMonListItem * item, u8 * dest)
|
||||
static void BufferSearchMonListItem(struct PokenavMonListItem *item, u8 *dest)
|
||||
{
|
||||
u8 gender;
|
||||
u8 level;
|
||||
u8 * s;
|
||||
const u8 * genderStr;
|
||||
u8 *s;
|
||||
const u8 *genderStr;
|
||||
|
||||
// Mon is in party
|
||||
if (item->boxId == TOTAL_BOXES_COUNT)
|
||||
|
|
@ -716,7 +716,7 @@ static void BufferSearchMonListItem(struct PokenavMonListItem * item, u8 * dest)
|
|||
// Mon is in PC
|
||||
else
|
||||
{
|
||||
struct BoxPokemon * mon = GetBoxedMonPtr(item->boxId, item->monId);
|
||||
struct BoxPokemon *mon = GetBoxedMonPtr(item->boxId, item->monId);
|
||||
gender = GetBoxMonGender(mon);
|
||||
level = GetLevelFromBoxMonExp(mon);
|
||||
GetBoxMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ struct PokenavListWindowState {
|
|||
u16 selectedIndexOffset;
|
||||
u16 entriesOnscreen;
|
||||
u32 listItemSize;
|
||||
void * listPtr;
|
||||
void *listPtr;
|
||||
};
|
||||
|
||||
struct PokenavListSub
|
||||
|
|
@ -43,7 +43,7 @@ struct PokenavListSub
|
|||
u32 printStart;
|
||||
u32 printIndex;
|
||||
u32 itemSize;
|
||||
void * listPtr;
|
||||
void *listPtr;
|
||||
s32 startBgY;
|
||||
s32 endBgY;
|
||||
u32 loopedTaskId;
|
||||
|
|
@ -192,7 +192,7 @@ static void InitListItems(struct PokenavListWindowState *windowState, struct Pok
|
|||
PrintListItems(windowState->listPtr, windowState->windowTopIndex, numToPrint, windowState->listItemSize, 0, subPtr);
|
||||
}
|
||||
|
||||
static void PrintListItems(void * listPtr, u32 topIndex, u32 numItems, u32 itemSize, u32 printStart, struct PokenavListSub *list)
|
||||
static void PrintListItems(void *listPtr, u32 topIndex, u32 numItems, u32 itemSize, u32 printStart, struct PokenavListSub *list)
|
||||
{
|
||||
if (numItems == 0)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ struct Pokenav_MenuGfx
|
|||
u8 numIconsBlending;
|
||||
bool8 pokenavAlreadyOpen;
|
||||
bool32 iconVisible[MAX_POKENAV_MENUITEMS];
|
||||
struct Sprite * blueLightSprite;
|
||||
struct Sprite * iconSprites[MAX_POKENAV_MENUITEMS][NUM_OPTION_SUBSPRITES];
|
||||
struct Sprite *blueLightSprite;
|
||||
struct Sprite *iconSprites[MAX_POKENAV_MENUITEMS][NUM_OPTION_SUBSPRITES];
|
||||
u8 bg1TilemapBuffer[BG_SCREEN_SIZE];
|
||||
};
|
||||
|
||||
|
|
@ -380,7 +380,7 @@ static bool32 AreAnyTrainerRematchesNearby(void)
|
|||
|
||||
bool32 OpenPokenavMenuInitial(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = OpenPokenavMenu();
|
||||
struct Pokenav_MenuGfx *gfx = OpenPokenavMenu();
|
||||
|
||||
if (gfx == NULL)
|
||||
return FALSE;
|
||||
|
|
@ -391,7 +391,7 @@ bool32 OpenPokenavMenuInitial(void)
|
|||
|
||||
bool32 OpenPokenavMenuNotInitial(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = OpenPokenavMenu();
|
||||
struct Pokenav_MenuGfx *gfx = OpenPokenavMenu();
|
||||
|
||||
if (gfx == NULL)
|
||||
return FALSE;
|
||||
|
|
@ -402,7 +402,7 @@ bool32 OpenPokenavMenuNotInitial(void)
|
|||
|
||||
static struct Pokenav_MenuGfx * OpenPokenavMenu(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = AllocSubstruct(POKENAV_SUBSTRUCT_MENU_GFX, sizeof(struct Pokenav_MenuGfx));
|
||||
struct Pokenav_MenuGfx *gfx = AllocSubstruct(POKENAV_SUBSTRUCT_MENU_GFX, sizeof(struct Pokenav_MenuGfx));
|
||||
|
||||
if (gfx != NULL)
|
||||
{
|
||||
|
|
@ -416,20 +416,20 @@ static struct Pokenav_MenuGfx * OpenPokenavMenu(void)
|
|||
|
||||
void CreateMenuHandlerLoopedTask(s32 ltIdx)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
gfx->loopedTaskId = CreateLoopedTask(sMenuHandlerLoopTaskFuncs[ltIdx], 1);
|
||||
gfx->isTaskActiveCB = GetCurrentLoopedTaskActive;
|
||||
}
|
||||
|
||||
bool32 IsMenuHandlerLoopedTaskActive(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
return gfx->isTaskActiveCB();
|
||||
}
|
||||
|
||||
void FreeMenuHandlerSubstruct2(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
|
||||
DestroyMovingDotsBgTask();
|
||||
RemoveWindow(gfx->optionDescWindowId);
|
||||
|
|
@ -440,14 +440,14 @@ void FreeMenuHandlerSubstruct2(void)
|
|||
|
||||
static bool32 GetCurrentLoopedTaskActive(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
|
||||
return IsLoopedTaskActive(gfx->loopedTaskId);
|
||||
}
|
||||
|
||||
static u32 LoopedTask_OpenMenu(s32 state)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
|
|
@ -817,7 +817,7 @@ static void FreeAndDestroyMainMenuSprites(void)
|
|||
static void CreateMenuOptionSprites(void)
|
||||
{
|
||||
s32 i, j;
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
|
||||
for (i = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
{
|
||||
|
|
@ -833,7 +833,7 @@ static void CreateMenuOptionSprites(void)
|
|||
static void DestroyMenuOptionSprites(void)
|
||||
{
|
||||
s32 i, j;
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
|
||||
for (i = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
{
|
||||
|
|
@ -854,7 +854,7 @@ static void DrawCurrentMenuOptionLabels(void)
|
|||
static void DrawOptionLabelGfx(const u16 *const *optionGfx, s32 yPos, s32 deltaY)
|
||||
{
|
||||
s32 i, j;
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
s32 baseTile = GetSpriteTileStartByTag(GFXTAG_OPTIONS);
|
||||
|
||||
for (i = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
|
|
@ -987,7 +987,7 @@ static bool32 AreMenuOptionSpritesMoving(void)
|
|||
#define sSlideSpeed data[2]
|
||||
#define sSlideEndX data[7]
|
||||
|
||||
static void StartOptionSlide(struct Sprite ** sprites, s32 startX, s32 endX, s32 time)
|
||||
static void StartOptionSlide(struct Sprite **sprites, s32 startX, s32 endX, s32 time)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -1016,10 +1016,10 @@ static void StartOptionSlide(struct Sprite ** sprites, s32 startX, s32 endX, s32
|
|||
|
||||
// When an option is selected it zooms in and blends away as part
|
||||
// of the transition to the next screen.
|
||||
static void StartOptionZoom(struct Sprite ** sprites)
|
||||
static void StartOptionZoom(struct Sprite **sprites)
|
||||
{
|
||||
s32 i;
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
u8 taskId;
|
||||
|
||||
for (i = 0; i < NUM_OPTION_SUBSPRITES; i++)
|
||||
|
|
@ -1041,7 +1041,7 @@ static void StartOptionZoom(struct Sprite ** sprites)
|
|||
gfx->numIconsBlending++;
|
||||
}
|
||||
|
||||
static void SetOptionInvisibility(struct Sprite ** sprites, bool32 invisible)
|
||||
static void SetOptionInvisibility(struct Sprite **sprites, bool32 invisible)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -1052,7 +1052,7 @@ static void SetOptionInvisibility(struct Sprite ** sprites, bool32 invisible)
|
|||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_OptionSlide(struct Sprite * sprite)
|
||||
static void SpriteCB_OptionSlide(struct Sprite *sprite)
|
||||
{
|
||||
sprite->sSlideTime--;
|
||||
if (sprite->sSlideTime != -1)
|
||||
|
|
@ -1072,7 +1072,7 @@ static void SpriteCB_OptionSlide(struct Sprite * sprite)
|
|||
#undef sSlideSpeed
|
||||
#undef sSlideEndX
|
||||
|
||||
static void SpriteCB_OptionZoom(struct Sprite * sprite)
|
||||
static void SpriteCB_OptionZoom(struct Sprite *sprite)
|
||||
{
|
||||
s32 temp;
|
||||
s32 x;
|
||||
|
|
@ -1133,7 +1133,7 @@ static void SpriteCB_OptionZoom(struct Sprite * sprite)
|
|||
|
||||
static void Task_OptionBlend(u8 taskId)
|
||||
{
|
||||
s16 * data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (tBlendDelay == 0)
|
||||
{
|
||||
|
|
@ -1185,7 +1185,7 @@ static void Task_OptionBlend(u8 taskId)
|
|||
// Blue light that blinks if there are available rematches nearby
|
||||
static void CreateMatchCallBlueLightSprite(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
u8 spriteId = CreateSprite(&sMatchCallBlueLightSpriteTemplate, 0x10, 0x60, 4);
|
||||
gfx->blueLightSprite = &gSprites[spriteId];
|
||||
if (AreAnyTrainerRematchesNearby())
|
||||
|
|
@ -1200,7 +1200,7 @@ static void DestroyRematchBlueLightSprite(void)
|
|||
DestroySprite(gfx->blueLightSprite);
|
||||
}
|
||||
|
||||
static void SpriteCB_BlinkingBlueLight(struct Sprite * sprite)
|
||||
static void SpriteCB_BlinkingBlueLight(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[0]++;
|
||||
if (sprite->data[0] > 8)
|
||||
|
|
@ -1212,7 +1212,7 @@ static void SpriteCB_BlinkingBlueLight(struct Sprite * sprite)
|
|||
|
||||
static void AddOptionDescriptionWindow(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
|
||||
gfx->optionDescWindowId = AddWindow(&sOptionDescWindowTemplate);
|
||||
PutWindowTilemap(gfx->optionDescWindowId);
|
||||
|
|
@ -1222,9 +1222,9 @@ static void AddOptionDescriptionWindow(void)
|
|||
|
||||
static void PrintCurrentOptionDescription(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
int menuItem = GetCurrentMenuItemId();
|
||||
const u8 * desc = sPageDescriptions[menuItem];
|
||||
const u8 *desc = sPageDescriptions[menuItem];
|
||||
u32 width = GetStringWidth(FONT_NORMAL, desc, -1);
|
||||
FillWindowPixelBuffer(gfx->optionDescWindowId, PIXEL_FILL(6));
|
||||
AddTextPrinterParameterized3(gfx->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors, 0, desc);
|
||||
|
|
@ -1234,8 +1234,8 @@ static void PrintCurrentOptionDescription(void)
|
|||
// Can occur by obtaining a mon with a ribbon and then releasing all ribbon winners
|
||||
static void PrintNoRibbonWinners(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
const u8 * s = gText_NoRibbonWinners;
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
const u8 *s = gText_NoRibbonWinners;
|
||||
u32 width = GetStringWidth(FONT_NORMAL, s, -1);
|
||||
FillWindowPixelBuffer(gfx->optionDescWindowId, PIXEL_FILL(6));
|
||||
AddTextPrinterParameterized3(gfx->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s);
|
||||
|
|
@ -1248,13 +1248,13 @@ static bool32 IsDma3ManagerBusyWithBgCopy_(void)
|
|||
|
||||
static void CreateMovingBgDotsTask(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
gfx->bg3ScrollTaskId = CreateTask(Task_MoveBgDots, 2);
|
||||
}
|
||||
|
||||
static void DestroyMovingDotsBgTask(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
|
||||
DestroyTask(gfx->bg3ScrollTaskId);
|
||||
}
|
||||
|
||||
|
|
@ -1290,9 +1290,9 @@ static bool32 IsTaskActive_UpdateBgDotsPalette(void)
|
|||
static void Task_UpdateBgDotsPalette(u8 taskId)
|
||||
{
|
||||
u16 sp8[2];
|
||||
s16 * data = gTasks[taskId].data;
|
||||
const u16 * pal1 = (const u16 *)GetWordTaskArg(taskId, 1);
|
||||
const u16 * pal2 = (const u16 *)GetWordTaskArg(taskId, 3);
|
||||
s16 *data = gTasks[taskId].data;
|
||||
const u16 *pal1 = (const u16 *)GetWordTaskArg(taskId, 1);
|
||||
const u16 *pal2 = (const u16 *)GetWordTaskArg(taskId, 3);
|
||||
|
||||
PokenavCopyPalette(pal1, pal2, 2, 12, ++data[0], sp8);
|
||||
LoadPalette(sp8, BG_PLTT_ID(3) + 1, PLTT_SIZEOF(2));
|
||||
|
|
@ -1345,7 +1345,7 @@ static void InitMenuOptionGlow(void)
|
|||
|
||||
static void Task_CurrentMenuOptionGlow(u8 taskId)
|
||||
{
|
||||
s16 * data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
data[0]++;
|
||||
if (data[0] > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -217,26 +217,26 @@ static u32 UpdateMonListBgs(void)
|
|||
|
||||
static struct PokenavMonListItem *GetMonRibbonMonListData(void)
|
||||
{
|
||||
struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
return list->monList->monData;
|
||||
}
|
||||
|
||||
static s32 GetRibbonsMonListCount(void)
|
||||
{
|
||||
struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
return list->monList->listCount;
|
||||
}
|
||||
|
||||
static s32 UNUSED GetMonRibbonSelectedMonData(void)
|
||||
{
|
||||
struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
s32 idx = PokenavList_GetSelectedIndex();
|
||||
return list->monList->monData[idx].data;
|
||||
}
|
||||
|
||||
static s32 GetRibbonListMenuCurrIndex(void)
|
||||
{
|
||||
struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
return list->monList->currIndex;
|
||||
}
|
||||
|
||||
|
|
@ -249,7 +249,7 @@ static u32 BuildPartyMonRibbonList(s32 state)
|
|||
{
|
||||
s32 i;
|
||||
struct PokenavMonListItem item;
|
||||
struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
|
||||
list->monList->listCount = 0;
|
||||
list->monList->currIndex = 0;
|
||||
|
|
@ -284,7 +284,7 @@ static u32 InitBoxMonRibbonList(s32 state)
|
|||
|
||||
static u32 BuildBoxMonRibbonList(s32 state)
|
||||
{
|
||||
struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
s32 boxId = list->boxId;
|
||||
s32 monId = list->monId;
|
||||
s32 boxCount = 0;
|
||||
|
|
@ -408,13 +408,13 @@ bool32 IsRibbonsMonListLoopedTaskActive(void)
|
|||
|
||||
bool32 GetRibbonsMonCurrentLoopedTaskActive(void)
|
||||
{
|
||||
struct Pokenav_RibbonsMonMenu * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
struct Pokenav_RibbonsMonMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
return IsLoopedTaskActive(menu->loopedTaskId);
|
||||
}
|
||||
|
||||
void FreeRibbonsMonMenu(void)
|
||||
{
|
||||
struct Pokenav_RibbonsMonMenu * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
struct Pokenav_RibbonsMonMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
DestroyPokenavList();
|
||||
RemoveWindow(menu->winid);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
|
|
@ -668,7 +668,7 @@ static void DrawListIndexNumber(s32 windowId, s32 index, s32 max)
|
|||
u8 strbuf[16];
|
||||
u32 x;
|
||||
|
||||
u8 * ptr = strbuf;
|
||||
u8 *ptr = strbuf;
|
||||
ptr = ConvertIntToDecimalStringN(ptr, index, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
*ptr++ = CHAR_SLASH;
|
||||
ConvertIntToDecimalStringN(ptr, max, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
|
|
@ -695,13 +695,13 @@ static void CreateRibbonMonsList(void)
|
|||
}
|
||||
|
||||
// Buffers the "Nickname gender/level" text for the ribbon mon list
|
||||
static void BufferRibbonMonInfoText(struct PokenavListItem * listItem, u8 * dest)
|
||||
static void BufferRibbonMonInfoText(struct PokenavListItem *listItem, u8 *dest)
|
||||
{
|
||||
u8 gender;
|
||||
u8 level;
|
||||
u8 * s;
|
||||
const u8 * genderStr;
|
||||
struct PokenavMonListItem * item = (struct PokenavMonListItem *)listItem;
|
||||
u8 *s;
|
||||
const u8 *genderStr;
|
||||
struct PokenavMonListItem *item = (struct PokenavMonListItem *)listItem;
|
||||
|
||||
// Mon is in party
|
||||
if (item->boxId == TOTAL_BOXES_COUNT)
|
||||
|
|
@ -714,7 +714,7 @@ static void BufferRibbonMonInfoText(struct PokenavListItem * listItem, u8 * dest
|
|||
// Mon is in PC
|
||||
else
|
||||
{
|
||||
struct BoxPokemon * mon = GetBoxedMonPtr(item->boxId, item->monId);
|
||||
struct BoxPokemon *mon = GetBoxedMonPtr(item->boxId, item->monId);
|
||||
gender = GetBoxMonGender(mon);
|
||||
level = GetLevelFromBoxMonExp(mon);
|
||||
GetBoxMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
||||
|
|
|
|||
|
|
@ -20,16 +20,16 @@ struct GFRomHeader
|
|||
u32 version;
|
||||
u32 language;
|
||||
u8 gameName[32];
|
||||
const struct CompressedSpriteSheet * monFrontPics;
|
||||
const struct CompressedSpriteSheet * monBackPics;
|
||||
const struct CompressedSpritePalette * monNormalPalettes;
|
||||
const struct CompressedSpritePalette * monShinyPalettes;
|
||||
const u8 * const * monIcons;
|
||||
const u8 * monIconPaletteIds;
|
||||
const struct SpritePalette * monIconPalettes;
|
||||
const u8 (* monSpeciesNames)[];
|
||||
const u8 (* moveNames)[];
|
||||
const struct Decoration * decorations;
|
||||
const struct CompressedSpriteSheet *monFrontPics;
|
||||
const struct CompressedSpriteSheet *monBackPics;
|
||||
const struct CompressedSpritePalette *monNormalPalettes;
|
||||
const struct CompressedSpritePalette *monShinyPalettes;
|
||||
const u8 *const *monIcons;
|
||||
const u8 *monIconPaletteIds;
|
||||
const struct SpritePalette *monIconPalettes;
|
||||
const u8 (*monSpeciesNames)[];
|
||||
const u8 (*moveNames)[];
|
||||
const struct Decoration *decorations;
|
||||
u32 flagsOffset;
|
||||
u32 varsOffset;
|
||||
u32 pokedexOffset;
|
||||
|
|
@ -69,13 +69,13 @@ struct GFRomHeader
|
|||
u32 externalEventFlagsOffset;
|
||||
u32 externalEventDataOffset;
|
||||
u32 unk18;
|
||||
const struct SpeciesInfo * speciesInfo;
|
||||
const u8 (* abilityNames)[];
|
||||
const u8 * const * abilityDescriptions;
|
||||
const struct Item * items;
|
||||
const struct BattleMove * moves;
|
||||
const struct CompressedSpriteSheet * ballGfx;
|
||||
const struct CompressedSpritePalette * ballPalettes;
|
||||
const struct SpeciesInfo *speciesInfo;
|
||||
const u8 (*abilityNames)[];
|
||||
const u8 *const *abilityDescriptions;
|
||||
const struct Item *items;
|
||||
const struct BattleMove *moves;
|
||||
const struct CompressedSpriteSheet *ballGfx;
|
||||
const struct CompressedSpritePalette *ballPalettes;
|
||||
u32 gcnLinkFlagsOffset;
|
||||
u32 gameClearFlag;
|
||||
u32 ribbonFlag;
|
||||
|
|
@ -89,7 +89,7 @@ struct GFRomHeader
|
|||
u32 giftRibbonsOffset;
|
||||
u32 enigmaBerryOffset;
|
||||
u32 enigmaBerrySize;
|
||||
const u8 * moveDescriptions;
|
||||
const u8 *moveDescriptions;
|
||||
u32 unk20;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -902,7 +902,7 @@ u8 LoadGameSave(u8 saveType)
|
|||
u16 GetSaveBlocksPointersBaseOffset(void)
|
||||
{
|
||||
u16 i, slotOffset;
|
||||
struct SaveSector* sector;
|
||||
struct SaveSector *sector;
|
||||
|
||||
sector = gReadWriteSector = &gSaveDataBuffer;
|
||||
if (gFlashMemoryPresent != TRUE)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ static void CloseBrailleWindow(void);
|
|||
|
||||
// This is defined in here so the optimizer can't see its value when compiling
|
||||
// script.c.
|
||||
void * const gNullScriptPtr = NULL;
|
||||
void *const gNullScriptPtr = NULL;
|
||||
|
||||
static const u8 sScriptConditionTable[6][3] =
|
||||
{
|
||||
|
|
@ -84,7 +84,7 @@ static const u8 sScriptConditionTable[6][3] =
|
|||
{1, 0, 1}, // !=
|
||||
};
|
||||
|
||||
static u8 * const sScriptStringVars[] =
|
||||
static u8 *const sScriptStringVars[] =
|
||||
{
|
||||
gStringVar1,
|
||||
gStringVar2,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ static bool8 sLockFieldControls;
|
|||
|
||||
extern ScrCmdFunc gScriptCmdTable[];
|
||||
extern ScrCmdFunc gScriptCmdTableEnd[];
|
||||
extern void * const gNullScriptPtr;
|
||||
extern void *const gNullScriptPtr;
|
||||
|
||||
void InitScriptContext(struct ScriptContext *ctx, void *cmdTable, void *cmdTableEnd)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ static u8 CreateShopMenu(u8 martType)
|
|||
return CreateTask(Task_ShopMenu, 8);
|
||||
}
|
||||
|
||||
static void SetShopMenuCallback(void (* callback)(void))
|
||||
static void SetShopMenuCallback(void (*callback)(void))
|
||||
{
|
||||
sMartInfo.callback = callback;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ struct Fanfare
|
|||
u16 duration;
|
||||
};
|
||||
|
||||
EWRAM_DATA struct MusicPlayerInfo* gMPlay_PokemonCry = NULL;
|
||||
EWRAM_DATA struct MusicPlayerInfo *gMPlay_PokemonCry = NULL;
|
||||
EWRAM_DATA u8 gPokemonCryBGMDuckingCounter = 0;
|
||||
|
||||
static u16 sCurrentMapMusic;
|
||||
|
|
|
|||
|
|
@ -119,8 +119,8 @@ typedef void (*AffineAnimCmdFunc)(u8 matrixNum, struct Sprite *);
|
|||
#define AFFINE_ANIM_END 0x7FFF
|
||||
|
||||
// forward declarations
|
||||
const union AnimCmd * const gDummySpriteAnimTable[];
|
||||
const union AffineAnimCmd * const gDummySpriteAffineAnimTable[];
|
||||
const union AnimCmd *const gDummySpriteAnimTable[];
|
||||
const union AffineAnimCmd *const gDummySpriteAffineAnimTable[];
|
||||
const struct SpriteTemplate gDummySpriteTemplate;
|
||||
|
||||
// Unreferenced data. Also unreferenced in R/S.
|
||||
|
|
@ -172,11 +172,11 @@ const struct OamData gDummyOamData = DUMMY_OAM_DATA;
|
|||
|
||||
static const union AnimCmd sDummyAnim = { ANIM_END };
|
||||
|
||||
const union AnimCmd * const gDummySpriteAnimTable[] = { &sDummyAnim };
|
||||
const union AnimCmd *const gDummySpriteAnimTable[] = { &sDummyAnim };
|
||||
|
||||
static const union AffineAnimCmd sDummyAffineAnim = { AFFINE_ANIM_END };
|
||||
|
||||
const union AffineAnimCmd * const gDummySpriteAffineAnimTable[] = { &sDummyAffineAnim };
|
||||
const union AffineAnimCmd *const gDummySpriteAffineAnimTable[] = { &sDummyAffineAnim };
|
||||
|
||||
const struct SpriteTemplate gDummySpriteTemplate =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -248,18 +248,18 @@ static const union AnimCmd sAnim_StarterCircle[] =
|
|||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_Hand[] =
|
||||
static const union AnimCmd *const sAnims_Hand[] =
|
||||
{
|
||||
sAnim_Hand,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_Pokeball[] =
|
||||
static const union AnimCmd *const sAnims_Pokeball[] =
|
||||
{
|
||||
sAnim_Pokeball_Still,
|
||||
sAnim_Pokeball_Moving,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const sAnims_StarterCircle[] =
|
||||
static const union AnimCmd *const sAnims_StarterCircle[] =
|
||||
{
|
||||
sAnim_StarterCircle,
|
||||
};
|
||||
|
|
@ -278,8 +278,8 @@ static const union AffineAnimCmd sAffineAnim_StarterCircle[] =
|
|||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd * const sAffineAnims_StarterPokemon = {sAffineAnim_StarterPokemon};
|
||||
static const union AffineAnimCmd * const sAffineAnims_StarterCircle[] = {sAffineAnim_StarterCircle};
|
||||
static const union AffineAnimCmd *const sAffineAnims_StarterPokemon = {sAffineAnim_StarterPokemon};
|
||||
static const union AffineAnimCmd *const sAffineAnims_StarterCircle[] = {sAffineAnim_StarterCircle};
|
||||
|
||||
static const struct CompressedSpriteSheet sSpriteSheet_PokeballSelect[] =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include "task.h"
|
||||
#include "script_menu.h"
|
||||
|
||||
static const u8 * const sDefaultTraderNames[NUM_TRADER_ITEMS] =
|
||||
static const u8 *const sDefaultTraderNames[NUM_TRADER_ITEMS] =
|
||||
{
|
||||
gText_Tristan,
|
||||
gText_Philip,
|
||||
|
|
@ -58,7 +58,7 @@ void Trader_ResetFlag(void)
|
|||
void CreateAvailableDecorationsMenu(u8 taskId)
|
||||
{
|
||||
u8 i;
|
||||
s16 * data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader;
|
||||
struct WindowTemplate windowTemplate = {
|
||||
.bg = 0,
|
||||
|
|
@ -98,7 +98,7 @@ void CreateAvailableDecorationsMenu(u8 taskId)
|
|||
|
||||
void Task_BufferDecorSelectionAndCloseWindow(u8 taskId, u8 decorationId)
|
||||
{
|
||||
s16 * data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
if (decorationId > NUM_DECORATIONS)
|
||||
gSpecialVar_0x8004 = 0xFFFF;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ static const u8 *const sFloorStrings[] =
|
|||
gText_TrainerHill4F,
|
||||
};
|
||||
|
||||
static void (* const sHillFunctions[])(void) =
|
||||
static void (*const sHillFunctions[])(void) =
|
||||
{
|
||||
[TRAINER_HILL_FUNC_START] = TrainerHillStartChallenge,
|
||||
[TRAINER_HILL_FUNC_GET_OWNER_STATE] = GetOwnerState,
|
||||
|
|
|
|||
|
|
@ -1630,7 +1630,7 @@ static void CB2_TransitionToCableClub(void)
|
|||
|
||||
static void CreateTrainerCardInBuffer(void *dest, bool32 setWonderCard)
|
||||
{
|
||||
struct TrainerCard * card = (struct TrainerCard *)dest;
|
||||
struct TrainerCard *card = (struct TrainerCard *)dest;
|
||||
TrainerCard_GenerateCardForLinkPlayer(card);
|
||||
|
||||
// Below field is re-used, to be read by Task_ExchangeCards
|
||||
|
|
@ -3496,10 +3496,10 @@ static void Task_SearchForChildOrParent(u8 taskId)
|
|||
}
|
||||
}
|
||||
|
||||
static u8 CreateTask_SearchForChildOrParent(struct RfuIncomingPlayerList * parentList, struct RfuIncomingPlayerList * childList, u32 linkGroup)
|
||||
static u8 CreateTask_SearchForChildOrParent(struct RfuIncomingPlayerList *parentList, struct RfuIncomingPlayerList *childList, u32 linkGroup)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_SearchForChildOrParent, 0);
|
||||
struct RfuIncomingPlayerList ** data = (void *)gTasks[taskId].data;
|
||||
struct RfuIncomingPlayerList **data = (void *)gTasks[taskId].data;
|
||||
data[0] = parentList;
|
||||
data[1] = childList;
|
||||
gTasks[taskId].data[4] = linkGroup;
|
||||
|
|
@ -3563,7 +3563,7 @@ static void Task_ListenForWonderDistributor(u8 taskId)
|
|||
}
|
||||
}
|
||||
|
||||
static u8 CreateTask_ListenForCompatiblePartners(struct RfuIncomingPlayerList * list, u32 linkGroup)
|
||||
static u8 CreateTask_ListenForCompatiblePartners(struct RfuIncomingPlayerList *list, u32 linkGroup)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_ListenForCompatiblePartners, 0);
|
||||
struct RfuIncomingPlayerList **oldList = (void *) gTasks[taskId].data;
|
||||
|
|
@ -3572,7 +3572,7 @@ static u8 CreateTask_ListenForCompatiblePartners(struct RfuIncomingPlayerList *
|
|||
return taskId;
|
||||
}
|
||||
|
||||
static u8 CreateTask_ListenForWonderDistributor(struct RfuIncomingPlayerList * list, u32 linkGroup)
|
||||
static u8 CreateTask_ListenForWonderDistributor(struct RfuIncomingPlayerList *list, u32 linkGroup)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_ListenForWonderDistributor, 0);
|
||||
struct RfuIncomingPlayerList **oldList = (void *) gTasks[taskId].data;
|
||||
|
|
@ -3650,7 +3650,7 @@ static s8 UnionRoomHandleYesNo(u8 *state, bool32 noDraw)
|
|||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
static u8 CreateTradeBoardWindow(const struct WindowTemplate * template)
|
||||
static u8 CreateTradeBoardWindow(const struct WindowTemplate *template)
|
||||
{
|
||||
u8 windowId = AddWindow(template);
|
||||
DrawStdWindowFrame(windowId, FALSE);
|
||||
|
|
@ -3880,7 +3880,7 @@ static void ClearIncomingPlayerList(struct RfuIncomingPlayerList *list, u8 count
|
|||
}
|
||||
|
||||
// Checks player name and trainer id, returns TRUE if they are not the same
|
||||
static bool8 ArePlayersDifferent(struct RfuPlayerData* player1, const struct RfuPlayerData* player2)
|
||||
static bool8 ArePlayersDifferent(struct RfuPlayerData *player1, const struct RfuPlayerData *player2)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -4044,7 +4044,7 @@ static s32 UnionRoomGetPlayerInteractionResponse(struct RfuPlayerList *list, boo
|
|||
{
|
||||
bool32 metBefore;
|
||||
|
||||
struct RfuPlayer * player = &list->players[playerIdx];
|
||||
struct RfuPlayer *player = &list->players[playerIdx];
|
||||
|
||||
if (!player->rfu.data.startedActivity && !overrideGender)
|
||||
{
|
||||
|
|
@ -4094,7 +4094,7 @@ static void ItemPrintFunc_EmptyList(u8 windowId, u32 itemId, u8 y)
|
|||
{
|
||||
}
|
||||
|
||||
static void TradeBoardPrintItemInfo(u8 windowId, u8 y, struct RfuGameData * data, const u8 * playerName, u8 colorIdx)
|
||||
static void TradeBoardPrintItemInfo(u8 windowId, u8 y, struct RfuGameData *data, const u8 *playerName, u8 colorIdx)
|
||||
{
|
||||
u8 levelStr[4];
|
||||
u16 species = data->tradeSpecies;
|
||||
|
|
@ -4146,7 +4146,7 @@ static void TradeBoardListMenuItemPrintFunc(u8 windowId, u32 itemId, u8 y)
|
|||
}
|
||||
}
|
||||
|
||||
static s32 GetIndexOfNthTradeBoardOffer(struct RfuPlayer * players, s32 n)
|
||||
static s32 GetIndexOfNthTradeBoardOffer(struct RfuPlayer *players, s32 n)
|
||||
{
|
||||
s32 i;
|
||||
s32 j = 0;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ struct UnionRoomBattle
|
|||
s16 textState;
|
||||
};
|
||||
|
||||
static EWRAM_DATA struct UnionRoomBattle * sBattle = NULL;
|
||||
static EWRAM_DATA struct UnionRoomBattle *sBattle = NULL;
|
||||
|
||||
static const struct BgTemplate sBgTemplates[] = {
|
||||
{
|
||||
|
|
@ -73,7 +73,7 @@ static void CB2_SetUpPartiesAndStartBattle(void)
|
|||
SetMainCallback2(CB2_InitBattle);
|
||||
}
|
||||
|
||||
static void AddTextPrinterForUnionRoomBattle(u8 windowId, const u8 * str, u8 x, u8 y, s32 speed)
|
||||
static void AddTextPrinterForUnionRoomBattle(u8 windowId, const u8 *str, u8 x, u8 y, s32 speed)
|
||||
{
|
||||
s32 letterSpacing = 0;
|
||||
s32 lineSpacing = 1;
|
||||
|
|
@ -81,7 +81,7 @@ static void AddTextPrinterForUnionRoomBattle(u8 windowId, const u8 * str, u8 x,
|
|||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, lineSpacing, sTextColors, speed, str);
|
||||
}
|
||||
|
||||
static bool32 PrintUnionRoomBattleMessage(s16 * state, const u8 * str, s32 speed)
|
||||
static bool32 PrintUnionRoomBattleMessage(s16 *state, const u8 *str, s32 speed)
|
||||
{
|
||||
switch (*state)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ struct UnionRoomChat
|
|||
|
||||
struct UnionRoomChatDisplay_Subtask
|
||||
{
|
||||
bool32 (* callback)(u8 *);
|
||||
bool32 (*callback)(u8 *);
|
||||
bool8 active;
|
||||
u8 state;
|
||||
};
|
||||
|
|
@ -189,7 +189,7 @@ struct UnionRoomChatSprites
|
|||
struct SubtaskInfo
|
||||
{
|
||||
u16 idx;
|
||||
bool32 (* callback)(u8 *);
|
||||
bool32 (*callback)(u8 *);
|
||||
};
|
||||
|
||||
struct MessageWindowInfo
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
// get the sprite index of that player.
|
||||
#define UR_PLAYER_SPRITE_ID(leaderId, memberId) (MAX_RFU_PLAYERS * leaderId + memberId)
|
||||
|
||||
static EWRAM_DATA struct UnionRoomObject * sUnionObjWork = NULL;
|
||||
static EWRAM_DATA struct UnionRoomObject *sUnionObjWork = NULL;
|
||||
static EWRAM_DATA u32 sUnionObjRefreshTimer = 0;
|
||||
|
||||
static u8 CreateTask_AnimateUnionRoomPlayers(void);
|
||||
|
|
@ -136,7 +136,7 @@ static u8 GetUnionRoomPlayerGraphicsId(u32 gender, u32 id)
|
|||
return sUnionRoomObjGfxIds[gender][id % NUM_UNION_ROOM_CLASSES];
|
||||
}
|
||||
|
||||
static void GetUnionRoomPlayerCoords(u32 leaderId, u32 memberId, s32 * x, s32 * y)
|
||||
static void GetUnionRoomPlayerCoords(u32 leaderId, u32 memberId, s32 *x, s32 *y)
|
||||
{
|
||||
*x = sUnionRoomPlayerCoords[leaderId][0] + sUnionRoomGroupOffsets[memberId][0] + MAP_OFFSET;
|
||||
*y = sUnionRoomPlayerCoords[leaderId][1] + sUnionRoomGroupOffsets[memberId][1] + MAP_OFFSET;
|
||||
|
|
@ -181,10 +181,10 @@ static void RemoveUnionRoomPlayerObjectEvent(u32 leaderId)
|
|||
RemoveObjectEventByLocalIdAndMap(sUnionRoomLocalIds[leaderId], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
}
|
||||
|
||||
static bool32 SetUnionRoomPlayerEnterExitMovement(u32 leaderId, const u8 * movement)
|
||||
static bool32 SetUnionRoomPlayerEnterExitMovement(u32 leaderId, const u8 *movement)
|
||||
{
|
||||
u8 objectId;
|
||||
struct ObjectEvent * object;
|
||||
struct ObjectEvent *object;
|
||||
if (TryGetObjectEventIdByLocalIdAndMap(sUnionRoomLocalIds[leaderId], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectId))
|
||||
return FALSE;
|
||||
object = &gObjectEvents[objectId];
|
||||
|
|
@ -198,7 +198,7 @@ static bool32 SetUnionRoomPlayerEnterExitMovement(u32 leaderId, const u8 * movem
|
|||
static bool32 TryReleaseUnionRoomPlayerObjectEvent(u32 leaderId)
|
||||
{
|
||||
u8 objectId;
|
||||
struct ObjectEvent * object;
|
||||
struct ObjectEvent *object;
|
||||
if (TryGetObjectEventIdByLocalIdAndMap(sUnionRoomLocalIds[leaderId], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectId))
|
||||
return TRUE;
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ static bool32 TryReleaseUnionRoomPlayerObjectEvent(u32 leaderId)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
u8 InitUnionRoomPlayerObjects(struct UnionRoomObject * players)
|
||||
u8 InitUnionRoomPlayerObjects(struct UnionRoomObject *players)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ u8 InitUnionRoomPlayerObjects(struct UnionRoomObject * players)
|
|||
return CreateTask_AnimateUnionRoomPlayers();
|
||||
}
|
||||
|
||||
static bool32 AnimateUnionRoomPlayerDespawn(s8 * state, u32 leaderId, struct UnionRoomObject * object)
|
||||
static bool32 AnimateUnionRoomPlayerDespawn(s8 *state, u32 leaderId, struct UnionRoomObject *object)
|
||||
{
|
||||
switch (*state)
|
||||
{
|
||||
|
|
@ -253,7 +253,7 @@ static bool32 AnimateUnionRoomPlayerDespawn(s8 * state, u32 leaderId, struct Uni
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 AnimateUnionRoomPlayerSpawn(s8 * state, u32 leaderId, struct UnionRoomObject * object)
|
||||
static bool32 AnimateUnionRoomPlayerSpawn(s8 *state, u32 leaderId, struct UnionRoomObject *object)
|
||||
{
|
||||
s16 x, y;
|
||||
|
||||
|
|
@ -290,7 +290,7 @@ static bool32 AnimateUnionRoomPlayerSpawn(s8 * state, u32 leaderId, struct Union
|
|||
|
||||
static bool32 SpawnGroupLeader(u32 leaderId, u32 gender, u32 id)
|
||||
{
|
||||
struct UnionRoomObject * object = &sUnionObjWork[leaderId];
|
||||
struct UnionRoomObject *object = &sUnionObjWork[leaderId];
|
||||
object->schedAnim = UNION_ROOM_SPAWN_IN;
|
||||
object->gfxId = GetUnionRoomPlayerGraphicsId(gender, id);
|
||||
|
||||
|
|
@ -302,7 +302,7 @@ static bool32 SpawnGroupLeader(u32 leaderId, u32 gender, u32 id)
|
|||
|
||||
static bool32 DespawnGroupLeader(u32 leaderId)
|
||||
{
|
||||
struct UnionRoomObject * object = &sUnionObjWork[leaderId];
|
||||
struct UnionRoomObject *object = &sUnionObjWork[leaderId];
|
||||
object->schedAnim = UNION_ROOM_SPAWN_OUT;
|
||||
|
||||
if (object->state == 1)
|
||||
|
|
@ -311,7 +311,7 @@ static bool32 DespawnGroupLeader(u32 leaderId)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static void AnimateUnionRoomPlayer(u32 leaderId, struct UnionRoomObject * object)
|
||||
static void AnimateUnionRoomPlayer(u32 leaderId, struct UnionRoomObject *object)
|
||||
{
|
||||
switch (object->state)
|
||||
{
|
||||
|
|
@ -390,7 +390,7 @@ void DestroyUnionRoomPlayerObjects(void)
|
|||
DestroyTask_AnimateUnionRoomPlayers();
|
||||
}
|
||||
|
||||
void CreateUnionRoomPlayerSprites(u8 * spriteIds, s32 leaderId)
|
||||
void CreateUnionRoomPlayerSprites(u8 *spriteIds, s32 leaderId)
|
||||
{
|
||||
s32 memberId;
|
||||
for (memberId = 0; memberId < MAX_RFU_PLAYERS; memberId++)
|
||||
|
|
@ -405,7 +405,7 @@ void CreateUnionRoomPlayerSprites(u8 * spriteIds, s32 leaderId)
|
|||
}
|
||||
}
|
||||
|
||||
void DestroyUnionRoomPlayerSprites(u8 * spriteIds)
|
||||
void DestroyUnionRoomPlayerSprites(u8 *spriteIds)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; i < NUM_UNION_ROOM_SPRITES; i++)
|
||||
|
|
@ -427,7 +427,7 @@ void SetTilesAroundUnionRoomPlayersPassable(void)
|
|||
}
|
||||
}
|
||||
|
||||
static u8 GetNewFacingDirectionForUnionRoomPlayer(u32 memberId, u32 leaderId, struct RfuGameData * gameData)
|
||||
static u8 GetNewFacingDirectionForUnionRoomPlayer(u32 memberId, u32 leaderId, struct RfuGameData *gameData)
|
||||
{
|
||||
if (memberId) // If not leader
|
||||
return sMemberFacingDirections[memberId];
|
||||
|
|
@ -442,7 +442,7 @@ static bool32 IsUnionRoomPlayerInvisible(u32 leaderId, u32 memberId)
|
|||
return IsVirtualObjectInvisible(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID);
|
||||
}
|
||||
|
||||
static void SpawnGroupMember(u32 leaderId, u32 memberId, u8 graphicsId, struct RfuGameData * gameData)
|
||||
static void SpawnGroupMember(u32 leaderId, u32 memberId, u8 graphicsId, struct RfuGameData *gameData)
|
||||
{
|
||||
s32 x, y;
|
||||
s32 id = UR_PLAYER_SPRITE_ID(leaderId, memberId);
|
||||
|
|
@ -465,7 +465,7 @@ static void DespawnGroupMember(u32 leaderId, u32 memberId)
|
|||
MapGridSetMetatileImpassabilityAt(x, y, FALSE);
|
||||
}
|
||||
|
||||
static void AssembleGroup(u32 leaderId, struct RfuGameData * gameData)
|
||||
static void AssembleGroup(u32 leaderId, struct RfuGameData *gameData)
|
||||
{
|
||||
s16 x, y, x2, y2;
|
||||
s32 i;
|
||||
|
|
@ -493,7 +493,7 @@ static void AssembleGroup(u32 leaderId, struct RfuGameData * gameData)
|
|||
}
|
||||
}
|
||||
|
||||
static void SpawnGroupLeaderAndMembers(u32 leaderId, struct RfuGameData * gameData)
|
||||
static void SpawnGroupLeaderAndMembers(u32 leaderId, struct RfuGameData *gameData)
|
||||
{
|
||||
u32 i;
|
||||
switch (gameData->activity)
|
||||
|
|
@ -528,7 +528,7 @@ static void DespawnGroupLeaderAndMembers(u32 leaderId, struct RfuGameData *gameD
|
|||
static void UpdateUnionRoomPlayerSprites(struct WirelessLink_URoom *uroom)
|
||||
{
|
||||
s32 i;
|
||||
struct RfuPlayer * leaders;
|
||||
struct RfuPlayer *leaders;
|
||||
sUnionObjRefreshTimer = 0;
|
||||
for (i = 0, leaders = uroom->playerList->players; i < MAX_UNION_ROOM_LEADERS; i++)
|
||||
{
|
||||
|
|
@ -554,7 +554,7 @@ bool32 TryInteractWithUnionRoomMember(struct RfuPlayerList *list, s16 *memberIdP
|
|||
{
|
||||
s16 x, y;
|
||||
s32 i, memberId;
|
||||
struct RfuPlayer * leaders;
|
||||
struct RfuPlayer *leaders;
|
||||
if (!IsPlayerStandingStill())
|
||||
return FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ COMMON_DATA void *gWindowBgTilemapBuffers[NUM_BACKGROUNDS] = {0};
|
|||
extern u32 gWindowTileAutoAllocEnabled;
|
||||
|
||||
EWRAM_DATA struct Window gWindows[WINDOWS_MAX] = {0};
|
||||
EWRAM_DATA static struct Window* sWindowPtr = NULL;
|
||||
EWRAM_DATA static struct Window *sWindowPtr = NULL;
|
||||
EWRAM_DATA static u16 sWindowSize = 0;
|
||||
|
||||
static u8 GetNumActiveWindowsOnBg(u8 bgId);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct WirelessCommunicationStatusScreen
|
|||
u8 filler[10];
|
||||
};
|
||||
|
||||
static struct WirelessCommunicationStatusScreen * sStatusScreen;
|
||||
static struct WirelessCommunicationStatusScreen *sStatusScreen;
|
||||
|
||||
static void CB2_InitWirelessCommunicationScreen(void);
|
||||
static void Task_WirelessCommunicationScreen(u8);
|
||||
|
|
@ -247,7 +247,7 @@ static void CB2_ExitWirelessCommunicationStatusScreen(void)
|
|||
}
|
||||
|
||||
// Cycle through palettes that relocate various shades of blue to create the wave effect at the bottom of the screen.
|
||||
static void CyclePalette(s16 * counter, s16 * palIdx)
|
||||
static void CyclePalette(s16 *counter, s16 *palIdx)
|
||||
{
|
||||
s32 idx;
|
||||
if (++(*counter) > 5)
|
||||
|
|
@ -345,7 +345,7 @@ static void Task_WirelessCommunicationScreen(u8 taskId)
|
|||
|
||||
#undef tState
|
||||
|
||||
static void WCSS_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 mode)
|
||||
static void WCSS_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 mode)
|
||||
{
|
||||
u8 color[3];
|
||||
|
||||
|
|
@ -381,7 +381,7 @@ static void WCSS_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *
|
|||
AddTextPrinterParameterized4(windowId, fontId, x, y, 0, 0, color, TEXT_SKIP_DRAW, str);
|
||||
}
|
||||
|
||||
static u32 CountPlayersInGroupAndGetActivity(struct RfuPlayer * player, u32 * groupCounts)
|
||||
static u32 CountPlayersInGroupAndGetActivity(struct RfuPlayer *player, u32 *groupCounts)
|
||||
{
|
||||
int i, j, k;
|
||||
u32 activity = player->rfu.data.activity;
|
||||
|
|
@ -422,7 +422,7 @@ static u32 CountPlayersInGroupAndGetActivity(struct RfuPlayer * player, u32 * gr
|
|||
#undef group_players
|
||||
}
|
||||
|
||||
static bool32 HaveCountsChanged(u32 * currCounts, u32 * prevCounts)
|
||||
static bool32 HaveCountsChanged(u32 *currCounts, u32 *prevCounts)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; i < NUM_GROUPTYPES; i++)
|
||||
|
|
@ -433,11 +433,11 @@ static bool32 HaveCountsChanged(u32 * currCounts, u32 * prevCounts)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 UpdateCommunicationCounts(u32 * groupCounts, u32 * prevGroupCounts, u32 * activities, u8 taskId)
|
||||
static bool32 UpdateCommunicationCounts(u32 *groupCounts, u32 *prevGroupCounts, u32 *activities, u8 taskId)
|
||||
{
|
||||
bool32 activitiesChanged = FALSE;
|
||||
u32 groupCountBuffer[NUM_GROUPTYPES] = {0, 0, 0, 0};
|
||||
struct RfuPlayer ** players = (void *)gTasks[taskId].data;
|
||||
struct RfuPlayer **players = (void *)gTasks[taskId].data;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < NUM_TASK_DATA; i++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user