mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(sound): add SI2::StopOrFadeOut
This commit is contained in:
parent
916c23acb2
commit
5b714b0650
@ -992,7 +992,7 @@ void SI2::StartGlueMusic(const char* name) {
|
||||
// Stop playing credits music
|
||||
|
||||
EventUnregister(EVENT_ID_POLL, &SI2::CreditsMusicUpdate);
|
||||
// TODO SI2::Sub4C6390(&s_CreditsMusicObject, 0, 3.0, 1);
|
||||
SI2::StopOrFadeOut(&s_CreditsMusicObject, 0, 3.0f, 1);
|
||||
|
||||
if (!name) {
|
||||
return;
|
||||
@ -1017,3 +1017,19 @@ void SI2::StartGlueMusic(const char* name) {
|
||||
|
||||
EventRegister(EVENT_ID_POLL, &SI2::GlueMusicUpdate);
|
||||
}
|
||||
|
||||
int32_t SI2::StopOrFadeOut(SOUNDKITOBJECT* object, int32_t stop, float fadeOutTime, int32_t a4) {
|
||||
auto userData = static_cast<SI2USERDATA*>(object->m_sound.GetUserData());
|
||||
|
||||
if (userData) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
object->m_sound.StopOrFadeOut(stop, fadeOutTime);
|
||||
|
||||
if (a4) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ class SI2 {
|
||||
static void RegisterUserCVars();
|
||||
static void RegisterScriptFunctions();
|
||||
static void StartGlueMusic(const char* name);
|
||||
static int32_t StopOrFadeOut(SOUNDKITOBJECT* object, int32_t stop, float fadeOutTime, int32_t a4);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user