From 712669c822af2e7d5089f667069a71d214062530 Mon Sep 17 00:00:00 2001 From: Ariel A <24759293+aarant@users.noreply.github.com> Date: Sat, 29 Jul 2023 13:52:22 -0400 Subject: [PATCH] Added support for follower bobbing. See event_objects.h --- .../object_events/pics/pokemon/togetic.png | Bin 4693 -> 8101 bytes include/constants/event_objects.h | 4 ++ src/event_object_movement.c | 59 ++++++++++++------ 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/graphics/object_events/pics/pokemon/togetic.png b/graphics/object_events/pics/pokemon/togetic.png index 74f8346b6a3008a974b85707240ff086f8fb643f..a7da7b76af5229f9cc7a271b6db40e4c361971b5 100644 GIT binary patch literal 8101 zcmeHrc{r49*#6i<_I)X1lqJn#3}c3|jx~D-5wkK`n;AQiC0VjXiDXMjwg_26WGP!x zQe-PyEG4N>-%#&%{JwwQlGTJkN7q=XKuKb>7!~A9GEDwWTo+mn0Ve0N^n- z!P+wJ?Tib^%EI`ruRmE20Pt#r+Bwo~aX~6>gMPeHy1!?R=%`e`1UPq zwj?F!gG|iUk5--{kIoL~#Ahx-RVDR9%qO?TZXA+fuPT99KB`-DYD<}~%HmJc=~mjl zQ?{^CzV-FPYcsJe&-@{8n0Gay?!?L{73ZgkY38Y zFdyxW?;b%DXxSyV-0xGfn+ZZl*{T&%-omuiSFNdqS(MChSg+-yhLEc*R9P^x!P{wV z;7412xFcTq1p7*fG+dyEypNQ1bkyLgv(_58xbkE`MukDBvhl;zy7{1~b<3bnMEt`m zPVg8~rJ_~K*1n;i=;2m@7gyx64PQClt`yWINu)OhzdkIOv4TvQ=ULrY+c2K5%g_tC zul2m(`nClA$d68k>C(1@$}5U3k^LaPP01*Jm4@nUmpuy!~O->6+=)gUh*2*{@^h^?`e-aoM-LI5CU)E#D2l0 zx&}z=#z@Q-{mIDLWbFsp1fINrdZpSSl?ByjPwXAyq)F>)PhGrj!f(QBsCCrncaY}g zdeR2w%S*5KOxid0p|+D%^J`O_Z=YO^4Ukgzxf~i;Fh9`U%$M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7Ye}p8GTa@7`O#`*4*A& z`#607GSpS-1~@nbMvIia?(yz$XK(+WY4!I5%gb_PEt7@;kdqo6XMf}d5(5f3ll@0q z0006eNkls4$0MULSn`{j6AUzD!VML}rRj^HdTQVa#WRos$TTB4s3w33%HV#)*Al3}Y(uib9SETn zL1JNtU9TljfyJ{QfHrh>5hM(zXP8SModjeH3D5zQ=VLOrX>HCC4Cc*)E~de+$kBQMWIWap9k}nu1t}M;2L*4>gmf>LQQVT^ z6F5sg#w7ZstoC0k0_}ivY&$y)E6S*TxyUnbObacw1b+L+Qh?M7ZnuTsauEK5Hr93< z@D`WlmekdLfPdThL?LW;-NqUSpgC(!gmV%9KmZlz_-+b)R9K$^XyethX;|J&ynIHz zgPmg++AA0lfAFB>4wwB^Ti&6vJU}$yGc3!9uTKx6!W+IU@QN;n06JXxZt;b&RzUe< zdBc?)z~uJ6!q+|plcPm{y~0mY0jcF1seqL8Z=?o}-%PvYsO2DQhmKT0W`^{#$w89N zzXO?}a}A^>f2U?({?5%oGSI#XX7L9v@hpBff&5vVychpx?KgksNWYv`pP~Q&002ov JPDHLkV1i0@w#@(l diff --git a/include/constants/event_objects.h b/include/constants/event_objects.h index 33b352350c..b9f1aad78d 100644 --- a/include/constants/event_objects.h +++ b/include/constants/event_objects.h @@ -276,6 +276,10 @@ #define OBJ_EVENT_GFX_VAR_E (OBJ_EVENT_GFX_VARS + 0xE) #define OBJ_EVENT_GFX_VAR_F (OBJ_EVENT_GFX_VARS + 0xF) // 255 +// If true, follower pokemon will bob up and down +// during their idle & walking animations +#define OW_MON_BOBBING TRUE + #define SHADOW_SIZE_S 0 #define SHADOW_SIZE_M 1 #define SHADOW_SIZE_L 2 diff --git a/src/event_object_movement.c b/src/event_object_movement.c index de70311b25..4a0f4f3e58 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -4973,19 +4973,17 @@ bool8 MovementType_FollowPlayer_Shadow(struct ObjectEvent *objectEvent, struct S bool8 MovementType_FollowPlayer_Active(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - if (gPlayerAvatar.tileTransitionState == T_NOT_MOVING && !gObjectEvents[gPlayerAvatar.objectEventId].heldMovementActive ) { // do nothing if player is stationary - return FALSE; - } else if (!IsFollowerVisible()) { - if (objectEvent->invisible) { // Return to shadowing state - sprite->sTypeFuncId = 0; - return FALSE; - } - // Animate entering pokeball - ClearObjectEventMovement(objectEvent, sprite); - ObjectEventSetSingleMovement(objectEvent, sprite, MOVEMENT_ACTION_ENTER_POKEBALL); - objectEvent->singleMovementActive = 1; - sprite->sTypeFuncId = 2; // movement action sets state to 0 - return TRUE; + if (!IsFollowerVisible()) { + if (objectEvent->invisible) { // Return to shadowing state + sprite->sTypeFuncId = 0; + return FALSE; + } + // Animate entering pokeball + ClearObjectEventMovement(objectEvent, sprite); + ObjectEventSetSingleMovement(objectEvent, sprite, MOVEMENT_ACTION_ENTER_POKEBALL); + objectEvent->singleMovementActive = 1; + sprite->sTypeFuncId = 2; // movement action sets state to 0 + return TRUE; } // TODO: Remove dependence on PlayerGetCopyableMovement return gFollowPlayerMovementFuncs[PlayerGetCopyableMovement()](objectEvent, sprite, GetPlayerMovementDirection(), NULL); @@ -5005,23 +5003,33 @@ bool8 MovementType_FollowPlayer_Moving(struct ObjectEvent *objectEvent, struct S if (sprite->sTypeFuncId) { // restore nonzero state sprite->sTypeFuncId = 1; } - } else if (objectEvent->movementActionId != MOVEMENT_ACTION_EXIT_POKEBALL) { + } else if (objectEvent->movementActionId < MOVEMENT_ACTION_EXIT_POKEBALL) { UpdateFollowerTransformEffect(objectEvent, sprite); + #if OW_MON_BOBBING == TRUE + if ((sprite->data[5] & 7) == 2) + sprite->y2 ^= -1; + #endif } return FALSE; } bool8 FollowablePlayerMovement_Idle(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) { - u8 direction; - if (!objectEvent->singleMovementActive) { // walk in place + if (!objectEvent->singleMovementActive) + { // walk in place ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkInPlaceNormalMovementAction(objectEvent->facingDirection)); sprite->sTypeFuncId = 1; objectEvent->singleMovementActive = 1; return TRUE; - } else if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { // finish movement action + } + else if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) + { // finish movement action objectEvent->singleMovementActive = 0; } + #if OW_MON_BOBBING == TRUE + else if ((sprite->data[3] & 7) == 2) + sprite->y2 ^= -1; + #endif UpdateFollowerTransformEffect(objectEvent, sprite); return FALSE; } @@ -5034,7 +5042,7 @@ bool8 FollowablePlayerMovement_Step(struct ObjectEvent *objectEvent, struct Spri s16 targetX; s16 targetY; #ifdef MB_SIDEWAYS_STAIRS_RIGHT_SIDE - u8 playerAction = gObjectEvents[gPlayerAvatar.objectEventId].movementActionId; + u32 playerAction = gObjectEvents[gPlayerAvatar.objectEventId].movementActionId; #endif targetX = gObjectEvents[gPlayerAvatar.objectEventId].previousCoords.x; @@ -5059,6 +5067,9 @@ bool8 FollowablePlayerMovement_Step(struct ObjectEvent *objectEvent, struct Spri ObjectEventSetSingleMovement(objectEvent, sprite, MOVEMENT_ACTION_EXIT_POKEBALL); objectEvent->singleMovementActive = 1; sprite->sTypeFuncId = 2; + #if OW_MON_BOBBING == TRUE + sprite->y2 = 0; + #endif return TRUE; } else if (x == targetX && y == targetY) { // don't move if already in the player's last position return FALSE; @@ -5082,8 +5093,12 @@ bool8 FollowablePlayerMovement_Step(struct ObjectEvent *objectEvent, struct Spri } else { if (playerAction >= MOVEMENT_ACTION_WALK_SLOW_DOWN && playerAction <= MOVEMENT_ACTION_WALK_SLOW_RIGHT) ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkSlowMovementAction(direction)); - else + else { objectEvent->movementActionId = GetWalkNormalMovementAction(direction); + #if OW_MON_BOBBING == TRUE + sprite->y2 = -1; + #endif + } } sprite->sActionFuncId = 0; #else @@ -5094,8 +5109,12 @@ bool8 FollowablePlayerMovement_Step(struct ObjectEvent *objectEvent, struct Spri // If *player* jumps, make step take twice as long else if (PlayerGetCopyableMovement() == COPY_MOVE_JUMP2) ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkSlowMovementAction(direction)); - else + else { ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkNormalMovementAction(direction)); + #if OW_MON_BOBBING == TRUE + sprite->y2 = -1; + #endif + } #endif objectEvent->singleMovementActive = 1; sprite->sTypeFuncId = 2;