mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-25 15:25:04 -04:00
Merge remote-tracking branch 'upstream/master' into play
This commit is contained in:
+60
-31
@@ -53,6 +53,7 @@
|
||||
#define A_INIT 0x01
|
||||
#define A_CONTINUE 0x00
|
||||
#define A_LOOP 0x02
|
||||
#define A_ADPCM_SHORT 0x04
|
||||
#define A_OUT 0x02
|
||||
#define A_LEFT 0x02
|
||||
#define A_RIGHT 0x00
|
||||
@@ -331,13 +332,20 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (unsigned int)(a2); \
|
||||
}
|
||||
|
||||
#define aClearBuffer(pkt, d, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(d, 0, 24); \
|
||||
_a->words.w1 = (unsigned int)(c); \
|
||||
}
|
||||
/*
|
||||
* Clears DMEM by writing zeros.
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param dmem DMEM address to clear
|
||||
* @param size number of bytes to clear (rounded up to the next multiple of 16)
|
||||
*/
|
||||
#define aClearBuffer(pkt, dmem, size) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(dmem, 0, 24); \
|
||||
_a->words.w1 = (uintptr_t)(size); \
|
||||
}
|
||||
|
||||
#define aEnvMixer(pkt, dmemi, count, swapLR, x0, x1, x2, x3, m, bits) \
|
||||
{ \
|
||||
@@ -368,14 +376,21 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(dmemi, 16, 16) | _SHIFTL(dmemo, 0, 16); \
|
||||
}
|
||||
|
||||
#define aLoadBuffer(pkt, s, d, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8) | \
|
||||
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(d, 0, 16); \
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
}
|
||||
/*
|
||||
* Loads a buffer to DMEM from any physical source address, KSEG0, or KSEG1
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param addrSrc Any physical source address, KSEG0, or KSEG1
|
||||
* @param dmemDest DMEM destination address
|
||||
* @param size number of bytes to copy (rounded down to the next multiple of 16)
|
||||
*/
|
||||
#define aLoadBuffer(pkt, addrSrc, dmemDest, size) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_LOADBUFF, 24, 8) | _SHIFTL((size) >> 4, 16, 8) | _SHIFTL(dmemDest, 0, 16)); \
|
||||
_a->words.w1 = (uintptr_t)(addrSrc); \
|
||||
}
|
||||
|
||||
#define aMix(pkt, f, g, i, o) \
|
||||
{ \
|
||||
@@ -404,14 +419,21 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
}
|
||||
|
||||
#define aSaveBuffer(pkt, s, d, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8) | \
|
||||
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(s, 0, 16); \
|
||||
_a->words.w1 = (unsigned int)(d); \
|
||||
}
|
||||
/*
|
||||
* Stores a buffer from DMEM to any physical source address, KSEG0, or KSEG1
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param dmemSrc DMEM source address
|
||||
* @param addrDest Any physical source address, KSEG0, or KSEG1
|
||||
* @param size number of bytes to copy (rounded down to the next multiple of 16)
|
||||
*/
|
||||
#define aSaveBuffer(pkt, dmemSrc, addrDest, size) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_SAVEBUFF, 24, 8) | _SHIFTL((size) >> 4, 16, 8) | _SHIFTL(dmemSrc, 0, 16)); \
|
||||
_a->words.w1 = (uintptr_t)(addrDest); \
|
||||
}
|
||||
|
||||
#define aSegment(pkt, s, b) \
|
||||
{ \
|
||||
@@ -501,14 +523,21 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (unsigned int)(addr); \
|
||||
}
|
||||
|
||||
#define aDuplicate(pkt, count, dmemi, dmemo, a4) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_DUPLICATE, 24, 8) | \
|
||||
_SHIFTL(count, 16, 8) | _SHIFTL(dmemi, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(dmemo, 16, 16) | _SHIFTL(a4, 0, 16); \
|
||||
}
|
||||
/*
|
||||
* Duplicates 128 bytes of data a specified number of times.
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param numCopies number of times to duplicate 128 bytes from src
|
||||
* @param dmemSrc DMEM source address
|
||||
* @param dmemDest DMEM destination address for the duplicates, size 128 * numCopies
|
||||
*/
|
||||
#define aDuplicate(pkt, numCopies, dmemSrc, dmemDest) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_DUPLICATE, 24, 8) | _SHIFTL(numCopies, 16, 8) | _SHIFTL(dmemSrc, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(dmemDest, 16, 16) | _SHIFTL(0x80, 0, 16); \
|
||||
}
|
||||
|
||||
#define aAddMixer(pkt, count, dmemi, dmemo, a4) \
|
||||
{ \
|
||||
|
||||
+217
-337
File diff suppressed because it is too large
Load Diff
+14
-14
@@ -29,21 +29,21 @@ typedef struct GfxPrint {
|
||||
/* 0x14 */ UNK_TYPE1 unk_14[0x1C]; // unused
|
||||
} GfxPrint; // size = 0x30
|
||||
|
||||
void GfxPrint_Setup(GfxPrint* printer);
|
||||
void GfxPrint_SetColor(GfxPrint* printer, u32 r, u32 g, u32 b, u32 a);
|
||||
void GfxPrint_SetPosPx(GfxPrint* printer, s32 x, s32 y);
|
||||
void GfxPrint_SetPos(GfxPrint* printer, s32 x, s32 y);
|
||||
void GfxPrint_SetBasePosPx(GfxPrint* printer, s32 x, s32 y);
|
||||
void GfxPrint_PrintCharImpl(GfxPrint* printer, u8 c);
|
||||
void GfxPrint_PrintChar(GfxPrint* printer, u8 c);
|
||||
void GfxPrint_PrintStringWithSize(GfxPrint* printer, const void* buffer, size_t charSize, size_t charCount);
|
||||
void GfxPrint_PrintString(GfxPrint* printer, const char* str);
|
||||
void GfxPrint_Setup(GfxPrint* this);
|
||||
void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a);
|
||||
void GfxPrint_SetPosPx(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_SetPos(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_SetBasePosPx(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c);
|
||||
void GfxPrint_PrintChar(GfxPrint* this, u8 c);
|
||||
void GfxPrint_PrintStringWithSize(GfxPrint* this, const void* buffer, size_t charSize, size_t charCount);
|
||||
void GfxPrint_PrintString(GfxPrint* this, const char* str);
|
||||
void* GfxPrint_Callback(void* arg, const char* str, size_t size);
|
||||
void GfxPrint_Init(GfxPrint* printer);
|
||||
void GfxPrint_Init(GfxPrint* this);
|
||||
void GfxPrint_Destroy(GfxPrint* printer);
|
||||
void GfxPrint_Open(GfxPrint* printer, Gfx* dList);
|
||||
Gfx* GfxPrint_Close(GfxPrint* printer);
|
||||
s32 GfxPrint_VPrintf(GfxPrint* printer, const char* fmt, va_list args);
|
||||
s32 GfxPrint_Printf(GfxPrint* printer, const char* fmt, ...);
|
||||
void GfxPrint_Open(GfxPrint* this, Gfx* dList);
|
||||
Gfx* GfxPrint_Close(GfxPrint* this);
|
||||
s32 GfxPrint_VPrintf(GfxPrint* this, const char* fmt, va_list args);
|
||||
s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -610,4 +610,12 @@ extern ActorInit Oceff_Wipe7_InitVars;
|
||||
extern ActorInit Shot_Sun_InitVars;
|
||||
extern ActorInit TG_Sw_InitVars;
|
||||
|
||||
extern TransitionInit TransitionFade_InitVars;
|
||||
extern TransitionInit TransitionTriforce_InitVars;
|
||||
extern TransitionInit TransitionWipe1_InitVars;
|
||||
extern TransitionInit TransitionWipe3_InitVars;
|
||||
extern TransitionInit TransitionWipe4_InitVars;
|
||||
extern TransitionInit TransitionCircle_InitVars;
|
||||
extern TransitionInit TransitionWipe5_InitVars;
|
||||
|
||||
#endif
|
||||
|
||||
+5
-5
@@ -47,7 +47,7 @@ typedef struct {
|
||||
/* 0x04 */ u16 transferMode;
|
||||
/* 0x06 */ u16 blockNum;
|
||||
/* 0x08 */ s32 sectorNum;
|
||||
/* 0x0C */ u32 devAddr;
|
||||
/* 0x0C */ uintptr_t devAddr;
|
||||
/* 0x10 */ u32 bmCtlShadow;
|
||||
/* 0x14 */ u32 seqCtlShadow;
|
||||
/* 0x18 */ __OSBlockInfo block[2];
|
||||
@@ -62,7 +62,7 @@ typedef struct OSPiHandle {
|
||||
/* 0x07 */ u8 relDuration;
|
||||
/* 0x08 */ u8 pulse;
|
||||
/* 0x09 */ u8 domain;
|
||||
/* 0x0C */ u32 baseAddress;
|
||||
/* 0x0C */ uintptr_t baseAddress;
|
||||
/* 0x10 */ u32 speed;
|
||||
/* 0x14 */ __OSTranxInfo transferInfo;
|
||||
} OSPiHandle; // size = 0x74
|
||||
@@ -70,7 +70,7 @@ typedef struct OSPiHandle {
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x4 */ u32 address;
|
||||
/* 0x4 */ uintptr_t address;
|
||||
} OSPiInfo; // size = 0x8
|
||||
|
||||
|
||||
@@ -97,8 +97,8 @@ typedef struct {
|
||||
/* 0x08 */ OSMesgQueue* cmdQueue;
|
||||
/* 0x0C */ OSMesgQueue* evtQueue;
|
||||
/* 0x10 */ OSMesgQueue* acsQueue;
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, u32, void*, size_t);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, u32, void*, size_t);
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, uintptr_t, void*, size_t);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, uintptr_t, void*, size_t);
|
||||
} OSDevMgr; // size = 0x1C
|
||||
|
||||
typedef u64 OSTime;
|
||||
|
||||
@@ -12,8 +12,8 @@ typedef struct {
|
||||
/* 0x08 */ OSMesgQueue* cmdQueue;
|
||||
/* 0x0C */ OSMesgQueue* eventQueue;
|
||||
/* 0x10 */ OSMesgQueue* accessQueue;
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, u32, void*, size_t);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, u32, void*, size_t);
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, uintptr_t, void*, size_t);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, uintptr_t, void*, size_t);
|
||||
} OSMgrArgs; // size = 0x1C
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ void* __osMalloc(Arena* arena, size_t size);
|
||||
void* __osMallocR(Arena* arena, size_t size);
|
||||
void __osFree(Arena* arena, void* ptr);
|
||||
void* __osRealloc(Arena* arena, void* ptr, size_t newSize);
|
||||
void __osGetSizes(Arena* arena, size_t* maxFreeBlock, size_t* bytesFree, size_t* bytesAllocated);
|
||||
void __osGetSizes(Arena* arena, size_t* outMaxFree, size_t* outFree, size_t* outAlloc);
|
||||
s32 __osCheckArena(Arena* arena);
|
||||
|
||||
#endif
|
||||
|
||||
+106
-104
@@ -4,7 +4,7 @@
|
||||
#define NA_BGM_STOP 0x100000FF
|
||||
|
||||
#define NA_BGM_GENERAL_SFX 0x00 // General Sound Effects
|
||||
#define NA_BGM_NATURE_AMBIENCE 0x01 // Ambient background noises
|
||||
#define NA_BGM_AMBIENCE 0x01 // Ambient background noises
|
||||
#define NA_BGM_TERMINA_FIELD 0x02 // Termina Field
|
||||
#define NA_BGM_CHASE 0x03 // Forest Chase
|
||||
#define NA_BGM_MAJORAS_THEME 0x04 // Majora's Theme "STALKID"
|
||||
@@ -40,7 +40,7 @@
|
||||
#define NA_BGM_GET_ITEM 0x22 // Item Catch
|
||||
#define NA_BGM_GATE_OPEN 0x23 // Clock Town Day 2 Duplicate of #16. In MM3D, it shares its filename with the Door of Time song from OoT
|
||||
#define NA_BGM_GET_HEART 0x24 // Complete a Heart Piece
|
||||
#define NA_BGM_MINI_GAME_2 0x25 // Playing Minigame
|
||||
#define NA_BGM_TIMED_MINI_GAME 0x25 // Playing a timed Minigame
|
||||
#define NA_BGM_GORON_RACE 0x26 // Goron Race
|
||||
#define NA_BGM_MUSIC_BOX_HOUSE 0x27 // Music Box House "ORGEL_HOUSE"
|
||||
#define NA_BGM_FAIRY_FOUNTAIN 0x28 // Fairy's Fountain In MM3D, it shares its filename with the Door of Time song from OoT "GODESS"
|
||||
@@ -134,11 +134,12 @@
|
||||
#define NA_BGM_DISABLED 0xFFFF
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SEQ_PLAYER_BGM_MAIN,
|
||||
/* 1 */ SEQ_PLAYER_FANFARE,
|
||||
/* 2 */ SEQ_PLAYER_SFX,
|
||||
/* 3 */ SEQ_PLAYER_BGM_SUB,
|
||||
/* 4 */ SEQ_PLAYER_NATURE
|
||||
/* 0 */ SEQ_PLAYER_BGM_MAIN,
|
||||
/* 1 */ SEQ_PLAYER_FANFARE,
|
||||
/* 2 */ SEQ_PLAYER_SFX,
|
||||
/* 3 */ SEQ_PLAYER_BGM_SUB,
|
||||
/* 4 */ SEQ_PLAYER_AMBIENCE,
|
||||
/* 0xFF */ SEQ_PLAYER_INVALID = 0xFF
|
||||
} SequencePlayerId;
|
||||
|
||||
typedef enum {
|
||||
@@ -160,119 +161,120 @@ typedef enum {
|
||||
} ChannelIOPort;
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ NATURE_CHANNEL_STREAM_0,
|
||||
/* 0x1 */ NATURE_CHANNEL_CRITTER_0,
|
||||
/* 0x2 */ NATURE_CHANNEL_CRITTER_1,
|
||||
/* 0x3 */ NATURE_CHANNEL_CRITTER_2,
|
||||
/* 0x4 */ NATURE_CHANNEL_CRITTER_3,
|
||||
/* 0x5 */ NATURE_CHANNEL_CRITTER_4,
|
||||
/* 0x6 */ NATURE_CHANNEL_CRITTER_5,
|
||||
/* 0x7 */ NATURE_CHANNEL_CRITTER_6,
|
||||
/* 0x8 */ NATURE_CHANNEL_CRITTER_7,
|
||||
/* 0xC */ NATURE_CHANNEL_STREAM_1 = 12,
|
||||
/* 0xD */ NATURE_CHANNEL_UNK,
|
||||
/* 0xE */ NATURE_CHANNEL_RAIN,
|
||||
/* 0xF */ NATURE_CHANNEL_LIGHTNING
|
||||
} NatureChannelIdx; // playerIdx = 4
|
||||
/* 0x0 */ AMBIENCE_CHANNEL_STREAM_0,
|
||||
/* 0x1 */ AMBIENCE_CHANNEL_CRITTER_0,
|
||||
/* 0x2 */ AMBIENCE_CHANNEL_CRITTER_1,
|
||||
/* 0x3 */ AMBIENCE_CHANNEL_CRITTER_2,
|
||||
/* 0x4 */ AMBIENCE_CHANNEL_CRITTER_3,
|
||||
/* 0x5 */ AMBIENCE_CHANNEL_CRITTER_4,
|
||||
/* 0x6 */ AMBIENCE_CHANNEL_CRITTER_5,
|
||||
/* 0x7 */ AMBIENCE_CHANNEL_CRITTER_6,
|
||||
/* 0x8 */ AMBIENCE_CHANNEL_CRITTER_7,
|
||||
/* 0xC */ AMBIENCE_CHANNEL_STREAM_1 = 12,
|
||||
/* 0xD */ AMBIENCE_CHANNEL_SOUND_MODE,
|
||||
/* 0xE */ AMBIENCE_CHANNEL_RAIN,
|
||||
/* 0xF */ AMBIENCE_CHANNEL_LIGHTNING
|
||||
} AmbienceChannelIndex; // playerIndex = SEQ_PLAYER_AMBIENCE
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ NATURE_AMBIENCE_0,
|
||||
/* 0x01 */ NATURE_AMBIENCE_1,
|
||||
/* 0x02 */ NATURE_AMBIENCE_2,
|
||||
/* 0x03 */ NATURE_AMBIENCE_3,
|
||||
/* 0x04 */ NATURE_AMBIENCE_4,
|
||||
/* 0x05 */ NATURE_AMBIENCE_5,
|
||||
/* 0x06 */ NATURE_AMBIENCE_6,
|
||||
/* 0x07 */ NATURE_AMBIENCE_7,
|
||||
/* 0x08 */ NATURE_AMBIENCE_8,
|
||||
/* 0x09 */ NATURE_AMBIENCE_9,
|
||||
/* 0x0A */ NATURE_AMBIENCE_A,
|
||||
/* 0x0B */ NATURE_AMBIENCE_B,
|
||||
/* 0x0C */ NATURE_AMBIENCE_C,
|
||||
/* 0x0D */ NATURE_AMBIENCE_D,
|
||||
/* 0x0E */ NATURE_AMBIENCE_E,
|
||||
/* 0x0F */ NATURE_AMBIENCE_F,
|
||||
/* 0x10 */ NATURE_AMBIENCE_10,
|
||||
/* 0x11 */ NATURE_AMBIENCE_11,
|
||||
/* 0x12 */ NATURE_AMBIENCE_12,
|
||||
/* 0x13 */ NATURE_AMBIENCE_13
|
||||
} NatureAmbienceId; // playerIdx = 4
|
||||
/* 0x00 */ AMBIENCE_ID_00,
|
||||
/* 0x01 */ AMBIENCE_ID_01,
|
||||
/* 0x02 */ AMBIENCE_ID_02,
|
||||
/* 0x03 */ AMBIENCE_ID_03,
|
||||
/* 0x04 */ AMBIENCE_ID_04,
|
||||
/* 0x05 */ AMBIENCE_ID_05,
|
||||
/* 0x06 */ AMBIENCE_ID_06,
|
||||
/* 0x07 */ AMBIENCE_ID_07,
|
||||
/* 0x08 */ AMBIENCE_ID_08,
|
||||
/* 0x09 */ AMBIENCE_ID_09,
|
||||
/* 0x0A */ AMBIENCE_ID_0A,
|
||||
/* 0x0B */ AMBIENCE_ID_0B,
|
||||
/* 0x0C */ AMBIENCE_ID_0C,
|
||||
/* 0x0D */ AMBIENCE_ID_0D,
|
||||
/* 0x0E */ AMBIENCE_ID_0E,
|
||||
/* 0x0F */ AMBIENCE_ID_0F,
|
||||
/* 0x10 */ AMBIENCE_ID_10,
|
||||
/* 0x11 */ AMBIENCE_ID_11,
|
||||
/* 0x12 */ AMBIENCE_ID_12,
|
||||
/* 0x13 */ AMBIENCE_ID_13,
|
||||
/* 0xFF */ AMBIENCE_ID_DISABLED = 0xFF
|
||||
} AmbienceId; // playerIndex = SEQ_PLAYER_AMBIENCE
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ NATURE_STREAM_0,
|
||||
/* 0x01 */ NATURE_STREAM_1,
|
||||
/* 0x02 */ NATURE_STREAM_2,
|
||||
/* 0x03 */ NATURE_STREAM_3
|
||||
} NatureStreamId;
|
||||
/* 0x00 */ AMBIENCE_STREAM_0,
|
||||
/* 0x01 */ AMBIENCE_STREAM_1,
|
||||
/* 0x02 */ AMBIENCE_STREAM_2,
|
||||
/* 0x03 */ AMBIENCE_STREAM_3
|
||||
} AmbienceStreamId;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ NATURE_CRITTER_00,
|
||||
/* 0x01 */ NATURE_CRITTER_01,
|
||||
/* 0x02 */ NATURE_CRITTER_02,
|
||||
/* 0x03 */ NATURE_CRITTER_03,
|
||||
/* 0x04 */ NATURE_CRITTER_04,
|
||||
/* 0x05 */ NATURE_CRITTER_05,
|
||||
/* 0x06 */ NATURE_CRITTER_06,
|
||||
/* 0x07 */ NATURE_CRITTER_07,
|
||||
/* 0x08 */ NATURE_CRITTER_08,
|
||||
/* 0x09 */ NATURE_CRITTER_09,
|
||||
/* 0x0A */ NATURE_CRITTER_10,
|
||||
/* 0x0B */ NATURE_CRITTER_11,
|
||||
/* 0x0C */ NATURE_CRITTER_12,
|
||||
/* 0x0D */ NATURE_CRITTER_13,
|
||||
/* 0x0E */ NATURE_CRITTER_14,
|
||||
/* 0x0F */ NATURE_CRITTER_15,
|
||||
/* 0x10 */ NATURE_CRITTER_16,
|
||||
/* 0x11 */ NATURE_CRITTER_17,
|
||||
/* 0x12 */ NATURE_CRITTER_18,
|
||||
/* 0x13 */ NATURE_CRITTER_19
|
||||
} NatureAmimalId;
|
||||
/* 0x00 */ AMBIENCE_CRITTER_00,
|
||||
/* 0x01 */ AMBIENCE_CRITTER_01,
|
||||
/* 0x02 */ AMBIENCE_CRITTER_02,
|
||||
/* 0x03 */ AMBIENCE_CRITTER_03,
|
||||
/* 0x04 */ AMBIENCE_CRITTER_04,
|
||||
/* 0x05 */ AMBIENCE_CRITTER_05,
|
||||
/* 0x06 */ AMBIENCE_CRITTER_06,
|
||||
/* 0x07 */ AMBIENCE_CRITTER_07,
|
||||
/* 0x08 */ AMBIENCE_CRITTER_08,
|
||||
/* 0x09 */ AMBIENCE_CRITTER_09,
|
||||
/* 0x0A */ AMBIENCE_CRITTER_10,
|
||||
/* 0x0B */ AMBIENCE_CRITTER_11,
|
||||
/* 0x0C */ AMBIENCE_CRITTER_12,
|
||||
/* 0x0D */ AMBIENCE_CRITTER_13,
|
||||
/* 0x0E */ AMBIENCE_CRITTER_14,
|
||||
/* 0x0F */ AMBIENCE_CRITTER_15,
|
||||
/* 0x10 */ AMBIENCE_CRITTER_16,
|
||||
/* 0x11 */ AMBIENCE_CRITTER_17,
|
||||
/* 0x12 */ AMBIENCE_CRITTER_18,
|
||||
/* 0x13 */ AMBIENCE_CRITTER_19
|
||||
} AmbienceCritterId;
|
||||
|
||||
#define NATURE_IO_CRITTER_0_TYPE(type) NATURE_CHANNEL_CRITTER_0, CHANNEL_IO_PORT_2, type
|
||||
#define NATURE_IO_CRITTER_0_BEND_PITCH(bend) NATURE_CHANNEL_CRITTER_0, CHANNEL_IO_PORT_3, bend
|
||||
#define NATURE_IO_CRITTER_0_NUM_LAYERS(num) NATURE_CHANNEL_CRITTER_0, CHANNEL_IO_PORT_4, num
|
||||
#define NATURE_IO_CRITTER_0_PORT5(reverb) NATURE_CHANNEL_CRITTER_0, CHANNEL_IO_PORT_5, reverb
|
||||
#define AMBIENCE_IO_CRITTER_0_TYPE(type) AMBIENCE_CHANNEL_CRITTER_0, CHANNEL_IO_PORT_2, type
|
||||
#define AMBIENCE_IO_CRITTER_0_BEND_PITCH(bend) AMBIENCE_CHANNEL_CRITTER_0, CHANNEL_IO_PORT_3, bend
|
||||
#define AMBIENCE_IO_CRITTER_0_NUM_LAYERS(num) AMBIENCE_CHANNEL_CRITTER_0, CHANNEL_IO_PORT_4, num
|
||||
#define AMBIENCE_IO_CRITTER_0_PORT5(reverb) AMBIENCE_CHANNEL_CRITTER_0, CHANNEL_IO_PORT_5, reverb
|
||||
|
||||
#define NATURE_IO_CRITTER_1_TYPE(type) NATURE_CHANNEL_CRITTER_1, CHANNEL_IO_PORT_2, type
|
||||
#define NATURE_IO_CRITTER_1_BEND_PITCH(bend) NATURE_CHANNEL_CRITTER_1, CHANNEL_IO_PORT_3, bend
|
||||
#define NATURE_IO_CRITTER_1_NUM_LAYERS(num) NATURE_CHANNEL_CRITTER_1, CHANNEL_IO_PORT_4, num
|
||||
#define NATURE_IO_CRITTER_1_PORT5(reverb) NATURE_CHANNEL_CRITTER_1, CHANNEL_IO_PORT_5, reverb
|
||||
#define AMBIENCE_IO_CRITTER_1_TYPE(type) AMBIENCE_CHANNEL_CRITTER_1, CHANNEL_IO_PORT_2, type
|
||||
#define AMBIENCE_IO_CRITTER_1_BEND_PITCH(bend) AMBIENCE_CHANNEL_CRITTER_1, CHANNEL_IO_PORT_3, bend
|
||||
#define AMBIENCE_IO_CRITTER_1_NUM_LAYERS(num) AMBIENCE_CHANNEL_CRITTER_1, CHANNEL_IO_PORT_4, num
|
||||
#define AMBIENCE_IO_CRITTER_1_PORT5(reverb) AMBIENCE_CHANNEL_CRITTER_1, CHANNEL_IO_PORT_5, reverb
|
||||
|
||||
#define NATURE_IO_CRITTER_2_TYPE(type) NATURE_CHANNEL_CRITTER_2, CHANNEL_IO_PORT_2, type
|
||||
#define NATURE_IO_CRITTER_2_BEND_PITCH(bend) NATURE_CHANNEL_CRITTER_2, CHANNEL_IO_PORT_3, bend
|
||||
#define NATURE_IO_CRITTER_2_NUM_LAYERS(num) NATURE_CHANNEL_CRITTER_2, CHANNEL_IO_PORT_4, num
|
||||
#define NATURE_IO_CRITTER_2_PORT5(reverb) NATURE_CHANNEL_CRITTER_2, CHANNEL_IO_PORT_5, reverb
|
||||
#define AMBIENCE_IO_CRITTER_2_TYPE(type) AMBIENCE_CHANNEL_CRITTER_2, CHANNEL_IO_PORT_2, type
|
||||
#define AMBIENCE_IO_CRITTER_2_BEND_PITCH(bend) AMBIENCE_CHANNEL_CRITTER_2, CHANNEL_IO_PORT_3, bend
|
||||
#define AMBIENCE_IO_CRITTER_2_NUM_LAYERS(num) AMBIENCE_CHANNEL_CRITTER_2, CHANNEL_IO_PORT_4, num
|
||||
#define AMBIENCE_IO_CRITTER_2_PORT5(reverb) AMBIENCE_CHANNEL_CRITTER_2, CHANNEL_IO_PORT_5, reverb
|
||||
|
||||
#define NATURE_IO_CRITTER_3_TYPE(type) NATURE_CHANNEL_CRITTER_3, CHANNEL_IO_PORT_2, type
|
||||
#define NATURE_IO_CRITTER_3_BEND_PITCH(bend) NATURE_CHANNEL_CRITTER_3, CHANNEL_IO_PORT_3, bend
|
||||
#define NATURE_IO_CRITTER_3_NUM_LAYERS(num) NATURE_CHANNEL_CRITTER_3, CHANNEL_IO_PORT_4, num
|
||||
#define NATURE_IO_CRITTER_3_PORT5(reverb) NATURE_CHANNEL_CRITTER_3, CHANNEL_IO_PORT_5, reverb
|
||||
#define AMBIENCE_IO_CRITTER_3_TYPE(type) AMBIENCE_CHANNEL_CRITTER_3, CHANNEL_IO_PORT_2, type
|
||||
#define AMBIENCE_IO_CRITTER_3_BEND_PITCH(bend) AMBIENCE_CHANNEL_CRITTER_3, CHANNEL_IO_PORT_3, bend
|
||||
#define AMBIENCE_IO_CRITTER_3_NUM_LAYERS(num) AMBIENCE_CHANNEL_CRITTER_3, CHANNEL_IO_PORT_4, num
|
||||
#define AMBIENCE_IO_CRITTER_3_PORT5(reverb) AMBIENCE_CHANNEL_CRITTER_3, CHANNEL_IO_PORT_5, reverb
|
||||
|
||||
#define NATURE_IO_CRITTER_4_TYPE(type) NATURE_CHANNEL_CRITTER_4, CHANNEL_IO_PORT_2, type
|
||||
#define NATURE_IO_CRITTER_4_BEND_PITCH(bend) NATURE_CHANNEL_CRITTER_4, CHANNEL_IO_PORT_3, bend
|
||||
#define NATURE_IO_CRITTER_4_NUM_LAYERS(num) NATURE_CHANNEL_CRITTER_4, CHANNEL_IO_PORT_4, num
|
||||
#define NATURE_IO_CRITTER_4_PORT5(reverb) NATURE_CHANNEL_CRITTER_4, CHANNEL_IO_PORT_5, reverb
|
||||
#define AMBIENCE_IO_CRITTER_4_TYPE(type) AMBIENCE_CHANNEL_CRITTER_4, CHANNEL_IO_PORT_2, type
|
||||
#define AMBIENCE_IO_CRITTER_4_BEND_PITCH(bend) AMBIENCE_CHANNEL_CRITTER_4, CHANNEL_IO_PORT_3, bend
|
||||
#define AMBIENCE_IO_CRITTER_4_NUM_LAYERS(num) AMBIENCE_CHANNEL_CRITTER_4, CHANNEL_IO_PORT_4, num
|
||||
#define AMBIENCE_IO_CRITTER_4_PORT5(reverb) AMBIENCE_CHANNEL_CRITTER_4, CHANNEL_IO_PORT_5, reverb
|
||||
|
||||
#define NATURE_IO_CRITTER_5_TYPE(type) NATURE_CHANNEL_CRITTER_5, CHANNEL_IO_PORT_2, type
|
||||
#define NATURE_IO_CRITTER_5_BEND_PITCH(bend) NATURE_CHANNEL_CRITTER_5, CHANNEL_IO_PORT_3, bend
|
||||
#define NATURE_IO_CRITTER_5_NUM_LAYERS(num) NATURE_CHANNEL_CRITTER_5, CHANNEL_IO_PORT_4, num
|
||||
#define NATURE_IO_CRITTER_5_PORT5(reverb) NATURE_CHANNEL_CRITTER_5, CHANNEL_IO_PORT_5, reverb
|
||||
#define AMBIENCE_IO_CRITTER_5_TYPE(type) AMBIENCE_CHANNEL_CRITTER_5, CHANNEL_IO_PORT_2, type
|
||||
#define AMBIENCE_IO_CRITTER_5_BEND_PITCH(bend) AMBIENCE_CHANNEL_CRITTER_5, CHANNEL_IO_PORT_3, bend
|
||||
#define AMBIENCE_IO_CRITTER_5_NUM_LAYERS(num) AMBIENCE_CHANNEL_CRITTER_5, CHANNEL_IO_PORT_4, num
|
||||
#define AMBIENCE_IO_CRITTER_5_PORT5(reverb) AMBIENCE_CHANNEL_CRITTER_5, CHANNEL_IO_PORT_5, reverb
|
||||
|
||||
#define NATURE_IO_CRITTER_6_TYPE(type) NATURE_CHANNEL_CRITTER_6, CHANNEL_IO_PORT_2, type
|
||||
#define NATURE_IO_CRITTER_6_BEND_PITCH(bend) NATURE_CHANNEL_CRITTER_6, CHANNEL_IO_PORT_3, bend
|
||||
#define NATURE_IO_CRITTER_6_NUM_LAYERS(num) NATURE_CHANNEL_CRITTER_6, CHANNEL_IO_PORT_4, num
|
||||
#define NATURE_IO_CRITTER_6_PORT5(reverb) NATURE_CHANNEL_CRITTER_6, CHANNEL_IO_PORT_5, reverb
|
||||
#define AMBIENCE_IO_CRITTER_6_TYPE(type) AMBIENCE_CHANNEL_CRITTER_6, CHANNEL_IO_PORT_2, type
|
||||
#define AMBIENCE_IO_CRITTER_6_BEND_PITCH(bend) AMBIENCE_CHANNEL_CRITTER_6, CHANNEL_IO_PORT_3, bend
|
||||
#define AMBIENCE_IO_CRITTER_6_NUM_LAYERS(num) AMBIENCE_CHANNEL_CRITTER_6, CHANNEL_IO_PORT_4, num
|
||||
#define AMBIENCE_IO_CRITTER_6_PORT5(reverb) AMBIENCE_CHANNEL_CRITTER_6, CHANNEL_IO_PORT_5, reverb
|
||||
|
||||
#define NATURE_IO_STREAM_0_TYPE(type) NATURE_CHANNEL_STREAM_0, CHANNEL_IO_PORT_2, type
|
||||
#define NATURE_IO_STREAM_0_PORT3(data) NATURE_CHANNEL_STREAM_0, CHANNEL_IO_PORT_3, data
|
||||
#define NATURE_IO_STREAM_0_PORT4(data) NATURE_CHANNEL_STREAM_0, CHANNEL_IO_PORT_4, data
|
||||
#define AMBIENCE_IO_STREAM_0_TYPE(type) AMBIENCE_CHANNEL_STREAM_0, CHANNEL_IO_PORT_2, type
|
||||
#define AMBIENCE_IO_STREAM_0_PORT3(data) AMBIENCE_CHANNEL_STREAM_0, CHANNEL_IO_PORT_3, data
|
||||
#define AMBIENCE_IO_STREAM_0_PORT4(data) AMBIENCE_CHANNEL_STREAM_0, CHANNEL_IO_PORT_4, data
|
||||
|
||||
#define NATURE_IO_STREAM_1_TYPE(type) NATURE_CHANNEL_STREAM_1, CHANNEL_IO_PORT_2, type
|
||||
#define NATURE_IO_STREAM_1_PORT3(data) NATURE_CHANNEL_STREAM_1, CHANNEL_IO_PORT_3, data
|
||||
#define NATURE_IO_STREAM_1_PORT4(data) NATURE_CHANNEL_STREAM_1, CHANNEL_IO_PORT_4, data
|
||||
#define AMBIENCE_IO_STREAM_1_TYPE(type) AMBIENCE_CHANNEL_STREAM_1, CHANNEL_IO_PORT_2, type
|
||||
#define AMBIENCE_IO_STREAM_1_PORT3(data) AMBIENCE_CHANNEL_STREAM_1, CHANNEL_IO_PORT_3, data
|
||||
#define AMBIENCE_IO_STREAM_1_PORT4(data) AMBIENCE_CHANNEL_STREAM_1, CHANNEL_IO_PORT_4, data
|
||||
|
||||
#define NATURE_IO_RAIN_PORT4(data) NATURE_CHANNEL_RAIN, CHANNEL_IO_PORT_4, data
|
||||
#define AMBIENCE_IO_RAIN_PORT4(data) AMBIENCE_CHANNEL_RAIN, CHANNEL_IO_PORT_4, data
|
||||
|
||||
#define NATURE_IO_ENTRIES_END 0xFF
|
||||
#define AMBIENCE_IO_ENTRIES_END 0xFF
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,7 +29,7 @@ MtxF* Matrix_GetCurrent(void);
|
||||
|
||||
/* Basic operations */
|
||||
|
||||
void Matrix_Mult(MtxF* matrix, MatrixMode mode);
|
||||
void Matrix_Mult(MtxF* mf, MatrixMode mode);
|
||||
void Matrix_Translate(f32 x, f32 y, f32 z, MatrixMode mode);
|
||||
void Matrix_Scale(f32 x, f32 y, f32 z, MatrixMode mode);
|
||||
void Matrix_RotateXS(s16 x, MatrixMode mode);
|
||||
|
||||
+14
-32
@@ -1471,9 +1471,7 @@ extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
|
||||
// extern UNK_TYPE4 D_801D0BB0;
|
||||
// extern UNK_TYPE1 D_801D0C80;
|
||||
// extern UNK_TYPE1 D_801D0CB0;
|
||||
extern const TransitionInit TransitionFade_InitVars;
|
||||
// extern UNK_TYPE1 D_801D0D00;
|
||||
extern const TransitionInit TransitionCircle_InitVars;
|
||||
extern Gfx D_801D0D00[];
|
||||
extern s32 gDbgCamEnabled;
|
||||
// extern UNK_TYPE1 D_801D0D54;
|
||||
// extern UNK_TYPE2 sQuakeIndex;
|
||||
@@ -1557,11 +1555,11 @@ extern f32 gPitchFrequencies[];
|
||||
extern u8 gDefaultShortNoteVelocityTable[];
|
||||
extern u8 gDefaultShortNoteGateTimeTable[];
|
||||
extern EnvelopePoint gDefaultEnvelope[];
|
||||
extern NoteSubEu gZeroNoteSub;
|
||||
extern NoteSubEu gDefaultNoteSub;
|
||||
extern u16 gHeadsetPanQuantization[];
|
||||
extern u16 gHeadsetPanQuantization[];
|
||||
extern s16 D_801D58A8[];
|
||||
extern NoteSampleState gZeroedSampleState;
|
||||
extern NoteSampleState gDefaultSampleState;
|
||||
extern u16 gHaasEffectDelaySize[];
|
||||
extern u16 gHaasEffectDelaySize[];
|
||||
extern s16 gInvalidAdpcmCodeBook[];
|
||||
extern f32 gHeadsetPanVolume[];
|
||||
extern f32 gStereoPanVolume[];
|
||||
extern f32 gDefaultPanVolume[];
|
||||
@@ -1721,21 +1719,7 @@ extern s8 gSfxDefaultReverb;
|
||||
extern u8 gAudioSpecId;
|
||||
// extern UNK_TYPE1 D_801DB4D8;
|
||||
// extern UNK_TYPE4 D_801DB4DC;
|
||||
// extern UNK_TYPE1 D_801DB4E0;
|
||||
// extern UNK_TYPE1 D_801DB528;
|
||||
// extern UNK_TYPE1 D_801DB570;
|
||||
// extern UNK_TYPE1 D_801DB5B8;
|
||||
// extern UNK_TYPE1 D_801DB600;
|
||||
// extern UNK_TYPE1 D_801DB648;
|
||||
// extern UNK_TYPE1 D_801DB690;
|
||||
// extern UNK_TYPE1 D_801DB6D8;
|
||||
// extern UNK_TYPE1 D_801DB720;
|
||||
// extern UNK_TYPE1 D_801DB750;
|
||||
// extern UNK_TYPE1 D_801DB798;
|
||||
// extern UNK_TYPE1 D_801DB870;
|
||||
// extern UNK_TYPE1 D_801DB8B8;
|
||||
// extern UNK_TYPE1 D_801DB900;
|
||||
extern UNK_PTR D_801DB930;
|
||||
extern ReverbSettings* gReverbSettingsTable[];
|
||||
extern AudioSpec gAudioSpecs[21];
|
||||
|
||||
// rodata
|
||||
@@ -2717,7 +2701,7 @@ extern f32 D_801DE860;
|
||||
extern f32 D_801DE864;
|
||||
extern f32 D_801DE868;
|
||||
extern f32 D_801DE884;
|
||||
extern TexturePtr gCircleTex;
|
||||
extern TexturePtr gCircleTex[];
|
||||
extern f32 D_801DF090;
|
||||
extern f32 D_801DF094;
|
||||
extern f32 D_801DF0A0;
|
||||
@@ -3181,8 +3165,6 @@ extern s16 D_801F4E7A;
|
||||
// extern UNK_TYPE1 D_801F6B1E;
|
||||
// extern UNK_TYPE1 D_801F6B20;
|
||||
// extern UNK_TYPE1 D_801F6B22;
|
||||
extern ShrinkWindowContext gShrinkWindowContext;
|
||||
extern ShrinkWindowContext* gShrinkWindowContextPtr;
|
||||
// extern UNK_TYPE4 D_801F6B50;
|
||||
// extern UNK_TYPE1 D_801F6B58;
|
||||
extern void (*sKaleidoScopeUpdateFunc)(PlayState* play);
|
||||
@@ -3416,7 +3398,7 @@ extern s32 D_801FD120;
|
||||
// extern UNK_TYPE1 D_801FD434;
|
||||
// extern UNK_TYPE1 D_801FD435;
|
||||
// extern UNK_TYPE1 D_801FD436;
|
||||
// extern UNK_TYPE1 D_801FD438;
|
||||
// extern UNK_TYPE1 sPrevAmbienceSeqId;
|
||||
// extern UNK_TYPE1 D_801FD43A;
|
||||
// extern UNK_TYPE1 D_801FD43B;
|
||||
// extern UNK_TYPE1 D_801FD43E;
|
||||
@@ -3477,7 +3459,7 @@ extern ActiveSfx gActiveSfx[7][3];
|
||||
// extern UNK_TYPE1 D_8020001E;
|
||||
// extern UNK_TYPE1 D_802000C9;
|
||||
// extern UNK_TYPE1 D_802000D4;
|
||||
// extern UNK_TYPE1 D_80200140;
|
||||
extern ActiveSequence gActiveSeqs[];
|
||||
// extern UNK_TYPE1 D_8020034A;
|
||||
// extern UNK_TYPE1 D_80200B88;
|
||||
// extern UNK_TYPE1 D_80200BBA;
|
||||
@@ -3485,10 +3467,10 @@ extern ActiveSfx gActiveSfx[7][3];
|
||||
// extern UNK_TYPE1 D_80200BCE;
|
||||
// extern UNK_TYPE1 D_80200BD0;
|
||||
extern AudioContext gAudioContext; // at 0x80200C70
|
||||
extern void (*D_80208E68)(void);
|
||||
extern u32 (*D_80208E6C)(s8 value, SequenceChannel* channel);
|
||||
extern s32 (*D_80208E70)(Sample*, s32, s8, s32);
|
||||
extern Acmd* (*D_80208E74)(Acmd*, s32, s32);
|
||||
extern void (*gCustomAudioUpdateFunction)(void);
|
||||
extern u32 (*gCustomAudioSeqFunction)(s8 value, SequenceChannel* channel);
|
||||
extern s32 (*gCustomAudioReverbFunction)(Sample*, s32, s8, s32);
|
||||
extern Acmd* (*gCustomAudioSynthFunction)(Acmd*, s32, s32);
|
||||
|
||||
// post-code buffers
|
||||
extern u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
|
||||
|
||||
+9
-101
@@ -286,13 +286,6 @@ typedef struct {
|
||||
/* 0x10 */ OSTime resetTime;
|
||||
} NmiBuff; // size >= 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s8 letterboxTarget;
|
||||
/* 0x1 */ s8 letterboxMagnitude;
|
||||
/* 0x2 */ s8 pillarboxTarget;
|
||||
/* 0x3 */ s8 pillarboxMagnitude;
|
||||
} ShrinkWindowContext; // size = 0x4
|
||||
|
||||
typedef void(*osCreateThread_func)(void*);
|
||||
|
||||
typedef enum {
|
||||
@@ -440,13 +433,12 @@ typedef struct {
|
||||
/* 0x220 */ f32 unk_220;
|
||||
/* 0x224 */ u16 alpha;
|
||||
/* 0x226 */ s16 offsetY;
|
||||
/* 0x228 */ s32 unk_228;
|
||||
/* 0x22C */ s32 unk_22C;
|
||||
/* 0x230 */ s32 stickRelX;
|
||||
/* 0x234 */ s32 stickRelY;
|
||||
/* 0x228 */ UNK_TYPE1 unk_228[0x8];
|
||||
/* 0x230 */ s32 stickAdjX;
|
||||
/* 0x234 */ s32 stickAdjY;
|
||||
/* 0x238 */ s16 cursorPoint[5];
|
||||
/* 0x242 */ s16 cursorX[5];
|
||||
/* 0x24C */ s16 cursorY[5];
|
||||
/* 0x242 */ s16 cursorXIndex[5];
|
||||
/* 0x24C */ s16 cursorYIndex[5];
|
||||
/* 0x256 */ s16 unk_256;
|
||||
/* 0x258 */ s16 cursorSpecialPos;
|
||||
/* 0x25A */ s16 pageSwitchTimer;
|
||||
@@ -808,32 +800,6 @@ typedef enum {
|
||||
|
||||
#define TRANS_NEXT_TYPE_DEFAULT 0xFF
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s16 transitionType;
|
||||
/* 0x002 */ s8 fbdemoType;
|
||||
/* 0x003 */ char unk03[0x5];
|
||||
/* 0x008 */ s32 instanceData;
|
||||
/* 0x00C */ char unk0C[0x224];
|
||||
/*
|
||||
union {
|
||||
TransitionFade fade;
|
||||
TransitionCircle circle;
|
||||
TransitionTriforce triforce;
|
||||
TransitionWipe wipe;
|
||||
} instanceData;
|
||||
*/
|
||||
/* 0x230 */ void* (*init)(void* transition);
|
||||
/* 0x234 */ void (*destroy)(void* transition);
|
||||
/* 0x238 */ void (*update)(void* transition, s32 updateRate);
|
||||
/* 0x23C */ void (*draw)(void* transition, Gfx** gfxP);
|
||||
/* 0x240 */ void (*start)(void* transition);
|
||||
/* 0x244 */ void (*setType)(void* transition, s32 type);
|
||||
/* 0x248 */ void (*setColor)(void* transition, u32 color);
|
||||
/* 0x24C */ void (*setUnkColor)(void* transition, u32 color);
|
||||
/* 0x250 */ s32 (*isDone)(void* transition);
|
||||
/* 0x254 */ char unk254[0x4];
|
||||
} TransitionContext; // size = 0x258
|
||||
|
||||
typedef struct FaultAddrConvClient {
|
||||
/* 0x0 */ struct FaultAddrConvClient* next;
|
||||
/* 0x4 */ void* (*callback)(void*, void*);
|
||||
@@ -934,63 +900,6 @@ typedef s32 (*ColChkLineFunc)(PlayState*, CollisionCheckContext*, Collider*, Vec
|
||||
|
||||
typedef void(*room_draw_func)(PlayState* play, Room* room, u32 flags);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f atOffset;
|
||||
/* 0x0C */ Vec3f eyeOffset;
|
||||
/* 0x18 */ s16 rollOffset;
|
||||
/* 0x1A */ s16 zoom;
|
||||
} ShakeInfo; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 randIdx;
|
||||
/* 0x02 */ s16 countdownMax;
|
||||
/* 0x04 */ Camera* camera;
|
||||
/* 0x08 */ u32 callbackIdx;
|
||||
/* 0x0C */ s16 verticalMag;
|
||||
/* 0x0E */ s16 horizontalMag;
|
||||
/* 0x10 */ s16 zoom;
|
||||
/* 0x12 */ s16 rollOffset;
|
||||
/* 0x14 */ Vec3s shakePlaneOffset; // angle deviations from shaking in the perpendicular plane
|
||||
/* 0x1A */ s16 speed;
|
||||
/* 0x1C */ s16 isShakePerpendicular;
|
||||
/* 0x1E */ s16 countdown;
|
||||
/* 0x20 */ s16 camId;
|
||||
} QuakeRequest; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f atOffset;
|
||||
/* 0x0C */ Vec3f eyeOffset;
|
||||
/* 0x18 */ s16 rollOffset;
|
||||
/* 0x1A */ s16 zoom;
|
||||
/* 0x1C */ f32 max; // Set to scaled max data of struct (mag for Vec3f), never used
|
||||
} QuakeCamCalc; // size = 0x20
|
||||
|
||||
typedef s16 (*QuakeCallbackFunc)(QuakeRequest*, ShakeInfo*);
|
||||
|
||||
#define QUAKE_SPEED (1 << 0)
|
||||
#define QUAKE_VERTICAL_MAG (1 << 1)
|
||||
#define QUAKE_HORIZONTAL_MAG (1 << 2)
|
||||
#define QUAKE_ZOOM (1 << 3)
|
||||
#define QUAKE_ROLL_OFFSET (1 << 4)
|
||||
#define QUAKE_SHAKE_PLANE_OFFSET_X (1 << 5)
|
||||
#define QUAKE_SHAKE_PLANE_OFFSET_Y (1 << 6)
|
||||
#define QUAKE_SHAKE_PLANE_OFFSET_Z (1 << 7)
|
||||
#define QUAKE_COUNTDOWN (1 << 8)
|
||||
#define QUAKE_IS_SHAKE_PERPENDICULAR (1 << 9)
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ PlayState* play;
|
||||
/* 0x4 */ s32 type; // bitfield, highest set bit determines type
|
||||
/* 0x8 */ s16 countdown;
|
||||
/* 0xA */ s16 state;
|
||||
} DistortionContext; // size = 0xC
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ DISTORTION_INACTIVE,
|
||||
/* 1 */ DISTORTION_ACTIVE,
|
||||
/* 2 */ DISTORTION_SETUP
|
||||
} DistortionState;
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 controllers; // bit 0 is set if controller 1 is plugged in, etc.
|
||||
/* 0x001 */ UNK_TYPE1 pad1[0x13];
|
||||
@@ -1093,10 +1002,9 @@ struct FireObj {
|
||||
}; // size = 0x8B
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 seqIndex;
|
||||
/* 0x1 */ u8 nightSeqIndex;
|
||||
/* 0x2 */ u8 unk_02;
|
||||
} SoundContext; // size = 0x3
|
||||
/* 0x0 */ u8 seqId;
|
||||
/* 0x1 */ u8 ambienceId;
|
||||
} SequenceContext; // size = 0x2
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s32 enabled;
|
||||
@@ -1132,7 +1040,7 @@ struct PlayState {
|
||||
/* 0x00800 */ Camera* cameraPtrs[NUM_CAMS];
|
||||
/* 0x00810 */ s16 activeCamId;
|
||||
/* 0x00812 */ s16 nextCamera;
|
||||
/* 0x00814 */ SoundContext soundCtx;
|
||||
/* 0x00814 */ SequenceContext sequenceCtx;
|
||||
/* 0x00818 */ LightContext lightCtx;
|
||||
/* 0x00828 */ FrameAdvanceContext frameAdvCtx;
|
||||
/* 0x00830 */ CollisionContext colCtx;
|
||||
|
||||
+2
-2
@@ -105,8 +105,8 @@ typedef enum {
|
||||
} AllocType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromStart;
|
||||
/* 0x04 */ u32 vromEnd;
|
||||
/* 0x00 */ uintptr_t vromStart;
|
||||
/* 0x04 */ uintptr_t vromEnd;
|
||||
/* 0x08 */ void* vramStart;
|
||||
/* 0x0C */ void* vramEnd;
|
||||
/* 0x10 */ void* loadedRamAddr; // original name: "allocp"
|
||||
|
||||
+179
-144
@@ -1,7 +1,7 @@
|
||||
#ifndef Z64_AUDIO_H
|
||||
#define Z64_AUDIO_H
|
||||
|
||||
#define MK_AUDIO_CMD(b0,b1,b2,b3) ((((b0) & 0xFF) << 0x18) | (((b1) & 0xFF) << 0x10) | (((b2) & 0xFF) << 0x8) | (((b3) & 0xFF) << 0))
|
||||
#define AUDIO_MK_CMD(b0,b1,b2,b3) ((((b0) & 0xFF) << 0x18) | (((b1) & 0xFF) << 0x10) | (((b2) & 0xFF) << 0x8) | (((b3) & 0xFF) << 0))
|
||||
|
||||
#define NO_LAYER ((SequenceLayer*)(-1))
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#define IS_SEQUENCE_CHANNEL_VALID(ptr) ((uintptr_t)(ptr) != (uintptr_t)&gAudioContext.sequenceChannelNone)
|
||||
#define SEQ_NUM_CHANNELS 16
|
||||
#define SEQ_IO_VAL_NONE -1
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SEQPLAYER_STATE_0,
|
||||
@@ -31,13 +32,45 @@ typedef enum {
|
||||
#define ADSR_GOTO -2
|
||||
#define ADSR_RESTART -3
|
||||
|
||||
#define AIBUF_LEN 0x580
|
||||
// size of a single sample point
|
||||
#define SAMPLE_SIZE sizeof(s16)
|
||||
|
||||
// Samples are processed in groups of 16 called a "frame"
|
||||
#define SAMPLES_PER_FRAME ADPCMFSIZE
|
||||
|
||||
// The length of one left/right channel is 13 frames
|
||||
#define DMEM_1CH_SIZE (13 * SAMPLES_PER_FRAME * SAMPLE_SIZE)
|
||||
// Both left and right channels
|
||||
#define DMEM_2CH_SIZE (2 * DMEM_1CH_SIZE)
|
||||
|
||||
#define AIBUF_LEN (88 * SAMPLES_PER_FRAME) // number of samples
|
||||
#define AIBUF_SIZE (AIBUF_LEN * SAMPLE_SIZE) // number of bytes
|
||||
|
||||
// Filter sizes
|
||||
#define FILTER_SIZE (8 * SAMPLE_SIZE)
|
||||
#define FILTER_BUF_PART1 (8 * SAMPLE_SIZE)
|
||||
#define FILTER_BUF_PART2 (8 * SAMPLE_SIZE)
|
||||
|
||||
// Must be the same amount of samples as copied by aDuplicate() (audio microcode)
|
||||
#define WAVE_SAMPLE_COUNT 64
|
||||
|
||||
#define AUDIO_RELOCATED_ADDRESS_START K0BASE
|
||||
|
||||
#define REVERB_INDEX_NONE -1
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ REVERB_DATA_TYPE_SETTINGS, // Reverb Settings (Init)
|
||||
/* 1 */ REVERB_DATA_TYPE_DELAY, // Reverb Delay (numSamples)
|
||||
/* 2 */ REVERB_DATA_TYPE_DECAY, // Reverb Decay Ratio
|
||||
/* 3 */ REVERB_DATA_TYPE_SUB_VOLUME, // Reverb Sub-Volume
|
||||
/* 4 */ REVERB_DATA_TYPE_VOLUME, // Reverb Volume
|
||||
/* 5 */ REVERB_DATA_TYPE_LEAK_RIGHT, // Reverb Leak Right Channel
|
||||
/* 6 */ REVERB_DATA_TYPE_LEAK_LEFT, // Reverb Leak Left Channel
|
||||
/* 7 */ REVERB_DATA_TYPE_FILTER_LEFT, // Reverb Left Filter
|
||||
/* 8 */ REVERB_DATA_TYPE_FILTER_RIGHT, // Reverb Right Filter
|
||||
/* 9 */ REVERB_DATA_TYPE_9 // Reverb Unk
|
||||
} ReverbDataType;
|
||||
|
||||
typedef enum {
|
||||
/* 0x1 */ AUDIO_ERROR_NO_INST = 1,
|
||||
/* 0x3 */ AUDIO_ERROR_INVALID_INST_ID = 3,
|
||||
@@ -51,9 +84,9 @@ typedef enum {
|
||||
typedef enum {
|
||||
/* 0 */ SOUNDMODE_STEREO,
|
||||
/* 1 */ SOUNDMODE_HEADSET,
|
||||
/* 2 */ SOUNDMODE_SURROUND,
|
||||
/* 2 */ SOUNDMODE_SURROUND_EXTERNAL,
|
||||
/* 3 */ SOUNDMODE_MONO,
|
||||
/* 4 */ SOUNDMODE_SURROUND_EXTERNAL,
|
||||
/* 4 */ SOUNDMODE_SURROUND,
|
||||
} SoundMode;
|
||||
|
||||
typedef enum {
|
||||
@@ -77,12 +110,14 @@ typedef enum {
|
||||
} SampleMedium;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ CODEC_ADPCM,
|
||||
/* 1 */ CODEC_S8,
|
||||
/* 0 */ CODEC_ADPCM, // 16 2-byte samples (32 bytes) compressed into 4-bit samples (8 bytes) + 1 header byte
|
||||
/* 1 */ CODEC_S8, // 16 2-byte samples (32 bytes) compressed into 8-bit samples (16 bytes)
|
||||
/* 2 */ CODEC_S16_INMEMORY,
|
||||
/* 3 */ CODEC_SMALL_ADPCM,
|
||||
/* 3 */ CODEC_SMALL_ADPCM, // 16 2-byte samples (32 bytes) compressed into 2-bit samples (4 bytes) + 1 header byte
|
||||
/* 4 */ CODEC_REVERB,
|
||||
/* 5 */ CODEC_S16
|
||||
/* 5 */ CODEC_S16,
|
||||
/* 6 */ CODEC_UNK6,
|
||||
/* 7 */ CODEC_UNK7 // processed as uncompressed samples
|
||||
} SampleCodec;
|
||||
|
||||
typedef enum {
|
||||
@@ -164,24 +199,28 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 start;
|
||||
/* 0x04 */ u32 end;
|
||||
/* 0x04 */ u32 loopEnd; // numSamples into the sample where the loop ends
|
||||
/* 0x08 */ u32 count;
|
||||
/* 0x0C */ u32 unk_0C;
|
||||
/* 0x10 */ s16 state[16]; // only exists if count != 0. 8-byte aligned
|
||||
/* 0x0C */ u32 sampleEnd; // total number of s16-samples in the
|
||||
/* 0x10 */ s16 predictorState[16]; // only exists if count != 0. 8-byte aligned
|
||||
} AdpcmLoop; // size = 0x30 (or 0x10)
|
||||
|
||||
/**
|
||||
* The procedure used to design the codeBook is based on an adaptive clustering algorithm.
|
||||
* The size of the codeBook is (8 * order * numPredictors) and is 8-byte aligned
|
||||
*/
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 order;
|
||||
/* 0x04 */ s32 npredictors;
|
||||
/* 0x08 */ s16 book[1]; // size 8 * order * npredictors. 8-byte aligned
|
||||
/* 0x04 */ s32 numPredictors;
|
||||
/* 0x08 */ s16 codeBook[1]; // a table of prediction coefficients that the coder selects from to optimize sound quality.
|
||||
} AdpcmBook; // size >= 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 unk_0 : 1;
|
||||
/* 0x00 */ u32 codec : 3; // The state of compression or decompression
|
||||
/* 0x00 */ u32 medium : 2; // Medium where sample is currently stored
|
||||
/* 0x00 */ u32 unk_bit26 : 1; // Has the sample header been relocated (offsets to pointers)
|
||||
/* 0x00 */ u32 isRelocated : 1; // Size of the sample
|
||||
/* 0x00 */ u32 unk_bit26 : 1;
|
||||
/* 0x00 */ u32 isRelocated : 1; // Has the sample header been relocated (offsets to pointers)
|
||||
/* 0x01 */ u32 size : 24; // Size of the sample
|
||||
/* 0x04 */ u8* sampleAddr; // Raw sample data. Offset from the start of the sample bank or absolute address to either rom or ram
|
||||
/* 0x08 */ AdpcmLoop* loop; // Adpcm loop parameters used by the sample. Offset from the start of the sound font / pointer to ram
|
||||
@@ -193,18 +232,23 @@ typedef struct {
|
||||
/* 0x04 */ f32 tuning; // frequency scale factor
|
||||
} TunedSample; // size = 0x8
|
||||
|
||||
/**
|
||||
* Stores an entry of decompressed samples in a reverb ring buffer.
|
||||
* By storing the sample in a ring buffer, the time it takes to loop
|
||||
* around back to the same sample acts as a delay, leading to an echo effect.
|
||||
*/
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 numSamplesAfterDownsampling; // never read
|
||||
/* 0x02 */ s16 chunkLen; // never read
|
||||
/* 0x02 */ s16 numSamples; // never read
|
||||
/* 0x04 */ s16* toDownsampleLeft;
|
||||
/* 0x08 */ s16* toDownsampleRight; // data pointed to by left and right are adjacent in memory
|
||||
/* 0x0C */ s32 startPos; // start pos in ring buffer
|
||||
/* 0x10 */ s16 lengthA; // first length in ring buffer (from startPos, at most until end)
|
||||
/* 0x12 */ s16 lengthB; // second length in ring buffer (from pos 0)
|
||||
/* 0x14 */ u16 unk_14;
|
||||
/* 0x16 */ u16 unk_16;
|
||||
/* 0x18 */ u16 unk_18;
|
||||
} ReverbRingBufferItem; // size = 0x1C
|
||||
/* 0x10 */ s16 size; // first length in ring buffer (from startPos, at most until end)
|
||||
/* 0x12 */ s16 wrappedSize; // second length in ring buffer (from pos 0)
|
||||
/* 0x14 */ u16 loadResamplePitch;
|
||||
/* 0x16 */ u16 saveResamplePitch;
|
||||
/* 0x18 */ u16 saveResampleNumSamples;
|
||||
} ReverbBufferEntry; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 resampleFlags;
|
||||
@@ -212,35 +256,35 @@ typedef struct {
|
||||
/* 0x002 */ u8 framesToIgnore;
|
||||
/* 0x003 */ u8 curFrame;
|
||||
/* 0x004 */ u8 downsampleRate;
|
||||
/* 0x005 */ s8 unk_05;
|
||||
/* 0x006 */ u16 windowSize;
|
||||
/* 0x008 */ s16 unk_08;
|
||||
/* 0x00A */ s16 unk_0A;
|
||||
/* 0x00C */ u16 unk_0C;
|
||||
/* 0x00E */ u16 unk_0E;
|
||||
/* 0x005 */ s8 mixReverbIndex; // mix in reverb from this index. set to 0xFF to not mix any
|
||||
/* 0x006 */ u16 delayNumSamples; // number of samples between echos
|
||||
/* 0x008 */ s16 mixReverbStrength; // the gain/amount to mix in reverb from mixReverbIndex
|
||||
/* 0x00A */ s16 volume;
|
||||
/* 0x00C */ u16 decayRatio; // determines how fast reverb dissipate
|
||||
/* 0x00E */ u16 downsamplePitch;
|
||||
/* 0x010 */ s16 leakRtl;
|
||||
/* 0x012 */ s16 leakLtr;
|
||||
/* 0x014 */ u16 unk_14;
|
||||
/* 0x016 */ s16 unk_16;
|
||||
/* 0x018 */ u8 unk_18;
|
||||
/* 0x019 */ s8 unk_19;
|
||||
/* 0x01A */ u16 unk_1A;
|
||||
/* 0x01C */ u16 unk_1C;
|
||||
/* 0x01E */ u8 unk_1E;
|
||||
/* 0x020 */ s32 nextRingBufPos;
|
||||
/* 0x024 */ s32 unk_24; // May be bufSizePerChan
|
||||
/* 0x028 */ s16* leftRingBuf;
|
||||
/* 0x02C */ s16* rightRingBuf;
|
||||
/* 0x030 */ void* unk_30;
|
||||
/* 0x034 */ void* unk_34;
|
||||
/* 0x038 */ void* unk_38;
|
||||
/* 0x03C */ void* unk_3C;
|
||||
/* 0x040 */ ReverbRingBufferItem items[2][5];
|
||||
/* 0x158 */ ReverbRingBufferItem items2[2][5];
|
||||
/* 0x014 */ u16 subDelay; // number of samples between sub echos
|
||||
/* 0x016 */ s16 subVolume; // strength of the sub echos
|
||||
/* 0x018 */ u8 resampleEffectOn;
|
||||
/* 0x019 */ s8 resampleEffectExtraSamples;
|
||||
/* 0x01A */ u16 resampleEffectLoadUnk;
|
||||
/* 0x01C */ u16 resampleEffectSaveUnk;
|
||||
/* 0x01E */ u8 delayNumSamplesAfterDownsampling;
|
||||
/* 0x020 */ s32 nextReverbBufPos;
|
||||
/* 0x024 */ s32 delayNumSamplesUnk; // May be bufSizePerChan
|
||||
/* 0x028 */ s16* leftReverbBuf;
|
||||
/* 0x02C */ s16* rightReverbBuf;
|
||||
/* 0x030 */ s16* leftLoadResampleBuf;
|
||||
/* 0x034 */ s16* rightLoadResampleBuf;
|
||||
/* 0x038 */ s16* leftSaveResampleBuf;
|
||||
/* 0x03C */ s16* rightSaveResampleBuf;
|
||||
/* 0x040 */ ReverbBufferEntry bufEntry[2][5];
|
||||
/* 0x158 */ ReverbBufferEntry subBufEntry[2][5];
|
||||
/* 0x270 */ s16* filterLeft;
|
||||
/* 0x274 */ s16* filterRight;
|
||||
/* 0x278 */ s16* unk_278;
|
||||
/* 0x27C */ s16* unk_27C;
|
||||
/* 0x278 */ s16* filterLeftInit;
|
||||
/* 0x27C */ s16* filterRightInit;
|
||||
/* 0x280 */ s16* filterLeftState;
|
||||
/* 0x284 */ s16* filterRightState;
|
||||
/* 0x288 */ TunedSample tunedSample;
|
||||
@@ -362,28 +406,26 @@ typedef struct {
|
||||
/* 0x1C */ EnvelopePoint* envelope;
|
||||
} AdsrState; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 unused : 2;
|
||||
/* 0x0 */ u8 bit2 : 2;
|
||||
/* 0x0 */ u8 strongRight : 1;
|
||||
/* 0x0 */ u8 strongLeft : 1;
|
||||
/* 0x0 */ u8 stereoHeadsetEffects : 1;
|
||||
/* 0x0 */ u8 usesHeadsetPanEffects : 1;
|
||||
typedef union {
|
||||
struct {
|
||||
/* 0x0 */ u8 unused : 2;
|
||||
/* 0x0 */ u8 type : 2;
|
||||
/* 0x0 */ u8 strongRight : 1;
|
||||
/* 0x0 */ u8 strongLeft : 1;
|
||||
/* 0x0 */ u8 strongReverbRight : 1;
|
||||
/* 0x0 */ u8 strongReverbLeft : 1;
|
||||
};
|
||||
/* 0x0 */ u8 asByte;
|
||||
} StereoData; // size = 0x1
|
||||
|
||||
typedef union {
|
||||
/* 0x0 */ StereoData s;
|
||||
/* 0x0 */ u8 asByte;
|
||||
} Stereo; // size = 0x1
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 reverb;
|
||||
/* 0x00 */ u8 targetReverbVol;
|
||||
/* 0x01 */ u8 gain; // Increases volume by a multiplicative scaling factor. Represented as a UQ4.4 number
|
||||
/* 0x02 */ u8 pan;
|
||||
/* 0x03 */ u8 unk_3; // Possibly part of stereo?
|
||||
/* 0x04 */ Stereo stereo;
|
||||
/* 0x05 */ u8 unk_4;
|
||||
/* 0x06 */ u16 unk_6;
|
||||
/* 0x03 */ u8 surroundEffectIndex;
|
||||
/* 0x04 */ StereoData stereoData;
|
||||
/* 0x05 */ u8 combFilterSize;
|
||||
/* 0x06 */ u16 combFilterGain;
|
||||
/* 0x08 */ f32 freqScale;
|
||||
/* 0x0C */ f32 velocity;
|
||||
/* 0x10 */ s16* filter;
|
||||
@@ -420,7 +462,7 @@ typedef struct SequenceChannel {
|
||||
} changes;
|
||||
/* 0x02 */ u8 noteAllocPolicy;
|
||||
/* 0x03 */ u8 muteFlags;
|
||||
/* 0x04 */ u8 reverb; // or dry/wet mix
|
||||
/* 0x04 */ u8 targetReverbVol; // or dry/wet mix
|
||||
/* 0x05 */ u8 notePriority; // 0-3
|
||||
/* 0x06 */ u8 someOtherPriority;
|
||||
/* 0x07 */ u8 fontId;
|
||||
@@ -431,12 +473,12 @@ typedef struct SequenceChannel {
|
||||
/* 0x0C */ u8 gain; // Increases volume by a multiplicative scaling factor. Represented as a UQ4.4 number
|
||||
/* 0x0D */ u8 velocityRandomVariance;
|
||||
/* 0x0E */ u8 gateTimeRandomVariance;
|
||||
/* 0x0F */ u8 unk_0F;
|
||||
/* 0x10 */ u8 unk_10;
|
||||
/* 0x0F */ u8 combFilterSize;
|
||||
/* 0x10 */ u8 surroundEffectIndex;
|
||||
/* 0x11 */ u8 unk_11;
|
||||
/* 0x12 */ VibratoSubStruct vibrato;
|
||||
/* 0x20 */ u16 delay;
|
||||
/* 0x22 */ u16 unk_20;
|
||||
/* 0x22 */ u16 combFilterGain;
|
||||
/* 0x24 */ u16 unk_22; // Used for indexing data
|
||||
/* 0x26 */ s16 instOrWave; // either 0 (none), instrument index + 1, or
|
||||
// 0x80..0x83 for sawtooth/triangle/sine/square waves.
|
||||
@@ -458,7 +500,7 @@ typedef struct SequenceChannel {
|
||||
/* 0xC8 */ s8 soundScriptIO[8]; // bridge between sound script and audio lib, "io ports"
|
||||
/* 0xD0 */ u8* sfxState; // SfxChannelState
|
||||
/* 0xD4 */ s16* filter;
|
||||
/* 0xD8 */ Stereo stereo;
|
||||
/* 0xD8 */ StereoData stereoData;
|
||||
/* 0xDC */ s32 startSamplePos;
|
||||
/* 0xE0 */ s32 unk_E0;
|
||||
} SequenceChannel; // size = 0xE4
|
||||
@@ -473,15 +515,15 @@ typedef struct SequenceLayer {
|
||||
/* 0x00 */ u8 ignoreDrumPan : 1;
|
||||
/* 0x00 */ u8 bit1 : 1; // "has initialized continuous notes"?
|
||||
/* 0x00 */ u8 notePropertiesNeedInit : 1;
|
||||
/* 0x01 */ Stereo stereo;
|
||||
/* 0x01 */ StereoData stereoData;
|
||||
/* 0x02 */ u8 instOrWave;
|
||||
/* 0x03 */ u8 gateTime;
|
||||
/* 0x04 */ u8 semitone;
|
||||
/* 0x05 */ u8 portamentoTargetNote;
|
||||
/* 0x06 */ u8 pan; // 0..128
|
||||
/* 0x07 */ u8 notePan;
|
||||
/* 0x08 */ u8 unk_08;
|
||||
/* 0x09 */ u8 unk_09;
|
||||
/* 0x08 */ u8 surroundEffectIndex;
|
||||
/* 0x09 */ u8 targetReverbVol;
|
||||
union {
|
||||
struct {
|
||||
/* 0x0A */ u16 bit_0 : 1;
|
||||
@@ -530,45 +572,37 @@ typedef struct SequenceLayer {
|
||||
} SequenceLayer; // size = 0x90
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 adpcmdecState[0x10];
|
||||
/* 0x20 */ s16 finalResampleState[0x10];
|
||||
/* 0x40 */ s16 mixEnvelopeState[0x28];
|
||||
/* 0x90 */ s16 panResampleState[0x10];
|
||||
/* 0xB0 */ s16 panSamplesBuffer[0x20];
|
||||
/* 0xF0 */ s16 dummyResampleState[0x10];
|
||||
} NoteSynthesisBuffers; // size = 0x110
|
||||
/* 0x000 */ s16 adpcmState[16];
|
||||
/* 0x020 */ s16 finalResampleState[16];
|
||||
/* 0x040 */ s16 filterState[32];
|
||||
/* 0x080 */ s16 unusedState[16];
|
||||
/* 0x0A0 */ s16 haasEffectDelayState[32];
|
||||
/* 0x0E0 */ s16 combFilterState[128];
|
||||
/* 0x1E0 */ s16 surroundEffectState[128];
|
||||
} NoteSynthesisBuffers; // size = 0x2E0
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 restart_bit0 : 1;
|
||||
/* 0x00 */ u8 restart_bit1 : 1;
|
||||
/* 0x00 */ u8 restart_bit2 : 1;
|
||||
/* 0x00 */ u8 restart_bit3 : 1;
|
||||
/* 0x00 */ u8 restart_bit4 : 1;
|
||||
/* 0x00 */ u8 restart_bit5 : 1;
|
||||
/* 0x00 */ u8 restart_bit6 : 1;
|
||||
/* 0x00 */ u8 restart_bit7 : 1;
|
||||
/* 0x00 */ u8 atLoopPoint : 1;
|
||||
/* 0x00 */ u8 stopLoop : 1;
|
||||
/* 0x01 */ u8 sampleDmaIndex;
|
||||
/* 0x02 */ u8 prevHeadsetPanRight;
|
||||
/* 0x03 */ u8 prevHeadsetPanLeft;
|
||||
/* 0x04 */ u8 reverbVol;
|
||||
/* 0x02 */ u8 prevHaasEffectLeftDelaySize;
|
||||
/* 0x03 */ u8 prevHaasEffectRightDelaySize;
|
||||
/* 0x04 */ u8 curReverbVol;
|
||||
/* 0x05 */ u8 numParts;
|
||||
/* 0x06 */ u16 samplePosFrac;
|
||||
/* 0x08 */ u16 unk_08;
|
||||
/* 0x0C */ s32 samplePosInt;
|
||||
/* 0x06 */ u16 samplePosFrac; // Fractional part of the sample position
|
||||
/* 0x08 */ u16 surroundEffectGain;
|
||||
/* 0x0C */ s32 samplePosInt; // Integer part of the sample position
|
||||
/* 0x10 */ NoteSynthesisBuffers* synthesisBuffers;
|
||||
/* 0x14 */ s16 curVolLeft;
|
||||
/* 0x16 */ s16 curVolRight;
|
||||
/* 0x18 */ u16 unk_14;
|
||||
/* 0x1A */ u16 unk_16;
|
||||
/* 0x1C */ u16 unk_18;
|
||||
/* 0x1E */ u8 unk_1A;
|
||||
/* 0x18 */ UNK_TYPE1 unk_14[0x6];
|
||||
/* 0x1E */ u8 combFilterNeedsInit;
|
||||
/* 0x1F */ u8 unk_1F;
|
||||
/* 0x20 */ u16 unk_1C;
|
||||
/* 0x22 */ u16 unk_1E;
|
||||
/* 0x20 */ UNK_TYPE1 unk_20[0x4];
|
||||
} NoteSynthesisState; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ struct VibratoSubStruct* vibSubStruct; // MM Something else?
|
||||
/* 0x00 */ struct VibratoSubStruct* vibSubStruct; // Something else?
|
||||
/* 0x04 */ u32 time;
|
||||
/* 0x08 */ s16* curve;
|
||||
/* 0x0C */ f32 extent;
|
||||
@@ -602,67 +636,68 @@ typedef struct {
|
||||
/* 0x34 */ AdsrState adsr;
|
||||
/* 0x54 */ Portamento portamento;
|
||||
/* 0x60 */ VibratoState vibratoState;
|
||||
/* 0x7C */ char unk_7C[0x8];
|
||||
/* 0x7C */ UNK_TYPE1 pad7C[0x4];
|
||||
/* 0x80 */ u8 unk_80;
|
||||
/* 0x84 */ u32 startSamplePos;
|
||||
} NotePlaybackState; // size = 0x88
|
||||
/* 0x88 */ UNK_TYPE1 unk_BC[0x1C];
|
||||
} NotePlaybackState; // size = 0xA4
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
/* 0x00 */ volatile u8 enabled : 1;
|
||||
/* 0x00 */ u8 needsInit : 1;
|
||||
/* 0x00 */ u8 finished : 1; // ?
|
||||
/* 0x00 */ u8 finished : 1;
|
||||
/* 0x00 */ u8 unused : 1;
|
||||
/* 0x00 */ u8 stereoStrongRight : 1;
|
||||
/* 0x00 */ u8 stereoStrongLeft : 1;
|
||||
/* 0x00 */ u8 stereoHeadsetEffects : 1;
|
||||
/* 0x00 */ u8 usesHeadsetPanEffects : 1; // ?
|
||||
/* 0x00 */ u8 strongRight : 1;
|
||||
/* 0x00 */ u8 strongLeft : 1;
|
||||
/* 0x00 */ u8 strongReverbRight : 1;
|
||||
/* 0x00 */ u8 strongReverbLeft : 1;
|
||||
} bitField0;
|
||||
struct {
|
||||
/* 0x01 */ u8 reverbIndex : 3;
|
||||
/* 0x01 */ u8 bookOffset : 2;
|
||||
/* 0x01 */ u8 isSyntheticWave : 1;
|
||||
/* 0x01 */ u8 hasTwoParts : 1;
|
||||
/* 0x01 */ u8 usesHeadsetPanEffects2 : 1;
|
||||
/* 0x01 */ u8 useHaasEffect : 1;
|
||||
} bitField1;
|
||||
/* 0x02 */ u8 gain; // Increases volume by a multiplicative scaling factor. Represented as a UQ4.4 number
|
||||
/* 0x03 */ u8 headsetPanRight;
|
||||
/* 0x04 */ u8 headsetPanLeft;
|
||||
/* 0x05 */ u8 reverbVol;
|
||||
/* 0x03 */ u8 haasEffectLeftDelaySize;
|
||||
/* 0x04 */ u8 haasEffectRightDelaySize;
|
||||
/* 0x05 */ u8 targetReverbVol;
|
||||
/* 0x06 */ u8 harmonicIndexCurAndPrev; // bits 3..2 store curHarmonicIndex, bits 1..0 store prevHarmonicIndex
|
||||
/* 0x07 */ u8 unk_07;
|
||||
/* 0x07 */ u8 combFilterSize;
|
||||
/* 0x08 */ u16 targetVolLeft;
|
||||
/* 0x0A */ u16 targetVolRight;
|
||||
/* 0x0C */ u16 resamplingRateFixedPoint;
|
||||
/* 0x0E */ u16 unk_0E;
|
||||
/* 0x0C */ u16 frequencyFixedPoint;
|
||||
/* 0x0E */ u16 combFilterGain;
|
||||
union {
|
||||
/* 0x10 */ TunedSample* tunedSample;
|
||||
/* 0x10 */ s16* waveSampleAddr; // used for synthetic waves
|
||||
};
|
||||
/* 0x14 */ s16* filter;
|
||||
/* 0x18 */ u8 unk_18;
|
||||
/* 0x19 */ u8 unk_19;
|
||||
/* 0x1A */ UNK_TYPE1 pad_1A[0x6];
|
||||
} NoteSubEu; // size = 0x20
|
||||
/* 0x18 */ UNK_TYPE1 unk_18;
|
||||
/* 0x19 */ u8 surroundEffectIndex;
|
||||
/* 0x1A */ UNK_TYPE1 unk_1A[0x6];
|
||||
} NoteSampleState; // size = 0x20
|
||||
|
||||
typedef struct Note {
|
||||
/* 0x00 */ AudioListItem listItem;
|
||||
/* 0x10 */ NoteSynthesisState synthesisState;
|
||||
/* 0x34 */ NotePlaybackState playbackState;
|
||||
/* 0xBC */ char unk_BC[0x1C];
|
||||
/* 0xD8 */ NoteSubEu noteSubEu;
|
||||
/* 0xD8 */ NoteSampleState sampleState;
|
||||
} Note; // size = 0xF8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 downsampleRate;
|
||||
/* 0x02 */ u16 windowSize;
|
||||
/* 0x04 */ u16 unk_4;
|
||||
/* 0x06 */ u16 unk_6;
|
||||
/* 0x08 */ u16 unk_8;
|
||||
/* 0x0A */ u16 unk_A;
|
||||
/* 0x02 */ u16 delayNumSamples;
|
||||
/* 0x04 */ u16 decayRatio; // determines how fast reverb dissipates
|
||||
/* 0x06 */ u16 subDelay;
|
||||
/* 0x08 */ u16 subVolume;
|
||||
/* 0x0A */ u16 volume;
|
||||
/* 0x0C */ u16 leakRtl;
|
||||
/* 0x0E */ u16 leakLtr;
|
||||
/* 0x10 */ s8 unk_10;
|
||||
/* 0x12 */ u16 unk_12;
|
||||
/* 0x10 */ s8 mixReverbIndex;
|
||||
/* 0x12 */ u16 mixReverbStrength;
|
||||
/* 0x14 */ s16 lowPassFilterCutoffLeft;
|
||||
/* 0x16 */ s16 lowPassFilterCutoffRight;
|
||||
} ReverbSettings; // size = 0x18
|
||||
@@ -703,13 +738,13 @@ typedef struct {
|
||||
/* 0x00 */ s16 specUnk4;
|
||||
/* 0x02 */ u16 samplingFreq; // Target sampling rate in Hz
|
||||
/* 0x04 */ u16 aiSamplingFreq; // True sampling rate set to the audio interface (AI) for the audio digital-analog converter (DAC)
|
||||
/* 0x06 */ s16 samplesPerFrameTarget;
|
||||
/* 0x08 */ s16 maxAiBufNumSamples;
|
||||
/* 0x0A */ s16 minAiBufNumSamples;
|
||||
/* 0x06 */ s16 numSamplesPerFrameTarget;
|
||||
/* 0x08 */ s16 numSamplesPerFrameMax;
|
||||
/* 0x0A */ s16 numSamplesPerFrameMin;
|
||||
/* 0x0C */ s16 updatesPerFrame; // for each frame of the audio thread (default 60 fps), number of updates to process audio
|
||||
/* 0x0E */ s16 samplesPerUpdate;
|
||||
/* 0x10 */ s16 samplesPerUpdateMax;
|
||||
/* 0x12 */ s16 samplesPerUpdateMin;
|
||||
/* 0x0E */ s16 numSamplesPerUpdate;
|
||||
/* 0x10 */ s16 numSamplesPerUpdateMax;
|
||||
/* 0x12 */ s16 numSamplesPerUpdateMin;
|
||||
/* 0x14 */ s16 numSequencePlayers;
|
||||
/* 0x18 */ f32 resampleRate;
|
||||
/* 0x1C */ f32 updatesPerFrameInv; // inverse (reciprocal) of updatesPerFrame
|
||||
@@ -898,8 +933,8 @@ typedef struct {
|
||||
/* 0x0002 */ u16 unk_2; // reads from audio spec unk_14, never used, always set to 0x7FFF
|
||||
/* 0x0004 */ u16 unk_4;
|
||||
/* 0x0006 */ char unk_0006[0xA];
|
||||
/* 0x0010 */ s16* curLoadedBook;
|
||||
/* 0x0014 */ NoteSubEu* noteSubsEu;
|
||||
/* 0x0010 */ s16* adpcmCodeBook;
|
||||
/* 0x0014 */ NoteSampleState* sampleStateList;
|
||||
/* 0x0018 */ SynthesisReverb synthesisReverbs[4];
|
||||
/* 0x0B58 */ char unk_0B58[0x30];
|
||||
/* 0x0B88 */ Sample* usedSamples[128];
|
||||
@@ -1001,7 +1036,7 @@ typedef struct {
|
||||
/* 0x4460 */ SequencePlayer seqPlayers[5];
|
||||
/* 0x4B40 */ SequenceLayer sequenceLayers[80];
|
||||
/* 0x7840 */ SequenceChannel sequenceChannelNone;
|
||||
/* 0x7924 */ s32 noteSubEuOffset;
|
||||
/* 0x7924 */ s32 sampleStateOffset; // Start of the list of sample states for this update. Resets after each audio frame.
|
||||
/* 0x7928 */ AudioListItem layerFreeList;
|
||||
/* 0x7938 */ NotePool noteFreeLists;
|
||||
/* 0x7978 */ u8 cmdWritePos;
|
||||
@@ -1022,17 +1057,17 @@ typedef struct {
|
||||
} AudioContext; // size = 0x81F8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 reverbVol;
|
||||
/* 0x00 */ u8 targetReverbVol;
|
||||
/* 0x01 */ u8 gain; // Increases volume by a multiplicative scaling factor. Represented as a UQ4.4 number
|
||||
/* 0x02 */ u8 pan;
|
||||
/* 0x03 */ u8 unk_3;
|
||||
/* 0x04 */ Stereo stereo;
|
||||
/* 0x03 */ u8 surroundEffectIndex;
|
||||
/* 0x04 */ StereoData stereoData;
|
||||
/* 0x08 */ f32 frequency;
|
||||
/* 0x0C */ f32 velocity;
|
||||
/* 0x10 */ char unk_0C[0x4];
|
||||
/* 0x14 */ s16* filter;
|
||||
/* 0x18 */ u8 unk_14;
|
||||
/* 0x1A */ u16 unk_16;
|
||||
/* 0x18 */ u8 combFilterSize;
|
||||
/* 0x1A */ u16 combFilterGain;
|
||||
} NoteSubAttributes; // size = 0x1A
|
||||
|
||||
typedef struct {
|
||||
@@ -1068,7 +1103,7 @@ typedef struct {
|
||||
/* 0x204 */ u16 unk_28;
|
||||
/* 0x206 */ u16 unk_250;
|
||||
/* 0x208 */ u16 unk_252;
|
||||
/* 0x20A */ u16 unk_254;
|
||||
/* 0x20A */ u16 seqId;
|
||||
/* 0x20C */ u16 unk_256;
|
||||
/* 0x20E */ u16 unk_258;
|
||||
/* 0x210 */ u8 unk_260;
|
||||
@@ -1080,7 +1115,7 @@ typedef struct {
|
||||
/* 0x219 */ u8 unk_4D;
|
||||
/* 0x21A */ u8 unk_4E;
|
||||
/* 0x21B */ u8 unk_21B;
|
||||
} unk_D_8016E750; // size = 0x21C
|
||||
} ActiveSequence; // size = 0x21C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 unk_0;
|
||||
@@ -1095,7 +1130,7 @@ typedef enum {
|
||||
/* 4 */ BANK_SYSTEM,
|
||||
/* 5 */ BANK_OCARINA,
|
||||
/* 6 */ BANK_VOICE
|
||||
} SoundBankTypes;
|
||||
} SfxBankType;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SFX_STATE_EMPTY,
|
||||
|
||||
@@ -56,11 +56,6 @@ struct DynaPolyActor;
|
||||
// CollisionContext flags
|
||||
#define BGCHECK_FLAG_REVERSE_CONVEYOR_FLOW 1
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ CONVEYOR_WATER,
|
||||
/* 1 */ CONVEYOR_FLOOR
|
||||
} ConveyorType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ Vec3s pos;
|
||||
} BgVertex; // size = 0x6
|
||||
|
||||
+11
-11
@@ -4,21 +4,21 @@
|
||||
#include "ultra64.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromAddr; // VROM address (source)
|
||||
/* 0x04 */ void* dramAddr; // DRAM address (destination)
|
||||
/* 0x08 */ u32 size; // File Transfer size
|
||||
/* 0x0C */ char* filename; // Filename for debugging
|
||||
/* 0x10 */ s32 line; // Line for debugging
|
||||
/* 0x14 */ s32 unk14;
|
||||
/* 0x00 */ uintptr_t vromAddr; // VROM address (source)
|
||||
/* 0x04 */ void* dramAddr; // DRAM address (destination)
|
||||
/* 0x08 */ u32 size; // File Transfer size
|
||||
/* 0x0C */ char* filename; // Filename for debugging
|
||||
/* 0x10 */ s32 line; // Line for debugging
|
||||
/* 0x14 */ s32 unk14;
|
||||
/* 0x18 */ OSMesgQueue* notifyQueue; // Message queue for the notification message
|
||||
/* 0x1C */ OSMesg notifyMsg; // Completion notification message
|
||||
/* 0x1C */ OSMesg notifyMsg; // Completion notification message
|
||||
} DmaRequest; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 vromStart;
|
||||
/* 0x4 */ u32 vromEnd;
|
||||
/* 0x8 */ u32 romStart;
|
||||
/* 0xC */ u32 romEnd;
|
||||
/* 0x0 */ uintptr_t vromStart;
|
||||
/* 0x4 */ uintptr_t vromEnd;
|
||||
/* 0x8 */ uintptr_t romStart;
|
||||
/* 0xC */ uintptr_t romEnd;
|
||||
} DmaEntry; // size = 0x10
|
||||
|
||||
#endif
|
||||
|
||||
+2
-3
@@ -248,8 +248,8 @@ typedef struct {
|
||||
} EffectSsInit; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromStart;
|
||||
/* 0x04 */ u32 vromEnd;
|
||||
/* 0x00 */ uintptr_t vromStart;
|
||||
/* 0x04 */ uintptr_t vromEnd;
|
||||
/* 0x08 */ void* vramStart;
|
||||
/* 0x0C */ void* vramEnd;
|
||||
/* 0x10 */ void* loadedRamAddr;
|
||||
@@ -257,7 +257,6 @@ typedef struct {
|
||||
/* 0x18 */ u8 unk18; // Always 1?
|
||||
} EffectSsOverlay; // size = 0x1C
|
||||
|
||||
//! TODO: Review reuse of vec/gfx/actor fields across all effects
|
||||
typedef struct EffectSs {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3f velocity;
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifndef Z64QUAKE_H
|
||||
#define Z64QUAKE_H
|
||||
|
||||
#include "z64math.h"
|
||||
|
||||
struct PlayState;
|
||||
struct Camera;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f atOffset;
|
||||
/* 0x0C */ Vec3f eyeOffset;
|
||||
/* 0x18 */ s16 rollOffset;
|
||||
/* 0x1A */ s16 zoom;
|
||||
/* 0x1C */ f32 max; // Set to scaled max data of struct (mag for Vec3f), never used
|
||||
} QuakeCamCalc; // size = 0x20
|
||||
|
||||
#define QUAKE_SPEED (1 << 0)
|
||||
#define QUAKE_VERTICAL_MAG (1 << 1)
|
||||
#define QUAKE_HORIZONTAL_MAG (1 << 2)
|
||||
#define QUAKE_ZOOM (1 << 3)
|
||||
#define QUAKE_ROLL_OFFSET (1 << 4)
|
||||
#define QUAKE_SHAKE_PLANE_OFFSET_X (1 << 5)
|
||||
#define QUAKE_SHAKE_PLANE_OFFSET_Y (1 << 6)
|
||||
#define QUAKE_SHAKE_PLANE_OFFSET_Z (1 << 7)
|
||||
#define QUAKE_COUNTDOWN (1 << 8)
|
||||
#define QUAKE_IS_SHAKE_PERPENDICULAR (1 << 9)
|
||||
|
||||
typedef enum {
|
||||
/* 1 */ QUAKE_TYPE_1 = 1,
|
||||
/* 2 */ QUAKE_TYPE_2,
|
||||
/* 3 */ QUAKE_TYPE_3,
|
||||
/* 4 */ QUAKE_TYPE_4,
|
||||
/* 5 */ QUAKE_TYPE_5,
|
||||
/* 6 */ QUAKE_TYPE_6
|
||||
} QuakeType;
|
||||
|
||||
u32 Quake_SetValue(s16 quakeIndex, s16 valueType, s16 value);
|
||||
u32 Quake_SetSpeed(s16 quakeIndex, s16 speed);
|
||||
u32 Quake_SetCountdown(s16 quakeIndex, s16 countdown);
|
||||
s16 Quake_GetCountdown(s16 quakeIndex);
|
||||
u32 Quake_SetQuakeValues(s16 quakeIndex, s16 verticalMag, s16 horizontalMag, s16 zoom, s16 rollOffset);
|
||||
u32 Quake_SetQuakeValues2(s16 quakeIndex, s16 isShakePerpendicular, Vec3s shakePlaneOffset);
|
||||
s16 Quake_Add(Camera* camera, u32 type);
|
||||
s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData);
|
||||
u32 Quake_Remove(s16 index);
|
||||
s32 Quake_NumActiveQuakes(void);
|
||||
void Quake_Init(void);
|
||||
|
||||
#define DISTORTION_TYPE_0 (1 << 0)
|
||||
#define DISTORTION_TYPE_2 (1 << 2)
|
||||
#define DISTORTION_TYPE_3 (1 << 3)
|
||||
#define DISTORTION_TYPE_4 (1 << 4)
|
||||
#define DISTORTION_TYPE_5 (1 << 5)
|
||||
#define DISTORTION_TYPE_6 (1 << 6)
|
||||
#define DISTORTION_TYPE_7 (1 << 7)
|
||||
#define DISTORTION_TYPE_8 (1 << 8)
|
||||
#define DISTORTION_TYPE_9 (1 << 9)
|
||||
#define DISTORTION_TYPE_A (1 << 10)
|
||||
#define DISTORTION_TYPE_B (1 << 11)
|
||||
|
||||
void Distortion_SetCountdown(s16 countdown);
|
||||
s16 Distortion_GetCountdown(void);
|
||||
s16 Distortion_GetType(void);
|
||||
void Distortion_SetType(s32 type);
|
||||
void Distortion_ClearType(s32 type);
|
||||
void Distortion_Init(PlayState* play);
|
||||
void Distortion_Update(void);
|
||||
|
||||
#endif
|
||||
+7
-7
@@ -304,7 +304,7 @@ typedef struct SaveContext {
|
||||
/* 0x3CA6 */ u8 unk_3CA6;
|
||||
/* 0x3CA7 */ u8 unk_3CA7; // "day_night_flag"
|
||||
/* 0x3CA8 */ s32 gameMode; // "mode"
|
||||
/* 0x3CAC */ s32 sceneSetupIndex; // "counter"
|
||||
/* 0x3CAC */ s32 sceneLayer; // "counter"
|
||||
/* 0x3CB0 */ s32 respawnFlag; // "restart_flag"
|
||||
/* 0x3CB4 */ RespawnData respawn[RESPAWN_MODE_MAX]; // "restart_data"
|
||||
/* 0x3DB4 */ f32 entranceSpeed; // "player_wipe_speedF"
|
||||
@@ -327,8 +327,8 @@ typedef struct SaveContext {
|
||||
/* 0x3EF8 */ s16 timerX[TIMER_ID_MAX]; // "event_xp"
|
||||
/* 0x3F06 */ s16 timerY[TIMER_ID_MAX]; // "event_yp"
|
||||
/* 0x3F14 */ s16 unk_3F14; // "character_change"
|
||||
/* 0x3F16 */ u8 seqIndex; // "old_bgm"
|
||||
/* 0x3F17 */ u8 nightSeqIndex; // "old_env"
|
||||
/* 0x3F16 */ u8 seqId; // "old_bgm"
|
||||
/* 0x3F17 */ u8 ambienceId; // "old_env"
|
||||
/* 0x3F18 */ u8 buttonStatus[6]; // "button_item"
|
||||
/* 0x3F1E */ u8 hudVisibilityForceButtonAlphasByStatus; // if btn alphas are updated through Interface_UpdateButtonAlphas, instead update them through Interface_UpdateButtonAlphasByStatus "ck_fg"
|
||||
/* 0x3F20 */ u16 nextHudVisibility; // triggers the hud to change visibility to the requested value. Reset to HUD_VISIBILITY_IDLE when target is reached "alpha_type"
|
||||
@@ -368,7 +368,7 @@ typedef struct SaveContext {
|
||||
/* 0x3F64 */ f32 screenScale; // "framescale_scale"
|
||||
/* 0x3F68 */ CycleSceneFlags cycleSceneFlags[120]; // Scene flags that are temporarily stored over the duration of a single 3-day cycle
|
||||
/* 0x48C8 */ u16 dungeonIndex; // "scene_id_mix"
|
||||
/* 0x48CA */ u8 maskMaskBit[27]; // "mask_mask_bit", masks given away on the Moon
|
||||
/* 0x48CA */ u8 masksGivenOnMoon[27]; // bit-packed, masks given away on the Moon. "mask_mask_bit"
|
||||
} SaveContext; // size = 0x48C8
|
||||
|
||||
typedef enum ButtonStatus {
|
||||
@@ -480,9 +480,9 @@ void func_80144A94(SramContext* sramCtx);
|
||||
void Sram_OpenSave(struct FileSelectState* fileSelect, SramContext* sramCtx);
|
||||
void func_8014546C(SramContext* sramCtx);
|
||||
void func_801457CC(struct FileSelectState* fileSelect, SramContext* sramCtx);
|
||||
void func_80146580(struct FileSelectState* fileSelect, SramContext* sramCtx, s32 fileNum);
|
||||
void func_80146628(struct FileSelectState* fileSelect, SramContext* sramCtx);
|
||||
void Sram_InitSave(struct FileSelectState* fileSelect, SramContext* sramCtx);
|
||||
void func_80146580(struct FileSelectState* fileSelect2, SramContext* sramCtx, s32 fileNum);
|
||||
void func_80146628(struct FileSelectState* fileSelect2, SramContext* sramCtx);
|
||||
void Sram_InitSave(struct FileSelectState* fileSelect2, SramContext* sramCtx);
|
||||
void func_80146DF8(SramContext* sramCtx);
|
||||
void Sram_InitSram(struct GameState* gameState, SramContext* sramCtx);
|
||||
void Sram_Alloc(struct GameState* gameState, SramContext* sramCtx);
|
||||
|
||||
+9
-9
@@ -153,16 +153,16 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 code;
|
||||
/* 0x1 */ u8 bgmId;
|
||||
/* 0x2 */ UNK_TYPE1 pad2[4];
|
||||
/* 0x6 */ u8 nighttimeSFX;
|
||||
/* 0x7 */ u8 musicSeq;
|
||||
/* 0x1 */ u8 specId;
|
||||
/* 0x2 */ UNK_TYPE1 unk_02[4];
|
||||
/* 0x6 */ u8 ambienceId;
|
||||
/* 0x7 */ u8 seqId;
|
||||
} SCmdSoundSettings; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 code;
|
||||
/* 0x1 */ u8 data1;
|
||||
/* 0x2 */ UNK_TYPE1 pad2[5];
|
||||
/* 0x2 */ UNK_TYPE1 unk_02[5];
|
||||
/* 0x7 */ u8 echo;
|
||||
} SCmdEchoSettings; // size = 0x8
|
||||
|
||||
@@ -768,7 +768,7 @@ typedef enum {
|
||||
/*
|
||||
* 0xFE00: Index into sSceneEntranceTable (Scene)
|
||||
* 0x01F0: Index into the scenes specific entrance table (Spawn)
|
||||
* 0x000F: Index into the specific entrance table (Layer), stored seperately in sceneSetupIndex
|
||||
* 0x000F: Index into the specific entrance table (Layer), stored seperately in sceneLayer
|
||||
*/
|
||||
#define ENTRANCE(scene, spawn) ((((ENTR_SCENE_##scene) & 0x7F) << 9) | (((spawn) & 0x1F) << 4))
|
||||
|
||||
@@ -818,7 +818,7 @@ typedef enum {
|
||||
/* 0x1D */ SCENE_CMD_ID_UNUSED_1D,
|
||||
/* 0x1E */ SCENE_CMD_ID_MINIMAP_COMPASS_ICON_INFO,
|
||||
/* 0x1F */ SCENE_CMD_MAX
|
||||
} SceneCommandTypeID;
|
||||
} SceneCommandTypeId;
|
||||
|
||||
#define SCENE_CMD_SPAWN_LIST(numSpawns, spawnList) \
|
||||
{ SCENE_CMD_ID_SPAWN_LIST, numSpawns, CMD_PTR(spawnList) }
|
||||
@@ -888,8 +888,8 @@ typedef enum {
|
||||
#define SCENE_CMD_END() \
|
||||
{ SCENE_CMD_ID_END, 0, CMD_W(0) }
|
||||
|
||||
#define SCENE_CMD_SOUND_SETTINGS(audioSessionId, nighttimeSfx, bgmId) \
|
||||
{ SCENE_CMD_ID_SOUND_SETTINGS, audioSessionId, CMD_BBBB(0, 0, nighttimeSfx, bgmId) }
|
||||
#define SCENE_CMD_SOUND_SETTINGS(specId, ambienceId, seqId) \
|
||||
{ SCENE_CMD_ID_SOUND_SETTINGS, specId, CMD_BBBB(0, 0, ambienceId, seqId) }
|
||||
|
||||
#define SCENE_CMD_ECHO_SETTINGS(echo) \
|
||||
{ SCENE_CMD_ID_ECHO_SETTINGS, 0, CMD_BBBB(0, 0, 0, echo) }
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef Z64SHRINK_WINDOW_H
|
||||
#define Z64SHRINK_WINDOW_H
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
|
||||
struct GraphicsContext;
|
||||
|
||||
void ShrinkWindow_Letterbox_SetSizeTarget(s32 target);
|
||||
s32 ShrinkWindow_Letterbox_GetSizeTarget(void);
|
||||
void ShrinkWindow_Letterbox_SetSize(s32 size);
|
||||
s32 ShrinkWindow_Letterbox_GetSize(void);
|
||||
|
||||
void ShrinkWindow_Pillarbox_SetSizeTarget(s32 target);
|
||||
s32 ShrinkWindow_Pillarbox_GetSizeTarget(void);
|
||||
void ShrinkWindow_Pillarbox_SetSize(s32 size);
|
||||
s32 ShrinkWindow_Pillarbox_GetSize(void);
|
||||
|
||||
void ShrinkWindow_Init(void);
|
||||
void ShrinkWindow_Destroy(void);
|
||||
void ShrinkWindow_Update(s32 framerateDivisor);
|
||||
void ShrinkWindow_Draw(GraphicsContext* gfxCtx);
|
||||
|
||||
#endif
|
||||
+3
-3
@@ -100,7 +100,7 @@ void SubS_TimePathing_ComputeTargetPosXZ(f32* x, f32* z, f32 progress, s32 order
|
||||
s32 SubS_TimePathing_Update(Path* path, f32* progress, s32* elapsedTime, s32 waypointTime, s32 totalTime, s32* waypoint, f32 knots[], Vec3f* targetPos, s32 timeSpeed);
|
||||
void SubS_TimePathing_ComputeInitialY(struct PlayState* play, Path* path, s32 waypoint, Vec3f* targetPos);
|
||||
|
||||
Path* SubS_GetAdditionalPath(struct PlayState* play, u8 pathIndex, s32 max);
|
||||
Path* SubS_GetAdditionalPath(struct PlayState* play, u8 pathIndex, s32 limit);
|
||||
|
||||
Actor* SubS_FindNearestActor(Actor* actor, struct PlayState* play, u8 actorCategory, s16 actorId);
|
||||
|
||||
@@ -122,7 +122,7 @@ void SubS_GenShadowTex(Vec3f bodyPartsPos[], Vec3f* worldPos, u8* tex, f32 tween
|
||||
void SubS_DrawShadowTex(Actor* actor, struct GameState* gameState, u8* tex);
|
||||
|
||||
s16 SubS_ComputeTrackPointRot(s16* rot, s16 rotMax, s16 target, f32 slowness, f32 stepMin, f32 stepMax);
|
||||
s32 SubS_TrackPoint(Vec3f* point, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* trackTarget, Vec3s* headRot, Vec3s* torsoRot, TrackOptionsSet* options);
|
||||
s32 SubS_TrackPoint(Vec3f* target, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* trackTarget, Vec3s* headRot, Vec3s* torsoRot, TrackOptionsSet* options);
|
||||
|
||||
s32 SubS_AngleDiffLessEqual(s16 angleA, s16 threshold, s16 angleB);
|
||||
|
||||
@@ -130,7 +130,7 @@ Path* SubS_GetPathByIndex(struct PlayState* play, s16 pathIndex, s16 max);
|
||||
s32 SubS_CopyPointFromPath(Path* path, s32 pointIndex, Vec3f* dst);
|
||||
s16 SubS_GetDistSqAndOrientPoints(Vec3f* vecA, Vec3f* vecB, f32* distSq);
|
||||
s32 SubS_MoveActorToPoint(Actor* actor, Vec3f* point, s16 rotStep);
|
||||
s16 SubS_GetDistSqAndOrientPath(Path* path, s32 pointIdx, Vec3f* pos, f32* distSq);
|
||||
s16 SubS_GetDistSqAndOrientPath(Path* path, s32 pointIndex, Vec3f* pos, f32* distSq);
|
||||
|
||||
s8 SubS_IsObjectLoaded(s8 index, struct PlayState* play);
|
||||
s8 SubS_GetObjectIndex(s16 id, struct PlayState* play);
|
||||
|
||||
+58
-12
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
#define TC_SET_PARAMS (1 << 7)
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ void* (*init)(void* transition);
|
||||
/* 0x04 */ void (*destroy)(void* transition);
|
||||
@@ -16,20 +18,64 @@ typedef struct {
|
||||
} TransitionInit; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s8 unk_00;
|
||||
/* 0x01 */ s8 unk_01;
|
||||
/* 0x02 */ s8 unk_02;
|
||||
/* 0x04 */ Color_RGBA8_u32 unk_04;
|
||||
/* 0x08 */ s16 unk_08;
|
||||
/* 0x0A */ char unk_0A[0x2];
|
||||
} TransitionFade; // size = 0xC
|
||||
|
||||
extern const TransitionInit TransitionFade_InitVars;
|
||||
union {
|
||||
struct {
|
||||
/* 0x00 */ u32 count : 8;
|
||||
/* 0x00 */ uintptr_t addr : 24;
|
||||
};
|
||||
/* 0x00 */ u32 word;
|
||||
} loadInfo;
|
||||
/* 0x04 */ void* vramStart;
|
||||
/* 0x08 */ void* vramEnd;
|
||||
/* 0x0C */ uintptr_t vromStart;
|
||||
/* 0x10 */ uintptr_t vromEnd;
|
||||
/* 0x14 */ TransitionInit* initInfo;
|
||||
/* 0x18 */ size_t size;
|
||||
} TransitionOverlay;
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s16 transitionType;
|
||||
/* 0x002 */ s8 fbdemoType;
|
||||
/* 0x003 */ char unk_003[0x5];
|
||||
/* 0x008 */ s32 instanceData;
|
||||
/* 0x00C */ char unk_00C[0x224];
|
||||
/* 0x230 */ void* (*init)(void* transition);
|
||||
/* 0x234 */ void (*destroy)(void* transition);
|
||||
/* 0x238 */ void (*update)(void* transition, s32 updateRate);
|
||||
/* 0x23C */ void (*draw)(void* transition, Gfx** gfxP);
|
||||
/* 0x240 */ void (*start)(void* transition);
|
||||
/* 0x244 */ void (*setType)(void* transition, s32 type);
|
||||
/* 0x248 */ void (*setColor)(void* transition, u32 color);
|
||||
/* 0x24C */ void (*setEnvColor)(void* transition, u32 color);
|
||||
/* 0x250 */ s32 (*isDone)(void* transition);
|
||||
/* 0x254 */ char unk_254[0x4];
|
||||
} TransitionContext; // size = 0x258
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ char unk_0[0x20];
|
||||
/* 0x0 */ char unk_0[0xC];
|
||||
} TransitionFade; // size = 0xC
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TRANSITION_CIRCLE_IN,
|
||||
/* 1 */ TRANSITION_CIRCLE_OUT,
|
||||
} TransitionCircleDirection;
|
||||
|
||||
#define FBDEMO_CIRCLE_GET_MASK_TYPE(type) (type & 1)
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Color_RGBA8_u32 color;
|
||||
/* 0x04 */ f32 referenceRadius; // Reference for where to transition to
|
||||
/* 0x08 */ f32 stepValue; // How fast the Transition is
|
||||
/* 0x0C */ f32 startingRadius; // Radius value where transition will begin
|
||||
/* 0x10 */ f32 targetRadius; // Final radius of transition circle
|
||||
/* 0x14 */ u8 direction; // Direction the circle is transitioning ( In / Out )
|
||||
/* 0x15 */ u8 maskType; // Positive / Negative mask type. Value of 0 will create a black circle
|
||||
/* 0x16 */ u8 isDone; // Signals when Transition is done updating
|
||||
/* 0x18 */ TexturePtr texture;
|
||||
/* 0x1C */ u8 masks;
|
||||
/* 0x1D */ u8 maskt;
|
||||
/* 0x1E */ s8 unk_1E; // Set to 4 and never used
|
||||
/* 0x1F */ s8 unk_1F; // Set to 0 and never used
|
||||
} TransitionCircle; // size = 0x20
|
||||
|
||||
extern const TransitionInit TransitionCircle_InitVars;
|
||||
|
||||
#endif
|
||||
|
||||
+38
-3
@@ -33,16 +33,27 @@ typedef struct View {
|
||||
/* 0x0E0 */ Mtx unkE0;
|
||||
/* 0x120 */ Mtx* projectionPtr;
|
||||
/* 0x124 */ Mtx* viewingPtr;
|
||||
/* 0x128 */ Vec3f distortionDirRot;
|
||||
/* 0x128 */ Vec3f distortionOrientation;
|
||||
/* 0x134 */ Vec3f distortionScale;
|
||||
/* 0x140 */ f32 distortionSpeed;
|
||||
/* 0x144 */ Vec3f curDistortionDirRot;
|
||||
/* 0x144 */ Vec3f curDistortionOrientation;
|
||||
/* 0x150 */ Vec3f curDistortionScale;
|
||||
/* 0x15C */ u16 normal; // used to normalize the projection matrix
|
||||
/* 0x15C */ u16 perspNorm; // used to normalize the projection matrix
|
||||
/* 0x160 */ u32 flags; // bit 3: Render to an orthographic perspective
|
||||
/* 0x164 */ s32 unk164;
|
||||
} View; // size = 0x168
|
||||
|
||||
#define VIEW_VIEWING (1 << 0)
|
||||
#define VIEW_VIEWPORT (1 << 1)
|
||||
#define VIEW_PROJECTION_PERSPECTIVE (1 << 2)
|
||||
#define VIEW_PROJECTION_ORTHO (1 << 3)
|
||||
#define VIEW_ALL (VIEW_VIEWING | VIEW_VIEWPORT | VIEW_PROJECTION_PERSPECTIVE | VIEW_PROJECTION_ORTHO)
|
||||
|
||||
#define VIEW_FORCE_VIEWING (VIEW_VIEWING << 4)
|
||||
#define VIEW_FORCE_VIEWPORT (VIEW_VIEWPORT << 4)
|
||||
#define VIEW_FORCE_PROJECTION_PERSPECTIVE (VIEW_PROJECTION_PERSPECTIVE << 4)
|
||||
#define VIEW_FORCE_PROJECTION_ORTHO (VIEW_PROJECTION_ORTHO << 4)
|
||||
|
||||
#define SET_FULLSCREEN_VIEWPORT(view) \
|
||||
{ \
|
||||
Viewport viewport; \
|
||||
@@ -54,4 +65,28 @@ typedef struct View {
|
||||
} \
|
||||
(void)0
|
||||
|
||||
void View_Init(View* view, struct GraphicsContext* gfxCtx);
|
||||
void View_LookAt(View* view, Vec3f* eye, Vec3f* at, Vec3f* up);
|
||||
void View_SetScale(View* view, f32 scale);
|
||||
void View_GetScale(View* view, f32* scale);
|
||||
void View_SetPerspective(View* view, f32 fovy, f32 zNear, f32 zFar);
|
||||
void View_GetPerspective(View* view, f32* fovy, f32* zNear, f32* zFar);
|
||||
void View_SetOrtho(View* view, f32 fovy, f32 zNear, f32 zFar);
|
||||
void View_GetOrtho(View* view, f32* fovy, f32* zNear, f32* zFar);
|
||||
void View_SetViewport(View* view, Viewport* viewport);
|
||||
void View_GetViewport(View* view, Viewport* viewport);
|
||||
|
||||
s32 View_SetDistortionOrientation(View* view, f32 rotX, f32 rotY, f32 rotZ);
|
||||
s32 View_SetDistortionScale(View* view, f32 scaleX, f32 scaleY, f32 scaleZ);
|
||||
s32 View_SetDistortionSpeed(View* view, f32 speed);
|
||||
s32 View_InitDistortion(View* view);
|
||||
s32 View_ClearDistortion(View* view);
|
||||
s32 View_SetDistortion(View* view, Vec3f orientation, Vec3f scale, f32 speed);
|
||||
|
||||
void View_Apply(View* view, s32 mask);
|
||||
s32 View_ApplyOrthoToOverlay(View* view);
|
||||
s32 View_ApplyPerspectiveToOverlay(View* view);
|
||||
s32 View_UpdateViewingMatrix(View* view);
|
||||
s32 View_ApplyTo(View* view, Gfx** gfxp);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -79,7 +79,7 @@ s32 EnHy_ChangeAnim(SkelAnime* skelAnime, s16 animIndex);
|
||||
EnDoor* EnHy_FindNearestDoor(Actor* actor, PlayState* play);
|
||||
void EnHy_ChangeObjectAndAnim(EnHy* enHy, PlayState* play, s16 animIndex);
|
||||
s32 EnHy_UpdateSkelAnime(EnHy* enHy, PlayState* play);
|
||||
void EnHy_Blink(EnHy* enHy, s32 arg1);
|
||||
void EnHy_Blink(EnHy* enHy, s32 eyeTexMaxIndex);
|
||||
s32 EnHy_Init(EnHy* enHy, PlayState* play, FlexSkeletonHeader* skeletonHeaderSeg, s16 animIndex);
|
||||
void func_800F0BB4(EnHy* enHy, PlayState* play, EnDoor* door, s16 arg3, s16 arg4);
|
||||
s32 func_800F0CE4(EnHy* enHy, PlayState* play, ActorFunc draw, s16 arg3, s16 arg4, f32 arg5);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "global.h"
|
||||
|
||||
void Setup_Destroy(GameState* gameState);
|
||||
void Setup_Init(GameState* gameState);
|
||||
void Setup_Init(GameState* thisx);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ GameState state;
|
||||
|
||||
Reference in New Issue
Block a user