mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-07 13:23:27 -04:00
Get more JSystem TUs compiling
This commit is contained in:
+3
-3
@@ -628,7 +628,7 @@ config.libs = [
|
||||
JSystemLib(
|
||||
"JStudio_JAudio",
|
||||
[
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio_JAudio/control.cpp"),
|
||||
Object(Matching, "JSystem/JStudio/JStudio_JAudio/control.cpp"),
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio_JAudio/object-sound.cpp"),
|
||||
],
|
||||
),
|
||||
@@ -808,7 +808,7 @@ config.libs = [
|
||||
JSystemLib(
|
||||
"JGadget",
|
||||
[
|
||||
Object(NonMatching, "JSystem/JGadget/binary.cpp"),
|
||||
Object(Matching, "JSystem/JGadget/binary.cpp"),
|
||||
Object(Matching, "JSystem/JGadget/linklist.cpp"),
|
||||
Object(NonMatching, "JSystem/JGadget/std-vector.cpp"),
|
||||
],
|
||||
@@ -1574,7 +1574,7 @@ config.libs = [
|
||||
ActorRel(NonMatching, "d_a_obj_smplbg"),
|
||||
ActorRel(NonMatching, "d_a_obj_tapestry"),
|
||||
ActorRel(NonMatching, "d_a_obj_tntrap"),
|
||||
ActorRel(Matching, "d_a_obj_tower"),
|
||||
ActorRel(Matching, "d_a_obj_tower"),
|
||||
ActorRel(NonMatching, "d_a_obj_trap"),
|
||||
ActorRel(NonMatching, "d_a_obj_tribox"),
|
||||
ActorRel(NonMatching, "d_a_obj_try"),
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef _JSYSTEM_JGADGET_ALLOCATOR_H
|
||||
#define _JSYSTEM_JGADGET_ALLOCATOR_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JGadget {
|
||||
template <typename T>
|
||||
struct TAllocator {
|
||||
static TAllocator get() { }
|
||||
|
||||
inline TAllocator();
|
||||
|
||||
u8 _00; // _00
|
||||
u32 _04; // _04
|
||||
u32 _08; // _08
|
||||
u32 _0C; // _0C
|
||||
};
|
||||
|
||||
typedef TAllocator<void*> TVoidAllocator;
|
||||
}; // namespace JGadget
|
||||
|
||||
#endif
|
||||
@@ -1,65 +1,71 @@
|
||||
#ifndef VECTOR_H
|
||||
#define VECTOR_H
|
||||
#ifndef JGADGET_VECTOR_H
|
||||
#define JGADGET_VECTOR_H
|
||||
|
||||
|
||||
extern u8 data_804511E0;
|
||||
extern u8 lit_569[];
|
||||
#include "JSystem/JGadget/allocator.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JGadget {
|
||||
|
||||
namespace vector {
|
||||
|
||||
u32 extend_default(u32 arg1, u32 arg2, u32 arg3);
|
||||
u32 extend_default(u32, u32, u32);
|
||||
|
||||
typedef u32 (*ExtendFunc)(u32, u32, u32);
|
||||
|
||||
} // namespace vector
|
||||
|
||||
template <typename T>
|
||||
struct TAllocator {
|
||||
static TAllocator get() {}
|
||||
inline TAllocator() { _0 = lit_569[0]; }
|
||||
/* 0x0 */ u8 _0;
|
||||
/* 0x4 */ u32 _4;
|
||||
/* 0x8 */ u32 _8;
|
||||
/* 0xc */ u32 _c;
|
||||
};
|
||||
} // namespace vector
|
||||
|
||||
template <typename T, template <class> class Allocator>
|
||||
struct TVector {
|
||||
TVector(Allocator<T> alloc) {
|
||||
_0 = NULL;
|
||||
pBegin_ = _0;
|
||||
_c = NULL;
|
||||
extend = vector::extend_default;
|
||||
}
|
||||
// struct Destructed_deallocate_ {
|
||||
// ~Destructed_deallocate_(); // unused/inlined
|
||||
// };
|
||||
|
||||
// TVector(u32, const T&, const Allocator<T>&);
|
||||
|
||||
// TVector(Allocator<T> alloc)
|
||||
// {
|
||||
// _00 = alloc._00;
|
||||
// _04 = nullptr;
|
||||
// mBegin = nullptr;
|
||||
// mEnd = nullptr;
|
||||
// mExtend = vector::extend_default;
|
||||
// }
|
||||
|
||||
~TVector();
|
||||
|
||||
void insert(T*, u32, const T&);
|
||||
void Insert_raw(T*, u32);
|
||||
void insert(T*, const T&);
|
||||
void assign(u32, const T&);
|
||||
void resize(u32, const T&);
|
||||
void Resize_raw(u32);
|
||||
void operator=(const TVector<T, Allocator>& rhs);
|
||||
|
||||
inline u32 size() const {
|
||||
if (pBegin_ == NULL) {
|
||||
if (mBegin == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ((int)pEnd_ - (int)pBegin_) / 4;
|
||||
return ((int)mEnd - (int)mBegin) / 4;
|
||||
}
|
||||
|
||||
void **const begin() const { return pBegin_; }
|
||||
void **const end() const { return pEnd_; }
|
||||
void** begin() { return pBegin_; }
|
||||
void** end() { return pEnd_; }
|
||||
// void erase(void** arg1, void** arg2) {}
|
||||
void** begin() { return mBegin; }
|
||||
void** const begin() const { return mBegin; }
|
||||
void** end() { return mEnd; }
|
||||
void** const end() const { return mEnd; }
|
||||
|
||||
void** _0;
|
||||
void** pBegin_;
|
||||
void** pEnd_;
|
||||
u32 _c;
|
||||
vector::ExtendFunc extend;
|
||||
u8 _00;
|
||||
void** mBegin;
|
||||
void** mEnd;
|
||||
void** _0C;
|
||||
vector::ExtendFunc mExtend;
|
||||
};
|
||||
|
||||
struct TVector_pointer_void : TVector<void*, TAllocator> {
|
||||
TVector_pointer_void(JGadget::TAllocator<void*> const&);
|
||||
TVector_pointer_void(const JGadget::TAllocator<void*>&);
|
||||
|
||||
~TVector_pointer_void();
|
||||
void erase(void**, void**);
|
||||
|
||||
void insert(void**, void* const&);
|
||||
void erase(void**, void**);
|
||||
|
||||
void clear() { erase(begin(), end()); }
|
||||
void push_back(const void*& ref) { insert(end(), (void* const&)ref); }
|
||||
@@ -83,4 +89,4 @@ struct TVector_pointer : TVector_pointer_void {
|
||||
|
||||
} // namespace JGadget
|
||||
|
||||
#endif /* VECTOR_H */
|
||||
#endif /* JGADGET_VECTOR_H */
|
||||
|
||||
@@ -204,6 +204,11 @@ struct TAdaptor {
|
||||
};
|
||||
|
||||
struct TAdaptor_actor : public TAdaptor {
|
||||
TAdaptor_actor()
|
||||
: TAdaptor(mValue, ARRAY_SIZE(mValue))
|
||||
, mValue()
|
||||
{
|
||||
}
|
||||
virtual ~TAdaptor_actor() = 0;
|
||||
|
||||
/* 0x10 */ TVariableValue mValue[14];
|
||||
@@ -222,6 +227,11 @@ struct TObject_actor : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_ambientLight : public TAdaptor {
|
||||
TAdaptor_ambientLight()
|
||||
: TAdaptor(mValue, ARRAY_SIZE(mValue))
|
||||
, mValue()
|
||||
{
|
||||
}
|
||||
virtual ~TAdaptor_ambientLight() = 0;
|
||||
|
||||
/* 0x10 */ TVariableValue mValue[4];
|
||||
@@ -239,6 +249,11 @@ struct TObject_ambientLight : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_camera : public TAdaptor {
|
||||
TAdaptor_camera()
|
||||
: TAdaptor(mValue, ARRAY_SIZE(mValue))
|
||||
, mValue()
|
||||
{
|
||||
}
|
||||
virtual ~TAdaptor_camera() = 0;
|
||||
|
||||
/* 0x10 */ TVariableValue mValue[12];
|
||||
@@ -257,6 +272,11 @@ struct TObject_camera : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_fog : public TAdaptor {
|
||||
TAdaptor_fog()
|
||||
: TAdaptor(mValue, ARRAY_SIZE(mValue))
|
||||
, mValue()
|
||||
{
|
||||
}
|
||||
virtual ~TAdaptor_fog() = 0;
|
||||
|
||||
/* 0x10 */ TVariableValue mValue[6];
|
||||
@@ -275,6 +295,11 @@ struct TObject_fog : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_light : public TAdaptor {
|
||||
TAdaptor_light()
|
||||
: TAdaptor(mValue, ARRAY_SIZE(mValue))
|
||||
, mValue()
|
||||
{
|
||||
}
|
||||
virtual ~TAdaptor_light() = 0;
|
||||
|
||||
/* 0x10 */ TVariableValue mValue[13];
|
||||
@@ -295,7 +320,7 @@ struct TObject_light : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_message : public TAdaptor {
|
||||
inline TAdaptor_message()
|
||||
TAdaptor_message()
|
||||
: TAdaptor(NULL, 0)
|
||||
{
|
||||
}
|
||||
@@ -339,9 +364,14 @@ struct TObject_particle : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_sound : public TAdaptor {
|
||||
TAdaptor_sound()
|
||||
: TAdaptor(mValue, ARRAY_SIZE(mValue))
|
||||
, mValue()
|
||||
{
|
||||
}
|
||||
virtual ~TAdaptor_sound() = 0;
|
||||
|
||||
/* 0x10 */ TVariableValue mValue[13];
|
||||
/* 0x10 */ TVariableValue mValue[11];
|
||||
|
||||
static u8 const sauVariableValue_3_POSITION_XYZ[12];
|
||||
}; // Size: 0x114
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
#ifndef JSTUDIO_JAUDIO_CONTROL_H
|
||||
#define JSTUDIO_JAUDIO_CONTROL_H
|
||||
|
||||
#include "dolphin/gx/GX.h"
|
||||
#include "JSystem/JStudio/JStudio/jstudio-object.h"
|
||||
#include "JSystem/JStage/JSGSystem.h"
|
||||
|
||||
struct JAIBasic;
|
||||
struct JAISound;
|
||||
namespace JStudio_JAudio {
|
||||
typedef JStudio::TObject* (*JStudioAudioCreateFunc)(const JStudio::stb::data::TParse_TBlock_object&, JAIBasic*);
|
||||
|
||||
struct TAdaptor_sound : public JStudio::TAdaptor_sound {
|
||||
struct TVVOOn_BEGIN_FADE_IN_ : public JStudio::TVariableValue::TOutput {
|
||||
void operator()(float, JStudio::TAdaptor*) const;
|
||||
};
|
||||
|
||||
struct TVVOOn_END_FADE_OUT_ : public JStudio::TVariableValue::TOutput {
|
||||
void operator()(float, JStudio::TAdaptor*) const;
|
||||
};
|
||||
|
||||
struct TVVOSetValue_ : public JStudio::TVariableValue::TOutput {
|
||||
virtual void operator()(f32, JStudio::TAdaptor*) const; // _08
|
||||
virtual ~TVVOSetValue_(); // _0C (weak)
|
||||
|
||||
// _00 = VTBL
|
||||
int _04; // _04
|
||||
u32 _08; // _08, unknown
|
||||
int _0C; // _0C
|
||||
int _10; // _10
|
||||
};
|
||||
|
||||
static TVVOOn_BEGIN_FADE_IN_ soVVOOn_BEGIN_FADE_IN_;
|
||||
static TVVOOn_END_FADE_OUT_ soVVOOn_END_FADE_OUT_;
|
||||
static TVVOSetValue_ saoVVOSetValue_[];
|
||||
|
||||
TAdaptor_sound(JAIBasic*);
|
||||
|
||||
virtual ~TAdaptor_sound(); // _08
|
||||
virtual void adaptor_do_prepare(const JStudio::TObject*); // _0C
|
||||
virtual void adaptor_do_end(const JStudio::TObject*); // _14
|
||||
virtual void adaptor_do_update(const JStudio::TObject*, u32); // _18
|
||||
virtual void adaptor_do_SOUND(JStudio::data::TEOperationData, const void*, u32); // _20
|
||||
virtual void adaptor_do_BEGIN(JStudio::data::TEOperationData, const void*, u32); // _24
|
||||
virtual void adaptor_do_BEGIN_FADE_IN(JStudio::data::TEOperationData, const void*, u32); // _28
|
||||
virtual void adaptor_do_END(JStudio::data::TEOperationData, const void*, u32); // _2C
|
||||
virtual void adaptor_do_END_FADE_OUT(JStudio::data::TEOperationData, const void*, u32); // _30
|
||||
virtual void adaptor_do_PARENT(JStudio::data::TEOperationData, const void*, u32); // _34
|
||||
virtual void adaptor_do_PARENT_NODE(JStudio::data::TEOperationData, const void*, u32); // _38
|
||||
virtual void adaptor_do_PARENT_ENABLE(JStudio::data::TEOperationData, const void*, u32); // _3C
|
||||
virtual void adaptor_do_LOCATED(JStudio::data::TEOperationData, const void*, u32); // _40
|
||||
|
||||
void beginSound_fadeIn_(u32);
|
||||
void endSound_fadeOut_(u32);
|
||||
|
||||
/* 0x0E8 */ JAIBasic* mpBasic;
|
||||
/* 0x0EC */ JAISound* mpSound;
|
||||
/* 0x0F0 */ u32 _F0;
|
||||
/* 0x0F4 */ int _F4;
|
||||
/* 0x0F8 */ u8 _F8[0x104 - 0x0F8];
|
||||
|
||||
// u32 _E4;
|
||||
// Vec* _E8; // Vector3f* in ghidra, should be Vec* or JGeometry::TVec3* surely
|
||||
// Vec _EC; // same as above
|
||||
// JStage::TSystem* mSystem;
|
||||
// JStage::TObject* _FC;
|
||||
// u32 _100;
|
||||
// u8 _104;
|
||||
}; // Size: 0x104
|
||||
|
||||
struct TCreateObject : public JStudio::TCreateObject {
|
||||
TCreateObject(JAIBasic* jai, const JStage::TSystem* system)
|
||||
{
|
||||
mSound = jai;
|
||||
mSystem = system;
|
||||
}
|
||||
virtual ~TCreateObject(); // _08
|
||||
virtual bool create(JStudio::TObject** newObject, const JStudio::stb::data::TParse_TBlock_object& data); // _0C
|
||||
|
||||
// _00 = VTBL
|
||||
// _00-_0C = JStudio::TCreateObject
|
||||
JAIBasic* mSound; // _04
|
||||
const JStage::TSystem* mSystem; // _08
|
||||
};
|
||||
} // namespace JStudio_JAudio
|
||||
|
||||
#endif /* JSTUDIO_JAUDIO_CONTROL_H */
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef OBJECT_SOUND_H
|
||||
#define OBJECT_SOUND_H
|
||||
|
||||
#include "JSystem/JStudio/JStudio_JAudio/control.h"
|
||||
|
||||
#endif /* OBJECT_SOUND_H */
|
||||
@@ -3,21 +3,67 @@
|
||||
// Translation Unit: binary.cpp
|
||||
//
|
||||
|
||||
#include "binary.h"
|
||||
#include "JSystem/JGadget/binary.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JGadget {
|
||||
namespace binary {
|
||||
|
||||
/* 802BFA48-802BFAAC .text parseVariableUInt_16_32_following__Q27JGadget6binaryFPCvPUlPUlPQ37JGadget6binary5TEBit */
|
||||
void JGadget::binary::parseVariableUInt_16_32_following(const void*, unsigned long*, unsigned long*, JGadget::binary::TEBit*) {
|
||||
/* Nonmatching */
|
||||
const void* parseVariableUInt_16_32_following(const void* buffer, u32* param_1, u32* param_2, TEBit* bit) {
|
||||
JGadget::binary::TEBit temp;
|
||||
if (bit == NULL) {
|
||||
bit = &temp;
|
||||
}
|
||||
u32 uVar1 = *(u16*)buffer;
|
||||
if ((uVar1 & 0x8000) == 0) {
|
||||
bit->value = 0x10;
|
||||
*param_1 = uVar1;
|
||||
*param_2 = *(u16*)((u8*)buffer + 2);
|
||||
return (u8*)buffer + 4;
|
||||
}
|
||||
bit->value = 0x20;
|
||||
uVar1 <<= 16;
|
||||
uVar1 &= 0x7fff0000;
|
||||
uVar1 |= *(u16*)((u8*)buffer + 2);
|
||||
*param_1 = uVar1;
|
||||
*param_2 = *(u32*)((u8*)buffer + 4);
|
||||
return (u8*)buffer + 8;
|
||||
}
|
||||
|
||||
/* 802BFAAC-802BFAF4 .text __dt__Q37JGadget6binary19TParse_header_blockFv */
|
||||
JGadget::binary::TParse_header_block::~TParse_header_block() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
TParse_header_block::~TParse_header_block() {}
|
||||
|
||||
/* 802BFAF4-802BFC00 .text parse_next__Q37JGadget6binary19TParse_header_blockFPPCvUl */
|
||||
void JGadget::binary::TParse_header_block::parse_next(const void**, unsigned long) {
|
||||
/* Nonmatching */
|
||||
bool TParse_header_block::parse_next(const void** ptrLocation, u32 idx) {
|
||||
u32 headerEnd, blockEnd;
|
||||
|
||||
if ((ptrLocation == NULL) || (*ptrLocation == NULL)) {
|
||||
return false;
|
||||
}
|
||||
bool check, checkLastBlock;
|
||||
checkLastBlock = check = false;
|
||||
|
||||
check = checkNext(ptrLocation, &headerEnd, idx);
|
||||
|
||||
checkLastBlock = check;
|
||||
if (!(idx & 1) && (check == false)) {
|
||||
return check;
|
||||
}
|
||||
|
||||
while (headerEnd > 0) {
|
||||
check = false;
|
||||
if (parseBlock_next(ptrLocation, &blockEnd, idx) && checkLastBlock) {
|
||||
check = true;
|
||||
}
|
||||
checkLastBlock = check;
|
||||
if (((idx & 2) == 0) && (check == false)) {
|
||||
return check;
|
||||
}
|
||||
headerEnd--;
|
||||
}
|
||||
return checkLastBlock;
|
||||
}
|
||||
|
||||
} // namespace binary
|
||||
} // namespace JGadget
|
||||
|
||||
@@ -3,46 +3,53 @@
|
||||
// Translation Unit: std-vector.cpp
|
||||
//
|
||||
|
||||
#include "std-vector.h"
|
||||
#include "JSystem/JGadget/vector.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JGadget {
|
||||
|
||||
/* 802BFF14-802BFF1C .text extend_default__Q27JGadget6vectorFUlUlUl */
|
||||
void JGadget::vector::extend_default(unsigned long, unsigned long, unsigned long) {
|
||||
/* Nonmatching */
|
||||
u32 vector::extend_default(u32, u32 param_2, u32) {
|
||||
return param_2 * 2;
|
||||
}
|
||||
|
||||
/* 802BFF1C-802BFF48 .text __ct__Q27JGadget20TVector_pointer_voidFRCQ27JGadget14TAllocator<Pv> */
|
||||
JGadget::TVector_pointer_void::TVector_pointer_void(const JGadget::TAllocator<void*>&) {
|
||||
/* Nonmatching */
|
||||
TVector_pointer_void::TVector_pointer_void(const TAllocator<void*>& allocator) {
|
||||
_00 = allocator._00;
|
||||
mBegin = NULL;
|
||||
mEnd = mBegin;
|
||||
_0C = NULL;
|
||||
mExtend = vector::extend_default;
|
||||
}
|
||||
|
||||
/* 802BFF48-802BFFF0 .text __dt__Q27JGadget20TVector_pointer_voidFv */
|
||||
JGadget::TVector_pointer_void::~TVector_pointer_void() {
|
||||
TVector_pointer_void::~TVector_pointer_void() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 802BFFF0-802C0010 .text insert__Q27JGadget20TVector_pointer_voidFPPvRCPv */
|
||||
void JGadget::TVector_pointer_void::insert(void**, void* const&) {
|
||||
void TVector_pointer_void::insert(void**, void* const&) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 802C0010-802C0068 .text erase__Q27JGadget20TVector_pointer_voidFPPvPPv */
|
||||
void JGadget::TVector_pointer_void::erase(void**, void**) {
|
||||
void TVector_pointer_void::erase(void**, void**) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 802C0068-802C00D8 .text insert__Q27JGadget38TVector<Pv,Q27JGadget14TAllocator<Pv>>FPPvUlRCPv */
|
||||
void JGadget::TVector<void*, JGadget::TAllocator<void*>>::insert(void**, unsigned long, void* const&) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
// /* 802C0068-802C00D8 .text insert__Q27JGadget38TVector<Pv,Q27JGadget14TAllocator<Pv>>FPPvUlRCPv */
|
||||
// void TVector<void*, TAllocator<void*>>::insert(void**, u32, void* const&) {
|
||||
// /* Nonmatching */
|
||||
// }
|
||||
|
||||
/* 802C00D8-802C037C .text Insert_raw__Q27JGadget38TVector<Pv,Q27JGadget14TAllocator<Pv>>FPPvUl */
|
||||
void JGadget::TVector<void*, JGadget::TAllocator<void*>>::Insert_raw(void**, unsigned long) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
// /* 802C00D8-802C037C .text Insert_raw__Q27JGadget38TVector<Pv,Q27JGadget14TAllocator<Pv>>FPPvUl */
|
||||
// void TVector<void*, TAllocator<void*>>::Insert_raw(void**, u32) {
|
||||
// /* Nonmatching */
|
||||
// }
|
||||
|
||||
/* 802C037C-802C03D4 .text insert__Q27JGadget38TVector<Pv,Q27JGadget14TAllocator<Pv>>FPPvRCPv */
|
||||
void JGadget::TVector<void*, JGadget::TAllocator<void*>>::insert(void**, void* const&) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
// /* 802C037C-802C03D4 .text insert__Q27JGadget38TVector<Pv,Q27JGadget14TAllocator<Pv>>FPPvRCPv */
|
||||
// void TVector<void*, TAllocator<void*>>::insert(void**, void* const&) {
|
||||
// /* Nonmatching */
|
||||
// }
|
||||
|
||||
} // namespace JGadget
|
||||
|
||||
@@ -49,7 +49,7 @@ void TObject::prepare(const data::TParse_TBlock& rBlock, TControl* pControl) {
|
||||
} else {
|
||||
JGadget::TVector_pointer<TFunctionValue*>& rCnt = pfvaRefer->refer_referContainer();
|
||||
data::TParse_TParagraph::TData** pBegin =
|
||||
(data::TParse_TParagraph::TData**)rCnt.pBegin_;
|
||||
(data::TParse_TParagraph::TData**)rCnt.mBegin;
|
||||
// todo: these definitely use a different struct
|
||||
for (data::TParse_TParagraph::TData* i = *pBegin; i != NULL; i = *pBegin) {
|
||||
TObject* pObject = pControl->getObject(pContent, i->u32Size);
|
||||
@@ -75,7 +75,7 @@ void TObject::prepare(const data::TParse_TBlock& rBlock, TControl* pControl) {
|
||||
} else {
|
||||
JGadget::TVector_pointer<TFunctionValue*>& rCnt = pfvaRefer->refer_referContainer();
|
||||
data::TParse_TParagraph::TData** pBegin =
|
||||
(data::TParse_TParagraph::TData**)rCnt.pBegin_;
|
||||
(data::TParse_TParagraph::TData**)rCnt.mBegin;
|
||||
for (data::TParse_TParagraph::TData* i = *pBegin; i != NULL; i = *pBegin) {
|
||||
TObject* pObject = pControl->getObject_index(u32Size);
|
||||
if (pObject == NULL) {
|
||||
@@ -198,7 +198,6 @@ TFunctionValue_composite::TData getCompositeData_multiply_(const void* arg1) {
|
||||
|
||||
/* 80273C18-80273C24 .text getCompositeData_divide___Q37JStudio3fvb17@unnamed@fvb_cpp@FPCv */
|
||||
TFunctionValue_composite::TData getCompositeData_divide_(const void* arg1) {
|
||||
/* Nonmatching */
|
||||
return TFunctionValue_composite::TData(*(f32*)arg1);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,17 +3,56 @@
|
||||
// Translation Unit: control.cpp
|
||||
//
|
||||
|
||||
#include "control.h"
|
||||
#include "JSystem/JStudio/JStudio_JAudio/control.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JStudio_JAudio {
|
||||
|
||||
namespace {
|
||||
|
||||
// Fake inline.
|
||||
// TODO: supposed to use JStudio::TObject::createFromAdaptor instead of this somehow
|
||||
inline JStudio::TObject_sound* sound_creator(const JStudio::stb::data::TParse_TBlock_object& data, JStudio_JAudio::TAdaptor_sound* adaptor)
|
||||
{
|
||||
JStudio::TObject_sound* object = new JStudio::TObject_sound(data, adaptor);
|
||||
|
||||
if (!object) {
|
||||
return NULL;
|
||||
}
|
||||
if (object->mpAdaptor) {
|
||||
object->mpAdaptor->adaptor_do_prepare(object);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/* 80278B98-80278C4C .text createObject_SOUND_JAI___Q214JStudio_JAudio21@unnamed@control_cpp@FRCQ47JStudio3stb4data20TParse_TBlock_objectP8JAIBasic */
|
||||
JStudio::TObject* createObject_SOUND_JAI_(const JStudio::stb::data::TParse_TBlock_object& parseBlock, JAIBasic* sound) {
|
||||
TAdaptor_sound* adaptor = new TAdaptor_sound(sound);
|
||||
if (!adaptor) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return sound_creator(parseBlock, adaptor);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
/* 80278C4C-80278CAC .text __dt__Q214JStudio_JAudio13TCreateObjectFv */
|
||||
JStudio_JAudio::TCreateObject::~TCreateObject() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
TCreateObject::~TCreateObject() {}
|
||||
|
||||
/* 80278CAC-80278D20 .text create__Q214JStudio_JAudio13TCreateObjectFPPQ27JStudio7TObjectRCQ47JStudio3stb4data20TParse_TBlock_object */
|
||||
void JStudio_JAudio::TCreateObject::create(JStudio::TObject**, const JStudio::stb::data::TParse_TBlock_object&) {
|
||||
/* Nonmatching */
|
||||
bool TCreateObject::create(JStudio::TObject** object, const JStudio::stb::data::TParse_TBlock_object& data) {
|
||||
JStudioAudioCreateFunc createFunc;
|
||||
switch (data.get()->type) {
|
||||
case 'JSND':
|
||||
createFunc = createObject_SOUND_JAI_;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
*object = createFunc(data, mSound);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace JStudio_JAudio
|
||||
@@ -3,86 +3,77 @@
|
||||
// Translation Unit: object-sound.cpp
|
||||
//
|
||||
|
||||
#include "object-sound.h"
|
||||
#include "JSystem/JStudio/JStudio_JAudio/object-sound.h"
|
||||
#include "JSystem/JAudio/JAISound.h"
|
||||
#include "math.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JStudio_JAudio {
|
||||
|
||||
/* 80278D20-80278DC0 .text __ct__Q214JStudio_JAudio14TAdaptor_soundFP8JAIBasic */
|
||||
JStudio_JAudio::TAdaptor_sound::TAdaptor_sound(JAIBasic*) {
|
||||
/* Nonmatching */
|
||||
TAdaptor_sound::TAdaptor_sound(JAIBasic* basic) {
|
||||
mpBasic = basic;
|
||||
mpSound = NULL;
|
||||
_F0 = -1;
|
||||
_F4 = 0;
|
||||
}
|
||||
|
||||
/* 80278DC0-80278E38 .text __dt__Q214JStudio_JAudio14TAdaptor_soundFv */
|
||||
JStudio_JAudio::TAdaptor_sound::~TAdaptor_sound() {
|
||||
/* Nonmatching */
|
||||
TAdaptor_sound::~TAdaptor_sound() {
|
||||
if (mpSound != NULL) {
|
||||
mpSound->stop(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80278E38-80278F40 .text adaptor_do_prepare__Q214JStudio_JAudio14TAdaptor_soundFPCQ27JStudio7TObject */
|
||||
void JStudio_JAudio::TAdaptor_sound::adaptor_do_prepare(const JStudio::TObject*) {
|
||||
/* Nonmatching */
|
||||
void TAdaptor_sound::adaptor_do_prepare(const JStudio::TObject* param_1) {
|
||||
static TSetVariableValue_immediate aoData[] = {
|
||||
TSetVariableValue_immediate(0, 0.0f),
|
||||
TSetVariableValue_immediate(1, 0.0f),
|
||||
TSetVariableValue_immediate(2, 0.0f),
|
||||
TSetVariableValue_immediate(0xFFFFFFFF, NAN),
|
||||
};
|
||||
adaptor_setVariableValue_immediate(aoData);
|
||||
pValue_[3].setOutput(&TAdaptor_sound::soVVOOn_BEGIN_FADE_IN_);
|
||||
pValue_[4].setOutput(&TAdaptor_sound::soVVOOn_END_FADE_OUT_);
|
||||
|
||||
for (TAdaptor_sound::TVVOSetValue_* value = TAdaptor_sound::saoVVOSetValue_; value->_04 != -1; value++) {
|
||||
pValue_[value->_04].setOutput(value);
|
||||
}
|
||||
}
|
||||
|
||||
TAdaptor_sound::TVVOOn_BEGIN_FADE_IN_ TAdaptor_sound::soVVOOn_BEGIN_FADE_IN_;
|
||||
TAdaptor_sound::TVVOOn_END_FADE_OUT_ TAdaptor_sound::soVVOOn_END_FADE_OUT_;
|
||||
TAdaptor_sound::TVVOSetValue_ TAdaptor_sound::saoVVOSetValue_[6];
|
||||
|
||||
/* 80278F40-80278FB8 .text adaptor_do_update__Q214JStudio_JAudio14TAdaptor_soundFPCQ27JStudio7TObjectUl */
|
||||
void JStudio_JAudio::TAdaptor_sound::adaptor_do_update(const JStudio::TObject*, unsigned long) {
|
||||
void TAdaptor_sound::adaptor_do_update(const JStudio::TObject*, unsigned long) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 80278FB8-80279064 .text adaptor_do_SOUND__Q214JStudio_JAudio14TAdaptor_soundFQ37JStudio4data15TEOperationDataPCvUl */
|
||||
void JStudio_JAudio::TAdaptor_sound::adaptor_do_SOUND(JStudio::data::TEOperationData, const void*, unsigned long) {
|
||||
void TAdaptor_sound::adaptor_do_SOUND(JStudio::data::TEOperationData, const void*, unsigned long) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 80279064-8027908C .text adaptor_do_LOCATED__Q214JStudio_JAudio14TAdaptor_soundFQ37JStudio4data15TEOperationDataPCvUl */
|
||||
void JStudio_JAudio::TAdaptor_sound::adaptor_do_LOCATED(JStudio::data::TEOperationData, const void*, unsigned long) {
|
||||
void TAdaptor_sound::adaptor_do_LOCATED(JStudio::data::TEOperationData, const void*, unsigned long) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 8027908C-8027915C .text __cl__Q314JStudio_JAudio14TAdaptor_sound21TVVOOn_BEGIN_FADE_IN_CFfPQ27JStudio8TAdaptor */
|
||||
void JStudio_JAudio::TAdaptor_sound::TVVOOn_BEGIN_FADE_IN_::operator()(float, JStudio::TAdaptor*) const {
|
||||
void TAdaptor_sound::TVVOOn_BEGIN_FADE_IN_::operator()(float, JStudio::TAdaptor*) const {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 8027915C-8027919C .text __cl__Q314JStudio_JAudio14TAdaptor_sound20TVVOOn_END_FADE_OUT_CFfPQ27JStudio8TAdaptor */
|
||||
void JStudio_JAudio::TAdaptor_sound::TVVOOn_END_FADE_OUT_::operator()(float, JStudio::TAdaptor*) const {
|
||||
void TAdaptor_sound::TVVOOn_END_FADE_OUT_::operator()(float, JStudio::TAdaptor*) const {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 8027919C-802791D8 .text __cl__Q314JStudio_JAudio14TAdaptor_sound13TVVOSetValue_CFfPQ27JStudio8TAdaptor */
|
||||
void JStudio_JAudio::TAdaptor_sound::TVVOSetValue_::operator()(float, JStudio::TAdaptor*) const {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 802791D8-802791FC .text setDemoFxmix__8JAISoundFfUl */
|
||||
void JAISound::setDemoFxmix(float, unsigned long) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 802791FC-80279220 .text setDemoPitch__8JAISoundFfUl */
|
||||
void JAISound::setDemoPitch(float, unsigned long) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 80279220-80279244 .text setDemoPan__8JAISoundFfUl */
|
||||
void JAISound::setDemoPan(float, unsigned long) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 80279244-80279268 .text setDemoVolume__8JAISoundFfUl */
|
||||
void JAISound::setDemoVolume(float, unsigned long) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 80279268-802792C8 .text __dt__Q314JStudio_JAudio14TAdaptor_sound13TVVOSetValue_Fv */
|
||||
JStudio_JAudio::TAdaptor_sound::TVVOSetValue_::~TVVOSetValue_() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 802792C8-80279328 .text __dt__Q314JStudio_JAudio14TAdaptor_sound20TVVOOn_END_FADE_OUT_Fv */
|
||||
JStudio_JAudio::TAdaptor_sound::TVVOOn_END_FADE_OUT_::~TVVOOn_END_FADE_OUT_() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 80279328-80279388 .text __dt__Q314JStudio_JAudio14TAdaptor_sound21TVVOOn_BEGIN_FADE_IN_Fv */
|
||||
JStudio_JAudio::TAdaptor_sound::TVVOOn_BEGIN_FADE_IN_::~TVVOOn_BEGIN_FADE_IN_() {
|
||||
void TAdaptor_sound::TVVOSetValue_::operator()(float, JStudio::TAdaptor*) const {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
}; // namespace JStudio_JAudio
|
||||
|
||||
@@ -119,7 +119,6 @@ int daIkari_c::_create() {
|
||||
if (!fopAcM_entrySolidHeap(this, createHeap_CB, 0xC20)) {
|
||||
return cPhs_ERROR_e;
|
||||
} else {
|
||||
/* 00000524 00000618 4B FF FB E9 bl setMtx__9daIkari_cFv */
|
||||
setMtx();
|
||||
|
||||
f32 mScaleX = mScale.x;
|
||||
|
||||
Reference in New Issue
Block a user