diff --git a/gflib/string_util.c b/gflib/string_util.c index 0826c9a04735..f4a20d118a7e 100644 --- a/gflib/string_util.c +++ b/gflib/string_util.c @@ -299,7 +299,7 @@ u8 *ConvertIntToHexStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 if (state == WRITING_DIGITS) { - char *out = dest++; + u8 *out = dest++; if (digit <= 0xF) c = sDigits[digit]; @@ -310,7 +310,7 @@ u8 *ConvertIntToHexStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 } else if (digit != 0 || powerOfSixteen == 1) { - char *out; + u8 *out; state = WRITING_DIGITS; out = dest++; diff --git a/gflib/text.c b/gflib/text.c index 1bded26b5a52..bc917c7ced85 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -554,8 +554,7 @@ void DecompressGlyphTile(const void *src_, void *dest_) *(dest++) = ((sFontHalfRowLookupTable[sFontHalfRowOffsets[temp & 0xFF]]) << 16) | (sFontHalfRowLookupTable[sFontHalfRowOffsets[temp >> 8]]); } -// Unused -static u8 GetLastTextColor(u8 colorType) +static u8 UNUSED GetLastTextColor(u8 colorType) { switch (colorType) { @@ -1224,8 +1223,7 @@ static u16 RenderText(struct TextPrinter *textPrinter) return RENDER_FINISH; } -// Unused -static u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) +static u32 UNUSED GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) { int i; u8 width; diff --git a/gflib/window.c b/gflib/window.c index 76e863f10ea8..6f7af457d3ed 100644 --- a/gflib/window.c +++ b/gflib/window.c @@ -411,7 +411,7 @@ void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u BlitBitmapRect4Bit(&sourceRect, &destRect, srcX, srcY, destX, destY, rectWidth, rectHeight, 0); } -static void BlitBitmapRectToWindowWithColorKey(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 colorKey) +static void UNUSED BlitBitmapRectToWindowWithColorKey(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 colorKey) { struct Bitmap sourceRect; struct Bitmap destRect; diff --git a/include/siirtc.h b/include/siirtc.h index de4fd634df90..ad13fc62f37b 100644 --- a/include/siirtc.h +++ b/include/siirtc.h @@ -9,6 +9,10 @@ #define SIIRTCINFO_24HOUR 0x40 // 0: 12-hour mode, 1: 24-hour mode #define SIIRTCINFO_POWER 0x80 // power on or power failure occurred +#define HOURS_PER_DAY 24 +#define MINUTES_PER_HOUR 60 +#define SECONDS_PER_MINUTE 60 + enum { MONTH_JAN = 1, @@ -22,7 +26,8 @@ enum MONTH_SEP, MONTH_OCT, MONTH_NOV, - MONTH_DEC + MONTH_DEC, + MONTH_COUNT = MONTH_DEC }; struct SiiRtcInfo diff --git a/src/AgbRfu_LinkManager.c b/src/AgbRfu_LinkManager.c index 747a6c784937..e4ee377f7b7d 100644 --- a/src/AgbRfu_LinkManager.c +++ b/src/AgbRfu_LinkManager.c @@ -229,7 +229,7 @@ u8 rfu_LMAN_CHILD_connectParent(u16 parentId, u16 connect_period) return 0; } -static void rfu_LMAN_PARENT_stopWaitLinkRecoveryAndDisconnect(u8 bm_targetSlot) +static void UNUSED rfu_LMAN_PARENT_stopWaitLinkRecoveryAndDisconnect(u8 bm_targetSlot) { u8 i; @@ -1295,7 +1295,7 @@ void rfu_LMAN_setMSCCallback(void (*MSC_callback_p)(u16)) rfu_setMSCCallback(rfu_LMAN_MSC_callback); } -static void rfu_LMAN_setLMANCallback(void (*func)(u8, u8)) +static void UNUSED rfu_LMAN_setLMANCallback(void (*func)(u8, u8)) { lman.LMAN_callback = func; } @@ -1315,7 +1315,7 @@ u8 rfu_LMAN_setLinkRecovery(u8 enable_flag, u16 recovery_period) return 0; } -static u8 rfu_LMAN_setNIFailCounterLimit(u16 NI_failCounter_limit) +static u8 UNUSED rfu_LMAN_setNIFailCounterLimit(u16 NI_failCounter_limit) { if (gRfuLinkStatus->sendSlotNIFlag | gRfuLinkStatus->recvSlotNIFlag) { @@ -1327,7 +1327,7 @@ static u8 rfu_LMAN_setNIFailCounterLimit(u16 NI_failCounter_limit) return 0; } -static u8 rfu_LMAN_setFastSearchParent(u8 enable_flag) +static u8 UNUSED rfu_LMAN_setFastSearchParent(u8 enable_flag) { if (lman.state == LMAN_STATE_START_SEARCH_PARENT || lman.state == LMAN_STATE_POLL_SEARCH_PARENT || lman.state == LMAN_STATE_END_SEARCH_PARENT) { diff --git a/src/apprentice.c b/src/apprentice.c index 05601423079e..2142a91f71f8 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -623,6 +623,9 @@ static void CreateApprenticeMenu(u8 menu) default: left = 0; top = 0; +#ifdef UBFIX + return; +#endif break; } @@ -1278,8 +1281,7 @@ const u8 *GetApprenticeNameInLanguage(u32 apprenticeId, s32 language) } } -// Functionally unused -static void Task_SwitchToFollowupFuncAfterButtonPress(u8 taskId) +static void UNUSED Task_SwitchToFollowupFuncAfterButtonPress(u8 taskId) { if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON)) SwitchTaskToFollowupFunc(taskId); @@ -1302,8 +1304,7 @@ static void ExecuteFuncAfterButtonPress(void (*func)(void)) gTasks[taskId].data[1] = (u32)(func) >> 16; } -// Unused -static void ExecuteFollowupFuncAfterButtonPress(TaskFunc task) +static void UNUSED ExecuteFollowupFuncAfterButtonPress(TaskFunc task) { u8 taskId = CreateTask(Task_SwitchToFollowupFuncAfterButtonPress, 1); SetTaskFuncWithFollowupFunc(taskId, Task_SwitchToFollowupFuncAfterButtonPress, task); diff --git a/src/battle_anim_bug.c b/src/battle_anim_bug.c index bd91f18d1934..65bfcba2e186 100644 --- a/src/battle_anim_bug.c +++ b/src/battle_anim_bug.c @@ -451,7 +451,7 @@ void AnimMissileArc_Step(struct Sprite *sprite) else { s16 tempData[8]; - u16 *data = sprite->data; + s16 *data = sprite->data; u16 x1 = sprite->x; s16 x2 = sprite->x2; u16 y1 = sprite->y; diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 4464559ab726..d8addec01cc5 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -4019,7 +4019,7 @@ static void AnimConstrictBinding(struct Sprite *sprite) static void AnimConstrictBinding_Step1(struct Sprite *sprite) { - u8 spriteId; + u8 UNUSED spriteId; if ((u16)gBattleAnimArgs[7] == 0xFFFF) { @@ -4032,7 +4032,7 @@ static void AnimConstrictBinding_Step1(struct Sprite *sprite) static void AnimConstrictBinding_Step2(struct Sprite *sprite) { - u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); + u8 UNUSED spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); if (!sprite->data[2]) sprite->data[0] += 11; else @@ -5152,7 +5152,7 @@ static void AnimSlice_Step(struct Sprite *sprite) } } -static void UnusedFlickerAnim(struct Sprite *sprite) +static void UNUSED UnusedFlickerAnim(struct Sprite *sprite) { if (sprite->data[2] > 1) { @@ -6002,7 +6002,7 @@ static void AnimFalseSwipeSlice(struct Sprite *sprite) static void AnimFalseSwipePositionedSlice(struct Sprite *sprite) { - sprite->x = sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + 0xFFD0 + gBattleAnimArgs[0]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) - 48 + gBattleAnimArgs[0]; sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); StartSpriteAnim(sprite, 1); sprite->data[0] = 0; @@ -6185,8 +6185,7 @@ void AnimTask_Conversion2AlphaBlend(u8 taskId) } } -// Unused -static void AnimTask_HideBattlersHealthbox(u8 taskId) +static void UNUSED AnimTask_HideBattlersHealthbox(u8 taskId) { u8 i; for (i = 0; i < gBattlersCount; i++) @@ -6201,8 +6200,7 @@ static void AnimTask_HideBattlersHealthbox(u8 taskId) DestroyAnimVisualTask(taskId); } -// Unused -static void AnimTask_ShowBattlersHealthbox(u8 taskId) +static void UNUSED AnimTask_ShowBattlersHealthbox(u8 taskId) { u8 i; for (i = 0; i < gBattlersCount; i++) diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index cd7f4221bae9..3520d92fb0b6 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -2588,8 +2588,8 @@ static void AnimPencil_Step(struct Sprite *sprite) static void AnimBlendThinRing(struct Sprite *sprite) { u8 battler = 0; - u16 sp0 = 0; - u16 sp1 = 0; + s16 x = 0; + s16 y = 0; u8 r4; if (gBattleAnimArgs[2] == 0) @@ -2600,16 +2600,16 @@ static void AnimBlendThinRing(struct Sprite *sprite) r4 = gBattleAnimArgs[3] ^ 1; if (IsDoubleBattle() && IsBattlerSpriteVisible(BATTLE_PARTNER(battler))) { - SetAverageBattlerPositions(battler, r4, &sp0, &sp1); + SetAverageBattlerPositions(battler, r4, &x, &y); if (r4 == 0) r4 = GetBattlerSpriteCoord(battler, BATTLER_COORD_X); else r4 = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2); if (GetBattlerSide(battler) != B_SIDE_PLAYER) - gBattleAnimArgs[0] -= (sp0 - r4) - gBattleAnimArgs[0]; // This is weird. + gBattleAnimArgs[0] -= (x - r4) - gBattleAnimArgs[0]; // This is weird. else - gBattleAnimArgs[0] = sp0 - r4; + gBattleAnimArgs[0] = x - r4; } sprite->callback = AnimSpriteOnMonPos; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 82653c1406ea..822adc173303 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -1508,8 +1508,7 @@ static void FadeScreenToWhite_Step(u8 taskId) static void AnimSpikes(struct Sprite *sprite) { - u16 x; - u16 y; + s16 x, y; InitSpritePosToAnimAttacker(sprite, TRUE); SetAverageBattlerPositions(gBattleAnimTarget, FALSE, &x, &y); @@ -4844,8 +4843,8 @@ static void AnimMeteorMashStar_Step(struct Sprite *sprite) // arg 4: duration static void AnimMeteorMashStar(struct Sprite *sprite) { - s16 y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); // unused local variable - s16 x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); // unused local variable + s16 UNUSED y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + s16 UNUSED x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER || IsContest()) { diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index 8dd5a7ff7f9f..91ac5e7841f9 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -1216,8 +1216,7 @@ void AnimSkyAttackBird_Step(struct Sprite *sprite) DestroySpriteAndMatrix(sprite); } -// Unused -static void AnimTask_SetAttackerVisibility(u8 taskId) +static void UNUSED AnimTask_SetAttackerVisibility(u8 taskId) { if (gBattleAnimArgs[0] == 0) { diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 4d97cd2c7565..256b2abcbabb 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -440,9 +440,8 @@ void TranslateSpriteInGrowingCircle(struct Sprite *sprite) } } -// Unused // Exact shape depends on arguments. Can move in a figure-8-like pattern, or circular, etc. -static void TranslateSpriteInLissajousCurve(struct Sprite *sprite) +static void UNUSED TranslateSpriteInLissajousCurve(struct Sprite *sprite) { if (sprite->sDuration) { @@ -594,8 +593,7 @@ static void TranslateSpriteLinearFixedPointIconFrame(struct Sprite *sprite) UpdateMonIconFrame(sprite); } -// Unused -static void TranslateSpriteToBattleTargetPos(struct Sprite *sprite) +static void UNUSED TranslateSpriteToBattleTargetPos(struct Sprite *sprite) { sprite->sStartX = sprite->x + sprite->x2; sprite->sStartY = sprite->y + sprite->y2; @@ -662,8 +660,7 @@ void DestroySpriteAndMatrix(struct Sprite *sprite) DestroyAnimSprite(sprite); } -// Unused -static void TranslateSpriteToBattleAttackerPos(struct Sprite *sprite) +static void UNUSED TranslateSpriteToBattleAttackerPos(struct Sprite *sprite) { sprite->sStartX = sprite->x + sprite->x2; sprite->sStartY = sprite->y + sprite->y2; @@ -678,8 +675,7 @@ static void TranslateSpriteToBattleAttackerPos(struct Sprite *sprite) #undef sStartY #undef sTargetY -// Unused -static void EndUnkPaletteAnim(struct Sprite *sprite) +static void UNUSED EndUnkPaletteAnim(struct Sprite *sprite) { PaletteStruct_ResetById(sprite->data[5]); DestroySpriteAndMatrix(sprite); @@ -1090,8 +1086,7 @@ void StartAnimLinearTranslation(struct Sprite *sprite) sprite->callback(sprite); } -// Unused -static void StartAnimLinearTranslation_SetCornerVecX(struct Sprite *sprite) +static void UNUSED StartAnimLinearTranslation_SetCornerVecX(struct Sprite *sprite) { sprite->data[1] = sprite->x; sprite->data[3] = sprite->y; @@ -1499,8 +1494,7 @@ u8 GetSpritePalIdxByBattler(u8 battler) return battler; } -// Unused -static u8 GetSpritePalIdxByPosition(u8 position) +static u8 UNUSED GetSpritePalIdxByPosition(u8 position) { return GetBattlerAtPosition(position); } @@ -1997,8 +1991,7 @@ void AnimTask_GetFrustrationPowerLevel(u8 taskId) DestroyAnimVisualTask(taskId); } -// Unused -static void SetPriorityForVisibleBattlers(u8 priority) +static void UNUSED SetPriorityForVisibleBattlers(u8 priority) { if (IsBattlerSpriteVisible(gBattleAnimTarget)) gSprites[gBattlerSpriteIds[gBattleAnimTarget]].oam.priority = priority; diff --git a/src/battle_anim_status_effects.c b/src/battle_anim_status_effects.c index b2a1378ac1e0..7e7ded7676f3 100644 --- a/src/battle_anim_status_effects.c +++ b/src/battle_anim_status_effects.c @@ -269,8 +269,7 @@ static const struct SpriteTemplate sFlashingCircleImpactSpriteTemplate = .callback = AnimFlashingCircleImpact, }; -// Unused -static u8 Task_FlashingCircleImpacts(u8 battlerId, bool8 red) +static u8 UNUSED Task_FlashingCircleImpacts(u8 battlerId, bool8 red) { u8 battlerSpriteId = gBattlerSpriteIds[battlerId]; u8 taskId = CreateTask(Task_UpdateFlashingCircleImpacts, 10); diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index 86e832e8ec6a..4d2873a92afa 100644 --- a/src/battle_anim_throw.c +++ b/src/battle_anim_throw.c @@ -2656,11 +2656,11 @@ static void SpriteCB_ShinyStars_Diagonal(struct Sprite *sprite) void AnimTask_LoadPokeblockGfx(u8 taskId) { - u8 paletteIndex; + u8 UNUSED paletteIndex; LoadCompressedSpriteSheetUsingHeap(&gBattleAnimPicTable[ANIM_TAG_POKEBLOCK - ANIM_SPRITES_START]); LoadCompressedSpritePaletteUsingHeap(&gBattleAnimPaletteTable[ANIM_TAG_POKEBLOCK - ANIM_SPRITES_START]); - paletteIndex = IndexOfSpritePaletteTag(ANIM_TAG_POKEBLOCK); // unused + paletteIndex = IndexOfSpritePaletteTag(ANIM_TAG_POKEBLOCK); DestroyAnimVisualTask(taskId); } diff --git a/src/battle_anim_utility_funcs.c b/src/battle_anim_utility_funcs.c index d49d645c07bb..99e476da1ddd 100644 --- a/src/battle_anim_utility_funcs.c +++ b/src/battle_anim_utility_funcs.c @@ -69,6 +69,9 @@ void AnimTask_BlendBattleAnimPalExclude(u8 taskId) selectedPalettes = 0; // fall through case ANIM_ATTACKER: +#ifdef UBFIX + default: +#endif animBattlers[0] = gBattleAnimAttacker; break; case 3: @@ -807,7 +810,7 @@ void AnimTask_SetAllNonAttackersInvisiblity(u8 taskId) DestroyAnimVisualTask(taskId); } -void StartMonScrollingBgMask(u8 taskId, int unused, u16 scrollSpeed, u8 battler, bool8 includePartner, u8 numFadeSteps, u8 fadeStepDelay, u8 duration, const u32 *gfx, const u32 *tilemap, const u32 *palette) +void StartMonScrollingBgMask(u8 taskId, int UNUSED unused, u16 scrollSpeed, u8 battler, bool8 includePartner, u8 numFadeSteps, u8 fadeStepDelay, u8 duration, const u32 *gfx, const u32 *tilemap, const u32 *palette) { u16 species; u8 spriteId, spriteId2; diff --git a/src/battle_arena.c b/src/battle_arena.c index 37c7406ce131..b554c6bdc8eb 100644 --- a/src/battle_arena.c +++ b/src/battle_arena.c @@ -445,8 +445,7 @@ void BattleArena_DeductSkillPoints(u8 battler, u16 stringId) } } -// Unused -static void UpdateHPAtStart(u8 battler) +static void UNUSED UpdateHPAtStart(u8 battler) { u16 *hpAtStart = gBattleStruct->arenaStartHp; diff --git a/src/battle_bg.c b/src/battle_bg.c index 97d5cc862fa5..c74ccc3c18d5 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -685,9 +685,9 @@ const struct BattleBackground sBattleTerrainTable[] = }, }; -static void CB2_UnusedBattleInit(void); +static void UNUSED CB2_UnusedBattleInit(void); -static void UnusedBattleInit(void) +static void UNUSED UnusedBattleInit(void) { u8 spriteId; @@ -697,7 +697,7 @@ static void UnusedBattleInit(void) SetMainCallback2(CB2_UnusedBattleInit); } -static void CB2_UnusedBattleInit(void) +static void UNUSED CB2_UnusedBattleInit(void) { AnimateSprites(); BuildOamBuffer(); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 83d3a8525346..516e299b43e6 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -897,7 +897,7 @@ static void ReloadMoveNames(u32 battler) MoveSelectionDisplayMoveType(battler); } -static u32 HandleMoveInputUnused(u32 battler) +static u32 UNUSED HandleMoveInputUnused(u32 battler) { u32 var = 0; diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 026f433720a1..a26e6afb8d9d 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -936,8 +936,7 @@ void BtlController_EmitGetMonData(u32 battler, u32 bufferId, u8 requestId, u8 mo PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 4); } -// Unused -static void BtlController_EmitGetRawMonData(u32 battler, u32 bufferId, u8 monId, u8 bytes) +static void UNUSED BtlController_EmitGetRawMonData(u32 battler, u32 bufferId, u8 monId, u8 bytes) { gBattleResources->transferBuffer[0] = CONTROLLER_GETRAWMONDATA; gBattleResources->transferBuffer[1] = monId; @@ -958,8 +957,7 @@ void BtlController_EmitSetMonData(u32 battler, u32 bufferId, u8 requestId, u8 mo PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 3 + bytes); } -// Unused -static void BtlController_EmitSetRawMonData(u32 battler, u32 bufferId, u8 monId, u8 bytes, void *data) +static void UNUSED BtlController_EmitSetRawMonData(u32 battler, u32 bufferId, u8 monId, u8 bytes, void *data) { s32 i; @@ -1032,8 +1030,7 @@ void BtlController_EmitFaintAnimation(u32 battler, u32 bufferId) PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 4); } -// Unused -static void BtlController_EmitPaletteFade(u32 battler, u32 bufferId) +static void UNUSED BtlController_EmitPaletteFade(u32 battler, u32 bufferId) { gBattleResources->transferBuffer[0] = CONTROLLER_PALETTEFADE; gBattleResources->transferBuffer[1] = CONTROLLER_PALETTEFADE; @@ -1042,8 +1039,7 @@ static void BtlController_EmitPaletteFade(u32 battler, u32 bufferId) PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 4); } -// Unused -static void BtlController_EmitSuccessBallThrowAnim(u32 battler, u32 bufferId) +static void UNUSED BtlController_EmitSuccessBallThrowAnim(u32 battler, u32 bufferId) { gBattleResources->transferBuffer[0] = CONTROLLER_SUCCESSBALLTHROWANIM; gBattleResources->transferBuffer[1] = CONTROLLER_SUCCESSBALLTHROWANIM; @@ -1059,8 +1055,7 @@ void BtlController_EmitBallThrowAnim(u32 battler, u32 bufferId, u8 caseId) PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 2); } -// Unused -static void BtlController_EmitPause(u32 battler, u32 bufferId, u8 toWait, void *data) +static void UNUSED BtlController_EmitPause(u32 battler, u32 bufferId, u8 toWait, void *data) { s32 i; @@ -1220,8 +1215,7 @@ void BtlController_EmitChoosePokemon(u32 battler, u32 bufferId, u8 caseId, u8 sl PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 8); // Only 7 bytes were written. } -// Unused -static void BtlController_EmitCmd23(u32 battler, u32 bufferId) +static void UNUSED BtlController_EmitCmd23(u32 battler, u32 bufferId) { gBattleResources->transferBuffer[0] = CONTROLLER_23; gBattleResources->transferBuffer[1] = CONTROLLER_23; @@ -1276,8 +1270,7 @@ void BtlController_EmitStatusAnimation(u32 battler, u32 bufferId, bool8 status2, PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 6); } -// Unused -static void BtlController_EmitStatusXor(u32 battler, u32 bufferId, u8 b) +static void UNUSED BtlController_EmitStatusXor(u32 battler, u32 bufferId, u8 b) { gBattleResources->transferBuffer[0] = CONTROLLER_STATUSXOR; gBattleResources->transferBuffer[1] = b; @@ -1297,8 +1290,7 @@ void BtlController_EmitDataTransfer(u32 battler, u32 bufferId, u16 size, void *d PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, size + 4); } -// Unused -static void BtlController_EmitDMA3Transfer(u32 battler, u32 bufferId, void *dst, u16 size, void *data) +static void UNUSED BtlController_EmitDMA3Transfer(u32 battler, u32 bufferId, void *dst, u16 size, void *data) { s32 i; @@ -1314,8 +1306,7 @@ static void BtlController_EmitDMA3Transfer(u32 battler, u32 bufferId, void *dst, PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, size + 7); } -// Unused -static void BtlController_EmitPlayBGM(u32 battler, u32 bufferId, u16 songId, void *data) +static void UNUSED BtlController_EmitPlayBGM(u32 battler, u32 bufferId, u16 songId, void *data) { s32 i; @@ -1330,8 +1321,7 @@ static void BtlController_EmitPlayBGM(u32 battler, u32 bufferId, u16 songId, voi PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, songId + 3); } -// Unused -static void BtlController_EmitCmd32(u32 battler, u32 bufferId, u16 size, void *data) +static void UNUSED BtlController_EmitCmd32(u32 battler, u32 bufferId, u16 size, void *data) { s32 i; @@ -1383,8 +1373,7 @@ void BtlController_EmitOneReturnValue_Duplicate(u32 battler, u32 bufferId, u16 r PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 4); } -// Unused -static void BtlController_EmitClearUnkVar(u32 battler, u32 bufferId) +static void UNUSED BtlController_EmitClearUnkVar(u32 battler, u32 bufferId) { gBattleResources->transferBuffer[0] = CONTROLLER_CLEARUNKVAR; gBattleResources->transferBuffer[1] = CONTROLLER_CLEARUNKVAR; @@ -1393,16 +1382,14 @@ static void BtlController_EmitClearUnkVar(u32 battler, u32 bufferId) PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 4); } -// Unused -static void BtlController_EmitSetUnkVar(u32 battler, u32 bufferId, u8 b) +static void UNUSED BtlController_EmitSetUnkVar(u32 battler, u32 bufferId, u8 b) { gBattleResources->transferBuffer[0] = CONTROLLER_SETUNKVAR; gBattleResources->transferBuffer[1] = b; PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 2); } -// Unused -static void BtlController_EmitClearUnkFlag(u32 battler, u32 bufferId) +static void UNUSED BtlController_EmitClearUnkFlag(u32 battler, u32 bufferId) { gBattleResources->transferBuffer[0] = CONTROLLER_CLEARUNKFLAG; gBattleResources->transferBuffer[1] = CONTROLLER_CLEARUNKFLAG; @@ -1411,8 +1398,7 @@ static void BtlController_EmitClearUnkFlag(u32 battler, u32 bufferId) PrepareBufferDataTransfer(battler, bufferId, gBattleResources->transferBuffer, 4); } -// Unused -static void BtlController_EmitToggleUnkFlag(u32 battler, u32 bufferId) +static void UNUSED BtlController_EmitToggleUnkFlag(u32 battler, u32 bufferId) { gBattleResources->transferBuffer[0] = CONTROLLER_TOGGLEUNKFLAG; gBattleResources->transferBuffer[1] = CONTROLLER_TOGGLEUNKFLAG; diff --git a/src/battle_dome.c b/src/battle_dome.c index 917200ac67ed..ad7c60dd1c6c 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -1665,13 +1665,13 @@ static const u8 sTourneyTreePokeballCoords[DOME_TOURNAMENT_TRAINERS_COUNT + DOME {.tile = LINE_V_L, .y = 9, .x = 17}, \ {.tile = LINE_V_L, .y = 10, .x = 17}, \ {.tile = LINE_V_L_HALF_LOGO, .y = 11, .x = 17}, - + #define LINESECTION_SEMIFINAL_BOTTOM_RIGHT \ {.tile = LINE_V_L_LOGO4, .y = 14, .x = 17}, \ {.tile = LINE_V_L_LOGO3, .y = 13, .x = 17}, \ {.tile = LINE_V_L_LOGO2, .y = 12, .x = 17}, \ {.tile = LINE_V_L_LOGO1, .y = 11, .x = 17}, - + #define LINESECTION_FINAL_LEFT \ {.tile = LINE_H_LOGO1, .y = 11, .x = 13}, \ {.tile = LINE_H_LOGO2, .y = 11, .x = 14}, diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 3e48a014760a..064241c6e3cd 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -377,7 +377,7 @@ void SpriteCB_WaitForBattlerBallReleaseAnim(struct Sprite *sprite) } } -static void UnusedDoBattleSpriteAffineAnim(struct Sprite *sprite, bool8 pointless) +static void UNUSED UnusedDoBattleSpriteAffineAnim(struct Sprite *sprite, bool8 pointless) { sprite->animPaused = TRUE; sprite->callback = SpriteCallbackDummy; diff --git a/src/battle_intro.c b/src/battle_intro.c index 490aa940616c..c303baaa6612 100644 --- a/src/battle_intro.c +++ b/src/battle_intro.c @@ -602,7 +602,7 @@ void DrawBattlerOnBg(int bgId, u8 x, u8 y, u8 battlerPosition, u8 paletteId, u8 LoadBgTilemap(bgId, tilemap, BG_SCREEN_SIZE, 0); } -static void DrawBattlerOnBgDMA(u8 x, u8 y, u8 battlerPosition, u8 arg3, u8 paletteId, u16 arg5, u8 arg6, u8 arg7) +static void UNUSED DrawBattlerOnBgDMA(u8 x, u8 y, u8 battlerPosition, u8 arg3, u8 paletteId, u16 arg5, u8 arg6, u8 arg7) { int i, j, offset; diff --git a/src/battle_main.c b/src/battle_main.c index 8461873f059b..046c6687a0d9 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -2834,8 +2834,7 @@ static void SpriteCB_BattleSpriteSlideLeft(struct Sprite *sprite) } } -// Unused -static void SetIdleSpriteCallback(struct Sprite *sprite) +static void UNUSED SetIdleSpriteCallback(struct Sprite *sprite) { sprite->callback = SpriteCB_Idle; } diff --git a/src/battle_pike.c b/src/battle_pike.c index 34aaf2a76986..9070fb6595b8 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -1111,8 +1111,7 @@ static u16 GetNPCRoomGraphicsId(void) return sNPCTable[sNpcId].graphicsId; } -// Unused -static u8 GetInWildMonRoom(void) +static bool8 UNUSED GetInWildMonRoom(void) { return sInWildMonRoom; } diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 31f8fa6b81bb..ba3d6201113f 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -1479,8 +1479,7 @@ u8 GetTrainerEncounterMusicIdInBattlePyramid(u16 trainerId) return TRAINER_ENCOUNTER_MUSIC_MALE; } -// Unused -static void BattlePyramidRetireChallenge(void) +static void UNUSED BattlePyramidRetireChallenge(void) { ScriptContext_SetupScript(BattlePyramid_Retire); } diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 9d5cee94a573..9f8856a163ca 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -174,12 +174,12 @@ enum { static const struct MenuAction sMenuActions[] = { - [ACTION_USE_FIELD] = { gMenuText_Use, BagAction_UseOnField }, - [ACTION_TOSS] = { gMenuText_Toss, BagAction_Toss }, - [ACTION_GIVE] = { gMenuText_Give, BagAction_Give }, - [ACTION_CANCEL] = { gText_Cancel2, BagAction_Cancel }, - [ACTION_USE_BATTLE] = { gMenuText_Use, BagAction_UseInBattle }, - [ACTION_DUMMY] = { gText_EmptyString2, NULL }, + [ACTION_USE_FIELD] = { gMenuText_Use, {BagAction_UseOnField} }, + [ACTION_TOSS] = { gMenuText_Toss, {BagAction_Toss} }, + [ACTION_GIVE] = { gMenuText_Give, {BagAction_Give} }, + [ACTION_CANCEL] = { gText_Cancel2, {BagAction_Cancel} }, + [ACTION_USE_BATTLE] = { gMenuText_Use, {BagAction_UseInBattle} }, + [ACTION_DUMMY] = { gText_EmptyString2, {NULL} }, }; static const u8 sMenuActionIds_Field[] = {ACTION_USE_FIELD, ACTION_GIVE, ACTION_TOSS, ACTION_CANCEL}; @@ -382,8 +382,8 @@ void CB2_PyramidBagMenuFromStartMenu(void) GoToBattlePyramidBagMenu(PYRAMIDBAG_LOC_FIELD, CB2_ReturnToFieldWithOpenMenu); } -// Unused, CB2_BagMenuFromBattle is used instead -static void OpenBattlePyramidBagInBattle(void) +// CB2_BagMenuFromBattle is used instead +static void UNUSED OpenBattlePyramidBagInBattle(void) { GoToBattlePyramidBagMenu(PYRAMIDBAG_LOC_BATTLE, CB2_SetUpReshowBattleScreenAfterMenu2); } @@ -1475,8 +1475,7 @@ static void DrawTossNumberWindow(u8 windowId) ScheduleBgCopyTilemapToVram(1); } -// Unused -static u8 GetMenuActionWindowId(u8 windowArrayId) +static u8 UNUSED GetMenuActionWindowId(u8 windowArrayId) { return gPyramidBagMenu->windowIds[windowArrayId]; } diff --git a/src/battle_setup.c b/src/battle_setup.c index 1bc13d8d90cd..88c239e1814d 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -1289,7 +1289,7 @@ static void SetBattledTrainersFlags(void) FlagSet(GetTrainerAFlag()); } -static void SetBattledTrainerFlag(void) +static void UNUSED SetBattledTrainerFlag(void) { FlagSet(GetTrainerAFlag()); } diff --git a/src/battle_tent.c b/src/battle_tent.c index f0f7363f31af..b7a9daecba4c 100644 --- a/src/battle_tent.c +++ b/src/battle_tent.c @@ -313,7 +313,6 @@ static void GenerateInitialRentalMons(void) monSetId = Random() % NUM_SLATEPORT_TENT_MONS; for (j = firstMonId; j < firstMonId + i; j++) { - u16 monId = monIds[j]; if (monIds[j] == monSetId) break; if (species[j] == gFacilityTrainerMons[monSetId].species) diff --git a/src/battle_tower.c b/src/battle_tower.c index 7615c796ee1f..edacc53a987e 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -1130,8 +1130,7 @@ u16 GetRandomScaledFrontierTrainerId(u8 challengeNum, u8 battleNum) return trainerId; } -// Unused -static void GetRandomScaledFrontierTrainerIdRange(u8 challengeNum, u8 battleNum, u16 *trainerIdPtr, u8 *rangePtr) +static void UNUSED GetRandomScaledFrontierTrainerIdRange(u8 challengeNum, u8 battleNum, u16 *trainerIdPtr, u8 *rangePtr) { u16 trainerId, range; @@ -1766,7 +1765,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) } // Probably an early draft before the 'CreateApprenticeMon' was written. -static void Unused_CreateApprenticeMons(u16 trainerId, u8 firstMonId) +static void UNUSED Unused_CreateApprenticeMons(u16 trainerId, u8 firstMonId) { s32 i, j; u8 friendship = MAX_FRIENDSHIP; @@ -1842,12 +1841,14 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId) if (trainerId < FRONTIER_TRAINERS_COUNT) { - u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; - u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); // By mistake Battle Tower's Level 50 challenge number is used to determine the IVs for Battle Factory. #ifdef BUGFIX + u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; + u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u8 challengeNum = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] / FRONTIER_STAGES_PER_CHALLENGE; #else + u8 UNUSED lvlMode = gSaveBlock2Ptr->frontier.lvlMode; + u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u8 challengeNum = gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][FRONTIER_LVL_50] / FRONTIER_STAGES_PER_CHALLENGE; #endif if (gSaveBlock2Ptr->frontier.curChallengeBattleNum < FRONTIER_STAGES_PER_CHALLENGE - 1) @@ -2323,7 +2324,7 @@ static void LoadMultiPartnerCandidatesData(void) u32 lvlMode, battleMode; s32 challengeNum; u32 species1, species2; - u32 level; + u32 UNUSED level; struct ObjectEventTemplate *objEventTemplates; objEventTemplates = gSaveBlock1Ptr->objectEventTemplates; @@ -2506,7 +2507,7 @@ static void ShowPartnerCandidateMessage(void) { s32 i, j, partnerId; s32 monId; - s32 level = SetFacilityPtrsGetLevel(); + s32 UNUSED level = SetFacilityPtrsGetLevel(); u16 winStreak = GetCurrentFacilityWinStreak(); s32 challengeNum = winStreak / FRONTIER_STAGES_PER_CHALLENGE; s32 k = gSpecialVar_LastTalked - 2; @@ -2868,7 +2869,7 @@ static void AwardBattleTowerRibbons(void) // This is a leftover debugging function that is used to populate the E-Reader // trainer with the player's current data. -static void FillEReaderTrainerWithPlayerData(void) +static void UNUSED FillEReaderTrainerWithPlayerData(void) { struct BattleTowerEReaderTrainer *ereaderTrainer = &gSaveBlock2Ptr->frontier.ereaderTrainer; s32 i, j; diff --git a/src/battle_transition.c b/src/battle_transition.c index 2e87b9c1d77e..11f9cddf4bb5 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -779,7 +779,7 @@ static const TransitionStateFunc sTransitionIntroFuncs[] = static const struct SpriteFrameImage sSpriteImage_Pokeball[] = { - sPokeball_Gfx, sizeof(sPokeball_Gfx) + {sPokeball_Gfx, sizeof(sPokeball_Gfx)} }; static const union AnimCmd sSpriteAnim_Pokeball[] = @@ -841,12 +841,12 @@ static const struct OamData sOam_UnusedBrendanLass = static const struct SpriteFrameImage sImageTable_UnusedBrendan[] = { - sUnusedBrendan_Gfx, sizeof(sUnusedBrendan_Gfx) + {sUnusedBrendan_Gfx, sizeof(sUnusedBrendan_Gfx)} }; static const struct SpriteFrameImage sImageTable_UnusedLass[] = { - sUnusedLass_Gfx, sizeof(sUnusedLass_Gfx) + {sUnusedLass_Gfx, sizeof(sUnusedLass_Gfx)} }; static const union AnimCmd sSpriteAnim_UnusedBrendanLass[] = @@ -1017,8 +1017,7 @@ static void CB2_TestBattleTransition(void) UpdatePaletteFade(); } -// Unused -static void TestBattleTransition(u8 transitionId) +static void UNUSED TestBattleTransition(u8 transitionId) { sTestingTransitionId = transitionId; SetMainCallback2(CB2_TestBattleTransition); diff --git a/src/battle_util.c b/src/battle_util.c index baeff398a9b7..5badae23f052 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1298,8 +1298,7 @@ void PressurePPLoseOnUsingPerishSong(u8 attacker) } } -// Unused -static void MarkAllBattlersForControllerExec(void) +static void UNUSED MarkAllBattlersForControllerExec(void) { int i; diff --git a/src/berry_blender.c b/src/berry_blender.c index 0f22ad0167ac..bdfb500d8be8 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -2377,8 +2377,7 @@ static void Debug_SetMaxRPMStage(s16 value) sDebug_MaxRPMStage = value; } -// Unused -static s16 Debug_GetMaxRPMStage(void) +static s16 UNUSED Debug_GetMaxRPMStage(void) { return sDebug_MaxRPMStage; } @@ -2388,8 +2387,7 @@ static void Debug_SetGameTimeStage(s16 value) sDebug_GameTimeStage = value; } -// Unued -static s16 Debug_GetGameTimeStage(void) +static s16 UNUSED Debug_GetGameTimeStage(void) { return sDebug_GameTimeStage; } @@ -2501,8 +2499,7 @@ static void CalculatePokeblock(struct BlenderBerry *berries, struct Pokeblock *p flavors[i] = sPokeblockFlavors[i]; } -// Unused -static void 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); } @@ -3471,7 +3468,7 @@ static bool8 PrintBlendingResults(void) struct Pokeblock pokeblock; u8 flavors[FLAVOR_COUNT + 1]; u8 text[40]; - u16 berryIds[4]; // unused + u16 UNUSED berryIds[4]; switch (sBerryBlender->mainState) { @@ -3866,6 +3863,9 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3 { case 0: case 3: +#ifdef UBFIX + default: +#endif txtColor[0] = TEXT_COLOR_WHITE; txtColor[1] = TEXT_COLOR_DARK_GRAY; txtColor[2] = TEXT_COLOR_LIGHT_GRAY; diff --git a/src/berry_crush.c b/src/berry_crush.c index bee0e9085ac6..baf0e2fb65c0 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -1062,7 +1062,7 @@ static void BerryCrush_SetVBlankCB(void) SetVBlankCallback(VBlankCB); } -static void BerryCrush_InitVBlankCB(void) +static void UNUSED BerryCrush_InitVBlankCB(void) { SetVBlankCallback(NULL); } diff --git a/src/berry_fix_graphics.c b/src/berry_fix_graphics.c index d766c3966253..80510a4ce173 100644 --- a/src/berry_fix_graphics.c +++ b/src/berry_fix_graphics.c @@ -34,8 +34,8 @@ static const struct { } }; -// Unused. See berry_fix_program.c -static void LoadBerryFixGraphics(u32 idx) +// See berry_fix_program.c +static void UNUSED LoadBerryFixGraphics(u32 idx) { REG_DISPCNT = 0; REG_BG0HOFS = 0; diff --git a/src/berry_powder.c b/src/berry_powder.c index 7066f9d95c1b..4a9fa421d3fa 100755 --- a/src/berry_powder.c +++ b/src/berry_powder.c @@ -15,8 +15,7 @@ static EWRAM_DATA u8 sBerryPowderVendorWindowId = 0; -// Unused -static const struct BgTemplate sBerryPowderBgTemplates[] = +static const struct BgTemplate UNUSED sBerryPowderBgTemplates[] = { { .bg = 0, @@ -57,10 +56,9 @@ static const struct BgTemplate sBerryPowderBgTemplates[] = }; // ? Part of the BG templates? -static const u32 sUnknown[] = {0xFF, 0x00}; +static const u32 UNUSED sUnknown[] = {0xFF, 0x00}; -// Unused -static const struct WindowTemplate sBerryPowderWindowTemplates[] = +static const struct WindowTemplate UNUSED sBerryPowderWindowTemplates[] = { { .bg = 0, @@ -177,7 +175,7 @@ bool8 GiveBerryPowder(u32 amountToAdd) } } -static bool8 TakeBerryPowder_(u32 cost) +static bool8 UNUSED TakeBerryPowder_(u32 cost) { u32 *powder = &gSaveBlock2Ptr->berryCrush.berryPowderAmount; if (!HasEnoughBerryPowder_(cost)) diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index 49f73dd6b733..7863f3cc116c 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -256,7 +256,7 @@ static void DoBrailleRegisteelEffect(void) } // theory: another commented out DoBrailleWait and Task_BrailleWait. -static void DoBrailleWait(void) +static void UNUSED DoBrailleWait(void) { } diff --git a/src/cable_club.c b/src/cable_club.c index 7668c2aa9956..d6a2903fd47a 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -195,8 +195,7 @@ static bool32 CheckSioErrored(u8 taskId) return FALSE; } -// Unused -static void Task_DelayedBlockRequest(u8 taskId) +static void UNUSED Task_DelayedBlockRequest(u8 taskId) { gTasks[taskId].data[0]++; if (gTasks[taskId].data[0] == 10) @@ -1166,14 +1165,13 @@ void PlayerEnteredTradeSeat(void) CreateTask_EnterCableClubSeat(Task_StartWiredTrade); } -// Unused -static void CreateTask_StartWiredTrade(void) +static void UNUSED CreateTask_StartWiredTrade(void) { CreateTask(Task_StartWiredTrade, 80); } -// Unused, implemented in Ruby/Sapphire -void Script_StartWiredTrade(void) +// Implemented in Ruby/Sapphire +void UNUSED Script_StartWiredTrade(void) { // CreateTask_StartWiredTrade(); // ScriptContext_Stop(); @@ -1189,10 +1187,9 @@ void ColosseumPlayerSpotTriggered(void) CreateTask_EnterCableClubSeat(Task_StartWiredCableClubBattle); } -// Unused -static void CreateTask_EnterCableClubSeatNoFollowup(void) +static UNUSED void CreateTask_EnterCableClubSeatNoFollowup(void) { - u8 taskId = CreateTask(Task_EnterCableClubSeat, 80); + u8 UNUSED taskId = CreateTask(Task_EnterCableClubSeat, 80); ScriptContext_Stop(); } @@ -1262,8 +1259,7 @@ static void Task_WaitExitToScript(u8 taskId) } } -// Unused -static void ExitLinkToScript(u8 taskId) +static void UNUSED ExitLinkToScript(u8 taskId) { SetCloseLinkCallback(); gTasks[taskId].func = Task_WaitExitToScript; diff --git a/src/contest.c b/src/contest.c index 36e76718c7a3..3bfa964560f3 100644 --- a/src/contest.c +++ b/src/contest.c @@ -3245,8 +3245,7 @@ static void DrawMoveEffectSymbol(u16 move, u8 contestant) } } -// Unused -static void DrawMoveEffectSymbols(void) +static void UNUSED DrawMoveEffectSymbols(void) { s32 i; @@ -4215,8 +4214,7 @@ static void SpriteCB_EndBlinkContestantBox(struct Sprite *sprite) ResetBlendForContestantBoxBlink(); } -// Unused. -static void ContestDebugTogglePointTotal(void) +static void UNUSED ContestDebugTogglePointTotal(void) { if(eContestDebugMode == CONTEST_DEBUG_MODE_PRINT_POINT_TOTAL) eContestDebugMode = CONTEST_DEBUG_MODE_OFF; @@ -4870,15 +4868,13 @@ static void Task_ShowAndUpdateApplauseMeter(u8 taskId) } } -// Unused. -static void HideApplauseMeterNoAnim(void) +static void UNUSED HideApplauseMeterNoAnim(void) { gSprites[eContest.applauseMeterSpriteId].x2 = 0; gSprites[eContest.applauseMeterSpriteId].invisible = FALSE; } -// Unused. -static void ShowApplauseMeterNoAnim(void) +static void UNUSED ShowApplauseMeterNoAnim(void) { gSprites[eContest.applauseMeterSpriteId].invisible = TRUE; } diff --git a/src/credits.c b/src/credits.c index ecd6af6fca4b..2b4d919bdcc6 100644 --- a/src/credits.c +++ b/src/credits.c @@ -81,7 +81,7 @@ struct CreditsEntry const u8 *text; }; -static EWRAM_DATA s16 sUnkVar = 0; // Never read, only set to 0 +static EWRAM_DATA s16 UNUSED sUnkVar = 0; // Never read, only set to 0 static EWRAM_DATA u16 sSavedTaskId = 0; EWRAM_DATA bool8 gHasHallOfFameRecords = 0; static EWRAM_DATA bool8 sUsedSpeedUp = 0; // Never read diff --git a/src/data.c b/src/data.c index 859209a9342c..2d16d59d29db 100644 --- a/src/data.c +++ b/src/data.c @@ -17,100 +17,100 @@ static const u32 sMinigameDigitsThin_Gfx[] = INCBIN_U32("graphics/link/minigame_ const struct SpriteFrameImage gBattlerPicTable_PlayerLeft[] = { - BATTLER_OFFSET(0), MON_PIC_SIZE, - BATTLER_OFFSET(1), MON_PIC_SIZE, - BATTLER_OFFSET(2), MON_PIC_SIZE, - BATTLER_OFFSET(3), MON_PIC_SIZE, + {BATTLER_OFFSET(0), MON_PIC_SIZE}, + {BATTLER_OFFSET(1), MON_PIC_SIZE}, + {BATTLER_OFFSET(2), MON_PIC_SIZE}, + {BATTLER_OFFSET(3), MON_PIC_SIZE}, }; const struct SpriteFrameImage gBattlerPicTable_OpponentLeft[] = { - BATTLER_OFFSET(4), MON_PIC_SIZE, - BATTLER_OFFSET(5), MON_PIC_SIZE, - BATTLER_OFFSET(6), MON_PIC_SIZE, - BATTLER_OFFSET(7), MON_PIC_SIZE, + {BATTLER_OFFSET(4), MON_PIC_SIZE}, + {BATTLER_OFFSET(5), MON_PIC_SIZE}, + {BATTLER_OFFSET(6), MON_PIC_SIZE}, + {BATTLER_OFFSET(7), MON_PIC_SIZE}, }; const struct SpriteFrameImage gBattlerPicTable_PlayerRight[] = { - BATTLER_OFFSET(8), MON_PIC_SIZE, - BATTLER_OFFSET(9), MON_PIC_SIZE, - BATTLER_OFFSET(10), MON_PIC_SIZE, - BATTLER_OFFSET(11), MON_PIC_SIZE, + {BATTLER_OFFSET(8), MON_PIC_SIZE}, + {BATTLER_OFFSET(9), MON_PIC_SIZE}, + {BATTLER_OFFSET(10), MON_PIC_SIZE}, + {BATTLER_OFFSET(11), MON_PIC_SIZE}, }; const struct SpriteFrameImage gBattlerPicTable_OpponentRight[] = { - BATTLER_OFFSET(12), MON_PIC_SIZE, - BATTLER_OFFSET(13), MON_PIC_SIZE, - BATTLER_OFFSET(14), MON_PIC_SIZE, - BATTLER_OFFSET(15), MON_PIC_SIZE, + {BATTLER_OFFSET(12), MON_PIC_SIZE}, + {BATTLER_OFFSET(13), MON_PIC_SIZE}, + {BATTLER_OFFSET(14), MON_PIC_SIZE}, + {BATTLER_OFFSET(15), MON_PIC_SIZE}, }; const struct SpriteFrameImage gTrainerBackPicTable_Brendan[] = { - gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, - gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, - gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, - gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, + {gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE}, }; const struct SpriteFrameImage gTrainerBackPicTable_May[] = { - gTrainerBackPic_May + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, - gTrainerBackPic_May + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, - gTrainerBackPic_May + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, - gTrainerBackPic_May + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, + {gTrainerBackPic_May + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE}, + {gTrainerBackPic_May + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE}, + {gTrainerBackPic_May + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE}, + {gTrainerBackPic_May + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE}, }; const struct SpriteFrameImage gTrainerBackPicTable_Red[] = { - gTrainerBackPic_Red + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, - gTrainerBackPic_Red + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, - gTrainerBackPic_Red + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, - gTrainerBackPic_Red + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, - gTrainerBackPic_Red + TRAINER_PIC_SIZE * 4, TRAINER_PIC_SIZE, + {gTrainerBackPic_Red + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Red + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Red + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Red + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Red + TRAINER_PIC_SIZE * 4, TRAINER_PIC_SIZE}, }; const struct SpriteFrameImage gTrainerBackPicTable_Leaf[] = { - gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, - gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, - gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, - gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, - gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 4, TRAINER_PIC_SIZE, + {gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 4, TRAINER_PIC_SIZE}, }; const struct SpriteFrameImage gTrainerBackPicTable_RubySapphireBrendan[] = { - gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, - gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, - gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, - gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, + {gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE}, + {gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE}, + {gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE}, + {gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE}, }; const struct SpriteFrameImage gTrainerBackPicTable_RubySapphireMay[] = { - gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, - gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, - gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, - gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, + {gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE}, + {gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE}, + {gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE}, + {gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE}, }; const struct SpriteFrameImage gTrainerBackPicTable_Wally[] = { - gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, - gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, - gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, - gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, + {gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE}, }; const struct SpriteFrameImage gTrainerBackPicTable_Steven[] = { - gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, - gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, - gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, - gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, + {gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE}, + {gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE}, }; static const union AnimCmd sAnim_GeneralFrame0[] = diff --git a/src/data/credits.h b/src/data/credits.h index 3ae2b1d3bea2..3b92ae26f78f 100644 --- a/src/data/credits.h +++ b/src/data/credits.h @@ -221,565 +221,565 @@ static const u8 sCreditsText_MotoyasuTojima[] = _("Motoyasu Toji static const u8 sCreditsText_NicolaPrattBarlow[] = _("Nicola Pratt-Barlow"); static const u8 sCreditsText_ShellieDow[] = _("Shellie Dow"); static const u8 sCreditsText_ErikJohnson[] = _("Erik Johnson"); -static const struct CreditsEntry sCreditsEntry_EmptyString[] = { 0, FALSE, sCreditsText_EmptyString}; -static const struct CreditsEntry sCreditsEntry_PkmnEmeraldVersion[] = { 7, TRUE, sCreditsText_PkmnEmeraldVersion}; -static const struct CreditsEntry sCreditsEntry_Credits[] = {11, TRUE, sCreditsText_Credits}; -static const struct CreditsEntry sCreditsEntry_ExecutiveDirector[] = { 8, TRUE, sCreditsText_ExecutiveDirector}; -static const struct CreditsEntry sCreditsEntry_Director[] = {12, TRUE, sCreditsText_Director}; -static const struct CreditsEntry sCreditsEntry_ArtDirector[] = {10, TRUE, sCreditsText_ArtDirector}; -static const struct CreditsEntry sCreditsEntry_BattleDirector[] = {10, TRUE, sCreditsText_BattleDirector}; -static const struct CreditsEntry sCreditsEntry_MainProgrammer[] = {10, TRUE, sCreditsText_MainProgrammer}; -static const struct CreditsEntry sCreditsEntry_BattleSystemPgrms[] = { 8, TRUE, sCreditsText_BattleSystemPgrms}; -static const struct CreditsEntry sCreditsEntry_FieldSystemPgrms[] = { 7, TRUE, sCreditsText_FieldSystemPgrms}; -static const struct CreditsEntry sCreditsEntry_Programmers[] = {12, TRUE, sCreditsText_Programmers}; -static const struct CreditsEntry sCreditsEntry_MainGraphicDesigner[] = { 7, TRUE, sCreditsText_MainGraphicDesigner}; -static const struct CreditsEntry sCreditsEntry_GraphicDesigners[] = { 9, TRUE, sCreditsText_GraphicDesigners}; -static const struct CreditsEntry sCreditsEntry_PkmnDesigners[] = {10, TRUE, sCreditsText_PkmnDesigners}; -static const struct CreditsEntry sCreditsEntry_MusicComposition[] = {13, TRUE, sCreditsText_MusicComposition}; -static const struct CreditsEntry sCreditsEntry_SoundEffectsAndPkmnVoices[] = { 4, TRUE, sCreditsText_SoundEffectsAndPkmnVoices}; -static const struct CreditsEntry sCreditsEntry_GameDesigners[] = {11, TRUE, sCreditsText_GameDesigners}; -static const struct CreditsEntry sCreditsEntry_ScenarioPlot[] = {11, TRUE, sCreditsText_ScenarioPlot}; -static const struct CreditsEntry sCreditsEntry_Scenario[] = {13, TRUE, sCreditsText_Scenario}; -static const struct CreditsEntry sCreditsEntry_ScriptDesigners[] = {10, TRUE, sCreditsText_ScriptDesigners}; -static const struct CreditsEntry sCreditsEntry_MapDesigners[] = {11, TRUE, sCreditsText_MapDesigners}; -static const struct CreditsEntry sCreditsEntry_MapDataDesigners[] = { 9, TRUE, sCreditsText_MapDataDesigners}; -static const struct CreditsEntry sCreditsEntry_ParametricDesigners[] = { 9, TRUE, sCreditsText_ParametricDesigners}; -static const struct CreditsEntry sCreditsEntry_PokedexText[] = {11, TRUE, sCreditsText_PokedexText}; -static const struct CreditsEntry sCreditsEntry_EnvAndToolPgrms[] = { 6, TRUE, sCreditsText_EnvAndToolPgrms}; -static const struct CreditsEntry sCreditsEntry_NCLProductTesting[] = {11, TRUE, sCreditsText_NCLProductTesting}; -static const struct CreditsEntry sCreditsEntry_SpecialThanks[] = {10, TRUE, sCreditsText_SpecialThanks}; -static const struct CreditsEntry sCreditsEntry_Coordinators[] = {11, TRUE, sCreditsText_Coordinators}; -static const struct CreditsEntry sCreditsEntry_Producers[] = {11, TRUE, sCreditsText_Producers}; -static const struct CreditsEntry sCreditsEntry_ExecProducers[] = { 7, TRUE, sCreditsText_ExecProducers}; -static const struct CreditsEntry sCreditsEntry_InfoSupervisors[] = {10, TRUE, sCreditsText_InfoSupervisors}; -static const struct CreditsEntry sCreditsEntry_TaskManagers[] = { 8, TRUE, sCreditsText_TaskManagers}; -static const struct CreditsEntry sCreditsEntry_BrailleCodeCheck[] = {10, TRUE, sCreditsText_BrailleCodeCheck}; -static const struct CreditsEntry sCreditsEntry_WorldDirector[] = {10, TRUE, sCreditsText_WorldDirector}; -static const struct CreditsEntry sCreditsEntry_BattleFrontierData[] = { 8, TRUE, sCreditsText_BattleFrontierData}; -static const struct CreditsEntry sCreditsEntry_SupportProgrammers[] = {10, TRUE, sCreditsText_SupportProgrammers}; -static const struct CreditsEntry sCreditsEntry_Artwork[] = {12, TRUE, sCreditsText_Artwork}; -static const struct CreditsEntry sCreditsEntry_LeadProgrammer[] = {10, TRUE, sCreditsText_LeadProgrammer}; -static const struct CreditsEntry sCreditsEntry_LeadGraphicArtist[] = { 9, TRUE, sCreditsText_LeadGraphicArtist}; -static const struct CreditsEntry sCreditsEntry_SatoshiTajiri[] = {11, FALSE, sCreditsText_SatoshiTajiri}; -static const struct CreditsEntry sCreditsEntry_JunichiMasuda[] = {11, FALSE, sCreditsText_JunichiMasuda}; -static const struct CreditsEntry sCreditsEntry_KenSugimori[] = {11, FALSE, sCreditsText_KenSugimori}; -static const struct CreditsEntry sCreditsEntry_ShigekiMorimoto[] = {11, FALSE, sCreditsText_ShigekiMorimoto}; -static const struct CreditsEntry sCreditsEntry_TetsuyaWatanabe[] = {11, FALSE, sCreditsText_TetsuyaWatanabe}; -static const struct CreditsEntry sCreditsEntry_HisashiSogabe[] = {11, FALSE, sCreditsText_HisashiSogabe}; -static const struct CreditsEntry sCreditsEntry_SosukeTamada[] = {11, FALSE, sCreditsText_SosukeTamada}; -static const struct CreditsEntry sCreditsEntry_AkitoMori[] = {11, FALSE, sCreditsText_AkitoMori}; -static const struct CreditsEntry sCreditsEntry_KeitaKagaya[] = {11, FALSE, sCreditsText_KeitaKagaya}; -static const struct CreditsEntry sCreditsEntry_YoshinoriMatsuda[] = {11, FALSE, sCreditsText_YoshinoriMatsuda}; -static const struct CreditsEntry sCreditsEntry_HiroyukiNakamura[] = {11, FALSE, sCreditsText_HiroyukiNakamura}; -static const struct CreditsEntry sCreditsEntry_MasaoTaya[] = {11, FALSE, sCreditsText_MasaoTaya}; -static const struct CreditsEntry sCreditsEntry_SatoshiNohara[] = {11, FALSE, sCreditsText_SatoshiNohara}; -static const struct CreditsEntry sCreditsEntry_TomomichiOhta[] = {11, FALSE, sCreditsText_TomomichiOhta}; -static const struct CreditsEntry sCreditsEntry_MiyukiIwasawa[] = {11, FALSE, sCreditsText_MiyukiIwasawa}; -static const struct CreditsEntry sCreditsEntry_TakenoriOhta[] = {11, FALSE, sCreditsText_TakenoriOhta}; -static const struct CreditsEntry sCreditsEntry_HironobuYoshida[] = {11, FALSE, sCreditsText_HironobuYoshida}; -static const struct CreditsEntry sCreditsEntry_MotofumiFujiwara[] = {11, FALSE, sCreditsText_MotofumiFujiwara}; -static const struct CreditsEntry sCreditsEntry_SatoshiOhta[] = {11, FALSE, sCreditsText_SatoshiOhta}; -static const struct CreditsEntry sCreditsEntry_AsukaIwashita[] = {11, FALSE, sCreditsText_AsukaIwashita}; -static const struct CreditsEntry sCreditsEntry_AimiTomita[] = {11, FALSE, sCreditsText_AimiTomita}; -static const struct CreditsEntry sCreditsEntry_TakaoUnno[] = {11, FALSE, sCreditsText_TakaoUnno}; -static const struct CreditsEntry sCreditsEntry_KanakoEo[] = {11, FALSE, sCreditsText_KanakoEo}; -static const struct CreditsEntry sCreditsEntry_JunOkutani[] = {11, FALSE, sCreditsText_JunOkutani}; -static const struct CreditsEntry sCreditsEntry_AtsukoNishida[] = {11, FALSE, sCreditsText_AtsukoNishida}; -static const struct CreditsEntry sCreditsEntry_MuneoSaito[] = {11, FALSE, sCreditsText_MuneoSaito}; -static const struct CreditsEntry sCreditsEntry_RenaYoshikawa[] = {11, FALSE, sCreditsText_RenaYoshikawa}; -static const struct CreditsEntry sCreditsEntry_GoIchinose[] = {11, FALSE, sCreditsText_GoIchinose}; -static const struct CreditsEntry sCreditsEntry_MorikazuAoki[] = {11, FALSE, sCreditsText_MorikazuAoki}; -static const struct CreditsEntry sCreditsEntry_KojiNishino[] = {11, FALSE, sCreditsText_KojiNishino}; -static const struct CreditsEntry sCreditsEntry_KenjiMatsushima[] = {11, FALSE, sCreditsText_KenjiMatsushima}; -static const struct CreditsEntry sCreditsEntry_TetsujiOhta[] = {11, FALSE, sCreditsText_TetsujiOhta}; -static const struct CreditsEntry sCreditsEntry_HitomiSato[] = {11, FALSE, sCreditsText_HitomiSato}; -static const struct CreditsEntry sCreditsEntry_TakeshiKawachimaru[] = {11, FALSE, sCreditsText_TakeshiKawachimaru}; -static const struct CreditsEntry sCreditsEntry_TeruyukiShimoyamada[] = {11, FALSE, sCreditsText_TeruyukiShimoyamada}; -static const struct CreditsEntry sCreditsEntry_ShigeruOhmori[] = {11, FALSE, sCreditsText_ShigeruOhmori}; -static const struct CreditsEntry sCreditsEntry_TadashiTakahashi[] = {11, FALSE, sCreditsText_TadashiTakahashi}; -static const struct CreditsEntry sCreditsEntry_ToshinobuMatsumiya[] = {11, FALSE, sCreditsText_ToshinobuMatsumiya}; -static const struct CreditsEntry sCreditsEntry_AkihitoTomisawa[] = {11, FALSE, sCreditsText_AkihitoTomisawa}; -static const struct CreditsEntry sCreditsEntry_HirokiEnomoto[] = {11, FALSE, sCreditsText_HirokiEnomoto}; -static const struct CreditsEntry sCreditsEntry_KazuyukiTerada[] = {11, FALSE, sCreditsText_KazuyukiTerada}; -static const struct CreditsEntry sCreditsEntry_YuriSakurai[] = {11, FALSE, sCreditsText_YuriSakurai}; -static const struct CreditsEntry sCreditsEntry_HiromiSagawa[] = {11, FALSE, sCreditsText_HiromiSagawa}; -static const struct CreditsEntry sCreditsEntry_KenjiTominaga[] = {11, FALSE, sCreditsText_KenjiTominaga}; -static const struct CreditsEntry sCreditsEntry_YoshioTajiri[] = {11, FALSE, sCreditsText_YoshioTajiri}; -static const struct CreditsEntry sCreditsEntry_TeikoSasaki[] = {11, FALSE, sCreditsText_TeikoSasaki}; -static const struct CreditsEntry sCreditsEntry_SachikoHamano[] = {11, FALSE, sCreditsText_SachikoHamano}; -static const struct CreditsEntry sCreditsEntry_ChieMatsumiya[] = {11, FALSE, sCreditsText_ChieMatsumiya}; -static const struct CreditsEntry sCreditsEntry_AkikoShinozaki[] = {11, FALSE, sCreditsText_AkikoShinozaki}; -static const struct CreditsEntry sCreditsEntry_AstukoFujii[] = {11, FALSE, sCreditsText_AstukoFujii}; -static const struct CreditsEntry sCreditsEntry_NozomuSaito[] = {11, FALSE, sCreditsText_NozomuSaito}; -static const struct CreditsEntry sCreditsEntry_KenkichiToyama[] = {11, FALSE, sCreditsText_KenkichiToyama}; -static const struct CreditsEntry sCreditsEntry_SuguruNakatsui[] = {11, FALSE, sCreditsText_SuguruNakatsui}; -static const struct CreditsEntry sCreditsEntry_YumiFunasaka[] = {11, FALSE, sCreditsText_YumiFunasaka}; -static const struct CreditsEntry sCreditsEntry_NaokoYanase[] = {11, FALSE, sCreditsText_NaokoYanase}; -static const struct CreditsEntry sCreditsEntry_NCLSuperMarioClub[] = {11, FALSE, sCreditsText_NCLSuperMarioClub}; -static const struct CreditsEntry sCreditsEntry_AtsushiTada[] = {11, FALSE, sCreditsText_AtsushiTada}; -static const struct CreditsEntry sCreditsEntry_TakahiroOhnishi[] = {11, FALSE, sCreditsText_TakahiroOhnishi}; -static const struct CreditsEntry sCreditsEntry_NorihideOkamura[] = {11, FALSE, sCreditsText_NorihideOkamura}; -static const struct CreditsEntry sCreditsEntry_HiroNakamura[] = {11, FALSE, sCreditsText_HiroNakamura}; -static const struct CreditsEntry sCreditsEntry_HiroyukiUesugi[] = {11, FALSE, sCreditsText_HiroyukiUesugi}; -static const struct CreditsEntry sCreditsEntry_TerukiMurakawa[] = {11, FALSE, sCreditsText_TerukiMurakawa}; -static const struct CreditsEntry sCreditsEntry_AkiraKinashi[] = {11, FALSE, sCreditsText_AkiraKinashi}; -static const struct CreditsEntry sCreditsEntry_MichikoTakizawa[] = {11, FALSE, sCreditsText_MichikoTakizawa}; -static const struct CreditsEntry sCreditsEntry_MakikoTakada[] = {11, FALSE, sCreditsText_MakikoTakada}; -static const struct CreditsEntry sCreditsEntry_TakanaoKondo[] = {11, FALSE, sCreditsText_TakanaoKondo}; -static const struct CreditsEntry sCreditsEntry_AiMashima[] = {11, FALSE, sCreditsText_AiMashima}; -static const struct CreditsEntry sCreditsEntry_GakujiNomoto[] = {11, FALSE, sCreditsText_GakujiNomoto}; -static const struct CreditsEntry sCreditsEntry_TakehiroIzushi[] = {11, FALSE, sCreditsText_TakehiroIzushi}; -static const struct CreditsEntry sCreditsEntry_HitoshiYamagami[] = {11, FALSE, sCreditsText_HitoshiYamagami}; -static const struct CreditsEntry sCreditsEntry_KyokoWatanabe[] = {11, FALSE, sCreditsText_KyokoWatanabe}; -static const struct CreditsEntry sCreditsEntry_TakaoNakano[] = {11, FALSE, sCreditsText_TakaoNakano}; -static const struct CreditsEntry sCreditsEntry_HiroyukiJinnai[] = {11, FALSE, sCreditsText_HiroyukiJinnai}; -static const struct CreditsEntry sCreditsEntry_HiroakiTsuru[] = {11, FALSE, sCreditsText_HiroakiTsuru}; -static const struct CreditsEntry sCreditsEntry_TsunekazIshihara[] = {11, FALSE, sCreditsText_TsunekazIshihara}; -static const struct CreditsEntry sCreditsEntry_SatoruIwata[] = {11, FALSE, sCreditsText_SatoruIwata}; -static const struct CreditsEntry sCreditsEntry_KazuyaSuyama[] = {11, FALSE, sCreditsText_KazuyaSuyama}; -static const struct CreditsEntry sCreditsEntry_SatoshiMitsuhara[] = {11, FALSE, sCreditsText_SatoshiMitsuhara}; -static const struct CreditsEntry sCreditsEntry_JapanBrailleLibrary[] = { 9, FALSE, sCreditsText_JapanBrailleLibrary}; -static const struct CreditsEntry sCreditsEntry_TomotakaKomura[] = {11, FALSE, sCreditsText_TomotakaKomura}; -static const struct CreditsEntry sCreditsEntry_MikikoOhhashi[] = {11, FALSE, sCreditsText_MikikoOhhashi}; -static const struct CreditsEntry sCreditsEntry_DaisukeHoshino[] = {11, FALSE, sCreditsText_DaisukeHoshino}; -static const struct CreditsEntry sCreditsEntry_KenjiroIto[] = {11, FALSE, sCreditsText_KenjiroIto}; -static const struct CreditsEntry sCreditsEntry_RuiKawaguchi[] = {11, FALSE, sCreditsText_RuiKawaguchi}; -static const struct CreditsEntry sCreditsEntry_ShunsukeKohori[] = {11, FALSE, sCreditsText_ShunsukeKohori}; -static const struct CreditsEntry sCreditsEntry_SachikoNakamichi[] = {11, FALSE, sCreditsText_SachikoNakamichi}; -static const struct CreditsEntry sCreditsEntry_FujikoNomura[] = {11, FALSE, sCreditsText_FujikoNomura}; -static const struct CreditsEntry sCreditsEntry_KazukiYoshihara[] = {11, FALSE, sCreditsText_KazukiYoshihara}; -static const struct CreditsEntry sCreditsEntry_RetsujiNomoto[] = {11, FALSE, sCreditsText_RetsujiNomoto}; -static const struct CreditsEntry sCreditsEntry_AzusaTajima[] = {11, FALSE, sCreditsText_AzusaTajima}; -static const struct CreditsEntry sCreditsEntry_ShusakuEgami[] = {11, FALSE, sCreditsText_ShusakuEgami}; -static const struct CreditsEntry sCreditsEntry_PackageAndManual[] = { 0, TRUE, sCreditsText_PackageAndManual}; -static const struct CreditsEntry sCreditsEntry_EnglishVersion[] = { 0, TRUE, sCreditsText_EnglishVersion}; -static const struct CreditsEntry sCreditsEntry_Translator[] = { 0, TRUE, sCreditsText_Translator}; -static const struct CreditsEntry sCreditsEntry_TextEditor[] = { 0, TRUE, sCreditsText_TextEditor}; -static const struct CreditsEntry sCreditsEntry_NCLCoordinator[] = { 0, TRUE, sCreditsText_NCLCoordinator}; -static const struct CreditsEntry sCreditsEntry_GraphicDesigner[] = { 0, TRUE, sCreditsText_GraphicDesigner}; -static const struct CreditsEntry sCreditsEntry_NOAProductTesting[] = { 0, TRUE, sCreditsText_NOAProductTesting}; -static const struct CreditsEntry sCreditsEntry_HideyukiNakajima[] = { 0, FALSE, sCreditsText_HideyukiNakajima}; -static const struct CreditsEntry sCreditsEntry_HidenoriSaeki[] = { 0, FALSE, sCreditsText_HidenoriSaeki}; -static const struct CreditsEntry sCreditsEntry_YokoWatanabe[] = { 0, FALSE, sCreditsText_YokoWatanabe}; -static const struct CreditsEntry sCreditsEntry_SakaeKimura[] = { 0, FALSE, sCreditsText_SakaeKimura}; -static const struct CreditsEntry sCreditsEntry_ChiakiShinkai[] = { 0, FALSE, sCreditsText_ChiakiShinkai}; -static const struct CreditsEntry sCreditsEntry_SethMcMahill[] = { 0, FALSE, sCreditsText_SethMcMahill}; -static const struct CreditsEntry sCreditsEntry_NobOgasawara[] = { 0, FALSE, sCreditsText_NobOgasawara}; -static const struct CreditsEntry sCreditsEntry_TeresaLillygren[] = { 0, FALSE, sCreditsText_TeresaLillygren}; -static const struct CreditsEntry sCreditsEntry_KimikoNakamichi[] = { 0, FALSE, sCreditsText_KimikoNakamichi}; -static const struct CreditsEntry sCreditsEntry_SouichiYamamoto[] = { 0, FALSE, sCreditsText_SouichiYamamoto}; -static const struct CreditsEntry sCreditsEntry_YuichiroIto[] = { 0, FALSE, sCreditsText_YuichiroIto}; -static const struct CreditsEntry sCreditsEntry_ThomasHertzog[] = { 0, FALSE, sCreditsText_ThomasHertzog}; -static const struct CreditsEntry sCreditsEntry_MikaKurosawa[] = { 0, FALSE, sCreditsText_MikaKurosawa}; -static const struct CreditsEntry sCreditsEntry_NationalFederationBlind[] = { 0, FALSE, sCreditsText_NationalFederationBlind}; -static const struct CreditsEntry sCreditsEntry_PatriciaAMaurer[] = { 0, FALSE, sCreditsText_PatriciaAMaurer}; -static const struct CreditsEntry sCreditsEntry_EuropeanBlindUnion[] = { 0, FALSE, sCreditsText_EuropeanBlindUnion}; -static const struct CreditsEntry sCreditsEntry_AustralianBrailleAuthority[] = { 0, FALSE, sCreditsText_AustralianBrailleAuthority}; -static const struct CreditsEntry sCreditsEntry_RoyalNewZealandFederationBlind[] = { 0, FALSE, sCreditsText_RoyalNewZealandFederationBlind}; -static const struct CreditsEntry sCreditsEntry_MotoyasuTojima[] = { 0, FALSE, sCreditsText_MotoyasuTojima}; -static const struct CreditsEntry sCreditsEntry_NicolaPrattBarlow[] = { 0, FALSE, sCreditsText_NicolaPrattBarlow}; -static const struct CreditsEntry sCreditsEntry_ShellieDow[] = { 0, FALSE, sCreditsText_ShellieDow}; -static const struct CreditsEntry sCreditsEntry_ErikJohnson[] = { 0, FALSE, sCreditsText_ErikJohnson}; +static const struct CreditsEntry sCreditsEntry_EmptyString = { 0, FALSE, sCreditsText_EmptyString}; +static const struct CreditsEntry sCreditsEntry_PkmnEmeraldVersion = { 7, TRUE, sCreditsText_PkmnEmeraldVersion}; +static const struct CreditsEntry sCreditsEntry_Credits = {11, TRUE, sCreditsText_Credits}; +static const struct CreditsEntry sCreditsEntry_ExecutiveDirector = { 8, TRUE, sCreditsText_ExecutiveDirector}; +static const struct CreditsEntry sCreditsEntry_Director = {12, TRUE, sCreditsText_Director}; +static const struct CreditsEntry sCreditsEntry_ArtDirector = {10, TRUE, sCreditsText_ArtDirector}; +static const struct CreditsEntry sCreditsEntry_BattleDirector = {10, TRUE, sCreditsText_BattleDirector}; +static const struct CreditsEntry sCreditsEntry_MainProgrammer = {10, TRUE, sCreditsText_MainProgrammer}; +static const struct CreditsEntry sCreditsEntry_BattleSystemPgrms = { 8, TRUE, sCreditsText_BattleSystemPgrms}; +static const struct CreditsEntry sCreditsEntry_FieldSystemPgrms = { 7, TRUE, sCreditsText_FieldSystemPgrms}; +static const struct CreditsEntry sCreditsEntry_Programmers = {12, TRUE, sCreditsText_Programmers}; +static const struct CreditsEntry sCreditsEntry_MainGraphicDesigner = { 7, TRUE, sCreditsText_MainGraphicDesigner}; +static const struct CreditsEntry sCreditsEntry_GraphicDesigners = { 9, TRUE, sCreditsText_GraphicDesigners}; +static const struct CreditsEntry sCreditsEntry_PkmnDesigners = {10, TRUE, sCreditsText_PkmnDesigners}; +static const struct CreditsEntry sCreditsEntry_MusicComposition = {13, TRUE, sCreditsText_MusicComposition}; +static const struct CreditsEntry sCreditsEntry_SoundEffectsAndPkmnVoices = { 4, TRUE, sCreditsText_SoundEffectsAndPkmnVoices}; +static const struct CreditsEntry sCreditsEntry_GameDesigners = {11, TRUE, sCreditsText_GameDesigners}; +static const struct CreditsEntry sCreditsEntry_ScenarioPlot = {11, TRUE, sCreditsText_ScenarioPlot}; +static const struct CreditsEntry sCreditsEntry_Scenario = {13, TRUE, sCreditsText_Scenario}; +static const struct CreditsEntry sCreditsEntry_ScriptDesigners = {10, TRUE, sCreditsText_ScriptDesigners}; +static const struct CreditsEntry sCreditsEntry_MapDesigners = {11, TRUE, sCreditsText_MapDesigners}; +static const struct CreditsEntry sCreditsEntry_MapDataDesigners = { 9, TRUE, sCreditsText_MapDataDesigners}; +static const struct CreditsEntry sCreditsEntry_ParametricDesigners = { 9, TRUE, sCreditsText_ParametricDesigners}; +static const struct CreditsEntry sCreditsEntry_PokedexText = {11, TRUE, sCreditsText_PokedexText}; +static const struct CreditsEntry sCreditsEntry_EnvAndToolPgrms = { 6, TRUE, sCreditsText_EnvAndToolPgrms}; +static const struct CreditsEntry sCreditsEntry_NCLProductTesting = {11, TRUE, sCreditsText_NCLProductTesting}; +static const struct CreditsEntry sCreditsEntry_SpecialThanks = {10, TRUE, sCreditsText_SpecialThanks}; +static const struct CreditsEntry sCreditsEntry_Coordinators = {11, TRUE, sCreditsText_Coordinators}; +static const struct CreditsEntry sCreditsEntry_Producers = {11, TRUE, sCreditsText_Producers}; +static const struct CreditsEntry sCreditsEntry_ExecProducers = { 7, TRUE, sCreditsText_ExecProducers}; +static const struct CreditsEntry sCreditsEntry_InfoSupervisors = {10, TRUE, sCreditsText_InfoSupervisors}; +static const struct CreditsEntry sCreditsEntry_TaskManagers = { 8, TRUE, sCreditsText_TaskManagers}; +static const struct CreditsEntry sCreditsEntry_BrailleCodeCheck = {10, TRUE, sCreditsText_BrailleCodeCheck}; +static const struct CreditsEntry sCreditsEntry_WorldDirector = {10, TRUE, sCreditsText_WorldDirector}; +static const struct CreditsEntry sCreditsEntry_BattleFrontierData = { 8, TRUE, sCreditsText_BattleFrontierData}; +static const struct CreditsEntry sCreditsEntry_SupportProgrammers = {10, TRUE, sCreditsText_SupportProgrammers}; +static const struct CreditsEntry sCreditsEntry_Artwork = {12, TRUE, sCreditsText_Artwork}; +static const struct CreditsEntry sCreditsEntry_LeadProgrammer = {10, TRUE, sCreditsText_LeadProgrammer}; +static const struct CreditsEntry sCreditsEntry_LeadGraphicArtist = { 9, TRUE, sCreditsText_LeadGraphicArtist}; +static const struct CreditsEntry sCreditsEntry_SatoshiTajiri = {11, FALSE, sCreditsText_SatoshiTajiri}; +static const struct CreditsEntry sCreditsEntry_JunichiMasuda = {11, FALSE, sCreditsText_JunichiMasuda}; +static const struct CreditsEntry sCreditsEntry_KenSugimori = {11, FALSE, sCreditsText_KenSugimori}; +static const struct CreditsEntry sCreditsEntry_ShigekiMorimoto = {11, FALSE, sCreditsText_ShigekiMorimoto}; +static const struct CreditsEntry sCreditsEntry_TetsuyaWatanabe = {11, FALSE, sCreditsText_TetsuyaWatanabe}; +static const struct CreditsEntry sCreditsEntry_HisashiSogabe = {11, FALSE, sCreditsText_HisashiSogabe}; +static const struct CreditsEntry sCreditsEntry_SosukeTamada = {11, FALSE, sCreditsText_SosukeTamada}; +static const struct CreditsEntry sCreditsEntry_AkitoMori = {11, FALSE, sCreditsText_AkitoMori}; +static const struct CreditsEntry sCreditsEntry_KeitaKagaya = {11, FALSE, sCreditsText_KeitaKagaya}; +static const struct CreditsEntry sCreditsEntry_YoshinoriMatsuda = {11, FALSE, sCreditsText_YoshinoriMatsuda}; +static const struct CreditsEntry sCreditsEntry_HiroyukiNakamura = {11, FALSE, sCreditsText_HiroyukiNakamura}; +static const struct CreditsEntry sCreditsEntry_MasaoTaya = {11, FALSE, sCreditsText_MasaoTaya}; +static const struct CreditsEntry sCreditsEntry_SatoshiNohara = {11, FALSE, sCreditsText_SatoshiNohara}; +static const struct CreditsEntry sCreditsEntry_TomomichiOhta = {11, FALSE, sCreditsText_TomomichiOhta}; +static const struct CreditsEntry sCreditsEntry_MiyukiIwasawa = {11, FALSE, sCreditsText_MiyukiIwasawa}; +static const struct CreditsEntry sCreditsEntry_TakenoriOhta = {11, FALSE, sCreditsText_TakenoriOhta}; +static const struct CreditsEntry sCreditsEntry_HironobuYoshida = {11, FALSE, sCreditsText_HironobuYoshida}; +static const struct CreditsEntry sCreditsEntry_MotofumiFujiwara = {11, FALSE, sCreditsText_MotofumiFujiwara}; +static const struct CreditsEntry sCreditsEntry_SatoshiOhta = {11, FALSE, sCreditsText_SatoshiOhta}; +static const struct CreditsEntry sCreditsEntry_AsukaIwashita = {11, FALSE, sCreditsText_AsukaIwashita}; +static const struct CreditsEntry sCreditsEntry_AimiTomita = {11, FALSE, sCreditsText_AimiTomita}; +static const struct CreditsEntry sCreditsEntry_TakaoUnno = {11, FALSE, sCreditsText_TakaoUnno}; +static const struct CreditsEntry sCreditsEntry_KanakoEo = {11, FALSE, sCreditsText_KanakoEo}; +static const struct CreditsEntry sCreditsEntry_JunOkutani = {11, FALSE, sCreditsText_JunOkutani}; +static const struct CreditsEntry sCreditsEntry_AtsukoNishida = {11, FALSE, sCreditsText_AtsukoNishida}; +static const struct CreditsEntry sCreditsEntry_MuneoSaito = {11, FALSE, sCreditsText_MuneoSaito}; +static const struct CreditsEntry sCreditsEntry_RenaYoshikawa = {11, FALSE, sCreditsText_RenaYoshikawa}; +static const struct CreditsEntry sCreditsEntry_GoIchinose = {11, FALSE, sCreditsText_GoIchinose}; +static const struct CreditsEntry sCreditsEntry_MorikazuAoki = {11, FALSE, sCreditsText_MorikazuAoki}; +static const struct CreditsEntry sCreditsEntry_KojiNishino = {11, FALSE, sCreditsText_KojiNishino}; +static const struct CreditsEntry sCreditsEntry_KenjiMatsushima = {11, FALSE, sCreditsText_KenjiMatsushima}; +static const struct CreditsEntry sCreditsEntry_TetsujiOhta = {11, FALSE, sCreditsText_TetsujiOhta}; +static const struct CreditsEntry sCreditsEntry_HitomiSato = {11, FALSE, sCreditsText_HitomiSato}; +static const struct CreditsEntry sCreditsEntry_TakeshiKawachimaru = {11, FALSE, sCreditsText_TakeshiKawachimaru}; +static const struct CreditsEntry sCreditsEntry_TeruyukiShimoyamada = {11, FALSE, sCreditsText_TeruyukiShimoyamada}; +static const struct CreditsEntry sCreditsEntry_ShigeruOhmori = {11, FALSE, sCreditsText_ShigeruOhmori}; +static const struct CreditsEntry sCreditsEntry_TadashiTakahashi = {11, FALSE, sCreditsText_TadashiTakahashi}; +static const struct CreditsEntry sCreditsEntry_ToshinobuMatsumiya = {11, FALSE, sCreditsText_ToshinobuMatsumiya}; +static const struct CreditsEntry sCreditsEntry_AkihitoTomisawa = {11, FALSE, sCreditsText_AkihitoTomisawa}; +static const struct CreditsEntry sCreditsEntry_HirokiEnomoto = {11, FALSE, sCreditsText_HirokiEnomoto}; +static const struct CreditsEntry sCreditsEntry_KazuyukiTerada = {11, FALSE, sCreditsText_KazuyukiTerada}; +static const struct CreditsEntry sCreditsEntry_YuriSakurai = {11, FALSE, sCreditsText_YuriSakurai}; +static const struct CreditsEntry sCreditsEntry_HiromiSagawa = {11, FALSE, sCreditsText_HiromiSagawa}; +static const struct CreditsEntry sCreditsEntry_KenjiTominaga = {11, FALSE, sCreditsText_KenjiTominaga}; +static const struct CreditsEntry sCreditsEntry_YoshioTajiri = {11, FALSE, sCreditsText_YoshioTajiri}; +static const struct CreditsEntry sCreditsEntry_TeikoSasaki = {11, FALSE, sCreditsText_TeikoSasaki}; +static const struct CreditsEntry sCreditsEntry_SachikoHamano = {11, FALSE, sCreditsText_SachikoHamano}; +static const struct CreditsEntry sCreditsEntry_ChieMatsumiya = {11, FALSE, sCreditsText_ChieMatsumiya}; +static const struct CreditsEntry sCreditsEntry_AkikoShinozaki = {11, FALSE, sCreditsText_AkikoShinozaki}; +static const struct CreditsEntry sCreditsEntry_AstukoFujii = {11, FALSE, sCreditsText_AstukoFujii}; +static const struct CreditsEntry sCreditsEntry_NozomuSaito = {11, FALSE, sCreditsText_NozomuSaito}; +static const struct CreditsEntry sCreditsEntry_KenkichiToyama = {11, FALSE, sCreditsText_KenkichiToyama}; +static const struct CreditsEntry sCreditsEntry_SuguruNakatsui = {11, FALSE, sCreditsText_SuguruNakatsui}; +static const struct CreditsEntry sCreditsEntry_YumiFunasaka = {11, FALSE, sCreditsText_YumiFunasaka}; +static const struct CreditsEntry sCreditsEntry_NaokoYanase = {11, FALSE, sCreditsText_NaokoYanase}; +static const struct CreditsEntry sCreditsEntry_NCLSuperMarioClub = {11, FALSE, sCreditsText_NCLSuperMarioClub}; +static const struct CreditsEntry sCreditsEntry_AtsushiTada = {11, FALSE, sCreditsText_AtsushiTada}; +static const struct CreditsEntry sCreditsEntry_TakahiroOhnishi = {11, FALSE, sCreditsText_TakahiroOhnishi}; +static const struct CreditsEntry sCreditsEntry_NorihideOkamura = {11, FALSE, sCreditsText_NorihideOkamura}; +static const struct CreditsEntry sCreditsEntry_HiroNakamura = {11, FALSE, sCreditsText_HiroNakamura}; +static const struct CreditsEntry sCreditsEntry_HiroyukiUesugi = {11, FALSE, sCreditsText_HiroyukiUesugi}; +static const struct CreditsEntry sCreditsEntry_TerukiMurakawa = {11, FALSE, sCreditsText_TerukiMurakawa}; +static const struct CreditsEntry sCreditsEntry_AkiraKinashi = {11, FALSE, sCreditsText_AkiraKinashi}; +static const struct CreditsEntry sCreditsEntry_MichikoTakizawa = {11, FALSE, sCreditsText_MichikoTakizawa}; +static const struct CreditsEntry sCreditsEntry_MakikoTakada = {11, FALSE, sCreditsText_MakikoTakada}; +static const struct CreditsEntry sCreditsEntry_TakanaoKondo = {11, FALSE, sCreditsText_TakanaoKondo}; +static const struct CreditsEntry sCreditsEntry_AiMashima = {11, FALSE, sCreditsText_AiMashima}; +static const struct CreditsEntry sCreditsEntry_GakujiNomoto = {11, FALSE, sCreditsText_GakujiNomoto}; +static const struct CreditsEntry sCreditsEntry_TakehiroIzushi = {11, FALSE, sCreditsText_TakehiroIzushi}; +static const struct CreditsEntry sCreditsEntry_HitoshiYamagami = {11, FALSE, sCreditsText_HitoshiYamagami}; +static const struct CreditsEntry sCreditsEntry_KyokoWatanabe = {11, FALSE, sCreditsText_KyokoWatanabe}; +static const struct CreditsEntry sCreditsEntry_TakaoNakano = {11, FALSE, sCreditsText_TakaoNakano}; +static const struct CreditsEntry sCreditsEntry_HiroyukiJinnai = {11, FALSE, sCreditsText_HiroyukiJinnai}; +static const struct CreditsEntry sCreditsEntry_HiroakiTsuru = {11, FALSE, sCreditsText_HiroakiTsuru}; +static const struct CreditsEntry sCreditsEntry_TsunekazIshihara = {11, FALSE, sCreditsText_TsunekazIshihara}; +static const struct CreditsEntry sCreditsEntry_SatoruIwata = {11, FALSE, sCreditsText_SatoruIwata}; +static const struct CreditsEntry sCreditsEntry_KazuyaSuyama = {11, FALSE, sCreditsText_KazuyaSuyama}; +static const struct CreditsEntry sCreditsEntry_SatoshiMitsuhara = {11, FALSE, sCreditsText_SatoshiMitsuhara}; +static const struct CreditsEntry sCreditsEntry_JapanBrailleLibrary = { 9, FALSE, sCreditsText_JapanBrailleLibrary}; +static const struct CreditsEntry sCreditsEntry_TomotakaKomura = {11, FALSE, sCreditsText_TomotakaKomura}; +static const struct CreditsEntry sCreditsEntry_MikikoOhhashi = {11, FALSE, sCreditsText_MikikoOhhashi}; +static const struct CreditsEntry sCreditsEntry_DaisukeHoshino = {11, FALSE, sCreditsText_DaisukeHoshino}; +static const struct CreditsEntry sCreditsEntry_KenjiroIto = {11, FALSE, sCreditsText_KenjiroIto}; +static const struct CreditsEntry sCreditsEntry_RuiKawaguchi = {11, FALSE, sCreditsText_RuiKawaguchi}; +static const struct CreditsEntry sCreditsEntry_ShunsukeKohori = {11, FALSE, sCreditsText_ShunsukeKohori}; +static const struct CreditsEntry sCreditsEntry_SachikoNakamichi = {11, FALSE, sCreditsText_SachikoNakamichi}; +static const struct CreditsEntry sCreditsEntry_FujikoNomura = {11, FALSE, sCreditsText_FujikoNomura}; +static const struct CreditsEntry sCreditsEntry_KazukiYoshihara = {11, FALSE, sCreditsText_KazukiYoshihara}; +static const struct CreditsEntry sCreditsEntry_RetsujiNomoto = {11, FALSE, sCreditsText_RetsujiNomoto}; +static const struct CreditsEntry sCreditsEntry_AzusaTajima = {11, FALSE, sCreditsText_AzusaTajima}; +static const struct CreditsEntry sCreditsEntry_ShusakuEgami = {11, FALSE, sCreditsText_ShusakuEgami}; +static const struct CreditsEntry sCreditsEntry_PackageAndManual = { 0, TRUE, sCreditsText_PackageAndManual}; +static const struct CreditsEntry sCreditsEntry_EnglishVersion = { 0, TRUE, sCreditsText_EnglishVersion}; +static const struct CreditsEntry sCreditsEntry_Translator = { 0, TRUE, sCreditsText_Translator}; +static const struct CreditsEntry sCreditsEntry_TextEditor = { 0, TRUE, sCreditsText_TextEditor}; +static const struct CreditsEntry sCreditsEntry_NCLCoordinator = { 0, TRUE, sCreditsText_NCLCoordinator}; +static const struct CreditsEntry sCreditsEntry_GraphicDesigner = { 0, TRUE, sCreditsText_GraphicDesigner}; +static const struct CreditsEntry sCreditsEntry_NOAProductTesting = { 0, TRUE, sCreditsText_NOAProductTesting}; +static const struct CreditsEntry sCreditsEntry_HideyukiNakajima = { 0, FALSE, sCreditsText_HideyukiNakajima}; +static const struct CreditsEntry sCreditsEntry_HidenoriSaeki = { 0, FALSE, sCreditsText_HidenoriSaeki}; +static const struct CreditsEntry sCreditsEntry_YokoWatanabe = { 0, FALSE, sCreditsText_YokoWatanabe}; +static const struct CreditsEntry sCreditsEntry_SakaeKimura = { 0, FALSE, sCreditsText_SakaeKimura}; +static const struct CreditsEntry sCreditsEntry_ChiakiShinkai = { 0, FALSE, sCreditsText_ChiakiShinkai}; +static const struct CreditsEntry sCreditsEntry_SethMcMahill = { 0, FALSE, sCreditsText_SethMcMahill}; +static const struct CreditsEntry sCreditsEntry_NobOgasawara = { 0, FALSE, sCreditsText_NobOgasawara}; +static const struct CreditsEntry sCreditsEntry_TeresaLillygren = { 0, FALSE, sCreditsText_TeresaLillygren}; +static const struct CreditsEntry sCreditsEntry_KimikoNakamichi = { 0, FALSE, sCreditsText_KimikoNakamichi}; +static const struct CreditsEntry sCreditsEntry_SouichiYamamoto = { 0, FALSE, sCreditsText_SouichiYamamoto}; +static const struct CreditsEntry sCreditsEntry_YuichiroIto = { 0, FALSE, sCreditsText_YuichiroIto}; +static const struct CreditsEntry sCreditsEntry_ThomasHertzog = { 0, FALSE, sCreditsText_ThomasHertzog}; +static const struct CreditsEntry sCreditsEntry_MikaKurosawa = { 0, FALSE, sCreditsText_MikaKurosawa}; +static const struct CreditsEntry sCreditsEntry_NationalFederationBlind = { 0, FALSE, sCreditsText_NationalFederationBlind}; +static const struct CreditsEntry sCreditsEntry_PatriciaAMaurer = { 0, FALSE, sCreditsText_PatriciaAMaurer}; +static const struct CreditsEntry sCreditsEntry_EuropeanBlindUnion = { 0, FALSE, sCreditsText_EuropeanBlindUnion}; +static const struct CreditsEntry sCreditsEntry_AustralianBrailleAuthority = { 0, FALSE, sCreditsText_AustralianBrailleAuthority}; +static const struct CreditsEntry sCreditsEntry_RoyalNewZealandFederationBlind = { 0, FALSE, sCreditsText_RoyalNewZealandFederationBlind}; +static const struct CreditsEntry sCreditsEntry_MotoyasuTojima = { 0, FALSE, sCreditsText_MotoyasuTojima}; +static const struct CreditsEntry sCreditsEntry_NicolaPrattBarlow = { 0, FALSE, sCreditsText_NicolaPrattBarlow}; +static const struct CreditsEntry sCreditsEntry_ShellieDow = { 0, FALSE, sCreditsText_ShellieDow}; +static const struct CreditsEntry sCreditsEntry_ErikJohnson = { 0, FALSE, sCreditsText_ErikJohnson}; -#define _ sCreditsEntry_EmptyString +#define _ &sCreditsEntry_EmptyString static const struct CreditsEntry *const sCreditsEntryPointerTable[PAGE_COUNT][ENTRIES_PER_PAGE] = { [PAGE_TITLE] = { _, - sCreditsEntry_PkmnEmeraldVersion, - sCreditsEntry_Credits, + &sCreditsEntry_PkmnEmeraldVersion, + &sCreditsEntry_Credits, _, _ }, [PAGE_DIRECTOR] = { _, - sCreditsEntry_Director, - sCreditsEntry_ShigekiMorimoto, + &sCreditsEntry_Director, + &sCreditsEntry_ShigekiMorimoto, _, _, }, [PAGE_ART_DIRECTOR] = { _, - sCreditsEntry_ArtDirector, - sCreditsEntry_KenSugimori, + &sCreditsEntry_ArtDirector, + &sCreditsEntry_KenSugimori, _, _, }, [PAGE_WORLD_DIRECTOR] = { _, - sCreditsEntry_WorldDirector, - sCreditsEntry_JunichiMasuda, + &sCreditsEntry_WorldDirector, + &sCreditsEntry_JunichiMasuda, _, _, }, [PAGE_LEAD_PROGRAMMER] = { - sCreditsEntry_LeadProgrammer, - sCreditsEntry_HisashiSogabe, - sCreditsEntry_LeadGraphicArtist, - sCreditsEntry_MotofumiFujiwara, + &sCreditsEntry_LeadProgrammer, + &sCreditsEntry_HisashiSogabe, + &sCreditsEntry_LeadGraphicArtist, + &sCreditsEntry_MotofumiFujiwara, _, }, [PAGE_PROGRAMMERS_1] = { - sCreditsEntry_Programmers, - sCreditsEntry_HisashiSogabe, - sCreditsEntry_TomomichiOhta, - sCreditsEntry_NozomuSaito, - sCreditsEntry_EmptyString, + &sCreditsEntry_Programmers, + &sCreditsEntry_HisashiSogabe, + &sCreditsEntry_TomomichiOhta, + &sCreditsEntry_NozomuSaito, + _, }, [PAGE_PROGRAMMERS_2] = { - sCreditsEntry_Programmers, - sCreditsEntry_AkitoMori, - sCreditsEntry_HiroyukiNakamura, - sCreditsEntry_MasaoTaya, + &sCreditsEntry_Programmers, + &sCreditsEntry_AkitoMori, + &sCreditsEntry_HiroyukiNakamura, + &sCreditsEntry_MasaoTaya, _, }, [PAGE_PROGRAMMERS_3] = { - sCreditsEntry_Programmers, - sCreditsEntry_SatoshiNohara, - sCreditsEntry_MiyukiIwasawa, - sCreditsEntry_YoshinoriMatsuda, - sCreditsEntry_KeitaKagaya, + &sCreditsEntry_Programmers, + &sCreditsEntry_SatoshiNohara, + &sCreditsEntry_MiyukiIwasawa, + &sCreditsEntry_YoshinoriMatsuda, + &sCreditsEntry_KeitaKagaya, }, [PAGE_PROGRAMMERS_4] = { - sCreditsEntry_Programmers, - sCreditsEntry_TetsuyaWatanabe, - sCreditsEntry_SosukeTamada, - sCreditsEntry_TakenoriOhta, + &sCreditsEntry_Programmers, + &sCreditsEntry_TetsuyaWatanabe, + &sCreditsEntry_SosukeTamada, + &sCreditsEntry_TakenoriOhta, _, }, [PAGE_GRAPHIC_DESIGNERS_1] = { _, - sCreditsEntry_GraphicDesigners, - sCreditsEntry_MotofumiFujiwara, - sCreditsEntry_SatoshiOhta, + &sCreditsEntry_GraphicDesigners, + &sCreditsEntry_MotofumiFujiwara, + &sCreditsEntry_SatoshiOhta, _, }, [PAGE_GRAPHIC_DESIGNERS_2] = { - sCreditsEntry_GraphicDesigners, - sCreditsEntry_KenkichiToyama, - sCreditsEntry_AsukaIwashita, - sCreditsEntry_TakaoUnno, + &sCreditsEntry_GraphicDesigners, + &sCreditsEntry_KenkichiToyama, + &sCreditsEntry_AsukaIwashita, + &sCreditsEntry_TakaoUnno, _, }, [PAGE_GRAPHIC_DESIGNERS_3] = { - sCreditsEntry_GraphicDesigners, - sCreditsEntry_KenSugimori, - sCreditsEntry_HironobuYoshida, - sCreditsEntry_AimiTomita, - sCreditsEntry_KanakoEo, + &sCreditsEntry_GraphicDesigners, + &sCreditsEntry_KenSugimori, + &sCreditsEntry_HironobuYoshida, + &sCreditsEntry_AimiTomita, + &sCreditsEntry_KanakoEo, }, [PAGE_MUSIC_COMPOSITION] = { - sCreditsEntry_MusicComposition, - sCreditsEntry_GoIchinose, - sCreditsEntry_JunichiMasuda, - sCreditsEntry_MorikazuAoki, - sCreditsEntry_HitomiSato, + &sCreditsEntry_MusicComposition, + &sCreditsEntry_GoIchinose, + &sCreditsEntry_JunichiMasuda, + &sCreditsEntry_MorikazuAoki, + &sCreditsEntry_HitomiSato, }, [PAGE_SOUND_EFFECTS] = { _, - sCreditsEntry_SoundEffectsAndPkmnVoices, - sCreditsEntry_GoIchinose, - sCreditsEntry_MorikazuAoki, + &sCreditsEntry_SoundEffectsAndPkmnVoices, + &sCreditsEntry_GoIchinose, + &sCreditsEntry_MorikazuAoki, _, }, [PAGE_GAME_DESIGNERS_1] = { - sCreditsEntry_GameDesigners, - sCreditsEntry_ShigekiMorimoto, - sCreditsEntry_TeruyukiShimoyamada, - sCreditsEntry_TakeshiKawachimaru, - sCreditsEntry_AkihitoTomisawa, + &sCreditsEntry_GameDesigners, + &sCreditsEntry_ShigekiMorimoto, + &sCreditsEntry_TeruyukiShimoyamada, + &sCreditsEntry_TakeshiKawachimaru, + &sCreditsEntry_AkihitoTomisawa, }, [PAGE_GAME_DESIGNERS_2] = { - sCreditsEntry_GameDesigners, - sCreditsEntry_SuguruNakatsui, - sCreditsEntry_TetsujiOhta, - sCreditsEntry_HitomiSato, - sCreditsEntry_KenjiMatsushima, + &sCreditsEntry_GameDesigners, + &sCreditsEntry_SuguruNakatsui, + &sCreditsEntry_TetsujiOhta, + &sCreditsEntry_HitomiSato, + &sCreditsEntry_KenjiMatsushima, }, [PAGE_GAME_DESIGNERS_3] = { - sCreditsEntry_GameDesigners, - sCreditsEntry_JunichiMasuda, - sCreditsEntry_KojiNishino, - sCreditsEntry_ShigeruOhmori, - sCreditsEntry_TadashiTakahashi, + &sCreditsEntry_GameDesigners, + &sCreditsEntry_JunichiMasuda, + &sCreditsEntry_KojiNishino, + &sCreditsEntry_ShigeruOhmori, + &sCreditsEntry_TadashiTakahashi, }, [PAGE_SCENARIO_PLOT] = { - sCreditsEntry_ScenarioPlot, - sCreditsEntry_AkihitoTomisawa, - sCreditsEntry_JunichiMasuda, - sCreditsEntry_KojiNishino, + &sCreditsEntry_ScenarioPlot, + &sCreditsEntry_AkihitoTomisawa, + &sCreditsEntry_JunichiMasuda, + &sCreditsEntry_KojiNishino, _, }, [PAGE_SCENARIO] = { - sCreditsEntry_Scenario, - sCreditsEntry_AkihitoTomisawa, - sCreditsEntry_HitomiSato, - sCreditsEntry_ToshinobuMatsumiya, + &sCreditsEntry_Scenario, + &sCreditsEntry_AkihitoTomisawa, + &sCreditsEntry_HitomiSato, + &sCreditsEntry_ToshinobuMatsumiya, _, }, [PAGE_SCRIPT_DESIGNERS] = { - sCreditsEntry_ScriptDesigners, - sCreditsEntry_TomomichiOhta, - sCreditsEntry_SatoshiNohara, + &sCreditsEntry_ScriptDesigners, + &sCreditsEntry_TomomichiOhta, + &sCreditsEntry_SatoshiNohara, _, _, }, [PAGE_MAP_DESIGNERS] = { - sCreditsEntry_MapDesigners, - sCreditsEntry_SuguruNakatsui, - sCreditsEntry_TeruyukiShimoyamada, - sCreditsEntry_ShigeruOhmori, - sCreditsEntry_TetsujiOhta, + &sCreditsEntry_MapDesigners, + &sCreditsEntry_SuguruNakatsui, + &sCreditsEntry_TeruyukiShimoyamada, + &sCreditsEntry_ShigeruOhmori, + &sCreditsEntry_TetsujiOhta, }, [PAGE_BATTLE_FRONTIER_DATA] = { _, - sCreditsEntry_BattleFrontierData, - sCreditsEntry_TetsujiOhta, + &sCreditsEntry_BattleFrontierData, + &sCreditsEntry_TetsujiOhta, _, _, }, [PAGE_PARAMETRIC_DESIGNERS] = { - sCreditsEntry_ParametricDesigners, - sCreditsEntry_TeruyukiShimoyamada, - sCreditsEntry_ShigekiMorimoto, - sCreditsEntry_TetsujiOhta, - sCreditsEntry_KojiNishino, + &sCreditsEntry_ParametricDesigners, + &sCreditsEntry_TeruyukiShimoyamada, + &sCreditsEntry_ShigekiMorimoto, + &sCreditsEntry_TetsujiOhta, + &sCreditsEntry_KojiNishino, }, [PAGE_POKEDEX_TEXT] = { _, - sCreditsEntry_PokedexText, - sCreditsEntry_KenjiMatsushima, + &sCreditsEntry_PokedexText, + &sCreditsEntry_KenjiMatsushima, _, _, }, [PAGE_ENVIRONMENT_AND_TOOL_PROGRAMS_1] = { - sCreditsEntry_EnvAndToolPgrms, - sCreditsEntry_HisashiSogabe, - sCreditsEntry_SosukeTamada, - sCreditsEntry_HiroyukiNakamura, - sCreditsEntry_AkitoMori, + &sCreditsEntry_EnvAndToolPgrms, + &sCreditsEntry_HisashiSogabe, + &sCreditsEntry_SosukeTamada, + &sCreditsEntry_HiroyukiNakamura, + &sCreditsEntry_AkitoMori, }, [PAGE_PKMN_DESIGNERS_1] = { - sCreditsEntry_PkmnDesigners, - sCreditsEntry_KenSugimori, - sCreditsEntry_MotofumiFujiwara, - sCreditsEntry_ShigekiMorimoto, + &sCreditsEntry_PkmnDesigners, + &sCreditsEntry_KenSugimori, + &sCreditsEntry_MotofumiFujiwara, + &sCreditsEntry_ShigekiMorimoto, _, }, [PAGE_PKMN_DESIGNERS_2] = { - sCreditsEntry_PkmnDesigners, - sCreditsEntry_HironobuYoshida, - sCreditsEntry_SatoshiOhta, - sCreditsEntry_AsukaIwashita, + &sCreditsEntry_PkmnDesigners, + &sCreditsEntry_HironobuYoshida, + &sCreditsEntry_SatoshiOhta, + &sCreditsEntry_AsukaIwashita, _, }, [PAGE_PKMN_DESIGNERS_3] = { - sCreditsEntry_PkmnDesigners, - sCreditsEntry_TakaoUnno, - sCreditsEntry_KanakoEo, - sCreditsEntry_AimiTomita, + &sCreditsEntry_PkmnDesigners, + &sCreditsEntry_TakaoUnno, + &sCreditsEntry_KanakoEo, + &sCreditsEntry_AimiTomita, _, }, [PAGE_PKMN_DESIGNERS_4] = { - sCreditsEntry_PkmnDesigners, - sCreditsEntry_AtsukoNishida, - sCreditsEntry_MuneoSaito, - sCreditsEntry_RenaYoshikawa, - sCreditsEntry_JunOkutani, + &sCreditsEntry_PkmnDesigners, + &sCreditsEntry_AtsukoNishida, + &sCreditsEntry_MuneoSaito, + &sCreditsEntry_RenaYoshikawa, + &sCreditsEntry_JunOkutani, }, [PAGE_SUPPORT_PROGRAMMERS] = { _, - sCreditsEntry_SupportProgrammers, - sCreditsEntry_SatoshiMitsuhara, - sCreditsEntry_DaisukeHoshino, + &sCreditsEntry_SupportProgrammers, + &sCreditsEntry_SatoshiMitsuhara, + &sCreditsEntry_DaisukeHoshino, _, }, [PAGE_NCL_PRODUCT_TESTING] = { _, - sCreditsEntry_NCLProductTesting, - sCreditsEntry_NCLSuperMarioClub, + &sCreditsEntry_NCLProductTesting, + &sCreditsEntry_NCLSuperMarioClub, _, _, }, [PAGE_PACKAGE_AND_MANUAL] = { _, - sCreditsEntry_PackageAndManual, - sCreditsEntry_KenSugimori, + &sCreditsEntry_PackageAndManual, + &sCreditsEntry_KenSugimori, _, _, }, [PAGE_SPECIAL_THANKS_1] = { _, - sCreditsEntry_SpecialThanks, - sCreditsEntry_KenjiTominaga, - sCreditsEntry_HirokiEnomoto, + &sCreditsEntry_SpecialThanks, + &sCreditsEntry_KenjiTominaga, + &sCreditsEntry_HirokiEnomoto, _, }, [PAGE_SPECIAL_THANKS_2] = { - sCreditsEntry_SpecialThanks, - sCreditsEntry_KazuyaSuyama, - sCreditsEntry_KenjiroIto, - sCreditsEntry_MichikoTakizawa, - sCreditsEntry_MakikoTakada, + &sCreditsEntry_SpecialThanks, + &sCreditsEntry_KazuyaSuyama, + &sCreditsEntry_KenjiroIto, + &sCreditsEntry_MichikoTakizawa, + &sCreditsEntry_MakikoTakada, }, [PAGE_SPECIAL_THANKS_3] = { - sCreditsEntry_SpecialThanks, - sCreditsEntry_MikikoOhhashi, - sCreditsEntry_TakanaoKondo, - sCreditsEntry_RuiKawaguchi, + &sCreditsEntry_SpecialThanks, + &sCreditsEntry_MikikoOhhashi, + &sCreditsEntry_TakanaoKondo, + &sCreditsEntry_RuiKawaguchi, _, }, [PAGE_SPECIAL_THANKS_4] = { - sCreditsEntry_SpecialThanks, - sCreditsEntry_TakahiroOhnishi, - sCreditsEntry_NorihideOkamura, - sCreditsEntry_ShunsukeKohori, + &sCreditsEntry_SpecialThanks, + &sCreditsEntry_TakahiroOhnishi, + &sCreditsEntry_NorihideOkamura, + &sCreditsEntry_ShunsukeKohori, _, }, [PAGE_INFORMATION_SUPERVISORS] = { - sCreditsEntry_InfoSupervisors, - sCreditsEntry_KazuyukiTerada, - sCreditsEntry_YuriSakurai, - sCreditsEntry_YumiFunasaka, - sCreditsEntry_NaokoYanase, + &sCreditsEntry_InfoSupervisors, + &sCreditsEntry_KazuyukiTerada, + &sCreditsEntry_YuriSakurai, + &sCreditsEntry_YumiFunasaka, + &sCreditsEntry_NaokoYanase, }, [PAGE_ARTWORK_1] = { _, - sCreditsEntry_Artwork, - sCreditsEntry_SachikoNakamichi, - sCreditsEntry_FujikoNomura, + &sCreditsEntry_Artwork, + &sCreditsEntry_SachikoNakamichi, + &sCreditsEntry_FujikoNomura, _, }, [PAGE_ARTWORK_2] = { _, - sCreditsEntry_Artwork, - sCreditsEntry_HideyukiNakajima, - sCreditsEntry_HidenoriSaeki, + &sCreditsEntry_Artwork, + &sCreditsEntry_HideyukiNakajima, + &sCreditsEntry_HidenoriSaeki, _, }, [PAGE_ARTWORK_3] = { - sCreditsEntry_Artwork, - sCreditsEntry_YokoWatanabe, - sCreditsEntry_SakaeKimura, - sCreditsEntry_ChiakiShinkai, + &sCreditsEntry_Artwork, + &sCreditsEntry_YokoWatanabe, + &sCreditsEntry_SakaeKimura, + &sCreditsEntry_ChiakiShinkai, _, }, [PAGE_COORDINATORS] = { - sCreditsEntry_Coordinators, - sCreditsEntry_KazukiYoshihara, - sCreditsEntry_AkiraKinashi, - sCreditsEntry_RetsujiNomoto, + &sCreditsEntry_Coordinators, + &sCreditsEntry_KazukiYoshihara, + &sCreditsEntry_AkiraKinashi, + &sCreditsEntry_RetsujiNomoto, _, }, [PAGE_ENGLISH_VERSION] = { _, - sCreditsEntry_EnglishVersion, - sCreditsEntry_HiroNakamura, - sCreditsEntry_SethMcMahill, + &sCreditsEntry_EnglishVersion, + &sCreditsEntry_HiroNakamura, + &sCreditsEntry_SethMcMahill, _, }, [PAGE_TRANSLATOR] = { _, - sCreditsEntry_Translator, - sCreditsEntry_NobOgasawara, + &sCreditsEntry_Translator, + &sCreditsEntry_NobOgasawara, _, _, }, [PAGE_TEXT_EDITOR] = { _, - sCreditsEntry_TextEditor, - sCreditsEntry_TeresaLillygren, + &sCreditsEntry_TextEditor, + &sCreditsEntry_TeresaLillygren, _, _, }, [PAGE_NCL_COORDINATOR] = { _, - sCreditsEntry_NCLCoordinator, - sCreditsEntry_KimikoNakamichi, + &sCreditsEntry_NCLCoordinator, + &sCreditsEntry_KimikoNakamichi, _, _, }, [PAGE_PROGRAMMERS_5] = { - sCreditsEntry_Programmers, - sCreditsEntry_TerukiMurakawa, - sCreditsEntry_SouichiYamamoto, - sCreditsEntry_YuichiroIto, - sCreditsEntry_AkiraKinashi, + &sCreditsEntry_Programmers, + &sCreditsEntry_TerukiMurakawa, + &sCreditsEntry_SouichiYamamoto, + &sCreditsEntry_YuichiroIto, + &sCreditsEntry_AkiraKinashi, }, [PAGE_GRAPHIC_DESIGNER] = { _, - sCreditsEntry_GraphicDesigner, - sCreditsEntry_AkiraKinashi, + &sCreditsEntry_GraphicDesigner, + &sCreditsEntry_AkiraKinashi, _, _, }, [PAGE_ENVIRONMENT_AND_TOOL_PROGRAMS_2] = { - sCreditsEntry_EnvAndToolPgrms, - sCreditsEntry_TerukiMurakawa, - sCreditsEntry_SouichiYamamoto, - sCreditsEntry_KimikoNakamichi, + &sCreditsEntry_EnvAndToolPgrms, + &sCreditsEntry_TerukiMurakawa, + &sCreditsEntry_SouichiYamamoto, + &sCreditsEntry_KimikoNakamichi, _, }, [PAGE_NOA_TESTING] = { - sCreditsEntry_NOAProductTesting, - sCreditsEntry_ThomasHertzog, - sCreditsEntry_ErikJohnson, - sCreditsEntry_MikaKurosawa, + &sCreditsEntry_NOAProductTesting, + &sCreditsEntry_ThomasHertzog, + &sCreditsEntry_ErikJohnson, + &sCreditsEntry_MikaKurosawa, _, }, [PAGE_BRAILLE_CODE_CHECK_1] = { - sCreditsEntry_BrailleCodeCheck, - sCreditsEntry_NationalFederationBlind, - sCreditsEntry_PatriciaAMaurer, - sCreditsEntry_JapanBrailleLibrary, - sCreditsEntry_EuropeanBlindUnion, + &sCreditsEntry_BrailleCodeCheck, + &sCreditsEntry_NationalFederationBlind, + &sCreditsEntry_PatriciaAMaurer, + &sCreditsEntry_JapanBrailleLibrary, + &sCreditsEntry_EuropeanBlindUnion, }, [PAGE_BRAILLE_CODE_CHECK_2] = { _, - sCreditsEntry_BrailleCodeCheck, - sCreditsEntry_AustralianBrailleAuthority, - sCreditsEntry_RoyalNewZealandFederationBlind, + &sCreditsEntry_BrailleCodeCheck, + &sCreditsEntry_AustralianBrailleAuthority, + &sCreditsEntry_RoyalNewZealandFederationBlind, _, }, [PAGE_SPECIAL_THANKS_5] = { - sCreditsEntry_SpecialThanks, - sCreditsEntry_HiroyukiUesugi, - sCreditsEntry_MotoyasuTojima, - sCreditsEntry_NicolaPrattBarlow, - sCreditsEntry_ShellieDow, + &sCreditsEntry_SpecialThanks, + &sCreditsEntry_HiroyukiUesugi, + &sCreditsEntry_MotoyasuTojima, + &sCreditsEntry_NicolaPrattBarlow, + &sCreditsEntry_ShellieDow, }, [PAGE_TASK_MANAGERS] = { _, - sCreditsEntry_TaskManagers, - sCreditsEntry_AzusaTajima, - sCreditsEntry_ShusakuEgami, + &sCreditsEntry_TaskManagers, + &sCreditsEntry_AzusaTajima, + &sCreditsEntry_ShusakuEgami, _, }, [PAGE_PRODUCERS] = { - sCreditsEntry_Producers, - sCreditsEntry_HiroyukiJinnai, - sCreditsEntry_HitoshiYamagami, - sCreditsEntry_GakujiNomoto, - sCreditsEntry_HiroakiTsuru, + &sCreditsEntry_Producers, + &sCreditsEntry_HiroyukiJinnai, + &sCreditsEntry_HitoshiYamagami, + &sCreditsEntry_GakujiNomoto, + &sCreditsEntry_HiroakiTsuru, }, [PAGE_EXECUTIVE_DIRECTOR] = { _, - sCreditsEntry_ExecutiveDirector, - sCreditsEntry_SatoshiTajiri, + &sCreditsEntry_ExecutiveDirector, + &sCreditsEntry_SatoshiTajiri, _, _, }, [PAGE_EXECUTIVE_PRODUCERS_1] = { _, - sCreditsEntry_ExecProducers, - sCreditsEntry_SatoruIwata, + &sCreditsEntry_ExecProducers, + &sCreditsEntry_SatoruIwata, _, _, }, [PAGE_EXECUTIVE_PRODUCERS_2] = { _, - sCreditsEntry_ExecProducers, - sCreditsEntry_TsunekazIshihara, + &sCreditsEntry_ExecProducers, + &sCreditsEntry_TsunekazIshihara, _, _, }, diff --git a/src/data/pointillism_points.h b/src/data/pointillism_points.h index 708f5c02e646..9d19d13140e6 100644 --- a/src/data/pointillism_points.h +++ b/src/data/pointillism_points.h @@ -2,7 +2,7 @@ #define GET_POINT_COLOR_TYPE(bits) (((bits) >> 1) & 3) #define GET_POINT_DELTA(bits) (((bits) >> 3) & 7) -#define PT(x, y, delta, colorType, offsetDownLeft) x, y, (delta << 3) | (colorType << 1) | offsetDownLeft +#define PT(x, y, delta, colorType, offsetDownLeft) {x, y, (delta << 3) | (colorType << 1) | offsetDownLeft} static const u8 sPointillismPoints[][3] = { PT( 0, 29, 3, 2, FALSE), diff --git a/src/data/trade.h b/src/data/trade.h index ef7e9231de5e..ba49f4b8743c 100644 --- a/src/data/trade.h +++ b/src/data/trade.h @@ -372,8 +372,8 @@ static const u8 *const sActionTexts[] = static const struct MenuAction sSelectTradeMonActions[] = { - {sText_Summary2, Task_DrawSelectionSummary}, - {sText_Trade2, Task_DrawSelectionTrade} + {sText_Summary2, {Task_DrawSelectionSummary}}, + {sText_Trade2, {Task_DrawSelectionTrade}} }; static const u8 *const sMessages[] = diff --git a/src/daycare.c b/src/daycare.c index 6078135fd73a..4659d74d383c 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -401,7 +401,7 @@ void GetDaycareCost(void) gSpecialVar_0x8005 = GetDaycareCostForMon(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004); } -static void Debug_AddDaycareSteps(u16 numSteps) +static void UNUSED Debug_AddDaycareSteps(u16 numSteps) { gSaveBlock1Ptr->daycare.mons[0].steps += numSteps; gSaveBlock1Ptr->daycare.mons[1].steps += numSteps; @@ -434,7 +434,7 @@ static void ClearDaycareMon(struct DaycareMon *daycareMon) ClearDaycareMonMail(&daycareMon->mail); } -static void ClearAllDaycareData(struct DayCare *daycare) +static void UNUSED ClearAllDaycareData(struct DayCare *daycare) { u8 i; @@ -554,8 +554,7 @@ void TriggerPendingDaycareEgg(void) _TriggerPendingDaycareEgg(&gSaveBlock1Ptr->daycare); } -// Unused -static void TriggerPendingDaycareMaleEgg(void) +static void UNUSED TriggerPendingDaycareMaleEgg(void) { _TriggerPendingDaycareMaleEgg(&gSaveBlock1Ptr->daycare); } @@ -1202,7 +1201,7 @@ u8 GetDaycareState(void) return DAYCARE_NO_MONS; } -static u8 GetDaycarePokemonCount(void) +static u8 UNUSED GetDaycarePokemonCount(void) { u8 ret = CountPokemonInDaycare(&gSaveBlock1Ptr->daycare); if (ret) @@ -1358,7 +1357,7 @@ static u8 *AppendMonGenderSymbol(u8 *name, struct BoxPokemon *boxMon) return AppendGenderSymbol(name, GetBoxMonGender(boxMon)); } -static void GetDaycareLevelMenuText(struct DayCare *daycare, u8 *dest) +static void UNUSED GetDaycareLevelMenuText(struct DayCare *daycare, u8 *dest) { u8 monNames[DAYCARE_MON_COUNT][POKEMON_NAME_BUFFER_SIZE]; u8 i; @@ -1377,7 +1376,7 @@ static void GetDaycareLevelMenuText(struct DayCare *daycare, u8 *dest) StringAppend(dest, gText_Exit4); } -static void GetDaycareLevelMenuLevelText(struct DayCare *daycare, u8 *dest) +static void UNUSED GetDaycareLevelMenuLevelText(struct DayCare *daycare, u8 *dest) { u8 i; u8 level; diff --git a/src/decompress.c b/src/decompress.c index b4de99efc34e..82d5c6fdb864 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -121,7 +121,7 @@ void Unused_LZDecompressWramIndirect(const void **src, void *dest) LZ77UnCompWram(*src, dest); } -static void StitchObjectsOn8x8Canvas(s32 object_size, s32 object_count, u8 *src_tiles, u8 *dest_tiles) +static void UNUSED StitchObjectsOn8x8Canvas(s32 object_size, s32 object_count, u8 *src_tiles, u8 *dest_tiles) { /* This function appears to emulate behaviour found in the GB(C) versions regarding how the Pokemon images diff --git a/src/decoration.c b/src/decoration.c index 688018b2db17..f4fae6cc5e97 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -113,7 +113,7 @@ EWRAM_DATA static u16 sDecorationsCursorPos = 0; EWRAM_DATA static u16 sDecorationsScrollOffset = 0; EWRAM_DATA u8 gCurDecorationIndex = 0; EWRAM_DATA static u8 sCurDecorationCategory = DECORCAT_DESK; -EWRAM_DATA static u32 sFiller[2] = {}; +EWRAM_DATA static u32 UNUSED sFiller[2] = {}; EWRAM_DATA static struct DecorationPCContext sDecorationContext = {}; EWRAM_DATA static u8 sDecorMenuWindowIds[WINDOW_COUNT] = {}; EWRAM_DATA static struct DecorationItemsMenu *sDecorationItemsMenu = NULL; diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 1ba82c6d21a1..1b4500002c71 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -2834,9 +2834,8 @@ static void GetScoreResults(struct DodrioGame_ScoreResults *dst, u8 playerId) *dst = sGame->scoreResults[playerId]; } -// Unused // Returns where the specified player's score ranks, 0 being first (highest score) -static u8 GetScoreRanking(u8 playerId) +static u8 UNUSED GetScoreRanking(u8 playerId) { u8 i, ranking = 0; u8 numPlayers = sGame->numPlayers; @@ -3068,12 +3067,12 @@ static const u8 *const sDebug_PlayerNames[] = sText_Digits }; -static void Debug_UpdateNumPlayers(void) +static void UNUSED Debug_UpdateNumPlayers(void) { sGame->numPlayers = GetLinkPlayerCount(); } -static void Debug_SetPlayerNamesAndResults(void) +static void UNUSED Debug_SetPlayerNamesAndResults(void) { u8 i, playerId; @@ -4253,8 +4252,7 @@ static void SetBerryAnim(u16 id, u8 animNum) StartSpriteAnim(&gSprites[*sBerrySpriteIds[id]], animNum); } -// Unused -static void UnusedSetSpritePos(u8 spriteId) +static void UNUSED UnusedSetSpritePos(u8 spriteId) { gSprites[spriteId].x = 20 * spriteId + 50; gSprites[spriteId].y = 50; @@ -4486,8 +4484,7 @@ static void InitGameGfx(struct DodrioGame_Gfx *ptr) SetGfxFunc(LoadGfx); } -// Unused -static void FreeAllWindowBuffers_(void) +static void UNUSED FreeAllWindowBuffers_(void) { FreeAllWindowBuffers(); } diff --git a/src/easy_chat.c b/src/easy_chat.c index 5ba83f72572d..db5bbba8a82c 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -2758,7 +2758,7 @@ static void GetEasyChatConfirmDeletionText(const u8 **str1, const u8 **str2) *str2 = gText_BeDeletedThatOkay; } -static void GetKeyboardCursorColAndRow(u8 *column, u8 *row) +static void GetKeyboardCursorColAndRow(s8 *column, s8 *row) { *column = sEasyChatScreen->keyboardColumn; *row = sEasyChatScreen->keyboardRow; @@ -2774,7 +2774,7 @@ static u8 GetKeyboardScrollOffset(void) return sEasyChatScreen->keyboardScrollOffset; } -static void GetWordSelectColAndRow(u8 *column, u8 *row) +static void GetWordSelectColAndRow(s8 *column, s8 *row) { *column = sEasyChatScreen->wordSelectColumn; *row = sEasyChatScreen->wordSelectRow; @@ -2790,7 +2790,7 @@ static u8 GetWordSelectLastRow(void) return sEasyChatScreen->wordSelectLastRow; } -static u8 UnusedDummy(void) +static u8 UNUSED UnusedDummy(void) { return FALSE; } @@ -5264,7 +5264,7 @@ u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows return dest; } -static u8 *UnusedConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows) +static u8 UNUSED *UnusedConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows) { u16 i, j, k; u16 numColumns; @@ -5503,8 +5503,7 @@ u16 UnlockRandomTrendySaying(void) return EC_EMPTY_WORD; } -// Unused -static u16 GetRandomUnlockedTrendySaying(void) +static u16 UNUSED GetRandomUnlockedTrendySaying(void) { u16 i; u16 n = GetNumTrendySayingsUnlocked(); @@ -5650,8 +5649,7 @@ static u8 GetUnlockedEasyChatGroupId(u8 index) return sWordData->unlockedGroupIds[index]; } -// Unused -static u8 *BufferEasyChatWordGroupName(u8 *dest, u8 groupId, u16 totalChars) +static u8 UNUSED *BufferEasyChatWordGroupName(u8 *dest, u8 groupId, u16 totalChars) { u16 i; u8 *str = StringCopy(dest, sEasyChatGroupNamePointers[groupId]); diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 7ceaa161ed71..7efc86fb190a 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -778,7 +778,7 @@ static void SpriteCB_Egg_Shake3(struct Sprite *sprite) { if (++sprite->sTimer > 38) { - u16 species; + u16 UNUSED species; sprite->callback = SpriteCB_Egg_WaitHatch; sprite->sTimer = 0; species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyId], MON_DATA_SPECIES); diff --git a/src/event_object_movement.c b/src/event_object_movement.c index f75597a9f780..ae643b661f92 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -2008,8 +2008,7 @@ static void LoadObjectEventPalette(u16 paletteTag) LoadSpritePaletteIfTagExists(&sObjectEventSpritePalettes[i]); } -// Unused -static void LoadObjectEventPaletteSet(u16 *paletteTags) +static void UNUSED LoadObjectEventPaletteSet(u16 *paletteTags) { u8 i; @@ -2091,8 +2090,7 @@ static void _PatchObjectPalette(u16 tag, u8 slot) PatchObjectPalette(tag, slot); } -// Unused -static void IncrementObjectEventCoords(struct ObjectEvent *objectEvent, s16 x, s16 y) +static void UNUSED IncrementObjectEventCoords(struct ObjectEvent *objectEvent, s16 x, s16 y) { objectEvent->previousCoords.x = objectEvent->currentCoords.x; objectEvent->previousCoords.y = objectEvent->currentCoords.y; @@ -2291,8 +2289,7 @@ void CameraObjectSetFollowedSpriteId(u8 spriteId) } } -// Unused -static u8 CameraObjectGetFollowedSpriteId(void) +static u8 UNUSED CameraObjectGetFollowedSpriteId(void) { struct Sprite *camera; @@ -2389,8 +2386,7 @@ static u16 GetObjectEventFlagIdByObjectEventId(u8 objectEventId) return GetObjectEventFlagIdByLocalIdAndMap(gObjectEvents[objectEventId].localId, gObjectEvents[objectEventId].mapNum, gObjectEvents[objectEventId].mapGroup); } -// Unused -static u8 GetObjectTrainerTypeByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) +static u8 UNUSED GetObjectTrainerTypeByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) { u8 objectEventId; @@ -2400,8 +2396,7 @@ static u8 GetObjectTrainerTypeByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup return gObjectEvents[objectEventId].trainerType; } -// Unused -static u8 GetObjectTrainerTypeByObjectEventId(u8 objectEventId) +static u8 UNUSED GetObjectTrainerTypeByObjectEventId(u8 objectEventId) { return gObjectEvents[objectEventId].trainerType; } @@ -4770,8 +4765,7 @@ void MoveCoords(u8 direction, s16 *x, s16 *y) *y += sDirectionToVectors[direction].y; } -// Unused -static void MoveCoordsInMapCoordIncrement(u8 direction, s16 *x, s16 *y) +static void UNUSED MoveCoordsInMapCoordIncrement(u8 direction, s16 *x, s16 *y) { *x += sDirectionToVectors[direction].x << 4; *y += sDirectionToVectors[direction].y << 4; @@ -7915,10 +7909,10 @@ static void DoTracksGroundEffect_BikeTireTracks(struct ObjectEvent *objEvent, st // each byte in that row is for the next direction of the bike in the order // of down, up, left, right. static const u8 bikeTireTracks_Transitions[4][4] = { - 1, 2, 7, 8, - 1, 2, 6, 5, - 5, 8, 3, 4, - 6, 7, 3, 4, + {1, 2, 7, 8}, + {1, 2, 6, 5}, + {5, 8, 3, 4}, + {6, 7, 3, 4}, }; if (objEvent->currentCoords.x != objEvent->previousCoords.x || objEvent->currentCoords.y != objEvent->previousCoords.y) @@ -8587,8 +8581,7 @@ static void SpriteCB_VirtualObject(struct Sprite *sprite) UpdateObjectEventSpriteInvisibility(sprite, sprite->sInvisible); } -// Unused -static void DestroyVirtualObjects(void) +static void UNUSED DestroyVirtualObjects(void) { int i; diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 4d33983a9e16..05fb636fbeca 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -1645,8 +1645,7 @@ static void StartBgAnimation(bool8 isLink) CreateBgAnimTask(isLink); } -// Unused -static void PauseBgPaletteAnim(void) +static void UNUSED PauseBgPaletteAnim(void) { u8 taskId = FindTaskIdByFunc(Task_UpdateBgPalette); diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index a1575ba00e61..7af1912454c1 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -627,8 +627,7 @@ static bool8 TryStartStepCountScript(u16 metatileBehavior) return FALSE; } -// Unused -static void ClearFriendshipStepCounter(void) +static void UNUSED ClearFriendshipStepCounter(void) { VarSet(VAR_FRIENDSHIP_STEP_COUNTER, 0); } diff --git a/src/field_door.c b/src/field_door.c index 756d0dabf1d2..255233ec2346 100644 --- a/src/field_door.c +++ b/src/field_door.c @@ -408,7 +408,7 @@ static bool32 AnimateDoorFrame(struct DoorGraphics *gfx, struct DoorAnimFrame *f static void Task_AnimateDoor(u8 taskId) { - u16 *data = gTasks[taskId].data; + u16 *data = (u16*) gTasks[taskId].data; struct DoorAnimFrame *frames = (struct DoorAnimFrame *)(tFramesHi << 16 | tFramesLo); struct DoorGraphics *gfx = (struct DoorGraphics *)(tGfxHi << 16 | tGfxLo); @@ -502,8 +502,8 @@ static s8 GetDoorSoundType(const struct DoorGraphics *gfx, u32 x, u32 y) return gfx->sound; } -// Unused. Debug? Same as FieldAnimateDoorOpen but doesnt return or check if metatile is actually a door -static void Debug_FieldAnimateDoorOpen(u32 x, u32 y) +// Debug? Same as FieldAnimateDoorOpen but doesnt return or check if metatile is actually a door +static void UNUSED Debug_FieldAnimateDoorOpen(u32 x, u32 y) { StartDoorOpenAnimation(sDoorAnimGraphicsTable, x, y); } diff --git a/src/field_effect.c b/src/field_effect.c index 5b00f5340cd6..cfb502155038 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -900,8 +900,7 @@ u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buf return CreateSprite(&spriteTemplate, x, y, subpriority); } -// Unused -static void LoadTrainerGfx_TrainerCard(u8 gender, u16 palOffset, u8 *dest) +static void UNUSED LoadTrainerGfx_TrainerCard(u8 gender, u16 palOffset, u8 *dest) { LZDecompressVram(gTrainerFrontPicTable[gender].data, dest); LoadCompressedPalette(gTrainerFrontPicPaletteTable[gender].data, palOffset, PLTT_SIZE_4BPP); @@ -2610,7 +2609,7 @@ static void FieldMoveShowMonOutdoorsEffect_Init(struct Task *task) { task->data[11] = REG_WININ; task->data[12] = REG_WINOUT; - StoreWordInTwoHalfwords(&task->data[13], (u32)gMain.vblankCallback); + StoreWordInTwoHalfwords((u16*) &task->data[13], (u32)gMain.vblankCallback); task->tWinHoriz = WIN_RANGE(DISPLAY_WIDTH, DISPLAY_WIDTH + 1); task->tWinVert = WIN_RANGE(DISPLAY_HEIGHT / 2, DISPLAY_HEIGHT / 2 + 1); task->tWinIn = WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR; diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index 9421aaf27aca..386c3c76b27b 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -1658,7 +1658,7 @@ static void UpdateGrassFieldEffectSubpriority(struct Sprite *sprite, u8 elevatio { u8 i; s16 var, xhi, lyhi, yhi, ylo; - const struct ObjectEventGraphicsInfo *graphicsInfo; // Unused Variable + const struct ObjectEventGraphicsInfo UNUSED *graphicsInfo; struct Sprite *linkedSprite; SetObjectSubpriorityByElevation(elevation, sprite, subpriority); diff --git a/src/field_message_box.c b/src/field_message_box.c index 64734cc2092e..55124e7dfc0d 100755 --- a/src/field_message_box.c +++ b/src/field_message_box.c @@ -97,8 +97,7 @@ bool8 ShowFieldAutoScrollMessage(const u8 *str) return TRUE; } -// Unused -static bool8 ForceShowFieldAutoScrollMessage(const u8 *str) +static bool8 UNUSED ForceShowFieldAutoScrollMessage(const u8 *str) { sFieldMessageBoxMode = FIELD_MESSAGE_BOX_AUTO_SCROLL; ExpandStringAndStartDrawFieldMessage(str, TRUE); @@ -148,8 +147,7 @@ bool8 IsFieldMessageBoxHidden(void) return FALSE; } -// Unused -static void ReplaceFieldMessageWithFrame(void) +static void UNUSED ReplaceFieldMessageWithFrame(void) { DestroyTask_DrawFieldMessage(); DrawStdWindowFrame(0, TRUE); diff --git a/src/field_tasks.c b/src/field_tasks.c index 8683301f2651..a9d11b2d70b0 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -172,7 +172,7 @@ static void Task_RunTimeBasedEvents(u8 taskId) if (!ArePlayerFieldControlsLocked()) { RunTimeBasedEvents(data); - UpdateAmbientCry(&tAmbientCryState, &tAmbientCryDelay); + UpdateAmbientCry(&tAmbientCryState, (u16*) &tAmbientCryDelay); } } diff --git a/src/field_weather.c b/src/field_weather.c index 045c234acde4..80f32a14caab 100644 --- a/src/field_weather.c +++ b/src/field_weather.c @@ -856,8 +856,7 @@ void ApplyWeatherColorMapToPal(u8 paletteIndex) ApplyColorMap(paletteIndex, 1, gWeatherPtr->colorMapIndex); } -// Unused -static bool8 IsFirstFrameOfWeatherFadeIn(void) +static bool8 UNUSED IsFirstFrameOfWeatherFadeIn(void) { if (gWeatherPtr->palProcessingState == WEATHER_PAL_STATE_SCREEN_FADING_IN) return gWeatherPtr->fadeInFirstFrame; @@ -998,8 +997,8 @@ bool8 Weather_UpdateBlend(void) return FALSE; } -// Unused. Uses the same numbering scheme as the coord events -static void SetFieldWeather(u8 weather) +// Uses the same numbering scheme as the coord events +static void UNUSED SetFieldWeather(u8 weather) { switch (weather) { diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c index 3340334039c8..55a4450f124d 100644 --- a/src/field_weather_effect.c +++ b/src/field_weather_effect.c @@ -2407,8 +2407,7 @@ static void UpdateBubbleSprite(struct Sprite *sprite) //------------------------------------------------------------------------------ -// Unused function. -static void UnusedSetCurrentAbnormalWeather(u32 weather, u32 unknown) +static void UNUSED UnusedSetCurrentAbnormalWeather(u32 weather, u32 unknown) { sCurrentAbnormalWeather = weather; sUnusedWeatherRelated = unknown; diff --git a/src/fieldmap.c b/src/fieldmap.c index 0ece73c5c3f5..4f94b0ad22a0 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -29,7 +29,7 @@ EWRAM_DATA static u16 ALIGNED(4) sBackupMapData[MAX_MAP_DATA_SIZE] = {0}; EWRAM_DATA struct MapHeader gMapHeader = {0}; EWRAM_DATA struct Camera gCamera = {0}; EWRAM_DATA static struct ConnectionFlags sMapConnectionFlags = {0}; -EWRAM_DATA static u32 sFiller = 0; // without this, the next file won't align properly +EWRAM_DATA static u32 UNUSED sFiller = 0; // without this, the next file won't align properly struct BackupMapLayout gBackupMapLayout; @@ -810,8 +810,7 @@ void GetCameraFocusCoords(u16 *x, u16 *y) *y = gSaveBlock1Ptr->pos.y + MAP_OFFSET; } -// Unused -static void SetCameraCoords(u16 x, u16 y) +static void UNUSED SetCameraCoords(u16 x, u16 y) { gSaveBlock1Ptr->pos.x = x; gSaveBlock1Ptr->pos.y = y; @@ -877,7 +876,7 @@ static void ApplyGlobalTintToPaletteEntries(u16 offset, u16 size) } -static void ApplyGlobalTintToPaletteSlot(u8 slot, u8 count) +static void UNUSED ApplyGlobalTintToPaletteSlot(u8 slot, u8 count) { } diff --git a/src/fldeff_escalator.c b/src/fldeff_escalator.c index 0dc98c319c2a..eabbd535497b 100644 --- a/src/fldeff_escalator.c +++ b/src/fldeff_escalator.c @@ -14,43 +14,43 @@ static void Task_DrawEscalator(u8 taskId); #define ESCALATOR_STAGES 3 #define LAST_ESCALATOR_STAGE (ESCALATOR_STAGES - 1) -static const u16 sEscalatorMetatiles_1F_0[ESCALATOR_STAGES] = { +static const s16 sEscalatorMetatiles_1F_0[ESCALATOR_STAGES] = { METATILE_PokemonCenter_Escalator1F_Tile0_Frame2, METATILE_PokemonCenter_Escalator1F_Tile0_Frame1, METATILE_PokemonCenter_Escalator1F_Tile0_Frame0 }; -static const u16 sEscalatorMetatiles_1F_1[ESCALATOR_STAGES] = { +static const s16 sEscalatorMetatiles_1F_1[ESCALATOR_STAGES] = { METATILE_PokemonCenter_Escalator1F_Tile1_Frame2, METATILE_PokemonCenter_Escalator1F_Tile1_Frame1, METATILE_PokemonCenter_Escalator1F_Tile1_Frame0 }; -static const u16 sEscalatorMetatiles_1F_2[ESCALATOR_STAGES] = { +static const s16 sEscalatorMetatiles_1F_2[ESCALATOR_STAGES] = { METATILE_PokemonCenter_Escalator1F_Tile2_Frame2, METATILE_PokemonCenter_Escalator1F_Tile2_Frame1, METATILE_PokemonCenter_Escalator1F_Tile2_Frame0 }; -static const u16 sEscalatorMetatiles_1F_3[ESCALATOR_STAGES] = { +static const s16 sEscalatorMetatiles_1F_3[ESCALATOR_STAGES] = { METATILE_PokemonCenter_Escalator1F_Tile3_Frame2, METATILE_PokemonCenter_Escalator1F_Tile3_Frame1, METATILE_PokemonCenter_Escalator1F_Tile3_Frame0 }; -static const u16 sEscalatorMetatiles_2F_0[ESCALATOR_STAGES] = { +static const s16 sEscalatorMetatiles_2F_0[ESCALATOR_STAGES] = { METATILE_PokemonCenter_Escalator2F_Tile0_Frame0, METATILE_PokemonCenter_Escalator2F_Tile0_Frame1, METATILE_PokemonCenter_Escalator2F_Tile0_Frame2 }; -static const u16 sEscalatorMetatiles_2F_1[ESCALATOR_STAGES] = { +static const s16 sEscalatorMetatiles_2F_1[ESCALATOR_STAGES] = { METATILE_PokemonCenter_Escalator2F_Tile1_Frame0, METATILE_PokemonCenter_Escalator2F_Tile1_Frame1, METATILE_PokemonCenter_Escalator2F_Tile1_Frame2 }; -static const u16 sEscalatorMetatiles_2F_2[ESCALATOR_STAGES] = { +static const s16 sEscalatorMetatiles_2F_2[ESCALATOR_STAGES] = { METATILE_PokemonCenter_Escalator2F_Tile2_Frame0, METATILE_PokemonCenter_Escalator2F_Tile2_Frame1, METATILE_PokemonCenter_Escalator2F_Tile2_Frame2 diff --git a/src/graphics.c b/src/graphics.c index 40c5d131b4d8..0549e4476bd5 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -2008,7 +2008,7 @@ const u16 gTitleScreenPressStartPal[] = INCBIN_U16("graphics/title_screen/p const u32 gTitleScreenPressStartGfx[] = INCBIN_U32("graphics/title_screen/press_start.4bpp.lz"); const u32 gTitleScreenPokemonLogoTilemap[] = INCBIN_U32("graphics/title_screen/pokemon_logo.bin.lz"); -const u16 gFrontierPassBg_Pal[][16] = INCBIN_U16("graphics/frontier_pass/bg.gbapal"); +const u16 gFrontierPassBg_Pal[] = INCBIN_U16("graphics/frontier_pass/bg.gbapal"); // 8 x 16 const u32 gFrontierPassBg_Gfx[] = INCBIN_U32("graphics/frontier_pass/bg.4bpp.lz"); const u32 gFrontierPassMapAndCard_Gfx[] = INCBIN_U32("graphics/frontier_pass/map_and_card.8bpp.lz"); const u32 gFrontierPassBg_Tilemap[] = INCBIN_U32("graphics/frontier_pass/bg.bin.lz"); diff --git a/src/intro.c b/src/intro.c index 8b5ca5bd4262..e575f4e0faa5 100644 --- a/src/intro.c +++ b/src/intro.c @@ -169,7 +169,7 @@ extern const struct SpriteTemplate gAncientPowerRockSpriteTemplate[]; #define TIMER_START_LEGENDARIES 43 static EWRAM_DATA u16 sIntroCharacterGender = 0; -static EWRAM_DATA u16 sUnusedVar = 0; +static EWRAM_DATA u16 UNUSED sUnusedVar = 0; static EWRAM_DATA u16 sFlygonYOffset = 0; u32 gIntroFrameCounter; @@ -178,7 +178,7 @@ struct GcmbStruct gMultibootProgramStruct; static const u16 sIntroDrops_Pal[] = INCBIN_U16("graphics/intro/scene_1/drops.gbapal"); static const u16 sIntroLogo_Pal[] = INCBIN_U16("graphics/intro/scene_1/logo.gbapal"); static const u32 sIntroDropsLogo_Gfx[] = INCBIN_U32("graphics/intro/scene_1/drops_logo.4bpp.lz"); -static const u16 sIntro1Bg_Pal[16][16] = INCBIN_U16("graphics/intro/scene_1/bg.gbapal"); +static const u16 sIntro1Bg_Pal[] = INCBIN_U16("graphics/intro/scene_1/bg.gbapal"); // 16 x 16 static const u32 sIntro1Bg0_Tilemap[] = INCBIN_U32("graphics/intro/scene_1/bg0_map.bin.lz"); static const u32 sIntro1Bg1_Tilemap[] = INCBIN_U32("graphics/intro/scene_1/bg1_map.bin.lz"); static const u32 sIntro1Bg2_Tilemap[] = INCBIN_U32("graphics/intro/scene_1/bg2_map.bin.lz"); diff --git a/src/intro_credits_graphics.c b/src/intro_credits_graphics.c index 05b5a3a0507a..c4b059fdd78b 100644 --- a/src/intro_credits_graphics.c +++ b/src/intro_credits_graphics.c @@ -1148,7 +1148,7 @@ static void SpriteCB_FlygonRightHalf(struct Sprite *sprite) } // In RS these were for Latios/Latias. In Emerald both are replaced with Flygon and now only 1 is used -static u8 CreateIntroFlygonSprite_Unused(s16 x, s16 y) +static u8 UNUSED CreateIntroFlygonSprite_Unused(s16 x, s16 y) { u8 leftSpriteId = CreateSprite(&sSpriteTemplate_FlygonLatios, x - 32, y, 5); u8 rightSpriteId = CreateSprite(&sSpriteTemplate_FlygonLatios, x + 32, y, 6); diff --git a/src/item_menu.c b/src/item_menu.c index 92c1773e7e42..2248e2836fc5 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -109,7 +109,7 @@ struct ListBuffer1 { }; struct ListBuffer2 { - s8 name[MAX_POCKET_ITEMS][ITEM_NAME_LENGTH + 10]; + u8 name[MAX_POCKET_ITEMS][ITEM_NAME_LENGTH + 10]; }; struct TempWallyBag { @@ -138,7 +138,7 @@ static void PrepareTMHMMoveWindow(void); static bool8 IsWallysBag(void); static void Task_WallyTutorialBagMenu(u8); static void Task_BagMenu_HandleInput(u8); -static void GetItemName(s8 *, u16); +static void GetItemName(u8 *, u16); static void PrintItemDescription(int); static void BagMenu_PrintCursorAtPos(u8, u8); static void BagMenu_Print(u8, u8, const u8 *, u8, u8, u8, u8, u8, u8); @@ -265,21 +265,21 @@ static const struct ListMenuTemplate sItemListMenu = }; static const struct MenuAction sItemMenuActions[] = { - [ACTION_USE] = {gMenuText_Use, ItemMenu_UseOutOfBattle}, - [ACTION_TOSS] = {gMenuText_Toss, ItemMenu_Toss}, - [ACTION_REGISTER] = {gMenuText_Register, ItemMenu_Register}, - [ACTION_GIVE] = {gMenuText_Give, ItemMenu_Give}, - [ACTION_CANCEL] = {gText_Cancel2, ItemMenu_Cancel}, - [ACTION_BATTLE_USE] = {gMenuText_Use, ItemMenu_UseInBattle}, - [ACTION_CHECK] = {gMenuText_Check, ItemMenu_UseOutOfBattle}, - [ACTION_WALK] = {gMenuText_Walk, ItemMenu_UseOutOfBattle}, - [ACTION_DESELECT] = {gMenuText_Deselect, ItemMenu_Register}, - [ACTION_CHECK_TAG] = {gMenuText_CheckTag, ItemMenu_CheckTag}, - [ACTION_CONFIRM] = {gMenuText_Confirm, Task_FadeAndCloseBagMenu}, - [ACTION_SHOW] = {gMenuText_Show, ItemMenu_Show}, - [ACTION_GIVE_FAVOR_LADY] = {gMenuText_Give2, ItemMenu_GiveFavorLady}, - [ACTION_CONFIRM_QUIZ_LADY] = {gMenuText_Confirm, ItemMenu_ConfirmQuizLady}, - [ACTION_DUMMY] = {gText_EmptyString2, NULL} + [ACTION_USE] = {gMenuText_Use, {ItemMenu_UseOutOfBattle}}, + [ACTION_TOSS] = {gMenuText_Toss, {ItemMenu_Toss}}, + [ACTION_REGISTER] = {gMenuText_Register, {ItemMenu_Register}}, + [ACTION_GIVE] = {gMenuText_Give, {ItemMenu_Give}}, + [ACTION_CANCEL] = {gText_Cancel2, {ItemMenu_Cancel}}, + [ACTION_BATTLE_USE] = {gMenuText_Use, {ItemMenu_UseInBattle}}, + [ACTION_CHECK] = {gMenuText_Check, {ItemMenu_UseOutOfBattle}}, + [ACTION_WALK] = {gMenuText_Walk, {ItemMenu_UseOutOfBattle}}, + [ACTION_DESELECT] = {gMenuText_Deselect, {ItemMenu_Register}}, + [ACTION_CHECK_TAG] = {gMenuText_CheckTag, {ItemMenu_CheckTag}}, + [ACTION_CONFIRM] = {gMenuText_Confirm, {Task_FadeAndCloseBagMenu}}, + [ACTION_SHOW] = {gMenuText_Show, {ItemMenu_Show}}, + [ACTION_GIVE_FAVOR_LADY] = {gMenuText_Give2, {ItemMenu_GiveFavorLady}}, + [ACTION_CONFIRM_QUIZ_LADY] = {gMenuText_Confirm, {ItemMenu_ConfirmQuizLady}}, + [ACTION_DUMMY] = {gText_EmptyString2, {NULL}} }; // these are all 2D arrays with a width of 2 but are represented as 1D arrays @@ -894,7 +894,7 @@ static void LoadBagItemListBuffers(u8 pocketId) gMultiuseListMenuTemplate.maxShowed = gBagMenu->numShownItems[pocketId]; } -static void GetItemName(s8 *dest, u16 itemId) +static void GetItemName(u8 *dest, u16 itemId) { switch (gBagPosition.pocket) { @@ -2473,8 +2473,7 @@ static void BagMenu_Print(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top AddTextPrinterParameterized4(windowId, fontId, left, top, letterSpacing, lineSpacing, sFontColorTable[colorIndex], speed, str); } -// Unused -static u8 BagMenu_GetWindowId(u8 windowType) +static u8 UNUSED BagMenu_GetWindowId(u8 windowType) { return gBagMenu->windowIds[windowType]; } diff --git a/src/item_use.c b/src/item_use.c index b3b5c066a499..eb3565fec63c 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -758,7 +758,7 @@ static void ItemUseOnFieldCB_WailmerPailBerry(u8 taskId) static bool8 TryToWaterSudowoodo(void) { - u16 x, y; + s16 x, y; u8 elevation; u8 objId; GetXYCoordsOneStepInFrontOfPlayer(&x, &y); diff --git a/src/librfu_rfu.c b/src/librfu_rfu.c index da37b8fc112d..828d6450bc1b 100644 --- a/src/librfu_rfu.c +++ b/src/librfu_rfu.c @@ -1400,7 +1400,11 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize, { u8 bm_slot_id, sendSlotFlag; u8 frameSize; +#ifdef UBFIX + u8 *llFrameSize_p = NULL; +#else u8 *llFrameSize_p; +#endif u8 sending; u8 i; u16 imeBak; @@ -1426,7 +1430,11 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize, else if (gRfuLinkStatus->parentChild == MODE_CHILD) llFrameSize_p = &gRfuLinkStatus->remainLLFrameSizeChild[bm_slot_id]; frameSize = llsf_struct[gRfuLinkStatus->parentChild].frameSize; +#ifdef UBFIX + if ((llFrameSize_p && subFrameSize > *llFrameSize_p) || subFrameSize <= frameSize) +#else if (subFrameSize > *llFrameSize_p || subFrameSize <= frameSize) +#endif return ERR_SUBFRAME_SIZE; imeBak = REG_IME; REG_IME = 0; @@ -1464,7 +1472,10 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize, } while (0); } gRfuLinkStatus->sendSlotNIFlag |= bmSendSlot; - *llFrameSize_p -= subFrameSize; +#ifdef UBFIX + if (llFrameSize_p) +#endif + *llFrameSize_p -= subFrameSize; slotStatus_NI->send.state = SLOT_STATE_SEND_START; } else if (ni_or_uni & 0x10) @@ -1473,7 +1484,10 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize, slotStatus_UNI->send.bmSlot = bmSendSlot; slotStatus_UNI->send.src = src; slotStatus_UNI->send.payloadSize = subFrameSize - frameSize; - *llFrameSize_p -= subFrameSize; +#ifdef UBFIX + if (llFrameSize_p) +#endif + *llFrameSize_p -= subFrameSize; slotStatus_UNI->send.state = SLOT_STATE_SEND_UNI; gRfuLinkStatus->sendSlotUNIFlag |= bmSendSlot; } diff --git a/src/link.c b/src/link.c index c51abc952604..f784a36c679a 100644 --- a/src/link.c +++ b/src/link.c @@ -278,8 +278,7 @@ static void InitLinkTestBG(u8 paletteNum, u8 bgNum, u8 screenBaseBlock, u8 charB SetGpuReg(REG_OFFSET_BG0VOFS + bgNum * 4, 0); } -// Unused -static void LoadLinkTestBgGfx(u8 paletteNum, u8 bgNum, u8 screenBaseBlock, u8 charBaseBlock) +static void UNUSED LoadLinkTestBgGfx(u8 paletteNum, u8 bgNum, u8 screenBaseBlock, u8 charBaseBlock) { LoadPalette(sLinkTestDigitsPal, BG_PLTT_ID(paletteNum), PLTT_SIZE_4BPP); DmaCopy16(3, sLinkTestDigitsGfx, (u16 *)BG_CHAR_ADDR(charBaseBlock), sizeof sLinkTestDigitsGfx); @@ -289,8 +288,7 @@ static void LoadLinkTestBgGfx(u8 paletteNum, u8 bgNum, u8 screenBaseBlock, u8 ch SetGpuReg(sBGControlRegs[bgNum], BGCNT_SCREENBASE(screenBaseBlock) | BGCNT_CHARBASE(charBaseBlock)); } -// Unused -static void LinkTestScreen(void) +static void UNUSED LinkTestScreen(void) { int i; @@ -779,8 +777,7 @@ u32 LinkDummy_Return2(void) return 2; } -// Unused -static bool32 IsFullLinkGroupWithNoRS(void) +static bool32 UNUSED IsFullLinkGroupWithNoRS(void) { if (GetLinkPlayerCount() != MAX_LINK_PLAYERS || AreAnyLinkPlayersUsingVersions(VERSION_RUBY, VERSION_SAPPHIRE) < 0) { @@ -1012,14 +1009,12 @@ void SetBerryBlenderLinkCallback(void) gLinkCallback = LinkCB_BerryBlenderSendHeldKeys; } -// Unused -static u32 GetBerryBlenderKeySendAttempts(void) +static u32 UNUSED GetBerryBlenderKeySendAttempts(void) { return gBerryBlenderKeySendAttempts; } -// Unused -static void SendBerryBlenderNoSpaceForPokeblocks(void) +static void UNUSED SendBerryBlenderNoSpaceForPokeblocks(void) { BuildSendCmd(LINKCMD_BLENDER_NO_PBLOCK_SPACE); } @@ -1165,7 +1160,7 @@ static void LinkTest_PrintHex(u32 num, u8 x, u8 y, u8 length) } } -static void LinkTest_PrintInt(int num, u8 x, u8 y, u8 length) +static void UNUSED LinkTest_PrintInt(int num, u8 x, u8 y, u8 length) { char buff[16]; int negX; @@ -1297,8 +1292,7 @@ u8 GetSavedPlayerCount(void) return gSavedLinkPlayerCount; } -// Unused -static u8 GetSavedMultiplayerId(void) +static u8 UNUSED GetSavedMultiplayerId(void) { return gSavedMultiplayerId; } @@ -1335,13 +1329,13 @@ bool8 DoesLinkPlayerCountMatchSaved(void) void ClearSavedLinkPlayers(void) { - int i; // The CpuSet loop below is incorrectly writing to NULL // instead of sSavedLinkPlayers. // Additionally it's using the wrong array size. #ifdef UBFIX memset(sSavedLinkPlayers, 0, sizeof(sSavedLinkPlayers)); #else + int i; for (i = 0; i < MAX_LINK_PLAYERS; i++) CpuSet(&sSavedLinkPlayers[i], NULL, sizeof(struct LinkPlayer)); #endif @@ -1382,8 +1376,7 @@ bool8 IsLinkMaster(void) return EXTRACT_MASTER(gLinkStatus); } -// Unused -static u8 GetDummy2(void) +static u8 UNUSED GetDummy2(void) { return sDummy2; } diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index 6c84ffefe008..9979097a49a9 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -699,8 +699,7 @@ void StopUnionRoomLinkManager(void) gRfu.state = RFUSTATE_UR_STOP_MANAGER; } -// Unused -static void ReadySendDataForSlots(u8 slots) +static void UNUSED ReadySendDataForSlots(u8 slots) { u8 i; @@ -2146,7 +2145,7 @@ void RfuSetErrorParams(u32 errorInfo) } } -static void ResetErrorState(void) +static void UNUSED ResetErrorState(void) { gRfu.errorState = RFU_ERROR_STATE_NONE; } @@ -2560,8 +2559,7 @@ static void VBlank_RfuIdle(void) TransferPlttBuffer(); } -// Unused -static void Debug_RfuIdle(void) +static void UNUSED Debug_RfuIdle(void) { s32 i; @@ -2934,7 +2932,7 @@ static void Debug_PrintEmpty(void) Debug_PrintString(sASCII_30Spaces, 0, i); } -static void Debug_PrintStatus(void) +static void UNUSED Debug_PrintStatus(void) { s32 i, j; Debug_PrintNum(GetBlockReceivedStatus(), 28, 19, 2); @@ -2990,7 +2988,7 @@ static void Debug_PrintStatus(void) } } -static u32 GetRfuSendQueueLength(void) +static u32 UNUSED GetRfuSendQueueLength(void) { return gRfu.sendQueue.count; } diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index 1936d3741ba5..1f3f895c21e1 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -342,7 +342,7 @@ void RfuSendQueue_Reset(struct RfuSendQueue *queue) queue->full = FALSE; } -static void RfuUnusedQueue_Reset(struct RfuUnusedQueue *queue) +static void UNUSED RfuUnusedQueue_Reset(struct RfuUnusedQueue *queue) { s32 i; s32 j; @@ -514,7 +514,7 @@ bool8 RfuBackupQueue_Dequeue(struct RfuBackupQueue *queue, u8 *src) return TRUE; } -static void RfuUnusedQueue_Enqueue(struct RfuUnusedQueue *queue, u8 *data) +static void UNUSED RfuUnusedQueue_Enqueue(struct RfuUnusedQueue *queue, u8 *data) { s32 i; @@ -533,7 +533,7 @@ static void RfuUnusedQueue_Enqueue(struct RfuUnusedQueue *queue, u8 *data) } } -static bool8 RfuUnusedQueue_Dequeue(struct RfuUnusedQueue *queue, u8 *dest) +static bool8 UNUSED RfuUnusedQueue_Dequeue(struct RfuUnusedQueue *queue, u8 *dest) { s32 i; @@ -549,11 +549,10 @@ static bool8 RfuUnusedQueue_Dequeue(struct RfuUnusedQueue *queue, u8 *dest) return TRUE; } -// Unused // Populates an array with a sequence of numbers (which numbers depends on the mode) // and sets the final element to the total of the other elements #define SEQ_ARRAY_MAX_SIZE 200 -static void PopulateArrayWithSequence(u8 *arr, u8 mode) +static void UNUSED PopulateArrayWithSequence(u8 *arr, u8 mode) { s32 i; u8 rval; @@ -607,7 +606,7 @@ static void PopulateArrayWithSequence(u8 *arr, u8 mode) // File boundary here maybe? -static void PkmnStrToASCII(u8 *asciiStr, const u8 *pkmnStr) +static void UNUSED PkmnStrToASCII(u8 *asciiStr, const u8 *pkmnStr) { s32 i; @@ -616,7 +615,7 @@ static void PkmnStrToASCII(u8 *asciiStr, const u8 *pkmnStr) asciiStr[i] = 0; } -static void ASCIIToPkmnStr(u8 *pkmnStr, const u8 *asciiStr) +static void UNUSED ASCIIToPkmnStr(u8 *pkmnStr, const u8 *asciiStr) { s32 i; diff --git a/src/m4a_tables.c b/src/m4a_tables.c index 9a4ea32e69e7..4d012cea2820 100644 --- a/src/m4a_tables.c +++ b/src/m4a_tables.c @@ -257,35 +257,34 @@ const u8 gClockTable[] = const struct PokemonCrySong gPokemonCrySongTemplate = { - 1, // track count - 0, // block count - 255, // priority - 0, // reverb - (struct ToneData *)&voicegroup000, - NULL, - NULL, - 0, - TUNE, // part 0 - C_V, // TUNE value - GOTO, - 0, // GOTO target address - TUNE, // part 1 - C_V + 16, // TUNE value - {VOICE, 0}, // part 0 jumps here with GOTO - VOL, - 127, // volume - {XCMD, 0x0D}, - 0, // unk value - {XCMD, xRELE}, - 0, // release - PAN, - C_V, // PAN value - TIE, - 60, // TIE key (default is Cn3) - 127, // TIE velocity - {XCMD, 0x0C}, - 60, // unk value - {EOT, FINE} // end + .trackCount = 1, + .blockCount = 0, + .priority = 255, + .reverb = 0, + .tone = (struct ToneData *)&voicegroup000, + .part = {NULL, NULL}, + .gap = 0, + .part0 = TUNE, + .tuneValue = C_V, + .gotoCmd = GOTO, + .gotoTarget = 0, + .part1 = TUNE, + .tuneValue2 = C_V + 16, + .cont = {VOICE, 0}, // part0 jumps here with gotoCmd + .volCmd = VOL, + .volumeValue = 127, + .unkCmd0D = {XCMD, 0x0D}, + .unkCmd0DParam = 0, + .xreleCmd = {XCMD, xRELE}, + .releaseValue = 0, + .panCmd = PAN, + .panValue = C_V, + .tieCmd = TIE, + .tieKeyValue = 60, // default is Cn3 + .tieVelocityValue = 127, + .unkCmd0C = {XCMD, 0x0C}, + .unkCmd0CParam = 60, + .end = {EOT, FINE} }; const XcmdFunc gXcmdTable[] = diff --git a/src/mail_data.c b/src/mail_data.c index 99cf1f9edd62..ed152faf2ced 100644 --- a/src/mail_data.c +++ b/src/mail_data.c @@ -129,7 +129,7 @@ u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail) return mailId; } -static bool32 DummyMailFunc(void) +static bool32 UNUSED DummyMailFunc(void) { return FALSE; } diff --git a/src/main.c b/src/main.c index 69c6c7a16bfd..d850bc27bc9c 100644 --- a/src/main.c +++ b/src/main.c @@ -80,7 +80,9 @@ static EWRAM_DATA u16 sTrainerId = 0; static void UpdateLinkAndCallCallbacks(void); static void InitMainCallbacks(void); static void CallCallbacks(void); +#ifdef BUGFIX static void SeedRngWithRtc(void); +#endif static void ReadKeys(void); void InitIntrHandlers(void); static void WaitForVBlank(void); diff --git a/src/main_menu.c b/src/main_menu.c index a5571e014a09..b0f68193a618 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -454,8 +454,8 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_PlayerShrink[] = }; static const struct MenuAction sMenuActions_Gender[] = { - {gText_BirchBoy, NULL}, - {gText_BirchGirl, NULL} + {gText_BirchBoy, {NULL}}, + {gText_BirchGirl, {NULL}} }; static const u8 *const sMalePresetNames[] = { diff --git a/src/map_name_popup.c b/src/map_name_popup.c index 07e4f98708fc..9c9c85cf595e 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -198,8 +198,7 @@ static const u8 *const sBattlePyramid_MapHeaderStrings[FRONTIER_STAGES_PER_CHALL sText_Pyramid, }; -// Unused -static bool8 StartMenu_ShowMapNamePopup(void) +static bool8 UNUSED StartMenu_ShowMapNamePopup(void) { HideStartMenu(); ShowMapNamePopup(); diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 6f6a214f3d0f..0b4a950ad5f0 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -740,8 +740,7 @@ void SanitizeMauvilleOldManForRuby(union OldMan * oldMan) } } -// Unused -static void 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; diff --git a/src/menu.c b/src/menu.c index ca61f8b8765b..2d3a8a8b2ff1 100644 --- a/src/menu.c +++ b/src/menu.c @@ -443,14 +443,12 @@ void Menu_LoadStdPalAt(u16 offset) LoadPalette(gStandardMenuPalette, offset, STD_WINDOW_PALETTE_SIZE); } -// Unused -static const u16 *Menu_GetStdPal(void) +static UNUSED const u16* Menu_GetStdPal(void) { return gStandardMenuPalette; } -// Unused -static u16 Menu_GetStdPalColor(u8 colorNum) +static u16 UNUSED Menu_GetStdPalColor(u8 colorNum) { if (colorNum > 15) colorNum = 0; @@ -511,14 +509,12 @@ void RemoveStartMenuWindow(void) } } -// Unused -static u16 GetDialogFrameBaseTileNum(void) +static u16 UNUSED GetDialogFrameBaseTileNum(void) { return DLG_WINDOW_BASE_TILE_NUM; } -// Unused -static u16 GetStandardFrameBaseTileNum(void) +static u16 UNUSED GetStandardFrameBaseTileNum(void) { return STD_WINDOW_BASE_TILE_NUM; } @@ -568,8 +564,7 @@ void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 CopyWindowToVram(windowId, COPYWIN_FULL); } -// Never used. -static void DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum) +static void UNUSED DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum) { sTileNum = tileNum; sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM); @@ -878,15 +873,13 @@ void HofPCTopBar_PrintPair(const u8 *string, const u8 *string2, bool8 noBg, u8 l } } -// Unused -static void HofPCTopBar_CopyToVram(void) +static void UNUSED HofPCTopBar_CopyToVram(void) { if (sHofPCTopBarWindowId != WINDOW_NONE) CopyWindowToVram(sHofPCTopBarWindowId, COPYWIN_FULL); } -// Unused -static void HofPCTopBar_Clear(void) +static void UNUSED HofPCTopBar_Clear(void) { if (sHofPCTopBarWindowId != WINDOW_NONE) { @@ -937,8 +930,7 @@ u8 InitMenuNormal(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 n return InitMenu(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos, FALSE); } -// Unused -static u8 InitMenuDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 numChoices, u8 initialCursorPos) +static u8 UNUSED InitMenuDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 numChoices, u8 initialCursorPos) { u8 cursorHeight = GetMenuCursorDimensionByFont(fontId, 1); return InitMenuNormal(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos); @@ -1115,8 +1107,7 @@ void PrintMenuActionTextsAtPos(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineH CopyWindowToVram(windowId, COPYWIN_GFX); } -// Unused -static void PrintMenuActionTextsWithSpacing(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, u8 letterSpacing, u8 lineSpacing) +static void UNUSED PrintMenuActionTextsWithSpacing(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, u8 letterSpacing, u8 lineSpacing) { u8 i; for (i = 0; i < itemCount; i++) @@ -1124,8 +1115,7 @@ static void PrintMenuActionTextsWithSpacing(u8 windowId, u8 fontId, u8 left, u8 CopyWindowToVram(windowId, COPYWIN_GFX); } -// Unused -static void PrintMenuActionTextsAtTop(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions) +static void UNUSED PrintMenuActionTextsAtTop(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions) { PrintMenuActionTextsAtPos(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, lineHeight, itemCount, menuActions); } @@ -1157,8 +1147,7 @@ void PrintMenuActionTexts(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpac CopyWindowToVram(windowId, COPYWIN_GFX); } -// Unused -static void PrintMenuActionTextsAtTopById(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) +static void UNUSED PrintMenuActionTextsAtTopById(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) { PrintMenuActionTexts(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, GetFontAttribute(fontId, FONTATTR_LETTER_SPACING), lineHeight, itemCount, menuActions, actionIds); } @@ -1215,7 +1204,7 @@ static void CreateYesNoMenuAtPos(const struct WindowTemplate *window, u8 fontId, InitMenuNormal(sYesNoWindowId, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos); } -static void CreateYesNoMenuInTopLeft(const struct WindowTemplate *window, u8 fontId, u16 baseTileNum, u8 paletteNum) +static void UNUSED CreateYesNoMenuInTopLeft(const struct WindowTemplate *window, u8 fontId, u16 baseTileNum, u8 paletteNum) { CreateYesNoMenuAtPos(window, fontId, 0, 1, baseTileNum, paletteNum, 0); } @@ -1246,8 +1235,7 @@ static void PrintMenuActionGridText(u8 windowId, u8 fontId, u8 left, u8 top, u8 CopyWindowToVram(windowId, COPYWIN_GFX); } -// Unused -static void PrintMenuActionGridTextAtTop(u8 windowId, u8 fontId, u8 width, u8 height, u8 columns, u8 rows, const struct MenuAction *menuActions) +static void UNUSED PrintMenuActionGridTextAtTop(u8 windowId, u8 fontId, u8 width, u8 height, u8 columns, u8 rows, const struct MenuAction *menuActions) { PrintMenuActionGridText(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 0, width, height, columns, rows, menuActions); } @@ -1283,8 +1271,7 @@ void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth CopyWindowToVram(windowId, COPYWIN_GFX); } -// Unused -static void PrintMenuActionGrid_TopLeft(u8 windowId, u8 fontId, u8 optionWidth, u8 unused, u8 horizontalCount, u8 verticalCount, const struct MenuAction *menuActions, const u8 *actionIds) +static void UNUSED PrintMenuActionGrid_TopLeft(u8 windowId, u8 fontId, u8 optionWidth, u8 unused, u8 horizontalCount, u8 verticalCount, const struct MenuAction *menuActions, const u8 *actionIds) { PrintMenuActionGrid(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 0, optionWidth, horizontalCount, verticalCount, menuActions, actionIds); } @@ -1316,8 +1303,7 @@ static u8 InitMenuGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth, return sMenu.cursorPos; } -// Unused -static u8 InitMenuGridDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 width, u8 columns, u8 rows, u8 cursorPos) +static u8 UNUSED InitMenuGridDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 width, u8 columns, u8 rows, u8 cursorPos) { u8 cursorHeight = GetMenuCursorDimensionByFont(fontId, 1); u8 numChoices = columns * rows; @@ -1409,8 +1395,7 @@ u8 ChangeGridMenuCursorPosition(s8 deltaX, s8 deltaY) } } -// Unused -static s8 Menu_ProcessGridInput_NoSoundLimit(void) +static s8 UNUSED Menu_ProcessGridInput_NoSoundLimit(void) { if (JOY_NEW(A_BUTTON)) { @@ -1490,8 +1475,7 @@ s8 Menu_ProcessGridInput(void) return MENU_NOTHING_CHOSEN; } -// Unused -static s8 Menu_ProcessGridInputRepeat_NoSoundLimit(void) +static s8 UNUSED Menu_ProcessGridInputRepeat_NoSoundLimit(void) { if (JOY_NEW(A_BUTTON)) { @@ -1530,8 +1514,7 @@ static s8 Menu_ProcessGridInputRepeat_NoSoundLimit(void) return MENU_NOTHING_CHOSEN; } -// Unused -static s8 Menu_ProcessGridInputRepeat(void) +static s8 UNUSED Menu_ProcessGridInputRepeat(void) { u8 oldPos = sMenu.cursorPos; @@ -1675,8 +1658,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const CopyWindowToVram(windowId, COPYWIN_GFX); } -// Unused -static void PrintMenuActionGridTextNoSpacing(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *menuActions, const u8 *actionIds) +static void UNUSED PrintMenuActionGridTextNoSpacing(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *menuActions, const u8 *actionIds) { u8 i; u8 j; @@ -2008,7 +1990,7 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y) AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SKIP_DRAW, 0); } -static void UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height) +static void UNUSED UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height) { int loopSrcY, loopDstY, loopSrcX, loopDstX, xEnd, yEnd, multiplierSrcY, multiplierDstY; const u8 *pixelsSrc; @@ -2083,14 +2065,12 @@ static void UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u } } -// Unused -static void LoadMonIconPalAtOffset(u8 palOffset, u16 speciesId) +static void UNUSED LoadMonIconPalAtOffset(u8 palOffset, u16 speciesId) { LoadPalette(GetValidMonIconPalettePtr(speciesId), palOffset, PLTT_SIZE_4BPP); } -// Unused -static void DrawMonIconAtPos(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y) +static void UNUSED DrawMonIconAtPos(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y) { BlitBitmapToWindow(windowId, GetMonIconPtr(speciesId, personality), x, y, 32, 32); } diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 01fc4eddb924..456845e868dc 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -237,8 +237,7 @@ void MailboxMenu_RemoveWindow(u8 windowIdx) sMailboxWindowIds[windowIdx] = WINDOW_NONE; } -// Unused -static u8 MailboxMenu_GetWindowId(u8 windowIdx) +static u8 UNUSED MailboxMenu_GetWindowId(u8 windowIdx) { return sMailboxWindowIds[windowIdx]; } diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c index b4d3b6558bc7..617922e5aa1d 100644 --- a/src/minigame_countdown.c +++ b/src/minigame_countdown.c @@ -158,8 +158,7 @@ static const TaskFunc sStaticCountdownFuncs[][4] = #define sId data[4] // Never read #define sNumberSpriteId data[5] // Never read -// Unused -static u32 CreateStaticCountdownTask(u8 funcSetId, u8 taskPriority) +static u32 UNUSED CreateStaticCountdownTask(u8 funcSetId, u8 taskPriority) { u8 taskId = CreateTask(Task_StaticCountdown, taskPriority); struct Task *task = &gTasks[taskId]; @@ -170,7 +169,7 @@ static u32 CreateStaticCountdownTask(u8 funcSetId, u8 taskPriority) return taskId; } -static bool32 StartStaticCountdown(void) +static bool32 UNUSED StartStaticCountdown(void) { u8 taskId = FindTaskIdByFunc(Task_StaticCountdown); if (taskId == TASK_NONE) @@ -180,7 +179,7 @@ static bool32 StartStaticCountdown(void) return TRUE; } -static bool32 IsStaticCountdownRunning(void) +static bool32 UNUSED IsStaticCountdownRunning(void) { return FuncIsActiveTask(Task_StaticCountdown); } diff --git a/src/mirage_tower.c b/src/mirage_tower.c index 9b48ee24b72b..b1e2e5003b0f 100644 --- a/src/mirage_tower.c +++ b/src/mirage_tower.c @@ -431,7 +431,7 @@ void DoMirageTowerCeilingCrumble(void) static void WaitCeilingCrumble(u8 taskId) { - u16 *data = gTasks[taskId].data; + u16 *data = (u16*)gTasks[taskId].data; data[1]++; // Either wait 1000 frames, or until all 16 crumble sprites and the one screen-shake task are completed. if (data[1] == 1000 || data[0] == 17) diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index c73f43a56887..179be0d56bca 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -597,8 +597,7 @@ static void ShowDownArrow(void) DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); } -// Unused -static bool32 HideDownArrowAndWaitButton(u8 *textState) +static bool32 UNUSED HideDownArrowAndWaitButton(u8 *textState) { switch (*textState) { @@ -722,7 +721,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) { - struct WindowTemplate windowTemplate; + struct WindowTemplate UNUSED windowTemplate; s32 input; switch (*textState) diff --git a/src/naming_screen.c b/src/naming_screen.c index 28bb24637519..0f2e2dbb7f94 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -2058,23 +2058,23 @@ static bool8 IsWideLetter(u8 character) return FALSE; } -// Debug? Unused, and arguments aren't sensible for non-player screens. -static void Debug_NamingScreenPlayer(void) +// Debug? Arguments aren't sensible for non-player screens. +static void UNUSED Debug_NamingScreenPlayer(void) { DoNamingScreen(NAMING_SCREEN_PLAYER, gSaveBlock2Ptr->playerName, gSaveBlock2Ptr->playerGender, 0, 0, CB2_ReturnToFieldWithOpenMenu); } -static void Debug_NamingScreenBox(void) +static void UNUSED Debug_NamingScreenBox(void) { DoNamingScreen(NAMING_SCREEN_BOX, gSaveBlock2Ptr->playerName, gSaveBlock2Ptr->playerGender, 0, 0, CB2_ReturnToFieldWithOpenMenu); } -static void Debug_NamingScreenCaughtMon(void) +static void UNUSED Debug_NamingScreenCaughtMon(void) { DoNamingScreen(NAMING_SCREEN_CAUGHT_MON, gSaveBlock2Ptr->playerName, gSaveBlock2Ptr->playerGender, 0, 0, CB2_ReturnToFieldWithOpenMenu); } -static void Debug_NamingScreenNickname(void) +static void UNUSED Debug_NamingScreenNickname(void) { DoNamingScreen(NAMING_SCREEN_NICKNAME, gSaveBlock2Ptr->playerName, gSaveBlock2Ptr->playerGender, 0, 0, CB2_ReturnToFieldWithOpenMenu); } diff --git a/src/overworld.c b/src/overworld.c index 0152a4857971..bae12461530b 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -134,14 +134,11 @@ static void CreateLinkPlayerSprite(u8, u8); static void GetLinkPlayerCoords(u8, u16 *, u16 *); static u8 GetLinkPlayerFacingDirection(u8); static u8 GetLinkPlayerElevation(u8); -static s32 GetLinkPlayerObjectStepTimer(u8); static u8 GetLinkPlayerIdAt(s16, s16); static void SetPlayerFacingDirection(u8, u8); static void ZeroObjectEvent(struct ObjectEvent *); static void SpawnLinkPlayerObjectEvent(u8, s16, s16, u8); static void InitLinkPlayerObjectEventPos(struct ObjectEvent *, s16, s16); -static void SetLinkPlayerObjectRange(u8, u8); -static void DestroyLinkPlayerObject(u8); static u8 GetSpriteForLinkedPlayer(u8); static void RunTerminateLinkScript(void); static u32 GetLinkSendQueueLength(void); @@ -1025,8 +1022,8 @@ void SetObjectEventLoadFlag(u8 flag) sObjectEventLoadFlag = flag; } -// Unused, sObjectEventLoadFlag is read directly -static u8 GetObjectEventLoadFlag(void) +// sObjectEventLoadFlag is read directly +static u8 UNUSED GetObjectEventLoadFlag(void) { return sObjectEventLoadFlag; } @@ -2186,7 +2183,7 @@ static void InitObjectEventsLink(void) static void InitObjectEventsLocal(void) { - s16 x, y; + u16 x, y; struct InitialPlayerAvatarState *player; gTotalCameraPixelOffsetX = 0; @@ -2682,8 +2679,7 @@ u32 GetCableClubPartnersReady(void) return CABLE_SEAT_WAITING; } -// Unused -static bool32 IsAnyPlayerExitingCableClub(void) +static bool32 UNUSED IsAnyPlayerExitingCableClub(void) { return IsAnyPlayerInLinkState(PLAYER_LINK_STATE_EXITING_ROOM); } @@ -2991,7 +2987,7 @@ static void InitLinkPlayerObjectEventPos(struct ObjectEvent *objEvent, s16 x, s1 ObjectEventUpdateElevation(objEvent); } -static void SetLinkPlayerObjectRange(u8 linkPlayerId, u8 dir) +static void UNUSED SetLinkPlayerObjectRange(u8 linkPlayerId, u8 dir) { if (gLinkPlayerObjectEvents[linkPlayerId].active) { @@ -3001,7 +2997,7 @@ static void SetLinkPlayerObjectRange(u8 linkPlayerId, u8 dir) } } -static void DestroyLinkPlayerObject(u8 linkPlayerId) +static void UNUSED DestroyLinkPlayerObject(u8 linkPlayerId) { struct LinkPlayerObjectEvent *linkPlayerObjEvent = &gLinkPlayerObjectEvents[linkPlayerId]; u8 objEventId = linkPlayerObjEvent->objEventId; @@ -3042,7 +3038,7 @@ static u8 GetLinkPlayerElevation(u8 linkPlayerId) return objEvent->currentElevation; } -static s32 GetLinkPlayerObjectStepTimer(u8 linkPlayerId) +static s32 UNUSED GetLinkPlayerObjectStepTimer(u8 linkPlayerId) { u8 objEventId = gLinkPlayerObjectEvents[linkPlayerId].objEventId; struct ObjectEvent *objEvent = &gObjectEvents[objEventId]; diff --git a/src/palette.c b/src/palette.c index e3606646274b..f19ac07cf630 100644 --- a/src/palette.c +++ b/src/palette.c @@ -201,15 +201,13 @@ bool8 BeginNormalPaletteFade(u32 selectedPalettes, s8 delay, u8 startY, u8 targe } } -// Unused -static bool8 BeginPlttFade(u32 selectedPalettes, u8 delay, u8 startY, u8 targetY, u16 blendColor) +static bool8 UNUSED BeginPlttFade(u32 selectedPalettes, u8 delay, u8 startY, u8 targetY, u16 blendColor) { ReadPlttIntoBuffers(); return BeginNormalPaletteFade(selectedPalettes, delay, startY, targetY, blendColor); } -// Unused -static void PaletteStruct_Run(u8 a1, u32 *unkFlags) +static void UNUSED PaletteStruct_Run(u8 a1, u32 *unkFlags) { u8 i; @@ -382,14 +380,14 @@ void ResetPaletteFadeControl(void) gPaletteFade.deltaY = 2; } -static void PaletteStruct_SetUnusedFlag(u16 id) +static void UNUSED PaletteStruct_SetUnusedFlag(u16 id) { u8 paletteNum = PaletteStruct_GetPalNum(id); if (paletteNum != NUM_PALETTE_STRUCTS) sPaletteStructs[paletteNum].flag = TRUE; } -static void PaletteStruct_ClearUnusedFlag(u16 id) +static void UNUSED PaletteStruct_ClearUnusedFlag(u16 id) { u8 paletteNum = PaletteStruct_GetPalNum(id); if (paletteNum != NUM_PALETTE_STRUCTS) @@ -982,8 +980,7 @@ void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTa gTasks[taskId].func(taskId); } -// Unused -static bool32 IsBlendPalettesGraduallyTaskActive(u8 id) +static bool32 UNUSED IsBlendPalettesGraduallyTaskActive(u8 id) { int i; @@ -996,8 +993,7 @@ static bool32 IsBlendPalettesGraduallyTaskActive(u8 id) return FALSE; } -// Unused -static void DestroyBlendPalettesGraduallyTask(void) +static void UNUSED DestroyBlendPalettesGraduallyTask(void) { u8 taskId; diff --git a/src/palette_util.c b/src/palette_util.c index 08239c3363bd..d24321d58053 100755 --- a/src/palette_util.c +++ b/src/palette_util.c @@ -39,8 +39,7 @@ u8 RouletteFlash_Add(struct RouletteFlashUtil *flash, u8 id, const struct Roulet return id; } -// Unused -static u8 RouletteFlash_Remove(struct RouletteFlashUtil *flash, u8 id) +static u8 UNUSED RouletteFlash_Remove(struct RouletteFlashUtil *flash, u8 id) { if (id >= ARRAY_COUNT(flash->palettes)) return 0xFF; @@ -470,7 +469,7 @@ void SetTilemapRect(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height) } } -static void FillTilemapRect_Unused(void *dest, u16 value, u8 left, u8 top, u8 width, u8 height) +static void UNUSED FillTilemapRect_Unused(void *dest, u16 value, u8 left, u8 top, u8 width, u8 height) { u8 i, j; u8 x, y; @@ -486,7 +485,7 @@ static void FillTilemapRect_Unused(void *dest, u16 value, u8 left, u8 top, u8 wi } } -static void SetTilemapRect_Unused(void *dest, const u16 *src, u8 left, u8 top, u8 width, u8 height) +static void UNUSED SetTilemapRect_Unused(void *dest, const u16 *src, u8 left, u8 top, u8 width, u8 height) { u8 i, j; u8 x, y; diff --git a/src/party_menu.c b/src/party_menu.c index 2b7256628201..7f69fd54117d 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -1963,7 +1963,7 @@ u8 GetMonAilment(struct Pokemon *mon) static void SetPartyMonsAllowedInMinigame(void) { - u16 *ptr; + s16 *ptr; if (gPartyMenu.menuType == PARTY_MENU_TYPE_MINIGAME) { @@ -4168,9 +4168,9 @@ static void PartyMenuStartSpriteAnim(u8 spriteId, u8 animNum) StartSpriteAnim(&gSprites[spriteId], animNum); } -// Unused. Might explain the large blank section in gPartyMenuPokeballSmall_Gfx +// Might explain the large blank section in gPartyMenuPokeballSmall_Gfx // At the very least this is how the unused anim cmds for sSpriteAnimTable_MenuPokeballSmall were meant to be accessed -static void SpriteCB_BounceConfirmCancelButton(u8 spriteId, u8 spriteId2, u8 animNum) +static void UNUSED SpriteCB_BounceConfirmCancelButton(u8 spriteId, u8 spriteId2, u8 animNum) { if (animNum == 0) { @@ -6631,8 +6631,7 @@ static void UpdatePartyToFieldOrder(void) Free(partyBuffer); } -// Unused -static void SwitchAliveMonIntoLeadSlot(void) +static void UNUSED SwitchAliveMonIntoLeadSlot(void) { u8 i; struct Pokemon *mon; @@ -6734,8 +6733,7 @@ void ChooseMonForDaycare(void) InitPartyMenu(PARTY_MENU_TYPE_DAYCARE, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, FALSE, PARTY_MSG_CHOOSE_MON_2, Task_HandleChooseMonInput, BufferMonSelection); } -// Unused -static void ChoosePartyMonByMenuType(u8 menuType) +static void UNUSED ChoosePartyMonByMenuType(u8 menuType) { gFieldCallback2 = CB2_FadeFromPartyMenu; InitPartyMenu(menuType, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_AND_CLOSE, FALSE, PARTY_MSG_CHOOSE_MON, Task_HandleChooseMonInput, CB2_ReturnToField); diff --git a/src/player_pc.c b/src/player_pc.c index f53e08f5323e..7dc2616e7109 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -191,10 +191,10 @@ static const u8 *const sItemStorage_OptionDescriptions[] = static const struct MenuAction sPlayerPCMenuActions[] = { - [MENU_ITEMSTORAGE] = { gText_ItemStorage, PlayerPC_ItemStorage }, - [MENU_MAILBOX] = { gText_Mailbox, PlayerPC_Mailbox }, - [MENU_DECORATION] = { gText_Decoration, PlayerPC_Decoration }, - [MENU_TURNOFF] = { gText_TurnOff, PlayerPC_TurnOff } + [MENU_ITEMSTORAGE] = { gText_ItemStorage, {PlayerPC_ItemStorage} }, + [MENU_MAILBOX] = { gText_Mailbox, {PlayerPC_Mailbox} }, + [MENU_DECORATION] = { gText_Decoration, {PlayerPC_Decoration} }, + [MENU_TURNOFF] = { gText_TurnOff, {PlayerPC_TurnOff} } }; static const u8 sBedroomPC_OptionOrder[] = @@ -216,10 +216,10 @@ static const u8 sPlayerPC_OptionOrder[] = static const struct MenuAction sItemStorage_MenuActions[] = { - [MENU_WITHDRAW] = { gText_WithdrawItem, ItemStorage_Withdraw }, - [MENU_DEPOSIT] = { gText_DepositItem, ItemStorage_Deposit }, - [MENU_TOSS] = { gText_TossItem, ItemStorage_Toss }, - [MENU_EXIT] = { gText_Cancel, ItemStorage_Exit } + [MENU_WITHDRAW] = { gText_WithdrawItem, {ItemStorage_Withdraw} }, + [MENU_DEPOSIT] = { gText_DepositItem, {ItemStorage_Deposit} }, + [MENU_TOSS] = { gText_TossItem, {ItemStorage_Toss} }, + [MENU_EXIT] = { gText_Cancel, {ItemStorage_Exit} } }; static const struct ItemSlot sNewGamePCItems[] = @@ -230,10 +230,10 @@ static const struct ItemSlot sNewGamePCItems[] = const struct MenuAction gMailboxMailOptions[] = { - { gText_Read, Mailbox_DoMailRead }, - { gText_MoveToBag, Mailbox_MoveToBag }, - { gText_Give2, Mailbox_Give }, - { gText_Cancel2, Mailbox_Cancel } + { gText_Read, {Mailbox_DoMailRead} }, + { gText_MoveToBag, {Mailbox_MoveToBag} }, + { gText_Give2, {Mailbox_Give} }, + { gText_Cancel2, {Mailbox_Cancel} } }; static const struct WindowTemplate sWindowTemplates_MainMenus[] = diff --git a/src/pokeball.c b/src/pokeball.c index 891b8fe4a5b3..0ed34b48ad11 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -1418,7 +1418,7 @@ static void SpriteCB_TradePokeballEnd(struct Sprite *sprite) #undef sTimer // Unreferenced here and in RS, but used in FRLG, possibly by mistake. -static void DestroySpriteAndFreeResources_Ball(struct Sprite *sprite) +static void UNUSED DestroySpriteAndFreeResources_Ball(struct Sprite *sprite) { DestroySpriteAndFreeResources(sprite); } diff --git a/src/pokeblock.c b/src/pokeblock.c index e490f372c469..e01e821f7e1d 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -215,12 +215,12 @@ const u8 *const gPokeblockNames[] = static const struct MenuAction sPokeblockMenuActions[] = { - [PKBL_USE_ON_FIELD] = {gMenuText_Use, PokeblockAction_UseOnField}, - [PKBL_TOSS] = {gMenuText_Toss, PokeblockAction_Toss}, - [PKBL_CANCEL] = {gText_Cancel2, PokeblockAction_Cancel}, - [PKBL_USE_IN_BATTLE] = {gMenuText_Use, PokeblockAction_UseInBattle}, - [PKBL_USE_ON_FEEDER] = {gMenuText_Use, PokeblockAction_UseOnPokeblockFeeder}, - [PKBL_GIVE_TO_LADY] = {gMenuText_Give2, PokeblockAction_GiveToContestLady}, + [PKBL_USE_ON_FIELD] = {gMenuText_Use, {PokeblockAction_UseOnField}}, + [PKBL_TOSS] = {gMenuText_Toss, {PokeblockAction_Toss}}, + [PKBL_CANCEL] = {gText_Cancel2, {PokeblockAction_Cancel}}, + [PKBL_USE_IN_BATTLE] = {gMenuText_Use, {PokeblockAction_UseInBattle}}, + [PKBL_USE_ON_FEEDER] = {gMenuText_Use, {PokeblockAction_UseOnPokeblockFeeder}}, + [PKBL_GIVE_TO_LADY] = {gMenuText_Give2, {PokeblockAction_GiveToContestLady}}, }; static const u8 sActionsOnField[] = {PKBL_USE_ON_FIELD, PKBL_TOSS, PKBL_CANCEL}; diff --git a/src/pokedex.c b/src/pokedex.c index 6494c58f5270..b10fc074af61 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4437,7 +4437,7 @@ static void PrintInfoSubMenuText(u8 windowId, const u8 *str, u8 left, u8 top) AddTextPrinterParameterized4(windowId, FONT_NORMAL, left, top, 0, 0, color, TEXT_SKIP_DRAW, str); } -static void UnusedPrintNum(u8 windowId, u16 num, u8 left, u8 top) +static void UNUSED UnusedPrintNum(u8 windowId, u16 num, u8 left, u8 top) { u8 str[4]; @@ -4471,7 +4471,7 @@ static u8 PrintCryScreenSpeciesName(u8 windowId, u16 num, u8 left, u8 top) return i; } -static void UnusedPrintMonName(u8 windowId, const u8 *name, u8 left, u8 top) +static void UNUSED UnusedPrintMonName(u8 windowId, const u8 *name, u8 left, u8 top) { u8 str[POKEMON_NAME_LENGTH + 1]; u8 i; @@ -4492,7 +4492,7 @@ static void UnusedPrintMonName(u8 windowId, const u8 *name, u8 left, u8 top) } // Unused in the English version, used to print height/weight in versions which use metric system. -static void PrintDecimalNum(u8 windowId, u16 num, u8 left, u8 top) +static void UNUSED PrintDecimalNum(u8 windowId, u16 num, u8 left, u8 top) { u8 str[6]; bool8 outputted = FALSE; @@ -4569,8 +4569,8 @@ static void DrawFootprint(u8 windowId, u16 dexNum) CopyToWindowPixelBuffer(windowId, footprint4bpp, sizeof(footprint4bpp), 0); } -// Unused Ruby/Sapphire function. -static void RS_DrawFootprint(u16 offset, u16 tileNum) +// Ruby/Sapphire function. +static void UNUSED RS_DrawFootprint(u16 offset, u16 tileNum) { *(u16 *)(VRAM + offset * 0x800 + 0x232) = 0xF000 + tileNum + 0; *(u16 *)(VRAM + offset * 0x800 + 0x234) = 0xF000 + tileNum + 1; diff --git a/src/pokemon.c b/src/pokemon.c index a360feb0badb..03c7c34712d6 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -53,6 +53,17 @@ #include "constants/union_room.h" #include "constants/weather.h" +#define DAY_EVO_HOUR_BEGIN 12 +#define DAY_EVO_HOUR_END HOURS_PER_DAY + +#define DUSK_EVO_HOUR_BEGIN 17 +#define DUSK_EVO_HOUR_END 18 + +#define NIGHT_EVO_HOUR_BEGIN 0 +#define NIGHT_EVO_HOUR_END 12 + +#define FRIENDSHIP_EVO_THRESHOLD 220 + struct SpeciesItem { u16 species; @@ -6468,50 +6479,50 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s switch (gEvolutionTable[species][i].method) { case EVO_FRIENDSHIP: - if (friendship >= 220) + if (friendship >= FRIENDSHIP_EVO_THRESHOLD) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_FRIENDSHIP_DAY: RtcCalcLocalTime(); - if (gLocalTime.hours >= 12 && gLocalTime.hours < 24 && friendship >= 220) + if (gLocalTime.hours >= DAY_EVO_HOUR_BEGIN && gLocalTime.hours < DAY_EVO_HOUR_END && friendship >= FRIENDSHIP_EVO_THRESHOLD) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL_DAY: RtcCalcLocalTime(); - if (gLocalTime.hours >= 12 && gLocalTime.hours < 24 && gEvolutionTable[species][i].param <= level) + if (gLocalTime.hours >= DAY_EVO_HOUR_BEGIN && gLocalTime.hours < DAY_EVO_HOUR_END && gEvolutionTable[species][i].param <= level) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_FRIENDSHIP_NIGHT: RtcCalcLocalTime(); - if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && friendship >= 220) + if (gLocalTime.hours >= NIGHT_EVO_HOUR_BEGIN && gLocalTime.hours < NIGHT_EVO_HOUR_END && friendship >= FRIENDSHIP_EVO_THRESHOLD) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL_NIGHT: RtcCalcLocalTime(); - if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && gEvolutionTable[species][i].param <= level) + if (gLocalTime.hours >= NIGHT_EVO_HOUR_BEGIN && gLocalTime.hours < NIGHT_EVO_HOUR_END && gEvolutionTable[species][i].param <= level) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_ITEM_HOLD_NIGHT: RtcCalcLocalTime(); - if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && heldItem == gEvolutionTable[species][i].param) + if (gLocalTime.hours >= NIGHT_EVO_HOUR_BEGIN && gLocalTime.hours < NIGHT_EVO_HOUR_END && heldItem == gEvolutionTable[species][i].param) { - heldItem = 0; + heldItem = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem); targetSpecies = gEvolutionTable[species][i].targetSpecies; } break; case EVO_ITEM_HOLD_DAY: RtcCalcLocalTime(); - if (gLocalTime.hours >= 12 && gLocalTime.hours < 24 && heldItem == gEvolutionTable[species][i].param) + if (gLocalTime.hours >= DAY_EVO_HOUR_BEGIN && gLocalTime.hours < DAY_EVO_HOUR_END && heldItem == gEvolutionTable[species][i].param) { - heldItem = 0; + heldItem = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem); targetSpecies = gEvolutionTable[species][i].targetSpecies; } break; case EVO_LEVEL_DUSK: RtcCalcLocalTime(); - if (gLocalTime.hours >= 17 && gLocalTime.hours < 18 && gEvolutionTable[species][i].param <= level) + if (gLocalTime.hours >= DUSK_EVO_HOUR_BEGIN && gLocalTime.hours < DUSK_EVO_HOUR_END && gEvolutionTable[species][i].param <= level) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL: @@ -6562,7 +6573,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_FRIENDSHIP_MOVE_TYPE: - if (friendship >= 220) + if (friendship >= FRIENDSHIP_EVO_THRESHOLD) { for (j = 0; j < MAX_MON_MOVES; j++) { @@ -6721,12 +6732,12 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s break; case EVO_ITEM_NIGHT: RtcCalcLocalTime(); - if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && gEvolutionTable[species][i].param == evolutionItem) + if (gLocalTime.hours >= NIGHT_EVO_HOUR_BEGIN && gLocalTime.hours < NIGHT_EVO_HOUR_END && gEvolutionTable[species][i].param == evolutionItem) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_ITEM_DAY: RtcCalcLocalTime(); - if (gLocalTime.hours >= 12 && gLocalTime.hours < 24 && gEvolutionTable[species][i].param == evolutionItem) + if (gLocalTime.hours >= DAY_EVO_HOUR_BEGIN && gLocalTime.hours < DAY_EVO_HOUR_END && gEvolutionTable[species][i].param == evolutionItem) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; } @@ -8087,9 +8098,9 @@ void BattleAnimateBackSprite(struct Sprite *sprite, u16 species) } } -// Unused, identical to GetOpposingLinkMultiBattlerId but for the player +// Identical to GetOpposingLinkMultiBattlerId but for the player // "rightSide" from that team's perspective, i.e. B_POSITION_*_RIGHT -static u8 GetOwnOpposingLinkMultiBattlerId(bool8 rightSide) +static u8 UNUSED GetOwnOpposingLinkMultiBattlerId(bool8 rightSide) { s32 i; s32 battlerId = 0; @@ -8433,12 +8444,12 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 { case DAY: RtcCalcLocalTime(); - if (gLocalTime.hours >= 12 && gLocalTime.hours < 24) + if (gLocalTime.hours >= DAY_EVO_HOUR_BEGIN && gLocalTime.hours < DAY_EVO_HOUR_END) targetSpecies = formChanges[i].targetSpecies; break; case NIGHT: RtcCalcLocalTime(); - if (gLocalTime.hours >= 0 && gLocalTime.hours < 12) + if (gLocalTime.hours >= NIGHT_EVO_HOUR_BEGIN && gLocalTime.hours < NIGHT_EVO_HOUR_END) targetSpecies = formChanges[i].targetSpecies; break; default: diff --git a/src/pokemon_animation.c b/src/pokemon_animation.c index 57b3d5b303df..aff987f9fe33 100644 --- a/src/pokemon_animation.c +++ b/src/pokemon_animation.c @@ -1363,13 +1363,13 @@ static const u8 sBackAnimNatureModTable[NUM_NATURES] = static const union AffineAnimCmd sMonAffineAnim_0[] = { AFFINEANIMCMD_FRAME(256, 256, 0, 0), - AFFINEANIMCMDTYPE_END + {AFFINEANIMCMDTYPE_END} }; static const union AffineAnimCmd sMonAffineAnim_1[] = { AFFINEANIMCMD_FRAME(-256, 256, 0, 0), - AFFINEANIMCMDTYPE_END + {AFFINEANIMCMDTYPE_END} }; static const union AffineAnimCmd *const sMonAffineAnims[] = diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index aba3e9d31c9e..9478084d9b4b 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -4149,7 +4149,7 @@ struct UnusedPacket // Data packet that's never sent // No function to read it either -static void SendPacket_Unused(u32 data) +static void UNUSED SendPacket_Unused(u32 data) { struct UnusedPacket packet; packet.id = PACKET_UNUSED; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index b6bbad3ee8db..9e2abc2cf30a 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -1377,8 +1377,7 @@ void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero RemoveWindow(windowId); } -// Unused -static void UnusedDrawTextWindow(const u8 *string, void *dst, u16 offset, u8 bgColor, u8 fgColor, u8 shadowColor) +static void UNUSED UnusedDrawTextWindow(const u8 *string, void *dst, u16 offset, u8 bgColor, u8 fgColor, u8 shadowColor) { u32 tilesSize; u8 windowId; @@ -1493,8 +1492,7 @@ u8 *StringCopyAndFillWithSpaces(u8 *dst, const u8 *src, u16 n) return str; } -// Unused -static void UnusedWriteRectCpu(u16 *dest, u16 dest_left, u16 dest_top, const u16 *src, u16 src_left, u16 src_top, u16 dest_width, u16 dest_height, u16 src_width) +static void UNUSED UnusedWriteRectCpu(u16 *dest, u16 dest_left, u16 dest_top, const u16 *src, u16 src_left, u16 src_top, u16 dest_width, u16 dest_height, u16 src_width) { u16 i; @@ -1509,8 +1507,7 @@ static void UnusedWriteRectCpu(u16 *dest, u16 dest_left, u16 dest_top, const u16 } } -// Unused -static void UnusedWriteRectDma(u16 *dest, u16 dest_left, u16 dest_top, u16 width, u16 height) +static void UNUSED UnusedWriteRectDma(u16 *dest, u16 dest_left, u16 dest_top, u16 width, u16 height) { u16 i; @@ -1704,8 +1701,7 @@ static void CB2_ExitPokeStorage(void) SetMainCallback2(CB2_ReturnToField); } -// Unused -static s16 StorageSystemGetNextMonIndex(struct BoxPokemon *box, s8 startIdx, u8 stopIdx, u8 mode) +static s16 UNUSED StorageSystemGetNextMonIndex(struct BoxPokemon *box, s8 startIdx, u8 stopIdx, u8 mode) { s16 i; s16 direction; @@ -7968,8 +7964,7 @@ static void StartCursorAnim(u8 animNum) StartSpriteAnim(sStorage->cursorSprite, animNum); } -// Unused -static u8 GetMovingMonOriginalBoxId(void) +static u8 UNUSED GetMovingMonOriginalBoxId(void) { return sMovingMonOrigBoxId; } @@ -9479,14 +9474,14 @@ static void SpriteCB_ItemIcon_HideParty(struct Sprite *sprite) //------------------------------------------------------------------------------ -// Unused, leftover from FRLG -static void BackupPokemonStorage(void/*struct PokemonStorage * dest*/) +// Leftover from FRLG +static void UNUSED BackupPokemonStorage(void/*struct PokemonStorage * dest*/) { //*dest = *gPokemonStoragePtr; } -// Unused, leftover from FRLG -static void RestorePokemonStorage(void/*struct PokemonStorage * src*/) +// Leftover from FRLG +static void UNUSED RestorePokemonStorage(void/*struct PokemonStorage * src*/) { //*gPokemonStoragePtr = *src; } @@ -9878,8 +9873,7 @@ static void TilemapUtil_Free(void) Free(sTilemapUtil); } -// Unused -static void TilemapUtil_UpdateAll(void) +static void UNUSED TilemapUtil_UpdateAll(void) { s32 i; @@ -9943,8 +9937,7 @@ static void TilemapUtil_SetMap(u8 id, u8 bg, const void *tilemap, u16 width, u16 sTilemapUtil[id].active = TRUE; } -// Unused -static void TilemapUtil_SetSavedMap(u8 id, const void *tilemap) +static void UNUSED TilemapUtil_SetSavedMap(u8 id, const void *tilemap) { if (id >= sNumTilemapUtilIds) return; @@ -10094,8 +10087,7 @@ static void UnkUtil_Run(void) } } -// Unused -static bool8 UnkUtil_CpuAdd(u8 *dest, u16 dLeft, u16 dTop, const u8 *src, u16 sLeft, u16 sTop, u16 width, u16 height, u16 unkArg) +static bool8 UNUSED UnkUtil_CpuAdd(u8 *dest, u16 dLeft, u16 dTop, const u8 *src, u16 sLeft, u16 sTop, u16 width, u16 height, u16 unkArg) { struct UnkUtilData *data; @@ -10125,8 +10117,7 @@ static void UnkUtil_CpuRun(struct UnkUtilData *data) } } -// Unused -static bool8 UnkUtil_DmaAdd(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height) +static bool8 UNUSED UnkUtil_DmaAdd(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height) { struct UnkUtilData *data; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 79ade7cdd81d..7833d396f1a6 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -706,8 +706,10 @@ static const u8 sTextColors[][3] = {0, 7, 8} }; -static const u8 sAButton_Gfx[] = INCBIN_U8("graphics/summary_screen/a_button.4bpp"); -static const u8 sBButton_Gfx[] = INCBIN_U8("graphics/summary_screen/b_button.4bpp"); +static const u8 sButtons_Gfx[][4 * TILE_SIZE_4BPP] = { + INCBIN_U8("graphics/summary_screen/a_button.4bpp"), + INCBIN_U8("graphics/summary_screen/b_button.4bpp"), +}; static void (*const sTextPrinterFunctions[])(void) = { @@ -2897,8 +2899,13 @@ static void PrintGenderSymbol(struct Pokemon *mon, u16 species) static void PrintAOrBButtonIcon(u8 windowId, bool8 bButton, u32 x) { - // sBButton_Gfx - sizeof(sBButton_Gfx) = sAButton_Gfx - BlitBitmapToWindow(windowId, (bButton) ? sBButton_Gfx : sBButton_Gfx - sizeof(sBButton_Gfx), x, 0, 16, 16); + const u8 *button; + if (!bButton) + button = sButtons_Gfx[0]; + else + button = sButtons_Gfx[1]; + + BlitBitmapToWindow(windowId, button, x, 0, 16, 16); } static void PrintPageNamesAndStats(void) @@ -4085,8 +4092,7 @@ static void SummaryScreen_DestroyAnimDelayTask(void) } } -// unused -static bool32 IsMonAnimationFinished(void) +static bool32 UNUSED IsMonAnimationFinished(void) { if (gSprites[sMonSummaryScreen->spriteIds[SPRITE_ARR_ID_MON]].callback == SpriteCallbackDummy) return FALSE; diff --git a/src/pokenav_conditions_gfx.c b/src/pokenav_conditions_gfx.c index 9f4b2db61254..26d8e99e0686 100644 --- a/src/pokenav_conditions_gfx.c +++ b/src/pokenav_conditions_gfx.c @@ -548,7 +548,7 @@ static u32 LoopedTask_CloseMonMarkingsWindow(s32 state) return LT_FINISH; } -static u8 *UnusedPrintNumberString(u8 *dst, u16 num) +static u8 UNUSED *UnusedPrintNumberString(u8 *dst, u16 num) { u8 *txtPtr = ConvertIntToDecimalStringN(dst, num, STR_CONV_MODE_RIGHT_ALIGN, 4); txtPtr = StringCopy(txtPtr, gText_Number2); diff --git a/src/pokenav_match_call_list.c b/src/pokenav_match_call_list.c index b00c76b48af9..8d1a73f55718 100755 --- a/src/pokenav_match_call_list.c +++ b/src/pokenav_match_call_list.c @@ -278,22 +278,19 @@ int GetNumberRegistered(void) return state->numRegistered; } -// Unused -static int GetNumSpecialTrainers(void) +static int UNUSED GetNumSpecialTrainers(void) { struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); return state->numSpecialTrainers; } -// Unused -static int GetNumNormalTrainers(void) +static int UNUSED GetNumNormalTrainers(void) { struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); return state->numRegistered - state->numSpecialTrainers; } -// Unused -static int GetNormalTrainerHeaderId(int index) +static int UNUSED GetNormalTrainerHeaderId(int index) { struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); index += state->numSpecialTrainers; @@ -468,8 +465,7 @@ int GetIndexDeltaOfNextCheckPageUp(int index) return 0; } -// Unused -static bool32 HasRematchEntry(void) +static bool32 UNUSED HasRematchEntry(void) { int i; diff --git a/src/pokenav_ribbons_list.c b/src/pokenav_ribbons_list.c index 56492b4ec22e..72783b0972d1 100644 --- a/src/pokenav_ribbons_list.c +++ b/src/pokenav_ribbons_list.c @@ -227,8 +227,7 @@ static s32 GetRibbonsMonListCount(void) return list->monList->listCount; } -//unused -static s32 GetMonRibbonSelectedMonData(void) +static s32 UNUSED GetMonRibbonSelectedMonData(void) { struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); s32 idx = PokenavList_GetSelectedIndex(); @@ -343,8 +342,7 @@ static void InsertMonListItem(struct Pokenav_RibbonsMonList *list, struct Pokena list->monList->listCount++; } -// Unused -static bool32 PlayerHasRibbonsMon(void) +static bool32 UNUSED PlayerHasRibbonsMon(void) { s32 i, j; diff --git a/src/rayquaza_scene.c b/src/rayquaza_scene.c index cacadf5280bb..3264b22bdf08 100644 --- a/src/rayquaza_scene.c +++ b/src/rayquaza_scene.c @@ -1638,7 +1638,7 @@ static void Task_DuoFightAnim(u8 taskId) static void Task_DuoFight_AnimateClouds(u8 taskId) { s16 i; - u16 *data = gTasks[taskId].data; + u16 *data = (u16*)gTasks[taskId].data; for (i = 24; i < 92; i++) { diff --git a/src/recorded_battle.c b/src/recorded_battle.c index 455ff17ff138..4d36ce12b275 100644 --- a/src/recorded_battle.c +++ b/src/recorded_battle.c @@ -193,8 +193,7 @@ u8 RecordedBattle_GetBattlerAction(u32 actionType, u8 battlerId) } } -// Unused -static u8 GetRecordedBattleMode(void) +static u8 UNUSED GetRecordedBattleMode(void) { return sRecordMode; } diff --git a/src/region_map.c b/src/region_map.c index 7d5fe93654f6..21c6314d30a2 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1434,14 +1434,12 @@ static void FreeRegionMapCursorSprite(void) } } -// Unused -static void SetUnkCursorSpriteData(void) +static void UNUSED SetUnkCursorSpriteData(void) { sRegionMap->cursorSprite->data[3] = TRUE; } -// Unused -static void ClearUnkCursorSpriteData(void) +static void UNUSED ClearUnkCursorSpriteData(void) { sRegionMap->cursorSprite->data[3] = FALSE; } diff --git a/src/roulette.c b/src/roulette.c index d311ad094081..44dac2db6caf 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -3556,8 +3556,7 @@ static void CreateGridSprites(void) } } -// Unused -static void DestroyGridSprites(void) +static void UNUSED DestroyGridSprites(void) { u8 i; for (i = 0; i < NUM_ROULETTE_SLOTS; i++) @@ -4353,7 +4352,7 @@ static void CreateShroomishSprite(struct Sprite *ball) {116, 44}, {116, 112} }; - struct Roulette *roulette; + struct Roulette UNUSED *roulette; t = ball->data[7] - 2; roulette = sRoulette; // Unnecessary, needed to match diff --git a/src/rtc.c b/src/rtc.c index b135a675a844..b79f62a3c468 100644 --- a/src/rtc.c +++ b/src/rtc.c @@ -16,20 +16,20 @@ struct Time gLocalTime; static const struct SiiRtcInfo sRtcDummy = {0, MONTH_JAN, 1}; // 2000 Jan 1 -static const s32 sNumDaysInMonths[12] = +static const s32 sNumDaysInMonths[MONTH_COUNT] = { - 31, - 28, - 31, - 30, - 31, - 30, - 31, - 31, - 30, - 31, - 30, - 31, + [MONTH_JAN - 1] = 31, + [MONTH_FEB - 1] = 28, + [MONTH_MAR - 1] = 31, + [MONTH_APR - 1] = 30, + [MONTH_MAY - 1] = 31, + [MONTH_JUN - 1] = 30, + [MONTH_JUL - 1] = 31, + [MONTH_AUG - 1] = 31, + [MONTH_SEP - 1] = 30, + [MONTH_OCT - 1] = 31, + [MONTH_NOV - 1] = 30, + [MONTH_DEC - 1] = 31, }; void RtcDisableInterrupts(void) @@ -171,7 +171,7 @@ u16 RtcCheckInfo(struct SiiRtcInfo *rtc) month = ConvertBcdToBinary(rtc->month); - if (month == 0xFF || month == 0 || month > 12) + if (month == 0xFF || month == 0 || month > MONTH_COUNT) errorFlags |= RTC_ERR_INVALID_MONTH; value = ConvertBcdToBinary(rtc->day); @@ -192,17 +192,17 @@ u16 RtcCheckInfo(struct SiiRtcInfo *rtc) value = ConvertBcdToBinary(rtc->hour); - if (value > 24) + if (value > HOURS_PER_DAY) errorFlags |= RTC_ERR_INVALID_HOUR; value = ConvertBcdToBinary(rtc->minute); - if (value > 60) + if (value > MINUTES_PER_HOUR) errorFlags |= RTC_ERR_INVALID_MINUTE; value = ConvertBcdToBinary(rtc->second); - if (value > 60) + if (value > SECONDS_PER_MINUTE) errorFlags |= RTC_ERR_INVALID_SECOND; return errorFlags; @@ -270,19 +270,19 @@ void RtcCalcTimeDifference(struct SiiRtcInfo *rtc, struct Time *result, struct T if (result->seconds < 0) { - result->seconds += 60; + result->seconds += SECONDS_PER_MINUTE; --result->minutes; } if (result->minutes < 0) { - result->minutes += 60; + result->minutes += MINUTES_PER_HOUR; --result->hours; } if (result->hours < 0) { - result->hours += 24; + result->hours += HOURS_PER_DAY; --result->days; } } @@ -317,19 +317,19 @@ void CalcTimeDifference(struct Time *result, struct Time *t1, struct Time *t2) if (result->seconds < 0) { - result->seconds += 60; + result->seconds += SECONDS_PER_MINUTE; --result->minutes; } if (result->minutes < 0) { - result->minutes += 60; + result->minutes += MINUTES_PER_HOUR; --result->hours; } if (result->hours < 0) { - result->hours += 24; + result->hours += HOURS_PER_DAY; --result->days; } } @@ -337,7 +337,7 @@ void CalcTimeDifference(struct Time *result, struct Time *t1, struct Time *t2) u32 RtcGetMinuteCount(void) { RtcGetInfo(&sRtc); - return (24 * 60) * RtcGetDayCount(&sRtc) + 60 * sRtc.hour + sRtc.minute; + return (HOURS_PER_DAY * MINUTES_PER_HOUR) * RtcGetDayCount(&sRtc) + MINUTES_PER_HOUR * sRtc.hour + sRtc.minute; } u32 RtcGetLocalDayCount(void) diff --git a/src/scrcmd.c b/src/scrcmd.c index 51db8ebc6aab..4b3835422ec7 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -77,12 +77,12 @@ void * const gNullScriptPtr = NULL; static const u8 sScriptConditionTable[6][3] = { // < = > - 1, 0, 0, // < - 0, 1, 0, // = - 0, 0, 1, // > - 1, 1, 0, // <= - 0, 1, 1, // >= - 1, 0, 1, // != + {1, 0, 0}, // < + {0, 1, 0}, // = + {0, 0, 1}, // > + {1, 1, 0}, // <= + {0, 1, 1}, // >= + {1, 0, 1}, // != }; static u8 *const sScriptStringVars[] = diff --git a/src/script_menu.c b/src/script_menu.c index 842a1db797e2..d47d459e5eb4 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -64,8 +64,7 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8 } } -// Unused -static u16 GetLengthWithExpandedPlayerName(const u8 *str) +static u16 UNUSED GetLengthWithExpandedPlayerName(const u8 *str) { u16 length = 0; diff --git a/src/slot_machine.c b/src/slot_machine.c index 20386a2528b5..5ae0f9f1d522 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -5813,8 +5813,8 @@ static const struct SpriteFrameImage sImageTable_ReelTimeNumbers[] = { gSlotMachineReelTimeNumber5, 0x80 }, }; -static const struct SpriteFrameImage sImageTable_ReelTimeShadow[] = { gSlotMachineReelTimeShadow, 0x200 }; -static const struct SpriteFrameImage sImageTable_ReelTimeNumberGap[] = { gSlotMachineReelTimeNumberGap_Gfx, 0x40 }; +static const struct SpriteFrameImage sImageTable_ReelTimeShadow[] = { {gSlotMachineReelTimeShadow, 0x200} }; +static const struct SpriteFrameImage sImageTable_ReelTimeNumberGap[] = { {gSlotMachineReelTimeNumberGap_Gfx, 0x40} }; static const struct SpriteFrameImage sImageTable_ReelTimeBolt[] = { @@ -5822,7 +5822,7 @@ static const struct SpriteFrameImage sImageTable_ReelTimeBolt[] = { gSlotMachineReelTimeBolt1, 0x100 }, }; -static const struct SpriteFrameImage sImageTable_ReelTimePikachuAura[] = { gSlotMachineReelTimePikaAura, 0x400 }; +static const struct SpriteFrameImage sImageTable_ReelTimePikachuAura[] = { {gSlotMachineReelTimePikaAura, 0x400} }; static const struct SpriteFrameImage sImageTable_ReelTimeExplosion[] = { @@ -5830,9 +5830,9 @@ static const struct SpriteFrameImage sImageTable_ReelTimeExplosion[] = { gSlotMachineReelTimeExplosion1, 0x200 }, }; -static const struct SpriteFrameImage sImageTable_ReelTimeDuck[] = { gSlotMachineReelTimeDuck, 0x20}; -static const struct SpriteFrameImage sImageTable_ReelTimeSmoke[] = { gSlotMachineReelTimeSmoke, 0x80}; -static const struct SpriteFrameImage sImageTable_PikaPowerBolt[] = { gSlotMachinePikaPowerBolt, 0x20}; +static const struct SpriteFrameImage sImageTable_ReelTimeDuck[] = { {gSlotMachineReelTimeDuck, 0x20} }; +static const struct SpriteFrameImage sImageTable_ReelTimeSmoke[] = { {gSlotMachineReelTimeSmoke, 0x80} }; +static const struct SpriteFrameImage sImageTable_PikaPowerBolt[] = { {gSlotMachinePikaPowerBolt, 0x20} }; static const union AnimCmd sAnim_SingleFrame[] = { @@ -6485,7 +6485,7 @@ static const struct Subsprite sSubsprites_ReelBackground[] = static const struct SubspriteTable sSubspriteTable_ReelBackground[] = { - ARRAY_COUNT(sSubsprites_ReelBackground), sSubsprites_ReelBackground + {ARRAY_COUNT(sSubsprites_ReelBackground), sSubsprites_ReelBackground} }; /* v-- Origin on 3 @@ -6547,7 +6547,7 @@ static const struct Subsprite sSubsprites_ReelTimeMachineAntennae[] = static const struct SubspriteTable sSubspriteTable_ReelTimeMachineAntennae[] = { - ARRAY_COUNT(sSubsprites_ReelTimeMachineAntennae), sSubsprites_ReelTimeMachineAntennae + {ARRAY_COUNT(sSubsprites_ReelTimeMachineAntennae), sSubsprites_ReelTimeMachineAntennae} }; /* @@ -6587,7 +6587,7 @@ static const struct Subsprite sSubsprites_ReelTimeMachine[] = static const struct SubspriteTable sSubspriteTable_ReelTimeMachine[] = { - ARRAY_COUNT(sSubsprites_ReelTimeMachine), sSubsprites_ReelTimeMachine + {ARRAY_COUNT(sSubsprites_ReelTimeMachine), sSubsprites_ReelTimeMachine} }; /* @@ -6644,7 +6644,7 @@ static const struct Subsprite sSubsprites_BrokenReelTimeMachine[] = static const struct SubspriteTable sSubspriteTable_BrokenReelTimeMachine[] = { - ARRAY_COUNT(sSubsprites_BrokenReelTimeMachine), sSubsprites_BrokenReelTimeMachine + {ARRAY_COUNT(sSubsprites_BrokenReelTimeMachine), sSubsprites_BrokenReelTimeMachine} }; /* v-- Origin on 3 @@ -6689,7 +6689,7 @@ static const struct Subsprite sSubsprites_ReelTimeShadow[] = static const struct SubspriteTable sSubspriteTable_ReelTimeShadow[] = { - ARRAY_COUNT(sSubsprites_ReelTimeShadow), sSubsprites_ReelTimeShadow + {ARRAY_COUNT(sSubsprites_ReelTimeShadow), sSubsprites_ReelTimeShadow} }; /* @@ -6727,7 +6727,7 @@ static const struct Subsprite sSubsprites_ReelTimeNumberGap[] = static const struct SubspriteTable sSubspriteTable_ReelTimeNumberGap[] = { - ARRAY_COUNT(sSubsprites_ReelTimeNumberGap), sSubsprites_ReelTimeNumberGap + {ARRAY_COUNT(sSubsprites_ReelTimeNumberGap), sSubsprites_ReelTimeNumberGap} }; /* @@ -6784,7 +6784,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_Reel[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Reel[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_Reel), sSubsprites_DigitalDisplay_Reel + {ARRAY_COUNT(sSubsprites_DigitalDisplay_Reel), sSubsprites_DigitalDisplay_Reel} }; /* v-- Origin on 3 @@ -6829,7 +6829,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_Time[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Time[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_Time), sSubsprites_DigitalDisplay_Time + {ARRAY_COUNT(sSubsprites_DigitalDisplay_Time), sSubsprites_DigitalDisplay_Time} }; /* v-- Origin on 3 @@ -6874,7 +6874,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_Insert[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Insert[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_Insert), sSubsprites_DigitalDisplay_Insert + {ARRAY_COUNT(sSubsprites_DigitalDisplay_Insert), sSubsprites_DigitalDisplay_Insert} }; /* v-- Origin on 3 @@ -6919,7 +6919,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_Unused1[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Unused1[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_Unused1), sSubsprites_DigitalDisplay_Unused1 + {ARRAY_COUNT(sSubsprites_DigitalDisplay_Unused1), sSubsprites_DigitalDisplay_Unused1} }; /* v-- Origin on 3 @@ -6981,7 +6981,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_Win[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Win[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_Win), sSubsprites_DigitalDisplay_Win + {ARRAY_COUNT(sSubsprites_DigitalDisplay_Win), sSubsprites_DigitalDisplay_Win} }; static const struct Subsprite sSubsprites_DigitalDisplay_Smoke[] = @@ -7010,12 +7010,12 @@ static const struct Subsprite sSubsprites_DigitalDisplay_Unused2[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Smoke[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_Smoke), sSubsprites_DigitalDisplay_Smoke + {ARRAY_COUNT(sSubsprites_DigitalDisplay_Smoke), sSubsprites_DigitalDisplay_Smoke} }; static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Unused2[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_Unused2), sSubsprites_DigitalDisplay_Unused2 + {ARRAY_COUNT(sSubsprites_DigitalDisplay_Unused2), sSubsprites_DigitalDisplay_Unused2} }; /* @@ -7128,7 +7128,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_Pokeball[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Pokeball[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_Pokeball), sSubsprites_DigitalDisplay_Pokeball + {ARRAY_COUNT(sSubsprites_DigitalDisplay_Pokeball), sSubsprites_DigitalDisplay_Pokeball} }; /* @@ -7166,7 +7166,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_DPad[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_DPad[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_DPad), sSubsprites_DigitalDisplay_DPad + {ARRAY_COUNT(sSubsprites_DigitalDisplay_DPad), sSubsprites_DigitalDisplay_DPad} }; /* @@ -7195,7 +7195,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_StopS[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_StopS[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_StopS), sSubsprites_DigitalDisplay_StopS + {ARRAY_COUNT(sSubsprites_DigitalDisplay_StopS), sSubsprites_DigitalDisplay_StopS} }; /* @@ -7224,7 +7224,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_StopT[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_StopT[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_StopT), sSubsprites_DigitalDisplay_StopT + {ARRAY_COUNT(sSubsprites_DigitalDisplay_StopT), sSubsprites_DigitalDisplay_StopT} }; /* @@ -7253,7 +7253,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_StopO[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_StopO[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_StopO), sSubsprites_DigitalDisplay_StopO + {ARRAY_COUNT(sSubsprites_DigitalDisplay_StopO), sSubsprites_DigitalDisplay_StopO} }; /* @@ -7282,7 +7282,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_StopP[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_StopP[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_StopP), sSubsprites_DigitalDisplay_StopP + {ARRAY_COUNT(sSubsprites_DigitalDisplay_StopP), sSubsprites_DigitalDisplay_StopP} }; /* @@ -7311,7 +7311,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_BonusB[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusB[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusB), sSubsprites_DigitalDisplay_BonusB + {ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusB), sSubsprites_DigitalDisplay_BonusB} }; /* @@ -7340,7 +7340,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_BonusO[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusO[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusO), sSubsprites_DigitalDisplay_BonusO + {ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusO), sSubsprites_DigitalDisplay_BonusO} }; /* @@ -7369,7 +7369,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_BonusN[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusN[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusN), sSubsprites_DigitalDisplay_BonusN + {ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusN), sSubsprites_DigitalDisplay_BonusN} }; /* @@ -7398,7 +7398,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_BonusU[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusU[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusU), sSubsprites_DigitalDisplay_BonusU + {ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusU), sSubsprites_DigitalDisplay_BonusU} }; /* @@ -7427,7 +7427,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_BonusS[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusS[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusS), sSubsprites_DigitalDisplay_BonusS + {ARRAY_COUNT(sSubsprites_DigitalDisplay_BonusS), sSubsprites_DigitalDisplay_BonusS} }; /* @@ -7490,7 +7490,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_BigB[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BigB[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_BigB), sSubsprites_DigitalDisplay_BigB + {ARRAY_COUNT(sSubsprites_DigitalDisplay_BigB), sSubsprites_DigitalDisplay_BigB} }; /* @@ -7528,7 +7528,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_BigI[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BigI[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_BigI), sSubsprites_DigitalDisplay_BigI + {ARRAY_COUNT(sSubsprites_DigitalDisplay_BigI), sSubsprites_DigitalDisplay_BigI} }; /* @@ -7591,7 +7591,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_BigG[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BigG[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_BigG), sSubsprites_DigitalDisplay_BigG + {ARRAY_COUNT(sSubsprites_DigitalDisplay_BigG), sSubsprites_DigitalDisplay_BigG} }; /* @@ -7654,7 +7654,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_RegR[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_RegR[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_RegR), sSubsprites_DigitalDisplay_RegR + {ARRAY_COUNT(sSubsprites_DigitalDisplay_RegR), sSubsprites_DigitalDisplay_RegR} }; /* @@ -7692,7 +7692,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_RegE[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_RegE[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_RegE), sSubsprites_DigitalDisplay_RegE + {ARRAY_COUNT(sSubsprites_DigitalDisplay_RegE), sSubsprites_DigitalDisplay_RegE} }; /* @@ -7755,7 +7755,7 @@ static const struct Subsprite sSubsprites_DigitalDisplay_RegG[] = static const struct SubspriteTable sSubspriteTable_DigitalDisplay_RegG[] = { - ARRAY_COUNT(sSubsprites_DigitalDisplay_RegG), sSubsprites_DigitalDisplay_RegG + {ARRAY_COUNT(sSubsprites_DigitalDisplay_RegG), sSubsprites_DigitalDisplay_RegG} }; static const struct SpriteTemplate *const sSpriteTemplates_DigitalDisplay[NUM_DIG_DISPLAY_SPRITES] = diff --git a/src/sound.c b/src/sound.c index 955895c63724..e84bedfec13b 100644 --- a/src/sound.c +++ b/src/sound.c @@ -156,8 +156,7 @@ void FadeOutAndFadeInNewMapMusic(u16 songNum, u8 fadeOutSpeed, u8 fadeInSpeed) sMapMusicFadeInSpeed = fadeInSpeed; } -// Unused -static void FadeInNewMapMusic(u16 songNum, u8 speed) +static void UNUSED FadeInNewMapMusic(u16 songNum, u8 speed) { FadeInNewBGM(songNum, speed); sCurrentMapMusic = songNum; diff --git a/src/start_menu.c b/src/start_menu.c index 0fbbfe0417a6..7924520fa60a 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -85,7 +85,7 @@ EWRAM_DATA static u8 sBattlePyramidFloorWindowId = 0; EWRAM_DATA static u8 sStartMenuCursorPos = 0; EWRAM_DATA static u8 sNumStartMenuActions = 0; EWRAM_DATA static u8 sCurrentStartMenuActions[9] = {0}; -EWRAM_DATA static u8 sInitStartMenuData[2] = {0}; +EWRAM_DATA static s8 sInitStartMenuData[2] = {0}; EWRAM_DATA static u8 (*sSaveDialogCallback)(void) = NULL; EWRAM_DATA static u8 sSaveDialogTimer = 0; diff --git a/src/trade.c b/src/trade.c index 4b98a1a07660..95538ab40b3e 100644 --- a/src/trade.c +++ b/src/trade.c @@ -3102,7 +3102,7 @@ static void UpdatePokedexForReceivedMon(u8 partyIdx) // Functionally nop after commented code static void TryEnableNationalDexFromLinkPartner(void) { - u8 mpId = GetMultiplayerId(); + u8 UNUSED mpId = GetMultiplayerId(); // Originally in Ruby but commented out /*if (gLinkPlayers[mpId ^ 1].lp_field_2 == 0x8000) EnableNationalPokedex();*/ diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 419133e28e61..78604f2f49cd 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -571,7 +571,7 @@ static void IsTrainerHillChallengeActive(void) gSpecialVar_Result = TRUE; } -static void TrainerHillDummy_Unused(void) +static void UNUSED TrainerHillDummy_Unused(void) { } @@ -769,8 +769,7 @@ u8 GetCurrentTrainerHillMapId(void) return mapId; } -// Unused -static bool32 OnTrainerHillRoof(void) +static bool32 UNUSED OnTrainerHillRoof(void) { bool32 onRoof; diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index 14849c19e54d..71a58a55c198 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -316,8 +316,7 @@ u16 FreeAndDestroyMonPicSprite(u16 spriteId) return FreeAndDestroyPicSpriteInternal(spriteId); } -// Unused -static u16 LoadMonPicInWindow(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId) +static u16 UNUSED LoadMonPicInWindow(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId) { return LoadPicSpriteInWindow(species, otId, personality, isFrontPic, paletteSlot, windowId, FALSE); } @@ -338,8 +337,7 @@ u16 FreeAndDestroyTrainerPicSprite(u16 spriteId) return FreeAndDestroyPicSpriteInternal(spriteId); } -// Unused -static u16 LoadTrainerPicInWindow(u16 species, bool8 isFrontPic, u8 paletteSlot, u8 windowId) +static u16 UNUSED LoadTrainerPicInWindow(u16 species, bool8 isFrontPic, u8 paletteSlot, u8 windowId) { return LoadPicSpriteInWindow(species, 0, 0, isFrontPic, paletteSlot, windowId, TRUE); } diff --git a/src/trainer_see.c b/src/trainer_see.c index 6e1d41055ce0..718afb19d1b0 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -630,7 +630,7 @@ static void Task_SetBuriedTrainerMovement(u8 taskId) struct Task *task = &gTasks[taskId]; struct ObjectEvent *objEvent; - LoadWordFromTwoHalfwords(&task->tObjEvent, (u32 *)&objEvent); + LoadWordFromTwoHalfwords((u16*) &task->tObjEvent, (u32 *)&objEvent); if (!task->data[7]) { ObjectEventClearHeldMovement(objEvent); @@ -652,7 +652,7 @@ static void Task_SetBuriedTrainerMovement(u8 taskId) // Called when a buried Trainer has the reveal_trainer movement applied, from direct interaction void SetBuriedTrainerMovement(struct ObjectEvent *objEvent) { - StoreWordInTwoHalfwords(&gTasks[CreateTask(Task_SetBuriedTrainerMovement, 0)].tObjEvent, (u32)objEvent); + StoreWordInTwoHalfwords((u16*) &gTasks[CreateTask(Task_SetBuriedTrainerMovement, 0)].tObjEvent, (u32)objEvent); } void DoTrainerApproach(void) diff --git a/src/tv.c b/src/tv.c index c96703848be8..a3e56e165de4 100644 --- a/src/tv.c +++ b/src/tv.c @@ -3939,8 +3939,7 @@ else \ (langptr) = langfix; \ } -// Unused -static void TranslateShowNames(TVShow *show, u32 language) +static void UNUSED TranslateShowNames(TVShow *show, u32 language) { int i; TVShow **shows; diff --git a/src/union_room.c b/src/union_room.c index 0d33a352127d..a9a671a9ef50 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1043,8 +1043,8 @@ static void Task_TryJoinLinkGroup(u8 taskId) id = ListMenu_ProcessInput(data->listTaskId); if (JOY_NEW(A_BUTTON) && id != LIST_NOTHING_CHOSEN) { - // this unused variable along with the assignment is needed to match - u32 activity = data->playerList->players[id].rfu.data.activity; + // Needed to match + u32 UNUSED activity = data->playerList->players[id].rfu.data.activity; if (data->playerList->players[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->playerList->players[id].rfu.data.startedActivity) { @@ -2149,8 +2149,8 @@ static void Task_CardOrNewsWithFriend(u8 taskId) id = ListMenu_ProcessInput(data->listTaskId); if (JOY_NEW(A_BUTTON) && id != LIST_NOTHING_CHOSEN) { - // this unused variable along with the assignment is needed to match - u32 activity = data->playerList->players[id].rfu.data.activity; + // Needed to match + u32 UNUSED activity = data->playerList->players[id].rfu.data.activity; if (data->playerList->players[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->playerList->players[id].rfu.data.startedActivity) { diff --git a/src/union_room_chat.c b/src/union_room_chat.c index dabb49422947..a109624508e2 100644 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -744,11 +744,11 @@ static const struct MessageWindowInfo sDisplayStdMessages[] = { static const u8 sText_Ellipsis[] = _("…"); static const struct MenuAction sKeyboardPageTitleTexts[UNION_ROOM_KB_PAGE_COUNT + 1] = { - [UNION_ROOM_KB_PAGE_UPPER] = {gText_Upper, NULL}, - [UNION_ROOM_KB_PAGE_LOWER] = {gText_Lower, NULL}, - [UNION_ROOM_KB_PAGE_EMOJI] = {gText_Symbols, NULL}, - [UNION_ROOM_KB_PAGE_REGISTER] = {gText_Register2, NULL}, - [UNION_ROOM_KB_PAGE_COUNT] = {gText_Exit2, NULL}, + [UNION_ROOM_KB_PAGE_UPPER] = {gText_Upper, {NULL}}, + [UNION_ROOM_KB_PAGE_LOWER] = {gText_Lower, {NULL}}, + [UNION_ROOM_KB_PAGE_EMOJI] = {gText_Symbols, {NULL}}, + [UNION_ROOM_KB_PAGE_REGISTER] = {gText_Register2, {NULL}}, + [UNION_ROOM_KB_PAGE_COUNT] = {gText_Exit2, {NULL}}, }; static const u16 sUnionRoomChatInterfacePal[] = INCBIN_U16("graphics/union_room_chat/interface.gbapal"); diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index 06df5d0a3349..1defb73ea943 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -1108,8 +1108,7 @@ static u8 GetSelectionIdFromPartyId(u8 partyId) return partyId - numEggs; } -// Unused -static u8 GetPartyIdFromSelectionId_(u8 selectionId) +static u8 UNUSED GetPartyIdFromSelectionId_(u8 selectionId) { return GetPartyIdFromSelectionId(selectionId); }