1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-10 01:44:36 +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:
Dragorn421 2022-06-15 11:41:47 -07:00 committed by GitHub
parent 030594a457
commit 5299208291
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 13 deletions

View file

@ -24,9 +24,12 @@
#include "overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h"
// Entrance Table definition
#define DEFINE_ENTRANCE(_0, scene, spawn, continueBgm, displayTitleCard, fadeIn, fadeOut) \
{ scene, spawn, \
((continueBgm & 1) << 15) | ((displayTitleCard & 1) << 14) | ((fadeIn & 0x7F) << 7) | (fadeOut & 0x7F) },
#define DEFINE_ENTRANCE(_0, scene, spawn, continueBgm, displayTitleCard, endTransType, startTransType) \
{ scene, spawn, \
(((continueBgm) ? ENTRANCE_INFO_CONTINUE_BGM_FLAG : 0) | \
((displayTitleCard) ? ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG : 0) | \
(((endTransType) << ENTRANCE_INFO_END_TRANS_TYPE_SHIFT) & ENTRANCE_INFO_END_TRANS_TYPE_MASK) | \
(((startTransType) << ENTRANCE_INFO_START_TRANS_TYPE_SHIFT) & ENTRANCE_INFO_START_TRANS_TYPE_MASK)) },
EntranceInfo gEntranceTable[] = {
#include "tables/entrance_table.h"
@ -90,7 +93,7 @@ void Scene_SetTransitionForNextEntrance(PlayState* play) {
}
}
play->transitionType = gEntranceTable[entranceIndex].field & 0x7F; // Fade out
play->transitionType = ENTRANCE_INFO_START_TRANS_TYPE(gEntranceTable[entranceIndex].field);
}
void Scene_DrawConfigDefault(PlayState* play) {