--check: 938/3256 method bodies compile for x86_64 (28.8%), 32-bit layout asserts hold; boot path 3/626 curated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
2.0 KiB
C++
41 lines
2.0 KiB
C++
#include "classes.h"
|
|
|
|
// 00a9e4f0
|
|
uint8_t KAGE::Sound::Manager::Init()
|
|
{
|
|
char cVar1;
|
|
uint32_t procAddress;
|
|
uint32_t procAddress;
|
|
uint32_t eventType;
|
|
|
|
cVar1 = ManagerOpenAL::Init();
|
|
if (cVar1 == '\0') {
|
|
return 0;
|
|
}
|
|
procAddress = alcGetProcAddress(*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((this->_persistentGameData))) + 0x24)))),
|
|
"alcDevicePauseSOFT");
|
|
*GHIDRA_CAST<uint32_t *>((this->_persistentGameData)._achievements) = procAddress;
|
|
procAddress = alcGetProcAddress(*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((this->_persistentGameData))) + 0x24)))),
|
|
"alcDeviceResumeSOFT");
|
|
procAddress = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((this->_persistentGameData))) + 0x24))));
|
|
*GHIDRA_CAST<uint32_t *>(((this->_persistentGameData)._achievements + 4)) = procAddress;
|
|
procAddress = alcGetProcAddress(procAddress,"alcEventControlSOFT");
|
|
procAddress = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((this->_persistentGameData))) + 0x24))));
|
|
*GHIDRA_CAST<uint32_t *>(((this->_persistentGameData)._achievements + 8)) = procAddress;
|
|
procAddress = alcGetProcAddress(procAddress,"alcEventCallbackSOFT");
|
|
procAddress = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((this->_persistentGameData))) + 0x24))));
|
|
*GHIDRA_CAST<uint32_t *>(((this->_persistentGameData)._achievements + 0xc)) = procAddress;
|
|
procAddress = alcGetProcAddress(procAddress,"alcReopenDeviceSOFT");
|
|
*GHIDRA_CAST<uint32_t *>(((this->_persistentGameData)._achievements + 0x10)) = procAddress;
|
|
LOCK();
|
|
(this->_persistentGameData)._achievements[0x14] = 0;
|
|
UNLOCK();
|
|
cVar1 = alcIsExtensionPresent(0,"ALC_SOFT_system_events");
|
|
if (cVar1 == '\x01') {
|
|
eventType = 0x19d6;
|
|
(**(code **)((this->_persistentGameData)._achievements + 8))(1,&eventType,1);
|
|
(**(code **)((this->_persistentGameData)._achievements + 0xc))(FUN_00a9e890,this);
|
|
}
|
|
return 1;
|
|
}
|