mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-02 00:03:54 -04:00
a6e76c0841
* some wii OS fixes * remove old dol2asm comments * remove dol2asm.h * remove function address comments * normalize ATTRIBUTE_ALIGN usage * DECL_WEAK macro * fix gcc attribute weak macro * wrap more mwcc specific things in ifdefs * fixes * fix revo sdk version flags * fixes
29 lines
833 B
C++
29 lines
833 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);
|
|
if (*handlePtr) {
|
|
if ((*handlePtr)->getID() == id) {
|
|
(*handlePtr)->updateLifeTime(1);
|
|
if (posPtr != NULL) {
|
|
(*handlePtr)->setPos(*posPtr);
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
|
|
bool rt = startSound(id, handlePtr, posPtr);
|
|
if (rt && *handlePtr) {
|
|
(*handlePtr)->setLifeTime(1, false);
|
|
}
|
|
return rt;
|
|
}
|