summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCarco_21 <144170194+carter-ktb21@users.noreply.github.com>2025-07-10 19:16:30 -0400
committerGitHub <noreply@github.com>2025-07-11 02:16:30 +0300
commitb67414ef1a5f084b6d3fc08b066e5d1cabc3cb2a (patch)
tree80474d17ac06c8eb3884e60136d393d29a6ee334 /include
parent3de6b37edf0ddf48eff336f66130f4379460e3d4 (diff)
d_a_demo00 work (#2525)
* Initial work * Got to ke_control * draw function * tiny execute work * all functions worked on * PR cleanup * Took out static keyword for dDemo_setDemoData
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DJoint.h2
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DModel.h1
-rw-r--r--include/JSystem/J3DGraphBase/J3DMatBlock.h2
-rw-r--r--include/d/actor/d_a_demo00.h115
-rw-r--r--include/d/d_demo.h6
-rw-r--r--include/m_Do/m_Do_ext.h4
6 files changed, 121 insertions, 9 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h
index cd759add7f..d5854e996f 100644
--- a/include/JSystem/J3DGraphAnimator/J3DJoint.h
+++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h
@@ -70,6 +70,8 @@ public:
static J3DMtxCalc* mCurrentMtxCalc;
+ inline u8 getKind() { return mKind & 15; }
+
private:
friend struct J3DJointFactory;
friend class J3DJointTree;
diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h
index eca87c8127..9e412af352 100644
--- a/include/JSystem/J3DGraphAnimator/J3DModel.h
+++ b/include/JSystem/J3DGraphAnimator/J3DModel.h
@@ -100,6 +100,7 @@ public:
Vec* getBaseScale() { return &mBaseScale; }
void setAnmMtx(int jointNo, Mtx m) { mMtxBuffer->setAnmMtx(jointNo, m); }
MtxP getAnmMtx(int jointNo) { return mMtxBuffer->getAnmMtx(jointNo); }
+ J3DSkinDeform* getSkinDeform() { return mSkinDeform; }
/* 0x04 */ J3DModelData* mModelData;
/* 0x08 */ u32 mFlags;
diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h
index 08ffccddb9..9d25587042 100644
--- a/include/JSystem/J3DGraphBase/J3DMatBlock.h
+++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h
@@ -726,6 +726,8 @@ struct J3DBlend : public J3DBlendInfo {
void load(u8 ditherEnable) {
J3DGDSetBlendMode(getBlendMode(), getSrcFactor(), getDstFactor(), getLogicOp(), ditherEnable);
}
+
+ void setBlendInfo(const J3DBlendInfo& i_blendInfo) { *static_cast<J3DBlendInfo*>(this) = i_blendInfo; }
};
extern const J3DFogInfo j3dDefaultFogInfo;
diff --git a/include/d/actor/d_a_demo00.h b/include/d/actor/d_a_demo00.h
index 91397ecd3b..5a9cc4d21d 100644
--- a/include/d/actor/d_a_demo00.h
+++ b/include/d/actor/d_a_demo00.h
@@ -1,6 +1,7 @@
#ifndef D_A_DEMO00_H
#define D_A_DEMO00_H
+#include "d/d_com_inf_game.h"
#include "f_op/f_op_actor_mng.h"
#include "d/d_demo.h"
@@ -8,16 +9,46 @@ struct demo_s1_ke_s {
public:
/* 804A4420 */ ~demo_s1_ke_s();
/* 804A86B4 */ demo_s1_ke_s();
+
+ /* 0x000 */ cXyz field_0x0[16];
+ /* 0x0C0 */ cXyz field_0xc0[16];
+ /* 0x180 */ cXyz field_0x180;
};
class daDemo00_resID_c {
public:
/* 804A430C */ void reset();
+
+ /* 0x00 */ u32 mShapeID;
+ /* 0x04 */ u32 field_0x4;
+ /* 0x08 */ u32 field_0x8;
+ /* 0x0C */ u32 field_0xc;
+ /* 0x10 */ u32 field_0x10;
+ /* 0x14 */ u32 field_0x14;
+ /* 0x18 */ u32 field_0x18;
+ /* 0x1C */ u32 field_0x1c;
+ /* 0x20 */ u32 field_0x20;
};
class daDemo00_model_c {
public:
/* 804A4338 */ void reset();
+
+ /* 0x00 */ daDemo00_resID_c field_0x0;
+ /* 0x24 */ daDemo00_resID_c mID;
+};
+
+struct daDemo00_bgc_c {
+ /* 0x00 */ dBgS_GndChk mGndChk;
+ /* 0x54 */ f32 field_0x54;
+};
+
+struct daDemo00_shadow_c {
+ /* 0x00 */ u32 field_0x0;
+ /* 0x04 */ cXyz field_0x4;
+ /* 0x10 */ cXyz field_0x10;
+ /* 0x1C */ f32 field_0x1c;
+ /* 0x20 */ f32 field_0x20;
};
/**
@@ -30,18 +61,84 @@ public:
*/
class daDemo00_c : public fopAc_ac_c {
public:
+ typedef int (daDemo00_c::*actionFunc)(dDemo_actor_c*);
+
/* 804A4388 */ ~daDemo00_c();
/* 804A45A0 */ void setBaseMtx();
/* 804A4948 */ void setShadowSize();
- /* 804A4F74 */ void createHeap();
- /* 804A5798 */ void actStandby(dDemo_actor_c*);
- /* 804A594C */ void actPerformance(dDemo_actor_c*);
- /* 804A604C */ void actLeaving(dDemo_actor_c*);
- /* 804A6F94 */ void draw();
- /* 804A7BA8 */ void execute();
-
-private:
- /* 0x568 */ u8 field_0x568[0x292c - 0x568];
+ /* 804A4F74 */ int createHeap();
+ /* 804A5798 */ int actStandby(dDemo_actor_c*);
+ /* 804A594C */ int actPerformance(dDemo_actor_c*);
+ /* 804A604C */ int actLeaving(dDemo_actor_c*);
+ /* 804A6F94 */ int draw();
+ /* 804A7BA8 */ int execute();
+
+ int create() {
+ dKy_tevstr_init(&tevStr, dComIfGp_roomControl_getStayNo(), 0xFF);
+ tevStr.field_0x384 = 1;
+ mSound.init(&eyePos, NULL, 10, 1);
+ setAction(&daDemo00_c::actStandby);
+ mModel.field_0x0.reset();
+ field_0x6a0 = -1;
+ return 4;
+ }
+
+ void setAction(actionFunc action) { field_0x57c = action; }
+ void action(dDemo_actor_c* actor) { (this->*field_0x57c)(actor); }
+
+ /* 0x0568 */ cXyz field_0x568;
+ /* 0x0574 */ csXyz field_0x574;
+ /* 0x057C */ actionFunc field_0x57c;
+ /* 0x0584 */ daDemo00_model_c mModel;
+ /* 0x05D0 */ mDoExt_McaMorfSO* mpModelMorf;
+ /* 0x05D4 */ J3DModel* field_0x5d4;
+ /* 0x05D8 */ mDoExt_invisibleModel* field_0x5d8;
+ /* 0x05DC */ mDoExt_bpkAnm* mpBpkAnm;
+ /* 0x05E0 */ mDoExt_btpAnm* mpBtpAnm;
+ /* 0x05E4 */ mDoExt_btkAnm* mpBtkAnm;
+ /* 0x05E8 */ mDoExt_brkAnm* mpBrkAnm;
+ /* 0x05EC */ daDemo00_shadow_c* mShadow;
+ /* 0x05F0 */ J3DDeformData* mDeformData;
+ /* 0x05F4 */ mDoExt_blkAnm* mpBlkAnm;
+ /* 0x05F8 */ daDemo00_bgc_c* mBgc;
+ /* 0x05FC */ Z2Creature mSound;
+ /* 0x068C */ u32 field_0x68c;
+ /* 0x0690 */ u8 field_0x690[0x694 - 0x690];
+ /* 0x0694 */ s32 field_0x694;
+ /* 0x0698 */ int field_0x698;
+ /* 0x069C */ s16 field_0x69c;
+ /* 0x069E */ s16 field_0x69e;
+ /* 0x06A0 */ s8 field_0x6a0;
+ /* 0x06A1 */ u8 field_0x6a1;
+ /* 0x06A2 */ u8 field_0x6a2;
+ /* 0x06A3 */ u8 mground2;
+ /* 0x06A4 */ u8 field_0x6a4;
+ /* 0x06A5 */ u8 field_0x6a5;
+ /* 0x06A6 */ u8 field_0x6a6;
+ /* 0x06A7 */ s8 field_0x6a7;
+ /* 0x06A8 */ s8 field_0x6a8;
+ /* 0x06A9 */ s8 field_0x6a9;
+ /* 0x06AA */ s8 field_0x6aa;
+ /* 0x06AB */ s8 field_0x6ab;
+ /* 0x06AC */ u8 field_0x6ac;
+ /* 0x06AD */ u8 field_0x6ad;
+ /* 0x06AE */ u8 field_0x6ae;
+ /* 0x06AF */ s8 field_0x6af;
+ /* 0x06B0 */ s8 field_0x6b0;
+ /* 0x06B1 */ s8 field_0x6b1;
+ /* 0x06B2 */ u8 field_0x6b2;
+ /* 0x06B3 */ s8 field_0x6b3;
+ /* 0x06B4 */ s8 field_0x6b4;
+ /* 0x06B5 */ u8 field_0x6b5;
+ /* 0x06B6 */ u8 field_0x6b6;
+ /* 0x06B7 */ u8 field_0x6b7;
+ /* 0x06B8 */ u8 field_0x6b8;
+ /* 0x06B9 */ s8 field_0x6b9;
+ /* 0x06BC */ mDoExt_3DlineMat1_c field_0x6bc;
+ /* 0x06F8 */ demo_s1_ke_s field_0x6f8[22];
+ /* 0x2900 */ mDoExt_3DlineMat0_c field_0x2900;
+ /* 0x291C */ cXyz field_0x291c;
+ /* 0x2928 */ u8 field_0x2928[0x292c - 0x2928];
};
STATIC_ASSERT(sizeof(daDemo00_c) == 0x292c);
diff --git a/include/d/d_demo.h b/include/d/d_demo.h
index d8d88941cc..6ff7317a32 100644
--- a/include/d/d_demo.h
+++ b/include/d/d_demo.h
@@ -65,6 +65,7 @@ public:
class dDemo_actor_c : public JStage::TActor {
public:
enum Enable_e {
+ ENABLE_UNK_e = 1,
ENABLE_TRANS_e = (1 << 1),
ENABLE_SCALE_e = (1 << 2),
ENABLE_ROTATE_e = (1 << 3),
@@ -123,6 +124,7 @@ public:
void setModel(J3DModel* p_model) { mModel = p_model; }
BOOL checkEnable(u16 flag) { return mFlags & flag; }
void onEnable(u16 flag) { mFlags |= flag; }
+ void offEnable(u16 flag) { mFlags &= ~flag; }
cXyz& getTrans() { return mTrans; }
cXyz& getScale() { return mScale; }
csXyz& getRatate() { return mRotate; }
@@ -132,6 +134,8 @@ public:
void setAnmFrameMax(f32 max) { mAnmFrameMax = max; }
f32 getAnmFrame() { return mAnmFrame; }
dDemo_prm_c* getPrm() { return &mPrm; }
+ f32 getAnmTransition() { return mAnmTransition; }
+ u32 getShapeId() { return mShape; }
private:
/* 0x04 */ u16 mFlags;
@@ -343,6 +347,8 @@ public:
}; // namespace
+int dDemo_setDemoData(fopAc_ac_c*, u8, mDoExt_McaMorf*, char const*, int, u16*, u32, s8);
+
class dDemo_c {
public:
/* 80039678 */ static void create();
diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h
index 19fdcd029d..f38cdaf880 100644
--- a/include/m_Do/m_Do_ext.h
+++ b/include/m_Do/m_Do_ext.h
@@ -207,6 +207,9 @@ public:
J3DAnmCluster* getBlkAnm() { return mpAnm; }
+ void entryFrame() { entryFrame(getFrame()); }
+ void entryFrame(f32 frame) { mpAnm->setFrame(frame); }
+
private:
/* 0x14 */ J3DAnmCluster* mpAnm;
};
@@ -851,6 +854,7 @@ void mDoExt_setupStageTexture(J3DModelData* i_modelData);
OSThread* mDoExt_GetCurrentRunningThread();
void mDoExt_setupShareTexture(J3DModelData* i_modelData, J3DModelData* i_shareModelData);
void mDoExt_btkAnmRemove(J3DModelData* i_modelData);
+void mDoExt_modelTexturePatch(J3DModelData* i_modelData);
#if VERSION == VERSION_SHIELD_DEBUG
s32 mDoExt_getSafeZeldaHeapSize();