diff --git a/include/functions.h b/include/functions.h index b16e79798b..85eee3eb9b 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1,5 +1,5 @@ -#ifndef _FUNCTIONS_H_ -#define _FUNCTIONS_H_ +#ifndef FUNCTIONS_H +#define FUNCTIONS_H #include "z64.h" @@ -2392,16 +2392,7 @@ void func_8013A46C(s32 flag); u32 func_8013A4C4(s32 flag); s16 func_8013A504(s16 val); s32 func_8013A530(PlayState* play, Actor* actor, s32 flag, Vec3f* pos, Vec3s* rot, f32 distanceMin, f32 distanceMax, s16 angleError); -// void func_8013EC10(void); -void func_8013EC44(f32 a, u8 b, u8 c, u8 d); -void func_8013ECE0(f32 xyzDistToPlayerSq, u8 arg1, u8 arg2, u8 arg3); -void func_8013ED9C(void); -void func_8013EDD0(void); -u32 func_8013EE04(void); -void func_8013EE24(void); -// void func_8013EE38(void); -// void func_8013EE48(void); void View_ViewportToVp(Vp* dest, Viewport* src); void View_Init(View* view, GraphicsContext* gfxCtx); void View_SetViewOrientation(View* view, Vec3f* eye, Vec3f* at, Vec3f* up); @@ -2807,8 +2798,8 @@ ListAlloc* ListAlloc_Init(ListAlloc* this); void ListAlloc_FreeAll(ListAlloc* this); void Main(void* arg); u32 Padmgr_GetControllerBitmask(void); -// void func_80174F24(void); -// void func_80174F44(void); +void func_80174F24(void (*arg0)(void*), void* arg1); +void func_80174F44(void (*arg0)(void*), void* arg1); // void func_80174F7C(void); // void func_80174F9C(void); // OSMesgQueue* Padmgr_GetEventCallback(void); @@ -2819,10 +2810,10 @@ void Padmgr_SetEventCallback(OSMesg pvParm1); // void Padmgr_Unlock(void); // void func_801750FC(void); // void func_80175364(void); -// void func_80175434(void); -// void func_8017544C(void); -// void func_80175474(void); -// void func_801754C0(void); +void func_80175434(void); +void func_8017544C(s32 port, s32 rumbleOn); +void PadMgr_RumbleSet(u8 rumbleEnabled[MAXCONTROLLERS]); +s32 PadMgr_ControllerHasRumblePak(s32 port); void Padmgr_CalcStickEdges(Input* input); // void Padmgr_ParseState(void); // void func_801759BC(void); @@ -3002,9 +2993,6 @@ size_t SysUcode_GetUCodeBootSize(void); u64* SysUcode_GetUCode(void); u64* SysUcode_GetUCodeData(void); -// void func_80182CE0(void); -// void func_80183020(void); -// void func_80183058(void); void func_80183070(void); // void func_801830A0(void); // void func_801830C8(void); diff --git a/include/global.h b/include/global.h index 7c7971ee93..9fa3ef7bcf 100644 --- a/include/global.h +++ b/include/global.h @@ -1,5 +1,5 @@ -#ifndef _GLOBAL_H_ -#define _GLOBAL_H_ +#ifndef GLOBAL_H +#define GLOBAL_H #include "z64.h" #include "regs.h" diff --git a/include/variables.h b/include/variables.h index ddb9be246d..85f85108c5 100644 --- a/include/variables.h +++ b/include/variables.h @@ -1574,7 +1574,7 @@ extern UNK_PTR D_801D1540; // extern f32 sFactorialTbl[13]; extern Vec3f gZeroVec3f; extern Vec3s gZeroVec3s; -// extern UNK_TYPE1 D_801D1E70; + extern s16 gLowPassFilterData[]; extern s16 gHighPassFilterData[]; extern s16 gBandStopFilterData[]; @@ -3216,11 +3216,6 @@ extern s16 D_801F4E7A; // extern UNK_TYPE1 D_801F59F0; // extern UNK_TYPE1 D_801F59F4; // extern UNK_TYPE1 D_801F59F8; -// extern UNK_TYPE1 D_801F69D0; -// extern UNK_TYPE1 D_801F6A10; -// extern UNK_TYPE1 D_801F6AD4; -// extern UNK_TYPE1 D_801F6AD5; -// extern UNK_TYPE1 D_801F6ADA; // extern UNK_TYPE1 sSkyboxDrawMatrix; // extern UNK_TYPE1 D_801F6AF0; // extern UNK_TYPE1 D_801F6AF2; diff --git a/include/z64cutscene.h b/include/z64cutscene.h index 84150a527c..41518505ae 100644 --- a/include/z64cutscene.h +++ b/include/z64cutscene.h @@ -99,9 +99,9 @@ typedef struct { /* 0x0 */ u16 type; /* 0x2 */ u16 startFrame; /* 0x4 */ u16 endFrame; - /* 0x6 */ u8 unk6; - /* 0x7 */ u8 unk7; - /* 0x8 */ u8 unk8; + /* 0x6 */ u8 intensity; + /* 0x7 */ u8 decayTimer; + /* 0x8 */ u8 decayStep; /* 0x9 */ UNK_TYPE1 pad9[0x3]; } CsCmdRumble; // size = 0xC diff --git a/include/z64cutscene_commands.h b/include/z64cutscene_commands.h index b487b49b18..1ab6533ac2 100644 --- a/include/z64cutscene_commands.h +++ b/include/z64cutscene_commands.h @@ -548,8 +548,8 @@ * mmmmssss eeeeUUUU * size = 0x08 */ -#define CS_RUMBLE(base, startFrame, endFrame, unk6, unk7, unk8) \ - { CMD_HH(base, startFrame) }, { CMD_HBB(endFrame, unk6, unk7) }, { CMD_BBBB(unk8, 0, 0, 0) } +#define CS_RUMBLE(base, startFrame, endFrame, intensity, decayTimer, decayStep) \ + { CMD_HH(base, startFrame) }, { CMD_HBB(endFrame, intensity, decayTimer) }, { CMD_BBBB(decayStep, 0, 0, 0) } /** diff --git a/include/z64rumble.h b/include/z64rumble.h new file mode 100644 index 0000000000..cb422d2dec --- /dev/null +++ b/include/z64rumble.h @@ -0,0 +1,46 @@ +#ifndef Z64RUMBLE_H +#define Z64RUMBLE_H + +#include "PR/ultratypes.h" +#include "io/controller.h" + +typedef enum RumbleManagerState { + /* 0 */ RUMBLEMANAGER_STATE_WIPE, // Disables the request processing and wipes every request. It can be either set manually or automatically by the system as fail-safe in case the Rumble Pak has been vibrating for 2 minutes + /* 1 */ RUMBLEMANAGER_STATE_RUNNING, // Normal execution and updating + /* 2 */ RUMBLEMANAGER_STATE_INITIAL // Indicates initialization and cleanup must be done before processing the rumble requests. All the old requests on are wiped on this state. Then it proceeds to RUMBLEMANAGER_STATE_RUNNING +} RumbleManagerState; + +#define RUMBLE_REQUEST_BUFFER_SIZE 0x40 + +typedef struct RumbleManager { + /* 0x000 */ u8 rumbleEnabled[MAXCONTROLLERS]; + /* 0x004 */ u8 requestIntensities[RUMBLE_REQUEST_BUFFER_SIZE]; // seems to have two purposes: act as a priority value over the other rumble requests and to contribute to requestAccumulators on each tick + /* 0x044 */ u8 requestDecayTimers[RUMBLE_REQUEST_BUFFER_SIZE]; // amount of ticks this request will run before requestIntensities starts decreasing + /* 0x084 */ u8 requestDecaySteps[RUMBLE_REQUEST_BUFFER_SIZE]; // used to decrease requestIntensities by this amount each tick after requestDecayTimers runs out + /* 0x0C4 */ u8 requestAccumulators[RUMBLE_REQUEST_BUFFER_SIZE]; // the value contained here plus requestIntensities must meet a certain threshold to start rumbling this tick + /* 0x104 */ u8 state; + /* 0x105 */ u8 updateEnabled; // boolean value which controls if the Update function should be run. Unlike RUMBLEMANAGER_STATE_WIPE, disabling this does not wipe the state of the requests + /* 0x106 */ u16 rumblingDuration; // amount of "ticks" updates the Rumble Pak has been rumbling without pause. It is restarted after 5 ticks of not rumbling + /* 0x108 */ u16 downTime; // small counter/timer used to restart rumblingDuration + /* 0x10A */ u8 overrideIntensity; // "override" counterpart for requestIntensities + /* 0x10B */ u8 overrideDecayTimer; + /* 0x10C */ u8 overrideDecayStep; + /* 0x10D */ u8 overrideAccumulator; +} RumbleManager; // size = 0x10E + +extern RumbleManager gRumbleMgr; + +void Rumble_Override(f32 distSq, u8 sourceIntensity, u8 decayTimer, u8 decayStep); +void Rumble_Request(f32 distSq, u8 sourceIntensity, u8 decayTimer, u8 decayStep); +void Rumble_Init(void); +void Rumble_Destroy(void); +s32 Rumble_ControllerOneHasRumblePak(void); +void Rumble_StateReset(void); +void Rumble_StateWipeRequests(void); +void Rumble_SetUpdateEnabled(s32 updateEnabled); + +void RumbleManager_Update(RumbleManager* rumbleMgr); +void RumbleManager_Init(RumbleManager* rumbleMgr); +void RumbleManager_Destroy(RumbleManager* rumbleMgr); + +#endif diff --git a/spec b/spec index fb2204cc17..251581be37 100644 --- a/spec +++ b/spec @@ -529,8 +529,7 @@ beginseg include "build/src/code/z_snap.o" include "build/src/code/z_sub_s.o" include "build/data/code/code_801DE890.rodata.o" - include "build/src/code/code_8013EC10.o" - include "build/data/code/code_8013EC10.bss.o" + include "build/src/code/z_rumble.o" include "build/src/code/z_view.o" include "build/src/code/z_vimode.o" include "build/data/code/z_vimode.data.o" @@ -598,8 +597,8 @@ beginseg include "build/src/code/sys_math_atan.o" include "build/src/code/sys_matrix.o" include "build/src/code/sys_ucode.o" - include "build/src/code/code_80182CE0.o" - include "build/data/code/code_801D1E70.data.o" + include "build/src/code/sys_rumble.o" + include "build/data/code/code_801D1E80.data.o" include "build/src/code/code_80183070.o" include "build/src/code/c_keyframe.o" include "build/src/code/sys_slowly.o" diff --git a/src/code/code_8013EC10.c b/src/code/code_8013EC10.c deleted file mode 100644 index b44ed73a82..0000000000 --- a/src/code/code_8013EC10.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "global.h" - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8013EC10/func_8013EC10.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8013EC10/func_8013EC44.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8013EC10/func_8013ECE0.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8013EC10/func_8013ED9C.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8013EC10/func_8013EDD0.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8013EC10/func_8013EE04.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8013EC10/func_8013EE24.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8013EC10/func_8013EE38.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8013EC10/func_8013EE48.s") diff --git a/src/code/code_80182CE0.c b/src/code/code_80182CE0.c deleted file mode 100644 index 6ff8736e5d..0000000000 --- a/src/code/code_80182CE0.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "global.h" - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80182CE0/func_80182CE0.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80182CE0/func_80183020.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80182CE0/func_80183058.s") diff --git a/src/code/game.c b/src/code/game.c index 6f796bc129..c8d3e14baf 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -1,5 +1,6 @@ #include "global.h" #include "system_malloc.h" +#include "z64rumble.h" s32 gFramerateDivisor = 1; f32 gFramerateDivisorF = 1.0f; @@ -216,7 +217,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g VisMono_Init(&sMonoColors); func_80140898(&D_801F8048); func_801773A0(&D_801F7FF0); - func_8013ED9C(); + Rumble_Init(); osSendMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK); } @@ -231,7 +232,7 @@ void GameState_Destroy(GameState* gameState) { gameState->destroy(gameState); } - func_8013EDD0(); + Rumble_Destroy(); func_801773C4(&D_801F7FF0); func_80140D04(&D_801F8010); func_801420F4(&D_801F8020); diff --git a/src/code/padmgr.c b/src/code/padmgr.c index 0d539126a1..077ef1b2b0 100644 --- a/src/code/padmgr.c +++ b/src/code/padmgr.c @@ -31,9 +31,9 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/padmgr/func_8017544C.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/padmgr/func_80175474.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/padmgr/PadMgr_RumbleSet.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/padmgr/func_801754C0.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/padmgr/PadMgr_ControllerHasRumblePak.s") #pragma GLOBAL_ASM("asm/non_matchings/code/padmgr/Padmgr_CalcStickEdges.s") diff --git a/src/code/sys_rumble.c b/src/code/sys_rumble.c new file mode 100644 index 0000000000..4101758be0 --- /dev/null +++ b/src/code/sys_rumble.c @@ -0,0 +1,160 @@ +/* + * File: sys_rumble.c + * Description: Internal scheduler system for rumble requests + */ + +#include "global.h" +#include "z64rumble.h" + +// sRumbleWasEnabledOnLastTick/sWillDisableRumble? Probably name it after updateEnabled +u8 D_801D1E70 = true; + +void RumbleManager_Update(RumbleManager* rumbleMgr) { + s32 strongestIndex = -1; + s32 i; + s32 temp; + + // Turn rumbling off for all controllers + for (i = 0; i < ARRAY_COUNT(rumbleMgr->rumbleEnabled); i++) { + rumbleMgr->rumbleEnabled[i] = false; + } + + if (!rumbleMgr->updateEnabled) { + // Rumbling update is disabled + + if (D_801D1E70) { + for (i = 0; i < MAXCONTROLLERS; i++) { + func_8017544C(i, false); + } + } + + D_801D1E70 = rumbleMgr->updateEnabled; + func_80175434(); + + return; + } + + D_801D1E70 = rumbleMgr->updateEnabled; + + // Start up the manager by wiping old requests + if (rumbleMgr->state == RUMBLEMANAGER_STATE_INITIAL) { + for (i = 0; i < MAXCONTROLLERS; i++) { + func_8017544C(i, false); + } + + for (i = 0; i < RUMBLE_REQUEST_BUFFER_SIZE; i++) { + rumbleMgr->requestIntensities[i] = 0; + rumbleMgr->requestDecayTimers[i] = 0; + rumbleMgr->requestDecaySteps[i] = 0; + rumbleMgr->requestAccumulators[i] = 0; + } + + rumbleMgr->rumblingDuration = 0; + rumbleMgr->downTime = 0; + + rumbleMgr->overrideIntensity = 0; + rumbleMgr->overrideDecayTimer = 0; + rumbleMgr->overrideDecayStep = 0; + rumbleMgr->overrideAccumulator = 0; + + rumbleMgr->state = RUMBLEMANAGER_STATE_RUNNING; + + func_80175434(); + } + + if (rumbleMgr->state != RUMBLEMANAGER_STATE_WIPE) { + // Process arrays of rumble requests + for (i = 0; i < RUMBLE_REQUEST_BUFFER_SIZE; i++) { + if (rumbleMgr->requestIntensities[i] != 0) { // This entry has a non-empty rumble request + if (rumbleMgr->requestDecayTimers[i] > 0) { + rumbleMgr->requestDecayTimers[i]--; + } else { + temp = rumbleMgr->requestIntensities[i] - rumbleMgr->requestDecaySteps[i]; + if (temp > 0) { + rumbleMgr->requestIntensities[i] = temp; + } else { + rumbleMgr->requestIntensities[i] = 0; + } + } + + temp = rumbleMgr->requestAccumulators[i] + rumbleMgr->requestIntensities[i]; + rumbleMgr->requestAccumulators[i] = temp; // overflows + if (strongestIndex == -1) { + strongestIndex = i; + rumbleMgr->rumbleEnabled[0] = (temp >= 0x100); + } else if (rumbleMgr->requestIntensities[strongestIndex] < rumbleMgr->requestIntensities[i]) { + strongestIndex = i; + rumbleMgr->rumbleEnabled[0] = (temp >= 0x100); + } + } + } + + // Process Override request. Note it takes priority over the values set by the request arrays + if (rumbleMgr->overrideIntensity != 0) { + if (rumbleMgr->overrideDecayTimer > 0) { + rumbleMgr->overrideDecayTimer--; + } else { + temp = rumbleMgr->overrideIntensity - rumbleMgr->overrideDecayStep; + if (temp > 0) { + rumbleMgr->overrideIntensity = temp; + } else { + rumbleMgr->overrideIntensity = 0; + } + } + + temp = rumbleMgr->overrideAccumulator + rumbleMgr->overrideIntensity; + rumbleMgr->overrideAccumulator = temp; // overflows + rumbleMgr->rumbleEnabled[0] = (temp >= 0x100); + } + + if (rumbleMgr->overrideIntensity != 0) { + temp = rumbleMgr->overrideIntensity; + } else if (strongestIndex == -1) { + temp = 0; + } else { + temp = rumbleMgr->requestIntensities[strongestIndex]; + } + + // Keep track of how long this have been rumbling (almost) nonstop + if (temp == 0) { + rumbleMgr->downTime++; + if (rumbleMgr->downTime > 5) { + rumbleMgr->rumblingDuration = 0; + rumbleMgr->downTime = 5; + } + } else { + rumbleMgr->downTime = 0; + rumbleMgr->rumblingDuration++; + if (rumbleMgr->rumblingDuration > 2 * 60 * 60) { // 2 minutes + // Rumbling has lasted too long, clear system + rumbleMgr->state = RUMBLEMANAGER_STATE_WIPE; + } + } + } else { // RUMBLEMANAGER_STATE_WIPE + for (i = 0; i < RUMBLE_REQUEST_BUFFER_SIZE; i++) { + rumbleMgr->requestIntensities[i] = 0; + rumbleMgr->requestDecayTimers[i] = 0; + rumbleMgr->requestDecaySteps[i] = 0; + rumbleMgr->requestAccumulators[i] = 0; + } + + rumbleMgr->rumblingDuration = 0; + rumbleMgr->downTime = 0; + + rumbleMgr->overrideIntensity = 0; + rumbleMgr->overrideDecayTimer = 0; + rumbleMgr->overrideDecayStep = 0; + rumbleMgr->overrideAccumulator = 0; + + func_80175434(); + } +} + +void RumbleManager_Init(RumbleManager* rumbleMgr) { + bzero(rumbleMgr, sizeof(RumbleManager)); + rumbleMgr->state = RUMBLEMANAGER_STATE_INITIAL; + rumbleMgr->updateEnabled = true; +} + +void RumbleManager_Destroy(RumbleManager* rumbleMgr) { +} diff --git a/src/code/z_actor.c b/src/code/z_actor.c index fe5927c17c..273581621d 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -5,6 +5,7 @@ #include "global.h" #include "z64load.h" +#include "z64rumble.h" #include "overlays/actors/ovl_En_Horse/z_en_horse.h" #include "overlays/actors/ovl_En_Part/z_en_part.h" #include "overlays/actors/ovl_En_Box/z_en_box.h" @@ -3793,11 +3794,12 @@ void func_800BC7D8(PlayState* play, s16 y, s16 countdown, s16 speed) { Quake_SetCountdown(idx, countdown); } +// Actor_RequestRumble? void func_800BC848(Actor* actor, PlayState* play, s16 y, s16 countdown) { if (y >= 5) { - func_8013ECE0(actor->xyzDistToPlayerSq, 255, 20, 150); + Rumble_Request(actor->xyzDistToPlayerSq, 255, 20, 150); } else { - func_8013ECE0(actor->xyzDistToPlayerSq, 180, 20, 100); + Rumble_Request(actor->xyzDistToPlayerSq, 180, 20, 100); } func_800BC770(play, y, countdown); } diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 8356f21e3e..1367198c11 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -1,4 +1,5 @@ #include "global.h" +#include "z64rumble.h" #include "overlays/gamestates/ovl_daytelop/z_daytelop.h" void Cutscene_DoNothing(PlayState* play, CutsceneContext* csCtx); @@ -505,14 +506,14 @@ void Cutscene_Command_Rumble(PlayState* play, CutsceneContext* csCtx, CsCmdRumbl switch (cmd->type) { case 1: if (csCtx->frames == cmd->startFrame) { - func_8013ECE0(0.0f, cmd->unk6, cmd->unk7, cmd->unk8); + Rumble_Request(0.0f, cmd->intensity, cmd->decayTimer, cmd->decayStep); } break; case 2: if ((csCtx->frames >= cmd->startFrame) && (cmd->endFrame >= csCtx->frames)) { if ((csCtx->frames == cmd->startFrame) || (play->state.frames % 64 == 0)) { - func_8013ECE0(0.0f, cmd->unk6, cmd->unk7, cmd->unk8); + Rumble_Request(0.0f, cmd->intensity, cmd->decayTimer, cmd->decayStep); } } break; diff --git a/src/code/z_game_over.c b/src/code/z_game_over.c index b7f6dfa5ef..18df07783f 100644 --- a/src/code/z_game_over.c +++ b/src/code/z_game_over.c @@ -1,4 +1,5 @@ #include "global.h" +#include "z64rumble.h" void GameOver_Init(PlayState* play) { play->gameOverCtx.state = GAMEOVER_INACTIVE; @@ -62,7 +63,7 @@ void GameOver_Update(PlayState* play) { gSaveContext.unk_3F24 = 0; Kankyo_InitGameOverLights(play); sGameOverTimer = 20; - func_8013ECE0(0.0f, 126, 124, 63); + Rumble_Request(0.0f, 126, 124, 63); gameOverCtx->state = GAMEOVER_DEATH_WAIT_GROUND; break; case GAMEOVER_DEATH_FADE_OUT: @@ -78,7 +79,7 @@ void GameOver_Update(PlayState* play) { gSaveContext.save.playerForm = PLAYER_FORM_HUMAN; gSaveContext.save.equippedMask = PLAYER_MASK_NONE; } - func_8013EE24(); + Rumble_StateReset(); } break; case GAMEOVER_REVIVE_START: @@ -90,7 +91,7 @@ void GameOver_Update(PlayState* play) { case GAMEOVER_REVIVE_RUMBLE: sGameOverTimer = 50; gameOverCtx->state++; - func_8013ECE0(0.0f, 126, 124, 63); + Rumble_Request(0.0f, 126, 124, 63); break; case GAMEOVER_REVIVE_WAIT_GROUND: sGameOverTimer--; diff --git a/src/code/z_kaleido_setup.c b/src/code/z_kaleido_setup.c index fe985d7c32..b5ec93f5a9 100644 --- a/src/code/z_kaleido_setup.c +++ b/src/code/z_kaleido_setup.c @@ -1,4 +1,5 @@ #include "global.h" +#include "z64rumble.h" #include "overlays/gamestates/ovl_file_choose/z_file_choose.h" s16 D_801BDB00[] = { PAUSE_1, PAUSE_2, PAUSE_3, PAUSE_0 }; @@ -9,7 +10,7 @@ void func_800F4A10(PlayState* play) { PauseContext* pauseCtx = &play->pauseCtx; s16 i; - func_8013EE24(); + Rumble_StateReset(); pauseCtx->unk_206 = 0; pauseCtx->unk_200 = 1; diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c index 651afe6c04..c31cf00164 100644 --- a/src/code/z_lifemeter.c +++ b/src/code/z_lifemeter.c @@ -1,7 +1,6 @@ #include "prevent_bss_reordering.h" #include "global.h" #include "interface/parameter_static/parameter_static.h" -#include "prevent_bss_reordering.h" s16 sHeartsPrimColors[3][3] = { { 255, 70, 50 }, { 255, 190, 0 }, { 100, 100, 255 } }; s16 sHeartsEnvColors[3][3] = { { 50, 40, 60 }, { 255, 0, 0 }, { 0, 0, 255 } }; diff --git a/src/code/z_rumble.c b/src/code/z_rumble.c new file mode 100644 index 0000000000..ce5cc16b40 --- /dev/null +++ b/src/code/z_rumble.c @@ -0,0 +1,104 @@ +/* + * File: z_rumble.c + * Description: Rumble request system + * + * Provides a simple interface to allow scheduling up to RUMBLE_REQUEST_BUFFER_SIZE rumble requests to the RumblePak. + * There's an additional Override type of rumble request for requests which should take priorities over any other + * scheduled request. + */ + +#include "global.h" +#include "z64rumble.h" + +RumbleManager gRumbleMgr; + +void Rumble_Update(void* arg0) { + RumbleManager_Update(&gRumbleMgr); + PadMgr_RumbleSet(gRumbleMgr.rumbleEnabled); +} + +// Used by some bosses (and fishing) +void Rumble_Override(f32 distSq, u8 sourceIntensity, u8 decayTimer, u8 decayStep) { + s32 intensity; + s32 distance; + + if (SQ(1000.0f) < distSq) { + distance = 1000; + } else { + distance = sqrtf(distSq); + } + + if ((distance < 1000) && (sourceIntensity != 0) && (decayStep != 0)) { + intensity = sourceIntensity - (distance * 255) / 1000; + + if (intensity > 0) { + gRumbleMgr.overrideIntensity = intensity; + gRumbleMgr.overrideDecayTimer = decayTimer; + gRumbleMgr.overrideDecayStep = decayStep; + } + } +} + +void Rumble_Request(f32 distSq, u8 sourceIntensity, u8 decayTimer, u8 decayStep) { + s32 intensity; + s32 distance; + s32 i; + + if (SQ(1000.0f) < distSq) { + distance = 1000; + } else { + distance = sqrtf(distSq); + } + + if ((distance < 1000) && (sourceIntensity != 0) && (decayStep != 0)) { + intensity = sourceIntensity - (distance * 255) / 1000; + + for (i = 0; i < RUMBLE_REQUEST_BUFFER_SIZE; i++) { + if (gRumbleMgr.requestIntensities[i] == 0) { + if (intensity > 0) { + gRumbleMgr.requestIntensities[i] = intensity; + gRumbleMgr.requestDecayTimers[i] = decayTimer; + gRumbleMgr.requestDecaySteps[i] = decayStep; + } + break; + } + } + } +} + +void Rumble_Init(void) { + RumbleManager_Init(&gRumbleMgr); + func_80174F24(Rumble_Update, NULL); +} + +void Rumble_Destroy(void) { + func_80174F44(Rumble_Update, NULL); + RumbleManager_Destroy(&gRumbleMgr); +} + +s32 Rumble_ControllerOneHasRumblePak(void) { + return PadMgr_ControllerHasRumblePak(0); +} + +/** + * Wipes every old request for a fresh start, then proceeds to process them as normal + */ +void Rumble_StateReset(void) { + gRumbleMgr.state = RUMBLEMANAGER_STATE_INITIAL; +} + +/** + * Changes the state of the manager to WIPE + * + * In this state, every request is deleted + */ +void Rumble_StateWipeRequests(void) { + gRumbleMgr.state = RUMBLEMANAGER_STATE_WIPE; +} + +/** + * Request processing is paused if updateEnabled is set to false + */ +void Rumble_SetUpdateEnabled(s32 updateEnabled) { + gRumbleMgr.updateEnabled = !!updateEnabled; +} diff --git a/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.c b/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.c index d615bd36dd..eac1f00e31 100644 --- a/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.c +++ b/src/overlays/actors/ovl_Bg_F40_Switch/z_bg_f40_switch.c @@ -5,6 +5,7 @@ */ #include "z_bg_f40_switch.h" +#include "z64rumble.h" #include "objects/object_f40_switch/object_f40_switch.h" #define FLAGS (ACTOR_FLAG_10) @@ -144,7 +145,7 @@ void BgF40Switch_Press(BgF40Switch* this, PlayState* play) { this->dyna.actor.scale.y -= 0.0495f; if (this->dyna.actor.scale.y <= 0.0165f) { Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_SWITCH); - func_8013ECE0(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); + Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); if (this->isInitiator) { ActorCutscene_Stop(this->dyna.actor.cutscene); this->isInitiator = false; diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c index 81e24f55f9..0c273c739a 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c @@ -6,8 +6,8 @@ #include "prevent_bss_reordering.h" #include "z_bg_hakugin_post.h" +#include "z64rumble.h" #include "objects/object_hakugin_obj/object_hakugin_obj.h" -#include "prevent_bss_reordering.h" #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) @@ -519,7 +519,7 @@ void func_80A9C058(BgHakuginPost* this, PlayState* play, BgHakuginPostUnkStruct* sp44.x = this->dyna.actor.home.pos.x + unkStruct1->unk_14.x; sp44.y = this->unk_16C + unkStruct1->unk_14.y; sp44.z = this->dyna.actor.home.pos.z + unkStruct1->unk_14.z; - func_8013ECE0(Math3D_Vec3fDistSq(&sp44, &GET_PLAYER(play)->actor.world.pos), 255, 20, 150); + Rumble_Request(Math3D_Vec3fDistSq(&sp44, &GET_PLAYER(play)->actor.world.pos), 255, 20, 150); quake = Quake_Add(GET_ACTIVE_CAM(play), 3); Quake_SetSpeed(quake, 20000); Quake_SetQuakeValues(quake, 7, 0, 0, 0); @@ -540,9 +540,9 @@ void func_80A9C18C(BgHakuginPost* this, PlayState* play) { Camera* activeCam = GET_ACTIVE_CAM(play); s16 quake; - func_8013ECE0(Math3D_XZDistanceSquared(player->actor.world.pos.x, player->actor.world.pos.z, - this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.z), - 255, 20, 150); + Rumble_Request(Math3D_XZDistanceSquared(player->actor.world.pos.x, player->actor.world.pos.z, + this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.z), + 255, 20, 150); quake = Quake_Add(activeCam, 3); Quake_SetSpeed(quake, 17232); Quake_SetQuakeValues(quake, 6, 0, 0, 0); diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c b/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c index da31bef3de..0498dc2ee5 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c @@ -5,6 +5,7 @@ */ #include "z_bg_hakugin_switch.h" +#include "z64rumble.h" #include "objects/object_goronswitch/object_goronswitch.h" #define FLAGS (ACTOR_FLAG_10) @@ -306,7 +307,7 @@ void func_80B15E78(BgHakuginSwitch* this, PlayState* play) { if (Math_StepToF(&this->dyna.actor.world.pos.y, sp20->unk_4 + this->dyna.actor.home.pos.y, sp20->unk_C)) { if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) { - func_8013ECE0(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); + Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); } func_80B15F3C(this, play); } else if (!(sp20->unk_14 & 0x80)) { @@ -446,7 +447,7 @@ void func_80B16400(BgHakuginSwitch* this, PlayState* play) { if (Math_StepToF(&this->dyna.actor.world.pos.y, (this->dyna.actor.home.pos.y + 2.0f) - (1800.0f * this->dyna.actor.scale.y), 10.0f)) { if (DynaPolyActor_IsInRidingMovingState(&this->dyna)) { - func_8013ECE0(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); + Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); } func_80B16494(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c b/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c index 49707b2af8..cc29867e50 100644 --- a/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c +++ b/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c @@ -5,6 +5,7 @@ */ #include "z_bg_iknin_susceil.h" +#include "z64rumble.h" #include "objects/object_ikninside_obj/object_ikninside_obj.h" #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) @@ -75,11 +76,11 @@ void func_80C0A86C(BgIkninSusceil* this, PlayState* play, s16 verticalMag, s16 c Quake_SetQuakeValues(quake, verticalMag, 0, 0, 0); Quake_SetCountdown(quake, countdown); if (arg4 == 1) { - func_8013ECE0(10000.0f, 255, 20, 150); + Rumble_Request(SQ(100.0f), 255, 20, 150); } else if (arg4 == 2) { - func_8013ECE0(10000.0f, 180, 20, 100); + Rumble_Request(SQ(100.0f), 180, 20, 100); } else if (arg4 == 3) { - func_8013ECE0(10000.0f, 120, 20, 10); + Rumble_Request(SQ(100.0f), 120, 20, 10); } } diff --git a/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.c b/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.c index 93502e46e5..e830f738b4 100644 --- a/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.c +++ b/src/overlays/actors/ovl_Bg_Open_Shutter/z_bg_open_shutter.c @@ -5,6 +5,7 @@ */ #include "z_bg_open_shutter.h" +#include "z64rumble.h" #define FLAGS (ACTOR_FLAG_10) diff --git a/src/overlays/actors/ovl_Boss_01/z_boss_01.c b/src/overlays/actors/ovl_Boss_01/z_boss_01.c index 0907a6e9a1..a07e2f31e6 100644 --- a/src/overlays/actors/ovl_Boss_01/z_boss_01.c +++ b/src/overlays/actors/ovl_Boss_01/z_boss_01.c @@ -5,6 +5,7 @@ */ #include "z_boss_01.h" +#include "z64rumble.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20) diff --git a/src/overlays/actors/ovl_Boss_02/z_boss_02.c b/src/overlays/actors/ovl_Boss_02/z_boss_02.c index 18996dc51b..d096989817 100644 --- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c +++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c @@ -6,10 +6,10 @@ #include "prevent_bss_reordering.h" #include "z_boss_02.h" +#include "z64rumble.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h" #include "objects/gameplay_keep/gameplay_keep.h" -#include "prevent_bss_reordering.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20) @@ -124,17 +124,17 @@ const ActorInit Boss_02_InitVars = { (ActorFunc)Boss02_Draw, }; -static f32 D_809DF5B0 = 1.0f; +f32 D_809DF5B0 = 1.0f; -static s16 D_809DF5B4[] = { +s16 D_809DF5B4[] = { 0, 195, 190, 185, 180, 175, 170, 165, 160, 155, 150, 145, 140, 135, 130, 125, 120, 115, 110, 105, 100, 95, 90, 0, }; -static s16 D_809DF5E4[] = { +s16 D_809DF5E4[] = { 0, 196, 192, 188, 184, 180, 176, 172, 168, 164, 160, 156, 152, 148, 144, 140, 136, 132, 128, 124, 120, 116, 112, }; -static ColliderJntSphElementInit sJntSphElementsInit1[22] = { +static ColliderJntSphElementInit sJntSphElementsInit1[] = { { { ELEMTYPE_UNK3, @@ -388,11 +388,11 @@ static ColliderJntSphInit sJntSphInit1 = { OC2_TYPE_1, COLSHAPE_JNTSPH, }, - 22, + ARRAY_COUNT(sJntSphElementsInit1), sJntSphElementsInit1, }; -static ColliderJntSphElementInit sJntSphElementsInit2[2] = { +static ColliderJntSphElementInit sJntSphElementsInit2[] = { { { ELEMTYPE_UNK3, @@ -426,7 +426,7 @@ static ColliderJntSphInit sJntSphInit2 = { OC2_TYPE_1, COLSHAPE_JNTSPH, }, - 2, + ARRAY_COUNT(sJntSphElementsInit2), sJntSphElementsInit2, }; @@ -450,13 +450,13 @@ static ColliderCylinderInit sCylinderInit = { { 150, 200, 0, { 0, 0, 0 } }, }; -static Vec3f D_809DF9C0[] = { +Vec3f D_809DF9C0[] = { { 0.0f, -200.0f, 1000.0f }, { 0.0f, 500.0f, 1000.0f }, { 0.0f, 1000.0f, 1000.0f }, { 1000.0f, 500.0f, 1000.0f }, { 1000.0f, 1000.0f, -1000.0f }, { -1000.0f, 500.0f, -1000.0f }, { -1000.0f, 500.0f, 1000.0f }, { -1000.0f, -1000.0f, -1000.0f }, { -1000.0f, -1000.0f, -1000.0f }, }; -static Vec3f D_809DFA2C[] = { +Vec3f D_809DFA2C[] = { { 0.0f, -200.0f, -800.0f }, { 0.0f, 800.0f, -800.0f }, { 800.0f, 300.0f, -800.0f }, { -800.0f, 800.0f, 0.0f }, { -800.0f, -1000.0f, 0.0f }, { -800.0f, -1000.0f, 0.0f }, { -800.0f, -1000.0f, 0.0f }, { -800.0f, -1000.0f, 0.0f }, { -800.0f, -1000.0f, 0.0f }, @@ -652,8 +652,9 @@ void func_809DAAA8(Boss02* this, PlayState* play) { this->actor.world.pos.y = -500.0f; } +Color_RGBA8 D_809DFA98 = { 185, 140, 70, 255 }; + void func_809DAB78(Boss02* this, PlayState* play) { - static Color_RGBA8 D_809DFA98 = { 185, 140, 70, 255 }; s32 pad; Player* player = GET_PLAYER(play); CollisionPoly* spDC; @@ -1317,16 +1318,18 @@ void func_809DC78C(Actor* thisx, PlayState* play) { func_809DD934(this, play); } +Gfx* D_809DFA9C[] = { + gTwinmoldBodySegment1DL, gTwinmoldBodySegment2DL, gTwinmoldBodySegment3DL, gTwinmoldBodySegment4DL, + gTwinmoldBodySegment5DL, gTwinmoldBodySegment6DL, gTwinmoldBodySegment7DL, gTwinmoldBodySegment8DL, + gTwinmoldBodySegment9DL, gTwinmoldBodySegment10DL, gTwinmoldBodySegment11DL, gTwinmoldBodySegment12DL, + gTwinmoldBodySegment13DL, gTwinmoldBodySegment14DL, gTwinmoldBodySegment15DL, gTwinmoldBodySegment16DL, + gTwinmoldBodySegment17DL, gTwinmoldBodySegment18DL, gTwinmoldBodySegment19DL, gTwinmoldBodySegment20DL, + gTwinmoldBodySegment21DL, gTwinmoldBodyTailDL, +}; + +Vec3f D_809DFAF4 = { -10000.0f, -100000.0f, -100000.0f }; + void Boss02_Draw(Actor* thisx, PlayState* play2) { - static Gfx* D_809DFA9C[] = { - gTwinmoldBodySegment1DL, gTwinmoldBodySegment2DL, gTwinmoldBodySegment3DL, gTwinmoldBodySegment4DL, - gTwinmoldBodySegment5DL, gTwinmoldBodySegment6DL, gTwinmoldBodySegment7DL, gTwinmoldBodySegment8DL, - gTwinmoldBodySegment9DL, gTwinmoldBodySegment10DL, gTwinmoldBodySegment11DL, gTwinmoldBodySegment12DL, - gTwinmoldBodySegment13DL, gTwinmoldBodySegment14DL, gTwinmoldBodySegment15DL, gTwinmoldBodySegment16DL, - gTwinmoldBodySegment17DL, gTwinmoldBodySegment18DL, gTwinmoldBodySegment19DL, gTwinmoldBodySegment20DL, - gTwinmoldBodySegment21DL, gTwinmoldBodyTailDL, - }; - static Vec3f D_809DFAF4 = { -10000.0f, -100000.0f, -100000.0f }; PlayState* play = play2; Boss02* this = THIS; s32 i; @@ -2071,7 +2074,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) { this->unk_1D30.z = player->actor.world.pos.z; if (this->unk_1D1C >= 30) { if (this->unk_1D1C == 30) { - func_8013EC44(0.0f, 50, 200, 1); + Rumble_Override(0.0f, 50, 200, 1); } this->unk_0150 += 0x4000; sp58 = (Math_SinS(this->unk_0150) * (BREG(19) + 5)) * 0.1f; @@ -2095,7 +2098,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) { } if (this->unk_1D1C == 92) { - func_8013EC44(0.0f, 255, 30, 100); + Rumble_Override(0.0f, 255, 30, 100); } if (this->unk_1D1C == 100) { diff --git a/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c b/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c index 7b854fb95a..539387aaae 100644 --- a/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c +++ b/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c @@ -5,6 +5,7 @@ */ #include "z_boss_hakugin.h" +#include "z64rumble.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20) diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index 8601a4bfbd..61eb057a99 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -5,6 +5,7 @@ */ #include "z_door_shutter.h" +#include "z64rumble.h" #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_bdoor/object_bdoor.h" #include "objects/object_numa_obj/object_numa_obj.h" @@ -611,7 +612,7 @@ void func_808A1B48(DoorShutter* this, PlayState* play) { Quake_SetSpeed(quake, -32536); Quake_SetQuakeValues(quake, 2, 0, 0, 0); Quake_SetCountdown(quake, 10); - func_8013ECE0(this->actor.xyzDistToPlayerSq, 180, 20, 100); + Rumble_Request(this->actor.xyzDistToPlayerSq, 180, 20, 100); func_808A1884(this, play); } } diff --git a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c index 42eb1c2950..1820a91c85 100644 --- a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c +++ b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c @@ -5,6 +5,7 @@ */ #include "z_en_bigpamet.h" +#include "z64rumble.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_400) diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c index d7d7f54153..fd7ba49070 100644 --- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c +++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c @@ -5,6 +5,7 @@ */ #include "z_en_bigslime.h" +#include "z64rumble.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "objects/object_bigslime/object_bigslime.h" #include "objects/gameplay_keep/gameplay_keep.h" @@ -747,7 +748,7 @@ void EnBigslime_BreakIntoMinislime(EnBigslime* this, PlayState* play) { Quake_SetSpeed(quake, 20000); Quake_SetQuakeValues(quake, 15, 0, 0, 0); Quake_SetCountdown(quake, 15); - func_8013ECE0(this->actor.xyzDistToPlayerSq, 180, 20, 100); + Rumble_Request(this->actor.xyzDistToPlayerSq, 180, 20, 100); this->bigslimeCollider[0].base.atFlags &= ~AT_ON; this->gekkoCollider.base.acFlags &= ~(AC_ON | AC_HIT); diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 575f31cad0..c00a9adf5f 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -5,6 +5,7 @@ */ #include "z_en_bom.h" +#include "z64rumble.h" #include "objects/gameplay_keep/gameplay_keep.h" #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) @@ -338,7 +339,7 @@ void func_808715B8(EnBom* this, PlayState* play) { if (this->collider2.elements->dim.modelSphere.radius == 0) { this->actor.flags |= ACTOR_FLAG_20; - func_8013ECE0(this->actor.xzDistToPlayer, 255, 20, 150); + Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150); } this->collider2.elements->dim.worldSphere.radius = D_80872E8C[this->isPowderKeg]; diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 0889c54c1f..5fb2758c5d 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -5,6 +5,7 @@ */ #include "z_en_bombf.h" +#include "z64rumble.h" #include "objects/object_bombf/object_bombf.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_10) @@ -261,7 +262,7 @@ void func_808AEF68(EnBombf* this, PlayState* play) { void func_808AEFD4(EnBombf* this, PlayState* play) { if (this->colliderJntSph.elements->dim.modelSphere.radius == 0) { this->actor.flags |= ACTOR_FLAG_20; - func_8013ECE0(this->actor.xzDistToPlayer, 255, 20, 150); + Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150); } this->colliderJntSph.elements->dim.modelSphere.radius = 100; diff --git a/src/overlays/actors/ovl_En_Bsb/z_en_bsb.c b/src/overlays/actors/ovl_En_Bsb/z_en_bsb.c index 5e0e0a7764..dfb92082d7 100644 --- a/src/overlays/actors/ovl_En_Bsb/z_en_bsb.c +++ b/src/overlays/actors/ovl_En_Bsb/z_en_bsb.c @@ -5,6 +5,7 @@ */ #include "z_en_bsb.h" +#include "z64rumble.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_2000000) diff --git a/src/overlays/actors/ovl_En_Death/z_en_death.c b/src/overlays/actors/ovl_En_Death/z_en_death.c index aa9caa02a1..5ed61f1461 100644 --- a/src/overlays/actors/ovl_En_Death/z_en_death.c +++ b/src/overlays/actors/ovl_En_Death/z_en_death.c @@ -5,6 +5,7 @@ */ #include "z_en_death.h" +#include "z64rumble.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_1000) diff --git a/src/overlays/actors/ovl_En_Famos/z_en_famos.c b/src/overlays/actors/ovl_En_Famos/z_en_famos.c index cfb015d5c8..f8dd32a84b 100644 --- a/src/overlays/actors/ovl_En_Famos/z_en_famos.c +++ b/src/overlays/actors/ovl_En_Famos/z_en_famos.c @@ -5,6 +5,7 @@ */ #include "z_en_famos.h" +#include "z64rumble.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "objects/gameplay_keep/gameplay_keep.h" @@ -549,7 +550,7 @@ void EnFamos_Attack(EnFamos* this, PlayState* play) { this->collider2.base.atFlags |= AT_ON; if (hitFloor) { func_800DFD04(play->cameraPtrs[play->activeCamera], 2, 15, 10); // camera shake? - func_8013ECE0(this->actor.xyzDistToPlayerSq, 180, 20, 100); + Rumble_Request(this->actor.xyzDistToPlayerSq, 180, 20, 100); EnFamos_SetupAttackDebris(this); // spawn crator on floor diff --git a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c index 587e1838c8..9a3138fe0c 100644 --- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c +++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c @@ -6,6 +6,7 @@ #include "prevent_bss_reordering.h" #include "z_en_fishing.h" +#include "z64rumble.h" #include "objects/object_fish/object_fish.h" #include "overlays/actors/ovl_En_Kanban/z_en_kanban.h" @@ -3440,7 +3441,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { } D_80917272 = phi_v0; D_809171F4 = phi_v0; - func_8013EC44(0.0f, 60, phi_v0 * 3, 10); + Rumble_Override(0.0f, 60, phi_v0 * 3, 10); } else { if (this->unk_1A4 > 70.0f) { phi_v0 = Rand_ZeroFloat(5.0f) + 10.0f; @@ -3453,7 +3454,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { } D_80917272 = phi_v0; D_809171F4 = phi_v0; - func_8013EC44(0.0f, 180, phi_v0 * 3, 10); + Rumble_Override(0.0f, 180, phi_v0 * 3, 10); } D_80917274 = 0; @@ -3495,11 +3496,11 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { if (D_80917206 == 2) { D_80917272 = 30; D_809171F4 = 100; - func_8013EC44(0.0f, 60, 90, 10); + Rumble_Override(0.0f, 60, 90, 10); } else { D_80917272 = 30; D_809171F4 = 40; - func_8013EC44(0.0f, 180, 90, 10); + Rumble_Override(0.0f, 180, 90, 10); } D_80917274 = 0; @@ -3550,7 +3551,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { temp2 = 255.0f; } - func_8013EC44(0.0f, temp2, 120, 5); + Rumble_Override(0.0f, temp2, 120, 5); D_809171F4 = 40; D_80911E28 = 10; play_sound(NA_SE_IT_FISHING_HIT); @@ -3584,7 +3585,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { spA4 *= 3.0f / 4.0f; } - func_8013EC44(0.0f, spA4, Rand_ZeroFloat(5.0f) + 10.0f, 5); + Rumble_Override(0.0f, spA4, Rand_ZeroFloat(5.0f) + 10.0f, 5); } if (this->unk_172[1] > 30) { @@ -3620,7 +3621,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { } else { phi_a1 = 180; } - func_8013EC44(0.0f, phi_a1, 90, 2); + Rumble_Override(0.0f, phi_a1, 90, 2); this->unk_172[0] = 20; this->unk_172[1] = 100; this->unk_172[2] = 20; @@ -3748,7 +3749,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { } } else { // Assignment of OoT's D_80B7E086 here removed in MM - func_8013EC44(0.0f, 1, 3, 1); + Rumble_Override(0.0f, 1, 3, 1); Audio_QueueSeqCmd(0x100A00FF); } @@ -3771,7 +3772,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { this->unk_150 = 6; this->unk_172[0] = 100; player->unk_B28 = 3; - func_8013EC44(0.0f, 1, 3, 1); + Rumble_Override(0.0f, 1, 3, 1); D_809171D8++; Cutscene_Start(play, &play->csCtx); D_8090CD4C = 100; @@ -4714,7 +4715,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) { case 0: if (gSaveContext.save.playerData.rupees >= 20) { func_801159EC(-20); - if (func_8013EE04() == 0) { + if (!Rumble_ControllerOneHasRumblePak()) { this->actor.textId = 0x407C; } else { this->actor.textId = 0x407D; @@ -5138,7 +5139,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { (fabsf(player->actor.world.pos.z - sSinkingLureLocationPos[sSinkingLureLocation - 1].z) < 25.0f)) { sSinkingLureLocation = 0; D_8090CD4C = 20; - func_8013EC44(0.0f, 150, 10, 10); + Rumble_Override(0.0f, 150, 10, 10); play_sound(NA_SE_SY_TRE_BOX_APPEAR); Audio_QueueSeqCmd(0x101400FF); } @@ -5293,7 +5294,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { sCameraAt.z = camera->at.z; Message_StartTextbox(play, 0x409E, NULL); D_8090CD4C = 11; - func_8013EC44(0.0f, 150, 10, 10); + Rumble_Override(0.0f, 150, 10, 10); // fallthrough case 11: diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index e6ca196c31..21bd48d80a 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -5,6 +5,7 @@ */ #include "z_en_horse.h" +#include "z64rumble.h" #include "objects/object_horse_link_child/object_horse_link_child.h" #define FLAGS (ACTOR_FLAG_10) @@ -1345,7 +1346,7 @@ void EnHorse_MountedTrot(EnHorse* this, PlayState* play) { if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C178(this); - func_8013ECE0(0.0f, 60, 8, 255); + Rumble_Request(0.0f, 60, 8, 255); if (this->actor.speedXZ >= 6.0f) { EnHorse_StartGallopingInterruptable(this); } else if (this->actor.speedXZ < 3.0f) { @@ -1413,7 +1414,7 @@ void EnHorse_MountedGallop(EnHorse* this, PlayState* play) { if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C1C0(this); - func_8013ECE0(0.0f, 120, 8, 255); + Rumble_Request(0.0f, 120, 8, 255); if (EnHorse_PlayerCanMove(this, play) == true) { if ((stickMag >= 10.0f) && (Math_CosS(stickAngle) <= -0.5f)) { EnHorse_StartBraking(this, play); @@ -1441,7 +1442,7 @@ void EnHorse_StartRearing(EnHorse* this) { Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } - func_8013ECE0(0.0f, 180, 20, 100); + Rumble_Request(0.0f, 180, 20, 100); this->stateFlags &= ~ENHORSE_STOPPING_NEIGH_SOUND; } EnHorse_StartMountedIdleResetAnim(this); @@ -1456,7 +1457,7 @@ void EnHorse_StartRearing(EnHorse* this) { } } - func_8013ECE0(0.0f, 180, 20, 100); + Rumble_Request(0.0f, 180, 20, 100); Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); } @@ -1474,7 +1475,7 @@ void EnHorse_MountedRearing(EnHorse* this, PlayState* play) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } - func_8013ECE0(0.0f, 180, 20, 100); + Rumble_Request(0.0f, 180, 20, 100); } } @@ -1515,7 +1516,7 @@ void EnHorse_StartBraking(EnHorse* this, PlayState* play) { Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } - func_8013ECE0(0.0f, 180, 20, 100); + Rumble_Request(0.0f, 180, 20, 100); this->stateFlags &= ~ENHORSE_STOPPING_NEIGH_SOUND; } EnHorse_StartMountedIdleResetAnim(this); @@ -1552,7 +1553,7 @@ void EnHorse_Stopping(EnHorse* this, PlayState* play) { Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } - func_8013ECE0(0.0f, 180, 20, 100); + Rumble_Request(0.0f, 180, 20, 100); this->stateFlags &= ~ENHORSE_STOPPING_NEIGH_SOUND; } else { EnHorse_StartMountedIdleResetAnim(this); @@ -1684,7 +1685,7 @@ void EnHorse_StartLowJump(EnHorse* this, PlayState* play) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } - func_8013ECE0(0.0f, 170, 10, 10); + Rumble_Request(0.0f, 170, 10, 10); } void EnHorse_Stub1(EnHorse* this) { @@ -1743,7 +1744,7 @@ void EnHorse_LowJump(EnHorse* this, PlayState* play) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } - func_8013ECE0(0.0f, 255, 10, 80); + Rumble_Request(0.0f, 255, 10, 80); this->stateFlags &= ~ENHORSE_JUMPING; this->actor.gravity = -3.5f; this->actor.world.pos.y = this->actor.floorHeight; @@ -1782,7 +1783,7 @@ void EnHorse_StartHighJump(EnHorse* this, PlayState* play) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } - func_8013ECE0(0.0f, 170, 10, 10); + Rumble_Request(0.0f, 170, 10, 10); } void EnHorse_Stub2(EnHorse* this) { @@ -1840,7 +1841,7 @@ void EnHorse_HighJump(EnHorse* this, PlayState* play) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } - func_8013ECE0(0.0f, 255, 10, 80); + Rumble_Request(0.0f, 255, 10, 80); this->stateFlags &= ~ENHORSE_JUMPING; this->actor.gravity = -3.5f; this->actor.world.pos.y = this->actor.floorHeight; @@ -2262,7 +2263,7 @@ void func_80881290(EnHorse* this, PlayState* play) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } - func_8013ECE0(0.0f, 170, 10, 10); + Rumble_Request(0.0f, 170, 10, 10); } void func_80881398(EnHorse* this, PlayState* play) { @@ -2302,7 +2303,7 @@ void func_80881398(EnHorse* this, PlayState* play) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } - func_8013ECE0(0.0f, 255, 10, 80); + Rumble_Request(0.0f, 255, 10, 80); this->stateFlags &= ~ENHORSE_JUMPING; this->stateFlags &= ~ENHORSE_FLAG_30; this->actor.gravity = -3.5f; @@ -2484,7 +2485,7 @@ void EnHorse_CsMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* act if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C1C0(this); - func_8013ECE0(0.0f, 120, 8, 255); + Rumble_Request(0.0f, 120, 8, 255); Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], this->actor.speedXZ * 0.3f); } @@ -2519,7 +2520,7 @@ void EnHorse_CsPlayHighJumpAnim(EnHorse* this, PlayState* play) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } - func_8013ECE0(0.0f, 170, 10, 10); + Rumble_Request(0.0f, 170, 10, 10); } void EnHorse_CsJumpInit(EnHorse* this, PlayState* play, CsCmdActorAction* action) { @@ -2569,7 +2570,7 @@ void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorAction* action) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } - func_8013ECE0(0.0f, 255, 10, 80); + Rumble_Request(0.0f, 255, 10, 80); this->stateFlags &= ~ENHORSE_JUMPING; this->actor.gravity = -3.5f; this->actor.velocity.y = 0.0f; @@ -2665,7 +2666,7 @@ void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C1C0(this); - func_8013ECE0(0.0f, 120, 8, 255); + Rumble_Request(0.0f, 120, 8, 255); Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], this->actor.speedXZ * 0.3f); } @@ -2863,7 +2864,7 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } - func_8013ECE0(0.0f, 60, 8, 255); + Rumble_Request(0.0f, 60, 8, 255); } else if (this->animationIdx == ENHORSE_ANIM_GALLOP) { animSpeed = this->actor.speedXZ * 0.2f; if (this->type == HORSE_2) { @@ -2871,7 +2872,7 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } - func_8013ECE0(0.0f, 120, 8, 255); + Rumble_Request(0.0f, 120, 8, 255); } else { animSpeed = 1.0f; } @@ -3980,7 +3981,7 @@ void func_80886C00(EnHorse* this, PlayState* play) { !(this->stateFlags & ENHORSE_BOOST) && !(this->stateFlags & ENHORSE_FLAG_8) && !(this->stateFlags & ENHORSE_FLAG_9)) { if (this->numBoosts > 0) { - func_8013ECE0(0.0f, 180, 20, 100); + Rumble_Request(0.0f, 180, 20, 100); this->stateFlags |= ENHORSE_BOOST; this->stateFlags |= ENHORSE_FIRST_BOOST_REGEN; this->stateFlags |= ENHORSE_FLAG_8; diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 328fa8fe2b..6847c99041 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -5,6 +5,7 @@ */ #include "z_en_ik.h" +#include "z64rumble.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_400) diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index 5bef331c23..b44d1bb29d 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -5,6 +5,7 @@ */ #include "z_en_ishi.h" +#include "z64rumble.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_ishi/object_ishi.h" @@ -598,7 +599,7 @@ void func_8095EBDC(EnIshi* this, PlayState* play) { Quake_SetSpeed(quake, 0x4350); Quake_SetQuakeValues(quake, 3, 0, 0, 0); Quake_SetCountdown(quake, 7); - func_8013ECE0(this->actor.xyzDistToPlayerSq, 255, 20, 150); + Rumble_Request(this->actor.xyzDistToPlayerSq, 255, 20, 150); } Actor_MarkForDeath(&this->actor); diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 82e3999c11..b509cf7899 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -5,6 +5,7 @@ */ #include "z_en_m_thunder.h" +#include "z64rumble.h" #define FLAGS (ACTOR_FLAG_10) diff --git a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c index 49847ef54e..1f92d4f568 100644 --- a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c +++ b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c @@ -5,6 +5,7 @@ */ #include "z_en_pametfrog.h" +#include "z64rumble.h" #include "overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "objects/object_bigslime/object_bigslime.h" @@ -1226,7 +1227,7 @@ void EnPametfrog_SetupSnapperSpawn(EnPametfrog* this, PlayState* play) { Quake_SetSpeed(this->quake, 18000); Quake_SetQuakeValues(this->quake, 2, 0, 0, 0); Quake_SetCountdown(this->quake, 15); - func_8013ECE0(this->actor.xyzDistToPlayerSq, 120, 20, 10); + Rumble_Request(this->actor.xyzDistToPlayerSq, 120, 20, 10); this->timer = 40; this->actionFunc = EnPametfrog_SnapperSpawn; } @@ -1236,7 +1237,7 @@ void EnPametfrog_SnapperSpawn(EnPametfrog* this, PlayState* play) { EnPametfrog_ShakeCamera(this, play, (f32)(this->timer * 7.5f) + 200.0f, ((f32)(this->timer * 2) * (15.0f / 16.0f)) + -20.0f); if (this->timer != 0) { - func_8013ECE0(this->actor.xyzDistToPlayerSq, 120, 20, 10); + Rumble_Request(this->actor.xyzDistToPlayerSq, 120, 20, 10); } else { EnPametfrog_SetupTransitionGekkoSnapper(this, play); } @@ -1249,7 +1250,7 @@ void EnPametfrog_SetupTransitionGekkoSnapper(EnPametfrog* this, PlayState* play) Quake_SetSpeed(this->quake, 20000); Quake_SetQuakeValues(this->quake, 17, 0, 0, 0); Quake_SetCountdown(this->quake, 12); - func_8013ECE0(this->actor.xyzDistToPlayerSq, 255, 20, 150); + Rumble_Request(this->actor.xyzDistToPlayerSq, 255, 20, 150); this->actionFunc = EnPametfrog_TransitionGekkoSnapper; } diff --git a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c index 7da4776d82..b634d3e0ff 100644 --- a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c +++ b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c @@ -5,6 +5,7 @@ */ #include "z_en_railgibud.h" +#include "z64rumble.h" #include "objects/object_rd/object_rd.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_400) @@ -346,7 +347,7 @@ void EnRailgibud_AttemptPlayerFreeze(EnRailgibud* this, PlayState* play) { if (ABS_ALT(yaw) < 0x2008) { player->actor.freezeTimer = 60; - func_8013ECE0(this->actor.xzDistToPlayer, 255, 20, 150); + Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150); func_80123E90(play, &this->actor); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_AIM); EnRailgibud_SetupWalkToPlayer(this); @@ -392,7 +393,7 @@ void EnRailgibud_WalkToPlayer(EnRailgibud* this, PlayState* play) { if (this->playerStunWaitTimer == 0) { player->actor.freezeTimer = 40; this->playerStunWaitTimer = 60; - func_8013ECE0(this->actor.xzDistToPlayer, 255, 20, 150); + Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150); func_80123E90(play, &this->actor); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_AIM); } else { @@ -451,7 +452,7 @@ void EnRailgibud_Grab(EnRailgibud* this, PlayState* play) { damageSfxId = player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S; play->damagePlayer(play, -8); func_800B8E58(player, damageSfxId); - func_8013ECE0(this->actor.xzDistToPlayer, 240, 1, 12); + Rumble_Request(this->actor.xzDistToPlayer, 240, 1, 12); this->grabDamageTimer = 0; } else { this->grabDamageTimer++; diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index 8e8f850049..f7ec893edc 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -23,6 +23,7 @@ */ #include "z_en_rd.h" +#include "z64rumble.h" #include "objects/object_rd/object_rd.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_400) @@ -660,7 +661,7 @@ void EnRd_WalkToPlayer(EnRd* this, PlayState* play) { player->actor.freezeTimer = 40; func_80123E90(play, &this->actor); GET_PLAYER(play)->unk_A78 = &this->actor; - func_8013ECE0(this->actor.xzDistToPlayer, 255, 20, 150); + Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150); } this->playerStunWaitTimer = 60; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_AIM); @@ -829,7 +830,7 @@ void EnRd_Grab(EnRd* this, PlayState* play) { Animation_PlayLoop(&this->skelAnime, &gGibdoRedeadGrabAttackAnim); this->grabState++; play->damagePlayer(play, -8); - func_8013ECE0(this->actor.xzDistToPlayer, 255, 1, 12); + Rumble_Request(this->actor.xzDistToPlayer, 255, 1, 12); this->grabDamageTimer = 20; case EN_RD_GRAB_START: @@ -877,7 +878,7 @@ void EnRd_Grab(EnRd* this, PlayState* play) { this->grabDamageTimer--; if (this->grabDamageTimer == 0) { play->damagePlayer(play, -8); - func_8013ECE0(this->actor.xzDistToPlayer, 240, 1, 12); + Rumble_Request(this->actor.xzDistToPlayer, 240, 1, 12); this->grabDamageTimer = 20; func_800B8E58(player, player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S); } @@ -917,7 +918,7 @@ void EnRd_AttemptPlayerFreeze(EnRd* this, PlayState* play) { if (ABS_ALT(yaw) < 0x2008) { if (!(this->flags & EN_RD_FLAG_CANNOT_FREEZE_PLAYER)) { player->actor.freezeTimer = 60; - func_8013ECE0(this->actor.xzDistToPlayer, 255, 20, 150); + Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150); func_80123E90(play, &this->actor); } Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_AIM); diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 91b48f7d4b..51ea07366c 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -5,6 +5,7 @@ */ #include "z_en_rr.h" +#include "z64rumble.h" #include "objects/object_rr/object_rr.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_400) @@ -628,7 +629,7 @@ void func_808FB088(EnRr* this, PlayState* play) { void func_808FB1C0(EnRr* this, PlayState* play) { Player* player = GET_PLAYER(play); - func_8013ECE0(this->actor.xyzDistToPlayerSq, 120, 2, 120); + Rumble_Request(this->actor.xyzDistToPlayerSq, 120, 2, 120); if (!(this->unk_1E4 & 7)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_EYEGOLE_DEMO_EYE); } diff --git a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c index cc258c6647..042ac0f956 100644 --- a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c +++ b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c @@ -5,6 +5,7 @@ */ #include "z_en_talk_gibud.h" +#include "z64rumble.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_400) @@ -310,7 +311,7 @@ void EnTalkGibud_AttemptPlayerFreeze(EnTalkGibud* this, PlayState* play) { if (ABS_ALT(yaw) < 0x2008) { player->actor.freezeTimer = 60; - func_8013ECE0(this->actor.xzDistToPlayer, 255, 20, 150); + Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150); func_80123E90(play, &this->actor); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_AIM); EnTalkGibud_SetupWalkToPlayer(this); @@ -355,7 +356,7 @@ void EnTalkGibud_WalkToPlayer(EnTalkGibud* this, PlayState* play) { if (this->playerStunWaitTimer == 0) { player->actor.freezeTimer = 40; this->playerStunWaitTimer = 60; - func_8013ECE0(this->actor.xzDistToPlayer, 255, 20, 150); + Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150); func_80123E90(play, &this->actor); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_AIM); } else { @@ -409,7 +410,7 @@ void EnTalkGibud_Grab(EnTalkGibud* this, PlayState* play) { damageSfxId = player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S; play->damagePlayer(play, -8); func_800B8E58(player, damageSfxId); - func_8013ECE0(this->actor.xzDistToPlayer, 240, 1, 12); + Rumble_Request(this->actor.xzDistToPlayer, 240, 1, 12); this->grabDamageTimer = 0; } else { this->grabDamageTimer++; diff --git a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c index 44510220e0..249e7ffde4 100644 --- a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c +++ b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c @@ -5,6 +5,7 @@ */ #include "z_obj_hugebombiwa.h" +#include "z64rumble.h" #include "objects/object_bombiwa/object_bombiwa.h" #define FLAGS (ACTOR_FLAG_10) @@ -298,7 +299,7 @@ void func_80A54980(ObjHugebombiwa* this, PlayState* play, s32 arg2) { Quake_SetSpeed(quake, 0x4E20); Quake_SetQuakeValues(quake, arg2, 0, 0, 0); Quake_SetCountdown(quake, 7); - func_8013ECE0(this->actor.xyzDistToPlayerSq, 255, 20, 150); + Rumble_Request(this->actor.xyzDistToPlayerSq, 255, 20, 150); } s32 func_80A54A0C(ObjHugebombiwa* this) { diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index c527ff4fa8..071828562f 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -5,6 +5,7 @@ */ #include "z_obj_switch.h" +#include "z64rumble.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #define FLAGS (ACTOR_FLAG_10) @@ -563,7 +564,7 @@ void ObjSwitch_FloorSwitchPushDown(ObjSwitch* this, PlayState* play) { this->dyna.actor.scale.y -= 0.0495f; if (this->dyna.actor.scale.y <= this->floorSwitchDownScale) { ObjSwitch_PlayFootSwitchSfx(this); - func_8013ECE0(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); + Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); ObjSwitch_StopCutscene(this); ObjSwitch_FloorSwitchDownInit(this); } @@ -864,7 +865,7 @@ void ObjSwitch_LargeFloorSwitchPushDown(ObjSwitch* this, PlayState* play) { this->dyna.actor.scale.y -= 0.074250005f; if (this->dyna.actor.scale.y <= 33.0f / 2000.0f) { ObjSwitch_PlayFootSwitchSfx(this); - func_8013ECE0(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); + Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); ObjSwitch_StopCutscene(this); ObjSwitch_LargeFloorSwitchDownInit(this); } diff --git a/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c b/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c index ba02b50389..780c31c9a0 100644 --- a/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c +++ b/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c @@ -5,6 +5,7 @@ */ #include "z_obj_tokei_step.h" +#include "z64rumble.h" #include "objects/object_tokei_step/object_tokei_step.h" #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_400000) @@ -66,7 +67,7 @@ void ObjTokeiStep_AddQuake(ObjTokeiStep* this, PlayState* play) { Quake_SetSpeed(quake, 20000); Quake_SetQuakeValues(quake, 1, 0, 0, 0); Quake_SetCountdown(quake, 7); - func_8013ECE0(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); + Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10); } void ObjTokeiStep_SpawnDust(ObjTokeiStep* this, ObjTokeiStepPanel* panel, PlayState* play) { diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index b9d8eed5b2..e8a8728027 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -5,6 +5,7 @@ */ #include "global.h" +#include "z64rumble.h" #define THIS ((Player*)thisx) diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose_80807940.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose_80807940.c index ea1ed9eed0..2e0e9a0d44 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_choose_80807940.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose_80807940.c @@ -5,6 +5,7 @@ */ #include "z_file_choose.h" +#include "z64rumble.h" extern UNK_TYPE D_01002800; extern UNK_TYPE D_01007980; diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c index ad9ca6ccfb..62ea8ef7e1 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c @@ -5,6 +5,7 @@ */ #include "z_file_choose.h" +#include "z64rumble.h" extern UNK_TYPE D_01002800; extern UNK_TYPE D_01007980; diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c b/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c index 6612d97281..c6e3983d8e 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c @@ -5,6 +5,7 @@ */ #include "z_file_choose.h" +#include "z64rumble.h" extern UNK_TYPE D_01002800; extern UNK_TYPE D_01007980; diff --git a/tools/disasm/files.txt b/tools/disasm/files.txt index d8cd09c995..0d01095b1a 100644 --- a/tools/disasm/files.txt +++ b/tools/disasm/files.txt @@ -425,7 +425,7 @@ 0x80138BA0 : "z_skin_matrix", 0x8013A240 : "z_snap", 0x8013A7C0 : "z_sub_s", - 0x8013EC10 : "code_8013EC10", + 0x8013EC10 : "z_rumble", 0x8013EE60 : "z_view", 0x80140260 : "z_vimode", 0x80140E80 : "code_80140E80", @@ -471,7 +471,7 @@ 0x8017FEB0 : "sys_math_atan", 0x80180160 : "sys_matrix", 0x80182C90 : "sys_ucode", - 0x80182CE0 : "", + 0x80182CE0 : "sys_rumble", 0x80183070 : "code_80183070", 0x801830A0 : "c_keyframe", 0x80185660 : "sys_slowly", @@ -581,7 +581,8 @@ 0x801D15D0 : "sys_math_atan", 0x801D1DE0 : "sys_matrix", 0x801D1E60 : "sys_ucode", - 0x801D1E70 : "", + 0x801D1E70 : "sys_rumble", + 0x801D1E80 : "code_801D1E80", 0x801D2E80 : "audio_data", 0x801D5FB0 : "audio_synthesis", 0x801D5FE0 : "audio_load", @@ -638,7 +639,7 @@ 0x801DE5D0 : "z_skin_matrix", 0x801DE5E0 : "z_sub_s", 0x801DE890 : "", - 0x801DF090 : "code_8013EC10", + 0x801DF090 : "z_rumble", 0x801DF0A0 : "z_view", 0x801DF0B0 : "z_vimode", 0x801DF120 : "code_80140E80", @@ -711,7 +712,7 @@ 0x801F5AA0 : "z_scene_proc", 0x801F5AB0 : "z_skelanime", 0x801F5AC0 : "z_skin", - 0x801F69D0 : "code_8013EC10", + 0x801F69D0 : "z_rumble", 0x801F6AE0 : "z_vr_box_draw", 0x801F6AF0 : "z_sram_NES", 0x801F6B00 : "z_message", diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index 8be063ba13..f861588a5f 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -2710,15 +2710,15 @@ 0x8013E7C0:("SubS_ActorAndPlayerFaceEachOther",), 0x8013E8F8:("func_8013E8F8",), 0x8013E950:("SubS_TrackPointStep",), - 0x8013EC10:("func_8013EC10",), - 0x8013EC44:("func_8013EC44",), - 0x8013ECE0:("func_8013ECE0",), - 0x8013ED9C:("func_8013ED9C",), - 0x8013EDD0:("func_8013EDD0",), - 0x8013EE04:("func_8013EE04",), - 0x8013EE24:("func_8013EE24",), - 0x8013EE38:("func_8013EE38",), - 0x8013EE48:("func_8013EE48",), + 0x8013EC10:("Rumble_Update",), + 0x8013EC44:("Rumble_Override",), + 0x8013ECE0:("Rumble_Request",), + 0x8013ED9C:("Rumble_Init",), + 0x8013EDD0:("Rumble_Destroy",), + 0x8013EE04:("Rumble_ControllerOneHasRumblePak",), + 0x8013EE24:("Rumble_StateReset",), + 0x8013EE38:("Rumble_StateWipeRequests",), + 0x8013EE48:("Rumble_SetUpdateEnabled",), 0x8013EE60:("View_ViewportToVp",), 0x8013EEF4:("View_Init",), 0x8013EF9C:("View_SetViewOrientation",), @@ -3179,8 +3179,8 @@ 0x80175364:("func_80175364",), 0x80175434:("func_80175434",), 0x8017544C:("func_8017544C",), - 0x80175474:("func_80175474",), - 0x801754C0:("func_801754C0",), + 0x80175474:("PadMgr_RumbleSet",), + 0x801754C0:("PadMgr_ControllerHasRumblePak",), 0x801754E0:("Padmgr_CalcStickEdges",), 0x801757A4:("Padmgr_ParseState",), 0x801759BC:("func_801759BC",), @@ -3397,9 +3397,9 @@ 0x80182CA0:("SysUcode_GetUCodeBootSize",), 0x80182CBC:("SysUcode_GetUCode",), 0x80182CCC:("SysUcode_GetUCodeData",), - 0x80182CE0:("func_80182CE0",), - 0x80183020:("func_80183020",), - 0x80183058:("func_80183058",), + 0x80182CE0:("RumbleManager_Update",), + 0x80183020:("RumbleManager_Init",), + 0x80183058:("RumbleManager_Destroy",), 0x80183070:("func_80183070",), 0x801830A0:("func_801830A0",), 0x801830C8:("func_801830C8",), diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index 78f9582310..dd3d401ec6 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -2245,7 +2245,8 @@ 0x801D1E20:("gIdentityMtxF","MtxF","",0x40), 0x801D1E60:("initialgspUcodeText","UNK_PTR","",0x4), 0x801D1E64:("initialgspUcodeData","UNK_PTR","",0x4), - 0x801D1E70:("D_801D1E70","UNK_TYPE1","",0x1), + 0x801D1E70:("D_801D1E70","u8","",0x1), + 0x801D1E80:("D_801D1E80","u8","",0x1), 0x801D2E80:("gLowPassFilterData","UNK_TYPE1","",0x1), 0x801D2F80:("gHighPassFilterData","UNK_TYPE1","",0x1), 0x801D3070:("gBandStopFilterData","UNK_TYPE1","",0x1), @@ -4070,11 +4071,7 @@ 0x801F5AB4:("sDisableAnimQueueFlags","UNK_TYPE1","",0x1), 0x801F5AC0:("gSkinLimbMatrices","MtxF","[60]",0xF00), 0x801F69C0:("D_801F69C0","UNK_TYPE1","",0x10), - 0x801F69D0:("D_801F69D0","UNK_TYPE1","",0x1), - 0x801F6A10:("D_801F6A10","UNK_TYPE1","",0x1), - 0x801F6AD4:("D_801F6AD4","UNK_TYPE1","",0x1), - 0x801F6AD5:("D_801F6AD5","UNK_TYPE1","",0x1), - 0x801F6ADA:("D_801F6ADA","UNK_TYPE1","",0x1), + 0x801F69D0:("gRumbleMgr","RumbleManager","",0x10E), 0x801F6AE0:("sSkyboxDrawMatrix","Mtx*","",0x4), 0x801F6AF0:("D_801F6AF0","UNK_TYPE1","",0x1), 0x801F6AF2:("D_801F6AF2","UNK_TYPE1","",0x1), diff --git a/tools/namefixer.py b/tools/namefixer.py index 78711fbdfd..13986658f2 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -458,6 +458,8 @@ wordReplace = { "func_80169E6C": "Play_SetupRespawnPoint", "func_8016A0AC": "Play_IsUnderwater", "func_801690CC": "Play_InCsMode", + "func_8013EC44": "Rumble_Override", + "func_8013ECE0": "Rumble_Request", "func_8017D2FC": "Math3D_LineSegVsPlane", "func_800A81F0": "EffectBlure_AddVertex", "func_800A8514": "EffectBlure_AddSpace", diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index ea5d57b315..e2409088a1 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -2224,15 +2224,15 @@ asm/non_matchings/code/z_sub_s/func_8013E748.s,func_8013E748,0x8013E748,0x1E asm/non_matchings/code/z_sub_s/SubS_ActorAndPlayerFaceEachOther.s,SubS_ActorAndPlayerFaceEachOther,0x8013E7C0,0x4E asm/non_matchings/code/z_sub_s/func_8013E8F8.s,func_8013E8F8,0x8013E8F8,0x16 asm/non_matchings/code/z_sub_s/SubS_TrackPointStep.s,SubS_TrackPointStep,0x8013E950,0xB0 -asm/non_matchings/code/code_8013EC10/func_8013EC10.s,func_8013EC10,0x8013EC10,0xD -asm/non_matchings/code/code_8013EC10/func_8013EC44.s,func_8013EC44,0x8013EC44,0x27 -asm/non_matchings/code/code_8013EC10/func_8013ECE0.s,func_8013ECE0,0x8013ECE0,0x2F -asm/non_matchings/code/code_8013EC10/func_8013ED9C.s,func_8013ED9C,0x8013ED9C,0xD -asm/non_matchings/code/code_8013EC10/func_8013EDD0.s,func_8013EDD0,0x8013EDD0,0xD -asm/non_matchings/code/code_8013EC10/func_8013EE04.s,func_8013EE04,0x8013EE04,0x8 -asm/non_matchings/code/code_8013EC10/func_8013EE24.s,func_8013EE24,0x8013EE24,0x5 -asm/non_matchings/code/code_8013EC10/func_8013EE38.s,func_8013EE38,0x8013EE38,0x4 -asm/non_matchings/code/code_8013EC10/func_8013EE48.s,func_8013EE48,0x8013EE48,0x6 +asm/non_matchings/code/code_8013EC10/Rumble_Update.s,Rumble_Update,0x8013EC10,0xD +asm/non_matchings/code/code_8013EC10/Rumble_Override.s,Rumble_Override,0x8013EC44,0x27 +asm/non_matchings/code/code_8013EC10/Rumble_Request.s,Rumble_Request,0x8013ECE0,0x2F +asm/non_matchings/code/code_8013EC10/Rumble_Init.s,Rumble_Init,0x8013ED9C,0xD +asm/non_matchings/code/code_8013EC10/Rumble_Destroy.s,Rumble_Destroy,0x8013EDD0,0xD +asm/non_matchings/code/code_8013EC10/Rumble_ControllerOneHasRumblePak.s,Rumble_ControllerOneHasRumblePak,0x8013EE04,0x8 +asm/non_matchings/code/code_8013EC10/Rumble_StateReset.s,Rumble_StateReset,0x8013EE24,0x5 +asm/non_matchings/code/code_8013EC10/Rumble_StateWipeRequests.s,Rumble_StateWipeRequests,0x8013EE38,0x4 +asm/non_matchings/code/code_8013EC10/Rumble_SetUpdateEnabled.s,Rumble_SetUpdateEnabled,0x8013EE48,0x6 asm/non_matchings/code/z_view/View_ViewportToVp.s,View_ViewportToVp,0x8013EE60,0x25 asm/non_matchings/code/z_view/View_Init.s,View_Init,0x8013EEF4,0x2A asm/non_matchings/code/z_view/View_SetViewOrientation.s,View_SetViewOrientation,0x8013EF9C,0x2D @@ -2693,8 +2693,8 @@ asm/non_matchings/code/padmgr/func_801750FC.s,func_801750FC,0x801750FC,0x9A asm/non_matchings/code/padmgr/func_80175364.s,func_80175364,0x80175364,0x34 asm/non_matchings/code/padmgr/func_80175434.s,func_80175434,0x80175434,0x6 asm/non_matchings/code/padmgr/func_8017544C.s,func_8017544C,0x8017544C,0xA -asm/non_matchings/code/padmgr/func_80175474.s,func_80175474,0x80175474,0x13 -asm/non_matchings/code/padmgr/func_801754C0.s,func_801754C0,0x801754C0,0x8 +asm/non_matchings/code/padmgr/PadMgr_RumbleSet.s,PadMgr_RumbleSet,0x80175474,0x13 +asm/non_matchings/code/padmgr/PadMgr_ControllerHasRumblePak.s,PadMgr_ControllerHasRumblePak,0x801754C0,0x8 asm/non_matchings/code/padmgr/Padmgr_CalcStickEdges.s,Padmgr_CalcStickEdges,0x801754E0,0xB1 asm/non_matchings/code/padmgr/Padmgr_ParseState.s,Padmgr_ParseState,0x801757A4,0x86 asm/non_matchings/code/padmgr/func_801759BC.s,func_801759BC,0x801759BC,0x49 @@ -2911,9 +2911,9 @@ asm/non_matchings/code/sys_ucode/SysUcode_GetUCodeBoot.s,SysUcode_GetUCodeBoot,0 asm/non_matchings/code/sys_ucode/SysUcode_GetUCodeBootSize.s,SysUcode_GetUCodeBootSize,0x80182CA0,0x7 asm/non_matchings/code/sys_ucode/SysUcode_GetUCode.s,SysUcode_GetUCode,0x80182CBC,0x4 asm/non_matchings/code/sys_ucode/SysUcode_GetUCodeData.s,SysUcode_GetUCodeData,0x80182CCC,0x5 -asm/non_matchings/code/sys_ucode/func_80182CE0.s,func_80182CE0,0x80182CE0,0xD0 -asm/non_matchings/code/sys_ucode/func_80183020.s,func_80183020,0x80183020,0xE -asm/non_matchings/code/sys_ucode/func_80183058.s,func_80183058,0x80183058,0x6 +asm/non_matchings/code/sys_ucode/RumbleManager_Update.s,RumbleManager_Update,0x80182CE0,0xD0 +asm/non_matchings/code/sys_ucode/RumbleManager_Init.s,RumbleManager_Init,0x80183020,0xE +asm/non_matchings/code/sys_ucode/RumbleManager_Destroy.s,RumbleManager_Destroy,0x80183058,0x6 asm/non_matchings/code/code_80183070/func_80183070.s,func_80183070,0x80183070,0xC asm/non_matchings/code/c_keyframe/func_801830A0.s,func_801830A0,0x801830A0,0xA asm/non_matchings/code/c_keyframe/func_801830C8.s,func_801830C8,0x801830C8,0x8