mirror of
https://github.com/zeldaret/tp
synced 2026-07-11 15:28:38 -04:00
c_m3d, c_request OK. Work on Z2Audience (#1900)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#ifndef J3DUD_H
|
||||
#define J3DUD_H
|
||||
|
||||
#include "MSL_C/math.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace J3DUD {
|
||||
inline f32 JMAAbs(f32 x) {
|
||||
return __fabsf(x);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* J3DUD_H */
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
TInner() : mSeqData(NULL, 0) {}
|
||||
|
||||
/* 0x000 */ JASTrack outputTrack;
|
||||
/* 0x248 */ JASPoolAllocObject<JAISoundChild>* mSoundChild[32];
|
||||
/* 0x248 */ JAISoundChild* mSoundChild[32];
|
||||
/* 0x2C8 */ JAITempoMgr mTempoMgr;
|
||||
/* 0x2D8 */ JASSoundParams mSoundParams;
|
||||
/* 0x2EC */ JAISeqData mSeqData;
|
||||
|
||||
@@ -61,15 +61,15 @@ public:
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class JASPoolAllocObject : public T {
|
||||
class JASPoolAllocObject {
|
||||
public:
|
||||
static void* operator new(size_t n) {
|
||||
JASMemPool<T>* memPool = getMemPool();
|
||||
return memPool->alloc(n);
|
||||
return memPool->alloc(sizeof(T));
|
||||
}
|
||||
static void operator delete(void* ptr, size_t n) {
|
||||
JASMemPool<T>* memPool_ = getMemPool();
|
||||
memPool_->free(ptr, n);
|
||||
memPool_->free(ptr, sizeof(T));
|
||||
}
|
||||
static void newMemPool(int param_0) {
|
||||
JASMemPool<T>* memPool_ = getMemPool();
|
||||
@@ -103,15 +103,15 @@ public:
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class JASPoolAllocObject_MultiThreaded : public T {
|
||||
class JASPoolAllocObject_MultiThreaded {
|
||||
public:
|
||||
static void* operator new(size_t n) {
|
||||
JASMemPool_MultiThreaded<T>* memPool_ = getMemPool();
|
||||
return memPool_->alloc(n);
|
||||
return memPool_->alloc(sizeof(T));
|
||||
}
|
||||
static void operator delete(void* ptr, size_t n) {
|
||||
JASMemPool_MultiThreaded<T>* memPool_ = getMemPool();
|
||||
memPool_->free(ptr, n);
|
||||
memPool_->free(ptr, sizeof(T));
|
||||
}
|
||||
|
||||
static void newMemPool(int n) {
|
||||
|
||||
@@ -46,9 +46,9 @@ inline void setTVec3f(const f32* vec_a, f32* vec_b) {
|
||||
register f32 b_x;
|
||||
|
||||
asm {
|
||||
psq_l a_x, 0(v_a), 0, 0 /* qr0 */
|
||||
psq_l a_x, 0(v_a), 0, 0
|
||||
lfs b_x, 8(v_a)
|
||||
psq_st a_x, 0(v_b), 0, 0 /* qr0 */
|
||||
psq_st a_x, 0(v_b), 0, 0
|
||||
stfs b_x, 8(v_b)
|
||||
};
|
||||
}
|
||||
@@ -165,6 +165,21 @@ struct TVec3<f32> {
|
||||
scale(norm);
|
||||
}
|
||||
|
||||
void normalize(const TVec3<f32>& other) {
|
||||
f32 sq = other.squared();
|
||||
if (sq <= FLT_EPSILON * 32.0f) {
|
||||
zero();
|
||||
return;
|
||||
}
|
||||
f32 norm;
|
||||
if (sq <= 0.0f) {
|
||||
norm = sq;
|
||||
} else {
|
||||
norm = fsqrt_step(sq);
|
||||
}
|
||||
scale(norm, other);
|
||||
}
|
||||
|
||||
f32 length() const {
|
||||
return PSVECMag((Vec*)this);
|
||||
}
|
||||
@@ -184,6 +199,22 @@ struct TVec3<f32> {
|
||||
};
|
||||
}
|
||||
|
||||
void scale(register f32 sc, const TVec3<f32>& other) {
|
||||
register const f32* src = &other.x;
|
||||
register f32 z;
|
||||
register f32 x_y;
|
||||
register f32* dst = &x;
|
||||
register f32 zres;
|
||||
asm {
|
||||
psq_l x_y, 0(src), 0, 0
|
||||
psq_l z, 8(src), 1, 0
|
||||
ps_muls0 x_y, x_y, sc
|
||||
psq_st x_y, 0(dst), 0, 0
|
||||
ps_muls0 zres, z, sc
|
||||
psq_st zres, 8(dst), 1, 0
|
||||
};
|
||||
}
|
||||
|
||||
void negateInternal(TVec3<f32>* dst) {
|
||||
register f32* rdst = &dst->x;
|
||||
const register f32* src = &x;
|
||||
@@ -232,6 +263,25 @@ struct TVec3<f32> {
|
||||
}
|
||||
scale(norm * len);
|
||||
}
|
||||
|
||||
f32 dot(const TVec3<f32>& other) const {
|
||||
register const f32* pThis = &x;
|
||||
register const f32* pOther = &other.x;
|
||||
register f32 otherReg;
|
||||
register f32 thisyz;
|
||||
register f32 res;
|
||||
register f32 thisxy;
|
||||
asm {
|
||||
psq_l thisyz, 4(pThis), 0, 0
|
||||
psq_l otherReg, 4(pOther), 0, 0
|
||||
ps_mul thisyz, thisyz, otherReg
|
||||
psq_l thisxy, 0(pThis), 0, 0
|
||||
psq_l otherReg, 0(pOther), 0, 0
|
||||
ps_madd res, thisxy, otherReg, thisyz
|
||||
ps_sum0 res, res, thisyz, thisyz
|
||||
};
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -272,6 +322,23 @@ struct TVec2 {
|
||||
return (x >= other.x) && (y >= other.y) ? true : false;
|
||||
}
|
||||
|
||||
f32 dot(const TVec2<T>& other) {
|
||||
return x * other.x + y * other.y;
|
||||
}
|
||||
|
||||
f32 squared() {
|
||||
return dot(*this);
|
||||
}
|
||||
|
||||
f32 length() {
|
||||
f32 sqr = squared();
|
||||
if (sqr <= 0.0f) {
|
||||
return sqr;
|
||||
}
|
||||
sqr *= fsqrt_step(sqr);
|
||||
return sqr;
|
||||
}
|
||||
|
||||
T x;
|
||||
T y;
|
||||
};
|
||||
@@ -330,6 +397,19 @@ struct TBox2 : TBox<TVec2<T> > {
|
||||
void set(f32 x0, f32 y0, f32 x1, f32 y1) { i.set(x0, y0); f.set(x1, y1); }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct TUtil {
|
||||
static inline T clamp(T v, T min, T max) {
|
||||
if (v < min) {
|
||||
return min;
|
||||
}
|
||||
if (v > max) {
|
||||
return max;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
} // namespace JGeometry
|
||||
|
||||
@@ -16,6 +16,20 @@ struct TSinCosTable {
|
||||
}
|
||||
return table[(u16)(8192.0f * v) & 0x1fff].first;
|
||||
}
|
||||
|
||||
inline f32 sinDegree(f32 degree) {
|
||||
if (degree < 0.0f) {
|
||||
return -table[(u16)(-22.755556106567383f * degree) & 0x1fffU].first;
|
||||
}
|
||||
return table[(u16)(22.755556106567383f * degree) & 0x1fffU].first;
|
||||
}
|
||||
|
||||
inline f32 cosDegree(f32 degree) {
|
||||
if (degree < 0.0f) {
|
||||
degree = -degree;
|
||||
}
|
||||
return table[(u16)(22.755556106567383f * degree) & 0x1fffU].second;
|
||||
}
|
||||
};
|
||||
|
||||
struct TAtanTable {
|
||||
@@ -52,4 +66,12 @@ inline f32 JMASinLap(f32 v) {
|
||||
return JMath::sincosTable_.sinLap(v);
|
||||
}
|
||||
|
||||
inline f32 JMASinDegree(f32 degree) {
|
||||
return JMath::sincosTable_.sinDegree(degree);
|
||||
}
|
||||
|
||||
inline f32 JMACosDegree(f32 degree) {
|
||||
return JMath::sincosTable_.cosDegree(degree);
|
||||
}
|
||||
|
||||
#endif /* JMATRIGONOMETRIC_H */
|
||||
|
||||
@@ -38,6 +38,29 @@ inline f32 fastReciprocal(f32 value) {
|
||||
return JMAFastReciprocal(value);
|
||||
}
|
||||
|
||||
inline void gekko_ps_copy12(register f32* dst, register const f32* src) {
|
||||
register f32 src0;
|
||||
register f32 src1;
|
||||
register f32 src2;
|
||||
register f32 src3;
|
||||
register f32 src4;
|
||||
register f32 src5;
|
||||
asm {
|
||||
psq_l src0, 0(src), 0, 0
|
||||
psq_l src1, 8(src), 0, 0
|
||||
psq_l src2, 16(src), 0, 0
|
||||
psq_l src3, 24(src), 0, 0
|
||||
psq_l src4, 32(src), 0, 0
|
||||
psq_l src5, 40(src), 0, 0
|
||||
psq_st src0, 0(dst), 0, 0
|
||||
psq_st src1, 8(dst), 0, 0
|
||||
psq_st src2, 16(dst), 0, 0
|
||||
psq_st src3, 24(dst), 0, 0
|
||||
psq_st src4, 32(dst), 0, 0
|
||||
psq_st src5, 40(dst), 0, 0
|
||||
};
|
||||
}
|
||||
|
||||
}; // namespace JMath
|
||||
|
||||
#endif /* JMATH_H */
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef TPOSITION3_H
|
||||
#define TPOSITION3_H
|
||||
|
||||
#include "dolphin/mtx/mtx.h"
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
|
||||
namespace JGeometry {
|
||||
|
||||
template <typename T>
|
||||
struct SMatrix34C {
|
||||
T data[3][4];
|
||||
};
|
||||
|
||||
template <>
|
||||
struct SMatrix34C<f32> {
|
||||
f32 data[3][4];
|
||||
|
||||
void identity() { PSMTXIdentity(data); }
|
||||
|
||||
typedef f32 ArrType[4];
|
||||
void set(const ArrType* src) { JMath::gekko_ps_copy12((f32*)data, (f32*)src); }
|
||||
|
||||
operator ArrType*() { return data; }
|
||||
operator const ArrType*() const { return data; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct TMatrix34 : public T {};
|
||||
|
||||
template <typename T>
|
||||
struct TRotation3 : public T {};
|
||||
|
||||
template <typename T>
|
||||
struct TPosition3 : public T {};
|
||||
|
||||
typedef TPosition3<TRotation3<TMatrix34<SMatrix34C<f32> > > > TPosition3f32;
|
||||
|
||||
} // namespace JGeometry
|
||||
|
||||
#endif
|
||||
@@ -8,6 +8,11 @@ public:
|
||||
f32 mPosX;
|
||||
f32 mPosY;
|
||||
f32 mRadius;
|
||||
|
||||
f32 GetCx() const { return mPosX; }
|
||||
f32 GetCy() const { return mPosY; }
|
||||
f32 GetR() const { return mRadius; }
|
||||
|
||||
cM2dGCir() {}
|
||||
virtual ~cM2dGCir() {}
|
||||
};
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct request_base_class {
|
||||
u8 field_0x0;
|
||||
struct {
|
||||
u8 flag0 : 1;
|
||||
u8 flag1 : 1;
|
||||
u8 flag2 : 6;
|
||||
} field_0x0;
|
||||
u8 field_0x1;
|
||||
u8 field_0x2;
|
||||
u8 field_0x3;
|
||||
@@ -201,8 +205,8 @@ struct request_base_class {
|
||||
};
|
||||
|
||||
int cReq_Is_Done(request_base_class*);
|
||||
int cReq_Done(request_base_class*);
|
||||
int cReq_Command(request_base_class*, u8);
|
||||
int cReq_Create(request_base_class*, u8);
|
||||
void cReq_Done(request_base_class*);
|
||||
void cReq_Command(request_base_class*, u8);
|
||||
void cReq_Create(request_base_class*, u8);
|
||||
|
||||
#endif /* C_REQUEST_H */
|
||||
|
||||
+145
-33
@@ -3,22 +3,72 @@
|
||||
|
||||
#include "JSystem/JAudio2/JAIAudience.h"
|
||||
#include "JSystem/JAudio2/JASGadget.h"
|
||||
#include "JSystem/JAudio2/JAIAudible.h"
|
||||
#include "JSystem/JAudio2/JASSoundParams.h"
|
||||
#include "JSystem/JAudio2/JASHeapCtrl.h"
|
||||
#include "JSystem/TPosition3.hh"
|
||||
#include "dolphin/mtx/mtxvec.h"
|
||||
|
||||
struct Z2Audible;
|
||||
|
||||
struct JAUAudibleParam {
|
||||
f32 getDopplerPower() const {
|
||||
return (u32)((*(u8*)&field_0x0.raw >> 4) & 0xf) * (1.0f / 15.0f);
|
||||
}
|
||||
union {
|
||||
struct {
|
||||
u16 f0;
|
||||
u16 f1;
|
||||
} half;
|
||||
struct {
|
||||
u8 b0_0 : 1;
|
||||
u8 b0_1 : 1;
|
||||
u8 b0_2 : 1;
|
||||
u8 b0_3 : 1;
|
||||
u8 b0_4 : 1;
|
||||
u8 b0_5 : 1;
|
||||
u8 b0_6 : 1;
|
||||
u8 b0_7 : 1;
|
||||
u8 b1;
|
||||
u8 b2;
|
||||
u8 b3;
|
||||
} bytes;
|
||||
u32 raw;
|
||||
} field_0x0;
|
||||
};
|
||||
|
||||
struct Z2AudibleAbsPos {
|
||||
/* 802BBCDC */ void calc(JGeometry::TVec3<f32> const&);
|
||||
/* 802BBD18 */ void init(JGeometry::TVec3<f32>*, JGeometry::TVec3<f32> const&,
|
||||
JGeometry::TVec3<f32> const*);
|
||||
|
||||
/* 0x00 */ JGeometry::TVec3<f32> field_0x0;
|
||||
/* 0x0C */ JGeometry::TVec3<f32> field_0xc;
|
||||
};
|
||||
|
||||
struct Z2AudioCamera {
|
||||
/* 802BC758 */ Z2AudioCamera();
|
||||
/* 802BC788 */ void init();
|
||||
/* 802BC8AC */ void setCameraState(f32 (*)[4], Vec&, Vec&, f32, f32, bool, bool);
|
||||
/* 802BC7DC */ void setCameraState(f32 const (*)[4], Vec&, bool);
|
||||
/* 802BCBEC */ void convertAbsToRel(Z2Audible*, int);
|
||||
/* 802BCC7C */ void convertAbsToRel(Vec&, Vec*) const;
|
||||
/* 802BCCC0 */ void isInSight(Vec&) const;
|
||||
/* 802BCC7C */ bool convertAbsToRel(Vec&, Vec*) const;
|
||||
/* 802BCCC0 */ bool isInSight(Vec&) const;
|
||||
JGeometry::TVec3<f32>* getPos() { return &mPos; }
|
||||
f32 getVolCenterZ() const { return mVolCenterZ; }
|
||||
void setMainCamera() { mSetMainCamera = true; }
|
||||
void setTargetVolume(f32 volume) {
|
||||
if (volume < 0.0f) {
|
||||
volume = 0.0f;
|
||||
}
|
||||
mTargetVolume = volume;
|
||||
}
|
||||
f32 getDolbyCenterZ() const { return mDolbyCenterZ; }
|
||||
f32 getFovySin() const { return mFovySin; }
|
||||
const JGeometry::TVec3<f32>* getVel() const { return &mVel; }
|
||||
|
||||
|
||||
/* 0x00 */ u8 field_0x0[0x30]; // set up JGeometry::TPosition3
|
||||
/* 0x00 */ JGeometry::TPosition3f32 field_0x0;
|
||||
/* 0x30 */ JGeometry::TVec3<f32> mVel;
|
||||
/* 0x3C */ JGeometry::TVec3<f32> mPos;
|
||||
/* 0x48 */ JGeometry::TVec3<f32> field_0x48;
|
||||
@@ -37,17 +87,18 @@ struct Z2SpotMic {
|
||||
/* 802BCDA8 */ void clearMicState(int);
|
||||
/* 802BCDE8 */ void calcVolumeFactor(int);
|
||||
/* 802BCE14 */ void setMicState(Z2AudioCamera*, int);
|
||||
/* 802BCF5C */ void calcMicDist(Z2Audible*);
|
||||
/* 802BCFE4 */ void calcMicPriority(f32);
|
||||
/* 802BD03C */ void calcMicVolume(f32, int, f32);
|
||||
/* 802BCF5C */ f32 calcMicDist(Z2Audible*);
|
||||
/* 802BCFE4 */ u32 calcMicPriority(f32);
|
||||
/* 802BD03C */ f32 calcMicVolume(f32, int, f32);
|
||||
|
||||
void setPosPtr(Vec* i_posPtr) { mPosPtr = i_posPtr; }
|
||||
bool isOn() const { return mMicOn; }
|
||||
|
||||
/* 0x00 */ f32 field_0x0;
|
||||
/* 0x04 */ f32 field_0x4;
|
||||
/* 0x08 */ f32 field_0x8;
|
||||
/* 0x0C */ f32 field_0xc;
|
||||
/* 0x10 */ int field_0x10[1];
|
||||
/* 0x10 */ Z2AudioCamera* field_0x10[1];
|
||||
/* 0x14 */ Vec* mPosPtr;
|
||||
/* 0x18 */ f32 field_0x18[1];
|
||||
/* 0x1C */ f32 field_0x1c;
|
||||
@@ -65,21 +116,39 @@ struct Z2Audience3DSetting {
|
||||
/* 802BC6A4 */ void initDolbyDist();
|
||||
/* 802BC6F8 */ void updateDolbyDist(f32, f32);
|
||||
|
||||
/* 0x000 */ f32 field_0x0;
|
||||
/* 0x004 */ f32 field_0x4;
|
||||
/* 0x008 */ f32 field_0x8;
|
||||
/* 0x00C */ f32 field_0xc;
|
||||
/* 0x010 */ f32 field_0x10;
|
||||
/* 0x014 */ f32 field_0x14;
|
||||
/* 0x018 */ f32 field_0x18;
|
||||
/* 0x01C */ f32 field_0x1c;
|
||||
/* 0x020 */ f32 field_0x20;
|
||||
/* 0x024 */ f32 field_0x24;
|
||||
/* 0x028 */ f32 field_0x28;
|
||||
/* 0x02C */ f32 field_0x2c;
|
||||
/* 0x030 */ f32 field_0x30;
|
||||
/* 0x034 */ f32 field_0x34;
|
||||
/* 0x038 */ f32 field_0x38;
|
||||
void calcVolumeFactorAll() {
|
||||
field_0x0[1] = 1.25f * field_0x0[0];
|
||||
field_0x0[2] = 1.5f * field_0x0[0];
|
||||
field_0x0[3] = 2.0f * field_0x0[0];
|
||||
field_0x0[4] = 3.0f * field_0x0[0];
|
||||
field_0x0[5] = 4.0f * field_0x0[0];
|
||||
field_0x0[6] = 6.0f * field_0x0[0];
|
||||
field_0x0[7] = 8.0f * field_0x0[0];
|
||||
field_0x0[8] = 0.9f * field_0x0[0];
|
||||
field_0x0[9] = 0.8f * field_0x0[0];
|
||||
field_0x0[10] = 0.7f * field_0x0[0];
|
||||
field_0x0[11] = 0.6f * field_0x0[0];
|
||||
field_0x0[12] = 0.5f * field_0x0[0];
|
||||
field_0x0[13] = 0.4f * field_0x0[0];
|
||||
field_0x0[14] = 0.3f * field_0x0[0];
|
||||
for (int i = 0; i < 15; i++) {
|
||||
field_0x70[i] = (field_0x40 - 1.0f) / (field_0x0[i] - field_0x3c);
|
||||
}
|
||||
}
|
||||
|
||||
void calcPriorityFactorAll() {
|
||||
for (int i = 0; i < 15; i++) {
|
||||
field_0xac[i] = field_0x64 / (field_0x0[i] - field_0x3c);
|
||||
}
|
||||
}
|
||||
|
||||
void calcFxMixFactorAll() {
|
||||
for (int i = 0; i < 15; i++) {
|
||||
field_0xe8[i] = (field_0x54 - field_0x50) / (field_0x0[i] - field_0x3c);
|
||||
}
|
||||
}
|
||||
|
||||
/* 0x000 */ f32 field_0x0[15];
|
||||
/* 0x03C */ f32 field_0x3c;
|
||||
/* 0x040 */ f32 field_0x40;
|
||||
/* 0x044 */ f32 field_0x44;
|
||||
@@ -90,7 +159,7 @@ struct Z2Audience3DSetting {
|
||||
/* 0x058 */ f32 field_0x58;
|
||||
/* 0x05C */ f32 field_0x5c;
|
||||
/* 0x060 */ f32 field_0x60;
|
||||
/* 0x064 */ int field_0x64;
|
||||
/* 0x064 */ u32 field_0x64;
|
||||
/* 0x068 */ f32 field_0x68;
|
||||
/* 0x06C */ f32 field_0x6c;
|
||||
/* 0x070 */ f32 field_0x70[15];
|
||||
@@ -100,26 +169,68 @@ struct Z2Audience3DSetting {
|
||||
/* 0x125 */ bool mDolbyDistInit;
|
||||
}; // Size: 0x128
|
||||
|
||||
struct Z2AudibleRelPos {
|
||||
/* 0x00 */ JGeometry::TVec3<f32> field_0x00;
|
||||
/* 0x0C */ f32 field_0xC;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
};
|
||||
|
||||
struct Z2AudibleChannel {
|
||||
/* 802BBE74 */ Z2AudibleChannel();
|
||||
void init() {
|
||||
field_0x0.init();
|
||||
field_0x28 = -1.0f;
|
||||
mPan = 0.5f;
|
||||
mDolby = 0.0f;
|
||||
field_0x34 = 1.0f;
|
||||
}
|
||||
|
||||
/* 0x00 */ JASSoundParams field_0x0;
|
||||
/* 0x14 */ Z2AudibleRelPos field_0x14;
|
||||
/* 0x28 */ f32 field_0x28;
|
||||
/* 0x2c */ f32 mPan;
|
||||
/* 0x30 */ f32 mDolby;
|
||||
/* 0x34 */ f32 field_0x34;
|
||||
};
|
||||
|
||||
struct Z2Audible : public JAIAudible, public JASPoolAllocObject<Z2Audible> {
|
||||
/* 802BBD94 */ Z2Audible(JGeometry::TVec3<f32> const&, JGeometry::TVec3<f32> const*, u32, bool);
|
||||
/* 802BBE98 */ void calc();
|
||||
/* 802BBED0 */ JASSoundParams* getOuterParams(int);
|
||||
/* 802BBEE4 */ void setOuterParams(JASSoundParams const&, JASSoundParams const&, int);
|
||||
/* 802BC204 */ Z2AudibleChannel* getChannel(int);
|
||||
/* 802BC218 */ u32 getDistVolBit();
|
||||
/* 802BD510 */ ~Z2Audible();
|
||||
bool isDoppler() {
|
||||
return ((*(u8*)&field_0x10.field_0x0) >> 4) & 0xf;
|
||||
}
|
||||
JAUAudibleParam* getAudibleParam() { return &field_0x10; }
|
||||
const JAUAudibleParam* getAudibleParam() const { return &field_0x10; }
|
||||
void setAudibleParam(JAUAudibleParam param) { field_0x10 = param; }
|
||||
const JGeometry::TVec3<f32>* getVel() const { return &field_0x14.field_0xc; }
|
||||
|
||||
/* 0x10 */ JAUAudibleParam field_0x10;
|
||||
/* 0x14 */ Z2AudibleAbsPos field_0x14;
|
||||
/* 0x2C */ Z2AudibleChannel field_0x2c[1];
|
||||
/* 0x64 */ f32 field_0x64[1];
|
||||
};
|
||||
|
||||
struct Z2Audience : public JAIAudience, public JASGlobalInstance<Z2Audience> {
|
||||
/* 802BD130 */ Z2Audience();
|
||||
/* 802BD2DC */ void setAudioCamera(f32 (*)[4], Vec&, Vec&, f32, f32, bool, int, bool);
|
||||
/* 802BD704 */ void calcOffMicSound(f32);
|
||||
/* 802BD704 */ f32 calcOffMicSound(f32);
|
||||
/* 802BD90C */ void setTargetVolume(f32, int);
|
||||
/* 802BD92C */ void convertAbsToRel(Vec&, Vec*, int);
|
||||
/* 802BD95C */ void calcRelPosVolume(Vec const&, f32, int);
|
||||
/* 802BDA44 */ void calcRelPosPan(Vec const&, int);
|
||||
/* 802BDB44 */ void calcRelPosDolby(Vec const&, int);
|
||||
/* 802BDBDC */ void calcVolume_(f32, int) const;
|
||||
/* 802BDC44 */ void calcDeltaPriority_(f32, int, bool) const;
|
||||
/* 802BDCB0 */ void calcPitchDoppler_(JGeometry::TVec3<f32> const&,
|
||||
/* 802BD92C */ bool convertAbsToRel(Vec&, Vec*, int);
|
||||
/* 802BD95C */ f32 calcRelPosVolume(Vec const&, f32, int);
|
||||
/* 802BDA44 */ f32 calcRelPosPan(Vec const&, int);
|
||||
/* 802BDB44 */ f32 calcRelPosDolby(Vec const&, int);
|
||||
/* 802BDBDC */ f32 calcVolume_(f32, int) const;
|
||||
/* 802BDC44 */ u32 calcDeltaPriority_(f32, int, bool) const;
|
||||
/* 802BDCB0 */ f32 calcPitchDoppler_(JGeometry::TVec3<f32> const&,
|
||||
JGeometry::TVec3<f32> const&,
|
||||
JGeometry::TVec3<f32> const&, f32) const;
|
||||
/* 802BDD00 */ void calcFxMix_(f32, int) const;
|
||||
/* 802BDD48 */ void calcPitch_(Z2AudibleChannel*, Z2Audible const*, Z2AudioCamera const*) const;
|
||||
/* 802BDD00 */ f32 calcFxMix_(f32, int) const;
|
||||
/* 802BDD48 */ f32 calcPitch_(Z2AudibleChannel*, Z2Audible const*, Z2AudioCamera const*) const;
|
||||
|
||||
/* 802BD1FC */ virtual ~Z2Audience();
|
||||
/* 802BD338 */ virtual JAIAudible* newAudible(JGeometry::TVec3<f32> const&, JAISoundID,
|
||||
@@ -135,6 +246,7 @@ struct Z2Audience : public JAIAudience, public JASGlobalInstance<Z2Audience> {
|
||||
JGeometry::setTVec3f(*(Vec*)mAudioCamera[0].getPos(), *(Vec*)pos);
|
||||
return pos;
|
||||
}
|
||||
Z2Audience3DSetting* getSetting() { return &mSetting; }
|
||||
|
||||
/* 0x004 */ f32 field_0x4;
|
||||
/* 0x008 */ u8 field_0x8;
|
||||
|
||||
@@ -23,7 +23,7 @@ struct JAIStreamDataMgr {
|
||||
|
||||
struct Z2SoundInfo /* : public JAISoundInfo, public JAUSoundInfo, public JAIStreamDataMgr */ : public JASGlobalInstance<Z2SoundInfo> {
|
||||
/* 802BB00C */ void getBgmSeqResourceID(JAISoundID) const;
|
||||
/* 802BB158 */ void getAudibleSwFull(JAISoundID);
|
||||
/* 802BB158 */ u32 getAudibleSwFull(JAISoundID);
|
||||
/* 802BB448 */ void getAudibleSw(JAISoundID) const;
|
||||
/* 802BBA10 */ void getStreamFilePath(JAISoundID);
|
||||
/* 802BBA88 */ void getStreamFileEntry(JAISoundID);
|
||||
@@ -39,4 +39,8 @@ struct Z2SoundInfo /* : public JAISoundInfo, public JAUSoundInfo, public JAIStre
|
||||
/* 802BBBE0 */ virtual ~Z2SoundInfo();
|
||||
};
|
||||
|
||||
inline Z2SoundInfo* Z2GetSoundInfo() {
|
||||
return JASGlobalInstance<Z2SoundInfo>::getInstance();
|
||||
}
|
||||
|
||||
#endif /* Z2SOUNDINFO_H */
|
||||
|
||||
Reference in New Issue
Block a user