mirror of
https://github.com/zeldaret/oot.git
synced 2025-10-20 13:40:02 +00:00
Macros for Entranceinfo.field
(#1270)
* Macros for `Entranceinfo.field` * `ENTRANCE_INFO_FIELD_` -> `ENTRANCE_INFO_` * Remove mentioning the transition types being "default" * comment on macros what they are for * Shorten "transition" -> "trans" for `EntranceInfo.field` usage
This commit is contained in:
parent
030594a457
commit
5299208291
5 changed files with 30 additions and 13 deletions
|
@ -7,12 +7,12 @@
|
|||
* - Argument 3: Spawn number for this entrance
|
||||
* - Argument 4: Toggle if bgm should continue during the transition using this entrance (true or false)
|
||||
* - Argument 5: Toggle if a title card should display when using this entrance (true or false)
|
||||
* - Argument 6: Transition type when entering using this entrance
|
||||
* - Argument 7: Transition type when exiting using this entrance
|
||||
*
|
||||
* - Argument 6: Transition type when entering using this entrance (second half of a scene transition)
|
||||
* - Argument 7: Transition type when exiting using this entrance (first half of a scene transition)
|
||||
*
|
||||
* WARNING: Due to how the entrance system is implemented, entries within the same group of scene setups are NOT shiftable.
|
||||
* Groups of scene setups are indicated by line breaks.
|
||||
*
|
||||
*
|
||||
* Only the first entrance within a group of setups is expected to be referenced in code.
|
||||
* The entrance system will apply the offset on its own to access the correct entrance for a given setup.
|
||||
*/
|
||||
|
|
|
@ -1344,6 +1344,20 @@ typedef struct {
|
|||
/* 0x24 */ s16 unk_24;
|
||||
} struct_80034A14_arg1; // size = 0x28
|
||||
|
||||
// Macros for `EntranceInfo.field`
|
||||
#define ENTRANCE_INFO_CONTINUE_BGM_FLAG (1 << 15)
|
||||
#define ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG (1 << 14)
|
||||
#define ENTRANCE_INFO_END_TRANS_TYPE_MASK 0x3F80
|
||||
#define ENTRANCE_INFO_END_TRANS_TYPE_SHIFT 7
|
||||
#define ENTRANCE_INFO_END_TRANS_TYPE(field) \
|
||||
(((field) >> ENTRANCE_INFO_END_TRANS_TYPE_SHIFT) \
|
||||
& (ENTRANCE_INFO_END_TRANS_TYPE_MASK >> ENTRANCE_INFO_END_TRANS_TYPE_SHIFT))
|
||||
#define ENTRANCE_INFO_START_TRANS_TYPE_MASK 0x7F
|
||||
#define ENTRANCE_INFO_START_TRANS_TYPE_SHIFT 0
|
||||
#define ENTRANCE_INFO_START_TRANS_TYPE(field) \
|
||||
(((field) >> ENTRANCE_INFO_START_TRANS_TYPE_SHIFT) \
|
||||
& (ENTRANCE_INFO_START_TRANS_TYPE_MASK >> ENTRANCE_INFO_START_TRANS_TYPE_SHIFT))
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s8 scene;
|
||||
/* 0x01 */ s8 spawn;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue