mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
LUS Cleanup: Clean up hooks system.
This commit is contained in:
parent
8431cddb14
commit
fd379896d6
14 changed files with 26 additions and 59 deletions
|
@ -4,9 +4,7 @@
|
|||
#include <algorithm>
|
||||
#include <filesystem>
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
#include "GlobalCtx2.h"
|
||||
#include "GameSettings.h"
|
||||
#include "ResourceMgr.h"
|
||||
#include "DisplayList.h"
|
||||
#include "PlayerAnimation.h"
|
||||
|
@ -22,11 +20,9 @@
|
|||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
#include <Vertex.h>
|
||||
#include <CollisionHeader.h>
|
||||
#include <Array.h>
|
||||
#include <Cutscene.h>
|
||||
#include <Texture.h>
|
||||
#include "Lib/stb/stb_image.h"
|
||||
#define DRMP3_IMPLEMENTATION
|
||||
#include "Lib/dr_libs/mp3.h"
|
||||
|
@ -40,10 +36,10 @@
|
|||
#include <soh/Enhancements/randomizer/randomizer_item_tracker.h>
|
||||
#include "Enhancements/n64_weird_frame_data.inc"
|
||||
#include "soh/frame_interpolation.h"
|
||||
#include "Utils/BitConverter.h"
|
||||
#include "variables.h"
|
||||
#include "macros.h"
|
||||
#include <Utils/StringHelper.h>
|
||||
#include "Hooks.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <SDL_scancode.h>
|
||||
|
@ -1376,6 +1372,10 @@ extern "C" int Controller_ShouldRumble(size_t i) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void Hooks_ExecuteAudioInit() {
|
||||
Ship::ExecuteHooks<Ship::AudioInit>();
|
||||
}
|
||||
|
||||
extern "C" void* getN64WeirdFrame(s32 i) {
|
||||
char* weirdFrameBytes = reinterpret_cast<char*>(n64WeirdFrames);
|
||||
return &weirdFrameBytes[i + sizeof(n64WeirdFrames)];
|
||||
|
|
|
@ -85,6 +85,7 @@ int AudioPlayer_GetDesiredBuffered(void);
|
|||
void AudioPlayer_Play(const uint8_t* buf, uint32_t len);
|
||||
void AudioMgr_CreateNextAudioBuffer(s16* samples, u32 num_samples);
|
||||
int Controller_ShouldRumble(size_t i);
|
||||
void Hooks_ExecuteAudioInit();
|
||||
void* getN64WeirdFrame(s32 i);
|
||||
Sprite* GetSeedTexture(uint8_t index);
|
||||
void Randomizer_LoadSettings(const char* spoilerFileName);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "Hooks.h"
|
||||
#include <string.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
void func_800C3C80(AudioMgr* audioMgr) {
|
||||
AudioTask* task;
|
||||
|
@ -108,7 +108,7 @@ void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedCon
|
|||
AudioLoad_SetDmaHandler(DmaMgr_DmaHandler);
|
||||
Audio_InitSound();
|
||||
osSendMesgPtr(&audioMgr->unk_C8, NULL, OS_MESG_BLOCK);
|
||||
ModInternal_ExecuteAudioInitHooks();
|
||||
Hooks_ExecuteAudioInit();
|
||||
// Removed due to crash
|
||||
//IrqMgr_AddClient(audioMgr->irqMgr, &irqClient, &audioMgr->unk_74);
|
||||
hasInitialized = true;
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "textures/map_name_static/map_name_static.h"
|
||||
#include "textures/map_48x85_static/map_48x85_static.h"
|
||||
#include "vt.h"
|
||||
#include "Hooks.h"
|
||||
|
||||
#include "soh/frame_interpolation.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue