Merge commit '16357c7' into pret-merge
Conflicts: include/battle.h include/battle_controllers.h include/battle_script_commands.h include/contest.h include/list_menu.h src/battle_controllers.c src/battle_gfx_sfx_util.c src/battle_main.c src/battle_message.c src/battle_tower.c src/berry_crush.c src/contest.c src/ereader_helpers.c src/evolution_scene.c src/hall_of_fame.c src/mauville_old_man.c src/mystery_gift_menu.c src/pokedex.c src/pokenav_conditions_search_results.c src/pokenav_menu_handler_gfx.c src/pokenav_ribbons_list.c src/rom_header_gf.c src/union_room.c src/union_room_battle.c src/union_room_player_avatar.c
This commit is contained in:
commit
950dbe7897
@ -405,10 +405,10 @@ struct StatsArray
|
||||
|
||||
struct BattleResources
|
||||
{
|
||||
struct SecretBase* secretBase;
|
||||
struct BattleScriptsStack* battleScriptsStack;
|
||||
struct BattleCallbacksStack* battleCallbackStack;
|
||||
struct StatsArray* beforeLvlUp;
|
||||
struct SecretBase *secretBase;
|
||||
struct BattleScriptsStack *battleScriptsStack;
|
||||
struct BattleCallbacksStack *battleCallbackStack;
|
||||
struct StatsArray *beforeLvlUp;
|
||||
struct AI_ThinkingStruct *ai;
|
||||
struct AiLogicData *aiData;
|
||||
struct AIPartyData *aiParty;
|
||||
|
||||
@ -291,11 +291,11 @@ void BtlController_EmitPlayFanfareOrBGM(u32 battler, u32 bufferId, u16 songId, b
|
||||
void BtlController_EmitFaintingCry(u32 battler, u32 bufferId);
|
||||
void BtlController_EmitIntroSlide(u32 battler, u32 bufferId, u8 terrainId);
|
||||
void BtlController_EmitIntroTrainerBallThrow(u32 battler, u32 bufferId);
|
||||
void BtlController_EmitDrawPartyStatusSummary(u32 battler, u32 bufferId, struct HpAndStatus* hpAndStatus, u8 flags);
|
||||
void BtlController_EmitDrawPartyStatusSummary(u32 battler, u32 bufferId, struct HpAndStatus *hpAndStatus, u8 flags);
|
||||
void BtlController_EmitHidePartyStatusSummary(u32 battler, u32 bufferId);
|
||||
void BtlController_EmitEndBounceEffect(u32 battler, u32 bufferId);
|
||||
void BtlController_EmitSpriteInvisibility(u32 battler, u32 bufferId, bool8 isInvisible);
|
||||
void BtlController_EmitBattleAnimation(u32 battler, u32 bufferId, u8 animationId, struct DisableStruct* disableStructPtr, u16 argument);
|
||||
void BtlController_EmitBattleAnimation(u32 battler, u32 bufferId, u8 animationId, struct DisableStruct *disableStructPtr, u16 argument);
|
||||
void BtlController_EmitLinkStandbyMsg(u32 battler, u32 bufferId, u8 mode, bool32 record);
|
||||
void BtlController_EmitResetActionMoveSelection(u32 battler, u32 bufferId, u8 caseId);
|
||||
void BtlController_EmitEndLinkBattle(u32 battler, u32 bufferId, u8 battleOutcome);
|
||||
|
||||
@ -58,7 +58,7 @@ bool32 IsMoveAffectedByParentalBond(u32 move, u32 battler);
|
||||
void SaveBattlerTarget(u32 battler);
|
||||
void SaveBattlerAttacker(u32 battler);
|
||||
|
||||
extern void (* const gBattleScriptingCommandsTable[])(void);
|
||||
extern void (*const gBattleScriptingCommandsTable[])(void);
|
||||
extern const struct StatFractions gAccuracyStageRatios[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPT_COMMANDS_H
|
||||
|
||||
@ -295,11 +295,11 @@ struct ContestResources
|
||||
struct ContestGraphicsState *gfxState;
|
||||
struct ContestMoveAnimData *moveAnim;
|
||||
struct ContestTV *tv;
|
||||
struct ContestUnused * unused;
|
||||
struct ContestUnused *unused;
|
||||
u8 *contestBgTilemaps[CONTESTANT_COUNT];
|
||||
void * boxBlinkTiles1;
|
||||
void * boxBlinkTiles2;
|
||||
void * animBgTileBuffer;
|
||||
void *boxBlinkTiles1;
|
||||
void *boxBlinkTiles2;
|
||||
void *animBgTileBuffer;
|
||||
};
|
||||
|
||||
#define eContest (*gContestResources->contest)
|
||||
|
||||
@ -1122,7 +1122,7 @@ struct SaveBlock1
|
||||
// sizeof: 0x3???
|
||||
};
|
||||
|
||||
extern struct SaveBlock1* gSaveBlock1Ptr;
|
||||
extern struct SaveBlock1 *gSaveBlock1Ptr;
|
||||
|
||||
struct MapPosition
|
||||
{
|
||||
|
||||
@ -63,7 +63,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);
|
||||
|
||||
@ -104,7 +104,7 @@ void ChooseBerryForMachine(void (*exitCallback)(void));
|
||||
void CB2_ChooseBerry(void);
|
||||
void CB2_ChooseMulch(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);
|
||||
u32 totalItems:12;
|
||||
u32 maxShowed:12;
|
||||
u32 textNarrowWidth:8;
|
||||
|
||||
@ -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,17 +75,17 @@ 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;
|
||||
ALIGNED(4) u8 bufferScript[MG_LINK_BUFFER_SIZE];
|
||||
};
|
||||
|
||||
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,8 +4,8 @@
|
||||
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;
|
||||
|
||||
extern const struct Tileset gTileset_Building;
|
||||
extern const struct Tileset gTileset_BrendansMaysHouse;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
USED 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;
|
||||
|
||||
|
||||
@ -122,7 +122,7 @@ EWRAM_DATA static bool8 sAnimHideHpBoxes = FALSE;
|
||||
|
||||
#include "data/battle_anim.h"
|
||||
|
||||
static void (* const sScriptCmdTable[])(void) =
|
||||
static void (*const sScriptCmdTable[])(void) =
|
||||
{
|
||||
Cmd_loadspritegfx, // 0x00
|
||||
Cmd_unloadspritegfx, // 0x01
|
||||
|
||||
@ -920,7 +920,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;
|
||||
|
||||
@ -116,7 +116,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,
|
||||
|
||||
@ -604,7 +604,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,
|
||||
|
||||
@ -1494,7 +1494,7 @@ void BtlController_EmitIntroTrainerBallThrow(u32 battler, u32 bufferId)
|
||||
PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitDrawPartyStatusSummary(u32 battler, u32 bufferId, struct HpAndStatus* hpAndStatus, u8 flags)
|
||||
void BtlController_EmitDrawPartyStatusSummary(u32 battler, u32 bufferId, struct HpAndStatus *hpAndStatus, u8 flags)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
@ -1534,7 +1534,7 @@ void BtlController_EmitSpriteInvisibility(u32 battler, u32 bufferId, bool8 isInv
|
||||
PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitBattleAnimation(u32 battler, u32 bufferId, u8 animationId, struct DisableStruct* disableStructPtr, u16 argument)
|
||||
void BtlController_EmitBattleAnimation(u32 battler, u32 bufferId, u8 animationId, struct DisableStruct *disableStructPtr, u16 argument)
|
||||
{
|
||||
gBattleResources->transferBuffer[0] = CONTROLLER_BATTLEANIMATION;
|
||||
gBattleResources->transferBuffer[1] = animationId;
|
||||
|
||||
@ -622,7 +622,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,
|
||||
@ -652,7 +652,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,
|
||||
@ -681,7 +681,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,
|
||||
@ -722,13 +722,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,
|
||||
@ -759,7 +759,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,
|
||||
|
||||
@ -145,7 +145,7 @@ EWRAM_DATA u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT + 13] = {0}; // expanded
|
||||
EWRAM_DATA u32 gBattleTypeFlags = 0;
|
||||
EWRAM_DATA u8 gBattleEnvironment = 0;
|
||||
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 u32 gBattleControllerExecFlags = 0;
|
||||
@ -362,7 +362,7 @@ const struct TrainerClass gTrainerClasses[TRAINER_CLASS_COUNT] =
|
||||
[TRAINER_CLASS_RS_PROTAG] = { _("{PKMN} TRAINER") },
|
||||
};
|
||||
|
||||
static void (* const sTurnActionsFuncsTable[])(void) =
|
||||
static void (*const sTurnActionsFuncsTable[])(void) =
|
||||
{
|
||||
[B_ACTION_USE_MOVE] = HandleAction_UseMove,
|
||||
[B_ACTION_USE_ITEM] = HandleAction_UseItem,
|
||||
@ -381,7 +381,7 @@ static void (* const sTurnActionsFuncsTable[])(void) =
|
||||
[B_ACTION_THROW_BALL] = HandleAction_ThrowBall,
|
||||
};
|
||||
|
||||
static void (* const sEndTurnFuncsTable[])(void) =
|
||||
static void (*const sEndTurnFuncsTable[])(void) =
|
||||
{
|
||||
[0] = HandleEndTurn_ContinueBattle,
|
||||
[B_OUTCOME_WON] = HandleEndTurn_BattleWon,
|
||||
|
||||
@ -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
|
||||
};
|
||||
|
||||
@ -791,7 +791,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,
|
||||
|
||||
@ -604,7 +604,7 @@ static void Cmd_unused(void);
|
||||
static void Cmd_tryworryseed(void);
|
||||
static void Cmd_callnative(void);
|
||||
|
||||
void (* const gBattleScriptingCommandsTable[])(void) =
|
||||
void (*const gBattleScriptingCommandsTable[])(void) =
|
||||
{
|
||||
Cmd_attackcanceler, //0x0
|
||||
Cmd_accuracycheck, //0x1
|
||||
|
||||
@ -704,7 +704,7 @@ const struct Trainer gBattlePartners[DIFFICULTY_COUNT][PARTNER_COUNT] =
|
||||
#include "data/battle_partners.h"
|
||||
};
|
||||
|
||||
static void (* const sBattleTowerFuncs[])(void) =
|
||||
static void (*const sBattleTowerFuncs[])(void) =
|
||||
{
|
||||
[BATTLE_TOWER_FUNC_INIT] = InitTowerChallenge,
|
||||
[BATTLE_TOWER_FUNC_GET_DATA] = GetTowerData,
|
||||
|
||||
@ -274,7 +274,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 *);
|
||||
@ -3202,7 +3202,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];
|
||||
|
||||
|
||||
@ -1206,7 +1206,7 @@ static void CreateBerrySprite(u32 itemId, u32 playerId)
|
||||
berryId);
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
@ -1538,7 +1538,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;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
2
src/bg.c
2
src/bg.c
@ -920,7 +920,7 @@ void CopyToBgTilemapBufferRect(u32 bg, const void *src, u8 destX, u8 destY, u8 w
|
||||
{
|
||||
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++)
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -587,7 +587,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 =
|
||||
{
|
||||
|
||||
@ -382,7 +382,7 @@ static u8 GetTrainerHillUnkVal(void)
|
||||
#endif //FREE_TRAINER_HILL
|
||||
}
|
||||
|
||||
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)
|
||||
@ -391,7 +391,7 @@ static bool32 ValidateTrainerChecksum(struct EReaderTrainerHillTrainer * hillTra
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 ValidateTrainerHillData(struct EReaderTrainerHillSet * hillSet)
|
||||
bool8 ValidateTrainerHillData(struct EReaderTrainerHillSet *hillSet)
|
||||
{
|
||||
u32 i;
|
||||
u32 checksum;
|
||||
@ -430,7 +430,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;
|
||||
|
||||
@ -469,7 +469,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);
|
||||
@ -477,7 +477,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;
|
||||
@ -489,7 +489,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);
|
||||
@ -505,7 +505,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;
|
||||
@ -546,7 +546,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;
|
||||
@ -623,7 +623,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)
|
||||
{
|
||||
@ -716,7 +716,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)
|
||||
{
|
||||
|
||||
@ -690,7 +690,7 @@ static const u8 sBattlePointAwards[NUM_FRONTIER_FACILITIES][FRONTIER_MODE_COUNT]
|
||||
},
|
||||
};
|
||||
|
||||
static void (* const sFrontierUtilFuncs[])(void) =
|
||||
static void (*const sFrontierUtilFuncs[])(void) =
|
||||
{
|
||||
[FRONTIER_UTIL_FUNC_GET_STATUS] = GetChallengeStatus,
|
||||
[FRONTIER_UTIL_FUNC_GET_DATA] = GetFrontierData,
|
||||
|
||||
@ -84,7 +84,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);
|
||||
@ -283,7 +283,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,
|
||||
@ -565,7 +565,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)
|
||||
{
|
||||
@ -599,7 +599,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)
|
||||
@ -614,7 +614,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)
|
||||
{
|
||||
@ -887,7 +887,7 @@ static void Task_HofPC_CopySaveData(u8 taskId)
|
||||
static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
{
|
||||
struct HallofFameTeam *savedTeams = gHoFSaveBuffer;
|
||||
struct HallofFameMon* currMon;
|
||||
struct HallofFameMon *currMon;
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < gTasks[taskId].tCurrTeamNo; i++)
|
||||
@ -953,7 +953,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
static void Task_HofPC_PrintMonInfo(u8 taskId)
|
||||
{
|
||||
struct HallofFameTeam *savedTeams = gHoFSaveBuffer;
|
||||
struct HallofFameMon* currMon;
|
||||
struct HallofFameMon *currMon;
|
||||
u16 i;
|
||||
u16 currMonID;
|
||||
|
||||
@ -1108,7 +1108,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;
|
||||
|
||||
@ -605,7 +605,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;
|
||||
|
||||
|
||||
@ -78,7 +78,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,
|
||||
|
||||
@ -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] = {
|
||||
@ -176,7 +176,7 @@ void SaveBardSongLyrics(void)
|
||||
static void PrepareSongText(void)
|
||||
{
|
||||
struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
|
||||
u16 * lyrics = !gSpecialVar_0x8004 ? bard->songLyrics : bard->newSongLyrics;
|
||||
u16 *lyrics = !gSpecialVar_0x8004 ? bard->songLyrics : bard->newSongLyrics;
|
||||
u8 *wordEnd = gStringVar4;
|
||||
u8 *str = wordEnd;
|
||||
u16 paragraphNum;
|
||||
@ -450,7 +450,7 @@ static void EnableTextPrinters(void)
|
||||
gDisableTextPrinters = FALSE;
|
||||
}
|
||||
|
||||
static void DisableTextPrinters(struct TextPrinterTemplate * printer, u16 renderCmd)
|
||||
static void DisableTextPrinters(struct TextPrinterTemplate *printer, u16 renderCmd)
|
||||
{
|
||||
gDisableTextPrinters = TRUE;
|
||||
}
|
||||
@ -746,7 +746,7 @@ void SetMauvilleOldManObjEventGfx(void)
|
||||
|
||||
// Language fixers?
|
||||
|
||||
void SanitizeMauvilleOldManForRuby(union OldMan * oldMan)
|
||||
void SanitizeMauvilleOldManForRuby(union OldMan *oldMan)
|
||||
{
|
||||
s32 i;
|
||||
u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
@ -755,7 +755,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)
|
||||
@ -765,7 +765,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)
|
||||
@ -786,7 +786,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;
|
||||
|
||||
@ -794,7 +794,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++)
|
||||
{
|
||||
@ -807,7 +807,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++)
|
||||
{
|
||||
@ -820,7 +820,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;
|
||||
@ -830,7 +830,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;
|
||||
@ -840,7 +840,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;
|
||||
@ -851,13 +851,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++)
|
||||
{
|
||||
@ -874,7 +874,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);
|
||||
|
||||
@ -882,7 +882,7 @@ 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)
|
||||
@ -916,7 +916,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)
|
||||
@ -931,7 +931,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)
|
||||
{
|
||||
@ -941,7 +941,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)
|
||||
{
|
||||
@ -951,7 +951,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)
|
||||
{
|
||||
|
||||
@ -1192,7 +1192,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)
|
||||
{
|
||||
@ -247,7 +247,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)
|
||||
{
|
||||
@ -257,7 +257,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)
|
||||
{
|
||||
@ -276,7 +276,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 *)client->bufferScript;
|
||||
@ -288,7 +288,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;
|
||||
|
||||
|
||||
@ -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 whic
|
||||
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, co
|
||||
}
|
||||
|
||||
// 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;
|
||||
@ -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);
|
||||
@ -897,7 +897,7 @@ 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;
|
||||
*successMsg = FALSE;
|
||||
@ -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,7 +996,7 @@ 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;
|
||||
*wonderSuccess = FALSE;
|
||||
@ -1053,7 +1053,7 @@ static const u8 *GetServerResultMessage(bool32 * wonderSuccess, bool8 sourceIsFr
|
||||
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);
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -88,7 +88,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;
|
||||
|
||||
|
||||
@ -3358,7 +3358,7 @@ 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);
|
||||
@ -6339,7 +6339,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++)
|
||||
@ -6352,7 +6352,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++)
|
||||
|
||||
@ -239,7 +239,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,
|
||||
|
||||
@ -1076,7 +1076,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,
|
||||
@ -1175,7 +1175,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,
|
||||
|
||||
@ -2476,7 +2476,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];
|
||||
@ -2511,7 +2511,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];
|
||||
|
||||
@ -240,27 +240,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;
|
||||
}
|
||||
|
||||
@ -273,7 +273,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;
|
||||
@ -296,7 +296,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;
|
||||
@ -304,7 +304,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;
|
||||
@ -342,7 +342,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;
|
||||
@ -700,7 +700,7 @@ 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;
|
||||
@ -719,7 +719,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;
|
||||
@ -196,7 +196,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];
|
||||
};
|
||||
|
||||
@ -384,7 +384,7 @@ static bool32 AreAnyTrainerRematchesNearby(void)
|
||||
|
||||
bool32 OpenPokenavMenuInitial(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = OpenPokenavMenu();
|
||||
struct Pokenav_MenuGfx *gfx = OpenPokenavMenu();
|
||||
|
||||
if (gfx == NULL)
|
||||
return FALSE;
|
||||
@ -395,7 +395,7 @@ bool32 OpenPokenavMenuInitial(void)
|
||||
|
||||
bool32 OpenPokenavMenuNotInitial(void)
|
||||
{
|
||||
struct Pokenav_MenuGfx * gfx = OpenPokenavMenu();
|
||||
struct Pokenav_MenuGfx *gfx = OpenPokenavMenu();
|
||||
|
||||
if (gfx == NULL)
|
||||
return FALSE;
|
||||
@ -406,7 +406,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)
|
||||
{
|
||||
@ -420,20 +420,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);
|
||||
@ -444,14 +444,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)
|
||||
{
|
||||
@ -821,7 +821,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++)
|
||||
{
|
||||
@ -837,7 +837,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++)
|
||||
{
|
||||
@ -858,7 +858,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++)
|
||||
@ -991,7 +991,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;
|
||||
|
||||
@ -1020,10 +1020,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++)
|
||||
@ -1045,7 +1045,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;
|
||||
|
||||
@ -1056,7 +1056,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)
|
||||
@ -1076,7 +1076,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;
|
||||
@ -1137,7 +1137,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)
|
||||
{
|
||||
@ -1189,7 +1189,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())
|
||||
@ -1204,7 +1204,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)
|
||||
@ -1216,7 +1216,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);
|
||||
@ -1226,7 +1226,7 @@ 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];
|
||||
u32 width = GetStringWidth(FONT_NORMAL, desc, -1);
|
||||
@ -1238,7 +1238,7 @@ 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);
|
||||
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));
|
||||
@ -1252,13 +1252,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);
|
||||
}
|
||||
|
||||
@ -1294,9 +1294,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));
|
||||
@ -1349,7 +1349,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);
|
||||
@ -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, *end;
|
||||
const u8 *genderStr;
|
||||
struct PokenavMonListItem * item = (struct PokenavMonListItem *)listItem;
|
||||
struct PokenavMonListItem *item = (struct PokenavMonListItem *)listItem;
|
||||
u32 fontId;
|
||||
|
||||
// Mon is in party
|
||||
@ -715,7 +715,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);
|
||||
|
||||
@ -21,16 +21,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 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 SpritePalette *monIconPalettes;
|
||||
const u8 (*monSpeciesNames)[];
|
||||
const u8 (*moveNames)[];
|
||||
const struct Decoration *decorations;
|
||||
u32 flagsOffset;
|
||||
u32 varsOffset;
|
||||
u32 pokedexOffset;
|
||||
@ -70,13 +70,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 MoveInfo * 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 MoveInfo *moves;
|
||||
const struct CompressedSpriteSheet *ballGfx;
|
||||
const struct CompressedSpritePalette *ballPalettes;
|
||||
u32 gcnLinkFlagsOffset;
|
||||
u32 gameClearFlag;
|
||||
u32 ribbonFlag;
|
||||
|
||||
@ -920,7 +920,7 @@ u8 LoadGameSave(u8 saveType)
|
||||
u16 GetSaveBlocksPointersBaseOffset(void)
|
||||
{
|
||||
u16 i, slotOffset;
|
||||
struct SaveSector* sector;
|
||||
struct SaveSector *sector;
|
||||
|
||||
sector = gReadWriteSector = &gSaveDataBuffer;
|
||||
if (gFlashMemoryPresent != TRUE)
|
||||
|
||||
@ -79,7 +79,7 @@ static void DynamicMultichoiceSortList(struct ListMenuItem *items, u32 count);
|
||||
|
||||
// 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] =
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@ EWRAM_DATA u8 gMsgBoxIsCancelable = FALSE;
|
||||
|
||||
extern ScrCmdFunc gScriptCmdTable[];
|
||||
extern ScrCmdFunc gScriptCmdTableEnd[];
|
||||
extern void * const gNullScriptPtr;
|
||||
extern void *const gNullScriptPtr;
|
||||
|
||||
void InitScriptContext(struct ScriptContext *ctx, void *cmdTable, void *cmdTableEnd)
|
||||
{
|
||||
|
||||
@ -372,7 +372,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;
|
||||
}
|
||||
|
||||
@ -16,7 +16,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;
|
||||
|
||||
@ -112,8 +112,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;
|
||||
|
||||
static const u8 sCenterToCornerVecTable[3][4][2] =
|
||||
@ -154,11 +154,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[] =
|
||||
{
|
||||
|
||||
@ -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
|
||||
|
||||
@ -229,7 +229,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,
|
||||
|
||||
@ -1629,7 +1629,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
|
||||
@ -3502,10 +3502,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;
|
||||
@ -3569,7 +3569,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;
|
||||
@ -3578,7 +3578,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;
|
||||
@ -3656,7 +3656,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);
|
||||
@ -3886,7 +3886,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;
|
||||
|
||||
@ -4050,7 +4050,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)
|
||||
{
|
||||
@ -4100,7 +4100,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;
|
||||
@ -4152,7 +4152,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[] = {
|
||||
{
|
||||
@ -81,7 +81,7 @@ static void AddTextPrinterForUnionRoomBattle(u8 windowId, const u8 *str, u8 x, u
|
||||
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);
|
||||
@ -135,7 +135,7 @@ static u16 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;
|
||||
@ -183,7 +183,7 @@ static void RemoveUnionRoomPlayerObjectEvent(u32 leaderId)
|
||||
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];
|
||||
@ -197,7 +197,7 @@ static bool32 SetUnionRoomPlayerEnterExitMovement(u32 leaderId, const u8 *moveme
|
||||
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;
|
||||
|
||||
@ -212,7 +212,7 @@ static bool32 TryReleaseUnionRoomPlayerObjectEvent(u32 leaderId)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u8 InitUnionRoomPlayerObjects(struct UnionRoomObject * players)
|
||||
u8 InitUnionRoomPlayerObjects(struct UnionRoomObject *players)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
@ -228,7 +228,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)
|
||||
{
|
||||
@ -252,7 +252,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;
|
||||
|
||||
@ -289,7 +289,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);
|
||||
|
||||
@ -301,7 +301,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)
|
||||
@ -310,7 +310,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)
|
||||
{
|
||||
@ -426,7 +426,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];
|
||||
@ -441,7 +441,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, u16 graphicsId, struct RfuGameData * gameData)
|
||||
static void SpawnGroupMember(u32 leaderId, u32 memberId, u16 graphicsId, struct RfuGameData *gameData)
|
||||
{
|
||||
s32 x, y;
|
||||
s32 id = UR_PLAYER_SPRITE_ID(leaderId, memberId);
|
||||
@ -464,7 +464,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;
|
||||
@ -492,7 +492,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)
|
||||
@ -527,7 +527,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++)
|
||||
{
|
||||
@ -553,7 +553,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 u32 GetNumActiveWindowsOnBg(u32 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)
|
||||
@ -381,7 +381,7 @@ static void WCSS_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *s
|
||||
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…
x
Reference in New Issue
Block a user