1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-02 22:14:33 +00:00

Doc pass on EnDoor and transition actors (#1243)

* Doc pass on EnDoor and transition actors

* (re)Name things

* Forgot to change gameplay_keep.xml

* "actor transition index" -> "transition actor index"

* Run formatter

* Better names for `DOOR_DL_` enum

* `TRANSITION_ACTOR_INDEX` -> `GET_TRANSITION_ACTOR_INDEX`

* name endoor params macros with get/is, _mask to _flag for the doubledoor flag

* Move last ; from `DOOR_ACTOR_BASE` expansion to usage
This commit is contained in:
Dragorn421 2022-07-31 02:57:44 +02:00 committed by GitHub
parent 455321d2e8
commit 6889c275cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 151 additions and 100 deletions

View file

@ -498,6 +498,29 @@ typedef enum {
/* 0xFF */ NAVI_ENEMY_NONE = 0xFF
} NaviEnemy;
#define TRANSITION_ACTOR_PARAMS_INDEX_SHIFT 10
#define GET_TRANSITION_ACTOR_INDEX(actor) ((u16)(actor)->params >> TRANSITION_ACTOR_PARAMS_INDEX_SHIFT)
// EnDoor and DoorKiller share openAnim and playerIsOpening
// Due to alignment, a substruct cannot be used in the structs of these actors.
#define DOOR_ACTOR_BASE \
/* 0x0000 */ Actor actor; \
/* 0x014C */ SkelAnime skelAnime; \
/* 0x0190 */ u8 openAnim; \
/* 0x0191 */ u8 playerIsOpening
typedef struct DoorActorBase {
/* 0x0000 */ DOOR_ACTOR_BASE;
} DoorActorBase;
typedef enum {
/* 0x00 */ DOOR_OPEN_ANIM_ADULT_L,
/* 0x01 */ DOOR_OPEN_ANIM_CHILD_L,
/* 0x02 */ DOOR_OPEN_ANIM_ADULT_R,
/* 0x03 */ DOOR_OPEN_ANIM_CHILD_R,
/* 0x04 */ DOOR_OPEN_ANIM_MAX
} DoorOpenAnim;
#define UPDBGCHECKINFO_FLAG_0 (1 << 0) // check wall
#define UPDBGCHECKINFO_FLAG_1 (1 << 1) // check ceiling
#define UPDBGCHECKINFO_FLAG_2 (1 << 2) // check floor and water