From 810ca5f8ff79aeec6ffe8e982f4786aade616b4d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 7 Jul 2021 09:11:52 -0400 Subject: Flatten pos fields in struct Sprite --- src/overworld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/overworld.c') diff --git a/src/overworld.c b/src/overworld.c index 979ebb74c..a2f38c864 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -3199,8 +3199,8 @@ static void SpriteCB_LinkPlayer(struct Sprite *sprite) { struct LinkPlayerObjectEvent *linkPlayerObjEvent = &gLinkPlayerObjectEvents[sprite->data[0]]; struct ObjectEvent *objEvent = &gObjectEvents[linkPlayerObjEvent->objEventId]; - sprite->pos1.x = objEvent->initialCoords.x; - sprite->pos1.y = objEvent->initialCoords.y; + sprite->x = objEvent->initialCoords.x; + sprite->y = objEvent->initialCoords.y; SetObjectSubpriorityByZCoord(objEvent->previousElevation, sprite, 1); sprite->oam.priority = ZCoordToPriority(objEvent->previousElevation); -- cgit v1.2.3 From 554210c5e315e786ddc6eef888e9ff6065ad73f8 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 24 Aug 2021 19:59:32 -0300 Subject: Removed trailing spaces in the most relevant files Command used for the job: egrep -rl ' $' --include *.c --include *.h --include *.s --include *.inc --include *.txt * | xargs sed -i 's/\s\+$//g' Credits to Grant Murphy from Stack Overflow. --- src/overworld.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/overworld.c') diff --git a/src/overworld.c b/src/overworld.c index a2f38c864..844716985 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -823,7 +823,7 @@ void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum) ResetFieldTasksArgs(); RunOnResumeMapScript(); - if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER + if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER || gMapHeader.regionMapSectionId != sLastMapSectionId) ShowMapNamePopup(); } @@ -2235,10 +2235,10 @@ static void CB1_UpdateLinkState(void) // Note: Because guestId is between 0 and 4, while the smallest key code is // LINK_KEY_CODE_EMPTY, this is functionally equivalent to `sPlayerKeyInterceptCallback(0)`. - // It is expecting the callback to be KeyInterCB_SelfIdle, and that will + // It is expecting the callback to be KeyInterCB_SelfIdle, and that will // completely ignore any input parameters. // - // UpdateHeldKeyCode performs a sanity check on its input; if + // UpdateHeldKeyCode performs a sanity check on its input; if // sPlayerKeyInterceptCallback echoes back the argument, which is selfId, then // it'll use LINK_KEY_CODE_EMPTY instead. // @@ -3051,7 +3051,7 @@ static void SetPlayerFacingDirection(u8 linkPlayerId, u8 facing) #define TEMP gLinkPlayerMovementModes[linkPlayerObjEvent->movementMode](linkPlayerObjEvent, objEvent, facing) gMovementStatusHandler[TEMP](linkPlayerObjEvent, objEvent); - + // Clean up the hack. #undef TEMP } -- cgit v1.2.3 From f8f7617946e150514313267ba52a35ebd9052936 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 14 Sep 2021 13:14:14 -0400 Subject: Add TAG_NONE --- src/overworld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/overworld.c') diff --git a/src/overworld.c b/src/overworld.c index a2f38c864..41990a81e 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -1082,7 +1082,7 @@ static bool16 IsInflitratedSpaceCenter(struct WarpData *warp) u16 GetLocationMusic(struct WarpData *warp) { if (NoMusicInSotopolisWithLegendaries(warp) == TRUE) - return 0xFFFF; + return MUS_NONE; else if (ShouldLegendaryMusicPlayAtLocation(warp) == TRUE) return MUS_ABNORMAL_WEATHER; else if (IsInflitratedSpaceCenter(warp) == TRUE) -- cgit v1.2.3