mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-25 23:15:06 -04:00
4df8ccc871
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}
* Update configure.py and project.py for new libs structure
* Refactor `#include <dolphin/x.h>` -> `<x.h>`
* Remove `__REVOLUTION_SDK__` forwards from dolphin
* Fix dolphin/ references in revolution
* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`
* Always build TRK against dolphin headers
* Resolve revolution SDK header resolution issues
30 lines
883 B
C++
30 lines
883 B
C++
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
|
|
|
#include "JSystem/JAudio2/JAISoundStarter.h"
|
|
#include "JSystem/JAudio2/JAISoundHandles.h"
|
|
|
|
JAISoundStarter::JAISoundStarter(bool setInstance) :
|
|
JASGlobalInstance<JAISoundStarter>(setInstance) {}
|
|
|
|
JAISoundStarter::~JAISoundStarter() {}
|
|
|
|
bool JAISoundStarter::startLevelSound(JAISoundID id, JAISoundHandle* handlePtr, const JGeometry::TVec3<f32>* posPtr) {
|
|
JUT_ASSERT(20, handlePtr);
|
|
JAISoundHandle* handlePtr2 = handlePtr;
|
|
if (*handlePtr2) {
|
|
if ((*handlePtr2)->getID() == id) {
|
|
(*handlePtr2)->updateLifeTime(1);
|
|
if (posPtr != NULL) {
|
|
(*handlePtr2)->setPos(*posPtr);
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
|
|
bool rt = startSound(id, handlePtr, posPtr);
|
|
if (rt && *handlePtr2) {
|
|
(*handlePtr2)->setLifeTime(1, false);
|
|
}
|
|
return rt;
|
|
}
|