Player "Hostile" Docs (#1706)

* actor flag hostile

* player hostile
This commit is contained in:
engineer124
2024-10-15 12:11:20 +11:00
committed by GitHub
parent 3472e79caa
commit 278717bb04
125 changed files with 292 additions and 265 deletions
+13 -5
View File
@@ -444,9 +444,15 @@ typedef enum DoorLockType {
#define ACTOR_FLAG_TARGETABLE (1 << 0)
// Unused
#define ACTOR_FLAG_2 (1 << 1)
// Changes the targeting behaviour for unfriendly actors (sound effects, Player's stance, etc)
#define ACTOR_FLAG_UNFRIENDLY (1 << 2)
// Opposite of the UNFRIENDLY flag. It is not checked explictly in the original game.
// Actor is hostile toward the Player. Player has specific "battle" behavior when locked onto hostile actors.
// Enemy background music will also be played when the player is close enough to a hostile actor.
// Note: This must be paired with `ACTOR_FLAG_TARGETABLE` to have any effect.
#define ACTOR_FLAG_HOSTILE (1 << 2)
// Actor is considered "friendly"; Opposite flag of `ACTOR_FLAG_HOSTILE`.
// Note that this flag doesn't have any effect on either the actor, or Player's behavior.
// What actually matters is the presence or lack of `ACTOR_FLAG_HOSTILE`.
#define ACTOR_FLAG_FRIENDLY (1 << 3)
//
#define ACTOR_FLAG_10 (1 << 4)
@@ -496,8 +502,10 @@ typedef enum DoorLockType {
#define ACTOR_FLAG_2000000 (1 << 25)
// actor can press and hold down switches
#define ACTOR_FLAG_CAN_PRESS_SWITCH (1 << 26)
// Prevents locking on with Z targeting an actor even if Tatl is floating over it
#define ACTOR_FLAG_CANT_LOCK_ON (1 << 27)
// Player is not able to lock onto the actor.
// Tatl will still be able to hover over the actor, assuming `ACTOR_FLAG_TARGETABLE` is set.
#define ACTOR_FLAG_LOCK_ON_DISABLED (1 << 27)
//
#define ACTOR_FLAG_10000000 (1 << 28)
//
+3 -3
View File
@@ -1056,8 +1056,8 @@ typedef enum PlayerCueId {
#define PLAYER_STATE3_20000000 (1 << 29)
//
#define PLAYER_STATE3_START_CHANGING_HELD_ITEM (1 << 30)
// TARGETING_HOSTILE?
#define PLAYER_STATE3_80000000 (1 << 31)
// Currently locked onto a hostile actor. Triggers a "battle" variant of many actions.
#define PLAYER_STATE3_HOSTILE_LOCK_ON (1 << 31)
#define PLAYER_GET_BG_CAM_INDEX(thisx) ((thisx)->params & 0xFF)
@@ -1372,7 +1372,7 @@ void func_8012301C(Actor* thisx, struct PlayState* play2);
void func_80123140(struct PlayState* play, Player* player);
bool Player_InBlockingCsMode(struct PlayState* play, Player* player);
bool Player_InCsMode(struct PlayState* play);
bool func_80123420(Player* player);
bool Player_CheckHostileLockOn(Player* player);
bool func_80123434(Player* player);
bool func_80123448(struct PlayState* play);
bool Player_IsGoronOrDeku(Player* player);