From c722b7755808e0ee34b84087f3a31a28bf685cad Mon Sep 17 00:00:00 2001 From: PokeCodec Date: Mon, 27 Jul 2020 12:47:08 -0400 Subject: [PATCH] holding back on casts --- src/agb_flash.c | 2 +- src/battle_anim_effects_1.c | 2 +- src/hall_of_fame.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/agb_flash.c b/src/agb_flash.c index 0045219c41..eeccf11164 100644 --- a/src/agb_flash.c +++ b/src/agb_flash.c @@ -242,7 +242,7 @@ u32 VerifyFlashSectorNBytes(u16 sectorNum, u8 *src, u32 n) funcSrc = (u16 *)((uintptr_t)funcSrc ^ 1); funcDest = verifyFlashSector_Core_Buffer; - i = (u16)(((uintptr_t)VerifyFlashSector - (uintptr_t)VerifyFlashSector_Core) >> 1); + i = ((uintptr_t)VerifyFlashSector - (uintptr_t)VerifyFlashSector_Core) >> 1; while (i != 0) { diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index e9930eeef0..f93b2a5c48 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -4445,7 +4445,7 @@ static void AnimBowMon_Step1_Callback(struct Sprite* sprite) { sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker]; PrepareBattlerSpriteForRotScale(sprite->data[3], ST_OAM_OBJ_NORMAL); - sprite->data[4] = (sprite->data[6] = GetBattlerSide(gBattleAnimAttacker)) ? 0x300 : (s16)0xFFFFFD00; + sprite->data[4] = (sprite->data[6] = GetBattlerSide(gBattleAnimAttacker)) ? 0x300 : 0xFFFFFD00; sprite->data[5] = 0; } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 8e47c1e3ae..bf9850deca 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -612,7 +612,7 @@ static void Task_Hof_PrintMonInfoAfterAnimating(u8 taskId) static void Task_Hof_TryDisplayAnotherMon(u8 taskId) { - u16 currPokeID = (u16)gTasks[taskId].tDisplayedMonId; + u16 currPokeID = gTasks[taskId].tDisplayedMonId; struct HallofFameMon* currMon = &sHofMonPtr->mon[currPokeID]; if (gTasks[taskId].tFrameCount != 0) @@ -1483,7 +1483,7 @@ static void UpdateDomeConfetti(struct ConfettiUtil *util) static void Task_DoDomeConfetti(u8 taskId) { u32 id = 0; - u16 *data = (u16 *)gTasks[taskId].data; + u16 *data = gTasks[taskId].data; switch (tState) {