1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-10-19 13:09:58 +00:00

Rename "Scene Setup Index" to "Scene Layer" (#1300)

* setup -> layer

* IS_CUTSCENE_LAYER

* review

* backtick

* remove some more mentions of setup

* alt header block

* clarifying comment
This commit is contained in:
fig02 2022-07-30 17:28:50 -04:00 committed by GitHub
commit afbc312024
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 169 additions and 156 deletions

View file

@ -2144,7 +2144,7 @@ void __osSiCreateAccessQueue(void);
void __osSiGetAccess(void);
void __osSiRelAccess(void);
s32 osContInit(OSMesgQueue* mq, u8* ctlBitfield, OSContStatus* status);
void __osContGetInitData(u8* ctlBitfield, OSContStatus* status);
void __osContGetInitData(u8* ctlBitfield, OSContStatus* data);
void __osPackRequestData(u8 poll);
s32 osContStartReadData(OSMesgQueue* mq);
void osContGetReadData(OSContPad* contData);
@ -2157,7 +2157,7 @@ void osSpTaskYield(void);
s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page);
s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data);
s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel);
void __osPfsRequestOneChannel(s32 channel, u8 poll);
void __osPfsRequestOneChannel(s32 channel, u8 cmd);
void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData);
void guMtxIdentF(f32 mf[4][4]);
void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
@ -2204,7 +2204,7 @@ f32 cosf(f32);
s16 coss(u16);
void osViSetEvent(OSMesgQueue* mq, OSMesg msg, u32 retraceCount);
s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern);
void __osPfsRequestData(u8 poll);
void __osPfsRequestData(u8 cmd);
void __osPfsGetInitData(u8* pattern, OSContStatus* contData);
void guS2DInitBg(uObjBg* bg);
s32 __osPfsSelectBank(OSPfs* pfs, u8 bank);

View file

@ -6,15 +6,18 @@
* - Argument 2: Scene this entrance belongs to
* - Argument 3: Spawn number for this entrance
* - Argument 4: Toggle if bgm should continue during the transition using this entrance (true or false)
* NOTE: For non-cutscene layers, this field is only read from the `SCENE_LAYER_CHILD_DAY` layer.
* Meaning, the setting only matters for the first entry within a group of layers and that
* setting will apply to the other 3 non-cutscene layers.
* - 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 (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.
* WARNING: Due to how the entrance system is implemented, entries within the same group of scene layers are NOT shiftable.
* Groups of scene layers 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.
* Only the first entrance within a group of layers 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 layer.
*/
/* 0x000 */ DEFINE_ENTRANCE(ENTR_YDAN_0, SCENE_YDAN, 0, false, true, TRANS_TYPE_FADE_BLACK, TRANS_TYPE_FADE_BLACK)
/* 0x001 */ DEFINE_ENTRANCE(ENTR_YDAN_0_1, SCENE_YDAN, 0, false, true, TRANS_TYPE_FADE_BLACK, TRANS_TYPE_FADE_BLACK)

View file

@ -154,7 +154,7 @@ typedef struct {
/* 0x1354 */ s32 fileNum; // "file_no"
/* 0x1358 */ char unk_1358[0x0004];
/* 0x135C */ s32 gameMode;
/* 0x1360 */ s32 sceneSetupIndex;
/* 0x1360 */ s32 sceneLayer; // "counter"
/* 0x1364 */ s32 respawnFlag; // "restart_flag"
/* 0x1368 */ RespawnData respawn[RESPAWN_MODE_MAX]; // "restart_data"
/* 0x13BC */ f32 entranceSpeed;
@ -252,6 +252,16 @@ typedef enum {
/* 3 */ GAMEMODE_END_CREDITS
} GameMode;
typedef enum {
/* 0 */ SCENE_LAYER_CHILD_DAY,
/* 1 */ SCENE_LAYER_CHILD_NIGHT,
/* 2 */ SCENE_LAYER_ADULT_DAY,
/* 3 */ SCENE_LAYER_ADULT_NIGHT,
/* 4 */ SCENE_LAYER_CUTSCENE_FIRST
} SceneLayer;
#define IS_CUTSCENE_LAYER (gSaveContext.sceneLayer >= SCENE_LAYER_CUTSCENE_FIRST)
typedef enum {
/* 0 */ LINK_AGE_ADULT,
/* 1 */ LINK_AGE_CHILD

View file

@ -459,7 +459,7 @@ typedef enum {
#define SCENE_CAM_TYPE_FIXED_TOGGLE_VIEWPOINT 0x20 // Camera exhibits fixed behaviors and viewpoint can be toggled with c-up
#define SCENE_CAM_TYPE_FIXED 0x30 // Camera exhibits fixed behaviors (see `Play_CamIsNotFixed` usages for examples)
#define SCENE_CAM_TYPE_FIXED_MARKET 0x40 // Camera exhibits fixed behaviors and delays textboxes by a small amount before they start to appear
#define SCENE_CAM_TYPE_SHOOTING_GALLERY 0x50 // Unreferenced in code, and set only by the main setup of the shooting gallery scene
#define SCENE_CAM_TYPE_SHOOTING_GALLERY 0x50 // Unreferenced in code, and used only by the main layer of the shooting gallery scene
// Scene commands