mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-11 14:38:38 -04:00
copy JStudio_JStage progress from pikmin2
This commit is contained in:
@@ -31,7 +31,7 @@ struct TFactory : public stb::TFactory {
|
||||
class TControl : public stb::TControl {
|
||||
public:
|
||||
struct TTransform_position {
|
||||
Vec mPosition;
|
||||
Vec mPosition;
|
||||
};
|
||||
struct TTransform_position_direction {};
|
||||
struct TTransform_translation_rotation {};
|
||||
|
||||
@@ -140,8 +140,8 @@ public:
|
||||
|
||||
struct TAdaptor {
|
||||
inline TAdaptor(TVariableValue* values, int count)
|
||||
: pValue_(values)
|
||||
, u(count)
|
||||
: mVariableValues(values)
|
||||
, mCount(count)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ struct TAdaptor {
|
||||
|
||||
|
||||
TVariableValue* adaptor_referVariableValue(u32 param_0) {
|
||||
return &pValue_[param_0];
|
||||
return &mVariableValues[param_0];
|
||||
}
|
||||
|
||||
void adaptor_setVariableValue_immediate(u32 param_0, f32 param_1) {
|
||||
@@ -192,11 +192,11 @@ struct TAdaptor {
|
||||
}
|
||||
|
||||
const TVariableValue* adaptor_getVariableValue(u32 param_0) const {
|
||||
return &pValue_[param_0];
|
||||
return &mVariableValues[param_0];
|
||||
}
|
||||
|
||||
/* 0x4 */ TVariableValue* pValue_;
|
||||
/* 0x8 */ u32 u;
|
||||
/* 0x4 */ TVariableValue* mVariableValues;
|
||||
/* 0x8 */ u32 mCount;
|
||||
};
|
||||
|
||||
struct TAdaptor_actor : public TAdaptor {
|
||||
@@ -232,8 +232,8 @@ struct TAdaptor_ambientLight : public TAdaptor {
|
||||
|
||||
/* 0x10 */ TVariableValue mValue[4];
|
||||
|
||||
static u8 const sauVariableValue_3_COLOR_RGB[12];
|
||||
static u8 const sauVariableValue_4_COLOR_RGBA[16];
|
||||
static const u32 sauVariableValue_3_COLOR_RGB[3];
|
||||
static const u32 sauVariableValue_4_COLOR_RGBA[4];
|
||||
};
|
||||
|
||||
struct TObject_ambientLight : public TObject {
|
||||
@@ -277,8 +277,8 @@ struct TAdaptor_fog : public TAdaptor {
|
||||
|
||||
/* 0x10 */ TVariableValue mValue[6];
|
||||
|
||||
static u8 const sauVariableValue_3_COLOR_RGB[12];
|
||||
static u8 const sauVariableValue_4_COLOR_RGBA[16];
|
||||
static const u32 sauVariableValue_3_COLOR_RGB[12];
|
||||
static const u32 sauVariableValue_4_COLOR_RGBA[16];
|
||||
static u8 sauVariableValue_2_RANGE_BEGIN_END[8];
|
||||
};
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ struct TAdaptor_sound : public JStudio::TAdaptor_sound {
|
||||
};
|
||||
|
||||
struct TVVOSetValue_ : public JStudio::TVariableValue::TOutput {
|
||||
TVVOSetValue_(JStudio::TAdaptor_sound::TEVariableValue idx, TVVOSoundSetFunc func) {
|
||||
mValueIndex = idx;
|
||||
mSetFunc = func;
|
||||
}
|
||||
TVVOSetValue_(JStudio::TAdaptor_sound::TEVariableValue idx, TVVOSoundSetFunc func) {
|
||||
mValueIndex = idx;
|
||||
mSetFunc = func;
|
||||
}
|
||||
|
||||
virtual void operator()(f32, JStudio::TAdaptor*) const;
|
||||
virtual ~TVVOSetValue_() {}
|
||||
|
||||
@@ -22,9 +22,33 @@ struct TCreateObject : public JStudio::TCreateObject {
|
||||
/* 0x0C */ const JStage::TSystem* mSystem;
|
||||
};
|
||||
|
||||
template <typename Adaptor, typename Object>
|
||||
struct TVariableValueOutput_object_ : public JStudio::TVariableValue::TOutput {
|
||||
typedef void (Object::*Setter)(f32);
|
||||
typedef f32 (Object::*Getter)() const;
|
||||
|
||||
TVariableValueOutput_object_(int valueIndex, Setter setter, Getter getter)
|
||||
: TOutput()
|
||||
, mValueIndex(valueIndex)
|
||||
, mSetter(setter)
|
||||
, mGetter(getter)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void operator()(f32 value, JStudio::TAdaptor* adaptor) const // _08 (weak)
|
||||
{
|
||||
(static_cast<Object*>(static_cast<Adaptor*>(adaptor)->mObject)->*mSetter)(value);
|
||||
}
|
||||
virtual ~TVariableValueOutput_object_() { } // _0C (weak)
|
||||
|
||||
int mValueIndex; // _04
|
||||
Setter mSetter; // _08
|
||||
Getter mGetter; // _14
|
||||
};
|
||||
|
||||
struct TAdaptor_object_ {
|
||||
void adaptor_data_(JStage::TObject*, void const*, u32, void const*, u32);
|
||||
void adaptor_ENABLE_(JStage::TObject*, JStudio::data::TEOperationData, void const*, u32);
|
||||
static void adaptor_data_(JStage::TObject*, void const*, u32, void const*, u32);
|
||||
static void adaptor_ENABLE_(JStage::TObject*, JStudio::data::TEOperationData, void const*, u32);
|
||||
|
||||
/* 0x0 */ JStudio::TAdaptor* field_0x0;
|
||||
/* 0x4 */ JStage::TSystem* mSystem;
|
||||
@@ -79,7 +103,8 @@ struct TAdaptor_ambientLight : public JStudio::TAdaptor_ambientLight {
|
||||
virtual void adaptor_do_update(const JStudio::TObject*, u32);
|
||||
virtual void adaptor_do_data(const JStudio::TObject*, void const*, u32, void const*, u32);
|
||||
|
||||
/* 0x5C */ u8 field_0x5C[0x64- 0x5C];
|
||||
/* 0x5C */ const JStage::TSystem* mSystem;
|
||||
/* 0x60 */ JStage::TAmbientLight* mLight;
|
||||
}; // Size: 0x64
|
||||
|
||||
struct TAdaptor_camera : public JStudio::TAdaptor_camera {
|
||||
@@ -105,6 +130,8 @@ struct TAdaptor_camera : public JStudio::TAdaptor_camera {
|
||||
}; // Size: 0xF8
|
||||
|
||||
struct TAdaptor_fog : public JStudio::TAdaptor_fog {
|
||||
typedef TVariableValueOutput_object_<TAdaptor_fog, JStage::TFog> TVVOutput;
|
||||
|
||||
TAdaptor_fog(JStage::TSystem const*, JStage::TFog*);
|
||||
virtual ~TAdaptor_fog();
|
||||
virtual void adaptor_do_prepare(const JStudio::TObject*);
|
||||
@@ -113,9 +140,10 @@ struct TAdaptor_fog : public JStudio::TAdaptor_fog {
|
||||
virtual void adaptor_do_update(const JStudio::TObject*, u32);
|
||||
virtual void adaptor_do_data(const JStudio::TObject*, void const*, u32, void const*, u32);
|
||||
|
||||
static u8 saoVVOutput_[96 + 4 /* padding */];
|
||||
static const TVVOutput saoVVOutput_[3];
|
||||
|
||||
/* 0x84 */ u8 field_0x110[0x8C - 0x84];
|
||||
/* 0x84 */ const JStage::TSystem* mSystem;
|
||||
/* 0x88 */ JStage::TFog* mObject;
|
||||
}; // Size: 0x8C
|
||||
|
||||
struct TAdaptor_light : public JStudio::TAdaptor_light {
|
||||
|
||||
Reference in New Issue
Block a user