mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-09 23:53:02 +00:00
Checkorder tool to keep functions in original binary order (#228)
* First commit of order tool * More flexible match on module name. Bugfix on blank_or_comment * Report inexact offset comments in verbose mode. Bugfix for exact regex * Refactor checkorder into reusable isledecomp module * Find bad comments in one pass, add awareness of TEMPLATE * Refactor of state machine to prepare for reccmp integration * Use isledecomp lib in reccmp * Build isledecomp in GH actions, fix mypy complaint * Ensure unit test cpp files will be ignored by reccmp * Allow multiple offset markers, pep8 cleanup * Remove unused variable * Code style, remove unneeded module and TODO * Final renaming and type hints * Fix checkorder issues, add GH action and enforce (#2) * Fix checkorder issues * Add GH action * Test error case * Works * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -19,24 +19,6 @@ MxMusicManager::~MxMusicManager()
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0b20
|
||||
void MxMusicManager::DeinitializeMIDI()
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
if (m_MIDIInitialized) {
|
||||
m_MIDIInitialized = FALSE;
|
||||
midiStreamStop(m_MIDIStreamH);
|
||||
midiOutUnprepareHeader((HMIDIOUT) m_MIDIStreamH, m_MIDIHdrP, sizeof(MIDIHDR));
|
||||
midiOutSetVolume((HMIDIOUT) m_MIDIStreamH, m_MIDIVolume);
|
||||
midiStreamClose(m_MIDIStreamH);
|
||||
delete m_MIDIHdrP;
|
||||
InitData();
|
||||
}
|
||||
|
||||
m_criticalSection.Leave();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0690
|
||||
void MxMusicManager::Init()
|
||||
{
|
||||
@@ -80,19 +62,6 @@ void MxMusicManager::Destroy(MxBool p_fromDestructor)
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0930
|
||||
void MxMusicManager::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c09a0
|
||||
MxS32 MxMusicManager::CalculateVolume(MxS32 p_volume)
|
||||
{
|
||||
MxS32 result = (p_volume * 0xffff) / 100;
|
||||
return (result << 0x10) | result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c07f0
|
||||
void MxMusicManager::SetMIDIVolume()
|
||||
{
|
||||
@@ -105,15 +74,6 @@ void MxMusicManager::SetMIDIVolume()
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0940
|
||||
void MxMusicManager::SetVolume(MxS32 p_volume)
|
||||
{
|
||||
MxAudioManager::SetVolume(p_volume);
|
||||
m_criticalSection.Enter();
|
||||
SetMIDIVolume();
|
||||
m_criticalSection.Leave();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0840
|
||||
MxResult MxMusicManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
{
|
||||
@@ -144,3 +104,43 @@ done:
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0930
|
||||
void MxMusicManager::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0940
|
||||
void MxMusicManager::SetVolume(MxS32 p_volume)
|
||||
{
|
||||
MxAudioManager::SetVolume(p_volume);
|
||||
m_criticalSection.Enter();
|
||||
SetMIDIVolume();
|
||||
m_criticalSection.Leave();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c09a0
|
||||
MxS32 MxMusicManager::CalculateVolume(MxS32 p_volume)
|
||||
{
|
||||
MxS32 result = (p_volume * 0xffff) / 100;
|
||||
return (result << 0x10) | result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0b20
|
||||
void MxMusicManager::DeinitializeMIDI()
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
if (m_MIDIInitialized) {
|
||||
m_MIDIInitialized = FALSE;
|
||||
midiStreamStop(m_MIDIStreamH);
|
||||
midiOutUnprepareHeader((HMIDIOUT) m_MIDIStreamH, m_MIDIHdrP, sizeof(MIDIHDR));
|
||||
midiOutSetVolume((HMIDIOUT) m_MIDIStreamH, m_MIDIVolume);
|
||||
midiStreamClose(m_MIDIStreamH);
|
||||
delete m_MIDIHdrP;
|
||||
InitData();
|
||||
}
|
||||
|
||||
m_criticalSection.Leave();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user