mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-27 06:31:42 -04:00
d_attention / d_demo / d_lib work
This commit is contained in:
@@ -34,6 +34,7 @@ public:
|
||||
u16 getWEvlpMtxNum() const { return mWEvlpMtxNum; }
|
||||
u16 getJointNum() const { return mJointNum; }
|
||||
u16 getDrawMtxNum() const { return mDrawMtxData.mEntryNum; }
|
||||
JUTNameTab* getJointName() const { return mJointName; }
|
||||
J3DJoint* getRootNode() { return mRootNode; }
|
||||
J3DJoint* getJointNodePointer(u16 idx) const { return mJointNodePointer[idx]; }
|
||||
J3DMtxCalc* getBasicMtxCalc() const { return mBasicMtxCalc; }
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
J3DShape* getShapeNodePointer(u16 idx) const { return mShapeTable.getShapeNodePointer(idx); }
|
||||
J3DJoint* getJointNodePointer(u16 idx) const { return mJointTree.getJointNodePointer(idx); }
|
||||
J3DJointTree& getJointTree() { return mJointTree; }
|
||||
JUTNameTab* getJointName() const { return mJointTree.getJointName(); }
|
||||
Mtx& getInvJointMtx(s32 idx) const { return mJointTree.getInvJointMtx(idx); }
|
||||
J3DTexture* getTexture() const { return mMaterialTable.getTexture(); }
|
||||
JUTNameTab* getTextureName() const { return mMaterialTable.getTextureName(); }
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
namespace JStudio {
|
||||
namespace data {
|
||||
struct TEOperationData {};
|
||||
enum TEOperationData {
|
||||
UNK_0x19 = 0x19,
|
||||
};
|
||||
};
|
||||
|
||||
struct TAdaptor;
|
||||
@@ -50,6 +52,26 @@ public:
|
||||
/* 8028680C */ virtual void do_wait(u32);
|
||||
/* 8028682C */ virtual void do_data(void const*, u32, void const*, u32);
|
||||
|
||||
void prepareAdaptor() {
|
||||
if (mpAdaptor != NULL) {
|
||||
// mpAdaptor->adaptor_setObject_(this);
|
||||
// mpAdaptor->adaptor_do_begin();
|
||||
}
|
||||
}
|
||||
|
||||
template<class T>
|
||||
T* createFromAdaptor(const stb::data::TParse_TBlock_object& param_0, T* param_1) {
|
||||
T* n = new T(param_0, param_1);
|
||||
|
||||
if (n == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
n->prepareAdaptor();
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
/* 0x34 */ TAdaptor* mpAdaptor;
|
||||
};
|
||||
|
||||
@@ -86,7 +108,11 @@ struct TAdaptor {
|
||||
/* 80286648 */ void adaptor_setVariableValue_FVR_INDEX_(JStudio::TAdaptor*, JStudio::TControl*,
|
||||
u32, void const*, u32);
|
||||
|
||||
/* 0x4 */ TObject* pObject_;
|
||||
void adaptor_setObject_(const TObject* pObject) {
|
||||
pObject_ = pObject;
|
||||
}
|
||||
|
||||
/* 0x4 */ const TObject* pObject_;
|
||||
/* 0x8 */ TVariableValue* pValue_;
|
||||
/* 0xC */ u32 u;
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ struct TParse_TParagraph_data : public TParseData_aligned<4> {
|
||||
};
|
||||
|
||||
TParse_TParagraph_data(const void* content) : TParseData_aligned<4>(content) {}
|
||||
/* 80289A80 */ void getData(TData*) const;
|
||||
/* 80289A80 */ void getData(TData* pData) const;
|
||||
};
|
||||
|
||||
// Parses a TObject ("demo object")
|
||||
|
||||
@@ -152,6 +152,46 @@ private:
|
||||
/* 0x54 */ s32 _54;
|
||||
};
|
||||
|
||||
template <int T>
|
||||
struct TParseData {
|
||||
TParseData(const void* pContent) {
|
||||
data::TParse_TParagraph_data data(pContent);
|
||||
set(data);
|
||||
}
|
||||
|
||||
void set(const data::TParse_TParagraph_data& data) {
|
||||
//data::TParse_TParagraph_data::TData* p = (data::TParse_TParagraph_data::TData*)this;
|
||||
data.getData(m_data);
|
||||
}
|
||||
|
||||
bool isEnd() const {
|
||||
return m_data->_0 == 0;
|
||||
}
|
||||
|
||||
bool empty() const {
|
||||
return m_data->_c == NULL;
|
||||
}
|
||||
|
||||
bool isValid() const {
|
||||
return !empty() && m_data->_0 == 50;
|
||||
}
|
||||
|
||||
data::TParse_TParagraph_data::TData* m_data;
|
||||
};
|
||||
|
||||
template <int T>
|
||||
struct TParseData_fixed : public TParseData<T> {
|
||||
TParseData_fixed(const void* pContent) : TParseData(pContent) {}
|
||||
|
||||
const void* getNext() const {
|
||||
return m_data->_c;
|
||||
}
|
||||
|
||||
bool isValid() const {
|
||||
return TParseData::isValid() && getNext() != NULL;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace stb
|
||||
} // namespace JStudio
|
||||
|
||||
|
||||
Reference in New Issue
Block a user