mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
Removes the strong dependency on a single header file and moves declarations to their respective header file. This allows for making dependencies explicit in cpp files and other headers, and also makes it much easier to track where everything related to a particular component is. This change also creates a few header files that previously didn't exist, making it much nicer for people implementing things, as they won't need to create the header file, it'll just be there ready to go. Ideally functions.h wouldn't even be a thing, as this header adds a lot of preprocessing overhead due to its size, and will continue to grow significantly larger over the lifespan of the project, which can also impact the performance of editors that do dependency lookups and context-aware syntax highlighting.
161 lines
3.1 KiB
C++
161 lines
3.1 KiB
C++
#ifndef __JAISOUND_H__
|
|
#define __JAISOUND_H__
|
|
|
|
#include "global.h"
|
|
|
|
class JAISoundID {
|
|
public:
|
|
operator u32() const { return this->mId; }
|
|
|
|
JAISoundID(u32 pId) : mId(pId) {}
|
|
|
|
JAISoundID(JAISoundID const& other);
|
|
|
|
private:
|
|
u32 mId;
|
|
};
|
|
|
|
struct JAISoundParams {
|
|
float field_0x0;
|
|
float field_0x4;
|
|
float field_0x8;
|
|
float field_0xc;
|
|
float field_0x10;
|
|
float field_0x14;
|
|
float field_0x18;
|
|
float field_0x1c;
|
|
};
|
|
|
|
class JAISoundHandle;
|
|
class JAIAudible;
|
|
class JAIAudience;
|
|
class JAISound {
|
|
public:
|
|
JAISoundID getID() const { return JAISoundID((u32)this->sound_id); }
|
|
|
|
void stop(u32 fadeout);
|
|
void stop();
|
|
|
|
u32 getUserData() const { return user_data; }
|
|
|
|
// TODO: do proper struct later
|
|
void* __vt;
|
|
struct JAISoundHandle* handle;
|
|
struct JAIAudible* audible;
|
|
struct JAIAudience* audience;
|
|
s32 field_0xc;
|
|
s32 num_prepare_steps;
|
|
struct JAISoundID sound_id;
|
|
u8 field_0x18;
|
|
u8 field_0x19;
|
|
u8 field_0x1a;
|
|
u8 field_0x1b;
|
|
u32 user_data;
|
|
float field_0x20;
|
|
float field_0x24;
|
|
float field_0x28;
|
|
s32 field_0x2c;
|
|
s32 audience_priority;
|
|
s32 field_0x34;
|
|
struct JAISoundParams params;
|
|
u8 field_0x58;
|
|
u8 field_0x59;
|
|
u8 field_0x5a;
|
|
u8 field_0x5b;
|
|
u8 field_0x5c;
|
|
u8 field_0x5d;
|
|
u8 field_0x5e;
|
|
u8 field_0x5f;
|
|
u8 field_0x60;
|
|
u8 field_0x61;
|
|
u8 field_0x62;
|
|
u8 field_0x63;
|
|
u8 field_0x64;
|
|
u8 field_0x65;
|
|
u8 field_0x66;
|
|
u8 field_0x67;
|
|
u8 field_0x68;
|
|
u8 field_0x69;
|
|
u8 field_0x6a;
|
|
u8 field_0x6b;
|
|
u8 field_0x6c;
|
|
u8 field_0x6d;
|
|
u8 field_0x6e;
|
|
u8 field_0x6f;
|
|
u8 field_0x70;
|
|
u8 field_0x71;
|
|
u8 field_0x72;
|
|
u8 field_0x73;
|
|
u8 field_0x74;
|
|
u8 field_0x75;
|
|
u8 field_0x76;
|
|
u8 field_0x77;
|
|
u8 field_0x78;
|
|
u8 field_0x79;
|
|
u8 field_0x7a;
|
|
u8 field_0x7b;
|
|
u8 field_0x7c;
|
|
u8 field_0x7d;
|
|
u8 field_0x7e;
|
|
u8 field_0x7f;
|
|
u8 field_0x80;
|
|
u8 field_0x81;
|
|
u8 field_0x82;
|
|
u8 field_0x83;
|
|
u8 field_0x84;
|
|
u8 field_0x85;
|
|
u8 field_0x86;
|
|
u8 field_0x87;
|
|
u8 field_0x88;
|
|
u8 field_0x89;
|
|
u8 field_0x8a;
|
|
u8 field_0x8b;
|
|
u8 field_0x8c;
|
|
u8 field_0x8d;
|
|
u8 field_0x8e;
|
|
u8 field_0x8f;
|
|
u8 field_0x90;
|
|
u8 field_0x91;
|
|
u8 field_0x92;
|
|
u8 field_0x93;
|
|
};
|
|
|
|
class JAISoundHandle {
|
|
public:
|
|
JAISoundHandle(); // noninline in JAUClusterSound.cpp
|
|
~JAISoundHandle();
|
|
|
|
bool isSoundAttached() const { return mSound != NULL; }
|
|
|
|
JAISound* operator->() const {
|
|
JUT_ASSERT(mSound != NULL);
|
|
return mSound;
|
|
}
|
|
|
|
operator bool() const { return isSoundAttached(); }
|
|
|
|
void releaseSound();
|
|
|
|
private:
|
|
JAISound* mSound;
|
|
};
|
|
|
|
extern "C" {
|
|
void __ct__14JAISoundHandleFv(void);
|
|
void releaseSound__14JAISoundHandleFv(void);
|
|
|
|
void JAISoundHandle_NS_dtor(void);
|
|
|
|
void stop__8JAISoundFUl(JAISound*, u32 fadeout);
|
|
void stop__8JAISoundFv(JAISound*);
|
|
|
|
void JAISoundID_NS___as(void);
|
|
void JAISoundID_X1_(void);
|
|
|
|
void JAISound_NS_acceptsNewAudible(void);
|
|
void JAISound_NS_getID(void);
|
|
void JAISound_NS_newAudible(void);
|
|
void JAISound_NS_releaseHandle(void);
|
|
}
|
|
|
|
#endif |