zeldaret / mm

Decompilation of The Legend of Zelda: Majora's Mask
https://zelda.deco.mp/games/mm
1.22k stars 443 forks source link

Further Attention Docs #1732

Closed engineer124 closed 2 weeks ago

engineer124 commented 2 weeks ago

This continues with another round of docs for the Attention System. While most of this was based on OoT, there are some new (and unused) features in MM that this docs involves.

First, there is an unused actor flag: ACTOR_FLAG_FOCUS_ACTOR_REFINDABLE, that allows the focus actor to be reselected as the next actor in Attention_FindActorInCategory (normally the focus actor can not be found again). Also in Player_UpdateZTargeting, this flag allows the focus actor to be selected as the nextLockOn actor. When this happens, the flag is unset, so it needs to be reset for this flag to be activated again.

Next, there is the actor flag ACTOR_FLAG_CAMERA_DRIFT_ENABLED which ties into the unused actor z_en_fr which is documented here. Basically, this flag hijacks the attention system to find an actor with this flag that will then cause the camera to slowly drift to face the actor while the player is moving, which brings "attention" to that spot. This only applies to the Normal1 Camera function, which only includes simple non-z-targeted movement.

hensldm commented 2 weeks ago

Just want to note, since merging the last PR, I have noticed there are 2 actors that have PARAMS getters named after TARGETMODE (which was renamed in the last PR). You can find them by just searching for TARGETMODE.

hensldm commented 2 weeks ago

Just want to note, since merging the last PR, I have noticed there are 2 actors that have PARAMS getters named after TARGETMODE (which was renamed in the last PR). You can find them by just searching for TARGETMODE.

Nevermind, looks like they are already addressed in this PR (sorry I missed them).

engineer124 commented 2 weeks ago

Nevermind, looks like they are already addressed in this PR (sorry I missed them).

Yeah, I noticed them as well since one was for the en_fr actor which I documented here as well!