mirror of
https://github.com/zeldaret/tp
synced 2026-07-07 14:13:27 -04:00
@@ -24,7 +24,7 @@ struct TAdaptor;
|
||||
struct TVariableValue {
|
||||
struct TOutput {
|
||||
virtual void operator()(f32, JStudio::TAdaptor*) const = 0;
|
||||
/* 80285E0C */ ~TOutput();
|
||||
/* 80285E0C */ virtual ~TOutput() = 0;
|
||||
};
|
||||
|
||||
struct TOutput_none_ {
|
||||
@@ -36,8 +36,7 @@ struct TVariableValue {
|
||||
/* 80285EB8 */ static void update_immediate_(JStudio::TVariableValue*, f64);
|
||||
/* 80285ECC */ static void update_time_(JStudio::TVariableValue*, f64);
|
||||
/* 80285F08 */ static void update_functionValue_(JStudio::TVariableValue*, f64);
|
||||
/* 8028B568 */ TVariableValue();
|
||||
//TVariableValue() : field_0x4(0), field_0x8(NULL), pOutput_((TOutput*)soOutput_none_) {}
|
||||
/* 8028B568 */ TVariableValue() : field_0x4(0), field_0x8(NULL), pOutput_((TOutput*)soOutput_none_) {}
|
||||
|
||||
void setValue_immediate(f32 value) {
|
||||
field_0x8 = &update_immediate_;
|
||||
@@ -83,7 +82,7 @@ struct TVariableValue {
|
||||
}
|
||||
}
|
||||
|
||||
void setOutput(TOutput* param_1) {
|
||||
void setOutput(const TOutput* param_1) {
|
||||
pOutput_ = (param_1 != NULL) ? param_1 : (TOutput*)soOutput_none_;
|
||||
}
|
||||
|
||||
@@ -96,7 +95,7 @@ struct TVariableValue {
|
||||
TFunctionValue* fv;
|
||||
f32 val;
|
||||
} field_0xc;
|
||||
/* 0x10 */ TOutput* pOutput_;
|
||||
/* 0x10 */ const TOutput* pOutput_;
|
||||
}; // Size: 0x14
|
||||
|
||||
typedef void (TObject::*paragraphFunc)(u32, void const*, u32);
|
||||
@@ -113,8 +112,9 @@ public:
|
||||
/* 8028680C */ virtual void do_wait(u32);
|
||||
/* 8028682C */ virtual void do_data(void const*, u32, void const*, u32);
|
||||
|
||||
TAdaptor* getAdaptor() { return mpAdaptor; }
|
||||
TControl* getControl() const { return (TControl*)stb::TObject::getControl(); }
|
||||
TAdaptor* getAdaptor() const { return mpAdaptor; }
|
||||
TControl* getControl() { return (TControl*)stb::TObject::getControl(); }
|
||||
const TControl* getControl() const { return (const TControl*)stb::TObject::getControl(); }
|
||||
|
||||
inline void prepareAdaptor();
|
||||
|
||||
@@ -211,7 +211,16 @@ inline void TObject::prepareAdaptor() {
|
||||
}
|
||||
|
||||
struct TAdaptor_actor : public TAdaptor {
|
||||
TAdaptor_actor() : TAdaptor(mValue, 14) {}
|
||||
enum TEVariableValue {
|
||||
TE_VALUE_NONE = -1,
|
||||
TEACTOR_1 = 1,
|
||||
};
|
||||
|
||||
TAdaptor_actor()
|
||||
: TAdaptor(mValue, ARRAY_SIZE(mValue))
|
||||
, mValue()
|
||||
{
|
||||
}
|
||||
/* 802868B0 */ virtual ~TAdaptor_actor() = 0;
|
||||
virtual void adaptor_do_PARENT(JStudio::data::TEOperationData, const void*, u32) = 0;
|
||||
virtual void adaptor_do_PARENT_NODE(JStudio::data::TEOperationData, const void*, u32) = 0;
|
||||
@@ -260,6 +269,13 @@ struct TObject_ambientLight : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_camera : public TAdaptor {
|
||||
enum TEVariableValue {
|
||||
TECAMERA_6 = 6,
|
||||
TECAMERA_7 = 7,
|
||||
TECAMERA_8 = 8,
|
||||
TECAMERA_9 = 9,
|
||||
};
|
||||
|
||||
TAdaptor_camera() : TAdaptor(mValue, 12) {}
|
||||
/* 80286E1C */ virtual ~TAdaptor_camera() = 0;
|
||||
|
||||
@@ -287,6 +303,11 @@ struct TObject_camera : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_fog : public TAdaptor {
|
||||
enum TEVariableValue {
|
||||
TEFOG_4 = 4,
|
||||
TEFOG_5 = 5,
|
||||
};
|
||||
|
||||
TAdaptor_fog() : TAdaptor(mValue, 6) {}
|
||||
/* 8028717C */ virtual ~TAdaptor_fog() = 0;
|
||||
|
||||
@@ -306,6 +327,15 @@ struct TObject_fog : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_light : public TAdaptor {
|
||||
enum TEVariableValue {
|
||||
TE_VALUE_NONE = -1,
|
||||
TE_VALUE_7 = 7,
|
||||
TE_VALUE_8 = 8,
|
||||
TE_VALUE_9 = 9,
|
||||
TE_VALUE_10 = 10,
|
||||
TE_VALUE_11 = 11,
|
||||
};
|
||||
|
||||
TAdaptor_light() : TAdaptor(mValue, 13) {}
|
||||
/* 80287308 */ virtual ~TAdaptor_light() = 0;
|
||||
|
||||
@@ -363,6 +393,15 @@ struct TObject_particle : public TObject {
|
||||
};
|
||||
|
||||
struct TAdaptor_sound : public TAdaptor {
|
||||
enum TEVariableValue {
|
||||
UNK_7 = 7,
|
||||
UNK_8 = 8,
|
||||
UNK_9 = 9,
|
||||
UNK_10 = 10,
|
||||
UNK_11 = 11,
|
||||
UNK_NONE = -1,
|
||||
};
|
||||
|
||||
TAdaptor_sound() : TAdaptor(mValue, 13) {}
|
||||
/* 80287B3C */ virtual ~TAdaptor_sound() = 0;
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
|
||||
/* 0x10 */ JGadget::TLinkListNode ocObject_;
|
||||
|
||||
private:
|
||||
public: // private: // public for the fakematch in JStudio_JStage::TAdaptor_actor::adaptor_do_begin
|
||||
/* 0x14 */ TControl* pControl;
|
||||
/* 0x18 */ u32 signature;
|
||||
/* 0x1C */ u16 mFlag;
|
||||
|
||||
@@ -37,15 +37,6 @@ struct TAdaptor_sound : public JStudio::TAdaptor_sound {
|
||||
typedef void (*TVVOSoundSetFunc)(JAISound*, f32);
|
||||
typedef JStudio::TObject_sound ObjectType;
|
||||
|
||||
enum TEVariableValue {
|
||||
UNK_7 = 7,
|
||||
UNK_8 = 8,
|
||||
UNK_9 = 9,
|
||||
UNK_10 = 10,
|
||||
UNK_11 = 11,
|
||||
UNK_NONE = -1,
|
||||
};
|
||||
|
||||
struct TVVOSetValue_ : public JStudio::TVariableValue::TOutput {
|
||||
TVVOSetValue_(TEVariableValue param_1, TVVOSoundSetFunc param_2)
|
||||
: field_0x04(param_1), field_0x08(param_2) {}
|
||||
|
||||
@@ -10,15 +10,6 @@
|
||||
#include "JSystem/JStudio/JStudio/jstudio-object.h"
|
||||
#include "JSystem/JStudio/JStudio/jstudio-math.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
namespace JStudio_JStage {
|
||||
template<class TAdaptor, class TStageObject>
|
||||
struct TVariableValueOutput_object_;
|
||||
}; // namespace JStudio_JStage
|
||||
#else
|
||||
#include "JSystem/JStudio/JStudio_JStage/tvariable_value_output_object.h"
|
||||
#endif
|
||||
|
||||
namespace JStudio_JStage {
|
||||
typedef JStudio::TObject* (*ObjCreateFuncT)(const JStudio::stb::data::TParse_TBlock_object&, JStage::TObject*, const JStage::TSystem*);
|
||||
|
||||
@@ -50,6 +41,9 @@ struct TAdaptor_object_ {
|
||||
/* 0x4 */ JStage::TObject* pJSGObject_;
|
||||
};
|
||||
|
||||
template<class TAdaptor, class TStageObject>
|
||||
struct TVariableValueOutput_object_;
|
||||
|
||||
struct TAdaptor_actor : public JStudio::TAdaptor_actor, public JStudio_JStage::TAdaptor_object_ {
|
||||
typedef JStudio::TObject_actor ObjectType;
|
||||
typedef TVariableValueOutput_object_<TAdaptor_actor, JStage::TActor> TVVOutputObject;
|
||||
@@ -57,10 +51,6 @@ struct TAdaptor_actor : public JStudio::TAdaptor_actor, public JStudio_JStage::T
|
||||
typedef f32 (JStage::TActor::*Getter)() const;
|
||||
typedef f32 (JStage::TActor::*MaxGetter)() const;
|
||||
|
||||
enum TEVariableValue {
|
||||
TEACTOR_1 = 1,
|
||||
};
|
||||
|
||||
struct TVVOutput_ANIMATION_FRAME_
|
||||
: public JStudio::TVariableValue::TOutput
|
||||
{
|
||||
@@ -81,9 +71,9 @@ struct TAdaptor_actor : public JStudio::TAdaptor_actor, public JStudio_JStage::T
|
||||
}
|
||||
|
||||
/* 8028B064 */ virtual void operator()(f32, JStudio::TAdaptor*) const;
|
||||
/* 8028B138 */ virtual ~TVVOutput_ANIMATION_FRAME_();
|
||||
/* 8028B138 */ inline virtual ~TVVOutput_ANIMATION_FRAME_();
|
||||
|
||||
void adaptor_setOutput_(TAdaptor* adaptor) {
|
||||
void adaptor_setOutput_(TAdaptor* adaptor) const {
|
||||
adaptor->adaptor_referVariableValue(mValueIndex)->setOutput(this);
|
||||
}
|
||||
|
||||
@@ -137,8 +127,8 @@ struct TAdaptor_actor : public JStudio::TAdaptor_actor, public JStudio_JStage::T
|
||||
|
||||
JStage::TActor* get_pJSG_() { return (JStage::TActor*) pJSGObject_; }
|
||||
|
||||
static TVVOutputObject saoVVOutput_[2];
|
||||
static TVVOutput_ANIMATION_FRAME_ saoVVOutput_ANIMATION_FRAME_[3];
|
||||
static const TVVOutputObject saoVVOutput_[];
|
||||
static const TVVOutput_ANIMATION_FRAME_ saoVVOutput_ANIMATION_FRAME_[];
|
||||
|
||||
/* 0x130 */ u32 field_0x130;
|
||||
/* 0x134 */ u32 field_0x134;
|
||||
@@ -168,13 +158,6 @@ struct TAdaptor_camera : public JStudio::TAdaptor_camera, public TAdaptor_object
|
||||
typedef JStudio::TObject_camera ObjectType;
|
||||
typedef TVariableValueOutput_object_<TAdaptor_camera, JStage::TCamera> TVVOutput;
|
||||
|
||||
enum TEVariableValue {
|
||||
TECAMERA_6 = 6,
|
||||
TECAMERA_7 = 7,
|
||||
TECAMERA_8 = 8,
|
||||
TECAMERA_9 = 9,
|
||||
};
|
||||
|
||||
/* 8028B8A0 */ TAdaptor_camera(JStage::TSystem const*, JStage::TCamera*);
|
||||
/* 8028B960 */ virtual ~TAdaptor_camera();
|
||||
/* 8028B9D4 */ virtual void adaptor_do_prepare();
|
||||
@@ -200,7 +183,7 @@ struct TAdaptor_camera : public JStudio::TAdaptor_camera, public TAdaptor_object
|
||||
|
||||
JStage::TCamera* get_pJSG_() { return (JStage::TCamera*)pJSGObject_; }
|
||||
|
||||
static TVVOutput saoVVOutput_[5];
|
||||
static TVVOutput saoVVOutput_[];
|
||||
|
||||
/* 0x108 */ int field_0x108;
|
||||
/* 0x10C */ JStage::TObject* field_0x10c;
|
||||
@@ -213,10 +196,6 @@ struct TAdaptor_camera : public JStudio::TAdaptor_camera, public TAdaptor_object
|
||||
|
||||
struct TAdaptor_fog : public JStudio::TAdaptor_fog, public TAdaptor_object_ {
|
||||
typedef JStudio::TObject_fog ObjectType;
|
||||
enum TEVariableValue {
|
||||
TEFOG_4 = 4,
|
||||
TEFOG_5 = 5,
|
||||
};
|
||||
|
||||
/* 8028C574 */ TAdaptor_fog(JStage::TSystem const*, JStage::TFog*);
|
||||
/* 8028C610 */ virtual ~TAdaptor_fog();
|
||||
@@ -228,20 +207,38 @@ struct TAdaptor_fog : public JStudio::TAdaptor_fog, public TAdaptor_object_ {
|
||||
|
||||
JStage::TFog* get_pJSG_() { return (JStage::TFog*)pJSGObject_; }
|
||||
|
||||
static TVariableValueOutput_object_<TAdaptor_fog, JStage::TFog> saoVVOutput_[3];
|
||||
static TVariableValueOutput_object_<TAdaptor_fog, JStage::TFog> saoVVOutput_[];
|
||||
};
|
||||
|
||||
template<class TAdaptor, class TStageObject>
|
||||
struct TVariableValueOutput_object_ : public JStudio::TVariableValue::TOutput {
|
||||
typedef f32 (TStageObject::*GetFunc)() const;
|
||||
typedef void (TStageObject::*SetFunc)(f32);
|
||||
TVariableValueOutput_object_() : field_0x4(-1), field_0x8(NULL), field_0x14(NULL) {}
|
||||
TVariableValueOutput_object_(typename TAdaptor::TEVariableValue param_1, SetFunc param_2, GetFunc param_3) : field_0x4(param_1), field_0x8(param_2), field_0x14(param_3) {}
|
||||
|
||||
virtual void operator()(f32 param_1, JStudio::TAdaptor* param_2) const {
|
||||
(((TAdaptor*)param_2)->get_pJSG_()->*field_0x8)(param_1);
|
||||
}
|
||||
virtual ~TVariableValueOutput_object_() {}
|
||||
|
||||
bool isEnd_() const { return field_0x4 == -1; }
|
||||
void adaptor_setOutput_(TAdaptor* adaptor) const {
|
||||
adaptor->adaptor_referVariableValue(field_0x4)->setOutput(this);
|
||||
}
|
||||
void setVariableValue_(const TStageObject* pObj, TAdaptor* pAdaptor) const {
|
||||
f32 val = (pObj->*field_0x14)();
|
||||
pAdaptor->adaptor_setVariableValue_immediate(field_0x4, val);
|
||||
}
|
||||
|
||||
int field_0x4;
|
||||
SetFunc field_0x8;
|
||||
GetFunc field_0x14;
|
||||
};
|
||||
|
||||
struct TAdaptor_light : public JStudio::TAdaptor_light, public TAdaptor_object_ {
|
||||
typedef JStudio::TObject_light ObjectType;
|
||||
|
||||
enum TEVariableValue {
|
||||
TE_VALUE_NONE = -1,
|
||||
TE_VALUE_7 = 7,
|
||||
TE_VALUE_8 = 8,
|
||||
TE_VALUE_9 = 9,
|
||||
TE_VALUE_10 = 10,
|
||||
TE_VALUE_11 = 11,
|
||||
};
|
||||
enum TEDirection_ {
|
||||
DIRECTION_0,
|
||||
DIRECTION_1,
|
||||
@@ -315,8 +312,4 @@ inline bool transform_toGlobalFromLocal(JStudio::TControl::TTransform_position*
|
||||
JStage::TObject const*, u32);
|
||||
}; // namespace JStudio_JStage
|
||||
|
||||
#ifdef DEBUG
|
||||
#include "JSystem/JStudio/JStudio_JStage/tvariable_value_output_object.h"
|
||||
#endif
|
||||
|
||||
#endif /* JSTUDIO_JSTAGE_CONTROL_H */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef OBJECT_ACTOR_H
|
||||
#define OBJECT_ACTOR_H
|
||||
|
||||
#include "JSystem/JStudio/JStudio_JStage/control.h"
|
||||
#include "JSystem/JStudio/JStudio_JStage/control.h" // IWYU pragma: export
|
||||
|
||||
#endif /* OBJECT_ACTOR_H */
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#ifndef TVARIABLE_VALUE_OUTPUT_OBJECT_H
|
||||
#define TVARIABLE_VALUE_OUTPUT_OBJECT_H
|
||||
|
||||
#include "JSystem/JStudio/JStudio/jstudio-object.h"
|
||||
|
||||
// Fake header for JStudio_JStage/control.h. Due to compiler version differences, retail needs the
|
||||
// class definition of TVariableValueOutput_object_ to come before it's used, while debug needs it
|
||||
// to come after it's used. The include of this header is ifdefed to support both.
|
||||
|
||||
namespace JStudio_JStage {
|
||||
|
||||
template<class TAdaptor, class TStageObject>
|
||||
struct TVariableValueOutput_object_ : public JStudio::TVariableValue::TOutput {
|
||||
typedef f32 (TStageObject::*GetFunc)() const;
|
||||
typedef void (TStageObject::*SetFunc)(f32);
|
||||
TVariableValueOutput_object_() : field_0x4(-1), field_0x8(NULL), field_0x14(NULL) {}
|
||||
TVariableValueOutput_object_(typename TAdaptor::TEVariableValue param_1,
|
||||
SetFunc param_2, GetFunc param_3) : field_0x4(param_1), field_0x8(param_2), field_0x14(param_3) {
|
||||
|
||||
}
|
||||
|
||||
virtual void operator()(f32 param_1, JStudio::TAdaptor* param_2) const {
|
||||
(((TAdaptor*)param_2)->get_pJSG_()->*field_0x8)(param_1);
|
||||
}
|
||||
virtual ~TVariableValueOutput_object_() {}
|
||||
|
||||
bool isEnd_() const { return field_0x4 == -1; }
|
||||
void adaptor_setOutput_(TAdaptor* adaptor) {
|
||||
adaptor->adaptor_referVariableValue(field_0x4)->setOutput(this);
|
||||
}
|
||||
void setVariableValue_(const TStageObject* pObj, TAdaptor* pAdaptor) const {
|
||||
f32 val = (pObj->*field_0x14)();
|
||||
pAdaptor->adaptor_setVariableValue_immediate(field_0x4, val);
|
||||
}
|
||||
|
||||
int field_0x4;
|
||||
SetFunc field_0x8;
|
||||
GetFunc field_0x14;
|
||||
};
|
||||
|
||||
}; // namespace JStudio_JStage
|
||||
|
||||
#endif /* TVARIABLE_VALUE_OUTPUT_OBJECT_H */
|
||||
@@ -99,6 +99,8 @@ public:
|
||||
/* 80C77C2C */ daTogeRoll_HIO_c();
|
||||
/* 80C798D0 */ ~daTogeRoll_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x00 */ /* vtable */
|
||||
|
||||
/* 0x04 */ s8 field_0x04;
|
||||
|
||||
Reference in New Issue
Block a user