[saco] Implement CAudio::StopRadio()

* Implement `CAudio::sub_100A21D0()`
This commit is contained in:
RD42
2024-04-08 22:17:26 +08:00
parent 9315131c61
commit 9ce72dcf79
2 changed files with 39 additions and 7 deletions
+25
View File
@@ -3,6 +3,20 @@
//-----------------------------------------------------------
void CAudio::sub_100A21D0()
{
if(field_0 && field_0 == 1)
{
if(ScriptCommand(&is_wav_loaded, 1))
{
ScriptCommand(&play_wav, 1);
field_0 = 2;
}
}
}
//-----------------------------------------------------------
int CAudio::GetRadioStation()
{
int iRadioStation = 0;
@@ -30,6 +44,17 @@ void CAudio::StartRadio(int iStation)
//-----------------------------------------------------------
void CAudio::StopRadio()
{
_asm push 0
_asm push 0
_asm mov ecx, 0xB6BC90
_asm mov edx, 0x506F70
_asm call edx
}
//-----------------------------------------------------------
float CAudio::GetRadioVolume()
{
return *(float*)0xB5FCC8;
+14 -7
View File
@@ -1,22 +1,29 @@
#pragma once
class CAudio // size: 5
{
public:
int field_0;
char field_4;
//-----------------------------------------------------------
class CAudio
{
private:
int field_0;
bool field_4;
public:
CAudio() {
field_0 = 0;
field_4 = 0;
};
field_4 = false;
}
void sub_100A21D0();
int GetRadioStation();
void StartRadio(int iStation);
void StopRadio();
float GetRadioVolume();
void StopOutdoorAmbienceTrack();
void SetOutdoorAmbienceTrack(int iTrack);
void PlaySound(int iSound, float fX, float fY, float fZ);
bool IsOutdoorAmbienceTrackDisabled();
};
//-----------------------------------------------------------