mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-08 21:34:48 -04:00
merge master
This commit is contained in:
+14
-27
@@ -200,7 +200,7 @@ s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flags);
|
||||
OSIntMask osSetIntMask(OSIntMask im);
|
||||
// OSIntMask osGetIntMask(void);
|
||||
// void osVoiceSetWord(void);
|
||||
// void guScale(void);
|
||||
void guScale(Mtx* mtx, f32 x, f32 y, f32 z);
|
||||
f32 sinf(f32 __x);
|
||||
s16 sins(u16 x);
|
||||
OSTask* _VirtualToPhysicalTask(OSTask* intp);
|
||||
@@ -383,7 +383,7 @@ u32 osAiGetLength(void);
|
||||
s32 osEPiWriteIo(OSPiHandle* pihandle, u32 devAddr, u32 data);
|
||||
void osMapTLBRdb(void);
|
||||
void osYieldThread(void);
|
||||
// void guTranslate(void);
|
||||
void guTranslate(Mtx* mtx, f32 x, f32 y, f32 z);
|
||||
u32 __osGetCause(void);
|
||||
s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force);
|
||||
s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
|
||||
@@ -539,7 +539,7 @@ void EffectSsBlast_SpawnWhiteShockwave(PlayState* play, Vec3f* arg1, Vec3f* arg2
|
||||
void EffectSsGSpk_SpawnFuse(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
// void EffectSsGSpk_SpawnRandColor(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
|
||||
// void EffectSsGSpk_SpawnSmall(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
|
||||
void EffectSsDFire_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s16 fadeDelay, s16 life, s32 arg9);
|
||||
void EffectSsDFire_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s16 alphaStep, s16 fadeDelay, s32 life);
|
||||
void EffectSsBubble_Spawn(PlayState* play, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale, f32 scale);
|
||||
void EffectSsGRipple_Spawn(PlayState* play, Vec3f* pos, s16 radius, s16 radiusMax, s16 life);
|
||||
void EffectSsGSplash_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 scale);
|
||||
@@ -718,7 +718,7 @@ void func_800B9038(Actor* actor, s32 timer);
|
||||
void func_800B9084(Actor* actor);
|
||||
void func_800B9098(Actor* actor);
|
||||
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 index, s32 arg4);
|
||||
void func_800B90F4(PlayState* play);
|
||||
void Actor_DeactivateLens(PlayState* play);
|
||||
void func_800B9120(ActorContext* actorCtx);
|
||||
void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEntry);
|
||||
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx);
|
||||
@@ -1858,13 +1858,9 @@ s32 Health_ChangeBy(PlayState* play, s16 healthChange);
|
||||
void Health_GiveHearts(s16 hearts);
|
||||
void Rupees_ChangeBy(s16 rupeeChange);
|
||||
void Inventory_ChangeAmmo(s16 item, s16 ammoChange);
|
||||
void Parameter_AddMagic(PlayState* play, s16 arg1);
|
||||
void func_80115D5C(GameState* gamestate);
|
||||
// void func_80115DB4(void);
|
||||
// void func_80116088(void);
|
||||
// void func_80116114(void);
|
||||
// void func_80116348(void);
|
||||
// void func_80116918(void);
|
||||
void Magic_Add(PlayState* play, s16 magicToAdd);
|
||||
void Magic_Reset(PlayState* play);
|
||||
s32 Magic_Consume(PlayState* play, s16 magicToConsume, s16 type);
|
||||
// void func_80116FD8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_801170B8(void);
|
||||
// void func_80117100(void);
|
||||
@@ -1975,12 +1971,6 @@ s32 func_80128640(PlayState* play, Player* player, Gfx* dlist);
|
||||
void func_80128B74(PlayState* play, Player* player, s32 limbIndex);
|
||||
void func_80128BD0(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot, Actor* actor);
|
||||
|
||||
void PreNMI_Stop(PreNMIContext* prenmiCtx);
|
||||
void PreNMI_Update(PreNMIContext* prenmiCtx);
|
||||
void PreNMI_Draw(PreNMIContext* prenmiCtx);
|
||||
void PreNMI_Main(PreNMIContext* prenmiCtx);
|
||||
void PreNMI_Destroy(PreNMIContext* prenmiCtx);
|
||||
void PreNMI_Init(PreNMIContext* prenmiCtx);
|
||||
f32 Quake_Random(void);
|
||||
void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 verticalPertubation, f32 horizontalPertubation);
|
||||
s16 Quake_Callback1(QuakeRequest* req, ShakeInfo* shake);
|
||||
@@ -2672,10 +2662,7 @@ void AudioMgr_HandlePRENMI(AudioMgr* audioMgr);
|
||||
void AudioMgr_ThreadEntry(void* arg);
|
||||
void AudioMgr_Unlock(AudioMgr* audioMgr);
|
||||
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr);
|
||||
void TitleSetup_GameStateResetContext(void);
|
||||
void TitleSetup_InitImpl(GameState* gameState);
|
||||
void TitleSetup_Destroy(GameState* gameState);
|
||||
void TitleSetup_Init(GameState* gameState);
|
||||
|
||||
void Game_UpdateFramerateVariables(s32 divisor);
|
||||
void Game_SetFramerateDivisor(GameState* gameState, s32 divisor);
|
||||
void GameState_SetFBFilter(Gfx** gfx, u32 arg1);
|
||||
@@ -2690,8 +2677,8 @@ void GameState_InitArena(GameState* gameState, size_t size);
|
||||
void GameState_Realloc(GameState* gameState, size_t size);
|
||||
void GameState_Init(GameState* gameState, GameStateFunc gameStateInit, GraphicsContext* gfxCtx);
|
||||
void GameState_Destroy(GameState* gameState);
|
||||
GameStateFunc GameState_GetNextStateInit(GameState* gameState);
|
||||
size_t GameState_GetNextStateSize(GameState* gameState);
|
||||
GameStateFunc GameState_GetInit(GameState* gameState);
|
||||
size_t GameState_GetSize(GameState* gameState);
|
||||
u32 GameState_IsRunning(GameState* gameState);
|
||||
s32 GameState_GetArenaSize(GameState* gameState);
|
||||
s32 func_80173B48(GameState* gameState);
|
||||
@@ -3045,8 +3032,8 @@ void* AudioHeap_AllocAttemptExternal(AudioAllocPool* pool, size_t size);
|
||||
void* AudioHeap_AllocDmaMemory(AudioAllocPool* pool, size_t size);
|
||||
void* AudioHeap_AllocZeroed(AudioAllocPool* pool, size_t size);
|
||||
void* AudioHeap_Alloc(AudioAllocPool* pool, size_t size);
|
||||
void AudioHeap_AllocPoolInit(AudioAllocPool* pool, void* addr, size_t size);
|
||||
void AudioHeap_PopCache(s32 tableType);
|
||||
void AudioHeap_InitPool(AudioAllocPool* pool, void* addr, size_t size);
|
||||
void AudioHeap_PopPersistentCache(s32 tableType);
|
||||
void AudioHeap_InitMainPool(size_t initPoolSize);
|
||||
void* AudioHeap_AllocCached(s32 tableType, size_t size, s32 cache, s32 id);
|
||||
void* AudioHeap_SearchCaches(s32 tableType, s32 cache, s32 id);
|
||||
@@ -3131,10 +3118,10 @@ s32 osAiSetNextBuffer(void* buf, u32 size);
|
||||
|
||||
void AudioPlayback_NoteDisable(Note* note);
|
||||
void AudioPlayback_ProcessNotes(void);
|
||||
SoundFontSound* AudioPlayback_InstrumentGetSound(Instrument* instrument, s32 semitone);
|
||||
TunedSample* AudioPlayback_GetInstrumentTunedSample(Instrument* instrument, s32 semitone);
|
||||
Instrument* AudioPlayback_GetInstrumentInner(s32 fontId, s32 instId);
|
||||
Drum* AudioPlayback_GetDrum(s32 fontId, s32 drumId);
|
||||
SoundFontSound* AudioPlayback_GetSfx(s32 fontId, s32 sfxId);
|
||||
SoundEffect* AudioPlayback_GetSoundEffect(s32 fontId, s32 sfxId);
|
||||
s32 AudioPlayback_SetFontInstrument(s32 instrumentType, s32 fontId, s32 index, void* value);
|
||||
void AudioPlayback_SeqLayerNoteDecay(SequenceLayer* layer);
|
||||
void AudioPlayback_SeqLayerNoteRelease(SequenceLayer* layer);
|
||||
|
||||
+17
-3
@@ -24,9 +24,20 @@
|
||||
|
||||
#define GET_ACTIVE_CAM(play) ((play)->cameraPtrs[(play)->activeCamId])
|
||||
|
||||
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
|
||||
(curState)->nextGameStateInit = (GameStateFunc)newInit; \
|
||||
(curState)->nextGameStateSize = sizeof(newStruct)
|
||||
#define STOP_GAMESTATE(curState) \
|
||||
do { \
|
||||
GameState* state = curState; \
|
||||
\
|
||||
state->running = false; \
|
||||
} while(0)
|
||||
|
||||
#define SET_NEXT_GAMESTATE(curState, nextInit, nextSize) \
|
||||
do { \
|
||||
GameState* state = curState; \
|
||||
\
|
||||
(state)->init = nextInit; \
|
||||
(state)->size = nextSize; \
|
||||
} while (0)
|
||||
|
||||
#define GET_PLAYER(play) ((Player*)(play)->actorCtx.actorLists[ACTORCAT_PLAYER].first)
|
||||
|
||||
@@ -45,6 +56,9 @@
|
||||
#define CAPACITY(upg, value) gUpgradeCapacities[upg][value]
|
||||
#define CUR_CAPACITY(upg) CAPACITY(upg, CUR_UPG_VALUE(upg))
|
||||
|
||||
// To be used with `Magic_Add`, but ensures enough magic is added to fill the magic bar to capacity
|
||||
#define MAGIC_FILL_TO_CAPACITY (((void)0, gSaveContext.magicFillTarget) + (gSaveContext.save.playerData.isDoubleMagicAcquired + 1) * MAGIC_NORMAL_METER)
|
||||
|
||||
#define CONTROLLER1(gameState) (&(gameState)->input[0])
|
||||
#define CONTROLLER2(gameState) (&(gameState)->input[1])
|
||||
#define CONTROLLER3(gameState) (&(gameState)->input[2])
|
||||
|
||||
+52
-55
@@ -43,61 +43,58 @@
|
||||
#define bREG(r) BASE_REG(28, r)
|
||||
|
||||
/* TODO: Actually confirm these, in case of miss-match it's at least a simple list to `sed` */
|
||||
#define R_ENABLE_ARENA_DBG SREG(0) // Same as OoT
|
||||
#define R_RUN_SPEED_LIMIT REG(45)
|
||||
#define R_UPDATE_RATE SREG(30)
|
||||
#define R_PAUSE_MENU_MODE SREG(94)
|
||||
#define R_C_UP_ICON_X YREG(88)
|
||||
#define R_C_UP_ICON_Y YREG(89)
|
||||
#define R_MAGIC_FILL_COLOR(i) ZREG(0 + i)
|
||||
#define R_C_BTN_COLOR(i) ZREG(39 + i)
|
||||
#define R_B_BTN_COLOR(i) ZREG(43 + i)
|
||||
#define R_START_LABEL_DD(i) ZREG(48 + i)
|
||||
#define R_START_LABEL_Y(i) ZREG(51 + i)
|
||||
#define R_START_LABEL_X(i) ZREG(54 + i)
|
||||
#define R_C_UP_BTN_X ZREG(62)
|
||||
#define R_C_UP_BTN_Y ZREG(63)
|
||||
#define R_START_BTN_X ZREG(68)
|
||||
#define R_START_BTN_Y ZREG(69)
|
||||
#define R_ITEM_BTN_X(i) ZREG(70 + i)
|
||||
#define R_ITEM_BTN_Y(i) ZREG(74 + i)
|
||||
#define R_ITEM_BTN_DD(i) ZREG(78 + i)
|
||||
#define R_ITEM_ICON_X(i) ZREG(82 + i)
|
||||
#define R_ITEM_ICON_Y(i) ZREG(86 + i)
|
||||
#define R_ITEM_ICON_DD(i) ZREG(90 + i)
|
||||
#define R_A_BTN_Y XREG(16)
|
||||
#define R_A_BTN_X XREG(17)
|
||||
#define R_A_ICON_Y XREG(19)
|
||||
#define R_A_ICON_X XREG(20)
|
||||
#define R_A_BTN_COLOR(i) XREG(22 + i)
|
||||
#define R_MAGIC_BAR_SMALL_Y XREG(48)
|
||||
#define R_MAGIC_BAR_X XREG(49)
|
||||
#define R_MAGIC_BAR_LARGE_Y XREG(50)
|
||||
#define R_MAGIC_FILL_X XREG(51)
|
||||
#define R_MINIMAP_DISABLED XREG(95)
|
||||
#define R_B_LABEL_DD WREG(0)
|
||||
#define R_OW_MINIMAP_X WREG(29)
|
||||
#define R_OW_MINIMAP_Y WREG(30)
|
||||
#define R_B_LABEL_X(i) WREG(40 + i)
|
||||
#define R_B_LABEL_Y(i) WREG(43 + i)
|
||||
#define R_DGN_MINIMAP_X WREG(68)
|
||||
#define R_DGN_MINIMAP_Y WREG(69)
|
||||
#define R_MAP_INDEX VREG(11)
|
||||
#define R_MAP_TEX_INDEX_BASE VREG(12)
|
||||
#define R_MAP_TEX_INDEX VREG(13)
|
||||
#define R_COMPASS_SCALE_X VREG(14)
|
||||
#define R_COMPASS_SCALE_Y VREG(15)
|
||||
#define R_COMPASS_OFFSET_X VREG(16)
|
||||
#define R_COMPASS_OFFSET_Y VREG(17)
|
||||
#define R_MINIMAP_COLOR(i) VREG(18 + i)
|
||||
#define R_ITEM_AMMO_X(i) VREG(64 + i)
|
||||
#define R_ITEM_AMMO_Y(i) VREG(68 + i)
|
||||
#define R_ITEM_ICON_WIDTH(i) VREG(76 + i)
|
||||
#define R_ITEM_BTN_WIDTH(i) VREG(80 + i)
|
||||
#define R_ENABLE_ARENA_DBG SREG(0) // Same as OoT
|
||||
#define R_RUN_SPEED_LIMIT REG(45)
|
||||
#define R_UPDATE_RATE SREG(30)
|
||||
#define R_PAUSE_MENU_MODE SREG(94)
|
||||
#define R_C_UP_ICON_X YREG(88)
|
||||
#define R_C_UP_ICON_Y YREG(89)
|
||||
#define R_MAGIC_FILL_COLOR(i) ZREG(0 + i)
|
||||
#define R_C_BTN_COLOR(i) ZREG(39 + i)
|
||||
#define R_B_BTN_COLOR(i) ZREG(43 + i)
|
||||
#define R_START_LABEL_DD(i) ZREG(48 + i)
|
||||
#define R_START_LABEL_Y(i) ZREG(51 + i)
|
||||
#define R_START_LABEL_X(i) ZREG(54 + i)
|
||||
#define R_C_UP_BTN_X ZREG(62)
|
||||
#define R_C_UP_BTN_Y ZREG(63)
|
||||
#define R_START_BTN_X ZREG(68)
|
||||
#define R_START_BTN_Y ZREG(69)
|
||||
#define R_ITEM_BTN_X(i) ZREG(70 + i)
|
||||
#define R_ITEM_BTN_Y(i) ZREG(74 + i)
|
||||
#define R_ITEM_BTN_DD(i) ZREG(78 + i)
|
||||
#define R_ITEM_ICON_X(i) ZREG(82 + i)
|
||||
#define R_ITEM_ICON_Y(i) ZREG(86 + i)
|
||||
#define R_ITEM_ICON_DD(i) ZREG(90 + i)
|
||||
#define R_A_BTN_Y XREG(16)
|
||||
#define R_A_BTN_X XREG(17)
|
||||
#define R_A_ICON_Y XREG(19)
|
||||
#define R_A_ICON_X XREG(20)
|
||||
#define R_A_BTN_COLOR(i) XREG(22 + i)
|
||||
#define R_MAGIC_CONSUME_TIMER_GIANTS_MASK XREG(41)
|
||||
#define R_MINIMAP_DISABLED XREG(95)
|
||||
#define R_B_LABEL_DD WREG(0)
|
||||
#define R_OW_MINIMAP_X WREG(29)
|
||||
#define R_OW_MINIMAP_Y WREG(30)
|
||||
#define R_B_LABEL_X(i) WREG(40 + i)
|
||||
#define R_B_LABEL_Y(i) WREG(43 + i)
|
||||
#define R_DGN_MINIMAP_X WREG(68)
|
||||
#define R_DGN_MINIMAP_Y WREG(69)
|
||||
#define R_MAP_INDEX VREG(11)
|
||||
#define R_MAP_TEX_INDEX_BASE VREG(12)
|
||||
#define R_MAP_TEX_INDEX VREG(13)
|
||||
#define R_COMPASS_SCALE_X VREG(14)
|
||||
#define R_COMPASS_SCALE_Y VREG(15)
|
||||
#define R_COMPASS_OFFSET_X VREG(16)
|
||||
#define R_COMPASS_OFFSET_Y VREG(17)
|
||||
#define R_MINIMAP_COLOR(i) VREG(18 + i)
|
||||
#define R_ITEM_AMMO_X(i) VREG(64 + i)
|
||||
#define R_ITEM_AMMO_Y(i) VREG(68 + i)
|
||||
#define R_ITEM_ICON_WIDTH(i) VREG(76 + i)
|
||||
#define R_ITEM_BTN_WIDTH(i) VREG(80 + i)
|
||||
|
||||
#define R_FB_FILTER_TYPE SREG(80)
|
||||
#define R_FB_FILTER_PRIM_COLOR(c) SREG(81 + c)
|
||||
#define R_FB_FILTER_A SREG(84)
|
||||
#define R_FB_FILTER_ENV_COLOR(c) SREG(85 + c)
|
||||
#define R_FB_FILTER_TYPE SREG(80)
|
||||
#define R_FB_FILTER_PRIM_COLOR(c) SREG(81 + c)
|
||||
#define R_FB_FILTER_A SREG(84)
|
||||
#define R_FB_FILTER_ENV_COLOR(c) SREG(85 + c)
|
||||
|
||||
#endif
|
||||
|
||||
+8
-10
@@ -362,8 +362,6 @@ extern ActorInit En_A_Obj_InitVars;
|
||||
extern ColliderCylinderInit enAObjCylinderInit;
|
||||
extern InitChainEntry enAObjInitVar;
|
||||
extern Gfx* enAObjDisplayLists[2];
|
||||
extern UNK_PTR D_801ADF30[5];
|
||||
extern UNK_PTR D_801ADF44[12];
|
||||
extern u8 sDropTable[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
||||
extern u8 sDropTableAmounts[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
||||
extern s32 D_801AE194[32];
|
||||
@@ -1028,11 +1026,11 @@ extern UNK_PTR D_801BF5C0;
|
||||
// extern UNK_TYPE2 D_801BF890;
|
||||
// extern UNK_TYPE2 D_801BF898;
|
||||
// extern UNK_TYPE2 D_801BF89C;
|
||||
// extern UNK_TYPE2 D_801BF8A0;
|
||||
// extern UNK_TYPE2 D_801BF8A4;
|
||||
// extern UNK_TYPE2 D_801BF8A8;
|
||||
// extern UNK_TYPE2 D_801BF8AC;
|
||||
// extern UNK_TYPE2 D_801BF8B0;
|
||||
// extern UNK_TYPE2 sMagicMeterOutlinePrimRed;
|
||||
// extern UNK_TYPE2 sMagicMeterOutlinePrimGreen;
|
||||
// extern UNK_TYPE2 sMagicMeterOutlinePrimBlue;
|
||||
// extern UNK_TYPE2 sMagicBorderRatio;
|
||||
// extern UNK_TYPE2 sMagicBorderStep;
|
||||
// extern UNK_TYPE2 D_801BF8DC;
|
||||
// extern UNK_TYPE2 D_801BF8E0;
|
||||
// extern UNK_TYPE2 D_801BF8E4;
|
||||
@@ -2719,7 +2717,7 @@ extern f32 D_801DE860;
|
||||
extern f32 D_801DE864;
|
||||
extern f32 D_801DE868;
|
||||
extern f32 D_801DE884;
|
||||
extern TexturePtr D_801DE890[];
|
||||
extern TexturePtr gCircleTex;
|
||||
extern f32 D_801DF090;
|
||||
extern f32 D_801DF094;
|
||||
extern f32 D_801DF0A0;
|
||||
@@ -2968,7 +2966,7 @@ extern f64 D_801E0EB0;
|
||||
// extern UNK_TYPE4 D_801E1068;
|
||||
extern UNK_PTR D_801E10B0;
|
||||
extern const s16 gAudioTatumInit[];
|
||||
extern const AudioContextInitSizes gAudioContextInitSizes;
|
||||
extern const AudioHeapInitSizes gAudioHeapInitSizes;
|
||||
// extern UNK_TYPE4 D_801E1108;
|
||||
// extern UNK_TYPE4 D_801E110C;
|
||||
extern u8 gSoundFontTable[];
|
||||
@@ -3489,7 +3487,7 @@ extern ActiveSfx gActiveSfx[7][3];
|
||||
extern AudioContext gAudioContext; // at 0x80200C70
|
||||
extern void (*D_80208E68)(void);
|
||||
extern u32 (*D_80208E6C)(s8 value, SequenceChannel* channel);
|
||||
extern s32 (*D_80208E70)(SoundFontSample*, s32, s8, s32);
|
||||
extern s32 (*D_80208E70)(Sample*, s32, s8, s32);
|
||||
extern Acmd* (*D_80208E74)(Acmd*, s32, s32);
|
||||
|
||||
// post-code buffers
|
||||
|
||||
+5
-11
@@ -469,8 +469,8 @@ typedef struct {
|
||||
/* 0x290 */ f32 unk_290;
|
||||
/* 0x294 */ f32 unk_294;
|
||||
/* 0x298 */ f32 unk_298;
|
||||
/* 0x29C */ s16 unk_29C;
|
||||
/* 0x29E */ s16 unk_29E;
|
||||
/* 0x29C */ s16 promptChoice; // save/continue choice: 0 = yes; 4 = no
|
||||
/* 0x29E */ s16 promptAlpha;
|
||||
/* 0x2A0 */ s16 unk_2A0;
|
||||
/* 0x2A2 */ u8 worldMapPoints[20];
|
||||
/* 0x2B6 */ u8 unk_2B6;
|
||||
@@ -523,7 +523,7 @@ typedef struct {
|
||||
/* 0x252 */ s16 lifeSizeChange;
|
||||
/* 0x254 */ s16 lifeSizeChangeDirection; // 1 means shrinking, 0 growing
|
||||
/* 0x256 */ s16 unk_256;
|
||||
/* 0x258 */ s16 unk_258;
|
||||
/* 0x258 */ s16 magicConsumptionTimer; // For certain magic states, 1 unit of magic is consumed every time the timer reaches 0
|
||||
/* 0x25A */ u8 numHorseBoosts;
|
||||
/* 0x25C */ u16 unk_25C;
|
||||
/* 0x25E */ u16 unk_25E;
|
||||
@@ -904,8 +904,8 @@ typedef struct GameState {
|
||||
/* 0x00 */ GraphicsContext* gfxCtx;
|
||||
/* 0x04 */ GameStateFunc main;
|
||||
/* 0x08 */ GameStateFunc destroy;
|
||||
/* 0x0C */ GameStateFunc nextGameStateInit;
|
||||
/* 0x10 */ size_t nextGameStateSize;
|
||||
/* 0x0C */ GameStateFunc init; // Usually the current game state's init, though after stopping, the graph thread will look here to determine the next game state to load.
|
||||
/* 0x10 */ size_t size;
|
||||
/* 0x14 */ Input input[4];
|
||||
/* 0x74 */ TwoHeadArena heap;
|
||||
/* 0x84 */ GameAlloc alloc;
|
||||
@@ -917,12 +917,6 @@ typedef struct GameState {
|
||||
/* 0xA3 */ u8 unk_A3;
|
||||
} GameState; // size = 0xA4
|
||||
|
||||
typedef struct PreNMIContext {
|
||||
/* 0x00 */ GameState state;
|
||||
/* 0xA4 */ u32 timer;
|
||||
/* 0xA8 */ UNK_TYPE4 unkA8;
|
||||
} PreNMIContext; // size = 0xAC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 resetting;
|
||||
/* 0x04 */ u32 resetCount;
|
||||
|
||||
+126
-8
@@ -83,7 +83,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 unk_0; // frame?
|
||||
/* 0x2 */ Vec3s unk_2; // pos?
|
||||
/* 0x2 */ Vec3s unk_2; // scale
|
||||
} struct_80124618; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
@@ -307,6 +307,16 @@ typedef enum {
|
||||
/* 0x0C */ ACTORCAT_MAX
|
||||
} ActorType;
|
||||
|
||||
#define ACTORCTX_FLAG_0 (1 << 0)
|
||||
#define ACTORCTX_FLAG_1 (1 << 1)
|
||||
#define ACTORCTX_FLAG_2 (1 << 2)
|
||||
#define ACTORCTX_FLAG_3 (1 << 3)
|
||||
#define ACTORCTX_FLAG_4 (1 << 4)
|
||||
#define ACTORCTX_FLAG_5 (1 << 5)
|
||||
#define ACTORCTX_FLAG_6 (1 << 6)
|
||||
#define ACTORCTX_FLAG_7 (1 << 7)
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ f32 unkC;
|
||||
@@ -351,13 +361,13 @@ typedef struct ActorContext_unk_20C {
|
||||
/* 0x4 */ void* ptr;
|
||||
} ActorContext_unk_20C; // size = 0x8
|
||||
|
||||
typedef struct ActorContextFlags {
|
||||
typedef struct ActorContextSceneFlags {
|
||||
/* 0x00 */ u32 switches[4]; // First 0x40 are permanent, second 0x40 are temporary
|
||||
/* 0x10 */ u32 chest;
|
||||
/* 0x14 */ u32 clearedRoom;
|
||||
/* 0x18 */ u32 clearedRoomTemp;
|
||||
/* 0x1C */ u32 collectible[4]; // bitfield of 128 bits
|
||||
} ActorContextFlags; // size = 0x2C
|
||||
} ActorContextSceneFlags; // size = 0x2C
|
||||
|
||||
typedef struct ActorListEntry {
|
||||
/* 0x0 */ s32 length; // number of actors loaded of this type
|
||||
@@ -365,22 +375,25 @@ typedef struct ActorListEntry {
|
||||
/* 0x8 */ s32 unk_08;
|
||||
} ActorListEntry; // size = 0xC
|
||||
|
||||
// Target size when activated
|
||||
#define LENS_MASK_ACTIVE_SIZE 100
|
||||
|
||||
typedef struct ActorContext {
|
||||
/* 0x000 */ u8 freezeFlashTimer;
|
||||
/* 0x001 */ UNK_TYPE1 pad1;
|
||||
/* 0x002 */ u8 unk2;
|
||||
/* 0x003 */ u8 unk3;
|
||||
/* 0x004 */ s8 unk4;
|
||||
/* 0x005 */ u8 unk5;
|
||||
/* 0x003 */ u8 lensActive;
|
||||
/* 0x004 */ s8 lensMaskSize; // The size of the circle when drawn the lens mask. Larger value leads to a smaller circle
|
||||
/* 0x005 */ u8 flags;
|
||||
/* 0x006 */ UNK_TYPE1 pad6[0x5];
|
||||
/* 0x00B */ s8 unkB;
|
||||
/* 0x00B */ s8 lensActorsDrawn;
|
||||
/* 0x00C */ s16 unkC;
|
||||
/* 0x00E */ u8 totalLoadedActors;
|
||||
/* 0x00F */ u8 undrawnActorCount;
|
||||
/* 0x010 */ ActorListEntry actorLists[ACTORCAT_MAX];
|
||||
/* 0x0A0 */ Actor* undrawnActors[32]; // Records the first 32 actors drawn each frame
|
||||
/* 0x120 */ TargetContext targetContext;
|
||||
/* 0x1B8 */ ActorContextFlags flags;
|
||||
/* 0x1B8 */ ActorContextSceneFlags sceneFlags;
|
||||
/* 0x1E4 */ TitleCardContext titleCtxt;
|
||||
/* 0x1F4 */ u8 unk1F4;
|
||||
/* 0x1F5 */ u8 unk1F5;
|
||||
@@ -1185,4 +1198,109 @@ typedef enum {
|
||||
/* 0xC8 */ CLEAR_TAG_SMOKE = 200
|
||||
} ClearTagType;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ TATL_HINT_ID_DEFAULT,
|
||||
/* 0x01 */ TATL_HINT_ID_SNAPPER,
|
||||
/* 0x02 */ TATL_HINT_ID_MINI_BABA,
|
||||
/* 0x03 */ TATL_HINT_ID_MAD_JELLY,
|
||||
/* 0x04 */ TATL_HINT_ID_SKULLTULA,
|
||||
/* 0x05 */ TATL_HINT_ID_RED_CHUCHU,
|
||||
/* 0x06 */ TATL_HINT_ID_BLUE_CHUCHU,
|
||||
/* 0x07 */ TATL_HINT_ID_DEKU_BABA,
|
||||
/* 0x08 */ TATL_HINT_ID_BIO_DEKU_BABA,
|
||||
/* 0x09 */ TATL_HINT_ID_WILTED_DEKU_BABA,
|
||||
/* 0x0A */ TATL_HINT_ID_DEXIHAND,
|
||||
/* 0x0B */ TATL_HINT_ID_NEJIRON,
|
||||
/* 0x0C */ TATL_HINT_ID_GIANT_BEE,
|
||||
/* 0x0D */ TATL_HINT_ID_DODONGO,
|
||||
/* 0x0E */ TATL_HINT_ID_DEEP_PYTHON,
|
||||
/* 0x0F */ TATL_HINT_ID_DEATH_ARMOS,
|
||||
/* 0x10 */ TATL_HINT_ID_DINOLFOS,
|
||||
/* 0x11 */ TATL_HINT_ID_FIRE_KEESE,
|
||||
/* 0x12 */ TATL_HINT_ID_KEESE,
|
||||
/* 0x13 */ TATL_HINT_ID_ARMOS,
|
||||
/* 0x14 */ TATL_HINT_ID_EENO,
|
||||
/* 0x15 */ TATL_HINT_ID_DRAGONFLY,
|
||||
/* 0x16 */ TATL_HINT_ID_IGOS_DU_IKANA,
|
||||
/* 0x17 */ TATL_HINT_ID_GARO,
|
||||
/* 0x18 */ TATL_HINT_ID_GARO_MASTER,
|
||||
/* 0x19 */ TATL_HINT_ID_WART,
|
||||
/* 0x1A */ TATL_HINT_ID_GOMESS,
|
||||
/* 0x1B */ TATL_HINT_ID_GOHT,
|
||||
/* 0x1C */ TATL_HINT_ID_BLUE_BUBBLE,
|
||||
/* 0x1D */ TATL_HINT_ID_KINGS_LACKEYS_DARK_ROOM,
|
||||
/* 0x1E */ TATL_HINT_ID_KINGS_LACKEYS_LIGHT_ROOM,
|
||||
/* 0x1F */ TATL_HINT_ID_SKULLWALLTULA,
|
||||
/* 0x20 */ TATL_HINT_ID_GOLD_SKULLTULA, // Only in JP Ver.
|
||||
/* 0x21 */ TATL_HINT_ID_CAPTAIN_KEETA,
|
||||
/* 0x22 */ TATL_HINT_ID_YELLOW_CHUCHU,
|
||||
/* 0x23 */ TATL_HINT_ID_TAKKURI,
|
||||
/* 0x24 */ TATL_HINT_ID_RED_BUBBLE,
|
||||
/* 0x25 */ TATL_HINT_ID_HIPLOOP,
|
||||
/* 0x26 */ TATL_HINT_ID_MASKED_HIPLOOP,
|
||||
/* 0x27 */ TATL_HINT_ID_SHELLBLADE,
|
||||
/* 0x28 */ TATL_HINT_ID_GYORG, // "if you go near, you'll be eaten!"
|
||||
/* 0x29 */ TATL_HINT_ID_GYORG_STUNNED, // "Jump in and attack it!"
|
||||
/* 0x2A */ TATL_HINT_ID_REDEAD,
|
||||
/* 0x2B */ TATL_HINT_ID_2B,
|
||||
/* 0x2C */ TATL_HINT_ID_BLACK_BOE,
|
||||
/* 0x2D */ TATL_HINT_ID_GIBDO,
|
||||
/* 0x2E */ TATL_HINT_ID_TWINMOLD,
|
||||
/* 0x2F */ TATL_HINT_ID_WEARING_GIANTS_MASK, // Twinmold, JP Ver. only
|
||||
/* 0x30 */ TATL_HINT_ID_WALLMASTER,
|
||||
/* 0x31 */ TATL_HINT_ID_FLOORMASTER,
|
||||
/* 0x32 */ TATL_HINT_ID_MAJORAS_MASK,
|
||||
/* 0x33 */ TATL_HINT_ID_MAJORAS_INCARNATION,
|
||||
/* 0x34 */ TATL_HINT_ID_MAJORAS_WRATH,
|
||||
/* 0x35 */ TATL_HINT_ID_IRON_KNUCKLE,
|
||||
/* 0x36 */ TATL_HINT_ID_36, // Empty
|
||||
/* 0x37 */ TATL_HINT_ID_LIKE_LIKE,
|
||||
/* 0x38 */ TATL_HINT_ID_38, // Empty
|
||||
/* 0x39 */ TATL_HINT_ID_BEAMOS,
|
||||
/* 0x3A */ TATL_HINT_ID_3A, // Empty
|
||||
/* 0x3B */ TATL_HINT_ID_FREEZARD,
|
||||
/* 0x3C */ TATL_HINT_ID_WHITE_BOE,
|
||||
/* 0x3D */ TATL_HINT_ID_3D, // Empty
|
||||
/* 0x3E */ TATL_HINT_ID_3E, // Empty
|
||||
/* 0x3F */ TATL_HINT_ID_3F, // Empty
|
||||
/* 0x40 */ TATL_HINT_ID_40, // Empty
|
||||
/* 0x41 */ TATL_HINT_ID_41, // Empty
|
||||
/* 0x42 */ TATL_HINT_ID_OCTOROK,
|
||||
/* 0x43 */ TATL_HINT_ID_43, // Empty
|
||||
/* 0x44 */ TATL_HINT_ID_POE,
|
||||
/* 0x45 */ TATL_HINT_ID_GEKKO_SNAPPER,
|
||||
/* 0x46 */ TATL_HINT_ID_BLUE_TEKTITE,
|
||||
/* 0x47 */ TATL_HINT_ID_LEEVER,
|
||||
/* 0x48 */ TATL_HINT_ID_PEAHAT,
|
||||
/* 0x49 */ TATL_HINT_ID_PEAHAT_LARVA,
|
||||
/* 0x4A */ TATL_HINT_ID_EYEGORE,
|
||||
/* 0x4B */ TATL_HINT_ID_WIZROBE,
|
||||
/* 0x4C */ TATL_HINT_ID_WOLFOS,
|
||||
/* 0x4D */ TATL_HINT_ID_MAD_SCRUB,
|
||||
/* 0x4E */ TATL_HINT_ID_4E, // Empty
|
||||
/* 0x4F */ TATL_HINT_ID_4F, // Empty
|
||||
/* 0x50 */ TATL_HINT_ID_POE_SISTER_MEG,
|
||||
/* 0x51 */ TATL_HINT_ID_POE_SISTER_JO,
|
||||
/* 0x52 */ TATL_HINT_ID_POE_SISTER_BETH,
|
||||
/* 0x53 */ TATL_HINT_ID_POE_SISTER_AMY,
|
||||
/* 0x54 */ TATL_HINT_ID_PIRATE,
|
||||
/* 0x55 */ TATL_HINT_ID_STALCHILD,
|
||||
/* 0x56 */ TATL_HINT_ID_ICE_KEESE,
|
||||
/* 0x57 */ TATL_HINT_ID_WHITE_WOLFOS,
|
||||
/* 0x58 */ TATL_HINT_ID_GUAY,
|
||||
/* 0x59 */ TATL_HINT_ID_BIG_OCTO,
|
||||
/* 0x5A */ TATL_HINT_ID_BIG_POE,
|
||||
/* 0x5B */ TATL_HINT_ID_SKULLFISH,
|
||||
/* 0x5C */ TATL_HINT_ID_DESBREKO,
|
||||
/* 0x5D */ TATL_HINT_ID_GREEN_CHUCHU,
|
||||
/* 0x5E */ TATL_HINT_ID_ODOLWA_1,
|
||||
/* 0x5F */ TATL_HINT_ID_GEKKO_GIANT_SLIME,
|
||||
/* 0x60 */ TATL_HINT_ID_BAD_BAT,
|
||||
/* 0x61 */ TATL_HINT_ID_REAL_BOMBCHU,
|
||||
/* 0x62 */ TATL_HINT_ID_ODOLWA_2,
|
||||
/* 0x63 */ TATL_HINT_ID_ODOLWA_3,
|
||||
/* 0x64 */ TATL_HINT_ID_MUSHROOM,
|
||||
/* 0xFF */ TATL_HINT_ID_NONE = 0xFF
|
||||
} TatlHintId;
|
||||
|
||||
#endif
|
||||
|
||||
+85
-56
@@ -10,6 +10,12 @@
|
||||
#define IS_SEQUENCE_CHANNEL_VALID(ptr) ((uintptr_t)(ptr) != (uintptr_t)&gAudioContext.sequenceChannelNone)
|
||||
#define SEQ_NUM_CHANNELS 16
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SEQPLAYER_STATE_0,
|
||||
/* 1 */ SEQPLAYER_STATE_1, // Fading in
|
||||
/* 2 */ SEQPLAYER_STATE_2 // Fading out
|
||||
} SeqPlayerState;
|
||||
|
||||
#define MAX_CHANNELS_PER_BANK 3
|
||||
|
||||
#define MUTE_FLAGS_3 (1 << 3) // prevent further noteSubEus from playing
|
||||
@@ -27,6 +33,21 @@
|
||||
|
||||
#define AIBUF_LEN 0x580
|
||||
|
||||
// Must be the same amount of samples as copied by aDuplicate() (audio microcode)
|
||||
#define WAVE_SAMPLE_COUNT 64
|
||||
|
||||
#define AUDIO_RELOCATED_ADDRESS_START K0BASE
|
||||
|
||||
typedef enum {
|
||||
/* 0x1 */ AUDIO_ERROR_NO_INST = 1,
|
||||
/* 0x3 */ AUDIO_ERROR_INVALID_INST_ID = 3,
|
||||
/* 0x4 */ AUDIO_ERROR_INVALID_DRUM_SFX_ID,
|
||||
/* 0x5 */ AUDIO_ERROR_NO_DRUM_SFX,
|
||||
/* 0x10 */ AUDIO_ERROR_FONT_NOT_LOADED = 0x10
|
||||
} AudioError;
|
||||
|
||||
#define AUDIO_ERROR(fontId, id, err) (((fontId << 8) + id) + (err << 24))
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SOUNDMODE_STEREO,
|
||||
/* 1 */ SOUNDMODE_HEADSET,
|
||||
@@ -157,20 +178,20 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 unk_0 : 1;
|
||||
/* 0x00 */ u32 codec : 3;
|
||||
/* 0x00 */ u32 medium : 2;
|
||||
/* 0x00 */ u32 unk_bit26 : 1;
|
||||
/* 0x00 */ u32 unk_bit25 : 1;
|
||||
/* 0x01 */ u32 size : 24;
|
||||
/* 0x04 */ u8* sampleAddr;
|
||||
/* 0x08 */ AdpcmLoop* loop;
|
||||
/* 0x0C */ AdpcmBook* book;
|
||||
} SoundFontSample; // size = 0x10
|
||||
/* 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
|
||||
/* 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
|
||||
/* 0x0C */ AdpcmBook* book; // Adpcm book parameters used by the sample. Offset from the start of the sound font / pointer to ram
|
||||
} Sample; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ SoundFontSample* sample;
|
||||
/* 0x00 */ Sample* sample;
|
||||
/* 0x04 */ f32 tuning; // frequency scale factor
|
||||
} SoundFontSound; // size = 0x8
|
||||
} TunedSample; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 numSamplesAfterDownsampling; // never read
|
||||
@@ -222,29 +243,33 @@ typedef struct {
|
||||
/* 0x27C */ s16* unk_27C;
|
||||
/* 0x280 */ s16* filterLeftState;
|
||||
/* 0x284 */ s16* filterRightState;
|
||||
/* 0x288 */ SoundFontSound sound;
|
||||
/* 0x290 */ SoundFontSample sample;
|
||||
/* 0x288 */ TunedSample tunedSample;
|
||||
/* 0x290 */ Sample sample;
|
||||
/* 0x2A0 */ AdpcmLoop loop;
|
||||
} SynthesisReverb; // size = 0x2D0
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 loaded;
|
||||
/* 0x00 */ u8 isRelocated; // have the envelope and all samples been relocated (offsets to pointers)
|
||||
/* 0x01 */ u8 normalRangeLo;
|
||||
/* 0x02 */ u8 normalRangeHi;
|
||||
/* 0x03 */ u8 adsrDecayIndex; // index used to obtain adsr decay rate from adsrDecayTable
|
||||
/* 0x04 */ EnvelopePoint* envelope;
|
||||
/* 0x08 */ SoundFontSound lowNotesSound;
|
||||
/* 0x10 */ SoundFontSound normalNotesSound;
|
||||
/* 0x18 */ SoundFontSound highNotesSound;
|
||||
/* 0x08 */ TunedSample lowPitchTunedSample;
|
||||
/* 0x10 */ TunedSample normalPitchTunedSample;
|
||||
/* 0x18 */ TunedSample highPitchTunedSample;
|
||||
} Instrument; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 adsrDecayIndex; // index used to obtain adsr decay rate from adsrDecayTable
|
||||
/* 0x01 */ u8 pan;
|
||||
/* 0x02 */ u8 loaded;
|
||||
/* 0x04 */ SoundFontSound sound;
|
||||
/* 0x14 */ EnvelopePoint* envelope;
|
||||
} Drum; // size = 0x18
|
||||
/* 0x02 */ u8 isRelocated; // have tunedSample.sample and envelope been relocated (offsets to pointers)
|
||||
/* 0x04 */ TunedSample tunedSample;
|
||||
/* 0x0C */ EnvelopePoint* envelope;
|
||||
} Drum; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ TunedSample tunedSample;
|
||||
} SoundEffect; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 numInstruments;
|
||||
@@ -254,7 +279,7 @@ typedef struct {
|
||||
/* 0x04 */ u16 numSfx;
|
||||
/* 0x08 */ Instrument** instruments;
|
||||
/* 0x0C */ Drum** drums;
|
||||
/* 0x10 */ SoundFontSound* soundEffects;
|
||||
/* 0x10 */ SoundEffect* soundEffects;
|
||||
} SoundFont; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
@@ -290,10 +315,7 @@ typedef struct {
|
||||
/* 0x012 */ u16 fadeTimer;
|
||||
/* 0x014 */ u16 fadeTimerUnkEu;
|
||||
/* 0x016 */ u16 unk_16;
|
||||
union {
|
||||
/* 0x018 */ u8* seqData;
|
||||
/* 0x018 */ u16* seqData16;
|
||||
};
|
||||
/* 0x018 */ u8* seqData;
|
||||
/* 0x01C */ f32 fadeVolume;
|
||||
/* 0x020 */ f32 fadeVelocity;
|
||||
/* 0x024 */ f32 volume;
|
||||
@@ -437,7 +459,7 @@ typedef struct SequenceChannel {
|
||||
/* 0xD0 */ u8* sfxState; // SfxChannelState
|
||||
/* 0xD4 */ s16* filter;
|
||||
/* 0xD8 */ Stereo stereo;
|
||||
/* 0xDC */ s32 unk_DC;
|
||||
/* 0xDC */ s32 startSamplePos;
|
||||
/* 0xE0 */ s32 unk_E0;
|
||||
} SequenceChannel; // size = 0xE4
|
||||
|
||||
@@ -501,7 +523,7 @@ typedef struct SequenceLayer {
|
||||
/* 0x50 */ f32 noteVelocity;
|
||||
/* 0x54 */ f32 noteFreqScale;
|
||||
/* 0x58 */ Instrument* instrument;
|
||||
/* 0x5C */ SoundFontSound* sound;
|
||||
/* 0x5C */ TunedSample* tunedSample;
|
||||
/* 0x60 */ SequenceChannel* channel; // Not SequenceChannel?
|
||||
/* 0x64 */ SeqScriptState scriptState;
|
||||
/* 0x80 */ AudioListItem listItem;
|
||||
@@ -557,12 +579,18 @@ typedef struct {
|
||||
/* 0x1A */ u16 delay;
|
||||
} VibratoState; // size = 0x1C
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ PLAYBACK_STATUS_0,
|
||||
/* 1 */ PLAYBACK_STATUS_1,
|
||||
/* 2 */ PLAYBACK_STATUS_2
|
||||
} NotePlaybackStatus;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 priority;
|
||||
/* 0x01 */ u8 waveId;
|
||||
/* 0x02 */ u8 sampleCountIndex;
|
||||
/* 0x02 */ u8 harmonicIndex; // the harmonic index for the synthetic wave contained in gWaveSamples (also matches the base 2 logarithm of the harmonic order)
|
||||
/* 0x03 */ u8 fontId;
|
||||
/* 0x04 */ u8 unk_04;
|
||||
/* 0x04 */ u8 status;
|
||||
/* 0x05 */ u8 stereoHeadsetEffects;
|
||||
/* 0x06 */ s16 adsrVolScaleUnused;
|
||||
/* 0x08 */ f32 portamentoFreqScale;
|
||||
@@ -575,7 +603,7 @@ typedef struct {
|
||||
/* 0x54 */ Portamento portamento;
|
||||
/* 0x60 */ VibratoState vibratoState;
|
||||
/* 0x7C */ char unk_7C[0x8];
|
||||
/* 0x84 */ u32 unk_84;
|
||||
/* 0x84 */ u32 startSamplePos;
|
||||
} NotePlaybackState; // size = 0x88
|
||||
|
||||
typedef struct {
|
||||
@@ -600,16 +628,16 @@ typedef struct {
|
||||
/* 0x03 */ u8 headsetPanRight;
|
||||
/* 0x04 */ u8 headsetPanLeft;
|
||||
/* 0x05 */ u8 reverbVol;
|
||||
/* 0x06 */ u8 unk_06;
|
||||
/* 0x06 */ u8 harmonicIndexCurAndPrev; // bits 3..2 store curHarmonicIndex, bits 1..0 store prevHarmonicIndex
|
||||
/* 0x07 */ u8 unk_07;
|
||||
/* 0x08 */ u16 targetVolLeft;
|
||||
/* 0x0A */ u16 targetVolRight;
|
||||
/* 0x0C */ u16 resamplingRateFixedPoint;
|
||||
/* 0x0E */ u16 unk_0E;
|
||||
union {
|
||||
/* 0x10 */ SoundFontSound* soundFontSound;
|
||||
/* 0x10 */ s16* samples; // used for synthetic waves
|
||||
} sound;
|
||||
union {
|
||||
/* 0x10 */ TunedSample* tunedSample;
|
||||
/* 0x10 */ s16* waveSampleAddr; // used for synthetic waves
|
||||
};
|
||||
/* 0x14 */ s16* filter;
|
||||
/* 0x18 */ u8 unk_18;
|
||||
/* 0x19 */ u8 unk_19;
|
||||
@@ -640,7 +668,7 @@ typedef struct {
|
||||
} ReverbSettings; // size = 0x18
|
||||
|
||||
/**
|
||||
* The high-level audio specifications requested when initializing or resetting the audio heap.
|
||||
* The high-level audio specifications requested when initializing or resetting the audio pool.
|
||||
* Most often resets during scene transitions, but will highly depend on game play.
|
||||
*/
|
||||
typedef struct {
|
||||
@@ -648,7 +676,8 @@ typedef struct {
|
||||
/* 0x04 */ u8 unk_04;
|
||||
/* 0x05 */ u8 numNotes;
|
||||
/* 0x06 */ u8 numSequencePlayers;
|
||||
/* 0x07 */ u8 unk_07[0x2]; // unused, set to zero
|
||||
/* 0x07 */ u8 unk_07; // unused, set to zero
|
||||
/* 0x08 */ u8 unk_08; // unused, set to zero
|
||||
/* 0x09 */ u8 numReverbs;
|
||||
/* 0x0C */ ReverbSettings* reverbSettings;
|
||||
/* 0x10 */ u16 sampleDmaBufSize1;
|
||||
@@ -675,17 +704,17 @@ typedef struct {
|
||||
/* 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 maxAiBufferLength;
|
||||
/* 0x0A */ s16 minAiBufferLength;
|
||||
/* 0x0C */ s16 updatesPerFrame;
|
||||
/* 0x08 */ s16 maxAiBufNumSamples;
|
||||
/* 0x0A */ s16 minAiBufNumSamples;
|
||||
/* 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;
|
||||
/* 0x14 */ s16 numSequencePlayers;
|
||||
/* 0x18 */ f32 resampleRate;
|
||||
/* 0x1C */ f32 updatesPerFrameInv;
|
||||
/* 0x20 */ f32 unkUpdatesPerFrameScaled;
|
||||
/* 0x24 */ f32 unk_24;
|
||||
/* 0x1C */ f32 updatesPerFrameInv; // inverse (reciprocal) of updatesPerFrame
|
||||
/* 0x20 */ f32 updatesPerFrameInvScaled; // updatesPerFrameInv scaled down by a factor of 256
|
||||
/* 0x24 */ f32 updatesPerFrameScaled; // updatesPerFrame scaled down by a factor of 4
|
||||
} AudioBufferParameters; // size = 0x28
|
||||
|
||||
/**
|
||||
@@ -767,7 +796,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 endAndMediumKey;
|
||||
/* 0x04 */ SoundFontSample* sample;
|
||||
/* 0x04 */ Sample* sample;
|
||||
/* 0x08 */ u8* ramAddr;
|
||||
/* 0x0C */ u32 encodedInfo;
|
||||
/* 0x10 */ s32 isFree;
|
||||
@@ -822,7 +851,7 @@ typedef struct {
|
||||
/* 0x14 */ s32 status;
|
||||
/* 0x18 */ size_t bytesRemaining;
|
||||
/* 0x1C */ s8* isDone; // TODO: rename in OoT and sync up here. This is an external status while (s32 status) is an internal status
|
||||
/* 0x20 */ SoundFontSample sample;
|
||||
/* 0x20 */ Sample sample;
|
||||
/* 0x30 */ OSMesgQueue msgqueue;
|
||||
/* 0x48 */ OSMesg msg;
|
||||
/* 0x4C */ OSIoMesg ioMesg;
|
||||
@@ -873,7 +902,7 @@ typedef struct {
|
||||
/* 0x0014 */ NoteSubEu* noteSubsEu;
|
||||
/* 0x0018 */ SynthesisReverb synthesisReverbs[4];
|
||||
/* 0x0B58 */ char unk_0B58[0x30];
|
||||
/* 0x0B88 */ SoundFontSample* usedSamples[128];
|
||||
/* 0x0B88 */ Sample* usedSamples[128];
|
||||
/* 0x0D88 */ AudioPreloadReq preloadSampleStack[128];
|
||||
/* 0x1788 */ s32 numUsedSamples;
|
||||
/* 0x178C */ s32 preloadSampleStackTop;
|
||||
@@ -889,7 +918,7 @@ typedef struct {
|
||||
/* 0x1E58 */ OSMesg externalLoadMesgBuf[0x10];
|
||||
/* 0x1E98 */ OSMesgQueue preloadSampleQueue;
|
||||
/* 0x1EB0 */ OSMesg preloadSampleMesgBuf[0x10];
|
||||
/* 0x1EF0 */ OSMesgQueue currAudioFrameDmaQueue;
|
||||
/* 0x1EF0 */ OSMesgQueue curAudioFrameDmaQueue;
|
||||
/* 0x1F08 */ OSMesg currAudioFrameDmaMesgBuf[0x40];
|
||||
/* 0x2008 */ OSIoMesg currAudioFrameDmaIoMesgBuf[0x40];
|
||||
/* 0x2608 */ OSMesgQueue syncDmaQueue;
|
||||
@@ -911,7 +940,7 @@ typedef struct {
|
||||
/* 0x285C */ char unk_285C[0x4];
|
||||
/* 0x2860 */ u8* sequenceFontTable;
|
||||
/* 0x2864 */ u16 numSequences;
|
||||
/* 0x2868 */ SoundFont* soundFonts;
|
||||
/* 0x2868 */ SoundFont* soundFontList;
|
||||
/* 0x286C */ AudioBufferParameters audioBufferParameters;
|
||||
/* 0x2994 */ f32 unk_2870;
|
||||
/* 0x2898 */ s32 sampleDmaBufSize1;
|
||||
@@ -925,7 +954,7 @@ typedef struct {
|
||||
/* 0x28C0 */ s32 totalTaskCount; // The total number of times the top-level function on the audio thread is run since the last audio reset
|
||||
/* 0x28C4 */ s32 curAudioFrameDmaCount;
|
||||
/* 0x28C8 */ s32 rspTaskIndex;
|
||||
/* 0x28CC */ s32 curAiBuffferIndex;
|
||||
/* 0x28CC */ s32 curAiBufferIndex;
|
||||
/* 0x28AC */ Acmd* abiCmdBufs[2]; // Pointer to audio heap where the audio binary interface command lists are stored. Two lists that alternative every frame
|
||||
/* 0x28B4 */ Acmd* curAbiCmdBuf;
|
||||
/* 0x28DC */ AudioTask* curTask;
|
||||
@@ -933,16 +962,16 @@ typedef struct {
|
||||
/* 0x2980 */ f32 unk_2960;
|
||||
/* 0x2984*/ s32 refreshRate;
|
||||
/* 0x2988 */ s16* aiBuffers[3]; // Pointers to the audio buffer allocated on the initPool contained in the audio heap. Stores fully processed digital audio before transferring to the audio interface (AI)
|
||||
/* 0x2994 */ s16 aiBufLengths[3]; // Number of bytes to transfer to the audio interface buffer
|
||||
/* 0x2994 */ s16 aiBufNumSamples[3]; // Number of samples to transfer to the audio interface buffer
|
||||
/* 0x299C */ u32 audioRandom;
|
||||
/* 0x29A0 */ s32 audioErrorFlags;
|
||||
/* 0x29A4 */ volatile u32 resetTimer;
|
||||
/* 0x29A8 */ u32 (*unk_29A8[4])(s8 value, SequenceChannel* channel);
|
||||
/* 0x29B8 */ s8 unk_29B8;
|
||||
/* 0x29BC */ s32 unk_29BC; // sMaxAbiCmdCnt
|
||||
/* 0x29C0 */ AudioAllocPool audioSessionPool; // A sub-pool to main pool, contains all sub-pools and data that changes every audio reset
|
||||
/* 0x29C0 */ AudioAllocPool sessionPool; // A sub-pool to main pool, contains all sub-pools and data that changes every audio reset
|
||||
/* 0x29D0 */ AudioAllocPool externalPool; // pool allocated on an external device. Never used in game
|
||||
/* 0x29E0 */ AudioAllocPool audioInitPool; // A sub-pool to the main pool, contains all sub-pools and data that persists every audio reset
|
||||
/* 0x29E0 */ AudioAllocPool initPool; // A sub-pool to the main pool, contains all sub-pools and data that persists every audio reset
|
||||
/* 0x29F0 */ AudioAllocPool miscPool; // A sub-pool to the session pool,
|
||||
/* 0x2A00 */ char unk_29D0[0x20]; // probably two unused pools
|
||||
/* 0x2A20 */ AudioAllocPool cachePool; // The common pool for all cache entries
|
||||
@@ -978,7 +1007,7 @@ typedef struct {
|
||||
/* 0x7978 */ u8 cmdWritePos;
|
||||
/* 0x7979 */ u8 cmdReadPos;
|
||||
/* 0x797A */ u8 cmdQueueFinished;
|
||||
/* 0x797C */ u16 activeChannelsFlags[5]; // bitwise flag for 16 channels. Only channels with bit turned on will be processed
|
||||
/* 0x797C */ u16 activeChannelsFlags[5]; // bit-packed for 16 channels. Only channels with bit turned on will be processed
|
||||
/* 0x7988 */ OSMesgQueue* audioResetQueueP;
|
||||
/* 0x798C */ OSMesgQueue* taskStartQueueP;
|
||||
/* 0x7990 */ OSMesgQueue* cmdProcQueueP;
|
||||
@@ -1008,9 +1037,9 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ size_t heapSize; // total number of bytes allocated to the audio heap. Must be <= the size of `gAudioHeap` (ideally about the same size)
|
||||
/* 0x4 */ size_t mainPoolSplitSize; // The entire audio heap is split into two pools.
|
||||
/* 0x4 */ size_t initPoolSize; // The entire audio heap is split into two pools.
|
||||
/* 0x8 */ size_t permanentPoolSize;
|
||||
} AudioContextInitSizes; // size = 0xC
|
||||
} AudioHeapInitSizes; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 unk_00;
|
||||
|
||||
@@ -101,6 +101,9 @@ typedef struct {
|
||||
#define BINANG_LERPIMP(v0, v1, t) ((v0) + (s16)(BINANG_SUB((v1), (v0)) * (t)))
|
||||
#define BINANG_LERPIMPINV(v0, v1, t) ((v0) + BINANG_SUB((v1), (v0)) / (t))
|
||||
|
||||
#define LERPWEIGHT(val, prev, next) (((val) - (prev)) / ((next) - (prev)))
|
||||
#define F32_LERPWEIGHT(val, prev, next) (((f32)(val) - (f32)(prev)) / ((f32)(next) - (f32)(prev)))
|
||||
|
||||
#define VEC3F_LERPIMPDST(dst, v0, v1, t){ \
|
||||
(dst)->x = (v0)->x + (((v1)->x - (v0)->x) * t); \
|
||||
(dst)->y = (v0)->y + (((v1)->y - (v0)->y) * t); \
|
||||
|
||||
+48
-18
@@ -7,7 +7,7 @@
|
||||
|
||||
struct GameState;
|
||||
struct PlayState;
|
||||
struct FileChooseContext;
|
||||
struct FileSelectState;
|
||||
|
||||
// TODO: properly name DOWN, RETURN and TOP
|
||||
typedef enum RespawnMode {
|
||||
@@ -24,6 +24,36 @@ typedef enum RespawnMode {
|
||||
|
||||
#define SAVE_BUFFER_SIZE 0x4000
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ MAGIC_STATE_IDLE, // Regular gameplay
|
||||
/* 1 */ MAGIC_STATE_CONSUME_SETUP, // Sets the speed at which the magic border flashes
|
||||
/* 2 */ MAGIC_STATE_CONSUME, // Consume magic until target is reached or no more magic is available
|
||||
/* 3 */ MAGIC_STATE_METER_FLASH_1, // Flashes border
|
||||
/* 4 */ MAGIC_STATE_METER_FLASH_2, // Flashes border and draws yellow magic to preview target consumption
|
||||
/* 5 */ MAGIC_STATE_RESET, // Reset colors and return to idle
|
||||
/* 6 */ MAGIC_STATE_METER_FLASH_3, // Flashes border with no additional behaviour
|
||||
/* 7 */ MAGIC_STATE_CONSUME_LENS, // Magic slowly consumed by Lens of Truth
|
||||
/* 8 */ MAGIC_STATE_STEP_CAPACITY, // Step `magicCapacity` to full capacity
|
||||
/* 9 */ MAGIC_STATE_FILL, // Add magic until magicFillTarget is reached
|
||||
/* 10 */ MAGIC_STATE_CONSUME_GORON_ZORA_SETUP,
|
||||
/* 11 */ MAGIC_STATE_CONSUME_GORON_ZORA, // Magic slowly consumed by Goron spiked rolling or Zora electric barrier.
|
||||
/* 12 */ MAGIC_STATE_CONSUME_GIANTS_MASK // Magic slowly consumed by Giant's Mask
|
||||
} MagicState;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ MAGIC_CONSUME_NOW, // Consume magic immediately without preview
|
||||
/* 1 */ MAGIC_CONSUME_WAIT_NO_PREVIEW, // Sets consume target but waits to consume. No yellow magic preview to target consumption. Unused
|
||||
/* 2 */ MAGIC_CONSUME_NOW_ALT, // Identical behaviour to MAGIC_CONSUME_NOW. Unused
|
||||
/* 3 */ MAGIC_CONSUME_LENS, // Lens of Truth consumption
|
||||
/* 4 */ MAGIC_CONSUME_WAIT_PREVIEW, // Sets consume target but waits to consume. Show magic to be consumed in yellow.
|
||||
/* 5 */ MAGIC_CONSUME_GORON_ZORA, // Goron spiked rolling or Zora electric barrier slow consumption
|
||||
/* 6 */ MAGIC_CONSUME_GIANTS_MASK, // Giant's Mask slow consumption
|
||||
/* 7 */ MAGIC_CONSUME_DEITY_BEAM // Fierce Deity Beam consumption, consumed magic now and not via request
|
||||
} MagicChangeType;
|
||||
|
||||
#define MAGIC_NORMAL_METER 0x30
|
||||
#define MAGIC_DOUBLE_METER (2 * MAGIC_NORMAL_METER)
|
||||
|
||||
typedef struct SramContext {
|
||||
/* 0x00 */ u8* readBuff;
|
||||
/* 0x04 */ u8 *saveBuf;
|
||||
@@ -105,13 +135,13 @@ typedef struct SavePlayerData {
|
||||
/* 0x08 */ char playerName[8]; // "player_name"
|
||||
/* 0x10 */ s16 healthCapacity; // "max_life"
|
||||
/* 0x12 */ s16 health; // "now_life"
|
||||
/* 0x14 */ s8 magicLevel; // "magic_max"
|
||||
/* 0x15 */ s8 magic; // "magic_now"
|
||||
/* 0x14 */ s8 magicLevel; // 0 for no magic/new load, 1 for magic, 2 for double magic "magic_max"
|
||||
/* 0x15 */ s8 magic; // current magic available for use "magic_now"
|
||||
/* 0x16 */ s16 rupees; // "lupy_count"
|
||||
/* 0x18 */ u16 swordHealth; // "long_sword_hp"
|
||||
/* 0x1A */ u16 tatlTimer; // "navi_timer"
|
||||
/* 0x1C */ u8 magicAcquired; // "magic_mode"
|
||||
/* 0x1D */ u8 doubleMagic; // "magic_ability"
|
||||
/* 0x1C */ u8 isMagicAcquired; // "magic_mode"
|
||||
/* 0x1D */ u8 isDoubleMagicAcquired; // "magic_ability"
|
||||
/* 0x1E */ u8 doubleDefense; // "life_ability"
|
||||
/* 0x1F */ u8 unk_1F; // "ocarina_round"
|
||||
/* 0x20 */ u8 unk_20; // "first_memory"
|
||||
@@ -226,13 +256,13 @@ typedef struct SaveContext {
|
||||
/* 0x3F22 */ u16 unk_3F22; // "prev_alpha_type"
|
||||
/* 0x3F24 */ u16 unk_3F24; // "alpha_count"
|
||||
/* 0x3F26 */ u16 unk_3F26; // "last_time_type"
|
||||
/* 0x3F28 */ s16 unk_3F28; // "magic_flag"
|
||||
/* 0x3F2A */ s16 unk_3F2A; // "recovery_magic_flag"
|
||||
/* 0x3F2C */ s16 unk_3F2C; // "keep_magic_flag"
|
||||
/* 0x3F2E */ s16 unk_3F2E; // "magic_now_max"
|
||||
/* 0x3F30 */ s16 unk_3F30; // "magic_now_now"
|
||||
/* 0x3F32 */ s16 unk_3F32; // "magic_used"
|
||||
/* 0x3F34 */ s16 unk_3F34; // "magic_recovery"
|
||||
/* 0x3F28 */ s16 magicState; // determines magic meter behavior on each frame "magic_flag"
|
||||
/* 0x3F2A */ s16 isMagicRequested; // a request to add magic has been given "recovery_magic_flag"
|
||||
/* 0x3F2C */ s16 magicFlag; // Set to 0 in func_80812D94(), otherwise unused "keep_magic_flag"
|
||||
/* 0x3F2E */ s16 magicCapacity; // maximum magic available "magic_now_max"
|
||||
/* 0x3F30 */ s16 magicFillTarget; // target used to fill magic "magic_now_now"
|
||||
/* 0x3F32 */ s16 magicToConsume; // accumulated magic that is requested to be consumed "magic_used"
|
||||
/* 0x3F34 */ s16 magicToAdd; // accumulated magic that is requested to be added "magic_recovery"
|
||||
/* 0x3F36 */ u16 mapIndex; // "scene_ID"
|
||||
/* 0x3F38 */ u16 minigameState; // "yabusame_mode"
|
||||
/* 0x3F3A */ u16 minigameScore; // "yabusame_total"
|
||||
@@ -368,15 +398,15 @@ u16 Sram_CalcChecksum(void* data, size_t count);
|
||||
void Sram_InitNewSave(void);
|
||||
void Sram_InitDebugSave(void);
|
||||
void func_80144A94(SramContext* sramCtx);
|
||||
void Sram_OpenSave(struct FileChooseContext* fileChooseCtx, SramContext* sramCtx);
|
||||
void Sram_OpenSave(struct FileSelectState* fileSelect, SramContext* sramCtx);
|
||||
void func_8014546C(SramContext* sramCtx);
|
||||
void func_801457CC(struct FileChooseContext* fileChooseCtx, SramContext* sramCtx);
|
||||
void func_80146580(struct FileChooseContext* fileChooseCtx, SramContext* sramCtx, s32 fileNum);
|
||||
void func_80146628(struct FileChooseContext* fileChooseCtx, SramContext* sramCtx);
|
||||
void Sram_InitSave(struct FileChooseContext* fileChooseCtx, 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_80146DF8(SramContext* sramCtx);
|
||||
void Sram_InitSram(struct GameState* gameState, SramContext* sramCtx);
|
||||
void Sram_Alloc(struct GameState* gamestate, SramContext* sramCtx);
|
||||
void Sram_Alloc(struct GameState* gameState, SramContext* sramCtx);
|
||||
void Sram_SaveSpecialEnterClockTown(struct PlayState* play);
|
||||
void Sram_SaveSpecialNewDay(struct PlayState* play);
|
||||
void func_80147008(SramContext* sramCtx, u32 curPage, u32 numPages);
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef Z64_PRENMI_H
|
||||
#define Z64_PRENMI_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
void PreNMI_Destroy(GameState* thisx);
|
||||
void PreNMI_Init(GameState* thisx);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ GameState state;
|
||||
/* 0xA4 */ u32 timer;
|
||||
/* 0xA8 */ UNK_TYPE4 unkA8;
|
||||
} PreNMIState; // size = 0xAC
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef Z64_TITLE_SETUP_H
|
||||
#define Z64_TITLE_SETUP_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
void Setup_Destroy(GameState* gameState);
|
||||
void Setup_Init(GameState* gameState);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ GameState state;
|
||||
} SetupState; // size = 0xA4
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user