summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPheenoh <pheenoh@gmail.com>2022-10-15 15:32:34 -0600
committerPheenoh <pheenoh@gmail.com>2022-12-20 16:28:41 -0700
commit85ad8b190d7ad140f63d98d0ce83648a910b8ff0 (patch)
tree0ed9630f3a65c50e6d01b1ff60d47b01d72513df /include
parent84950e08b4a525a7d94c5726dbe6d53e6cb53cf1 (diff)
d_a_npc work
daBaseNpc_c::setBckAnm and J3DAnmTransform* daBaseNpc_c daBaseNpc_c::setBtpAnm daBaseNpc_c::attnSttsOn daBaseNpc_c::orderEvent daBaseNpc_c::setEnvTevColor daBaseNpc_c::setRoomNo daBaseNpc_c::checkEndAnm attempt CheckCreateHeap daNpcF_addIdx daNpcF_subIdx daNpcF_incIdx daNpcF_decIdx daNpcF_ActorMngr_c::initialize() daNpcF_ActorMngr_c::entry cleanup daNpcF_ActorMngr_c::entry daNpcF_ActorMngr_c::remove daNpcF_ActorMngr_c::getActorP daNpcF_MatAnm_c::calc attempt daNpcF_SPCurve_c::initialize minor fixes daNpcF_Path_c::initialize daNpcF_Path_c::setPathInfo daNpcF_Path_c::chkPassed daNpcF_Path_c::reverse daNpcF_Path_c::setNextIdx daNpcF_Path_c::getNextIdx daNpcF_Path_c::getBeforeIdx daNpcF_Path_c::getBeforePos daNpcF_Path_c::getNextPos daNpcT_MatAnm_c::initialize daNpcT_MatAnm_c::calc daNpcT_addIdx daNpcT_subIdx daNpcT_decIdx daNpcT_Path_c::hermite daNpcT_Path_c::initialize daNpcT_Path_c::setPathInfo attempt daNpcT_Path_c::setNextPathInfo daNpcT_Path_c::reverse daNpcT_Path_c::setNextIdx daNpcT_Path_c::getDstPos attempt daNpcT_DmgStagger_c::setParam Add FLOAT_LABEL where possible fopEn_enemy / fix e_wb move jasper's jsystem work over d_attention / d_demo / d_lib work remove asm clean up dolphin files / work on some rels (#212) * d_a_alldie / d_a_tboxSw / d_a_tag_gstart / d_a_tag_hstop * dolphin OS work / cleanup * dolphin GX work / cleanup * finish changing dolphin files to C * more files into C * match rest of MSL_C math functions * more dolphin files converted to C * remove asm * d_bg_w work * remove asm * d_a_alink work / kytag14 initial changes to d_a_e_yc checkpoint until virtual destructor issue is solved daNpcF_Lookat_c::adjustMoveDisAngle daBaseNpc_c::setMtx daBaseNpc_moveBgActor_c::daBaseNpc_moveBgActor_c() daNpcT_c::ctrlFaceMotion daNpcT_c::ctrlMsgAnm attempt daNpcT_c::initTalk daNpcF_clearMessageTmpBit daNpcF_getDistTableIdx daNpcF_offTmpBit daNpcF_onTmpBit daNpcF_chkTmpBit daNpcF_onEvtBit daNpcF_chkEvtBit daNpcF_c::getDistTableIdx daNpcF_chkPointInArea daNpcF_chkDoBtnEqSpeak daNpcF_getPlayerInfoFromPlayerList attempt daNpcF_pntVsLineSegmentLengthSquare2D daNpcF_c::chkPointInArea daNpcF_c::chkPointInArea daNpcF_c::getAttentionPos daNpcT_chkTmpBit daNpcT_offTmpBit daNpcT_onTmpBit daNpcT_chkEvtBit daNpcT_offEvtBit daNpcT_onEvtBit daNpcT_chkDoBtnIsSpeak daNpcT_getDistTableIdx daBaseNpc_acMngr_c::entry daNpcF_c::initTalk undo override
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DAnimation.h1
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DJoint.h4
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DJointTree.h1
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DModelData.h1
-rw-r--r--include/JSystem/J3DGraphBase/J3DDrawBuffer.h39
-rw-r--r--include/JSystem/J3DGraphBase/J3DPacket.h20
-rw-r--r--include/JSystem/J3DGraphBase/J3DShape.h16
-rw-r--r--include/JSystem/J3DGraphBase/J3DShapeMtx.h36
-rw-r--r--include/JSystem/J3DGraphBase/J3DSys.h3
-rw-r--r--include/JSystem/J3DGraphBase/J3DTransform.h7
-rw-r--r--include/JSystem/J3DGraphBase/J3DVertex.h4
-rw-r--r--include/JSystem/J3DGraphLoader/J3DJointFactory.h45
-rw-r--r--include/JSystem/J3DGraphLoader/J3DShapeFactory.h74
-rw-r--r--include/JSystem/J3DU/J3DUClipper.h1
-rw-r--r--include/JSystem/JGeometry.h26
-rw-r--r--include/JSystem/JStudio/JStudio/jstudio-object.h30
-rw-r--r--include/JSystem/JStudio/JStudio/stb-data-parse.h2
-rw-r--r--include/JSystem/JStudio/JStudio/stb.h40
-rw-r--r--include/JSystem/JSupport/JSupport.h2
-rw-r--r--include/JSystem/JUtility/JUTException.h5
-rw-r--r--include/MSL_C/MSL_Common/Src/float.h20
-rw-r--r--include/MSL_C/MSL_Common/Src/wchar_io.h2
-rw-r--r--include/MSL_C/math.h2
-rw-r--r--include/Runtime.PPCEABI.H/__va_arg.h4
-rw-r--r--include/Runtime.PPCEABI.H/ptmf.h9
-rw-r--r--include/SSystem/SComponent/c_bg_s_chk.h1
-rw-r--r--include/SSystem/SComponent/c_bg_s_lin_chk.h15
-rw-r--r--include/SSystem/SComponent/c_m3d.h4
-rw-r--r--include/SSystem/SComponent/c_m3d_g_aab.h12
-rw-r--r--include/SSystem/SComponent/c_m3d_g_pla.h16
-rw-r--r--include/SSystem/SComponent/c_m3d_g_sph.h6
-rw-r--r--include/SSystem/SComponent/c_m3d_g_tri.h3
-rw-r--r--include/SSystem/SComponent/c_sxyz.h12
-rw-r--r--include/SSystem/SComponent/c_xyz.h18
-rw-r--r--include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h15
-rw-r--r--include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mainloop.h2
-rw-r--r--include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h7
-rw-r--r--include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msgbuf.h11
-rw-r--r--include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msghndlr.h18
-rw-r--r--include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/nubinit.h4
-rw-r--r--include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h4
-rw-r--r--include/TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h3
-rw-r--r--include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h2
-rw-r--r--include/Z2AudioLib/Z2SeqMgr.h22
-rw-r--r--include/d/a/d_a_alink.h987
-rw-r--r--include/d/a/d_a_npc.h413
-rw-r--r--include/d/a/d_a_player.h150
-rw-r--r--include/d/bg/d_bg_pc.h47
-rw-r--r--include/d/bg/d_bg_plc.h4
-rw-r--r--include/d/bg/d_bg_s.h4
-rw-r--r--include/d/bg/d_bg_s_acch.h3
-rw-r--r--include/d/bg/d_bg_s_poly_pass_chk.h22
-rw-r--r--include/d/bg/d_bg_w.h190
-rw-r--r--include/d/bg/d_bg_w_base.h30
-rw-r--r--include/d/bg/d_bg_w_kcol.h92
-rw-r--r--include/d/bg/d_bg_w_sv.h18
-rw-r--r--include/d/com/d_com_inf_game.h126
-rw-r--r--include/d/com/d_com_static.h30
-rw-r--r--include/d/d_attention.h161
-rw-r--r--include/d/d_demo.h28
-rw-r--r--include/d/d_drawlist.h4
-rw-r--r--include/d/d_lib.h8
-rw-r--r--include/d/d_path.h10
-rw-r--r--include/d/d_stage.h7
-rw-r--r--include/d/event/d_event.h4
-rw-r--r--include/d/meter/d_meter2_info.h10
-rw-r--r--include/d/msg/d_msg_object.h6
-rw-r--r--include/d/particle/d_particle.h23
-rw-r--r--include/dolphin/ar/ar.h8
-rw-r--r--include/dolphin/ar/arq.h16
-rw-r--r--include/dolphin/base/PPCArch.h8
-rw-r--r--include/dolphin/dvd/dvd.h88
-rw-r--r--include/dolphin/gd/GDBase.h17
-rw-r--r--include/dolphin/gd/GDGeometry.h7
-rw-r--r--include/dolphin/gx/GX.h249
-rw-r--r--include/dolphin/gx/GXAttr.h35
-rw-r--r--include/dolphin/gx/GXBump.h20
-rw-r--r--include/dolphin/gx/GXDisplayList.h6
-rw-r--r--include/dolphin/gx/GXEnum.h42
-rw-r--r--include/dolphin/gx/GXFifo.h34
-rw-r--r--include/dolphin/gx/GXFrameBuf.h27
-rw-r--r--include/dolphin/gx/GXGeometry.h21
-rw-r--r--include/dolphin/gx/GXInit.h114
-rw-r--r--include/dolphin/gx/GXLight.h23
-rw-r--r--include/dolphin/gx/GXMisc.h34
-rw-r--r--include/dolphin/gx/GXPerf.h12
-rw-r--r--include/dolphin/gx/GXPixel.h24
-rw-r--r--include/dolphin/gx/GXStruct.h17
-rw-r--r--include/dolphin/gx/GXTev.h33
-rw-r--r--include/dolphin/gx/GXTexture.h45
-rw-r--r--include/dolphin/gx/GXTransform.h28
-rw-r--r--include/dolphin/mtx/mtx.h22
-rw-r--r--include/dolphin/mtx/mtx44.h10
-rw-r--r--include/dolphin/mtx/mtxvec.h18
-rw-r--r--include/dolphin/mtx/quat.h17
-rw-r--r--include/dolphin/mtx/vec.h46
-rw-r--r--include/dolphin/os/OS.h36
-rw-r--r--include/dolphin/os/OSAlarm.h8
-rw-r--r--include/dolphin/os/OSAlloc.h29
-rw-r--r--include/dolphin/os/OSContext.h11
-rw-r--r--include/dolphin/os/OSError.h12
-rw-r--r--include/dolphin/os/OSInterrupt.h48
-rw-r--r--include/dolphin/os/OSLink.h8
-rw-r--r--include/dolphin/os/OSMemory.h2
-rw-r--r--include/dolphin/os/OSMessage.h1
-rw-r--r--include/dolphin/os/OSMutex.h30
-rw-r--r--include/dolphin/os/OSReboot.h2
-rw-r--r--include/dolphin/os/OSSync.h2
-rw-r--r--include/dolphin/os/OSThread.h51
-rw-r--r--include/dolphin/os/OSTime.h2
-rw-r--r--include/dolphin/pad/Pad.h21
-rw-r--r--include/dolphin/vi/vi.h30
-rw-r--r--include/f_op/f_op_actor.h23
-rw-r--r--include/f_op/f_op_actor_mng.h7
-rw-r--r--include/f_pc/f_pc_executor.h4
-rw-r--r--include/global.h5
-rw-r--r--include/m_Do/m_Do_audio.h23
-rw-r--r--include/m_Do/m_Do_ext.h101
-rw-r--r--include/m_Do/m_Do_graphic.h1
-rw-r--r--include/m_Do/m_Do_mtx.h3
-rw-r--r--include/rel/d/a/d_a_alldie/d_a_alldie.h32
-rw-r--r--include/rel/d/a/d_a_boomerang/d_a_boomerang.h4
-rw-r--r--include/rel/d/a/d_a_horse/d_a_horse.h15
-rw-r--r--include/rel/d/a/d_a_movie_player/d_a_movie_player.h24
-rw-r--r--include/rel/d/a/d_a_tboxSw/d_a_tboxSw.h16
-rw-r--r--include/rel/d/a/e/d_a_e_wb/d_a_e_wb.h144
-rw-r--r--include/rel/d/a/e/d_a_e_yc/d_a_e_yc.h135
-rw-r--r--include/rel/d/a/kytag/d_a_kytag14/d_a_kytag14.h13
-rw-r--r--include/rel/d/a/tag/d_a_tag_gstart/d_a_tag_gstart.h14
-rw-r--r--include/rel/d/a/tag/d_a_tag_hstop/d_a_tag_hstop.h22
-rw-r--r--include/rel/d/a/tag/d_a_tag_instruction/d_a_tag_instruction.h4
131 files changed, 3633 insertions, 1217 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
index 4daebd16ec..bcb65aeb6f 100644
--- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h
+++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
@@ -577,6 +577,7 @@ public:
f32 getFrame() const { return mFrame; }
s16 getEnd() const { return mEnd; }
u8 getAttribute() const { return mAttribute; }
+ u8 getState() const { return mState; }
void setAttribute(u8 attr) { mAttribute = attr; }
void setEnd(s16 end) { mEnd = end; }
void setRate(f32 rate) { mRate = rate; }
diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h
index 0474f4eb5a..94ce45c74d 100644
--- a/include/JSystem/J3DGraphAnimator/J3DJoint.h
+++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h
@@ -68,13 +68,15 @@ public:
static J3DMtxCalc* mCurrentMtxCalc;
private:
+ friend struct J3DJointFactory;
+
/* 0x00 */ void* mCallBackUserData;
/* 0x04 */ J3DJointCallBack mCallBack;
/* 0x08 */ void* field_0x8;
/* 0x0C */ J3DJoint* mChild;
/* 0x10 */ J3DJoint* mYounger;
/* 0x14 */ u16 mJntNo;
- /* 0x16 */ u8 mMtxType;
+ /* 0x16 */ u8 mKind;
/* 0x17 */ u8 mScaleCompensate;
/* 0x18 */ J3DTransformInfo mTransformInfo;
/* 0x38 */ f32 mBoundingSphereRadius;
diff --git a/include/JSystem/J3DGraphAnimator/J3DJointTree.h b/include/JSystem/J3DGraphAnimator/J3DJointTree.h
index b8e8267339..4937fdae32 100644
--- a/include/JSystem/J3DGraphAnimator/J3DJointTree.h
+++ b/include/JSystem/J3DGraphAnimator/J3DJointTree.h
@@ -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; }
diff --git a/include/JSystem/J3DGraphAnimator/J3DModelData.h b/include/JSystem/J3DGraphAnimator/J3DModelData.h
index 5371f8113a..bc4c2ba9a6 100644
--- a/include/JSystem/J3DGraphAnimator/J3DModelData.h
+++ b/include/JSystem/J3DGraphAnimator/J3DModelData.h
@@ -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(); }
diff --git a/include/JSystem/J3DGraphBase/J3DDrawBuffer.h b/include/JSystem/J3DGraphBase/J3DDrawBuffer.h
index 38cc0e08c2..b937d16387 100644
--- a/include/JSystem/J3DGraphBase/J3DDrawBuffer.h
+++ b/include/JSystem/J3DGraphBase/J3DDrawBuffer.h
@@ -11,22 +11,37 @@ class J3DDrawPacket;
class J3DMatPacket;
class J3DShapePacket;
-typedef void (*J3DDrawBuffer_DrawFunc)(const J3DDrawBuffer* this_);
+typedef int (J3DDrawBuffer::*sortFunc)(J3DMatPacket*);
+typedef void (J3DDrawBuffer::*drawFunc)() const;
class J3DDrawBuffer {
public:
+ enum EDrawType {
+ DRAW_HEAD,
+ DRAW_TAIL,
+ };
+
+ enum ESortType {
+ SORT_MAT,
+ SORT_MAT_ANM,
+ SORT_Z,
+ SORT_MODEL,
+ SORT_INVALID,
+ SORT_NON,
+ };
+
J3DDrawBuffer() { initialize(); }
~J3DDrawBuffer();
void initialize();
J3DError allocBuffer(u32);
void frameInit();
- void entryMatSort(J3DMatPacket*);
- void entryMatAnmSort(J3DMatPacket*);
- void entryZSort(J3DMatPacket*);
- void entryModelSort(J3DMatPacket*);
- void entryInvalidSort(J3DMatPacket*);
- bool entryNonSort(J3DMatPacket*);
- bool entryImm(J3DPacket* pPacket, u16 index);
+ int entryMatSort(J3DMatPacket*);
+ int entryMatAnmSort(J3DMatPacket*);
+ int entryZSort(J3DMatPacket*);
+ int entryModelSort(J3DMatPacket*);
+ int entryInvalidSort(J3DMatPacket*);
+ int entryNonSort(J3DMatPacket*);
+ int entryImm(J3DPacket* pPacket, u16 index);
void draw() const;
void drawHead() const;
void drawTail() const;
@@ -43,12 +58,12 @@ public:
/* 0x10 */ f32 mZNear;
/* 0x14 */ f32 mZFar;
/* 0x18 */ f32 mZRatio;
- /* 0x1C */ Mtx* mpZMtx;
+ /* 0x1C */ MtxP mpZMtx;
/* 0x20 */ J3DPacket* mpCallBackPacket;
- static u8 sortFuncTable[72];
- static u8 drawFuncTable[24];
- static u8 entryNum[4 + 4 /* padding */];
+ static sortFunc sortFuncTable[6];
+ static drawFunc drawFuncTable[2];
+ static int entryNum;
};
#endif /* J3DDRAWBUFFER_H */
diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h
index 6552c461af..232db283d3 100644
--- a/include/JSystem/J3DGraphBase/J3DPacket.h
+++ b/include/JSystem/J3DGraphBase/J3DPacket.h
@@ -51,27 +51,29 @@ public:
class J3DPacket {
public:
J3DPacket() {
- mpNextSibling = NULL;
+ mpNextPacket = NULL;
mpFirstChild = NULL;
mpUserData = NULL;
}
void addChildPacket(J3DPacket*);
- J3DPacket* getNextPacket() const { return mpNextSibling; }
+
+ J3DPacket* getNextPacket() const { return mpNextPacket; }
+ void setNextPacket(J3DPacket* i_packet) { mpNextPacket = i_packet; }
- inline void clear() {
- mpNextSibling = NULL;
+ void drawClear() {
+ mpNextPacket = NULL;
mpFirstChild = NULL;
}
void setUserArea(u32 area) { mpUserData = (void*)area; }
- virtual bool entry(J3DDrawBuffer*);
+ virtual int entry(J3DDrawBuffer*);
virtual void draw();
virtual ~J3DPacket() {}
public:
- /* 0x04 */ J3DPacket* mpNextSibling;
+ /* 0x04 */ J3DPacket* mpNextPacket;
/* 0x08 */ J3DPacket* mpFirstChild;
/* 0x0C */ void* mpUserData;
}; // Size: 0x10
@@ -143,19 +145,21 @@ public:
void endDiff();
bool isSame(J3DMatPacket*) const;
+ J3DMaterial* getMaterial() const { return mpMaterial; }
J3DShapePacket* getShapePacket() const { return mpShapePacket; }
void setShapePacket(J3DShapePacket* packet) { mpShapePacket = packet; }
void setInitShapePacket(J3DShapePacket* packet) { mpInitShapePacket = packet; }
+ bool isChanged() const { return mDiffFlag < 0; }
virtual ~J3DMatPacket();
- virtual bool entry(J3DDrawBuffer*);
+ virtual int entry(J3DDrawBuffer*);
virtual void draw();
public:
/* 0x28 */ J3DShapePacket* mpInitShapePacket;
/* 0x2C */ J3DShapePacket* mpShapePacket;
/* 0x30 */ J3DMaterial* mpMaterial;
- /* 0x34 */ u32 mSortFlags;
+ /* 0x34 */ u32 mDiffFlag;
/* 0x38 */ J3DTexture* mpTexture;
/* 0x3C */ J3DMaterialAnm* mpMaterialAnm;
}; // Size: 0x40
diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h
index f18551d7ed..85cf0da8e9 100644
--- a/include/JSystem/J3DGraphBase/J3DShape.h
+++ b/include/JSystem/J3DGraphBase/J3DShape.h
@@ -27,6 +27,11 @@ static inline void J3DFifoWriteXFCmd(u16 cmd, u16 len) {
class J3DCurrentMtx : public J3DCurrentMtxInfo {
public:
+ J3DCurrentMtx() {
+ mMtxIdxRegA = 0x3cf3cf00;
+ mMtxIdxRegB = 0x00f3cf3c;
+ }
+
u32 getMtxIdxRegA() const { return mMtxIdxRegA; }
u32 getMtxIdxRegB() const { return mMtxIdxRegB; }
@@ -54,6 +59,14 @@ enum J3DShpFlag {
class J3DShape {
public:
+ J3DShape() {
+ initialize();
+ }
+
+ enum {
+ kVcdVatDLSize = 0xC0,
+ };
+
/* 80314B48 */ void initialize();
/* 80314BB8 */ void addTexMtxIndexInDL(_GXAttr, u32);
/* 80314CBC */ void addTexMtxIndexInVcd(_GXAttr);
@@ -93,11 +106,14 @@ public:
inline u32 getMtxGroupNum() const { return mMtxGroupNum; }
inline J3DShapeDraw* getShapeDraw(u32 idx) const { return mShapeDraw[idx]; }
inline J3DShapeMtx* getShapeMtx(u32 idx) const { return mShapeMtx[idx]; }
+
static void resetVcdVatCache() { sOldVcdVatCmd = NULL; }
static void* sOldVcdVatCmd;
private:
+ friend struct J3DShapeFactory;
+
/* 0x04 */ J3DMaterial* mMaterial;
/* 0x08 */ u16 mIndex;
/* 0x0A */ u16 mMtxGroupNum;
diff --git a/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/include/JSystem/J3DGraphBase/J3DShapeMtx.h
index 0a346b2068..1b745e5fc1 100644
--- a/include/JSystem/J3DGraphBase/J3DShapeMtx.h
+++ b/include/JSystem/J3DGraphBase/J3DShapeMtx.h
@@ -24,6 +24,10 @@ extern u8 struct_804515B0[4];
class J3DShapeMtx {
public:
+ J3DShapeMtx(u16 useMtxIndex)
+ : mUseMtxIndex(useMtxIndex)
+ {}
+
/* 803130A8 */ void resetMtxLoadCache();
/* 803130E4 */ void loadMtxIndx_PNGP(int, u16) const;
/* 80313128 */ void loadMtxIndx_PCPU(int, u16) const;
@@ -54,6 +58,10 @@ private:
class J3DShapeMtxConcatView : public J3DShapeMtx {
public:
+ J3DShapeMtxConcatView(u16 useMtxIndex)
+ : J3DShapeMtx(useMtxIndex)
+ {}
+
/* 80314730 */ virtual ~J3DShapeMtxConcatView();
/* 803147E0 */ virtual u32 getType() const;
/* 80313C54 */ virtual void load() const;
@@ -73,6 +81,10 @@ public:
class J3DShapeMtxYBBoardConcatView : public J3DShapeMtxConcatView {
public:
+ J3DShapeMtxYBBoardConcatView(u16 useMtxIndex)
+ : J3DShapeMtxConcatView(useMtxIndex)
+ {}
+
/* 80314520 */ virtual ~J3DShapeMtxYBBoardConcatView();
/* 803147E0 */ virtual u32 getType() const;
/* 803143E4 */ virtual void load() const;
@@ -80,6 +92,10 @@ public:
class J3DShapeMtxBBoardConcatView : public J3DShapeMtxConcatView {
public:
+ J3DShapeMtxBBoardConcatView(u16 useMtxIndex)
+ : J3DShapeMtxConcatView(useMtxIndex)
+ {}
+
/* 803145A4 */ virtual ~J3DShapeMtxBBoardConcatView();
/* 803147E0 */ virtual u32 getType() const;
/* 803142D4 */ virtual void load() const;
@@ -87,6 +103,12 @@ public:
class J3DShapeMtxMulti : public J3DShapeMtx {
public:
+ J3DShapeMtxMulti(u16 useMtxIndex, u16 useMtxNum, u16* useMtxIndexTable)
+ : J3DShapeMtx(useMtxIndex)
+ , mUseMtxNum(useMtxNum)
+ , mUseMtxIndexTable(useMtxIndexTable)
+ {}
+
/* 803146B0 */ virtual ~J3DShapeMtxMulti();
/* 803147E0 */ virtual u32 getType() const;
/* 80273E08 */ virtual u32 getUseMtxNum() const;
@@ -96,11 +118,17 @@ public:
private:
/* 0x6 */ u16 mUseMtxNum;
- /* 0x8 */ u16* mUseMtxIndex;
+ /* 0x8 */ u16* mUseMtxIndexTable;
};
-class J3DShapeMtxMultiConcatView : public J3DShapeMtx {
+class J3DShapeMtxMultiConcatView : public J3DShapeMtxConcatView {
public:
+ J3DShapeMtxMultiConcatView(u16 useMtxIndex, u16 useMtxNum, u16* useMtxIndexTable)
+ : J3DShapeMtxConcatView(useMtxIndex)
+ , mUseMtxNum(useMtxNum)
+ , mUseMtxIndexTable(useMtxIndexTable)
+ {}
+
/* 8031461C */ virtual ~J3DShapeMtxMultiConcatView();
/* 803147E0 */ virtual u32 getType() const;
/* 80273E08 */ virtual u32 getUseMtxNum() const;
@@ -111,7 +139,7 @@ public:
private:
/* 0x6 */ u16 mUseMtxNum;
- /* 0x8 */ u16* mUseMtxIndex;
+ /* 0x8 */ u16* mUseMtxIndexTable;
};
-#endif /* J3DSHAPEMTX_H */
+#endif /* J3DSHAPEMTX_H */ \ No newline at end of file
diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h
index fd75fc48f7..01f882e3f4 100644
--- a/include/JSystem/J3DGraphBase/J3DSys.h
+++ b/include/JSystem/J3DGraphBase/J3DSys.h
@@ -93,6 +93,9 @@ struct J3DSys {
void setMaterialMode(u32 mode) { mMaterialMode = mode; }
void setTexture(J3DTexture* pTex) { mTexture = pTex; }
+ J3DTexture* getTexture() { return mTexture; }
+
+ void setNBTScale(Vec* scale) { mNBTScale = scale; }
void onFlag(u32 flag) { mFlags |= flag; }
diff --git a/include/JSystem/J3DGraphBase/J3DTransform.h b/include/JSystem/J3DGraphBase/J3DTransform.h
index 1bdc7ebb88..a162bd5b7c 100644
--- a/include/JSystem/J3DGraphBase/J3DTransform.h
+++ b/include/JSystem/J3DGraphBase/J3DTransform.h
@@ -1,13 +1,14 @@
#ifndef J3DTRANSFORM_H
#define J3DTRANSFORM_H
+#include "JSystem/JGeometry.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
struct J3DTransformInfo {
- /* 0x00 */ Vec mScale;
- /* 0x0C */ SVec mRotation;
- /* 0x14 */ Vec mTranslate;
+ /* 0x00 */ JGeometry::TVec3<f32> mScale;
+ /* 0x0C */ JGeometry::TVec3<s16> mRotation;
+ /* 0x14 */ JGeometry::TVec3<f32> mTranslate;
}; // Size: 0x20
extern J3DTransformInfo const j3dDefaultTransformInfo;
diff --git a/include/JSystem/J3DGraphBase/J3DVertex.h b/include/JSystem/J3DGraphBase/J3DVertex.h
index 309194628a..a8e67d578f 100644
--- a/include/JSystem/J3DGraphBase/J3DVertex.h
+++ b/include/JSystem/J3DGraphBase/J3DVertex.h
@@ -94,8 +94,4 @@ struct VertexNormal {
Vec data;
};
-struct VertexPosition {
- Vec data;
-};
-
#endif /* J3DVERTEX_H */
diff --git a/include/JSystem/J3DGraphLoader/J3DJointFactory.h b/include/JSystem/J3DGraphLoader/J3DJointFactory.h
index 2e992b48f3..98409802a7 100644
--- a/include/JSystem/J3DGraphLoader/J3DJointFactory.h
+++ b/include/JSystem/J3DGraphLoader/J3DJointFactory.h
@@ -1,6 +1,49 @@
#ifndef J3DJOINTFACTORY_H
#define J3DJOINTFACTORY_H
+#include "JSystem/J3DGraphBase/J3DTransform.h"
+#include "JSystem/JGeometry.h"
#include "dolphin/types.h"
-#endif /* J3DJOINTFACTORY_H */
+struct J3DJoint;
+struct ResNTAB;
+
+struct J3DJointInitData {
+ /* 0x00 */ u16 mKind;
+ /* 0x02 */ bool mScaleCompensate;
+ /* 0x04 */ J3DTransformInfo mTransformInfo;
+ /* 0x24 */ f32 mRadius;
+ /* 0x28 */ Vec mMin;
+ /* 0x2C */ Vec mMax;
+}; // Size: 0x30
+
+struct J3DJointBlock {
+ /* 0x00 */ u8 mMagic[4];
+ /* 0x04 */ u32 mSize;
+
+ /* 0x08 */ u16 mJointNum;
+ /* 0x0A */ u16 _pad;
+
+ /* 0x0C */ J3DJointInitData* mJointInitData;
+ /* 0x10 */ u16* mIndexTable;
+ /* 0x14 */ ResNTAB* mNameTable;
+};
+
+struct J3DJointFactory {
+ /* 80337178 */ J3DJointFactory(J3DJointBlock const&);
+ /* 803371D0 */ J3DJoint* create(int);
+
+ J3DJointInitData* mJointInitData;
+ u16* mIndexTable;
+
+ u16 getKind(int no) const { return mJointInitData[mIndexTable[no]].mKind; }
+ u8 getScaleCompensate(int no) const { return mJointInitData[mIndexTable[no]].mScaleCompensate; }
+ const J3DTransformInfo& getTransformInfo(int no) const {
+ return mJointInitData[mIndexTable[no]].mTransformInfo;
+ }
+ f32 getRadius(int no) const { return mJointInitData[mIndexTable[no]].mRadius; }
+ Vec& getMin(int no) const { return mJointInitData[mIndexTable[no]].mMin; }
+ Vec& getMax(int no) const { return mJointInitData[mIndexTable[no]].mMax; }
+};
+
+#endif /* J3DJOINTFACTORY_H */ \ No newline at end of file
diff --git a/include/JSystem/J3DGraphLoader/J3DShapeFactory.h b/include/JSystem/J3DGraphLoader/J3DShapeFactory.h
index 6f1f64ce13..385a217e25 100644
--- a/include/JSystem/J3DGraphLoader/J3DShapeFactory.h
+++ b/include/JSystem/J3DGraphLoader/J3DShapeFactory.h
@@ -1,6 +1,78 @@
#ifndef J3DSHAPEFACTORY_H
#define J3DSHAPEFACTORY_H
+#include "dolphin/gx/GX.h"
#include "dolphin/types.h"
-#endif /* J3DSHAPEFACTORY_H */
+struct J3DShape;
+struct J3DShapeMtx;
+struct J3DShapeDraw;
+struct ResNTAB;
+
+struct J3DShapeInitData {
+ /* 0x00 */ u8 mShapeMtxType;
+ /* 0x02 */ u16 mMtxGroupNum;
+ /* 0x04 */ u16 mVtxDescListIndex;
+ /* 0x06 */ u16 mMtxInitDataIndex;
+ /* 0x08 */ u16 mDrawInitDataIndex;
+ /* 0x0C */ f32 mRadius;
+ /* 0x10 */ Vec mMin;
+ /* 0x1C */ Vec mMax;
+};
+
+struct J3DShapeMtxInitData {
+ /* 0x00 */ u16 mUseMtxIndex;
+ /* 0x02 */ u16 mUseMtxCount;
+ /* 0x04 */ u32 mFirstUseMtxIndex;
+};
+
+struct J3DShapeDrawInitData {
+ /* 0x00 */ u32 mDisplayListSize;
+ /* 0x04 */ u32 mDisplayListIndex;
+};
+
+struct J3DShapeBlock {
+ /* 0x00 */ u8 mMagic[4];
+ /* 0x04 */ u32 mSize;
+
+ /* 0x08 */ u16 mShapeNum;
+ /* 0x0A */ u16 _pad;
+
+ /* 0x0C */ J3DShapeInitData* mShapeInitData;
+ /* 0x10 */ u16* mIndexTable;
+ /* 0x14 */ ResNTAB* mNameTable;
+ /* 0x18 */ GXVtxDescList* mVtxDescList;
+ /* 0x1C */ u16* mMtxTable;
+ /* 0x20 */ u8* mDisplayListData;
+ /* 0x24 */ J3DShapeMtxInitData* mMtxInitData;
+ /* 0x28 */ J3DShapeDrawInitData* mDrawInitData;
+};
+
+struct J3DShapeFactory {
+ /* 80337350 */ J3DShapeFactory(J3DShapeBlock const&);
+ /* 80337400 */ J3DShape* create(int, u32, GXVtxDescList*);
+ /* 803375BC */ J3DShapeMtx* newShapeMtx(u32, int, int) const;
+ /* 8033784C */ J3DShapeDraw* newShapeDraw(int, int) const;
+ /* 803378D8 */ void allocVcdVatCmdBuffer(u32);
+ /* 80337944 */ s32 calcSize(int, u32);
+ /* 803379D8 */ s32 calcSizeVcdVatCmdBuffer(u32);
+ /* 803379E8 */ s32 calcSizeShapeMtx(u32, int, int) const;
+
+ /* 0x00 */ J3DShapeInitData* mShapeInitData;
+ /* 0x04 */ u16* mIndexTable;
+ /* 0x08 */ GXVtxDescList* mVtxDescList;
+ /* 0x0C */ u16* mMtxTable;
+ /* 0x10 */ u8* mDisplayListData;
+ /* 0x14 */ J3DShapeMtxInitData* mMtxInitData;
+ /* 0x18 */ J3DShapeDrawInitData* mDrawInitData;
+ /* 0x1C */ u8* mVcdVatCmdBuffer;
+
+ u32 getMtxGroupNum(int no) const { return mShapeInitData[mIndexTable[no]].mMtxGroupNum; }
+ GXVtxDescList* getVtxDescList(int no) const { return (GXVtxDescList*)((u8*)mVtxDescList + mShapeInitData[mIndexTable[no]].mVtxDescListIndex); }
+ f32 getRadius(int no) const { return mShapeInitData[mIndexTable[no]].mRadius; }
+ Vec& getMin(int no) const { return mShapeInitData[mIndexTable[no]].mMin; }
+ Vec& getMax(int no) const { return mShapeInitData[mIndexTable[no]].mMax; }
+};
+
+
+#endif /* J3DSHAPEFACTORY_H */ \ No newline at end of file
diff --git a/include/JSystem/J3DU/J3DUClipper.h b/include/JSystem/J3DU/J3DUClipper.h
index b63f5e6325..d622fbde44 100644
--- a/include/JSystem/J3DU/J3DUClipper.h
+++ b/include/JSystem/J3DU/J3DUClipper.h
@@ -2,6 +2,7 @@
#define J3DUCLIPPER_H
#include "dolphin/mtx/vec.h"
+#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
class J3DUClipper {
diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h
index 42e505a7b5..6eb88b0279 100644
--- a/include/JSystem/JGeometry.h
+++ b/include/JSystem/JGeometry.h
@@ -20,6 +20,18 @@ struct TVec3 {
};
template <>
+struct TVec3<s16> {
+ s16 x, y, z;
+
+ TVec3& operator=(const TVec3& b) {
+ // Force copies to use lwz/lha
+ *((s32*)this) = *((s32*)&b);
+ z = b.z;
+ return *this;
+ }
+};
+
+template <>
struct TVec3<f32> {
f32 x;
f32 y;
@@ -47,6 +59,20 @@ struct TVec3<f32> {
y = a.y * b.y;
z = a.z * b.z;
}
+
+ inline TVec3<f32>& operator=(const TVec3<f32>& b) {
+ register f32* dst = &x;
+ const register f32* src = &b.x;
+ register f32 x_y;
+ register f32 z;
+ asm {
+ psq_l x_y, 0(src), 0, 0
+ psq_st x_y, 0(dst), 0, 0
+ lfs z, 8(src)
+ stfs z, 8(dst)
+ };
+ return *this;
+ }
};
template <typename T>
diff --git a/include/JSystem/JStudio/JStudio/jstudio-object.h b/include/JSystem/JStudio/JStudio/jstudio-object.h
index 9f78474e13..b0da5a2045 100644
--- a/include/JSystem/JStudio/JStudio/jstudio-object.h
+++ b/include/JSystem/JStudio/JStudio/jstudio-object.h
@@ -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;
};
diff --git a/include/JSystem/JStudio/JStudio/stb-data-parse.h b/include/JSystem/JStudio/JStudio/stb-data-parse.h
index ef96a0d35f..b21486fcfb 100644
--- a/include/JSystem/JStudio/JStudio/stb-data-parse.h
+++ b/include/JSystem/JStudio/JStudio/stb-data-parse.h
@@ -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")
diff --git a/include/JSystem/JStudio/JStudio/stb.h b/include/JSystem/JStudio/JStudio/stb.h
index e54ddb4b83..ec5dfbb2e8 100644
--- a/include/JSystem/JStudio/JStudio/stb.h
+++ b/include/JSystem/JStudio/JStudio/stb.h
@@ -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
diff --git a/include/JSystem/JSupport/JSupport.h b/include/JSystem/JSupport/JSupport.h
index 7c1d91058a..e98dee1f98 100644
--- a/include/JSystem/JSupport/JSupport.h
+++ b/include/JSystem/JSupport/JSupport.h
@@ -3,7 +3,7 @@
template <typename T>
T* JSUConvertOffsetToPtr(const void* ptr, const void* offset) {
- if (ptr == NULL) {
+ if (offset == NULL) {
return NULL;
} else {
return (T*)((s32)ptr + (s32)offset);
diff --git a/include/JSystem/JUtility/JUTException.h b/include/JSystem/JUtility/JUTException.h
index 03976bde8c..447e1483aa 100644
--- a/include/JSystem/JUtility/JUTException.h
+++ b/include/JSystem/JUtility/JUTException.h
@@ -127,4 +127,9 @@ private:
STATIC_ASSERT(sizeof(JUTException) == 0xA4);
+struct JUTWarn {
+ JUTWarn& operator<<(const char*) { return *this; }
+ JUTWarn& operator<<(long) { return *this; }
+};
+
#endif /* JUTEXCEPTION_H */
diff --git a/include/MSL_C/MSL_Common/Src/float.h b/include/MSL_C/MSL_Common/Src/float.h
index a41c15e2f3..794e5f853b 100644
--- a/include/MSL_C/MSL_Common/Src/float.h
+++ b/include/MSL_C/MSL_Common/Src/float.h
@@ -2,6 +2,7 @@
#define MSL_COMMON_SRC_FLOAT_H
#include "dolphin/types.h"
+#include "fdlibm.h"
#define FP_SNAN 0
#define FP_QNAN 1
@@ -42,8 +43,23 @@ inline int __fpclassifyf(float __value) {
}
inline int __fpclassifyd(double __value) {
- // TODO:
- return FP_INFINITE;
+ switch (__HI(__value) & 0x7ff00000) {
+ case 0x7ff00000: {
+ if ((__HI(__value) & 0x000fffff) || (__LO(__value) & 0xffffffff))
+ return FP_QNAN;
+ else
+ return FP_INFINITE;
+ break;
+ }
+ case 0: {
+ if ((__HI(__value) & 0x000fffff) || (__LO(__value) & 0xffffffff))
+ return FP_SUBNORMAL;
+ else
+ return FP_ZERO;
+ break;
+ }
+ }
+ return FP_NORMAL;
}
#endif /* MSL_COMMON_SRC_FLOAT_H */
diff --git a/include/MSL_C/MSL_Common/Src/wchar_io.h b/include/MSL_C/MSL_Common/Src/wchar_io.h
index ba643b03fa..fc8d3d4332 100644
--- a/include/MSL_C/MSL_Common/Src/wchar_io.h
+++ b/include/MSL_C/MSL_Common/Src/wchar_io.h
@@ -3,4 +3,6 @@
#include "dolphin/types.h"
+typedef unsigned short wchar_t;
+
#endif /* MSL_COMMON_SRC_WCHAR_IO_H */
diff --git a/include/MSL_C/math.h b/include/MSL_C/math.h
index eaf436dc13..0bae081bf7 100644
--- a/include/MSL_C/math.h
+++ b/include/MSL_C/math.h
@@ -26,7 +26,7 @@ double exp(double);
extern float __fabsf(float);
inline double fabs(double f) {
- return __fabsf(f);
+ return __fabs(f);
}
inline double fabsf2(float f) {
return __fabsf(f);
diff --git a/include/Runtime.PPCEABI.H/__va_arg.h b/include/Runtime.PPCEABI.H/__va_arg.h
index f4ff105d98..64378bddb2 100644
--- a/include/Runtime.PPCEABI.H/__va_arg.h
+++ b/include/Runtime.PPCEABI.H/__va_arg.h
@@ -14,9 +14,9 @@ typedef struct __va_list_struct {
typedef _va_list_struct __va_list[1];
#ifdef __cplusplus
-extern "C" void __va_arg(void*, int);
+extern "C" void* __va_arg(_va_list_struct*, int);
#else
-void __va_arg(void*, int);
+void* __va_arg(_va_list_struct*, int);
#endif
#if IN_VSCODE_EDITOR
diff --git a/include/Runtime.PPCEABI.H/ptmf.h b/include/Runtime.PPCEABI.H/ptmf.h
index a3c9cab68c..30060aefd2 100644
--- a/include/Runtime.PPCEABI.H/ptmf.h
+++ b/include/Runtime.PPCEABI.H/ptmf.h
@@ -1,6 +1,13 @@
#ifndef PTMF_H
#define PTMF_H
-#include "dolphin/types.h"
+typedef struct __ptmf {
+ long this_delta; // self-explanatory
+ long v_offset; // vtable offset
+ union {
+ void* f_addr; // function address
+ long ve_offset; // virtual function entry offset (of vtable)
+ } f_data;
+} __ptmf;
#endif /* PTMF_H */
diff --git a/include/SSystem/SComponent/c_bg_s_chk.h b/include/SSystem/SComponent/c_bg_s_chk.h
index eddabdabf3..7a832cf271 100644
--- a/include/SSystem/SComponent/c_bg_s_chk.h
+++ b/include/SSystem/SComponent/c_bg_s_chk.h
@@ -27,6 +27,7 @@ public:
u32 GetActorPid() const { return mActorPid; }
void SetPolyPassChk(cBgS_PolyPassChk* p_chk) { mPolyPassChk = p_chk; }
void SetGrpPassChk(cBgS_GrpPassChk* p_chk) { mGrpPassChk = p_chk; }
+ cBgS_PolyPassChk* GetPolyPassChk() const { return mPolyPassChk; }
virtual ~cBgS_Chk(void);
}; // Size: 0x14
diff --git a/include/SSystem/SComponent/c_bg_s_lin_chk.h b/include/SSystem/SComponent/c_bg_s_lin_chk.h
index cfd9692cdf..ca5c282fd2 100644
--- a/include/SSystem/SComponent/c_bg_s_lin_chk.h
+++ b/include/SSystem/SComponent/c_bg_s_lin_chk.h
@@ -8,15 +8,15 @@
#include "dolphin/types.h"
class cBgS_LinChk : public cBgS_Chk, public cBgS_PolyInfo {
-private:
- /* 0x024 */ cM3dGLin mLinP;
+public:
+ /* 0x024 */ cM3dGLin mLin;
/* 0x040 */ cXyz field_0x40;
/* 0x04C */ u32 field_0x4c;
/* 0x050 */ bool mPreWallChk;
/* 0x051 */ bool mPreGroundChk;
/* 0x052 */ bool mPreRoofChk;
- /* 0x053 */ u8 mFrontFlag;
- /* 0x054 */ u8 mBackFlag;
+ /* 0x053 */ bool mFrontFlag;
+ /* 0x054 */ bool mBackFlag;
public:
cBgS_LinChk();
@@ -30,6 +30,13 @@ public:
void ClrHit() { field_0x4c &= ~16; }
void SetHit() { field_0x4c |= 16; }
u32 ChkHit() const { return field_0x4c & 16; }
+ void SetCross(const cXyz& pos) { mLin.SetEnd(pos); }
+ cM3dGLin* GetLinP() { return &mLin; }
+ bool ChkBackFlag() const { return mBackFlag; }
+ bool ChkFrontFlag() const { return mFrontFlag; }
+ bool GetPreWallChk() const { return mPreWallChk; }
+ bool GetPreGroundChk() const { return mPreGroundChk; }
+ bool GetPreRoofChk() const { return mPreRoofChk; }
};
#endif /* C_BG_S_LIN_CHK_H */
diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h
index f024fd44df..931f31c4d5 100644
--- a/include/SSystem/SComponent/c_m3d.h
+++ b/include/SSystem/SComponent/c_m3d.h
@@ -87,5 +87,9 @@ void cM3d_CrawVec(const Vec&, const Vec&, Vec*);
inline bool cM3d_IsZero(f32 f) {
return fabsf(f) < G_CM3D_F_ABS_MIN;
}
+// this is the inline cM3d_IsZero but inverted. Sometimes this will get a match where the regular cM3d_IsZero inline won't
+inline bool cM3d_IsZero_inverted(f32 param_0) {
+ return !(fabsf(param_0) < G_CM3D_F_ABS_MIN);
+}
#endif \ No newline at end of file
diff --git a/include/SSystem/SComponent/c_m3d_g_aab.h b/include/SSystem/SComponent/c_m3d_g_aab.h
index d5c534a581..ba1a556ef1 100644
--- a/include/SSystem/SComponent/c_m3d_g_aab.h
+++ b/include/SSystem/SComponent/c_m3d_g_aab.h
@@ -26,12 +26,12 @@ public:
void PlusR(f32);
const cXyz& getMaxP(void) const { return mMax; }
const cXyz& getMinP(void) const { return mMin; }
- const f32 GetMaxX(void) const { return mMax.GetX(); }
- const f32 GetMaxY(void) const { return mMax.GetY(); }
- const f32 GetMaxZ(void) const { return mMax.GetZ(); }
- const f32 GetMinX(void) const { return mMin.GetX(); }
- const f32 GetMinY(void) const { return mMin.GetY(); }
- const f32 GetMinZ(void) const { return mMin.GetZ(); }
+ const f32 GetMaxX(void) const { return mMax.x; }
+ const f32 GetMaxY(void) const { return mMax.y; }
+ const f32 GetMaxZ(void) const { return mMax.z; }
+ const f32 GetMinX(void) const { return mMin.x; }
+ const f32 GetMinY(void) const { return mMin.y; }
+ const f32 GetMinZ(void) const { return mMin.z; }
}; // Size = 0x1C
STATIC_ASSERT(0x1C == sizeof(cM3dGAab));
diff --git a/include/SSystem/SComponent/c_m3d_g_pla.h b/include/SSystem/SComponent/c_m3d_g_pla.h
index 387f074d5d..bb628278f9 100644
--- a/include/SSystem/SComponent/c_m3d_g_pla.h
+++ b/include/SSystem/SComponent/c_m3d_g_pla.h
@@ -2,26 +2,34 @@
#define C_M3C_G_PLA_H_
#include "SSystem/SComponent/c_xyz.h"
+#include "SSystem/SComponent/c_m3d.h"
#include "dolphin/types.h"
// Plane with a normal
class cM3dGPla {
public:
- cXyz mNormal;
- f32 mD;
+ /* 0x00 */ cXyz mNormal;
+ /* 0x0C */ f32 mD;
+ /* 0x10 vtable */
+
cM3dGPla() {}
cM3dGPla(const cXyz*, f32);
- virtual ~cM3dGPla() {}
bool crossInfLin(const cXyz&, const cXyz&, cXyz&) const;
void SetupNP0(const Vec&, const Vec&);
void SetupNP(const Vec&, const Vec&);
bool getCrossY(const cXyz&, f32*) const;
bool getCrossYLessD(const Vec&, f32*) const;
void Set(const cM3dGPla*);
+ void GetNP();
+
+ virtual ~cM3dGPla() {}
+
f32 getPlaneFunc(const Vec* pPoint) const { return mD + PSVECDotProduct(&mNormal, pPoint); }
const cXyz& GetNP() const { return mNormal; }
- void GetNP();
f32 GetD() const { return mD; }
+ void SetupFrom3Vtx(const Vec* v1, const Vec* v2, const Vec* v3) {
+ cM3d_CalcPla(v1, v2, v3, &mNormal, &mD);
+ }
};
#endif \ No newline at end of file
diff --git a/include/SSystem/SComponent/c_m3d_g_sph.h b/include/SSystem/SComponent/c_m3d_g_sph.h
index 4d028ddcc4..de48572064 100644
--- a/include/SSystem/SComponent/c_m3d_g_sph.h
+++ b/include/SSystem/SComponent/c_m3d_g_sph.h
@@ -29,9 +29,9 @@ public:
void GetMinMaxCube(cXyz&, cXyz&) const;
const cXyz& GetC(void) const { return mCenter; }
const f32 GetR(void) const { return mRadius; }
- f32 GetCX(void) const { return mCenter.GetX(); }
- f32 GetCY(void) const { return mCenter.GetY(); }
- f32 GetCZ(void) const { return mCenter.GetZ(); }
+ f32 GetCX(void) const { return mCenter.x; }
+ f32 GetCY(void) const { return mCenter.y; }
+ f32 GetCZ(void) const { return mCenter.z; }
bool Cross(const cM3dGSph* other, f32* f) const { return cM3d_Cross_SphSph(this, other, f); }
bool Cross(const cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsSph(*cps, *this, xyz); }
diff --git a/include/SSystem/SComponent/c_m3d_g_tri.h b/include/SSystem/SComponent/c_m3d_g_tri.h
index d2a009ca64..5bab254ea0 100644
--- a/include/SSystem/SComponent/c_m3d_g_tri.h
+++ b/include/SSystem/SComponent/c_m3d_g_tri.h
@@ -27,6 +27,9 @@ public:
bool Cross(cM3dGTri const& other, cXyz* xyz) const {
return cM3d_Cross_TriTri(*this, other, xyz);
}
+ bool cross(const cM3dGLin* lin, Vec* xyz, bool param_2, bool param_3) const {
+ return cM3d_Cross_LinTri(lin, this, xyz, param_2, param_3);
+ }
};
#endif \ No newline at end of file
diff --git a/include/SSystem/SComponent/c_sxyz.h b/include/SSystem/SComponent/c_sxyz.h
index bcc78040d0..c595b8f495 100644
--- a/include/SSystem/SComponent/c_sxyz.h
+++ b/include/SSystem/SComponent/c_sxyz.h
@@ -18,6 +18,18 @@ public:
s16 GetX() const { return x; }
s16 GetY() const { return y; }
s16 GetZ() const { return z; }
+
+ void set(s16 oX, s16 oY, s16 oZ) {
+ x = oX;
+ y = oY;
+ z = oZ;
+ }
+
+ void setall(s16 val) {
+ x = val;
+ y = val;
+ z = val;
+ }
};
#endif /* C_SXYZ_H */
diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h
index 8e7757685a..3b7c4fb4e4 100644
--- a/include/SSystem/SComponent/c_xyz.h
+++ b/include/SSystem/SComponent/c_xyz.h
@@ -41,6 +41,8 @@ struct cXyz : Vec {
/* 80266B84 */ cXyz operator*(f32) const;
/* 80266BD0 */ cXyz operator*(Vec const&) const;
/* 80266C18 */ cXyz operator/(f32) const;
+ /* 800977D8 */ // void operator=(cXyz const&);
+
void operator+=(f32 f) {
x += f;
y += f;
@@ -72,6 +74,22 @@ struct cXyz : Vec {
/* 80267128 */ s16 atan2sX_Z() const;
/* 80267150 */ s16 atan2sY_XZ() const;
+ void set(f32 pX, f32 pY, f32 pZ) {
+ x = pX;
+ y = pY;
+ z = pZ;
+ }
+
+ void set(const Vec& other) {
+ x = other.x;
+ y = other.y;
+ z = other.z;
+ }
+
+ f32 getXDiff(const Vec* other) const { return x - other->x; }
+ f32 getYDiff(const Vec* other) const { return y - other->y; }
+ f32 getZDiff(const Vec* other) const { return z - other->z; }
+
void setAll(f32 f) { set(f, f, f); }
void setMin(const cXyz& other) {
diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h
index d44129e45a..dbd8e5783c 100644
--- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h
+++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h
@@ -3,4 +3,19 @@
#include "dolphin/types.h"
+#define TRK_DISPATCH_CMD_CONNECT 1 /* Connect to the console */
+#define TRK_DISPATCH_CMD_DISCONNECT 2 /* Disconnect from the console */
+#define TRK_DISPATCH_CMD_RESET 3 /* Reset the debugger */
+#define TRK_DISPATCH_CMD_GETVERSION 4 /* Get debugger version */
+#define TRK_DISPATCH_CMD_GETSUPPORTMASK 5 /* Get Support Mask */
+#define TRK_DISPATCH_CMD_OVERRIDE 7 /* Override? */
+#define TRK_DISPATCH_CMD_READMEM 16 /* Reading from memory */
+#define TRK_DISPATCH_CMD_WRITEMEM 17 /* Writing to memory */
+#define TRK_DISPATCH_CMD_READREGS 18 /* Read a register value */
+#define TRK_DISPATCH_CMD_WRITEREGS 19 /* Set a register */
+#define TRK_DISPATCH_CMD_SETOPTION 23 /* Set an option? */
+#define TRK_DISPATCH_CMD_CONTINUE 24 /* Continue debugging */
+#define TRK_DISPATCH_CMD_STEP 25 /* Step through an instruction */
+#define TRK_DISPATCH_CMD_STOP 26 /* Stop the debugger */
+
#endif /* METROTRK_PORTABLE_DISPATCH_H */
diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mainloop.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mainloop.h
index 93095570d2..846291e307 100644
--- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mainloop.h
+++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mainloop.h
@@ -3,4 +3,6 @@
#include "dolphin/types.h"
+void TRKNubMainLoop(void);
+
#endif /* METROTRK_PORTABLE_MAINLOOP_H */
diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h
index afef167736..c2a697ce45 100644
--- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h
+++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h
@@ -3,4 +3,11 @@
#include "dolphin/types.h"
+typedef struct _TRK_Msg {
+ u8 _00[8];
+ u32 m_msgLength;
+ u32 _0C;
+ u32 m_msg;
+} TRK_Msg;
+
#endif /* METROTRK_PORTABLE_MSG_H */
diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msgbuf.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msgbuf.h
index 7ba70b1904..e4108ba657 100644
--- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msgbuf.h
+++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msgbuf.h
@@ -3,4 +3,15 @@
#include "dolphin/types.h"
+typedef struct TRKBuffer {
+ u8 _00[4];
+ u32 _04;
+ s32 _08;
+ u32 _0C;
+ u32 _10;
+ u8 m_buffer[0x87C];
+} TRKBuffer;
+
+s32 TRKSetBufferPosition(TRKBuffer*, u32);
+
#endif /* METROTRK_PORTABLE_MSGBUF_H */
diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msghndlr.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msghndlr.h
index 746f55a84b..7c972fc07c 100644
--- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msghndlr.h
+++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msghndlr.h
@@ -2,5 +2,23 @@
#define METROTRK_PORTABLE_MSGHNDLR_H
#include "dolphin/types.h"
+#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msgbuf.h"
+
+void SetTRKConnected(BOOL);
+BOOL GetTRKConnected(void);
+s32 TRKDoSetOption(TRKBuffer*);
+s32 TRKDoStop(TRKBuffer*);
+s32 TRKDoStep(TRKBuffer*);
+s32 TRKDoContinue(TRKBuffer*);
+s32 TRKDoWriteRegisters(TRKBuffer*);
+s32 TRKDoReadRegisters(TRKBuffer*);
+s32 TRKDoWriteMemory(TRKBuffer*);
+s32 TRKDoReadMemory(TRKBuffer*);
+s32 TRKDoSupportMask(TRKBuffer*);
+s32 TRKDoVersions(TRKBuffer*);
+s32 TRKDoOverride(TRKBuffer*);
+s32 TRKDoReset(TRKBuffer*);
+s32 TRKDoDisconnect(TRKBuffer*);
+s32 TRKDoConnect(TRKBuffer*);
#endif /* METROTRK_PORTABLE_MSGHNDLR_H */
diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/nubinit.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/nubinit.h
index bb0f572c74..a86fa52395 100644
--- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/nubinit.h
+++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/nubinit.h
@@ -3,4 +3,8 @@
#include "dolphin/types.h"
+void TRKNubWelcome(void);
+s32 TRKTerminateNub(void);
+s32 TRKInitializeNub(void);
+
#endif /* METROTRK_PORTABLE_NUBINIT_H */
diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h
index 0a4b8ea5a9..c2bf8bfc81 100644
--- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h
+++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h
@@ -3,4 +3,8 @@
#include "dolphin/types.h"
+void UnreserveEXI2Port();
+void ReserveEXI2Port();
+s32 TRKWriteUARTN(const void*, u32);
+
#endif /* OS_DOLPHIN_DOLPHIN_TRK_GLUE_H */
diff --git a/include/TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h b/include/TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h
index 58031b5fd6..c256aea9db 100644
--- a/include/TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h
+++ b/include/TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h
@@ -3,4 +3,7 @@
#include "dolphin/types.h"
+void TRKSwapAndGo();
+void TRKTargetSetStopped(s32);
+
#endif /* PPC_GENERIC_TARGIMPL_H */
diff --git a/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h b/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h
index 2e5a587ece..35f9bb2fd0 100644
--- a/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h
+++ b/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h
@@ -3,4 +3,6 @@
#include "dolphin/types.h"
+void MWTRACE(u8, char*, ...);
+
#endif /* UTILS_COMMON_MWTRACE_H */
diff --git a/include/Z2AudioLib/Z2SeqMgr.h b/include/Z2AudioLib/Z2SeqMgr.h
index 5a1ec56f38..3dedde1115 100644
--- a/include/Z2AudioLib/Z2SeqMgr.h
+++ b/include/Z2AudioLib/Z2SeqMgr.h
@@ -25,8 +25,8 @@ class Z2SeqMgr {
public:
Z2SeqMgr();
- void bgmStart(u32, u32, s32);
- void bgmStop(u32, s32);
+ void bgmStart(u32 i_bgmID, u32, s32);
+ void bgmStop(u32 i_bgmID, s32);
void subBgmStart(u32);
void subBgmStop();
void subBgmStopInner();
@@ -79,12 +79,12 @@ public:
void i_setTwilightGateVol(f32 vol) { mTwilightGateVol = vol; }
- void i_setWindStoneVol(f32 vol, u32 count) { field_0x94.move(vol, count); }
+ void i_setWindStoneVol(f32 vol, u32 count) { mWindStone.move(vol, count); }
- void i_bgmAllUnMute(u32 count) { field_0x74.move(1.0f, count); }
+ void i_bgmAllUnMute(u32 count) { mAllBgmMaster.move(1.0f, count); }
void i_unMuteSceneBgm(u32 count) {
- field_0x34.move(1.0f, 0);
+ mBgmPause.move(1.0f, 0);
field_0x44.move(1.0f, count);
}
@@ -94,15 +94,15 @@ private:
/* 0x08 */ JAISoundHandle field_0x08;
/* 0x0C */ JAISoundHandle field_0x0c;
/* 0x10 */ JAISoundID field_0x10;
- /* 0x14 */ Z2SoundFader field_0x14;
- /* 0x24 */ Z2SoundFader field_0x24;
- /* 0x34 */ Z2SoundFader field_0x34;
+ /* 0x14 */ Z2SoundFader mMainBgmMaster;
+ /* 0x24 */ Z2SoundFader mSubBgmMaster;
+ /* 0x34 */ Z2SoundFader mBgmPause;
/* 0x44 */ Z2SoundFader field_0x44;
- /* 0x54 */ Z2SoundFader field_0x54;
+ /* 0x54 */ Z2SoundFader mFanfareMute;
/* 0x64 */ Z2SoundFader field_0x64;
- /* 0x74 */ Z2SoundFader field_0x74;
+ /* 0x74 */ Z2SoundFader mAllBgmMaster;
/* 0x84 */ Z2SoundFader field_0x84;
- /* 0x94 */ Z2SoundFader field_0x94;
+ /* 0x94 */ Z2SoundFader mWindStone;
/* 0xA4 */ Z2SoundFader field_0xa4;
/* 0xB4 */ f32 mTwilightGateVol;
/* 0xB8 */ u16 field_0xb8;
diff --git a/include/d/a/d_a_alink.h b/include/d/a/d_a_alink.h
index 7df6f5c7a6..c142c1ec95 100644
--- a/include/d/a/d_a_alink.h
+++ b/include/d/a/d_a_alink.h
@@ -74,7 +74,6 @@ public:
/* 801266C0 */ virtual void draw();
/* 800CFDF4 */ virtual ~daAlink_sight_c();
-private:
/* 0x4C */ bool mLockFlag;
/* 0x4D */ u8 field_0x4d[3];
/* 0x50 */ daAlink_lockCursor_c mLockCursor;
@@ -147,6 +146,8 @@ public:
/* 800D0B8C */ virtual ~daAlink_matAnm_c();
/* 8009D90C */ virtual void calc(J3DMaterial*) const;
+ static void decMorfFrame() {}
+
private:
/* 0x0F4 */ f32 field_0xf4;
/* 0x0F8 */ f32 field_0xf8;
@@ -155,9 +156,13 @@ private:
/* 0x104 */ int mSetFlag;
};
+struct daAlink_BckData {
+ /* 0x0 */ u16 m_underID;
+ /* 0x0 */ u16 m_upperID;
+};
+
struct daAlink_AnmData {
- /* 0x0 */ u16 field_0x0;
- /* 0x2 */ u16 field_0x2;
+ /* 0x0 */ daAlink_BckData field_0x0;
/* 0x4 */ u8 field_0x4;
/* 0x5 */ u8 field_0x5;
/* 0x6 */ u16 field_0x6;
@@ -196,57 +201,105 @@ typedef int (daAlink_c::*daAlink_procFunc)();
class daAlink_c : public daPy_py_c {
public:
enum daAlink_ANM {
- /* 0x001 */ ANM_ATN_L_WALK_FORWARD = 1,
-
- /* 0x003 */ ANM_ATN_WALK_BACK = 3,
-
- /* 0x005 */ ANM_ATN_L_WALK_BACK = 5,
- /* 0x006 */ ANM_ATN_HEAVY_WALK_LEFT,
- /* 0x007 */ ANM_ATN_READY_LEFT,
- /* 0x008 */ ANM_ATN_HEAVY_WALK_RIGHT,
- /* 0x009 */ ANM_ATN_READY_RIGHT,
- /* 0x00A */ ANM_ATN_WALK_LEFT,
- /* 0x00B */ ANM_ATN_L_WALK_LEFT,
- /* 0x00C */ ANM_ATN_WALK_RIGHT,
- /* 0x00D */ ANM_ATN_L_WALK_RIGHT,
- /* 0x00E */ ANM_HEAVY_WALK,
- /* 0x00F */ ANM_ATN_HEAVY_WALK_BACK,
- /* 0x010 */ ANM_HOOKSHOT_AIM,
- /* 0x011 */ ANM_BOW_AIM,
-
- /* 0x013 */ ANM_RUN = 19,
-
- /* 0x015 */ ANM_WAIT_TURN = 0x15,
-
- /* 0x019 */ ANM_IDLE = 0x19, // name might be inaccurate, subjectivity
-
- /* 0x01B */ ANM_WAIT_INIT = 0x1B,
-
- /* 0x01D */ ANM_SIDE_STEP_LEFT = 0x1D,
- /* 0x01E */ ANM_SIDE_STEP_RIGHT,
- /* 0x01F */ ANM_SIDE_STEP_LEFT_LAND,
- /* 0x020 */ ANM_SIDE_STEP_RIGHT_LAND,
+ /* 0x000 */ ANM_ATN_RETURN_FROM_WALK,
+ /* 0x001 */ ANM_ATN_RETURN_FROM_RUN,
+ /* 0x002 */ ANM_ATN_BACK_WALK,
+ /* 0x003 */ ANM_ATN_BACK_RUN,
+ /* 0x004 */ ANM_ATN_LOCK_BACK_WALK,
+ /* 0x005 */ ANM_ATN_LOCK_BACK_RUN,
+ /* 0x006 */ ANM_ATN_WALK_LEFT,
+ /* 0x007 */ ANM_ATN_LOCK_WALK_LEFT,
+ /* 0x008 */ ANM_ATN_WALK_RIGHT,
+ /* 0x009 */ ANM_ATN_LOCK_WALK_RIGHT,
+ /* 0x00A */ ANM_ATN_RUN_LEFT,
+ /* 0x00B */ ANM_ATN_LOCK_RUN_LEFT,
+ /* 0x00C */ ANM_ATN_RUN_RIGHT,
+ /* 0x00D */ ANM_ATN_LOCK_RUN_RIGHT,
+ /* 0x00E */ ANM_WALK_HEAVY,
+ /* 0x00F */ ANM_ATN_BACK_WALK_HEAVY,
+ /* 0x010 */ ANM_ATN_WAIT_LEFT,
+ /* 0x011 */ ANM_ATN_WAIT_RIGHT,
+ /* 0x012 */ ANM_WALK,
+ /* 0x013 */ ANM_RUN,
+ /* 0x014 */ ANM_SWIM_WAIT,
+ /* 0x015 */ ANM_STEP_TURN,
+ /* 0x016 */ ANM_SMALL_GUARD,
+ /* 0x017 */ ANM_STEP_TURN_TIRED,
+ /* 0x018 */ ANM_SMALL_GUARD_TIRED,
+ /* 0x019 */ ANM_WAIT,
+ /* 0x01A */ ANM_WAIT_B,
+ /* 0x01B */ ANM_WAIT_B_TO_A,
+ /* 0x01C */ ANM_RUN_B,
+ /* 0x01D */ ANM_SIDE_JUMP_LEFT,
+ /* 0x01E */ ANM_SIDE_JUMP_RIGHT,
+ /* 0x01F */ ANM_SIDE_JUMP_LEFT_LAND,
+ /* 0x020 */ ANM_SIDE_JUMP_RIGHT_LAND,
/* 0x021 */ ANM_BACK_JUMP,
/* 0x022 */ ANM_BACK_JUMP_LAND,
/* 0x023 */ ANM_FRONT_ROLL,
/* 0x024 */ ANM_ROLL_CRASH,
- /* 0x025 */ ANM_BARRIER_RECOIL,
+ /* 0x025 */ ANM_BARRIER_RECOIL, // ?
/* 0x026 */ ANM_BACKFLIP,
/* 0x027 */ ANM_BACKFLIP_LAND,
-
- /* 0x02C */ ANM_SHIELD_GUARD = 0x2C,
-
- /* 0x02E */ ANM_SHIELD_ATTACK = 0x2E,
+ /* 0x028 */ ANM_SLIP,
+ /* 0x029 */ ANM_CROUCH,
+ /* 0x02A */ ANM_CROUCH_START,
+ /* 0x02B */ ANM_GUARD_LEFT,
+ /* 0x02C */ ANM_GUARD_RIGHT,
+ /* 0x02D */ ANM_CROUCH_DEF, // ?
+ /* 0x02E */ ANM_SHIELD_ATTACK,
/* 0x02F */ ANM_SHIELD_ATTACK_RECOIL,
-
- /* 0x033 */ ANM_FALL_LAND = 0x33, // ?
-
- /* 0x036 */ ANM_PUSH_PULL_READY = 0x36,
- /* 0x037 */ ANM_PUSH,
-
- /* 0x03A */ ANM_PULL = 0x3A,
-
- /* 0x062 */ ANM_CUT_NM_VERTICAL = 0x62,
+ /* 0x030 */ ANM_GUARD_BREAK,
+ /* 0x031 */ ANM_JUMP_START,
+ /* 0x032 */ ANM_JUMP,
+ /* 0x033 */ ANM_JUMP_LAND,
+ /* 0x034 */ ANM_CRAWL_START,
+ /* 0x035 */ ANM_CRAWL,
+ /* 0x036 */ ANM_WAIT_PUSH_PULL,
+ /* 0x037 */ ANM_PUSH_LIGHT,
+ /* 0x038 */ ANM_PUSH_START,
+ /* 0x039 */ ANM_PUSH,
+ /* 0x03A */ ANM_PULL_LIGHT,
+ /* 0x03B */ ANM_PULL_START,
+ /* 0x03C */ ANM_PULL,
+ /* 0x03D */ ANM_HORSE_MOUNT_LEFT,
+ /* 0x03E */ ANM_HORSE_MOUNT_RIGHT,
+ /* 0x03F */ ANM_HORSE_MOUNT_BACK,
+ /* 0x040 */ ANM_HORSE_GETOFF_LEFT,
+ /* 0x041 */ ANM_HORSE_GETOFF_RIGHT,
+ /* 0x042 */ ANM_HORSE_STOP,
+ /* 0x043 */ ANM_HORSE_STOP_TO_STAND,
+ /* 0x044 */ ANM_HORSE_STAND,
+ /* 0x045 */ ANM_HORSE_JUMP_START,
+ /* 0x046 */ ANM_HORSE_JUMP,
+ /* 0x047 */ ANM_HORSE_JUMP_LAND,
+ /* 0x048 */ ANM_HORSE_WAIT,
+ /* 0x049 */ ANM_HORSE_WALK_A,
+ /* 0x04A */ ANM_HORSE_WALK_B,
+ /* 0x04B */ ANM_HORSE_DASH_A,
+ /* 0x04C */ ANM_HORSE_DASH_B,
+ /* 0x04D */ ANM_WSTARTH, // ?
+ /* 0x04E */ ANM_HORSE_DASH_START,
+ /* 0x04F */ ANM_HORSE_LASH,
+ /* 0x050 */ ANM_HORSE_CUT_TURN,
+ /* 0x051 */ ANM_HORSE_WAIT_A,
+ /* 0x052 */ ANM_HORSE_WAIT_B,
+ /* 0x053 */ ANM_HORSE_DIE_RECOVER,
+ /* 0x054 */ ANM_HORSE_TURN_B,
+ /* 0x055 */ ANM_HORSE_CROUCH,
+ /* 0x056 */ ANM_HORSE_DMG_LEFT,
+ /* 0x057 */ ANM_HORSE_DMG_RIGHT,
+ /* 0x058 */ ANM_HORSE_HANG_LEFT,
+ /* 0x059 */ ANM_HORSE_HANG_RIGHT,
+ /* 0x05A */ ANM_HORSE_TURN_LEFT,
+ /* 0x05B */ ANM_HORSE_TURN_RIGHT,
+ /* 0x05C */ ANM_HORSE_RIDE_LEFT,
+ /* 0x05D */ ANM_HORSE_RIDE_RIGHT,
+ /* 0x05E */ ANM_HORSE_FALL_LEFT,
+ /* 0x05F */ ANM_HORSE_FALL_RIGHT,
+ /* 0x060 */ ANM_HORSE_TAME_WAIT_B,
+ /* 0x061 */ ANM_HORSE_TAME_WAIT_A_TO_B,
+ /* 0x062 */ ANM_CUT_NM_VERTICAL,
/* 0x063 */ ANM_CUT_NM_LEFT,
/* 0x064 */ ANM_CUT_NM_RIGHT,
/* 0x065 */ ANM_CUT_COMBO_STAB,
@@ -254,38 +307,45 @@ public:
/* 0x067 */ ANM_CUT_FINISH_LEFT,
/* 0x068 */ ANM_CUT_FINISH_VERTICAL,
/* 0x069 */ ANM_CUT_FINISH_STAB,
-
- /* 0x06C */ ANM_CUT_FINISH_RIGHT = 0x6C,
+ /* 0x06A */ ANM_CUT_MORTAL_DRAW_A,
+ /* 0x06B */ ANM_CUT_MORTAL_DRAW_B,
+ /* 0x06C */ ANM_CUT_FINISH_RIGHT,
/* 0x06D */ ANM_CUT_TWIRL,
/* 0x06E */ ANM_CUT_TWIRL_LAND,
- /* 0x06F */ ANM_CUT_RECOIL_1,
- /* 0x070 */ ANM_CUT_RECOIL_2,
+ /* 0x06F */ ANM_CUT_RECOIL_A,
+ /* 0x070 */ ANM_CUT_RECOIL_B,
/* 0x071 */ ANM_CUT_JUMP,
/* 0x072 */ ANM_CUT_JUMP_LAND,
/* 0x073 */ ANM_CUT_TURN_LEFT,
/* 0x074 */ ANM_CUT_TURN_RIGHT,
- /* 0x075 */ ANM_CUT_TURN_CHARGE_INIT,
+ /* 0x075 */ ANM_CUT_TURN_CHARGE_START,
/* 0x076 */ ANM_CUT_TURN_CHARGE,
-
- /* 0x078 */ ANM_CUT_FINISHING_BLOW_JUMP = 0x78,
+ /* 0x077 */ ANM_CUT_TURN_CHARGE_MOVE,
+ /* 0x078 */ ANM_CUT_FINISHING_BLOW_JUMP,
/* 0x079 */ ANM_CUT_FINISHING_BLOW_FALL,
/* 0x07A */ ANM_CUT_FINISHING_BLOW_STAB,
-
- /* 0x07C */ ANM_CUT_HEAD_JUMP = 0x7C,
+ /* 0x07B */ ANM_CUT_FINISHING_BLOW_MISS,
+ /* 0x07C */ ANM_CUT_HEAD_JUMP,
/* 0x07D */ ANM_CUT_HEAD,
/* 0x07E */ ANM_CUT_HEAD_LAND,
- /* 0x07F */ ANM_DMG_SMALL,
-
- /* 0x083 */ ANM_DMG_AIR = 0x83,
+ /* 0x07F */ ANM_DMG_SMALL_A,
+ /* 0x080 */ ANM_DMG_SMALL_B,
+ /* 0x081 */ ANM_DMG_SMALL_LEFT,
+ /* 0x082 */ ANM_DMG_SMALL_RIGHT,
+ /* 0x083 */ ANM_DMG_AIR_FRONT,
/* 0x084 */ ANM_DMG_LARGE,
-
- /* 0x087 */ ANM_DMG_AIR_LAND = 0x87,
+ /* 0x085 */ ANM_DMG_AIR_LEFT,
+ /* 0x086 */ ANM_DMG_AIR_RIGHT,
+ /* 0x087 */ ANM_DMG_AIR_LAND,
/* 0x088 */ ANM_DMG_LARGE_LAND,
-
- /* 0x08C */ ANM_DMG_LARGE_UP_INIT = 0x8C,
- /* 0x08D */ ANM_DMG_LARGE_UP,
-
- /* 0x090 */ ANM_SERVICE_WAIT = 0x90,
+ /* 0x089 */ ANM_DMG_AIR_LEFT_LAND,
+ /* 0x08A */ ANM_DMG_AIR_RIGHT_LAND,
+ /* 0x08B */ ANM_DMG,
+ /* 0x08C */ ANM_DMG_FALL,
+ /* 0x08D */ ANM_DMG_FALL_RECOVER,
+ /* 0x08E */ ANM_FINISH,
+ /* 0x08F */ ANM_FINISH_END,
+ /* 0x090 */ ANM_SERVICE_WAIT,
/* 0x091 */ ANM_CLIMB_JUMP,
/* 0x092 */ ANM_HANG_READY,
/* 0x093 */ ANM_CLIMB_TOP_SMALL,
@@ -294,98 +354,433 @@ public:
/* 0x096 */ ANM_HANG_ONE_HAND_MOVE,
/* 0x097 */ ANM_HANG_MOVE_LEFT,
/* 0x098 */ ANM_HANG_MOVE_RIGHT,
-
- /* 0x0A2 */ ANM_CLIMB_READY = 0xA2,
- /* 0x0A3 */ ANM_CLIMB_UP_RIGHT,
- /* 0x0A4 */ ANM_CLIMB_UP_LEFT,
- /* 0x0A5 */ ANM_CLIMB_MOVE_LEFT,
- /* 0x0A6 */ ANM_CLIMB_MOVE_RIGHT,
- /* 0x0A7 */ ANM_FALL_ONE_HAND_GRAB,
-
- /* 0x0AF */ ANM_PICK_UP_INIT = 0xAF,
- /* 0x0B0 */ ANM_PICK_UP,
- /* 0x0B1 */ ANM_THROW_SMALL,
- /* 0x0B2 */ ANM_THROW_LARGE,
- /* 0x0B3 */ ANM_PICK_UP_LARGE_INIT,
+ /* 0x099 */ ANM_LADDER_UP_START,
+ /* 0x09A */ ANM_LADDER_UP_END_LEFT,
+ /* 0x09B */ ANM_LADDER_UP_END_RIGHT,
+ /* 0x09C */ ANM_LADDER_DOWN_START,
+ /* 0x09D */ ANM_LADDER_DOWN_END_LEFT,
+ /* 0x09E */ ANM_LADDER_DOWN_END_RIGHT,
+ /* 0x09F */ ANM_LADDER_RIGHT_TO_LEFT,
+ /* 0x0A0 */ ANM_LADDER_LEFT_TO_RIGHT,
+ /* 0x0A1 */ ANM_CLIMB_HANG,
+ /* 0x0A2 */ ANM_CLIMB_START,
+ /* 0x0A3 */ ANM_CLIMB_LEFT,
+ /* 0x0A4 */ ANM_CLIMB_RIGHT,
+ /* 0x0A5 */ ANM_CLIMB_SLIDE_LEFT,
+ /* 0x0A6 */ ANM_CLIMB_SLIDE_RIGHT,
+ /* 0x0A7 */ ANM_CLIMB_HANG_MISS,
+ /* 0x0A8 */ ANM_ROOF_UP,
+ /* 0x0A9 */ ANM_ROOF_HANG_WAIT,
+ /* 0x0AA */ ANM_ROOF_HANG_MOVE,
+ /* 0x0AB */ ANM_ROOF_HANG_LEFT,
+ /* 0x0AC */ ANM_ROOF_HANG_RIGHT,
+ /* 0x0AD */ ANM_ROOF_HANG_TURN,
+ /* 0x0AE */ ANM_ROOF_HANG,
+ /* 0x0AF */ ANM_GRAB_UP_START,
+ /* 0x0B0 */ ANM_GRAB_UP,
+ /* 0x0B1 */ ANM_THROW,
+ /* 0x0B2 */ ANM_THROW_HEAVY,
+ /* 0x0B3 */ ANM_PICK_UP_LARGE_START,
/* 0x0B4 */ ANM_PICK_UP_LARGE,
-
- /* 0x0B6 */ ANM_TIRED_WAIT = 0xB6,
- /* 0x0B7 */ ANM_TIRED_WAIT_INIT,
- /* 0x0B8 */ ANM_NPC_SPEAK,
-
- /* 0x0BB */ ANM_BOOMERANG_CATCH = 0xBB,
-
- /* 0x0BD */ ANM_FORWARD_SLIDE = 0xBD,
- /* 0x0BE */ ANM_BACKWARD_SLIDE,
- /* 0x0BF */ ANM_BACKWARD_SLIDE_LAND,
- /* 0x0C0 */ ANM_FORWARD_SLIDE_LAND,
-
- /* 0x0CE */ ANM_SWIM_FREEZE = 0xCE,
-
- /* 0x0D7 */ ANM_BOARD_SPINNER = 0xD7,
-
- /* 0x0F2 */ ANM_SPINNER_STAND = 0xF2,
-
- /* 0x0F4 */ ANM_SPINNER_RIDE = 0xF4,
-
- /* 0x0F7 */ ANM_SPINNER_ATTACK = 0xF7,
- /* 0x0F8 */ ANM_SPINNER_ATTACK_LAND,
- /* 0x0F9 */ ANM_SPINNER_PUSH,
-
- /* 0x0FD */ ANM_TRANSFORM_WOLF = 0xFD, // verify
-
- /* 0x100 */ ANM_BOTTLE_DRINK_OPEN = 0x100,
+ /* 0x0B5 */ ANM_CARRY,
+ /* 0x0B6 */ ANM_WAIT_TIRED,
+ /* 0x0B7 */ ANM_WAIT_TO_TIRED,
+ /* 0x0B8 */ ANM_TALK,
+ /* 0x0B9 */ ANM_WAIT_START,
+ /* 0x0BA */ ANM_FROZEN_FREE, // ?
+ /* 0x0BB */ ANM_BOOMERANG_CATCH,
+ /* 0x0BC */ ANM_WALK_SLOPE,
+ /* 0x0BD */ ANM_SLIDE_FORWARD,
+ /* 0x0BE */ ANM_SLIDE_BACKWARD,
+ /* 0x0BF */ ANM_SLIDE_FORWARD_END,
+ /* 0x0C0 */ ANM_SLIDE_BACKWARD_END,
+ /* 0x0C1 */ ANM_SWIM_A,
+ /* 0x0C2 */ ANM_SWIM_RESURFACE,
+ /* 0x0C3 */ ANM_ATN_SWIM_LEFT,
+ /* 0x0C4 */ ANM_ATN_SWIM_RIGHT,
+ /* 0x0C5 */ ANM_ATN_SWIM_BACK,
+ /* 0x0C6 */ ANM_SWIM_DASH,
+ /* 0x0C7 */ ANM_SWIM_DIVE,
+ /* 0x0C8 */ ANM_SWIM_ZORA_START,
+ /* 0x0C9 */ ANM_SWIM_C,
+ /* 0x0CA */ ANM_SWIM_DMG_FRONT,
+ /* 0x0CB */ ANM_SWIM_DMG_BACK,
+ /* 0x0CC */ ANM_SWIM_DMG_LEFT,
+ /* 0x0CD */ ANM_SWIM_DMG_RIGHT,
+ /* 0x0CE */ ANM_SWIM_DMG_FREEZE,
+ /* 0x0CF */ ANM_TRES_OPEN_SMALL,
+ /* 0x0D0 */ ANM_TRES_OPEN_KICK,
+ /* 0x0D1 */ ANM_TRES_OPEN_BIG,
+ /* 0x0D2 */ ANM_GET_A,
+ /* 0x0D3 */ ANM_GET_A_WAIT,
+ /* 0x0D4 */ ANM_GET_A_WAIT2, // same under anm, upper anm (0x26A)
+ /* 0x0D5 */ ANM_GET_HOLDOUT,
+ /* 0x0D6 */ ANM_TURN_BACK,
+ /* 0x0D7 */ ANM_VJUMP_START,
+ /* 0x0D8 */ ANM_WAIT_SIT,
+ /* 0x0D9 */ ANM_WAIT_CANOE_LEFT,
+ /* 0x0DA */ ANM_WAIT_CANOE_RIGHT,
+ /* 0x0DB */ ANM_CANOE_ROW_LEFT,
+ /* 0x0DC */ ANM_CANOE_ROW_RIGHT,
+ /* 0x0DD */ ANM_CANOE_ROW_LEFT_BACK,
+ /* 0x0DE */ ANM_CANOE_ROW_RIGHT_BACK,
+ /* 0x0DF */ ANM_CANOE_CHANGE_HAND,
+ /* 0x0E0 */ ANM_CANOE_FISH_LEFT,
+ /* 0x0E1 */ ANM_CANOE_FISH_RIGHT,
+ /* 0x0E2 */ ANM_CANOE_REEL,
+ /* 0x0E3 */ ANM_CANOE_RELEASE,
+ /* 0x0E4 */ ANM_CANOE_PADDLE_TO_ROD,
+ /* 0x0E5 */ ANM_REEL,
+ /* 0x0E6 */ ANM_REEL_LEFT_RIGHT,
+ /* 0x0E7 */ ANM_LAND_UP, // ?
+ /* 0x0E8 */ ANM_DOOR_OPEN_LEFT,
+ /* 0x0E9 */ ANM_DOOR_OPEN_RIGHT,
+ /* 0x0EA */ ANM_DOOR_OPEN_LOCK_LEFT,
+ /* 0x0EB */ ANM_DOOR_OPEN_LOCK_RIGHT,
+ /* 0x0EC */ ANM_DOOR_OPEN_ROLL,
+ /* 0x0ED */ ANM_DOOR_OPEN_SLIDE,
+ /* 0x0EE */ ANM_PICK_UP,
+ /* 0x0EF */ ANM_ROLL_JUMP,
+ /* 0x0F0 */ ANM_SIDE_ROLL_LEFT,
+ /* 0x0F1 */ ANM_SIDE_ROLL_RIGHT,
+ /* 0x0F2 */ ANM_RIDE_WAIT,
+ /* 0x0F3 */ ANM_RIDE_FRONT,
+ /* 0x0F4 */ ANM_RIDE_CROUCH,
+ /* 0x0F5 */ ANM_RIDE_STOP,
+ /* 0x0F6 */ ANM_RIDE_JUMP_START,
+ /* 0x0F7 */ ANM_RIDE_JUMP,
+ /* 0x0F8 */ ANM_RIDE_JUMP_LAND,
+ /* 0x0F9 */ ANM_RIDE_KICK,
+ /* 0x0FA */ ANM_RIDE_CUT_TURN_CHARGE,
+ /* 0x0FB */ ANM_RIDE_CUT_TURN,
+ /* 0x0FC */ ANM_ROPE_SWING, // monkey swing?
+ /* 0x0FD */ ANM_TRANSFORM_TO_WOLF,
+ /* 0x0FE */ ANM_TRANSFORM_TO_HUMAN,
+ /* 0x0FF */ ANM_WAIT_WIND,
+ /* 0x100 */ ANM_BOTTLE_DRINK_START,
/* 0x101 */ ANM_BOTTLE_DRINK,
/* 0x102 */ ANM_BOTTLE_DRINK_END,
-
- /* 0x107 */ ANM_BOTTLE_SWING = 0x107,
- /* 0x108 */ ANM_GRASS_WHISTLE_GRAB,
-
- /* 0x10B */ ANM_LANTERN_SWING = 0x10B,
- /* 0x10C */ ANM_OIL_BOTTLE_POUR_INIT,
+ /* 0x103 */ ANM_BOTTLE_DRINK_NASTY,
+ /* 0x104 */ ANM_BOTTLE_OPEN,
+ /* 0x105 */ ANM_BOTTLE_POUR,
+ /* 0x106 */ ANM_BOTTLE_FAIRY,
+ /* 0x107 */ ANM_BOTTLE_SWING,
+ /* 0x108 */ ANM_BOTTLE_SWING_DOWN,
+ /* 0x109 */ ANM_BOTTLE_GET,
+ /* 0x10A */ ANM_BOTTLE_SCOOP,
+ /* 0x10B */ ANM_LANTERN_SWING,
+ /* 0x10C */ ANM_OIL_BOTTLE_POUR_START,
/* 0x10D */ ANM_OIL_BOTTLE_POUR,
/* 0x10E */ ANM_OIL_BOTTLE_POUR_END,
-
- /* 0x110 */ ANM_GRASS_WHISTLE_PLAY = 0x110,
+ /* 0x10F */ ANM_GRASS_WHISTLE_START,
+ /* 0x110 */ ANM_GRASS_WHISTLE_PLAY,
/* 0x111 */ ANM_HAWK_CATCH,
- /* 0x112 */ ANM_HAWK_SUBJECT,
-
- /* 0x129 */ ANM_HOOKSHOT_PULL_TO = 0x129,
-
- /* 0x12B */ ANM_HOOKSHOT_SHOOT = 0x12B,
-
- /* 0x13E */ ANM_BOOTS_EQUIP = 0x13E,
-
- /* 0x181 */ ANM_CHAIN_PICK_UP = 0x181,
+ /* 0x112 */ ANM_HAWK_WAIT,
+ /* 0x113 */ ANM_WAIT_D_B, // ghost rats?
+ /* 0x114 */ ANM_HORSE_WAIT_D_B, // ?
+ /* 0x115 */ ANM_MG_KICK, // ?
+ /* 0x116 */ ANM_DIE,
+ /* 0x117 */ ANM_HORSE_DIE,
+ /* 0x118 */ ANM_SWIM_DIE,
+ /* 0x119 */ ANM_SWIM_DROWN,
+ /* 0x11A */ ANM_ATN_COW,
+ /* 0x11B */ ANM_COW_CATCH_START,
+ /* 0x11C */ ANM_COW_CATCH,
+ /* 0x11D */ ANM_COW_A_D, // ?
+ /* 0x11E */ ANM_COW_PRESS,
+ /* 0x11F */ ANM_COW_THROW_LEFT,
+ /* 0x120 */ ANM_COW_THROW_RIGHT,
+ /* 0x121 */ ANM_ATN_RIGHT,
+ /* 0x122 */ ANM_COW_MOVE_LEFT_RIGHT,
+ /* 0x123 */ ANM_COW_STROKE,
+ /* 0x124 */ ANM_ENTRANCE,
+ /* 0x125 */ ANM_FALL,
+ /* 0x126 */ ANM_APPEARANCE,
+ /* 0x127 */ ANM_S_JUMP_START, // ?
+ /* 0x128 */ ANM_S_JUMP_END, // ?
+ /* 0x129 */ ANM_HOOKSHOT_FLY_LEFT,
+ /* 0x12A */ ANM_HOOKSHOT_FLY_RIGHT,
+ /* 0x12B */ ANM_HOOKSHOT_SHOOT,
+ /* 0x12C */ ANM_HOOKSHOT_HANG_END_LEFT,
+ /* 0x12D */ ANM_HOOKSHOT_HANG_END_RIGHT,
+ /* 0x12E */ ANM_HOOKSHOT_HANG_LEFT,
+ /* 0x12F */ ANM_HOOKSHOT_HANG_RIGHT,
+ /* 0x130 */ ANM_HOOKSHOT_HANG_WAIT_LEFT,
+ /* 0x131 */ ANM_HOOKSHOT_HANG_WAIT_RIGHT,
+ /* 0x132 */ ANM_HOOKSHOT_HANG_SHOOT_LEFT,
+ /* 0x133 */ ANM_HOOKSHOT_HANG_SHOOT_RIGHT,
+ /* 0x134 */ ANM_HOOKSHOT_HANG_LEFT_START,
+ /* 0x135 */ ANM_HOOKSHOT_HANG_RIGHT_START,
+ /* 0x136 */ ANM_HOOKSHOT_WALL_END_LEFT,
+ /* 0x137 */ ANM_HOOKSHOT_WALL_END_RIGHT,
+ /* 0x138 */ ANM_HOOKSHOT_WALL_LEFT,
+ /* 0x139 */ ANM_HOOKSHOT_WALL_RIGHT,
+ /* 0x13A */ ANM_HOOKSHOT_WALL_WAIT_LEFT,
+ /* 0x13B */ ANM_HOOKSHOT_WALL_WAIT_RIGHT,
+ /* 0x13C */ ANM_HOOKSHOT_WALL_SHOOT_LEFT,
+ /* 0x13D */ ANM_HOOKSHOT_WALL_SHOOT_RIGHT,
+ /* 0x13E */ ANM_HVY_BOOTS_PUT_ON,
+ /* 0x13F */ ANM_SUMOU_MIAU, // ?
+ /* 0x140 */ ANM_SUMOU_HAKEYOI, // ?
+ /* 0x141 */ ANM_SUMOU_FIGHT_WAIT,
+ /* 0x142 */ ANM_SUMOU_FIGHT_STEP_LEFT,
+ /* 0x143 */ ANM_SUMOU_FIGHT_STEP_RIGHT,
+ /* 0x144 */ ANM_SUMOU_FIGHT_STEP,
+ /* 0x145 */ ANM_SUMOU_TACKLE,
+ /* 0x146 */ ANM_SUMOU_TACKLE_GORON, // ?
+ /* 0x147 */ ANM_SUMOU_DODGE_TACKLE,
+ /* 0x148 */ ANM_SUMOU_TACKLE_MISS,
+ /* 0x149 */ ANM_SUMOU_TACKLE_SHOCK,
+ /* 0x14A */ ANM_SUMOU_TACKLE_WAIT,
+ /* 0x14B */ ANM_SUMOU_TACKLE_WAIT_GORON, // ?
+ /* 0x14C */ ANM_SUMOU_TACKLE_STAGGER,
+ /* 0x14D */ ANM_SUMOU_TACKLE_STAGGER_GORON, // ?
+ /* 0x14E */ ANM_SUMOU_TACKLE_SHOCK_RETURN,
+ /* 0x14F */ ANM_SUMOU_PUNCH,
+ /* 0x150 */ ANM_SUMOU_PUNCH_MISS_SHOCK,
+ /* 0x151 */ ANM_SUMOU_PUNCH_MISS_SHOCK_RETURN,
+ /* 0x152 */ ANM_SUMOU_PUNCH_SHOCK,
+ /* 0x153 */ ANM_SUMOU_STAGGER,
+ /* 0x154 */ ANM_SUMOU_PUSH_BACK,
+ /* 0x155 */ ANM_SUMOU_PULL_BACK,
+ /* 0x156 */ ANM_SUMOU_PULL_BACK_GORON, // ?
+ /* 0x157 */ ANM_SUMOU_WIN,
+ /* 0x158 */ ANM_SUMOU_WIN_GORON,
+ /* 0x159 */ ANM_SUMOU_LOSE,
+ /* 0x15A */ ANM_SUMOU_LOSE_GORON,
+ /* 0x15B */ ANM_SUMOU_KNOCKED_DOWN,
+ /* 0x15C */ ANM_SUMOU_GET_UP,
+ /* 0x15D */ ANM_SUMOU_SHIKO,
+ /* 0x15E */ ANM_SUMOU_SHIKO_WAIT,
+ /* 0x15F */ ANM_DMG_FBW, // ?
+ /* 0x160 */ ANM_IRONBALL_WAIT,
+ /* 0x161 */ ANM_IRONBALL_WALK,
+ /* 0x162 */ ANM_IRONBALL_ATTACK,
+ /* 0x163 */ ANM_IRONBALL_TURN,
+ /* 0x164 */ ANM_IRONBALL_THROW,
+ /* 0x165 */ ANM_IRONBALL_PULL,
+ /* 0x166 */ ANM_IRONBALL_CATCH,
+ /* 0x167 */ ANM_IRONBALL_DEF,
+ /* 0x168 */ ANM_MORPHEEL_HANG,
+ /* 0x169 */ ANM_MORPHEEL_HANG_MISS,
+ /* 0x16A */ ANM_MORPHEEL_HANG_WAIT,
+ /* 0x16B */ ANM_MORPHEEL_HANG_WAIT_B,
+ /* 0x16C */ ANM_MORPHEEL_CUT,
+ /* 0x16D */ ANM_MORPHEEL_CUT_B, // final hit of cycles 1 and 2
+ /* 0x16E */ ANM_MORPHEEL_CUT_FINAL,
+ /* 0x16F */ ANM_MORPHEEL_SPIT_OUT,
+ /* 0x170 */ ANM_DRAGON_HANG_LEFT,
+ /* 0x171 */ ANM_DRAGON_HANG_RIGHT,
+ /* 0x172 */ ANM_DRAGON_HANG,
+ /* 0x173 */ ANM_DRAGON_HANG_WAIT,
+ /* 0x174 */ ANM_DRAGON_HANG_WAIT_B,
+ /* 0x175 */ ANM_DRAGON_CUT,
+ /* 0x176 */ ANM_DRAGON_CUT_B, // final hit of cycles 1 and 2
+ /* 0x177 */ ANM_DRAGON_CUT_FINAL,
+ /* 0x178 */ ANM_COPYROD_SWING,
+ /* 0x179 */ ANM_COPYROD_SWING_LARGE,
+ /* 0x17A */ ANM_GET_MASTER_SWORD, // ?
+ /* 0x17B */ ANM_WAIT_F,
+ /* 0x17C */ ANM_ELEC_STUN_GND,
+ /* 0x17D */ ANM_ELEC_STUN_AIR,
+ /* 0x17E */ ANM_KEY_CATCH,
+ /* 0x17F */ ANM_HORSE_GET_ITEM,
+ /* 0x180 */ ANM_TWGATE_PULLED_IN,
+ /* 0x181 */ ANM_CHAIN_PICK_UP,
/* 0x182 */ ANM_CHAIN_PULL,
-
- /* 0x188 */ ANM_DUNGEON_WARP_READY_INIT = 0x188,
-
- /* 0x18B */ ANM_CUT_JUMP_LARGE_CHARGE = 0x18B,
- /* 0x18C */ ANM_CUT_JUMP_LARGE_INIT,
+ /* 0x183 */ ANM_CHAIN_PULL_FYRUS,
+ /* 0x184 */ ANM_CHAIN_PULL_END,
+ /* 0x185 */ ANM_WAIT_INSECT,
+ /* 0x186 */ ANM_DEMO_MHOP, // ?
+ /* 0x187 */ ANM_PULL_IRONBALL_SWITCH,
+ /* 0x188 */ ANM_TRADE_ITEM_PULL_OUT,
+ /* 0x189 */ ANM_TRADE_ITEM_WAIT,
+ /* 0x18A */ ANM_DEMO_KAMAE, // ?
+ /* 0x18B */ ANM_CUT_JUMP_LARGE_CHARGE,
+ /* 0x18C */ ANM_CUT_JUMP_LARGE_START,
/* 0x18D */ ANM_CUT_JUMP_LARGE,
/* 0x18E */ ANM_CUT_JUMP_LARGE_LAND,
- /* 0x18F */ ANM_MASTER_SWORD_STICK_INIT,
- /* 0x190 */ ANM_MASTER_SWORD_STICK,
- /* 0x191 */ ANM_MASTER_SWORD_PULL_INIT,
-
- /* 0x198 */ ANM_GANON_FINISH = 408, // name probably wrong, fix later
+ /* 0x18F */ ANM_DEMO_MASTER_SWORD_STICK,
+ /* 0x190 */ ANM_DEMO_MASTER_SWORD_WAIT,
+ /* 0x191 */ ANM_DEMO_MASTER_SWORD_PULL,
+ /* 0x192 */ ANM_GANON_CHANCE,
+ /* 0x193 */ ANM_GANON_CHANCE_LOSING,
+ /* 0x194 */ ANM_GANON_CHANCE_WINNING,
+ /* 0x195 */ ANM_GANON_CHANCE_WIN,
+ /* 0x196 */ ANM_GANON_CHANCE_LOSE,
+ /* 0x197 */ ANM_GANON_FINISH,
+ /* 0x198 */ ANM_GANON_FINISH_WAIT,
+ /* 0x199 */ ANM_GANON_ON_HORSE,
+ /* 0x19A */ ANM_DIVE_START,
+ /* 0x19B */ ANM_DIVE,
+ /* 0x19C */ ANM_ODOROKU, // ?
+ /* 0x19D */ ANM_ASHIMOTO, // ?
};
enum daAlink_UPPER {
- Unk0,
- Unk1,
- UPPER_NOW // needs better name. main upper anmheap idx checked for actions
+ UPPER_0,
+ UPPER_1,
+ UPPER_2,
+ };
+
+ enum daAlink_UNDER {
+ UNDER_0,
+ UNDER_1,
+ UNDER_2,
};
- enum daAlink_UNDER {};
+
enum daAlink_FTANM {};
enum daAlink_WARP_MAT_MODE {};
enum daAlink_WANM {
- /* 0x5E */ ANM_WOLF_HOWL_SUCCESS = 94,
-
- /* 0x70 */ ANM_TRANFORM_HUMAN = 0x70, // verify
+ /* 0x00 */ WANM_WAIT,
+ /* 0x01 */ WANM_WALK_A,
+ /* 0x02 */ WANM_WALK_B,
+ /* 0x03 */ WANM_DASH_A,
+ /* 0x04 */ WANM_JUMP_ATTACK_START,
+ /* 0x05 */ WANM_JUMP_ATTACK,
+ /* 0x06 */ WANM_JUMP_ATTACK_END,
+ /* 0x07 */ WANM_WAIT_PP, // ?
+ /* 0x08 */ WANM_PUSH_LIGHT,
+ /* 0x09 */ WANM_PUSH_START,
+ /* 0x0A */ WANM_PUSH,
+ /* 0x0B */ WANM_SIT,
+ /* 0x0C */ WANM_CROUCH,
+ /* 0x0D */ WANM_CROUCH_WALK,
+ /* 0x0E */ WANM_WAIT_SIT,
+ /* 0x0F */ WANM_TRES_OPEN,
+ /* 0x10 */ WANM_VJMP_START,
+ /* 0x11 */ WANM_BUMP_START,
+ /* 0x12 */ WANM_BUMP_END,
+ /* 0x13 */ WANM_VJMP_CLIMB,
+ /* 0x14 */ WANM_VJMP_CLIMB_HANG,
+ /* 0x15 */ WANM_TURN_BACK,
+ /* 0x16 */ WANM_DMG_SMALL,
+ /* 0x17 */ WANM_WAIT_TIRED,
+ /* 0x18 */ WANM_WAIT_TO_TIRED,
+ /* 0x19 */ WANM_HANG,
+ /* 0x1A */ WANM_SLIP,
+ /* 0x1B */ WANM_TURN,
+ /* 0x1C */ WANM_ATN,
+ /* 0x1D */ WANM_WALK_SLOPE,
+ /* 0x1E */ WANM_SLIDE_BACKWARD,
+ /* 0x1F */ WANM_SLIDE_BACKWARD_END,
+ /* 0x20 */ WANM_SLIDE_FORWARD_START,
+ /* 0x21 */ WANM_ROPE_WALK,
+ /* 0x22 */ WANM_ROPE_CLIMB_LEFT,
+ /* 0x23 */ WANM_ROPE_CLIMB_RIGHT,
+ /* 0x24 */ WANM_ROPE_TURN,
+ /* 0x25 */ WANM_ROPE_WAIT,
+ /* 0x26 */ WANM_ROPE_FALTER,
+ /* 0x27 */ WANM_DASH_B,
+ /* 0x28 */ WANM_DMG_AIR_FRONT,
+ /* 0x29 */ WANM_DMG_AIR_BACK,
+ /* 0x2A */ WANM_DMG_AIR_LEFT,
+ /* 0x2B */ WANM_DMG_AIR_RIGHT,
+ /* 0x2C */ WANM_DMG_AIR_FRONT_GETUP,
+ /* 0x2D */ WANM_DMG_AIR_BACK_GETUP,
+ /* 0x2E */ WANM_DMG_AIR_LEFT_GETUP,
+ /* 0x2F */ WANM_DMG_AIR_RIGHT_GETUP,
+ /* 0x30 */ WANM_SERVICE_WAIT_A,
+ /* 0x31 */ WANM_WAIT_B,
+ /* 0x32 */ WANM_JUMP_B_START,
+ /* 0x33 */ WANM_JUMP_B_TURN_START,
+ /* 0x34 */ WANM_JUMP_B,
+ /* 0x35 */ WANM_JUMP_B_END,
+ /* 0x36 */ WANM_SWIM_RESURFACE,
+ /* 0x37 */ WANM_SWIM_WAIT,
+ /* 0x38 */ WANM_SWIM,
+ /* 0x39 */ WANM_SWIM_DASH,
+ /* 0x3A */ WANM_WAIT_SHAKE,
+ /* 0x3B */ WANM_WAIT_START,
+ /* 0x3C */ WANM_DMG_FRONT,
+ /* 0x3D */ WANM_DMG_BACK,
+ /* 0x3E */ WANM_DMG_LEFT,
+ /* 0x3F */ WANM_DMG_RIGHT,
+ /* 0x40 */ WANM_ATTACK_B_LEFT,
+ /* 0x41 */ WANM_ATTACK_B_RIGHT,
+ /* 0x42 */ WANM_ATTACK_B_FRONT,
+ /* 0x43 */ WANM_ATTACK_B_TAIL,
+ /* 0x44 */ WANM_ATN_LOCK_WALK_BACK,
+ /* 0x45 */ WANM_ATN_LOCK_WALK_FRONT,
+ /* 0x46 */ WANM_ATN_LOCK_RUN,
+ /* 0x47 */ WANM_PICKUP_A,
+ /* 0x48 */ WANM_SIDE_JUMP_LEFT_START,
+ /* 0x49 */ WANM_SIDE_JUMP_LEFT_END,
+ /* 0x4A */ WANM_SIDE_JUMP_RIGHT_START,
+ /* 0x4B */ WANM_SIDE_JUMP_RIGHT_END,
+ /* 0x4C */ WANM_BACK_JUMP_START,
+ /* 0x4D */ WANM_BACK_JUMP_END,
+ /* 0x4E */ WANM_PICKUP_B,
+ /* 0x4F */ WANM_PICKUP_THROW,
+ /* 0x50 */ WANM_ATTACK_A_START,
+ /* 0x51 */ WANM_ATTACK_A,
+ /* 0x52 */ WANM_ATTACK_A_END,
+ /* 0x53 */ WANM_ATTACK_A_END_FRONT,
+ /* 0x54 */ WANM_ATTACK_A_END_BACK,
+ /* 0x55 */ WANM_ATTACK_T_START,
+ /* 0x56 */ WANM_ATTACK_T,
+ /* 0x57 */ WANM_HANDLE_HANG,
+ /* 0x58 */ WANM_HANDLE_HANG_WAIT,
+ /* 0x59 */ WANM_HANDLE_HANG_SW, // ?
+ /* 0x5A */ WANM_CUT_TURN_LEFT,
+ /* 0x5B */ WANM_CUT_TURN_RIGHT,
+ /* 0x5C */ WANM_HOWL,
+ /* 0x5D */ WANM_HOWL_SIT,
+ /* 0x5E */ WANM_HOWL_SUCCESS,
+ /* 0x5F */ WANM_HOWL_END,
+ /* 0x60 */ WANM_FALL_LAND,
+ /* 0x61 */ WANM_FALL_LAND_START,
+ /* 0x62 */ WANM_ATTACK_POE_START,
+ /* 0x63 */ WANM_ATTACK_POE,
+ /* 0x64 */ WANM_ATTACK_POE_END,
+ /* 0x65 */ WANM_ATTACK_POE_MISS,
+ /* 0x66 */ WANM_BACKFLIP_START,
+ /* 0x67 */ WANM_BACKFLIP_END,
+ /* 0x68 */ WANM_DIG,
+ /* 0x69 */ WANM_DIG_IN,
+ /* 0x6A */ WANM_DIG_UNDER,
+ /* 0x6B */ WANM_SLIDE_W, // ?
+ /* 0x6C */ WANM_JUMP_KICK,
+ /* 0x6D */ WANM_PULL_OUT,
+ /* 0x6E */ WANM_CUT_TURN_CHARGE,
+ /* 0x6F */ WANM_TRANSFORM_TO_WOLF,
+ /* 0x70 */ WANM_TRANSFORM_TO_HUMAN,
+ /* 0x71 */ WANM_WAIT_WIND,
+ /* 0x72 */ WANM_SMELL,
+ /* 0x73 */ WANM_DASH_START,
+ /* 0x74 */ WANM_ATTACK_RECOIL_START,
+ /* 0x75 */ WANM_ATTACK_RECOIL_END,
+ /* 0x76 */ WANM_FLING_LEFT,
+ /* 0x77 */ WANM_FLING_RIGHT,
+ /* 0x78 */ WANM_CATCH_START,
+ /* 0x79 */ WANM_CATCH,
+ /* 0x7A */ WANM_ATTACK_RECOIL_GROUND,
+ /* 0x7B */ WANM_DIE,
+ /* 0x7C */ WANM_SWIM_DIE,
+ /* 0x7D */ WANM_SWIM_DROWN,
+ /* 0x7E */ WANM_WAIT_STUNNED, // ?
+ /* 0x7F */ WANM_WAIT_A_TO_S, // ?
+ /* 0x80 */ WANM_SERVICE_WAIT_D,
+ /* 0x81 */ WANM_MIDNA_SHOCK,
+ /* 0x82 */ WANM_ENTRANCE,
+ /* 0x83 */ WANM_GET_A,
+ /* 0x84 */ WANM_GET,
+ /* 0x85 */ WANM_WAIT_KARGOROK,
+ /* 0x86 */ WANM_CATCH_KARGOROK,
+ /* 0x87 */ WANM_DMG_ELEC_GROUND,
+ /* 0x88 */ WANM_DMG_ELEC_AIR,
+ /* 0x89 */ WANM_TWGATE_PULL,
+ /* 0x8A */ WANM_CHAIN_PULL,
+ /* 0x8B */ WANM_CHAIN_PULL_END,
+ /* 0x8C */ WANM_LISTEN,
+ /* 0x8D */ WANM_PIG_GANON_CATCH_ST,
+ /* 0x8E */ WANM_PIG_GANON_CATCH_END,
+ /* 0x8F */ WANM_PIG_GANON_THROW_LEFT_START,
+ /* 0x90 */ WANM_PIG_GANON_THROW_LEFT_END,
+ /* 0x91 */ WANM_PIG_GANON_THROW_RIGHT_START,
+ /* 0x92 */ WANM_PIG_GANON_THROW_RIGHT_END,
};
enum MODE_FLG {
@@ -655,8 +1050,8 @@ public:
/* 0x0E8 */ PROC_MASTER_SWORD_STICK,
/* 0x0E9 */ PROC_MASTER_SWORD_PULL,
/* 0x0EA */ PROC_DUNGEON_WARP_READY,
- /* 0x0EB */ PROC_DUNEGON_WARP,
- /* 0x0EC */ PROC_DUNEGON_WARP_SCN_START,
+ /* 0x0EB */ PROC_DUNGEON_WARP,
+ /* 0x0EC */ PROC_DUNGEON_WARP_SCN_START,
/* 0x0ED */ PROC_WOLF_HOWL_DEMO,
/* 0x0EE */ PROC_WOLF_SERVICE_WAIT,
/* 0x0EF */ PROC_WOLF_TIRED_WAIT,
@@ -774,15 +1169,6 @@ public:
/* 0x15F */ PROC_QUAKE_WAIT,
};
- // this might be one of the above enums, but not clear yet
- enum UPPER_ANM {
- ANM_SMALL_GUARD = 22,
- ANM_HUMAN_CHAIN_GRAB = 98,
- ANM_WOLF_CHAIN_GRAB = 672,
- ANM_WOLF_ENEMY_THROW_LEFT = 701,
- ANM_WOLF_ENEMY_THROW_RIGHT,
- };
-
enum daAlink_ITEM_BTN {
/* 0x01 */ BTN_X = (1 << 0),
/* 0x02 */ BTN_Y = (1 << 1),
@@ -880,13 +1266,13 @@ public:
/* 800A7358 */ void setPolygonSpeed();
/* 800A7950 */ void checkWindSpeedOnAngle() const;
/* 800A79EC */ void checkWindSpeedOnAngleAnime(int) const;
- /* 800A7A5C */ void checkDashAnime() const;
+ /* 800A7A5C */ bool checkDashAnime() const;
/* 800A7ABC */ void checkWindWallRate(cXyz const&);
/* 800A7CB0 */ void setWindSpeed();
/* 800A8310 */ void setBodyPartPos();
/* 800A87F8 */ void setAttentionPos();
/* 800A8CE4 */ void setMatrix();
- /* 800A9248 */ static void simpleAnmPlay(J3DAnmBase*);
+ /* 800A9248 */ static int simpleAnmPlay(J3DAnmBase*);
/* 800A92F0 */ void setSwordPos();
/* 800A9450 */ void setItemMatrix(int);
/* 800A9F4C */ void setWolfItemMatrix();
@@ -904,10 +1290,10 @@ public:
/* 800ABB84 */ void setCollisionPos();
/* 800ABDB8 */ void setCollision();
/* 800AC394 */ void setFrameCtrl(daPy_frameCtrl_c*, u8, s16, s16, f32, f32);
- /* 800AC450 */ void getMainBckData(daAlink_c::daAlink_ANM) const;
- /* 800AC558 */ void checkUnderMove0BckNoArc(daAlink_c::daAlink_ANM) const;
- /* 800AC5B4 */ void checkUnderMove1BckNoArc(daAlink_c::daAlink_ANM) const;
- /* 800AC610 */ void getUnderUpperAnime(daAlink_c::daAlink_ANM, J3DAnmTransform**,
+ /* 800AC450 */ const daAlink_BckData* getMainBckData(daAlink_c::daAlink_ANM) const;
+ /* 800AC558 */ BOOL checkUnderMove0BckNoArc(daAlink_c::daAlink_ANM) const;
+ /* 800AC5B4 */ BOOL checkUnderMove1BckNoArc(daAlink_c::daAlink_ANM) const;
+ /* 800AC610 */ int getUnderUpperAnime(daAlink_c::daAlink_ANM, J3DAnmTransform**,
J3DAnmTransform**, int, u32);
/* 800AC738 */ void setDoubleAnimeBlendRatio(f32);
/* 800AC754 */ void commonDoubleAnime(J3DAnmTransform*, J3DAnmTransform*, J3DAnmTransform*,
@@ -918,8 +1304,8 @@ public:
/* 800ACF80 */ void setSingleAnimeBase(daAlink_c::daAlink_ANM anmID);
/* 800ACFB0 */ void setSingleAnimeBaseMorf(daAlink_c::daAlink_ANM anmID, f32);
/* 800ACFE0 */ void setSingleAnimeBaseSpeed(daAlink_c::daAlink_ANM anmID, f32 speed, f32 morf);
- /* 800AD00C */ void setSingleAnime(daAlink_c::daAlink_ANM anmID, f32 rate, f32 start, s16 endF, f32 morf);
- /* 800AD0F4 */ void setSingleAnimeParam(daAlink_c::daAlink_ANM anmID, daAlinkHIO_anm_c const*);
+ /* 800AD00C */ int setSingleAnime(daAlink_c::daAlink_ANM anmID, f32 rate, f32 start, s16 endF, f32 morf);
+ /* 800AD0F4 */ int setSingleAnimeParam(daAlink_c::daAlink_ANM anmID, daAlinkHIO_anm_c const*);
/* 800AD128 */ void animePlay(J3DAnmTransform*, daPy_frameCtrl_c*);
/* 800AD170 */ void allAnimePlay();
/* 800AD2D8 */ void setUpperAnimeMorf(f32);
@@ -930,13 +1316,13 @@ public:
/* 800AD6F0 */ void setUpperAnimeParam(u16, daAlink_c::daAlink_UPPER, daAlinkHIO_anm_c const*);
/* 800AD724 */ void resetUpperAnime(daAlink_c::daAlink_UPPER, f32);
/* 800AD8F4 */ void setUnderAnimeMorf(f32);
- /* 800AD964 */ void setUnderAnime(u16, daAlink_c::daAlink_UNDER, f32, f32, s16, f32);
- /* 800ADAB8 */ void setUnderAnimeParam(u16, daAlink_c::daAlink_UNDER, daAlinkHIO_anm_c const*);
+ /* 800AD964 */ int setUnderAnime(u16, daAlink_c::daAlink_UNDER, f32, f32, s16, f32);
+ /* 800ADAB8 */ int setUnderAnimeParam(u16, daAlink_c::daAlink_UNDER, daAlinkHIO_anm_c const*);
/* 800ADAEC */ void resetUnderAnime(daAlink_c::daAlink_UNDER, f32);
/* 800ADB78 */ void setOldRootQuaternion(s16, s16, s16);
- /* 800ADC50 */ void checkAtnLeftAnime();
- /* 800ADCEC */ void checkAtnRightAnime();
- /* 800ADD88 */ void getMoveGroundAngleSpeedRate();
+ /* 800ADC50 */ BOOL checkAtnLeftAnime();
+ /* 800ADCEC */ BOOL checkAtnRightAnime();
+ /* 800ADD88 */ f32 getMoveGroundAngleSpeedRate();
/* 800ADE14 */ void setBlendMoveAnime(f32);
/* 800AEA70 */ void setBlendAtnMoveAnime(f32);
/* 800AF11C */ void setBlendAtnBackMoveAnime(f32);
@@ -953,7 +1339,7 @@ public:
/* 800AFC88 */ void resetFacePriTexture();
/* 800AFCBC */ void resetFacePriAnime();
/* 800AFCF0 */ void playFaceTextureAnime();
- /* 800B0098 */ void getGroundAngle(cBgS_PolyInfo*, s16);
+ /* 800B0098 */ s16 getGroundAngle(cBgS_PolyInfo*, s16);
/* 800B0150 */ void getRoofAngle(cBgS_PolyInfo*, s16);
/* 800B01FC */ void getWallEdgePos(cXyz const&, cM3dGPla*, cM3dGPla*, cXyz*, int);
/* 800B02BC */ void setFrontWallType();
@@ -966,7 +1352,7 @@ public:
/* 800B1B68 */ BOOL checkNotItemSinkLimit();
/* 800B1BAC */ void setSandShapeOffset();
/* 800B1FB8 */ bool checkLv2MiddleBossBgRide(s16);
- /* 800B1FD8 */ void getSlidePolygon(cM3dGPla*);
+ /* 800B1FD8 */ bool getSlidePolygon(cM3dGPla*);
/* 800B21EC */ BOOL checkSlope() const;
/* 800B25CC */ BOOL itemTriggerCheck(u8);
/* 800B25E8 */ BOOL itemButtonCheck(u8);
@@ -999,15 +1385,15 @@ public:
/* 800B3F2C */ void getStickAngleDistanceRate();
/* 800B3FD4 */ void setSpeedAndAngleNormal();
/* 800B444C */ void setSpeedAndAngleAtn();
- /* 800B477C */ void checkRequestTalkActor(dAttList_c*, fopAc_ac_c*);
+ /* 800B477C */ int checkRequestTalkActor(dAttList_c*, fopAc_ac_c*);
/* 800B47B4 */ void checkServiceWaitMode();
/* 800B48D0 */ void setJumpMode();
/* 800B4908 */ f32 getMetamorphoseNearDis() const;
/* 800B4918 */ f32 getMetamorphoseFarDis() const;
/* 800B4928 */ s16 getMetamorphoseFarAngle() const;
/* 800B4938 */ void setMidnaMsg();
- /* 800B4950 */ bool notTalk();
- /* 800B4A08 */ void setTalkStatus();
+ /* 800B4950 */ BOOL notTalk();
+ /* 800B4A08 */ BOOL setTalkStatus();
/* 800B4B2C */ f32 getFrontRollRate();
/* 800B4B7C */ void decideCommonDoStatus();
/* 800B5284 */ void decideDoStatus();
@@ -1017,7 +1403,7 @@ public:
/* 800B5C64 */ void setStepLandVibration();
/* 800B5CCC */ void checkLandAction(int);
/* 800B5F6C */ BOOL checkSlideAction();
- /* 800B607C */ void checkAutoJumpAction();
+ /* 800B607C */ BOOL checkAutoJumpAction();
/* 800B69CC */ bool checkCutJumpInFly();
/* 800B6A30 */ BOOL checkFrontWallTypeAction();
/* 800B6F28 */ void checkItemActionInitStart();
@@ -1031,8 +1417,8 @@ public:
/* 800B7528 */ void checkItemButtonChange();
/* 800B75EC */ void checkUpperItemAction();
/* 800B7B7C */ void orderPeep();
- /* 800B7BF8 */ void orderTalk(int);
- /* 800B80C4 */ void orderZTalk();
+ /* 800B7BF8 */ int orderTalk(int);
+ /* 800B80C4 */ int orderZTalk();
/* 800B8374 */ void checkNormalAction();
/* 800B8930 */ bool checkReadyItem();
/* 800B8988 */ void checkItemAction();
@@ -1043,7 +1429,7 @@ public:
/* 800B92D0 */ void checkOneHandItemEquipAnime() const;
/* 800B92F8 */ void checkItemEquipAnime() const;
/* 800B9340 */ BOOL checkEquipAnime() const;
- /* 800B9398 */ void checkWindDashAnime() const;
+ /* 800B9398 */ BOOL checkWindDashAnime() const;
/* 800B93CC */ void checkSwordTwirlAnime() const;
/* 800B93F4 */ void swordEquip(int);
/* 800B9580 */ void swordUnequip();
@@ -1078,9 +1464,9 @@ public:
/* 800BDF60 */ void startRestartRoom(u32, int, int, int);
/* 800BE26C */ void checkCoachGuardGame();
/* 800BE2C0 */ void checkRoofRestart();
- /* 800BE3E4 */ void checkRestartRoom();
+ /* 800BE3E4 */ bool checkRestartRoom();
/* 800BE9D4 */ s16 getSceneExitMoveAngle();
- /* 800BEAF8 */ int checkSceneChange(int);
+ /* 800BEAF8 */ int checkSceneChange(int i_exitID);
/* 800BF0B8 */ void voiceStartLevel(u32);
/* 800BF0EC */ void seStartSwordCut(u32);
/* 800BF194 */ void seStartMapInfo(u32);
@@ -1194,7 +1580,7 @@ public:
/* 800C84D0 */ void procFloorDownRebound();
/* 800C854C */ void procGoronRideWaitInit(fopAc_ac_c*);
/* 800C85D8 */ void procGoronRideWait();
- /* 800C8700 */ void execute();
+ /* 800C8700 */ int execute();
/* 800CAFC8 */ void setDrawHand();
/* 800CB480 */ bool checkSwordDraw();
/* 800CB53C */ bool checkShieldDraw();
@@ -1229,9 +1615,9 @@ public:
/* 800CFF4C */ BOOL checkAttentionLock();
/* 800D0020 */ BOOL checkFmChainGrabAnime() const;
/* 800D0048 */ BOOL checkSmallUpperGuardAnime() const;
- /* 800D00EC */ BOOL checkReinRide() const;
+ /* 800D00EC */ u32 checkReinRide() const;
/* 800D0110 */ BOOL checkWolfEnemyThrowAnime() const;
- /* 800D0138 */ u16 checkSpecialDemoMode() const;
+ /* 800D0138 */ int checkSpecialDemoMode() const;
/* 800D014C */ void setMidnaTalkStatus(u8);
/* 800D0164 */ void set3DStatus(u8, u8);
/* 800D018C */ u32 checkModeFlg(u32) const;
@@ -1244,7 +1630,7 @@ public:
/* 800D0F90 */ void initCutTurnAt(f32, int);
/* 800D102C */ bool checkCutFinishJumpUp();
/* 800D1088 */ void changeCutFast();
- /* 800D10E0 */ void checkCutFastReady();
+ /* 800D10E0 */ bool checkCutFastReady();
/* 800D1268 */ void setSwordModel();
/* 800D1310 */ void offSwordModel();
/* 800D13AC */ BOOL checkCutTypeNoBlur() const;
@@ -1325,20 +1711,20 @@ public:
/* 800D6F2C */ void checkNoLandDamageSlidePolygon();
/* 800D6FE0 */ void checkCutLandDamage();
/* 800D70A0 */ void checkCaughtEscapeCutTurn();
- /* 800D7208 */ void damageMagnification(int, int);
+ /* 800D7208 */ f32 damageMagnification(int, int);
/* 800D72BC */ void setDamagePoint(int, int, int, int);
/* 800D7478 */ void setDamagePointNormal(int);
/* 800D74A4 */ void setLandDamagePoint(int);
/* 800D74F4 */ void getDamageVec(dCcD_GObjInf*);
/* 800D76C4 */ void setDashDamage();
/* 800D7768 */ void checkIcePolygonDamage(cBgS_PolyInfo*);
- /* 800D77C8 */ void checkMagicArmorNoDamage();
+ /* 800D77C8 */ BOOL checkMagicArmorNoDamage();
/* 800D7820 */ void checkPolyDamage();
/* 800D7A98 */ void checkElecReturnDamage(dCcD_GObjInf&, fopAc_ac_c**);
/* 800D7B18 */ void damageTimerCount();
/* 800D7BE8 */ void checkHugeAttack(int) const;
/* 800D7C14 */ void checkLargeAttack(int) const;
- /* 800D7C40 */ void checkDamageAction();
+ /* 800D7C40 */ BOOL checkDamageAction();
/* 800D8F3C */ void procDamageInit(dCcD_GObjInf*, int);
/* 800D9514 */ void procDamage();
/* 800D96DC */ void procCoLargeDamageInit(int, int, s16, s16, dCcD_GObjInf*, int);
@@ -1368,7 +1754,7 @@ public:
/* 800DC474 */ void procCoSwimFreezeReturn();
/* 800DC548 */ static BOOL checkEnemyGroup(fopAc_ac_c*);
/* 800DC5A4 */ static BOOL checkSpecialNpc(fopAc_ac_c*);
- /* 800DC5DC */ void checkShieldAttackEmphasys();
+ /* 800DC5DC */ bool checkShieldAttackEmphasys();
/* 800DC678 */ BOOL checkGuardActionChange();
/* 800DC79C */ void stickArrowIncrement(int);
/* 800DC8C4 */ void setArrowShieldActor(fopAc_ac_c*, int);
@@ -1430,7 +1816,7 @@ public:
/* 800E01CC */ void cancelBoomerangLock(fopAc_ac_c*);
/* 800E0210 */ fopAc_ac_c* getBoomerangActor();
/* 800E0244 */ bool checkBoomerangChargeEnd();
- /* 800E02B8 */ void checkBoomerangCarry(fopAc_ac_c*);
+ /* 800E02B8 */ BOOL checkBoomerangCarry(fopAc_ac_c*);
/* 800E03D0 */ void initBoomerangUpperAnimeSpeed(int);
/* 800E0440 */ BOOL checkBoomerangAnime() const;
/* 800E04AC */ BOOL checkBoomerangThrowAnime() const;
@@ -1458,7 +1844,7 @@ public:
/* 800E1374 */ fopAc_ac_c* getCopyRodControllActor();
/* 800E1390 */ fopAc_ac_c* getCopyRodCameraActor();
/* 800E13AC */ void initCopyRodUpperAnimeSpeed(int);
- /* 800E1408 */ BOOL checkForestOldCentury();
+ /* 800E1408 */ static BOOL checkForestOldCentury();
/* 800E1530 */ void checkCopyRodAnime() const;
/* 800E158C */ void setCopyRodControllAnime();
/* 800E15FC */ void setCopyRodControllUpperSpeedRate();
@@ -1515,7 +1901,7 @@ public:
/* 800E3D6C */ void checkGrabHeavyActor();
/* 800E3D94 */ void checkGrabSideActor();
/* 800E3DBC */ void setGrabUpperAnime(f32);
- /* 800E3F20 */ void checkGrabRooster();
+ /* 800E3F20 */ BOOL checkGrabRooster();
/* 800E3F50 */ void setGrabItemPos();
/* 800E4BD4 */ void freeGrabItem();
/* 800E4DEC */ void setGrabUpperSpeedRate();
@@ -1552,7 +1938,7 @@ public:
/* 800E76E0 */ void procPickPut();
/* 800E7894 */ void checkSetChainPullAnime(s16);
/* 800E794C */ s16 getChainStickAngleY(s16) const;
- /* 800E7994 */ void checkChainEmphasys();
+ /* 800E7994 */ u8 checkChainEmphasys();
/* 800E79F8 */ void searchFmChainPos();
/* 800E7AEC */ void setFmChainPosFromOut(fopAc_ac_c*, cXyz*, int);
/* 800E7C30 */ void procFmChainUpInit();
@@ -1560,7 +1946,7 @@ public:
/* 800E7DD8 */ void procFmChainStrongPullInit();
/* 800E7E50 */ void procFmChainStrongPull();
/* 800E7ED0 */ void setWallGrabStatus(u8, u8);
- /* 800E7EE4 */ void getWallGrabStatus();
+ /* 800E7EE4 */ int getWallGrabStatus();
/* 800E7EF4 */ void wallGrabTrigger();
/* 800E7F18 */ void wallGrabButton();
/* 800E7F3C */ void setPushPullKeepData(dBgW_Base::PushPullLabel, int);
@@ -1712,7 +2098,7 @@ public:
/* 800F3C44 */ void getCanoeMaxRotSpeed() const;
/* 800F3CCC */ void getCanoeLocalPaddleTop();
/* 800F3CF8 */ void checkCanoeRideTandem();
- /* 800F3D58 */ void checkFishingRodAndLureItem() const;
+ /* 800F3D58 */ BOOL checkFishingRodAndLureItem() const;
/* 800F3DA0 */ void initFishingRodHand();
/* 800F3DFC */ void getCanoePaddleMatrix();
/* 800F3E4C */ void checkFishingRodGrab(fopAc_ac_c*) const;
@@ -1897,12 +2283,12 @@ public:
/* 80101890 */ BOOL checkZoraWearMaskDraw();
/* 801018E4 */ void checkAcceptUseItemInWater(u16) const;
/* 80101934 */ void swimDeleteItem();
- /* 801019B8 */ void getZoraSwim() const;
+ /* 801019B8 */ bool getZoraSwim() const;
/* 80101A18 */ void getSwimFrontMaxSpeed() const;
/* 80101AA8 */ void getSwimMaxFallSpeed() const;
/* 80101B44 */ void checkOxygenTimer();
/* 80101C94 */ void offOxygenTimer();
- /* 80101CB8 */ void checkPossibleWaterInMode() const;
+ /* 80101CB8 */ bool checkPossibleWaterInMode() const;
/* 80101CF4 */ void setWaterInAnmRate(daPy_frameCtrl_c*, f32);
/* 80101D70 */ void swimBgCheck(f32);
/* 801023E4 */ void setSpeedAndAngleSwim();
@@ -2047,7 +2433,7 @@ public:
/* 801107BC */ void checkWaterInKandelaar(f32);
/* 80110840 */ void offKandelaarModel();
/* 801108EC */ void kandelaarModelCallBack();
- /* 80110C6C */ void checkKandelaarEquipAnime() const;
+ /* 80110C6C */ BOOL checkKandelaarEquipAnime() const;
/* 80110C94 */ void preKandelaarDraw();
/* 80110E84 */ void setKandelaarModel();
/* 80110F88 */ void resetOilBottleModel();
@@ -2096,7 +2482,7 @@ public:
/* 80115AA0 */ void procIronBallReturn();
/* 80115C20 */ BOOL checkEventRun() const;
/* 80115C50 */ void createNpcTks(cXyz*, int, u32);
- /* 80115EC0 */ void checkDemoAction();
+ /* 80115EC0 */ int checkDemoAction();
/* 80116E60 */ void checkDemoMoveMode(u32) const;
/* 80116E9C */ void setDemoMoveData(u32*, cXyz const*);
/* 80117064 */ void setNoDrawSwordShield(int, u16);
@@ -2106,7 +2492,7 @@ public:
/* 80117C90 */ void resetSpecialEvent();
/* 80117CF8 */ void endDemoMode();
/* 801180EC */ void getDemoLookActor();
- /* 80118170 */ void checkFlyAtnWait();
+ /* 80118170 */ bool checkFlyAtnWait();
/* 801181A0 */ void setGetItemFace(u16);
/* 801182D4 */ void checkGrabTalkActor(fopAc_ac_c*);
/* 80118308 */ void setTalkStartBack(cXyz*);
@@ -2119,16 +2505,16 @@ public:
/* 801188B0 */ void setDemoLeftHandIndex(u16);
/* 8011894C */ void setDemoRide(u16);
/* 801189F8 */ void setDemoBodyBck(dDemo_actor_c*, u16);
- /* 80118AD0 */ void checkFinalBattle();
- /* 80118B34 */ void checkRestartDead(int, int);
+ /* 80118AD0 */ BOOL checkFinalBattle();
+ /* 80118B34 */ BOOL checkRestartDead(int, int);
/* 80118BF4 */ void setDeadRideSyncPos();
/* 80118C98 */ BOOL checkDeadHP();
- /* 80118D7C */ void checkDeadAction(int);
+ /* 80118D7C */ BOOL checkDeadAction(int);
/* 80118FF8 */ void setHighModelBck(mDoExt_bckAnm*, u16);
/* 801190A4 */ void setHighModelFaceBtk(u16);
/* 80119134 */ void setDemoBrk(J3DAnmTevRegKey**, J3DModel*, u16);
/* 801191C4 */ void setStickAnmData(J3DAnmBase*, int, int, u16, int);
- /* 801195C0 */ void procDemoCommon();
+ /* 801195C0 */ int procDemoCommon();
/* 801195F8 */ void procCoToolDemoInit();
/* 801196D8 */ void procCoToolDemo();
/* 80119D98 */ void procCoTalkInit();
@@ -2179,7 +2565,7 @@ public:
/* 8011D544 */ void procCoGetReadySitInit();
/* 8011D64C */ void procCoGetReadySit();
/* 8011D6D0 */ void procCoTwGateInit();
- /* 8011D7D4 */ void procCoTwGate();
+ /* 8011D7D4 */ int procCoTwGate();
/* 8011D82C */ void procWolfSnowEscapeInit();
/* 8011D8F8 */ void procWolfSnowEscape();
/* 8011DB04 */ void procZoraMoveInit();
@@ -2199,7 +2585,7 @@ public:
/* 8011E9F8 */ void procGanonFinishInit();
/* 8011EA78 */ bool procGanonFinish();
/* 8011EAE8 */ void procCutFastReadyInit();
- /* 8011EB8C */ void procCutFastReady();
+ /* 8011EB8C */ int procCutFastReady();
/* 8011EBDC */ int procMasterSwordStickInit();
/* 8011EC60 */ int procMasterSwordStick();
/* 8011ED18 */ int procMasterSwordPullInit();
@@ -2697,7 +3083,7 @@ public:
bool i_checkFmChainGrabAnime() const { return checkUpperAnime(0x62) || checkUpperAnime(0x2A0); }
BOOL i_checkAttentionLock() { return mAttention->Lockon(); }
- bool checkUpperAnime(u16 pIdx) const { return mUpperAnime[UPPER_NOW].getIdx() == pIdx; }
+ bool checkUpperAnime(u16 pIdx) const { return mUpperAnmHeap[UPPER_2].getIdx() == pIdx; }
bool checkIronBallWaitAnime() const { return checkUpperAnime(0x19C); }
bool checkHorseTurnLAnime() const { return checkUpperAnime(0x24C); }
bool checkHorseTurnRAnime() const { return checkUpperAnime(0x24D); }
@@ -2727,7 +3113,7 @@ public:
return mEquipItem != 0x102 && checkBoomerangAnime();
}
J3DAnmTransform* getNowAnmPackUpper(daAlink_UPPER param_0) {
- return mNowAnmPack[param_0].getAnmTransform();
+ return mNowAnmPackUpper[param_0].getAnmTransform();
}
void setFacePriBck(u16 param_0) { setFaceBck(param_0, 1, 0xFFFF); }
void cancelFmChainGrabFromOut() {
@@ -2786,12 +3172,15 @@ public:
bool checkResetRootMtx(int param_0) const { return field_0x2f90 != 0 && param_0 == 1; }
+ bool talkTrigger() const { return mItemTrigger & BTN_A; }
+ J3DAnmTransform* getNowAnmPackUnder(daAlink_UNDER i_idx) { return mNowAnmPackUnder[i_idx].getAnmTransform(); }
+
inline void startRestartRoomFromOut(int, u32, int);
inline u16 getReadyItem();
- static u8 const m_mainBckShield[80];
- static u8 const m_mainBckSword[20];
- static u8 const m_mainBckFishing[112];
+ static daAlink_BckData const m_mainBckShield[20];
+ static daAlink_BckData const m_mainBckSword[5];
+ static daAlink_BckData const m_mainBckFishing[28];
static daAlink_AnmData const m_anmDataTable[414];
static daAlink_WlAnmData const m_wlAnmDataTable[147];
static u8 const m_faceTexDataTable[652];
@@ -2830,7 +3219,7 @@ private:
/* 0x00690 */ mDoExt_bckAnm* mpDemoFCTmpBck;
/* 0x00694 */ J3DDeformData* mpDemoFCTmpBls;
/* 0x00698 */ void* field_0x0698;
- /* 0x0069C */ void* field_0x069c;
+ /* 0x0069C */ mDoExt_blkAnm* field_0x069c;
/* 0x006A0 */ J3DModel* mpDemoHLTmpModel;
/* 0x006A4 */ mDoExt_bckAnm* mpDemoHLTmpBck;
/* 0x006A8 */ J3DModel* mpDemoHRTmpModel;
@@ -2884,7 +3273,10 @@ private:
/* 0x007A0 */ J3DModel* mpWlMidnaHatModel;
/* 0x007A4 */ J3DModel* field_0x7a4; // related to wolf
/* 0x007A8 */ J3DModel* mpWlMidnaHairModel;
- /* 0x007AC */ u8 field_0x7ac[0x10];
+ /* 0x007AC */ J3DAnmTevRegKey* field_0x7ac;
+ /* 0x007B0 */ J3DAnmTevRegKey* field_0x7b0;
+ /* 0x007B4 */ J3DAnmTevRegKey* field_0x7b4;
+ /* 0x007B8 */ J3DAnmTevRegKey* field_0x7b8;
/* 0x007BC */ mDoExt_bckAnm* m_sWindowBck;
/* 0x007C0 */ u32 mpWarpTexData;
/* 0x007C4 */ daPy_actorKeep_c mWolfLockAcKeep[10];
@@ -2912,14 +3304,14 @@ private:
/* 0x01E4C */ cBgS_PolyInfo mPolyInfo4;
/* 0x01E5C */ dBgS_ObjLinChk mObjLinChk;
/* 0x01ECC */ dBgS_ObjGndChk mObjGndChk;
- /* 0x01F20 */ mDoExt_MtxCalcAnmBlendTblOld* field_0x1f20;
+ /* 0x01F20 */ mDoExt_MtxCalcAnmBlendTbl* field_0x1f20;
/* 0x01F24 */ mDoExt_MtxCalcAnmBlendTblOld* field_0x1f24;
- /* 0x01F28 */ mDoExt_AnmRatioPack field_0x1f28[3];
- /* 0x01F40 */ mDoExt_AnmRatioPack mNowAnmPack[3];
- /* 0x01F58 */ daPy_anmHeap_c mUnderAnime[3];
- /* 0x01F94 */ daPy_anmHeap_c mUpperAnime[3];
- /* 0x01FD0 */ daPy_frameCtrl_c mFrameCtrl1[3];
- /* 0x02018 */ daPy_frameCtrl_c mFrameCtrl2[3];
+ /* 0x01F28 */ mDoExt_AnmRatioPack mNowAnmPackUnder[3];
+ /* 0x01F40 */ mDoExt_AnmRatioPack mNowAnmPackUpper[3];
+ /* 0x01F58 */ daPy_anmHeap_c mUnderAnmHeap[3];
+ /* 0x01F94 */ daPy_anmHeap_c mUpperAnmHeap[3];
+ /* 0x01FD0 */ daPy_frameCtrl_c mUnderFrameCtrl[3];
+ /* 0x02018 */ daPy_frameCtrl_c mUpperFrameCtrl[3];
/* 0x02060 */ mDoExt_MtxCalcOldFrame* field_0x2060;
/* 0x02064 */ daAlink_sight_c mSight;
/* 0x020F0 */ daPy_anmHeap_c mAnmHeap3;
@@ -2970,11 +3362,11 @@ private:
/* 0x02A4C */ daAlink_footData_c mFootData2[2];
/* 0x02B94 */ f32* field_0x2b94;
/* 0x02B98 */ f32 field_0x2b98;
- /* 0x02B98 */ f32* field_0x2b9c;
+ /* 0x02B98 */ f32 field_0x2b9c;
/* 0x02BA0 */ f32* field_0x2ba0;
/* 0x02BA4 */ f32* field_0x2ba4;
/* 0x02BA8 */ f32 mSinkShapeOffset;
- /* 0x02BAC */ cXyz field_0x2bac;
+ /* 0x02BAC */ f32 field_0x2bac[3];
/* 0x02BB8 */ Mtx mInvMtx;
/* 0x02BE8 */ Mtx field_0x2be8;
/* 0x02C18 */ Mtx mRootMtx;
@@ -3021,11 +3413,11 @@ private:
/* 0x02FA2 */ u8 mActiveBombNum;
/* 0x02FA3 */ u8 field_0x2fa3;
/* 0x02FA4 */ u8 mRollCrashFlg;
- /* 0x02FA5 */ u8 field_0x2fa5;
+ /* 0x02FA5 */ u8 mPolySound;
/* 0x02FA6 */ u8 field_0x2fa6;
/* 0x02FA7 */ u8 field_0x2fa7;
/* 0x02FA8 */ u8 field_0x2fa8;
- /* 0x02FA9 */ u8 field_0x2fa9;
+ /* 0x02FA9 */ u8 mWolfEyeUpTimer;
/* 0x02FAA */ u8 mRideStatus;
/* 0x02FAB */ u8 field_0x2fab;
/* 0x02FAC */ u8 mExitDirection;
@@ -3042,7 +3434,7 @@ private:
/* 0x02FB7 */ u8 field_0x2fb7;
/* 0x02FB8 */ u8 field_0x2fb8;
/* 0x02FB9 */ u8 field_0x2fb9;
- /* 0x02FBA */ u8 field_0x2fba;
+ /* 0x02FBA */ u8 mHotspringRecoverTimer;
/* 0x02FBB */ u8 field_0x2fbb;
/* 0x02FBC */ u8 field_0x2fbc;
/* 0x02FBD */ u8 field_0x2fbd;
@@ -3206,7 +3598,7 @@ private:
/* 0x030FA */ s16 field_0x30fa;
/* 0x030FC */ u16 field_0x30fc;
/* 0x030FE */ u16 field_0x30fe;
- /* 0x03100 */ u16 field_0x3100;
+ /* 0x03100 */ s16 field_0x3100;
/* 0x03102 */ s16 field_0x3102;
/* 0x03104 */ s16 field_0x3104;
/* 0x03106 */ u16 field_0x3106;
@@ -5596,17 +5988,17 @@ class daAlinkHIO_boom_c1 {
public:
/* 0x00 */ daAlinkHIO_anm_c mThrowAnm;
/* 0x14 */ daAlinkHIO_anm_c mCatchAnm;
- /* 0x28 */ s16 field_0x28;
+ /* 0x28 */ s16 field_0x28; // return time?
/* 0x2A */ s16 mBgThroughTime;
- /* 0x2C */ f32 field_0x2c;
- /* 0x30 */ f32 field_0x30;
- /* 0x34 */ f32 field_0x34;
- /* 0x38 */ f32 field_0x38;
- /* 0x3C */ f32 field_0x3c;
- /* 0x40 */ f32 field_0x40;
- /* 0x44 */ f32 field_0x44;
+ /* 0x2C */ f32 mIdleAnmSpeed;
+ /* 0x30 */ f32 mStartInterpolation;
+ /* 0x34 */ f32 mFlySpeed;
+ /* 0x38 */ f32 mFlySpeed2; // return speed?
+ /* 0x3C */ f32 mFlyDistMax;
+ /* 0x40 */ f32 mHorsebackFlyDistMax;
+ /* 0x44 */ f32 mLockDistMax;
/* 0x48 */ f32 mCatchSpeed;
-}; // Size: 0x4c
+}; // Size: 0x4C
class daAlinkHIO_boom_c0 {
public:
@@ -5802,16 +6194,26 @@ public:
class mDoExt_morf_c;
+typedef int (daMidna_c::*daMidna_func)();
class daMidna_c : public fopAc_ac_c {
public:
enum daMidna_ERFLG0 {
- NO_SERVICE_WAIT = 128,
- FORCE_PANIC = 8,
+ ERFLG0_NO_SERVICE_WAIT = 0x80,
+ ERFLG0_FORCE_PANIC = 8,
};
- enum daMidna_FLG0 { NPC_NEAR = 0x100000, NPC_FAR = 0x40000, NO_DRAW = 0x2000 };
+ enum daMidna_FLG0 {
+ FLG0_UNK_8000000 = 0x8000000,
+ FLG0_NPC_NEAR = 0x100000,
+ FLG0_NPC_FAR = 0x40000,
+ FLG0_NO_DRAW = 0x2000,
+ FLG0_UNK_200 = 0x200,
+ };
- enum daMidna_FLG1 { FORCE_NORMAL_COLOR = 8, FORCE_TIRED_COLOR = 4 };
+ enum daMidna_FLG1 {
+ FLG1_FORCE_NORMAL_COL = 8,
+ FLG1_FORCE_TIRED_COL = 4,
+ };
enum daMidna_ANM {};
@@ -5873,9 +6275,14 @@ public:
bool checkDemoTypeNone() const { return mDemoType == 0; }
void changeOriginalDemo() { mDemoType = 3; }
void changeDemoMode(u32 mode) { mDemoMode = mode; }
- BOOL checkNpcNear() { return checkStateFlg0(NPC_NEAR); }
- BOOL checkNpcFar() { return checkStateFlg0(NPC_FAR); }
- BOOL checkNoDraw() const { return checkStateFlg0(NO_DRAW); }
+ BOOL checkNpcNear() { return checkStateFlg0(FLG0_NPC_NEAR); }
+ BOOL checkNpcFar() { return checkStateFlg0(FLG0_NPC_FAR); }
+ BOOL checkNoDraw() const { return checkStateFlg0(FLG0_NO_DRAW); }
+ int checkMetamorphoseEnable() { return (this->*mpFunc)(); }
+
+ bool checkPortalObjRide() const {
+ return checkStateFlg0(FLG0_UNK_8000000) && checkStateFlg0(FLG0_UNK_200);
+ }
inline bool checkMidnaRealBody();
@@ -5883,72 +6290,73 @@ public:
static u8 const m_anmDataTable[636];
private:
- /* 0x0568 */ request_of_phase_process_class* field_0x568;
- /* 0x056C */ u8 field_0x56c[4];
+ /* 0x0568 */ request_of_phase_process_class mPhase;
/* 0x0570 */ J3DModel* field_0x570;
/* 0x0574 */ J3DModel* field_0x574;
- /* 0x0578 */ mDoExt_morf_c* field_0x578;
+ /* 0x0578 */ mDoExt_McaMorfSO* field_0x578;
/* 0x057C */ mDoExt_McaMorfCallBack1_c* field_0x57c;
/* 0x0580 */ cXyz* field_0x580;
/* 0x0584 */ mDoExt_bckAnm field_0x584;
/* 0x05A0 */ mDoExt_bckAnm field_0x5a0;
- /* 0x05BC */ u8 field_0x5bc[8];
+ /* 0x05BC */ J3DAnmTexPattern* field_0x5bc;
+ /* 0x05C0 */ J3DAnmTextureSRTKey* field_0x5c0;
/* 0x05C4 */ mDoExt_invisibleModel field_0x5c4;
- /* 0x05CC */ mDoExt_invisibleModel field_0x5cc;
- /* 0x05D4 */ mDoExt_invisibleModel field_0x5d4;
- /* 0x05DC */ mDoExt_invisibleModel field_0x5dc;
+ /* 0x05CC */ mDoExt_invisibleModel mInvMaskBmd;
+ /* 0x05D4 */ mDoExt_invisibleModel mInvHandsBmd;
+ /* 0x05DC */ mDoExt_invisibleModel mInvHairhandBmd;
/* 0x05E4 */ daPy_anmHeap_c field_0x5e4[3];
/* 0x0620 */ daPy_anmHeap_c field_0x620;
/* 0x0634 */ daPy_anmHeap_c field_0x634;
- /* 0x0648 */ J3DAnmBase* field_0x648;
- /* 0x064C */ J3DAnmBase* field_0x64c;
- /* 0x0650 */ J3DAnmBase* field_0x650;
- /* 0x0654 */ J3DAnmBase* field_0x654;
- /* 0x0658 */ u8 field_0x658[0x10];
- /* 0x0668 */ J3DAnmBase* field_0x668;
- /* 0x066C */ J3DAnmBase* field_0x66c;
- /* 0x0670 */ u8 field_0x670[4];
- /* 0x0674 */ J3DModel* field_0x674;
- /* 0x0678 */ u8 field_0x678[4];
- /* 0x067C */ J3DModel* field_0x67c;
- /* 0x0680 */ u8 field_0x680[4];
- /* 0x0684 */ J3DModel* field_0x684;
- /* 0x0688 */ J3DModel* field_0x688;
- /* 0x068C */ J3DModel* field_0x68c;
- /* 0x0690 */ J3DModel* field_0x690;
- /* 0x0694 */ J3DModel* field_0x694;
- /* 0x0698 */ J3DModel* field_0x698;
- /* 0x069C */ u8 field_0x98c[0x10];
- /* 0x06AC */ J3DModel* field_0x6ac;
- /* 0x06B0 */ J3DModel* field_0x6b0;
- /* 0x06B4 */ u8 field_0x6b4[4];
- /* 0x06B8 */ mDoExt_bckAnm* field_0x6b8;
- /* 0x06BC */ J3DDeformData* field_0x6bc;
- /* 0x06C0 */ u8 field_0x6c0[4];
- /* 0x06C4 */ J3DFrameCtrl* field_0x6c4;
- /* 0x06C8 */ J3DModel* field_0x6c8;
- /* 0x06CC */ mDoExt_bckAnm* field_0x6cc;
- /* 0x06D0 */ J3DModel* field_0x6d0;
- /* 0x06D4 */ mDoExt_bckAnm* field_0x6d4;
- /* 0x06D8 */ J3DModel* field_0x6d8;
- /* 0x06DC */ mDoExt_bckAnm* field_0x6dc;
- /* 0x06E0 */ s16 field_0x6e0;
- /* 0x06E2 */ s16 field_0x6e2;
- /* 0x06E4 */ s16 field_0x6e4;
- /* 0x06E6 */ s16 field_0x6e6;
- /* 0x06E8 */ u8 field_0x6e8;
- /* 0x06E9 */ u8 field_0x6e9;
- /* 0x06EA */ u8 field_0x6ea;
- /* 0x06EB */ u8 field_0x6eb;
+ /* 0x0648 */ J3DAnmTextureSRTKey* field_0x648;
+ /* 0x064C */ J3DAnmTextureSRTKey* field_0x64c;
+ /* 0x0650 */ J3DAnmTextureSRTKey* field_0x650;
+ /* 0x0654 */ J3DAnmTextureSRTKey* field_0x654;
+ /* 0x0658 */ J3DAnmTevRegKey* field_0x658;
+ /* 0x065C */ J3DAnmTevRegKey* field_0x65c;
+ /* 0x0660 */ J3DAnmTevRegKey* field_0x660;
+ /* 0x0664 */ J3DAnmTevRegKey* field_0x664;
+ /* 0x0668 */ J3DAnmTevRegKey* field_0x668;
+ /* 0x066C */ J3DAnmTevRegKey* field_0x66c;
+ /* 0x0670 */ J3DModel* field_0x670;
+ /* 0x0674 */ J3DModel* mpMaskBmd;
+ /* 0x0678 */ J3DModel* field_0x678;
+ /* 0x067C */ J3DModel* mpHandsBmd;
+ /* 0x0680 */ J3DModel* field_0x680;
+ /* 0x0684 */ J3DModel* mpHairhandBmd;
+ /* 0x0688 */ J3DModel* mpDemoBDTmpBmd;
+ /* 0x068C */ J3DModel* mpDemoBDMaskBmd;
+ /* 0x0690 */ J3DModel* mpDemoBDHandsBmd;
+ /* 0x0694 */ J3DModel* mpDemoBDHairhandBmd;
+ /* 0x0698 */ J3DModel* mpGokouBmd;
+ /* 0x069C */ J3DShape* field_0x69c;
+ /* 0x06A0 */ J3DShape* field_0x6a0;
+ /* 0x06A4 */ J3DShape* field_0x6a4;
+ /* 0x06A8 */ J3DShape* field_0x6a8;
+ /* 0x06AC */ J3DModel* mpDemoFCBlendBmd;
+ /* 0x06B0 */ J3DModel* mpDemoFCTongueBmd;
+ /* 0x06B4 */ J3DAnmTextureSRTKey* field_0x6b4;
+ /* 0x06B8 */ mDoExt_bckAnm* mpDemoFCTmpBck;
+ /* 0x06BC */ J3DDeformData* mpDemoFCTmpBls;
+ /* 0x06C0 */ J3DAnmCluster* field_0x6c0;
+ /* 0x06C4 */ mDoExt_blkAnm* field_0x6c4;
+ /* 0x06C8 */ J3DModel* mpDemoHLTmpBmd;
+ /* 0x06CC */ mDoExt_bckAnm* mpDemoHLTmpBck;
+ /* 0x06D0 */ J3DModel* mpDemoHRTmpBmd;
+ /* 0x06D4 */ mDoExt_bckAnm* mpDemoHRTmpBck;
+ /* 0x06D8 */ J3DModel* mpDemoHDTmpBmd;
+ /* 0x06DC */ mDoExt_bckAnm* mpDemoHDTmpBck;
+ /* 0x06E0 */ J3DGXColorS10 field_0x6e0;
+ /* 0x06E8 */ J3DGXColor field_0x6e8;
/* 0x06EC */ u8 field_0x6ec;
/* 0x06ED */ u8 field_0x6ed;
/* 0x06EE */ u8 field_0x6ee;
/* 0x06EF */ u8 field_0x6ef;
- /* 0x06F0 */ u8 field_0x6f0[8];
+ /* 0x06F0 */ void* field_0x6f0;
+ /* 0x06F4 */ void* field_0x6f4;
/* 0x06F8 */ void* field_0x6f8;
/* 0x06FC */ Z2Creature field_0x6fc;
- /* 0x078C */ dMsgFlow_c field_0x78c;
- /* 0x07D8 */ dBgS_LinkLinChk field_0x7d8;
+ /* 0x078C */ dMsgFlow_c mMsgFlow;
+ /* 0x07D8 */ dBgS_LinkLinChk mLinChk;
/* 0x0848 */ u8 mMotionNum;
/* 0x0849 */ u8 mFaceNum;
/* 0x084A */ u8 field_0x84a[4];
@@ -5958,7 +6366,8 @@ private:
/* 0x085A */ s16 field_0x85a;
/* 0x085C */ u8 field_0x85c[0x22];
/* 0x087E */ s16 field_0x87e;
- /* 0x0880 */ u8 field_0x880[0x10];
+ /* 0x0880 */ u8 field_0x880[0xC];
+ /* 0x088C */ int mStaffID;
/* 0x0890 */ u32 mStateFlg0;
/* 0x0894 */ u32 mStateFlg1;
/* 0x0898 */ u32 mEndResetStateFlg0;
@@ -5973,9 +6382,11 @@ private:
/* 0x0964 */ cXyz field_0x964[5];
/* 0x09A0 */ u8 field_0x9a0[0x14];
/* 0x09C4 */ cXyz field_0x9c4;
+ /* 0x09D0 */ u8 field_0x9d0[4];
+ /* 0x09D4 */ daMidna_func mpFunc;
};
-static void* daAlink_searchPortal(fopAc_ac_c* param_0, void* param_1);
+static fopAc_ac_c* daAlink_searchPortal(fopAc_ac_c* param_0, void* param_1);
static void* daAlink_searchCanoe(fopAc_ac_c* param_0, void* param_1);
static void* daAlink_searchBoar(fopAc_ac_c* param_0, void* param_1);
static fopAc_ac_c* daAlink_searchLightBall(fopAc_ac_c* p_actor, void* param_1);
diff --git a/include/d/a/d_a_npc.h b/include/d/a/d_a_npc.h
index 082622f526..6c3bdb6bbd 100644
--- a/include/d/a/d_a_npc.h
+++ b/include/d/a/d_a_npc.h
@@ -2,9 +2,41 @@
#define D_A_D_A_NPC_H
#include "d/com/d_com_inf_game.h"
+#include "d/d_path.h"
+#include "d/msg/d_msg_object.h"
#include "dolphin/types.h"
#include "global.h"
+struct dPnt {};
+
+class daNpcT_ActorMngr_c {
+private:
+ /* 0x0 */ u32 mActorID;
+
+public:
+ /* 801456D4 */ void initialize();
+ /* 801456E0 */ void entry(fopAc_ac_c*);
+ /* 801456FC */ void remove();
+ /* 80145708 */ fopAc_ac_c* getActorP();
+
+ /* 8014D108 */ virtual ~daNpcT_ActorMngr_c();
+};
+
+class daNpcT_MatAnm_c : public J3DMaterialAnm {
+private:
+ /* 0x0F4 */ mutable f32 field_0xF4;
+ /* 0x0F8 */ mutable f32 field_0xF8;
+ /* 0x0FC */ f32 mTranslationX;
+ /* 0x100 */ f32 mTranslationY;
+ /* 0x104 */u8 field_0x104;
+ /* 0x105 */u8 field_0x105;
+
+public:
+ /* 80145764 */ void initialize();
+ /* 80145788 */ virtual void calc(J3DMaterial*) const;
+ /* 8014D24C */ ~daNpcT_MatAnm_c();
+};
+
class daNpcT_MotionSeqMngr_c {
public:
class sequenceStepData_c {
@@ -34,19 +66,6 @@ public:
/* 8014D0C0 */ virtual ~daNpcT_MotionSeqMngr_c();
};
-class daNpcT_ActorMngr_c {
-private:
- /* 0x0 */ u32 mActorID;
-
-public:
- /* 801456D4 */ void initialize();
- /* 801456E0 */ void entry(fopAc_ac_c*);
- /* 801456FC */ void remove();
- /* 80145708 */ fopAc_ac_c* getActorP();
-
- /* 8014D108 */ virtual ~daNpcT_ActorMngr_c();
-};
-
class daNpcT_JntAnm_c {
private:
/* 0x000 */ daNpcT_ActorMngr_c mActrMngr;
@@ -95,7 +114,8 @@ public:
private:
/* 0x00 */ csXyz field_0x0[2];
- /* 0x0C */ f32 field_0xc[2];
+ /* 0x0C */ f32 field_0xc;
+ /* 0x0C */ f32 field_0x10;
/* 0x14 */ s16 mStagger;
/* 0x16 */ s16 field_0x16;
/* 0x18 */ u8 mRebirth;
@@ -111,6 +131,59 @@ struct daNpcT_motionAnmData_c {
u8 data[8];
};
+class daNpcT_Hermite_c {
+public:
+ /* 8014CBAC */ ~daNpcT_Hermite_c();
+
+ /* 0x00 */ f32 field_0x00;
+ /* 0x04 */ cXyz mPosition;
+ /* 0x10 */ f32 field_0x10;
+};
+
+class daNpcT_Path_c {
+private:
+ /* 0x00 */ dPath* mpRoomPath;
+ /* 0x04 */ cXyz mPosition;
+ /* 0x10 */ f32 field_0x10;
+ /* 0x14 */ f32 field_0x14;
+ /* 0x18 */ f32 field_0x18;
+ /* 0x1C */ u16 mIdx;
+ /* 0x1E */ u16 field_0x1E;
+ /* 0x20 */ u8 mDirection;
+ /* 0x21 */ u8 mIsClosed;
+
+public:
+ /* 80145B7C */ void hermite(cXyz&, cXyz&, cXyz&, cXyz&, daNpcT_Hermite_c&, cXyz&);
+ /* 80145C40 */ void initialize();
+ /* 80145C74 */ int setPathInfo(u8, s8, u8);
+ /* 80145D2C */ int setNextPathInfo(s8, u8);
+ /* 80145DA0 */ void reverse();
+ /* 80145DD0 */ int setNextIdx(int);
+ /* 80145E38 */ int getDstPos(cXyz, cXyz*, int);
+ /* 80145FB4 */ int getDstPosH(cXyz, cXyz*, int, int);
+ /* 80146188 */ int chkPassed1(cXyz, int);
+ /* 801464D8 */ int chkPassed2(cXyz, cXyz*, int, int);
+
+ inline cXyz* getPntPos(u16 i_idx) {
+ u16 tmpidx = i_idx;
+
+ dStage_dPnt_c* tmppnt = &mpRoomPath->m_points[tmpidx];
+ return &tmppnt->m_position;
+ }
+
+ inline int chkClose() {
+ int roomPath = dPath_ChkClose(mpRoomPath);
+ return roomPath;
+ }
+
+ u16& getNumPnts() {
+ dPath* path = mpRoomPath;
+ return path->m_num;
+ }
+
+ inline u16& getIdx() { return mIdx; }
+};
+
class mDoExt_McaMorfSO;
class daNpcT_c : public fopAc_ac_c {
@@ -162,7 +235,7 @@ public:
/* 0xD90 */ u32 field_0xd90;
/* 0xD94 */ u32 field_0xd94;
/* 0xD98 */ u32 field_0xd98;
- /* 0xD9C */ u32 field_0xd9c;
+ /* 0xD9C */ profile_method_class* mSubMtd;
/* 0xDA0 */ u8 field_0xda0[8];
/* 0xDA8 */ u32 field_0xda8;
/* 0xDAC */ int field_0xdac;
@@ -174,9 +247,9 @@ public:
/* 0xDC4 */ u8 field_0xdc4[4];
/* 0xDC8 */ s16 field_0xdc8;
/* 0xDCA */ s16 field_0xdca;
- /* 0xDCC */ u8 field_0xdcc[8];
+ /* 0xDCC */ u8 field_0xdcc[10];
/* 0xDD4 */ s16 field_0xdd4;
- /* 0xDD8 */ s16 field_0xdd8;
+ /* 0xDD8 */ s16 mStepNo;
/* 0xDDA */ s16 field_0xdda;
/* 0xDDC */ f32 field_0xddc;
/* 0xDE0 */ f32 field_0xde0;
@@ -235,13 +308,13 @@ public:
/* 8014886C */ int draw(int, int, f32, _GXColorS10*, f32, int, int, int);
/* 80148C70 */ void setEnvTevColor();
/* 80148CCC */ void setRoomNo();
- /* 80148D10 */ void checkEndAnm(f32);
+ /* 80148D10 */ int checkEndAnm(f32);
/* 80148DD0 */ void checkEndAnm(J3DFrameCtrl*, f32);
/* 80148E4C */ void playAllAnm();
/* 80149190 */ void setMtx();
/* 8014924C */ void ctrlFaceMotion();
/* 80149300 */ void ctrlMotion();
- /* 801493B8 */ void ctrlMsgAnm(int*, int*, fopAc_ac_c*, int);
+ /* 801493B8 */ int ctrlMsgAnm(int*, int*, fopAc_ac_c*, int);
/* 8014A224 */ void evtChange();
/* 8014A388 */ void setFaceMotionAnm(int, bool);
/* 8014A908 */ void setPos(cXyz);
@@ -261,11 +334,11 @@ public:
/* 8014B648 */ void step(s16, int, int, int, int);
/* 8014B808 */ void calcSpeedAndAngle(cXyz, int, s16, s16);
/* 8014BB00 */ void getActorDistance(fopAc_ac_c*, int, int);
- /* 8014BBF0 */ void initTalk(int, fopAc_ac_c**);
+ /* 8014BBF0 */ int initTalk(int, fopAc_ac_c**);
/* 8014BC78 */ void talkProc(int*, int, fopAc_ac_c**, int);
/* 8014BE2C */ void getNearestActorP(s16);
/* 8014BEE4 */ void getEvtAreaTagP(int, int);
- /* 8014BFB0 */ void getShopItemTagP();
+ /* 8014BFB0 */ u32 getShopItemTagP();
/* 8014C030 */ void setHitodamaPrtcl();
/* 8014CD20 */ virtual ~daNpcT_c();
@@ -316,7 +389,13 @@ public:
/* 8014CCE8 */ virtual void changeBtk(int*, int*);
/* 8014A628 */ virtual void setMotionAnm(int, f32, int);
- bool checkHide() { return !field_0xe25 && (!dComIfGs_wolfeye_effect_check() && field_0xa89); }
+ inline bool checkHide() {
+ return field_0xe25 || (!dComIfGs_wolfeye_effect_check() && field_0xa89);
+ }
+
+ inline s16 checkStep() {
+ return mStepNo == 1;
+ }
static u8 const mCcDObjData[48];
static u8 mCcDCyl[68];
@@ -337,7 +416,7 @@ public:
/* 801506D8 */ void entry(unsigned int);
/* 801506BC */ void entry(fopAc_ac_c*);
/* 801506E0 */ void remove();
- /* 801506EC */ void getActorP();
+ /* 801506EC */ fopAc_ac_c* getActorP();
/* 80155E40 */ virtual ~daNpcF_ActorMngr_c();
};
@@ -431,7 +510,7 @@ private:
/* 0x9F4 */ u8 field_0x9f4;
/* 0x9F5 */ u8 field_0x9f5;
/* 0x9F6 */ u8 field_0x9f6;
- /* 0x9F8 */ dMsgFlow_c field_0x9f8;
+ /* 0x9F8 */ dMsgFlow_c mFlow;
/* 0xA44 */ cBgS_GndChk field_0xa44;
/* 0xA80 */ dBgS_GndChk field_0xa80;
/* 0xAD4 */ dBgS_LinChk field_0xad4;
@@ -443,7 +522,7 @@ public:
/* 801522AC */ void draw(int, int, f32, _GXColorS10*, int);
/* 80152614 */ void tgHitCallBack(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*);
/* 80152654 */ void srchAttnActor1(void*, void*);
- /* 801526E8 */ void srchActor(void*, void*);
+ /* 801526E8 */ void* srchActor(void*, void*);
/* 801528C8 */ void initialize();
/* 80152B2C */ void getTrnsfrmKeyAnmP(char*, int);
@@ -471,19 +550,19 @@ public:
/* 801539F0 */ void chkActorInSight(fopAc_ac_c*, f32);
/* 80153A78 */ void chkActorInArea(fopAc_ac_c*, cXyz, cXyz, s16);
/* 80153BDC */ void chkActorInAttnArea(fopAc_ac_c*, fopAc_ac_c*, int);
- /* 80153D1C */ void initTalk(int, fopAc_ac_c**);
+ /* 80153D1C */ int initTalk(int, fopAc_ac_c**);
/* 80153D84 */ void talkProc(int*, int, fopAc_ac_c**);
/* 80153EF4 */ void turn(s16, f32, int);
/* 801540A4 */ void step(s16, int, int, int);
/* 80154250 */ void setAngle(s16);
/* 80154278 */ void getDistTableIdx(int, int);
- /* 801542A0 */ void getEvtAreaTagP(int, int);
+ /* 801542A0 */ int getEvtAreaTagP(int, int);
/* 8015436C */ void getAttnActorP(int, void* (*)(void*, void*), f32, f32, f32, f32, s16, int,
int);
/* 80154730 */ void chkActorInSight2(fopAc_ac_c*, f32, s16);
- /* 80154834 */ void chkPointInArea(cXyz, cXyz, f32, f32, f32, s16);
- /* 801548F4 */ void chkPointInArea(cXyz, cXyz, cXyz, s16);
- /* 8015496C */ void getAttentionPos(fopAc_ac_c*);
+ /* 80154834 */ bool chkPointInArea(cXyz, cXyz, f32, f32, f32, s16);
+ /* 801548F4 */ bool chkPointInArea(cXyz, cXyz, cXyz, s16);
+ /* 8015496C */ cXyz getAttentionPos(fopAc_ac_c*);
/* 801549E0 */ void chkFindPlayer2(int, s16);
/* 80154BD8 */ void setHitodamaPrtcl();
@@ -508,13 +587,281 @@ public:
static u8 mCcDCyl[68];
static u8 mCcDSph[64];
static u8 mFindActorPList[400];
- static u8 mFindCount[4];
- static u8 mSrchActorName[2 + 2 /* padding */];
+ static s32 mFindCount;
+ static s16 mSrchActorName;
};
STATIC_ASSERT(sizeof(daNpcF_c) == 0xB48);
-void daNpcF_getPlayerInfoFromPlayerList(int param_0, int param_1, cXyz& param_2,
+int daNpcF_getPlayerInfoFromPlayerList(int param_0, int i_roomNo, cXyz& param_2,
csXyz& param_3);
+struct daBaseNpc_matAnm_c {
+ /* 8014D884 */ void calc(J3DMaterial*) const;
+ /* 80150444 */ ~daBaseNpc_matAnm_c();
+};
+
+class daBaseNpc_acMngr_c {
+private:
+ /* 0x00 */ u8 field_0x00[4];
+ /* 0x04 */ u32 mActorId;
+public:
+ /* 8014D804 */ daBaseNpc_acMngr_c();
+ /* 8014D81C */ void entry(fopAc_ac_c*);
+ /* 8014D838 */ fopAc_ac_c* getActor();
+ /* 80150524 */ ~daBaseNpc_acMngr_c();
+};
+
+class daBaseNpc_path_c {
+private:
+ /* 0x000 */ f32 field_0x0;
+ /* 0x004 */ dPath* mpRoomPath;
+ /* 0x008 */ f32 field_0x8;
+ /* 0x00C */ dPath* field_0xc;
+ /* 0x010 */ u8 field_0x10[2558];
+ /* 0xA0E */ u16 field_0xa0e;
+ /* 0xA10 */ u16 mIdx;
+ /* 0xA12 */ s8 mDirection;
+ /* 0xA13 */ u8 field_0xa13[17];
+
+public:
+ /* 8014D998 */ daBaseNpc_path_c();
+ /* 8014D9A8 */ BOOL isPath();
+ /* 8014D9BC */ int setPathInfo(u8, s8, s8);
+ /* 8014DA48 */ void reverseDir();
+ /* 8014DA64 */ void chkPnt(cXyz);
+ /* 8014DAC4 */ void setNextPnt();
+ /* 8014DB04 */ u16 getIdx();
+ /* 8014DB0C */ void setIdx(u16);
+ /* 8014DB14 */ void getPntPos(u16);
+ /* 801503FC */ ~daBaseNpc_path_c();
+
+
+};
+
+class daBaseNpc_lookat_c {
+private:
+ /* 0x00 */ int field_0x00;
+ /* 0x04 */ csXyz mMaxJntLmt[2];
+ /* 0x10 */ u8 field_0x0A[12];
+ /* 0x1C */ csXyz mMinJntLmt[2];
+ /* 0x28 */ u8 field_0x28[12];
+ /* 0x34 */ cXyz mJntPos[3];
+ /* 0x4C */ u8 field_0x4C[24];
+ /* 0x64 */ csXyz mUnk[2];
+ /* 0x70 */ u8 field_0x70[12];
+ /* 0x7C */ csXyz mUnk2[2];
+ /* 0x88 */ u8 field_0x88[4];
+ /* 0x8C */ cXyz* mpAttnPos;
+
+public:
+ /* 8014DB40 */ void limitter(s16, s16*, s16, s16);
+ /* 8014DBB4 */ void calc(fopAc_ac_c*, f32 (*)[4], s16);
+ /* 8014E634 */ void setMaxJntLmt(csXyz, int);
+ /* 8014E658 */ void setMinJntLmt(csXyz, int);
+ /* 8014E67C */ void setJntPos(cXyz, int);
+ /* 8014E6A0 */ int setAttnPos(cXyz*);
+ /* 8014E6AC */ void getRot(int);
+ /* 801502EC */ ~daBaseNpc_lookat_c();
+};
+
+class daBaseNpc_c : public fopAc_ac_c {
+private:
+ /* 0x568 */ void* vtable;
+ /* 0x56C */ dBgS_Acch field_0x56c;
+ /* 0x744 */ u8 field_0x744[16];
+ /* 0x754 */ mDoExt_McaMorfSO* mMcaMorfAnm[2];
+ /* 0x758 */ Z2Creature mCreature;
+ /* 0x7EC */ mDoExt_bckAnm mBckAnm;
+ /* 0x808 */ mDoExt_btpAnm mBtpAnm;
+ /* 0x820 */ u8 tmp2[28];
+ /* 0x83c */ u16* field_0x83c;
+ /* 0x840 */ u16 field_0x840;
+ /* 0x842 */ u8 field_0x842[6];
+ /* 0x848 */ s32 mUnk;
+ /* 0x84C */ dMsgFlow_c mMsg;
+ /* 0x898 */ u8 field_0x898[2];
+ /* 0x89A */ s16 mEvtIdx;
+ /* 0x89C */ u8 field_0x89C[34];
+ /* 0x8BE */ u8 mRoomId;
+ /* 0x8C0 */ u8 field_0x8C0[90];
+ /* 0x91A */ csXyz field_0x91a;
+ /* 0x920 */ csXyz field_0xd7e;
+ /* 0x926 */ csXyz field_0xd84;
+ /* 0x92C */ csXyz field_0xd8a;
+ /* 0x932 */ csXyz field_0x932;
+ /* 0x938 */ u8 field_0x938[4];
+ /* 0x93C */ csXyz field_0x93c;
+ /* 0x940 */ u8 field_0x940[18];
+ /* 0x954 */ cXyz field_0x954;
+ /* 0x960 */ u8 field_0x960[36];
+ /* 0x984 */ csXyz field_0x984;
+ /* 0x98A */ u8 field_0x98A[18];
+ /* 0x99C */ csXyz field_0x99c;
+ /* 0x9A2 */ u8 field_0x9a2[70];
+ /* 0x9E8 */ const cBgS_PolyInfo mBgSPolyInfo;
+ /* 0x9F9 */ u8 field_0x9f9[27];
+
+public:
+ /* 8014E6C8 */ daBaseNpc_c();
+ /* 8014E89C */ ~daBaseNpc_c();
+ /* 8014EAD0 */ void execute();
+ /* 8014EC50 */ void draw(f32);
+ /* 8014EE3C */ bool getResName();
+ /* 8014EE44 */ J3DAnmTransform* getTrnsfrmKeyAnmP(char*, int);
+ /* 8014EE80 */ void setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int);
+ /* 8014EEE4 */ void setBckAnm(J3DAnmTransform*, f32, int, int, int, bool);
+ /* 8014EF28 */ J3DAnmTransform* getTexPtrnAnmP(char*, int);
+ /* 8014EF64 */ void setBtpAnm(J3DAnmTexPattern*, J3DModelData*, f32, int);
+ /* 8014EFA4 */ void attnSttsOn(int, int);
+ /* 8014EFF0 */ void setParam();
+ /* 8014EFF4 */ void orderEvent(int, char*);
+ /* 8014F09C */ void mainProc();
+ /* 8014F0A0 */ void setEnvTevColor();
+ /* 8014F0FC */ void setRoomNo();
+ /* 8014F140 */ bool btkCtrl();
+ /* 8014F148 */ int checkEndAnm(f32);
+ /* 8014F1C8 */ int checkEndAnm(J3DFrameCtrl*);
+ /* 8014F228 */ void allAnmPlay();
+ /* 8014F38C */ void adjustShapeAngle();
+ /* 8014F390 */ void setMtx(int);
+ /* 8014F4A0 */ void setCollisions();
+ /* 8014F4A4 */ void setAttnPos();
+ /* 8014F4A8 */ void drawOtherMdls();
+ /* 8014F4AC */ bool dbgDraw();
+
+ void setVtable(void* table) { vtable = table;}
+
+ static u8 const mCcDObj[48];
+ static u8 mCcDCyl[68];
+ static u8 mCcDSph[64];
+};
+
+class daBaseNpc_moveBgActor_c : public daBaseNpc_c {
+private:
+ /* 0xA14 */ u32 field_0xa14;
+
+
+public:
+ /* 8014F4B4 */ daBaseNpc_moveBgActor_c();
+ /* 8014F518 */ void MoveBGCreateHeap();
+ /* 8014F60C */ void
+ MoveBGCreate(char const*, int,
+ void (*)(dBgW*, void*, cBgS_PolyInfo const&, bool, cXyz*, csXyz*, csXyz*), u32);
+ /* 8014F6FC */ void MoveBGDelete();
+ /* 8014F770 */ void MoveBGExecute();
+ /* 801503BC */ bool CreateHeap();
+ /* 801503C4 */ bool Create();
+ /* 801503CC */ bool Delete();
+ /* 801503D4 */ bool Execute(f32 (**)[3][4]);
+ /* 801503DC */ bool Draw();
+ /* 801503E4 */ bool IsDelete();
+ /* 801503EC */ bool ToFore();
+ /* 801503F4 */ bool ToBack();
+ /* 80155FB0 */ ~daBaseNpc_moveBgActor_c();
+
+ static u8 m_name[4];
+ static u8 m_dzb_id[4];
+ static u8 m_set_func[4];
+};
+
+class daNpcF_MatAnm_c {
+private:
+ /* 0x000 */ J3DMaterialAnm mMaterialAnm;
+ /* 0x0F4 */ mutable f32 field_0xF4;
+ /* 0x0F8 */ mutable f32 field_0xF8;
+ /* 0x0FC */ f32 mTranslationX;
+ /* 0x100 */ f32 mTranslationY;
+ /* 0x104 */ u8 field_0x104;
+ /* 0x105 */ u8 field_0x105;
+
+public:
+ /* 80150738 */ void initialize();
+ /* 8015075C */ void calc(J3DMaterial*) const;
+ /* 80155ED0 */ ~daNpcF_MatAnm_c();
+};
+
+class daNpcF_SPCurve_c {
+private:
+ /* 0x00 */ u16 mNurbs;
+ /* 0x02 */ u16 field_0x02;
+ /* 0x04 */ u8 field_0x04;
+ /* 0x05 */ bool mIsClosed;
+ // /* 0x08 */ dPnt mPoints[96];
+
+
+public:
+ /* 80150870 */ void initialize(dPath*, int);
+};
+
+class daNpcF_Path_c {
+private:
+ /* 0x00 */ u16 mIdx;
+ /* 0x02 */ u8 field_0x02;
+ /* 0x03 */ u8 mIsClosed;
+ /* 0x04 */ dPath* mpRoomPath;
+ /* 0x08 */ f32 field_0x08;
+ /* 0x0C */ f32 field_0x0C;
+ /* 0x10 */ f32 field_0x10;
+ /* 0x14 */ cXyz mPosition;
+ /* 0x20 */ daNpcF_SPCurve_c mSPCurve;
+
+public:
+ /* 80150900 */ void initialize();
+ /* 8015095C */ int setPathInfo(u8, s8, u8);
+ /* 80150A24 */ int chkPassed(cXyz);
+ /* 80150A7C */ void chkPassedDst(cXyz);
+ /* 80150BBC */ void reverse();
+ /* 80150BE0 */ int setNextIdx();
+ /* 80150C18 */ u16 getNextIdx();
+ /* 80150C60 */ u16 getBeforeIdx();
+ /* 80150CA8 */ void getBeforePos(cXyz&);
+ /* 80150D44 */ void getNextPos(cXyz&);
+ /* 80150DE0 */ int getDstPos(cXyz, cXyz&);
+ /* 80150EB4 */ void setNextIdxDst(cXyz);
+
+ inline u16& getIdx() { return mIdx; };
+ inline cXyz* getPntPos(); // finish
+};
+
+class daNpcF_MoveBgActor_c {
+private:
+
+public:
+ /* 80155B54 */ ~daNpcF_MoveBgActor_c();
+ /* 80155E88 */ bool CreateHeap();
+ /* 80155E90 */ bool Create();
+ /* 80155E98 */ bool Delete();
+ /* 80155EA0 */ bool Execute(f32 (**)[3][4]);
+ /* 80155EA8 */ bool Draw();
+ /* 80155EB0 */ bool IsDelete();
+ /* 80155EB8 */ bool ToFore();
+ /* 80155EC0 */ bool ToBack();
+};
+
+class daNpcF_Lookat_c {
+private:
+ /* 0x00 */ cXyz field_0x00[4];
+ /* 0x30 */ int field_0x30;
+ /* 0x34 */ csXyz field_0x34[4];
+ /* 0x4C */ csXyz field_0x4c[4];
+ /* 0x64 */ csXyz field_0x64[4];
+ /* 0x7C */ csXyz mRotAngle[4];
+ /* 0x94 */ u8 field_0x94[4];
+ /* 0x98 */ void* vtable;
+
+public:
+ /* 80151038 */ void initialize();
+ /* 801510B8 */ void setParam(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s16,
+ cXyz*);
+ /* 80151350 */ void calc(fopAc_ac_c*, f32 (*)[4], csXyz**, int, int, int);
+ /* 801515D4 */ void adjustMoveDisAngle(s16&, s16, s16, s16);
+ /* 80151648 */ void initCalc(fopAc_ac_c*, f32 (*)[4], cXyz*, csXyz*, f32*, cXyz&, int);
+ /* 80151A54 */ void update(cXyz*, csXyz*, f32*);
+ /* 80151B68 */ void calcMoveDisAngle(int, cXyz*, csXyz*, cXyz, int, int);
+ /* 80151F54 */ void setRotAngle();
+ /* 80151FE0 */ void clrRotAngle();
+};
+
+
#endif /* D_A_D_A_NPC_H */
diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h
index 1e5e9c7604..76faa71246 100644
--- a/include/d/a/d_a_player.h
+++ b/include/d/a/d_a_player.h
@@ -34,12 +34,15 @@ private:
class daPy_boomerangMove_c {
public:
/* 8015E5B0 */ void initOffset(cXyz const*);
- /* 8015E654 */ void posMove(cXyz*, s16*, fopAc_ac_c*, s16);
+ /* 8015E654 */ int posMove(cXyz*, s16*, fopAc_ac_c*, s16);
/* 8015E87C */ void bgCheckAfterOffset(cXyz const*);
+ static s16 m_dropAngleY;
+ static s16 m_eventKeepFlg;
+
private:
/* 0x0 */ u8 field_0x0;
- /* 0x2 */ u16 field_0x2;
+ /* 0x2 */ s16 field_0x2;
/* 0x4 */ f32 field_0x4;
/* 0x8 */ f32 field_0x8;
}; // Size: 0xC
@@ -75,6 +78,7 @@ public:
void setBufferSize(u32 size) { mBufferSize = size; }
void setBuffer(u8* buf) { mBuffer = buf; }
u8* getBuffer() { return mBuffer; }
+ bool checkNoSetIdx() const { return mIdx == 0xFFFF; }
private:
/* 0x00 */ u16 mIdx;
@@ -195,69 +199,118 @@ public:
public:
enum daPy_FLG0 {
FLG0_UNK_40000000 = 0x40000000,
- EQUIP_HEAVY_BOOTS = 0x2000000,
- PLAYER_NO_DRAW = 0x8000000,
+ FLG0_EQUIP_HVY_BOOTS = 0x2000000,
+ FLG0_PLAYER_NO_DRAW = 0x8000000,
+ FLG0_UNK_10000000 = 0x10000000,
FLG0_UNK_1000000 = 0x1000000,
- UNDER_WATER_MOVEMENT = 0x800000,
+ FLG0_UNDERWATER = 0x800000,
+ FLG0_UNK_100000 = 0x100000,
FLG0_UNK_80000 = 0x80000,
FLG0_UNK_20000 = 0x20000,
FLG0_UNK_8000 = 0x8000,
FLG0_UNK_4000 = 0x4000,
- MAGNE_BOOTS_ON = 0x1000,
+ FLG0_UNK_2000 = 0x2000,
+ FLG0_MAGNE_BOOTS_ON = 0x1000,
+ FLG0_UNK_100 = 0x100,
FLG0_UNK_80 = 0x80,
FLG0_UNK_40 = 0x40,
FLG0_UNK_20 = 0x20,
- UNK_F_ROLL_CRASH_2 = 0x10,
- UNK_F_ROLL_CRASH_1 = 0x8,
- MIDNA_RIDE = 4,
+ FLG0_UNK_10 = 0x10,
+ FLG0_UNK_8 = 0x8,
+ FLG0_MIDNA_RIDE = 4,
+ FLG0_UNK_2 = 2,
+
+ FLG0_HVY_STATE = FLG0_UNK_40000000 | FLG0_EQUIP_HVY_BOOTS | FLG0_UNK_20000,
+ };
- HEAVY_STATE_BOOTS = FLG0_UNK_40000000 | EQUIP_HEAVY_BOOTS | FLG0_UNK_20000,
+ enum daPy_FLG1 {
+ FLG1_UNK_10000000 = 0x10000000,
+ FLG1_IS_WOLF = 0x2000000,
+ FLG1_UNK_400000 = 0x400000,
+ FLG1_UNK_10000 = 0x10000,
+ FLG1_THROW_DAMAGE = 0x4000,
+ FLG1_UNK_20 = 0x20,
+ FLG1_UNK_10 = 0x10,
+ FLG1_UNK_4 = 4,
+ FLG1_UNK_2 = 2,
};
- enum daPy_FLG1 { IS_WOLF = 0x2000000, FLG1_UNK_10000 = 0x10000, THROW_DAMAGE = 0x4000, FLG1_UNK_4 = 4, };
+
enum daPy_FLG2 {
FLG2_UNK_20000000 = 0x20000000,
FLG2_UNK_4080000 = 0x4080000,
FLG2_UNK_2080000 = 0x2080000,
- BOAR_SINGLE_BATTLE = 0x1800000,
- STATUS_WINDOW_DRAW = 0x400000,
+ FLG2_BOAR_SINGLE_BATTLE = 0x1800000,
+ FLG2_UNK_1000000 = 0x1000000,
+ FLG2_UNK_800000 = 0x800000,
+ FLG2_STATUS_WINDOW_DRAW = 0x400000,
FLG2_UNK_280000 = 0x280000,
- UNK_ARMOR = 0x80000,
- SCENE_CHANGE_START = 0x8000,
+ FLG2_UNK_200000 = 0x200000,
+ FLG2_UNK_80000 = 0x80000,
+ FLG2_UNK_40000 = 0x40000,
+ FLG2_UNK_20000 = 0x20000,
+ FLG2_SCN_CHG_START = 0x8000,
FLG2_UNK_4000 = 0x4000,
- UNK_FLG2_2 = 2,
- UNK_DAPY_FLG2_1 = 1
+ FLG2_UNK_80 = 0x80,
+ FLG2_UNK_40 = 0x40,
+ FLG2_UNK_10 = 0x10,
+ FLG2_UNK_8 = 8,
+ FLG2_UNK_2 = 2,
+ FLG2_UNK_1 = 1,
+
+ FLG2_UNK_58 = FLG2_UNK_40 | FLG2_UNK_10 | FLG2_UNK_8,
};
+
enum daPy_FLG3 {
+ FLG3_UNK_40000000 = 0x40000000,
FLG3_UNK_2000000 = 0x2000000,
FLG3_UNK_1000000 = 0x1000000,
FLG3_UNK_100000 = 0x100000,
- COPY_ROD_THROW_AFTER = 0x40000
+ FLG3_UNK_80000 = 0x80000,
+ FLG3_COPY_ROD_THROW_AFTER = 0x40000,
+ FLG3_UNK_4000 = 0x4000,
};
+
enum daPy_ERFLG0 {
ERFLG0_UNK_8000000 = 0x8000000,
+ ERFLG0_UNK_2000000 = 0x2000000,
ERFLG0_UNK_1000000 = 0x1000000,
ERFLG0_UNK_800000 = 0x800000,
+ ERFLG0_UNK_400000 = 0x400000,
+ ERFLG0_UNK_200000 = 0x200000,
ERFLG0_UNK_100000 = 0x100000,
+ ERFLG0_UNK_2000 = 0x2000,
ERFLG0_UNK_400 = 0x400,
+ ERFLG0_UNK_100 = 0x100,
ERFLG0_UNK_4 = 4,
ERFLG0_UNK_2 = 2,
ERFLG0_UNK_1 = 1,
};
+
enum daPy_ERFLG1 {
- GANON_FINISH = 0x80000000,
- UNK_FORCE_PUT_POS = 0x2000,
+ ERFLG1_GANON_FINISH = 0x80000000,
+ ERFLG1_UNK_10000000 = 0x10000000,
+ ERFLG1_UNK_4000000 = 0x4000000,
+ ERFLG1_UNK_40000 = 0x40000,
+ ERFLG1_UNK_2000 = 0x2000,
+ ERFLG1_UNK_200 = 0x200,
+ ERFLG1_UNK_4 = 4,
ERFLG1_UNK_2 = 2,
ERFLG1_UNK_1 = 1,
};
+
enum daPy_ERFLG2 {
ERFLG2_UNK_100 = 0x100,
+ ERFLG2_UNK_20 = 0x20,
};
+
enum daPy_RFLG0 {
RFLG0_UNK_8000000 = 0x8000000,
RFLG0_UNK_4000 = 0x4000,
- ENEMY_ATTENTION_LOCK = 0x1000,
+ RFLG0_ENEMY_ATTN_LOCK = 0x1000,
+ RFLG0_UNK_400 = 0x400,
RFLG0_UNK_80 = 0x80,
RFLG0_UNK_40 = 0x40,
+ RFLG0_UNK_10 = 0x10,
RFLG0_UNK_2 = 0x2,
};
@@ -307,8 +360,8 @@ public:
static BOOL checkTradeItem(int);
static BOOL checkDungeonWarpItem(int);
static BOOL checkMasterSwordEquip();
- void checkWoodShieldEquip();
- f32 getAttentionOffsetY();
+ bool checkWoodShieldEquip();
+ static f32 getAttentionOffsetY();
s16 checkNowWolfEyeUp();
static void forceRestartRoom(int, u32, int);
static void setFmChainPos(fopAc_ac_c*, cXyz*, int);
@@ -321,7 +374,7 @@ public:
static u32 checkCarryStartLightBallA();
static u32 checkCarryStartLightBallB();
float getSpinnerRideSpeed() const;
- void checkSpinnerReflectEffect();
+ bool checkSpinnerReflectEffect();
static bool checkBoomerangCharge();
bool checkBoomerangChargeTime();
static daBoomerang_c* getThrowBoomerangActor();
@@ -329,10 +382,10 @@ public:
static void setPlayerDamage(int, int);
static void setMidnaMotionNum(int);
static void setMidnaFaceNum(int);
- int checkNoResetFlg0(daPy_FLG0) const;
- int checkEquipHeavyBoots() const;
- int checkBoarSingleBattle() const;
- int checkEndResetFlg0(daPy_ERFLG0) const;
+ u32 checkNoResetFlg0(daPy_FLG0) const;
+ u32 checkEquipHeavyBoots() const;
+ u32 checkBoarSingleBattle() const;
+ u32 checkEndResetFlg0(daPy_ERFLG0) const;
void onNoResetFlg2(daPy_py_c::daPy_FLG2);
void offNoResetFlg0(daPy_py_c::daPy_FLG0);
int checkEndResetFlg2(daPy_py_c::daPy_ERFLG2) const;
@@ -340,14 +393,14 @@ public:
int checkNoResetFlg3(daPy_py_c::daPy_FLG3) const;
BOOL checkShieldGet();
void onNoResetFlg0(daPy_py_c::daPy_FLG0);
- int checkEndResetFlg1(daPy_py_c::daPy_ERFLG1) const;
+ u32 checkEndResetFlg1(daPy_py_c::daPy_ERFLG1) const;
void offNoResetFlg1(daPy_py_c::daPy_FLG1);
void offNoResetFlg2(daPy_py_c::daPy_FLG2);
- int checkWolf() const;
+ u32 checkWolf() const;
BOOL checkSwordGet();
- int checkResetFlg0(daPy_py_c::daPy_RFLG0) const;
- int checkNoResetFlg2(daPy_py_c::daPy_FLG2) const;
- int checkMagneBootsOn() const;
+ u32 checkResetFlg0(daPy_py_c::daPy_RFLG0) const;
+ u32 checkNoResetFlg2(daPy_py_c::daPy_FLG2) const;
+ u32 checkMagneBootsOn() const;
void changeDemoPos0(cXyz const*);
void changeDemoMode(u32, int, int, s16);
void changeDemoParam2(s16);
@@ -363,6 +416,7 @@ public:
/* 80182B9C */ void getRightHandPos() const;
/* 8015DFD8 */ const cXyz getItemPos() const;
/* 8015DFF4 */ const cXyz& getLeftHandPos() const;
+ /* 800977B4 */ bool checkMidnaRide() const;
/* const cXyz* getItemPos() const {
return &mItemPos;
@@ -551,15 +605,15 @@ public:
bool i_getSumouMode() const { return getSumouCameraMode(); }
- bool checkStatusWindowDraw() { return i_checkNoResetFlg2(STATUS_WINDOW_DRAW); }
+ bool checkStatusWindowDraw() { return i_checkNoResetFlg2(FLG2_STATUS_WINDOW_DRAW); }
bool checkCargoCarry() const { return mSpecialMode == SMODE_CARGO_CARRY; }
- bool getHeavyStateAndBoots() { return i_checkNoResetFlg0(HEAVY_STATE_BOOTS); }
- bool checkEnemyAttentionLock() const { return i_checkResetFlg0(ENEMY_ATTENTION_LOCK); }
+ bool getHeavyStateAndBoots() { return i_checkNoResetFlg0(FLG0_HVY_STATE); }
+ bool checkEnemyAttentionLock() const { return i_checkResetFlg0(RFLG0_ENEMY_ATTN_LOCK); }
bool checkCanoeSlider() const { return mSpecialMode == 0x2D; }
u8 getCutType() const { return mCutType; }
u16 getSwordAtUpTime() const { return mSwordUpTimer; }
- bool checkWaterInMove() const { return i_checkNoResetFlg0(UNDER_WATER_MOVEMENT); }
- bool checkSceneChangeAreaStart() const { return i_checkNoResetFlg2(SCENE_CHANGE_START); }
+ bool checkWaterInMove() const { return i_checkNoResetFlg0(FLG0_UNDERWATER); }
+ bool checkSceneChangeAreaStart() const { return i_checkNoResetFlg2(FLG2_SCN_CHG_START); }
// some functions use these function as an inline
// is there a better way to handle this?
@@ -567,28 +621,36 @@ public:
int i_checkNoResetFlg1(daPy_FLG1 pFlag) const { return mNoResetFlg1 & pFlag; }
int i_checkNoResetFlg2(daPy_FLG2 pFlag) const { return mNoResetFlg2 & pFlag; }
int i_checkNoResetFlg3(daPy_FLG3 pFlag) const { return mNoResetFlg3 & pFlag; }
+
void i_onNoResetFlg0(int pFlg) { mNoResetFlg0 |= pFlg; }
void i_onNoResetFlg1(int pFlg) { mNoResetFlg1 |= pFlg; }
void i_onNoResetFlg2(int pFlg) { mNoResetFlg2 |= pFlg; }
void i_onNoResetFlg3(int pFlg) { mNoResetFlg3 |= pFlg; }
+
void i_offNoResetFlg0(int pFlg) { mNoResetFlg0 &= ~pFlg; }
void i_offNoResetFlg2(int pFlg) { mNoResetFlg2 &= ~pFlg; }
void i_offNoResetFlg3(int pFlg) { mNoResetFlg3 &= ~pFlg; }
+
void i_offResetFlg0(int flag) { mResetFlg0 &= ~flag; }
void i_onResetFlg0(int flag) { mResetFlg0 |= flag; }
void i_onResetFlg1(int flag) { mResetFlg1 |= flag; }
+
void i_onEndResetFlg0(int flag) { mEndResetFlg0 |= flag; }
void i_onEndResetFlg2(int flag) { mEndResetFlg2 |= flag; }
+
int i_checkResetFlg0(daPy_py_c::daPy_RFLG0 flag) const { return mResetFlg0 & flag; }
+
int i_checkEndResetFlg0(daPy_py_c::daPy_ERFLG0 flag) const { return mEndResetFlg0 & flag; }
int i_checkEndResetFlg1(daPy_py_c::daPy_ERFLG1 flag) const { return mEndResetFlg1 & flag; }
+
void i_onEndResetFlg1(daPy_ERFLG1 pFlg) { mEndResetFlg1 |= pFlg; }
- u32 i_checkWolf() const { return i_checkNoResetFlg1(IS_WOLF); }
- BOOL i_checkEquipHeavyBoots() const { return i_checkNoResetFlg0(EQUIP_HEAVY_BOOTS); }
- BOOL i_checkMagneBootsOn() const { return i_checkNoResetFlg0(MAGNE_BOOTS_ON); }
- bool i_checkMidnaRide() const { return i_checkNoResetFlg0(MIDNA_RIDE); }
- void i_onPlayerNoDraw() { i_onNoResetFlg0(PLAYER_NO_DRAW); }
- void i_offPlayerNoDraw() { i_offNoResetFlg0(PLAYER_NO_DRAW); }
+
+ u32 i_checkWolf() const { return i_checkNoResetFlg1(FLG1_IS_WOLF); }
+ BOOL i_checkEquipHeavyBoots() const { return i_checkNoResetFlg0(FLG0_EQUIP_HVY_BOOTS); }
+ BOOL i_checkMagneBootsOn() const { return i_checkNoResetFlg0(FLG0_MAGNE_BOOTS_ON); }
+ bool i_checkMidnaRide() const { return i_checkNoResetFlg0(FLG0_MIDNA_RIDE); }
+ void i_onPlayerNoDraw() { i_onNoResetFlg0(FLG0_PLAYER_NO_DRAW); }
+ void i_offPlayerNoDraw() { i_offNoResetFlg0(FLG0_PLAYER_NO_DRAW); }
inline static u32 i_getLastSceneMode();
inline static u32 getLastSceneMode();
diff --git a/include/d/bg/d_bg_pc.h b/include/d/bg/d_bg_pc.h
index b1f91e96c2..260c530ad2 100644
--- a/include/d/bg/d_bg_pc.h
+++ b/include/d/bg/d_bg_pc.h
@@ -11,10 +11,57 @@ struct sBgPc {
/* 0x10 */ u32 code4;
}; // Size: 0x14
+enum dBgPc_ECode {
+ /* 0x00004000 */ CODE_OBJ_THRU = 0x4000,
+ /* 0x00008000 */ CODE_CAM_THRU = 0x8000,
+ /* 0x00010000 */ CODE_LINK_THRU = 0x10000,
+ /* 0x00020000 */ CODE_ARROW_THRU = 0x20000,
+ /* 0x00040000 */ CODE_HS_STICK = 0x40000,
+ /* 0x00080000 */ CODE_BOOMERANG_THRU = 0x80000,
+ /* 0x00100000 */ CODE_ROPE_THRU = 0x100000,
+ /* 0x00200000 */ CODE_HORSE_NO_ENTRY = 0x200000,
+ /* 0x00400000 */ CODE_SHDW_THRU = 0x400000,
+ /* 0x00800000 */ CODE_BOMB_THRU = 0x800000,
+ /* 0x01000000 */ CODE_IRON_BALL_THRU = 0x1000000,
+ /* 0x02000000 */ CODE_ATTACK_THRU = 0x2000000,
+ /* 0x40000000 */ CODE_UNDERWATER_ROOF = 0x40000000,
+};
+
class dBgPc {
public:
void setCode(sBgPc&);
+ u32 getHorseNoEntry() const { return m_code.code0 >> 0x15 & 1; }
+ u32 getSpl() const { return m_code.code0 >> 0x18 & 0xF; }
+ u32 getMagnet() const { return m_code.code0 >> 0x1C & 0x3; }
+ u32 getMonkeyBars() const { return m_code.code0 >> 0x1F; }
+ u32 getWallCode() const { return m_code.code1 >> 0x8 & 0xF; }
+ u32 getAtt0Code() const { return m_code.code1 >> 0xC & 0xF; }
+ u32 getAtt1Code() const { return m_code.code1 >> 0x10 & 0x7; }
+ u32 getGroundCode() const { return m_code.code1 >> 0x13 & 0x1F; }
+ u32 getObjThrough() const { return m_code.code0 & CODE_OBJ_THRU; }
+ u32 getCamThrough() const { return m_code.code0 & CODE_CAM_THRU; }
+ u32 getLinkThrough() const { return m_code.code0 & CODE_LINK_THRU; }
+ u32 getArrowThrough() const { return m_code.code0 & CODE_ARROW_THRU; }
+ u32 getHSStick() const { return m_code.code0 & CODE_HS_STICK; }
+ u32 getBoomerangThrough() const { return m_code.code0 & CODE_BOOMERANG_THRU; }
+ u32 getRopeThrough() const { return m_code.code0 & CODE_ROPE_THRU; }
+ u32 getBombThrough() const { return m_code.code0 & CODE_BOMB_THRU; }
+ u32 getIronBallThrough() const { return m_code.code1 & CODE_IRON_BALL_THRU; }
+ u32 getShdwThrough() const { return m_code.code0 & CODE_SHDW_THRU; }
+ u32 getUnderwaterRoof() const { return m_code.code0 & CODE_UNDERWATER_ROOF; }
+ u32 getAttackThrough() const { return m_code.code1 & CODE_ATTACK_THRU; }
+ u8 getRoom() const { return m_code.code4 >> 0x14; }
+ u8 getExit() const { return m_code.code0 & 0x3F; }
+ u8 getPolyCol() const { return m_code.code0 >> 6; }
+ u8 getLinkNo() const { return m_code.code1; }
+ u8 getCamMoveBG() const { return m_code.code2; }
+ u8 getRoomCam() const { return m_code.code2 >> 8; }
+ u8 getRoomPath() const { return m_code.code2 >> 0x10; }
+ u8 getRoomPathPnt() const { return m_code.code2 >> 0x18; }
+ u8 getRoomInf() const { return m_code.code4; }
+ u8 getSnd() const { return m_code.code4 >> 0xB; }
+
private:
/* 0x0 */ sBgPc m_code;
};
diff --git a/include/d/bg/d_bg_plc.h b/include/d/bg/d_bg_plc.h
index ed0c55085f..fde627bb51 100644
--- a/include/d/bg/d_bg_plc.h
+++ b/include/d/bg/d_bg_plc.h
@@ -12,7 +12,7 @@ struct PLC {
/* 0x0 */ u32 magic;
/* 0x4 */ u16 m_code_size;
/* 0x6 */ u16 m_num;
- // ...
+ /* 0x8 */ sBgPc* field_0x8;
};
class dBgPlc {
@@ -21,7 +21,7 @@ public:
/* 80074080 */ ~dBgPlc();
/* 800740BC */ void setBase(void*);
/* 800740C4 */ void getCode(int, sBgPc**) const;
- /* 800740DC */ void getGrpCode(int) const;
+ /* 800740DC */ u32 getGrpCode(int) const;
private:
/* 0x00 */ void* m_base;
diff --git a/include/d/bg/d_bg_s.h b/include/d/bg/d_bg_s.h
index f07fbc2ff5..7c53bf3373 100644
--- a/include/d/bg/d_bg_s.h
+++ b/include/d/bg/d_bg_s.h
@@ -78,7 +78,7 @@ public:
int GetSpecialCode(cBgS_PolyInfo const&);
int GetMagnetCode(cBgS_PolyInfo const&);
int GetMonkeyBarsCode(cBgS_PolyInfo const&);
- int GetUnderwaterRoofCode(cBgS_PolyInfo const&);
+ u32 GetUnderwaterRoofCode(cBgS_PolyInfo const&);
s32 GetWallCode(cBgS_PolyInfo const&);
int GetPolyAtt0(cBgS_PolyInfo const&);
int GetPolyAtt1(cBgS_PolyInfo const&);
@@ -87,7 +87,7 @@ public:
s32 GetRoomCamId(cBgS_PolyInfo const&);
s32 GetRoomPathId(cBgS_PolyInfo const&);
s32 GetRoomPathPntNo(cBgS_PolyInfo const&);
- s32 GetGrpSoundId(cBgS_PolyInfo const&);
+ u8 GetGrpSoundId(cBgS_PolyInfo const&);
u32 ChkGrpInf(cBgS_PolyInfo const&, u32);
s32 GetRoomId(cBgS_PolyInfo const&);
bool GetPolyAttackThrough(cBgS_PolyInfo const&);
diff --git a/include/d/bg/d_bg_s_acch.h b/include/d/bg/d_bg_s_acch.h
index 0754ceb3ec..dce3637027 100644
--- a/include/d/bg/d_bg_s_acch.h
+++ b/include/d/bg/d_bg_s_acch.h
@@ -47,7 +47,7 @@ public:
bool ChkWallHit() { return m_flags & WALL_HIT; }
void SetCir(cXyz& pos) { m_cir.Set(pos.x, pos.z, pos.y + GetWallH(), m_wall_r); }
-};
+}; // Size: 0x40
class dBgS;
class dBgS_Acch : public cBgS_Chk, public dBgS_Chk {
@@ -149,6 +149,7 @@ public:
void SetGrndNone() { m_flags |= GRND_NONE; }
void ClrGrndNone() { m_flags &= ~GRND_NONE; }
bool ChkMoveBGOnly() const { return m_flags & MOVE_BG_ONLY; }
+ void SetWallHit() { m_flags |= WALL_HIT; }
// inline dupe
void i_ClrGroundHit() { m_flags &= ~GROUND_HIT; }
diff --git a/include/d/bg/d_bg_s_poly_pass_chk.h b/include/d/bg/d_bg_s_poly_pass_chk.h
index c5aff507f4..5eedc5e3e2 100644
--- a/include/d/bg/d_bg_s_poly_pass_chk.h
+++ b/include/d/bg/d_bg_s_poly_pass_chk.h
@@ -47,17 +47,17 @@ public:
void SetUnderwaterRoof();
private:
- bool mObject;
- bool mCamera;
- bool mLink;
- bool mArrow;
- bool mBomb;
- bool mBoomerang;
- bool mRope;
- bool mUnderwaterRoof;
- bool mHorse;
- bool mStatue;
- bool mIronBall;
+ /* 0x4 */ bool mObject;
+ /* 0x5 */ bool mCamera;
+ /* 0x6 */ bool mLink;
+ /* 0x7 */ bool mArrow;
+ /* 0x8 */ bool mBomb;
+ /* 0x9 */ bool mBoomerang;
+ /* 0xA */ bool mRope;
+ /* 0xB */ bool mUnderwaterRoof;
+ /* 0xC */ bool mHorse;
+ /* 0xD */ bool mStatue;
+ /* 0xE */ bool mIronBall;
};
#endif /* D_BG_D_BG_S_POLY_PASS_CHK_H */
diff --git a/include/d/bg/d_bg_w.h b/include/d/bg/d_bg_w.h
index 7872f4a5af..a2eb1be880 100644
--- a/include/d/bg/d_bg_w.h
+++ b/include/d/bg/d_bg_w.h
@@ -15,22 +15,23 @@
struct dBgS_CaptPoly {};
-class cBgW_TriElm : public cM3dGPla {
+class cBgW_TriElm {
public:
- /* 80079754 */ cBgW_TriElm();
+ /* 0x00 */ cM3dGPla m_plane;
+ /* 80079754 */ cBgW_TriElm();
/* 800796F8 */ virtual ~cBgW_TriElm();
-};
-class cBgW_RwgElm {
-private:
- /* 0x0 */ u8 field_0x0[4];
+ /* 0x14 vtable */
+}; // Size: 0x18
+class cBgW_RwgElm {
public:
- /* 800791C4 */ cBgW_RwgElm();
+ /* 0x0 */ u16 field_0x0;
+ /* 800791C4 */ cBgW_RwgElm();
/* 800791D4 */ virtual ~cBgW_RwgElm();
-};
+}; // Size: 0x8
class cBgW_NodeTree : public cM3dGAab {
public:
@@ -39,22 +40,81 @@ public:
/* 80079238 */ virtual ~cBgW_NodeTree();
};
-class cBgW_GrpElm : public cM3dGAab {
+class cBgW_GrpElm {
public:
/* 8007A1E4 */ cBgW_GrpElm();
/* 8007A184 */ virtual ~cBgW_GrpElm();
+
+ /* 0x4 */ cM3dGAab m_aab;
};
-struct cBgD_t {};
+struct cBgW_unk_b_data {
+ /* 0x0 */ u16 field_0x0;
+ /* 0x2 */ u16 field_0x2;
+ /* 0x4 */ u16 field_0x4;
+}; // Size: 0x6
+
+struct dzb_tri_data {
+ /* 0x0 */ u16 field_0x0;
+ /* 0x2 */ u16 field_0x2;
+ /* 0x4 */ u16 field_0x4;
+ /* 0x6 */ u16 m_id;
+ /* 0x8 */ u16 m_grp;
+}; // Size: 0xA
+
+struct dzb_ti_data {
+ /* 0x0 */ u32 m_info0;
+ /* 0x4 */ u32 m_info1;
+ /* 0x8 */ u32 m_info2;
+ /* 0xC */ u8 field_0xc[0x10 - 0xC];
+};
+
+struct dzb_b_data {
+ /* 0x0 */ u16 field_0x0;
+};
+
+struct dzb_tree_data {
+ /* 0x0 */ u16 field_0x0;
+ /* 0x2 */ u16 field_0x2;
+ /* 0x4 */ u16 m_id[1];
+ /* 0x6 */ u8 field_0x6[0x14 - 0x6];
+}; // Size: 0x14
+
+struct dzb_g_data {
+ /* 0x00 */ u8 field_0x0[0x24 - 0x0];
+ /* 0x24 */ u16 field_0x24;
+ /* 0x26 */ u8 field_0x26[0x28 - 0x26];
+ /* 0x28 */ u16 field_0x28;
+ /* 0x2A */ u16 field_0x2a;
+ /* 0x2C */ u8 field_0x2c[0x2E - 0x2C];
+ /* 0x2E */ u16 field_0x2e;
+ /* 0x30 */ u32 m_info;
+}; // Size: 0x34
+
+struct cBgD_t {
+ /* 0x00 */ int m_v_num; // vertex num
+ /* 0x04 */ Vec* m_v_tbl; // vertex table
+ /* 0x08 */ int m_t_num; // triangle num
+ /* 0x0C */ dzb_tri_data* m_t_tbl; // triangle table
+ /* 0x10 */ int m_b_num; // spatial?
+ /* 0x14 */ dzb_b_data* m_b_tbl;
+ /* 0x18 */ int m_tree_num; // face group?
+ /* 0x1C */ dzb_tree_data* m_tree_tbl;
+ /* 0x20 */ int m_g_num; // string group?
+ /* 0x24 */ dzb_g_data* m_g_tbl;
+ /* 0x28 */ int m_ti_num; // surface property?
+ /* 0x2C */ dzb_ti_data* m_ti_tbl;
+ /* 0x30 */ int field_0x30;
+};
class cBgW : public dBgW_Base {
public:
/* 80079294 */ cBgW();
/* 800793A4 */ void FreeArea();
/* 800793C4 */ void GlobalVtx();
- /* 80079484 */ void SetVtx();
- /* 80079668 */ void SetTri();
+ /* 80079484 */ bool SetVtx();
+ /* 80079668 */ bool SetTri();
/* 80079770 */ void BlckConnect(u16*, int*, int);
/* 8007998C */ void MakeBlckTransMinMax(cXyz*, cXyz*);
/* 800799E0 */ void MakeBlckMinMax(int, cXyz*, cXyz*);
@@ -63,37 +123,37 @@ public:
/* 80079CC4 */ void MakeNodeTreeGrpRp(int);
/* 80079DF0 */ void MakeNodeTree();
/* 80079F38 */ bool Set(cBgD_t*, u32, f32 (*)[3][4]);
- /* 8007A200 */ void RwgLineCheck(u16, cBgS_LinChk*);
- /* 8007A3A0 */ void LineCheckRp(cBgS_LinChk*, int);
- /* 8007A52C */ void LineCheckGrpRp(cBgS_LinChk*, int, int);
+ /* 8007A200 */ bool RwgLineCheck(u16, cBgS_LinChk*);
+ /* 8007A3A0 */ bool LineCheckRp(cBgS_LinChk*, int);
+ /* 8007A52C */ bool LineCheckGrpRp(cBgS_LinChk*, int, int);
/* 8007A680 */ void RwgGroundCheckCommon(f32, u16, cBgS_GndChk*);
/* 8007A774 */ void RwgGroundCheckGnd(u16, cBgS_GndChk*);
/* 8007A824 */ void RwgGroundCheckWall(u16, cBgS_GndChk*);
/* 8007A8F4 */ void GroundCrossRp(cBgS_GndChk*, int);
- /* 8007AA50 */ void GroundCrossGrpRp(cBgS_GndChk*, int, int);
+ /* 8007AA50 */ bool GroundCrossGrpRp(cBgS_GndChk*, int, int);
/* 8007ABC4 */ void CopyOldMtx();
/* 8007AC10 */ void Move();
/* 8007ADF0 */ void RwgShdwDraw(int, cBgS_ShdwDraw*);
/* 8007AEA4 */ void ShdwDrawRp(cBgS_ShdwDraw*, int);
/* 8007AFC0 */ void ShdwDrawGrpRp(cBgS_ShdwDraw*, int);
/* 8007B17C */ void GetTrans(cXyz*) const;
- /* 8007B2F4 */ void GetPolyInfId(int) const;
- /* 8007B30C */ void GetPolyInf0(int, u32, u32) const;
- /* 8007B360 */ void GetMaskPolyInf0_NoShift(int, u32) const;
- /* 8007B654 */ void GetPolyInf1(int, u32, u32) const;
- /* 8007B78C */ void GetMaskPolyInf1_NoShift(int, u32) const;
- /* 8007B824 */ void GetPolyInf2(int, u32, u32) const;
- /* 8007B930 */ void GetTriGrp(int) const;
+ /* 8007B2F4 */ int GetPolyInfId(int) const;
+ /* 8007B30C */ u32 GetPolyInf0(int, u32, u32) const;
+ /* 8007B360 */ u32 GetMaskPolyInf0_NoShift(int, u32) const;
+ /* 8007B654 */ u32 GetPolyInf1(int, u32, u32) const;
+ /* 8007B78C */ u32 GetMaskPolyInf1_NoShift(int, u32) const;
+ /* 8007B824 */ u32 GetPolyInf2(int, u32, u32) const;
+ /* 8007B930 */ int GetTriGrp(int) const;
/* 8007933C */ virtual ~cBgW();
- /* 80079EEC */ virtual void ChkMemoryError();
+ /* 80079EEC */ virtual bool ChkMemoryError();
/* 8007B948 */ virtual bool ChkNotReady() const;
/* 8007B958 */ virtual bool ChkLock() const;
/* 8007B964 */ virtual bool ChkMoveBg() const;
virtual u32 ChkMoveFlag() const = 0;
/* 8007B270 */ virtual cM3dGPla GetTriPla(cBgS_PolyInfo const&) const;
/* 8007B1B4 */ virtual bool GetTriPnt(cBgS_PolyInfo const&, cXyz*, cXyz*, cXyz*) const;
- /* 8007B164 */ virtual void GetBnd() const;
+ /* 8007B164 */ virtual cM3dGAab* GetBnd() const;
/* 8007B2B0 */ virtual u32 GetGrpInf(cBgS_PolyInfo const&) const;
virtual void OffMoveFlag() = 0;
/* 8007B240 */ virtual void GetTopUnder(f32*, f32*) const;
@@ -101,7 +161,7 @@ public:
/* 8007AB9C */ virtual bool GroundCross(cBgS_GndChk*);
/* 8007B084 */ virtual void ShdwDraw(cBgS_ShdwDraw*);
virtual void CaptPoly(dBgS_CaptPoly&) = 0;
- virtual void WallCorrect(dBgS_Acch*) = 0;
+ virtual bool WallCorrect(dBgS_Acch*) = 0;
virtual void WallCorrectSort(dBgS_Acch*) = 0;
virtual bool RoofChk(dBgS_RoofChk*) = 0;
virtual bool SplGrpChk(dBgS_SplGrpChk*) = 0;
@@ -113,40 +173,43 @@ public:
virtual int GetSpecialCode(cBgS_PolyInfo const&) = 0;
virtual int GetSpecialCode(int) = 0;
virtual int GetMagnetCode(cBgS_PolyInfo const&) = 0;
- virtual void GetPolyObjThrough(int) = 0;
- virtual void GetPolyCamThrough(int) = 0;
- virtual void GetPolyLinkThrough(int) = 0;
- virtual void GetPolyArrowThrough(int) = 0;
+ virtual u32 GetPolyObjThrough(int) = 0;
+ virtual u32 GetPolyCamThrough(int) = 0;
+ virtual u32 GetPolyLinkThrough(int) = 0;
+ virtual u32 GetPolyArrowThrough(int) = 0;
virtual u32 GetPolyHSStick(int) = 0;
- virtual void GetPolyBoomerangThrough(int) = 0;
- virtual void GetPolyRopeThrough(int) = 0;
- virtual void GetPolyBombThrough(int) = 0;
- virtual void GetShdwThrough(int) = 0;
- virtual int GetUnderwaterRoofCode(int) = 0;
+ virtual u32 GetPolyBoomerangThrough(int) = 0;
+ virtual u32 GetPolyRopeThrough(int) = 0;
+ virtual u32 GetPolyBombThrough(int) = 0;
+ virtual bool GetShdwThrough(int) = 0;
+ virtual u32 GetUnderwaterRoofCode(int) = 0;
virtual int GetMonkeyBarsCode(cBgS_PolyInfo const&) = 0;
+ virtual int GetLinkNo(cBgS_PolyInfo const&) = 0;
virtual s32 GetWallCode(cBgS_PolyInfo const&) = 0;
virtual int GetPolyAtt0(cBgS_PolyInfo const&) = 0;
virtual int GetPolyAtt1(cBgS_PolyInfo const&) = 0;
virtual int GetGroundCode(cBgS_PolyInfo const&) = 0;
- virtual void GetIronBallThrough(int) = 0;
+ virtual u32 GetIronBallThrough(int) = 0;
virtual u32 GetAttackThrough(int) = 0;
virtual s32 GetCamMoveBG(cBgS_PolyInfo const&) = 0;
virtual s32 GetRoomCamId(cBgS_PolyInfo const&) = 0;
virtual s32 GetRoomPathId(cBgS_PolyInfo const&) = 0;
virtual s32 GetRoomPathPntNo(cBgS_PolyInfo const&) = 0;
- virtual void GetPolyGrpRoomInfId(cBgS_PolyInfo const&) = 0;
- virtual s32 GetGrpSoundId(cBgS_PolyInfo const&) = 0;
+ virtual u8 GetPolyGrpRoomInfId(cBgS_PolyInfo const&) = 0;
+ virtual u8 GetGrpSoundId(cBgS_PolyInfo const&) = 0;
virtual void CrrPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*) = 0;
virtual void TransPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*) = 0;
virtual void MatrixCrrPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*) = 0;
/* 80079564 */ virtual void CalcPlane();
/* 800797BC */ virtual void ClassifyPlane();
/* 8007B0A8 */ virtual bool ChkPolyThrough(int, cBgS_PolyPassChk*);
- /* 8007B0B0 */ virtual void ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
+ /* 8007B0B0 */ virtual bool ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
/* 8007B0DC */ virtual bool ChkGrpThrough(int, cBgS_GrpPassChk*, int);
u32 GetOldInvMtx(Mtx m) { return PSMTXInverse(m_inv_mtx, m); }
MtxP GetBaseMtxP() { return pm_base; }
+ bool ChkNoCalcVtx() { return field_0x88 & 2; }
+ bool ChkFlush() { return field_0x91 & 8; }
public:
/* 0x18 */ MtxP pm_base;
@@ -161,9 +224,9 @@ public:
/* 0x92 */ u16 field_0x92;
/* 0x94 */ cBgW_TriElm* pm_tri;
/* 0x98 */ cBgW_RwgElm* pm_rwg;
- /* 0x9C */ VertexPosition* pm_vtx_tbl; // type not confirmed
- /* 0xA0 */ void* pm_bgd;
- /* 0xA4 */ void* field_0xa4;
+ /* 0x9C */ Vec* pm_vtx_tbl;
+ /* 0xA0 */ cBgD_t* pm_bgd;
+ /* 0xA4 */ cBgW_unk_b_data* field_0xa4;
/* 0xA8 */ cBgW_GrpElm* pm_grp;
/* 0xAC */ cBgW_NodeTree* pm_node_tree;
};
@@ -180,28 +243,28 @@ public:
/* 8007B9EC */ void positionWallCorrect(dBgS_Acch*, f32, cM3dGPla&, cXyz* pupper_pos, f32);
/* 8007BA40 */ void RwgWallCorrect(dBgS_Acch*, u16);
/* 8007C234 */ void WallCorrectRp(dBgS_Acch*, int);
- /* 8007C360 */ void WallCorrectGrpRp(dBgS_Acch*, int, int);
+ /* 8007C360 */ bool WallCorrectGrpRp(dBgS_Acch*, int, int);
/* 8007C4AC */ void RwgWallCorrectSort(dBgS_Acch*, u16);
/* 8007C714 */ void WallCorrectRpSort(dBgS_Acch*, int);
/* 8007C808 */ void WallCorrectGrpRpSort(dBgS_Acch*, int, int);
/* 8007D0DC */ void RwgRoofChk(u16, dBgS_RoofChk*);
/* 8007D208 */ void RoofChkRp(dBgS_RoofChk*, int);
- /* 8007D330 */ void RoofChkGrpRp(dBgS_RoofChk*, int, int);
+ /* 8007D330 */ bool RoofChkGrpRp(dBgS_RoofChk*, int, int);
/* 8007D498 */ void RwgSplGrpChk(u16, dBgS_SplGrpChk*);
/* 8007D5C4 */ void SplGrpChkRp(dBgS_SplGrpChk*, int);
- /* 8007D6F0 */ void SplGrpChkGrpRp(dBgS_SplGrpChk*, int, int);
+ /* 8007D6F0 */ bool SplGrpChkGrpRp(dBgS_SplGrpChk*, int, int);
/* 8007D858 */ void RwgCaptPoly(int, dBgS_CaptPoly&);
/* 8007D8E8 */ void CaptPolyRp(dBgS_CaptPoly&, int);
/* 8007DA04 */ void CaptPolyGrpRp(dBgS_CaptPoly&, int, int);
/* 8007DB20 */ void RwgSphChk(u16, dBgS_SphChk*, void*);
/* 8007DC70 */ void SphChkRp(dBgS_SphChk*, void*, int);
- /* 8007DDE0 */ void SphChkGrpRp(dBgS_SphChk*, void*, int, int);
+ /* 8007DDE0 */ bool SphChkGrpRp(dBgS_SphChk*, void*, int, int);
/* 8007E548 */ virtual ~dBgW();
/* 8007E4B4 */ virtual u32 ChkMoveFlag() const;
/* 8007E4A4 */ virtual void OffMoveFlag();
/* 8007DAF8 */ virtual void CaptPoly(dBgS_CaptPoly&);
- /* 8007C484 */ virtual void WallCorrect(dBgS_Acch*);
+ /* 8007C484 */ virtual bool WallCorrect(dBgS_Acch*);
/* 8007C910 */ virtual void WallCorrectSort(dBgS_Acch*);
/* 8007D470 */ virtual bool RoofChk(dBgS_RoofChk*);
/* 8007D830 */ virtual bool SplGrpChk(dBgS_SplGrpChk*);
@@ -212,30 +275,30 @@ public:
/* 8007B430 */ virtual int GetSpecialCode(cBgS_PolyInfo const&);
/* 8007B460 */ virtual int GetSpecialCode(int);
/* 8007B488 */ virtual int GetMagnetCode(cBgS_PolyInfo const&);
- /* 8007B4E0 */ virtual void GetPolyObjThrough(int);
- /* 8007B504 */ virtual void GetPolyCamThrough(int);
- /* 8007B52C */ virtual void GetPolyLinkThrough(int);
- /* 8007B550 */ virtual void GetPolyArrowThrough(int);
+ /* 8007B4E0 */ virtual u32 GetPolyObjThrough(int);
+ /* 8007B504 */ virtual u32 GetPolyCamThrough(int);
+ /* 8007B52C */ virtual u32 GetPolyLinkThrough(int);
+ /* 8007B550 */ virtual u32 GetPolyArrowThrough(int);
/* 8007B574 */ virtual u32 GetPolyHSStick(int);
- /* 8007B598 */ virtual void GetPolyBoomerangThrough(int);
- /* 8007B5BC */ virtual void GetPolyRopeThrough(int);
- /* 8007B5E0 */ virtual void GetPolyBombThrough(int);
- /* 8007B604 */ virtual void GetShdwThrough(int);
- /* 8007B630 */ virtual int GetUnderwaterRoofCode(int);
+ /* 8007B598 */ virtual u32 GetPolyBoomerangThrough(int);
+ /* 8007B5BC */ virtual u32 GetPolyRopeThrough(int);
+ /* 8007B5E0 */ virtual u32 GetPolyBombThrough(int);
+ /* 8007B604 */ virtual bool GetShdwThrough(int);
+ /* 8007B630 */ virtual u32 GetUnderwaterRoofCode(int);
/* 8007B4B4 */ virtual int GetMonkeyBarsCode(cBgS_PolyInfo const&);
- /* 8007B6AC */ virtual void GetLinkNo(cBgS_PolyInfo const&);
+ /* 8007B6AC */ virtual int GetLinkNo(cBgS_PolyInfo const&);
/* 8007B6D8 */ virtual s32 GetWallCode(cBgS_PolyInfo const&);
/* 8007B704 */ virtual int GetPolyAtt0(cBgS_PolyInfo const&);
/* 8007B734 */ virtual int GetPolyAtt1(cBgS_PolyInfo const&);
/* 8007B760 */ virtual int GetGroundCode(cBgS_PolyInfo const&);
- /* 8007B7DC */ virtual void GetIronBallThrough(int);
+ /* 8007B7DC */ virtual u32 GetIronBallThrough(int);
/* 8007B800 */ virtual u32 GetAttackThrough(int);
/* 8007B87C */ virtual s32 GetCamMoveBG(cBgS_PolyInfo const&);
/* 8007B8A8 */ virtual s32 GetRoomCamId(cBgS_PolyInfo const&);
/* 8007B8D8 */ virtual s32 GetRoomPathId(cBgS_PolyInfo const&);
/* 8007B904 */ virtual s32 GetRoomPathPntNo(cBgS_PolyInfo const&);
- /* 8007DF28 */ virtual void GetPolyGrpRoomInfId(cBgS_PolyInfo const&);
- /* 8007DF58 */ virtual s32 GetGrpSoundId(cBgS_PolyInfo const&);
+ /* 8007DF28 */ virtual u8 GetPolyGrpRoomInfId(cBgS_PolyInfo const&);
+ /* 8007DF58 */ virtual u8 GetGrpSoundId(cBgS_PolyInfo const&);
/* 8007DF88 */ virtual void CrrPos(cBgS_PolyInfo const&, virtual void*, bool, cXyz*, csXyz*,
csXyz*);
/* 8007DFC4 */ virtual void TransPos(cBgS_PolyInfo const&, virtual void*, bool, cXyz*, csXyz*,
@@ -244,11 +307,12 @@ public:
csXyz*, csXyz*);
/* 8007E444 */ virtual void CallRideCallBack(fopAc_ac_c*, fopAc_ac_c*);
/* 8007E474 */ virtual void CallArrowStickCallBack(fopAc_ac_c*, fopAc_ac_c*, cXyz&);
- /* 8007E02C */ virtual void ChkPolyThrough(int, cBgS_PolyPassChk*);
- /* 8007E360 */ virtual void ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
- /* 8007E3D8 */ virtual void ChkGrpThrough(int, cBgS_GrpPassChk*, int);
+ /* 8007E02C */ virtual bool ChkPolyThrough(int, cBgS_PolyPassChk*);
+ /* 8007E360 */ virtual bool ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
+ /* 8007E3D8 */ virtual bool ChkGrpThrough(int, cBgS_GrpPassChk*, int);
void SetCrrFunc(dBgW_CrrFunc func) { m_crr_func = func; }
+ void OnMoveFlag() { m_flags |= 1; }
private:
/* 0xB0 */ dBgW_CrrFunc m_crr_func;
diff --git a/include/d/bg/d_bg_w_base.h b/include/d/bg/d_bg_w_base.h
index fee8c30efd..0564f0f4a7 100644
--- a/include/d/bg/d_bg_w_base.h
+++ b/include/d/bg/d_bg_w_base.h
@@ -32,7 +32,7 @@ public:
virtual u32 ChkMoveFlag() const = 0;
virtual cM3dGPla GetTriPla(cBgS_PolyInfo const&) const = 0;
virtual bool GetTriPnt(cBgS_PolyInfo const&, cXyz*, cXyz*, cXyz*) const = 0;
- virtual void GetBnd() const = 0;
+ virtual cM3dGAab* GetBnd() const = 0;
virtual u32 GetGrpInf(cBgS_PolyInfo const&) const = 0;
virtual void OffMoveFlag() = 0;
virtual void GetTopUnder(f32*, f32*) const = 0;
@@ -41,7 +41,7 @@ public:
virtual bool GroundCross(cBgS_GndChk*) = 0;
virtual void ShdwDraw(cBgS_ShdwDraw*) = 0;
virtual void CaptPoly(dBgS_CaptPoly&) = 0;
- virtual void WallCorrect(dBgS_Acch*) = 0;
+ virtual bool WallCorrect(dBgS_Acch*) = 0;
virtual void WallCorrectSort(dBgS_Acch*) = 0;
virtual bool RoofChk(dBgS_RoofChk*) = 0;
virtual bool SplGrpChk(dBgS_SplGrpChk*) = 0;
@@ -53,30 +53,30 @@ public:
virtual int GetSpecialCode(cBgS_PolyInfo const&) = 0;
virtual int GetSpecialCode(int) = 0;
virtual int GetMagnetCode(cBgS_PolyInfo const&) = 0;
- virtual void GetPolyObjThrough(int) = 0;
- virtual void GetPolyCamThrough(int) = 0;
- virtual void GetPolyLinkThrough(int) = 0;
- virtual void GetPolyArrowThrough(int) = 0;
+ virtual u32 GetPolyObjThrough(int) = 0;
+ virtual u32 GetPolyCamThrough(int) = 0;
+ virtual u32 GetPolyLinkThrough(int) = 0;
+ virtual u32 GetPolyArrowThrough(int) = 0;
virtual u32 GetPolyHSStick(int) = 0;
- virtual void GetPolyBoomerangThrough(int) = 0;
- virtual void GetPolyRopeThrough(int) = 0;
- virtual void GetPolyBombThrough(int) = 0;
- virtual void GetShdwThrough(int) = 0;
- virtual int GetUnderwaterRoofCode(int) = 0;
+ virtual u32 GetPolyBoomerangThrough(int) = 0;
+ virtual u32 GetPolyRopeThrough(int) = 0;
+ virtual u32 GetPolyBombThrough(int) = 0;
+ virtual bool GetShdwThrough(int) = 0;
+ virtual u32 GetUnderwaterRoofCode(int) = 0;
virtual int GetMonkeyBarsCode(cBgS_PolyInfo const&) = 0;
- virtual void GetLinkNo(cBgS_PolyInfo const&) = 0;
+ virtual int GetLinkNo(cBgS_PolyInfo const&) = 0;
virtual s32 GetWallCode(cBgS_PolyInfo const&) = 0;
virtual int GetPolyAtt0(cBgS_PolyInfo const&) = 0;
virtual int GetPolyAtt1(cBgS_PolyInfo const&) = 0;
virtual int GetGroundCode(cBgS_PolyInfo const&) = 0;
- virtual void GetIronBallThrough(int) = 0;
+ virtual u32 GetIronBallThrough(int) = 0;
virtual u32 GetAttackThrough(int) = 0;
virtual s32 GetCamMoveBG(cBgS_PolyInfo const&) = 0;
virtual s32 GetRoomCamId(cBgS_PolyInfo const&) = 0;
virtual s32 GetRoomPathId(cBgS_PolyInfo const&) = 0;
virtual s32 GetRoomPathPntNo(cBgS_PolyInfo const&) = 0;
- virtual void GetPolyGrpRoomInfId(cBgS_PolyInfo const&) = 0;
- virtual s32 GetGrpSoundId(cBgS_PolyInfo const&) = 0;
+ virtual u8 GetPolyGrpRoomInfId(cBgS_PolyInfo const&) = 0;
+ virtual u8 GetGrpSoundId(cBgS_PolyInfo const&) = 0;
virtual void CrrPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*) = 0;
virtual void TransPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*) = 0;
virtual void MatrixCrrPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*) = 0;
diff --git a/include/d/bg/d_bg_w_kcol.h b/include/d/bg/d_bg_w_kcol.h
index a52e448cb8..b3dee70ba3 100644
--- a/include/d/bg/d_bg_w_kcol.h
+++ b/include/d/bg/d_bg_w_kcol.h
@@ -7,72 +7,91 @@
struct dBgS_CaptPoly;
-struct KC_PrismData {};
+struct KC_PrismData {
+ /* 0x0 */ f32 field_0x0;
+ /* 0x4 */ u16 field_0x4;
+ /* 0x6 */ u16 field_0x6;
+ /* 0x8 */ u16 field_0x8;
+ /* 0xA */ u16 field_0xa;
+ /* 0xC */ u16 field_0xc;
+ /* 0xE */ u16 field_0xe;
+}; // Size: 0x10
+
+struct pkcdata {
+ /* 0x00 */ Vec* field_0x0;
+ /* 0x04 */ Vec* field_0x4;
+ /* 0x08 */ KC_PrismData* m_prism_data;
+ /* 0x0C */ KC_PrismData* m_block_data;
+ /* 0x10 */ u8 field_0x10[4];
+ /* 0x14 */ Vec m_area_min_pos;
+ /* 0x20 */ u8 field_0x20[4];
+ /* 0x24 */ u32 field_0x24;
+};
class dBgWKCol : public dBgW_Base {
public:
/* 8007E6F4 */ dBgWKCol();
/* 8007E7D0 */ void initKCollision(void*);
- /* 8007E804 */ void create(void*, void*);
+ /* 8007E804 */ void create(void* pprism, void* plc);
/* 8007E850 */ void getTriNrm(KC_PrismData*, Vec**) const;
- /* 8007E8C0 */ void GetTriPla(int) const;
- /* 8007E9A4 */ void GetTriPnt(int, Vec*, Vec*, Vec*) const;
- /* 8007E9D4 */ void GetTriPnt(KC_PrismData const*, Vec*, Vec*, Vec*) const;
+ /* 8007E8C0 */ cM3dGPla GetTriPla(int) const;
+ /* 8007E9A4 */ bool GetTriPnt(int, Vec*, Vec*, Vec*) const;
+ /* 8007E9D4 */ bool GetTriPnt(KC_PrismData const*, Vec*, Vec*, Vec*) const;
/* 8007EB70 */ void getPolyCode(int, dBgPc*) const;
- /* 8007EBC4 */ void chkPolyThrough(dBgPc*, cBgS_PolyPassChk*, cBgS_GrpPassChk*, cXyz&) const;
- /* 8007FF00 */ void ChkShdwDrawThrough(dBgPc*);
+ /* 8007EBC4 */ bool chkPolyThrough(dBgPc*, cBgS_PolyPassChk*, cBgS_GrpPassChk*, cXyz&) const;
+ /* 8007FF00 */ bool ChkShdwDrawThrough(dBgPc*);
/* 8007E74C */ virtual ~dBgWKCol();
/* 8007E86C */ virtual bool ChkNotReady() const;
/* 8007E87C */ virtual bool ChkLock() const;
/* 8007E884 */ virtual bool ChkMoveBg() const;
- /* 8007E88C */ virtual bool ChkMoveFlag() const;
+ /* 8007E88C */ virtual u32 ChkMoveFlag() const;
/* 8007E894 */ virtual cM3dGPla GetTriPla(cBgS_PolyInfo const&) const;
- /* 8007E980 */ virtual void GetTriPnt(cBgS_PolyInfo const&, cXyz*, cXyz*, cXyz*) const;
- /* 8007EB28 */ virtual void GetBnd() const;
- /* 8007EB30 */ virtual void GetGrpInf(cBgS_PolyInfo const&) const;
+ /* 8007E980 */ virtual bool GetTriPnt(cBgS_PolyInfo const&, cXyz*, cXyz*, cXyz*) const;
+ /* 8007EB28 */ virtual cM3dGAab* GetBnd() const;
+ /* 8007EB30 */ virtual u32 GetGrpInf(cBgS_PolyInfo const&) const;
/* 8007EB6C */ virtual void OffMoveFlag();
/* 800829AC */ virtual void GetTopUnder(f32*, f32*) const;
/* 8007EE34 */ virtual bool LineCheck(cBgS_LinChk*);
/* 8007F628 */ virtual bool GroundCross(cBgS_GndChk*);
/* 8007F9A4 */ virtual void ShdwDraw(cBgS_ShdwDraw*);
/* 8007FF1C */ virtual void CaptPoly(dBgS_CaptPoly&);
- /* 800811A0 */ virtual void WallCorrect(dBgS_Acch*);
+ /* 800811A0 */ virtual bool WallCorrect(dBgS_Acch*);
/* 80080330 */ virtual void WallCorrectSort(dBgS_Acch*);
/* 80081E18 */ virtual bool RoofChk(dBgS_RoofChk*);
/* 80082184 */ virtual bool SplGrpChk(dBgS_SplGrpChk*);
/* 800824EC */ virtual bool SphChk(dBgS_SphChk*, virtual void*);
- /* 800829F0 */ virtual void GetGrpRoomIndex(cBgS_PolyInfo const&) const;
- /* 80082A20 */ virtual void GetExitId(cBgS_PolyInfo const&);
- /* 80082A50 */ virtual void GetPolyColor(cBgS_PolyInfo const&);
- /* 80082A80 */ virtual void GetHorseNoEntry(cBgS_PolyInfo const&);
+ /* 800829F0 */ virtual s32 GetGrpRoomIndex(cBgS_PolyInfo const&) const;
+ /* 80082A20 */ virtual s32 GetExitId(cBgS_PolyInfo const&);
+ /* 80082A50 */ virtual s32 GetPolyColor(cBgS_PolyInfo const&);
+ /* 80082A80 */ virtual BOOL GetHorseNoEntry(cBgS_PolyInfo const&);
/* 80082AB0 */ virtual int GetSpecialCode(cBgS_PolyInfo const&);
/* 80082AE0 */ virtual int GetSpecialCode(int);
/* 80082B0C */ virtual int GetMagnetCode(cBgS_PolyInfo const&);
- /* 80082B6C */ virtual void GetPolyObjThrough(int);
- /* 80082B98 */ virtual void GetPolyCamThrough(int);
- /* 80082BC4 */ virtual void GetPolyLinkThrough(int);
- /* 80082BF0 */ virtual void GetPolyArrowThrough(int);
+ /* 80082B6C */ virtual u32 GetPolyObjThrough(int);
+ /* 80082B98 */ virtual u32 GetPolyCamThrough(int);
+ /* 80082BC4 */ virtual u32 GetPolyLinkThrough(int);
+ /* 80082BF0 */ virtual u32 GetPolyArrowThrough(int);
/* 80082C1C */ virtual u32 GetPolyHSStick(int);
- /* 80082C48 */ virtual void GetPolyBoomerangThrough(int);
- /* 80082C74 */ virtual void GetPolyRopeThrough(int);
- /* 80082CA0 */ virtual void GetPolyBombThrough(int);
- /* 80082CF8 */ virtual void GetShdwThrough(int);
- /* 80082CCC */ virtual int GetUnderwaterRoofCode(int);
+ /* 80082C48 */ virtual u32 GetPolyBoomerangThrough(int);
+ /* 80082C74 */ virtual u32 GetPolyRopeThrough(int);
+ /* 80082CA0 */ virtual u32 GetPolyBombThrough(int);
+ /* 80082CF8 */ virtual bool GetShdwThrough(int);
+ /* 80082CCC */ virtual u32 GetUnderwaterRoofCode(int);
/* 80082B3C */ virtual int GetMonkeyBarsCode(cBgS_PolyInfo const&);
- /* 80082D24 */ virtual void GetLinkNo(cBgS_PolyInfo const&);
+ /* 80082D24 */ virtual int GetLinkNo(cBgS_PolyInfo const&);
/* 80082D54 */ virtual s32 GetWallCode(cBgS_PolyInfo const&);
/* 80082D84 */ virtual int GetPolyAtt0(cBgS_PolyInfo const&);
/* 80082DB4 */ virtual int GetPolyAtt1(cBgS_PolyInfo const&);
/* 80082DE4 */ virtual int GetGroundCode(cBgS_PolyInfo const&);
- /* 80082E14 */ virtual void GetIronBallThrough(int);
- /* 80082E40 */ virtual void GetAttackThrough(int);
- /* 80082E6C */ virtual void GetCamMoveBG(cBgS_PolyInfo const&);
- /* 80082E9C */ virtual void GetRoomCamId(cBgS_PolyInfo const&);
- /* 80082ECC */ virtual void GetRoomPathId(cBgS_PolyInfo const&);
- /* 80082EFC */ virtual void GetRoomPathPntNo(cBgS_PolyInfo const&);
- /* 80082F2C */ virtual void GetPolyGrpRoomInfId(cBgS_PolyInfo const&);
- /* 80082F5C */ virtual void GetGrpSoundId(cBgS_PolyInfo const&);
+ /* 80082E14 */ virtual u32 GetIronBallThrough(int);
+ /* 80082E40 */ virtual u32 GetAttackThrough(int);
+ /* 80082E6C */ virtual s32 GetCamMoveBG(cBgS_PolyInfo const&);
+ /* 80082E9C */ virtual s32 GetRoomCamId(cBgS_PolyInfo const&);
+ /* 80082ECC */ virtual s32 GetRoomPathId(cBgS_PolyInfo const&);
+ /* 80082EFC */ virtual s32 GetRoomPathPntNo(cBgS_PolyInfo const&);
+ /* 80082F2C */ virtual u8 GetPolyGrpRoomInfId(cBgS_PolyInfo const&);
+ /* 80082F5C */ virtual u8 GetGrpSoundId(cBgS_PolyInfo const&);
/* 80082F8C */ virtual void CrrPos(cBgS_PolyInfo const&, virtual void*, bool, cXyz*, csXyz*,
csXyz*);
/* 80082F90 */ virtual void TransPos(cBgS_PolyInfo const&, virtual void*, bool, cXyz*, csXyz*,
@@ -80,8 +99,11 @@ public:
/* 80082F94 */ virtual void MatrixCrrPos(cBgS_PolyInfo const&, virtual void*, bool, cXyz*,
csXyz*, csXyz*);
+ KC_PrismData* getPrismData(int poly_index) const { return &m_pkc_head->m_prism_data[poly_index]; }
+ void getTri1Pos(KC_PrismData* pd, Vec** nrm) const { *nrm = &m_pkc_head->field_0x0[pd->field_0x4]; }
+
private:
- /* 0x18 */ void* m_pkc_head;
+ /* 0x18 */ pkcdata* m_pkc_head;
/* 0x1C */ dBgPlc m_code;
/* 0x20 */ cM3dGAab m_bnd;
};
diff --git a/include/d/bg/d_bg_w_sv.h b/include/d/bg/d_bg_w_sv.h
index 9a9190ae5c..251b604799 100644
--- a/include/d/bg/d_bg_w_sv.h
+++ b/include/d/bg/d_bg_w_sv.h
@@ -1,6 +1,22 @@
#ifndef D_BG_D_BG_W_SV_H
#define D_BG_D_BG_W_SV_H
-#include "dolphin/types.h"
+#include "d/bg/d_bg_w.h"
+
+class dBgWSv : public dBgW {
+public:
+ /* 80082F98 */ u8 Set(cBgD_t*, u32);
+ /* 80083020 */ void CopyBackVtx();
+ /* 8008308C */ void CrrPosWork(cXyz*, int, int, int);
+ /* 80083300 */ void TransPosWork(cXyz*, int, int, int);
+
+ /* 800835DC */ virtual ~dBgWSv();
+ /* 80083244 */ virtual void CrrPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*);
+ /* 8008351C */ virtual void TransPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*);
+ /* 800835D8 */ virtual void MatrixCrrPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*);
+
+ /* 0xC0 */ Vec* field_0xc0;
+ /* 0xC4 */ u8 field_0xc4;
+};
#endif /* D_BG_D_BG_W_SV_H */
diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h
index 0d0a803c88..f37913783b 100644
--- a/include/d/com/d_com_inf_game.h
+++ b/include/d/com/d_com_inf_game.h
@@ -162,6 +162,8 @@ public:
u8 getCStickStatusForce() { return mCStickStatusForce; }
u8 getCStickSetFlagForce() { return mCStickSetFlagForce; }
u8 getCStickDirectionForce() { return mCStickDirectionForce; }
+ u8 getFaceAnimeID() { return mFaceAnimeID; }
+ u8 getBaseAnimeID() { return mBaseAnimeID; }
bool isCStickSetFlag(u8 flag) { return mCStickSetFlag & flag; }
bool isDoSetFlag(u8 flag) { return flag & mDoSetFlag; }
bool isASetFlag(u8 flag) { return flag & mASetFlag; }
@@ -276,12 +278,14 @@ public:
int getOxygen() { return mOxygen; }
void setMaxOxygen(int max) { mMaxOxygen = max; }
int getMaxOxygen() { return mMaxOxygen; }
+ int getNowOxygen() { return mNowOxygen; }
void setItemNowLife(u16 life) { mItemNowLife = life; }
void setItemNowMagic(s16 magic) { mItemNowMagicCount = magic; }
void setItemNowOil(s32 oil) { mItemNowOil = oil; }
void setItemOilCount(s32 oil) { mItemOilCount += oil; }
s16 getItemMaxLifeCount() { return mItemMaxLifeCount; }
f32 getItemLifeCount() { return mItemLifeCount; }
+ s16 getItemMaxArrowNumCount() { return mItemMaxArrowNumCount; }
void clearItemMaxLifeCount() { mItemMaxLifeCount = 0; }
void clearItemLifeCount() {
mItemLifeCount = 0.0f;
@@ -364,7 +368,10 @@ public:
void setPlayerPtr(int i, fopAc_ac_c* ptr) { mPlayerPtr[i] = ptr; }
void setPlayer(int i, fopAc_ac_c* player) { mPlayer[i] = (daAlink_c*)player; }
- void setPlayerInfo(int i, fopAc_ac_c* ptr, int camIdx) { mPlayer[i] = (daAlink_c*)ptr; mPlayerCameraID[camIdx] = 0; }
+ void setPlayerInfo(int i, fopAc_ac_c* ptr, int camIdx) {
+ mPlayer[i] = (daAlink_c*)ptr;
+ mPlayerCameraID[camIdx] = 0;
+ }
void setPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[i] |= flag; }
void clearPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[i] &= ~flag; }
bool checkPlayerStatus(int param_0, int i, u32 flag) { return flag & mPlayerStatus[i]; }
@@ -377,6 +384,8 @@ public:
return mCameraInfo[i].mCameraAttentionStatus & flag;
}
void setCameraAttentionStatus(int i, u32 flag) { mCameraInfo[i].mCameraAttentionStatus = flag; }
+ void onCameraAttentionStatus(int i, u32 flag) { mCameraInfo[i].mCameraAttentionStatus |= flag; }
+ void offCameraAttentionStatus(int i, u32 flag) { mCameraInfo[i].mCameraAttentionStatus &= ~flag; }
void setCameraInfo(int camIdx, camera_class* p_cam, int param_2, int param_3, int param_4) {
mCameraInfo[camIdx].mCamera = p_cam;
mCameraInfo[camIdx].field_0x4 = param_2;
@@ -391,12 +400,15 @@ public:
bool& isPauseFlag() { return mPauseFlag; }
void offPauseFlag() { mPauseFlag = false; }
void onPauseFlag() { mPauseFlag = true; }
+ u8 getOxygenShowFlag() { return mOxygenShowFlag; }
void show2dOn() { mShow2D = 1; }
s8 getLayerOld() { return mLayerOld; }
void setMesgCancelButton(u8 button) { mMesgCancelButton = button; }
+ void setMesgBgm(u8 param_0) { mMesgBgm = param_0; }
int getMessageCountNumber() { return mMessageCountNum; }
void setWindowNum(u8 num) { mWindowNum = num; }
+ int getWindowNum() { return mWindowNum; }
dDlst_window_c* getWindow(int i) { return &mWindow[i]; }
void setWindow(int i, f32 param_1, f32 param_2, f32 param_3, f32 param_4, f32 param_5,
f32 param_6, int camID, int mode) {
@@ -797,6 +809,10 @@ void dComIfGs_onStageSwitch(int i_stageNo, int i_no);
void dComIfGs_offStageSwitch(int i_stageNo, int i_no);
void dComIfGs_PolyDamageOff_Set(s8 param_0);
u8 dComIfGs_staffroll_next_go_check();
+BOOL dComIfGs_isEventBit(u16 id);
+int dComIfGs_isItemFirstBit(u8 i_no);
+u16 dComIfGs_getRupee();
+static u16 dComIfGs_getLife();
inline void dComIfGs_init() {
g_dComIfG_gameInfo.info.init();
@@ -1059,6 +1075,10 @@ inline u8 dComIfGs_getOptVibration() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getVibration();
}
+inline u8 dComIfGs_getOptAttentionType() {
+ return g_dComIfG_gameInfo.info.getPlayer().getConfig().getAttentionType();
+}
+
inline BOOL dComIfGs_isTbox(int i_no) {
return g_dComIfG_gameInfo.info.getMemory().getBit().isTbox(i_no);
}
@@ -1397,7 +1417,7 @@ inline void dComIfGs_setTmpReg(u16 reg, u8 flag) {
g_dComIfG_gameInfo.info.getTmp().setEventReg(reg, flag);
}
-inline u8 dComIfGs_getTmpReg(u16 reg) {
+inline int dComIfGs_getTmpReg(u16 reg) {
return g_dComIfG_gameInfo.info.getTmp().getEventReg(reg);
}
@@ -1477,7 +1497,6 @@ inline void dComIfGs_setMemoryToCard(u8* p_saveData, int dataNum) {
g_dComIfG_gameInfo.info.memory_to_card((char*)p_saveData, dataNum);
}
-
void dComIfGp_setSelectItem(int index);
s32 dComIfGp_offHeapLockFlag(int flag);
void dComIfGp_createSubExpHeap2D();
@@ -1504,6 +1523,23 @@ JKRExpHeap* dComIfGp_getSubHeap2D(int flag);
void dComIfGp_world_dark_set(u8);
u8 dComIfGp_getNowLevel();
void dComIfGp_calcNowRegion();
+daHorse_c* dComIfGp_getHorseActor();
+static BOOL dComIfGp_event_runCheck();
+static s32 dComIfGp_evmng_getMyStaffId(const char* pName, fopAc_ac_c* pActor, int param_2);
+static u16 dComIfGp_event_chkEventFlag(u16 flag);
+static s8 dComIfGp_getPlayerCameraID(int idx);
+static dEvent_manager_c& dComIfGp_getEventManager();
+static u32 dComIfGp_checkPlayerStatus0(int param_0, u32 param_1);
+static u32 dComIfGp_checkPlayerStatus1(int param_0, u32 param_1);
+static dEvt_control_c& dComIfGp_getEvent();
+static bool dComIfGp_evmng_startCheck(char const* param_0);
+static dStage_stageDt_c* dComIfGp_getStage();
+void dComIfGp_setItemLifeCount(f32 amount, u8 type);
+void dComIfGp_setItemRupeeCount(s32 param_0);
+static u8 dComIfGp_getDoStatus();
+static u8 dComIfGp_getRStatus();
+static dAttCatch_c* dComIfGp_att_getCatghTarget();
+static void dComIfGp_setBottleStatus(u8 param_0, u8 param_1);
inline void i_dComIfGp_setItemLifeCount(float amount, u8 type) {
g_dComIfG_gameInfo.play.setItemLifeCount(amount, type);
@@ -2024,7 +2060,16 @@ inline BOOL dComIfGp_checkCameraAttentionStatus(int i, u32 flag) {
return g_dComIfG_gameInfo.play.checkCameraAttentionStatus(i, flag);
}
-inline void dComIfGp_setCameraInfo(int camIdx, camera_class* p_cam, int param_2, int param_3, int param_4) {
+inline void dComIfGp_onCameraAttentionStatus(int i, u32 flag) {
+ g_dComIfG_gameInfo.play.onCameraAttentionStatus(i, flag);
+}
+
+inline void dComIfGp_offCameraAttentionStatus(int i, u32 flag) {
+ g_dComIfG_gameInfo.play.offCameraAttentionStatus(i, flag);
+}
+
+inline void dComIfGp_setCameraInfo(int camIdx, camera_class* p_cam, int param_2, int param_3,
+ int param_4) {
g_dComIfG_gameInfo.play.setCameraInfo(camIdx, p_cam, param_2, param_3, param_4);
}
@@ -2064,6 +2109,14 @@ inline int dComIfGp_getOxygen() {
return g_dComIfG_gameInfo.play.getOxygen();
}
+inline int dComIfGp_getNowOxygen() {
+ return g_dComIfG_gameInfo.play.getNowOxygen();
+}
+
+inline u8 dComIfGp_getOxygenShowFlag() {
+ return g_dComIfG_gameInfo.play.getOxygenShowFlag();
+}
+
inline u8 dComIfGp_getNeedLightDropNum() {
return g_dComIfG_gameInfo.play.getNeedLightDropNum();
}
@@ -2112,6 +2165,10 @@ inline void dComIfGp_setMesgCancelButton(u8 button) {
g_dComIfG_gameInfo.play.setMesgCancelButton(button);
}
+inline void dComIfGp_setMesgBgmOn() {
+ g_dComIfG_gameInfo.play.setMesgBgm(1);
+}
+
inline s32 dComIfGp_checkStatus(u16 flags) {
return g_dComIfG_gameInfo.play.checkStatus(flags);
}
@@ -2136,6 +2193,10 @@ inline f32 dComIfGp_getItemLifeCount() {
return g_dComIfG_gameInfo.play.getItemLifeCount();
}
+inline s16 dComIfGp_getItemMaxArrowNumCount() {
+ return g_dComIfG_gameInfo.play.getItemMaxArrowNumCount();
+}
+
inline void dComIfGp_clearItemMaxLifeCount() {
g_dComIfG_gameInfo.play.clearItemMaxLifeCount();
}
@@ -2152,6 +2213,14 @@ inline int dComIfGp_getMessageCountNumber() {
return g_dComIfG_gameInfo.play.getMessageCountNumber();
}
+inline u8 dComIfGp_getMesgFaceAnimeAttrInfo() {
+ return g_dComIfG_gameInfo.play.getFaceAnimeID();
+}
+
+inline u8 dComIfGp_getMesgAnimeAttrInfo() {
+ return g_dComIfG_gameInfo.play.getBaseAnimeID();
+}
+
inline void dComIfGp_setCameraParamFileName(int i, char* name) {
g_dComIfG_gameInfo.play.setCameraParamFileName(i, name);
}
@@ -2168,6 +2237,10 @@ inline void dComIfGp_setWindowNum(int num) {
g_dComIfG_gameInfo.play.setWindowNum(num);
}
+inline int dComIfGp_getWindowNum() {
+ return g_dComIfG_gameInfo.play.getWindowNum();
+}
+
inline dDlst_window_c* dComIfGp_getWindow(int i) {
return g_dComIfG_gameInfo.play.getWindow(i);
}
@@ -2288,7 +2361,8 @@ inline int dComIfGp_event_moveApproval(void* actor) {
inline int dComIfGp_event_order(u16 eventType, u16 priority, u16 flag, u16 param_3, void* param_4,
void* param_5, s16 eventID, u8 infoIdx) {
- return g_dComIfG_gameInfo.play.getEvent().order(eventType, priority, flag, param_3, param_4, param_5, eventID, infoIdx);
+ return g_dComIfG_gameInfo.play.getEvent().order(eventType, priority, flag, param_3, param_4,
+ param_5, eventID, infoIdx);
}
inline void dComIfGp_event_setGtItm(int i_itemNo) {
@@ -2436,10 +2510,10 @@ inline u32 dComIfGp_particle_set(u32 param_0, u16 param_1, const cXyz* param_2,
param_10, param_11, 1.0f);
}
-inline u32 dComIfGp_particle_set(u32 param_0, u16 param_1, const cXyz* param_2, const csXyz* param_3,
- const cXyz* param_4, u8 param_5, dPa_levelEcallBack* param_6,
- s8 param_7, const GXColor* param_8, const GXColor* param_9,
- const cXyz* param_10) {
+inline u32 dComIfGp_particle_set(u32 param_0, u16 param_1, const cXyz* param_2,
+ const csXyz* param_3, const cXyz* param_4, u8 param_5,
+ dPa_levelEcallBack* param_6, s8 param_7, const GXColor* param_8,
+ const GXColor* param_9, const cXyz* param_10) {
return g_dComIfG_gameInfo.play.getParticle()->setNormal(
param_0, param_1, param_2, NULL, param_3, param_4, param_5, param_6, param_7, param_8,
param_9, param_10, 1.0f);
@@ -2454,20 +2528,29 @@ inline u32 dComIfGp_particle_set(u16 param_1, const cXyz* param_2, const dKy_tev
param_9, param_10, param_11, 1.0f);
}
+inline u32 dComIfGp_particle_set(u16 param_1, const cXyz* param_2, const csXyz* param_3,
+ const cXyz* param_4, u8 param_5, dPa_levelEcallBack* param_6,
+ s8 param_7, const GXColor* param_8, const GXColor* param_9,
+ const cXyz* param_10) {
+ return g_dComIfG_gameInfo.play.getParticle()->setNormal(param_1, param_2, NULL, param_3,
+ param_4, param_5, param_6, param_7,
+ param_8, param_9, param_10, 1.0f);
+}
+
inline u32 dComIfGp_particle_set(u16 param_0, const cXyz* param_1, const csXyz* param_2,
const cXyz* param_3) {
return dComIfGp_particle_set(param_0, param_1, NULL, param_2, param_3, 0xFF, NULL, -1, NULL,
NULL, NULL);
}
-inline u32 dComIfGp_particle_set(u16 param_0, const cXyz* param_1, const dKy_tevstr_c* param_2, const csXyz* param_3,
- const cXyz* param_4) {
+inline u32 dComIfGp_particle_set(u16 param_0, const cXyz* param_1, const dKy_tevstr_c* param_2,
+ const csXyz* param_3, const cXyz* param_4) {
return dComIfGp_particle_set(param_0, param_1, param_2, param_3, param_4, 0xFF, NULL, -1, NULL,
NULL, NULL);
}
-inline u32 dComIfGp_particle_set(u32 param_0, u16 param_1, const cXyz* param_2, const csXyz* param_3,
- const cXyz* param_4) {
+inline u32 dComIfGp_particle_set(u32 param_0, u16 param_1, const cXyz* param_2,
+ const csXyz* param_3, const cXyz* param_4) {
return dComIfGp_particle_set(param_0, param_1, param_2, param_3, param_4, 0xFF, NULL, -1, NULL,
NULL, NULL);
}
@@ -2496,7 +2579,6 @@ int dComIfGd_setShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3
f32 param_5, f32 param_6, f32 param_7, cBgS_PolyInfo& param_8,
dKy_tevstr_c* param_9, s16 param_10, f32 param_11, _GXTexObj* param_12);
-
inline int dComIfGd_setRealShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3,
f32 param_4, f32 param_5, dKy_tevstr_c* param_6) {
return g_dComIfG_gameInfo.drawlist.setRealShadow(param_0, param_1, param_2, param_3, param_4,
@@ -2522,6 +2604,10 @@ inline void dComIfGd_set2DOpa(dDlst_base_c* dlst) {
g_dComIfG_gameInfo.drawlist.set2DOpa(dlst);
}
+inline void dComIfGd_set2DXlu(dDlst_base_c* dlst) {
+ g_dComIfG_gameInfo.drawlist.set2DXlu(dlst);
+}
+
inline void dComIfGd_set2DOpaTop(dDlst_base_c* dlst) {
g_dComIfG_gameInfo.drawlist.set2DOpaTop(dlst);
}
@@ -2530,6 +2616,13 @@ inline view_class* dComIfGd_getView() {
return g_dComIfG_gameInfo.drawlist.getView();
}
+inline MtxP dComIfGd_getViewRotMtx() {
+ return ((camera_process_class*)g_dComIfG_gameInfo.drawlist.getView())->mViewMtxNoTrans;
+}
+inline MtxP dComIfGd_getViewMtx() {
+ return ((camera_process_class*)g_dComIfG_gameInfo.drawlist.getView())->mViewMtx;
+}
+
inline J3DDrawBuffer* dComIfGd_getListFilter() {
return g_dComIfG_gameInfo.drawlist.getOpaListFilter();
}
@@ -2562,6 +2655,11 @@ inline void dComIfGd_setListItem3D() {
g_dComIfG_gameInfo.drawlist.setXluListItem3D();
}
+inline void dComIfGd_setList3Dlast() {
+ g_dComIfG_gameInfo.drawlist.setOpaList3Dlast();
+ g_dComIfG_gameInfo.drawlist.setXluList3Dlast();
+}
+
inline void dComIfGd_setXluList2DScreen() {
g_dComIfG_gameInfo.drawlist.setXluList2DScreen();
}
diff --git a/include/d/com/d_com_static.h b/include/d/com/d_com_static.h
index 2268d3081a..ba51a8f505 100644
--- a/include/d/com/d_com_static.h
+++ b/include/d/com/d_com_static.h
@@ -11,30 +11,46 @@ public:
class data_c {
public:
/* 80030F14 */ void set(s8, cXyz const&, cXyz const&, u8, u8, u8);
- /* 80030FBC */ void reset();
- /* 80030FCC */ void isSwitch();
- /* 800310C8 */ void check(fopAc_ac_c*);
- /* 80031038 */ void check(cXyz const&);
+ /* 80030FBC */ data_c* reset();
+ /* 80030FCC */ u8 isSwitch();
+ /* 800310C8 */ u8 check(fopAc_ac_c*);
+ /* 80031038 */ bool check(cXyz const&);
/* 80031150 */ void execute();
/* 80031F28 */ ~data_c();
/* 80031F64 */ data_c();
- };
+
+ void setNext(data_c* i_next) { mpNext = i_next; }
+ data_c* getNext() { return mpNext; }
+ u8 getType() { return mType; }
+
+ /* 0x00 */ s8 mRoomNo;
+ /* 0x01 */ bool field_0x1;
+ /* 0x02 */ u8 field_0x2;
+ /* 0x03 */ u8 field_0x3;
+ /* 0x04 */ u8 mType;
+ /* 0x08 */ cXyz field_0x8;
+ /* 0x14 */ cXyz field_0x14;
+ /* 0x20 */ data_c* mpNext;
+ }; // Size: 0x24
class room_c {
public:
/* 80031190 */ void add(daSus_c::data_c*);
/* 800311FC */ void reset();
/* 80031EE4 */ room_c();
- };
+
+ /* 0x0 */ data_c* mpData;
+ }; // Size: 0x4
/* 80031248 */ void newData(s8, cXyz const&, cXyz const&, u8, u8, u8);
/* 800313BC */ void reset();
/* 800314D4 */ static void check(fopAc_ac_c*);
- /* 80031434 */ static bool check(s8, cXyz const&);
+ /* 80031434 */ static bool check(s8 i_roomNo, cXyz const& i_pos);
/* 800315A4 */ static void execute();
static u8 mData[1152];
static u8 mRoom[256];
+ static s16 mSetTop;
};
#endif /* D_COM_D_COM_STATIC_H */
diff --git a/include/d/d_attention.h b/include/d/d_attention.h
index d0c674f904..7551d7327c 100644
--- a/include/d/d_attention.h
+++ b/include/d/d_attention.h
@@ -10,32 +10,32 @@
class dAttHint_c {
public:
dAttHint_c() {}
- /* 800738B4 */ void getPId(void*);
- /* 800738CC */ void convPId(unsigned int);
- /* 800738FC */ void request(fopAc_ac_c*, int);
+ /* 800738B4 */ u32 getPId(void*);
+ /* 800738CC */ fopAc_ac_c* convPId(unsigned int);
+ /* 800738FC */ int request(fopAc_ac_c*, int);
/* 80073958 */ void init();
/* 80073970 */ void proc();
private:
/* 0x0 */ u32 mHintActorID;
- /* 0x4 */ u32 mPriority;
+ /* 0x4 */ int mPriority;
/* 0x8 */ u32 field_0x8;
};
class dAttCatch_c {
public:
dAttCatch_c() {}
- s32 convPId(unsigned int);
+ fopAc_ac_c* convPId(unsigned int);
void init();
void proc();
void request(fopAc_ac_c*, u8, f32, f32, f32, s16, int);
- s32 getCatghTarget() { return convPId(mCatghTargetID); }
+ fopAc_ac_c* getCatghTarget() { return convPId(mCatghTargetID); }
u8 getChangeItem() { return mChangeItem; }
private:
- /* 0x00 */ void* field_0x0;
- /* 0x04 */ f32 field_0x4;
+ /* 0x00 */ u32 field_0x0;
+ /* 0x04 */ int field_0x4;
/* 0x08 */ f32 field_0x8;
/* 0x0C */ u8 field_0xc;
/* 0x0D */ u8 field_0xd;
@@ -47,11 +47,7 @@ private:
class dAttParam_c {
public:
- dAttParam_c() {}
- /* 80070038 */ dAttParam_c(s32);
-
-private:
- /* 0x00 */ u16 field_0x0;
+ /* 0x00 */ u16 mFlags;
/* 0x04 */ f32 field_0x4;
/* 0x08 */ f32 field_0x8;
/* 0x0C */ f32 field_0xc;
@@ -66,21 +62,23 @@ private:
/* 0x30 */ f32 mAttnCursorOffsetY;
/* 0x34 */ u8 mAttnCursorAppearFrames;
/* 0x35 */ u8 mAttnCursorDisappearFrames;
+ /* 0x38 */ f32 field_0x38;
+ /* 0x3C */ f32 field_0x3c;
public:
+ dAttParam_c() {}
+ /* 80070038 */ dAttParam_c(s32);
+
/* 80070110 */ virtual ~dAttParam_c();
- /* 0x38 vtable */
-private:
- /* 0x3C */ f32 mSelCursorAnmSpeed;
- /* 0x40 */ f32 mAttnCursorAnmSpeed;
- /* 0x44 */ u32 mDispPosX;
- /* 0x48 */ u32 mDispPosY;
-}; // Size = 0x4C
+ bool CheckFlag(u16 flag) { return mFlags & flag; }
+
+ /* 0x40 vtable */
+}; // Size: 0x44
class dAttLook_c {
public:
- /* 80073CA4 */ void convPId(unsigned int);
+ /* 80073CA4 */ fopAc_ac_c* convPId(unsigned int);
/* 80073CD4 */ void init();
/* 80073CEC */ void proc();
/* 80073D08 */ void request(fopAc_ac_c*, f32, f32, f32, s16, int);
@@ -96,10 +94,11 @@ class dAttList_c {
public:
/* 800304D0 */ ~dAttList_c() {}
/* 8003050C */ dAttList_c() {}
- /* 80073864 */ void getActor();
+ /* 80073864 */ fopAc_ac_c* getActor();
/* 80073898 */ void setActor(fopAc_ac_c*);
-private:
+ u32 getPid() { return mActorID; }
+
/* 0x00 */ f32 mWeight;
/* 0x04 */ f32 mDistance;
/* 0x08 */ cSAngle mAngle;
@@ -117,15 +116,15 @@ public:
/* 800732B0 */ void draw(cXyz&, f32 (*)[4]);
/* 0x000 */ J3DModel* mModel[2];
- /* 0x008 */ mDoExt_bckAnm bckAnm[2];
- /* 0x040 */ mDoExt_bpkAnm bpkAnm[2];
- /* 0x070 */ mDoExt_brkAnm brkAnm[2];
- /* 0x0A0 */ mDoExt_brkAnm brkAnm2[2];
- /* 0x0D0 */ mDoExt_btkAnm btkAnm[2];
- /* 0x100 */ mDoExt_bckAnm bckAnm2;
- /* 0x11C */ mDoExt_bpkAnm bpkAnm2;
- /* 0x134 */ mDoExt_brkAnm brkAnm3;
- /* 0x14C */ mDoExt_btkAnm btkAnm2;
+ /* 0x008 */ mDoExt_bckAnm mNoticeCursorBck[2];
+ /* 0x040 */ mDoExt_bpkAnm mNoticeCursorBpk[2];
+ /* 0x070 */ mDoExt_brkAnm mNoticeCursorBrk[2];
+ /* 0x0A0 */ mDoExt_brkAnm mNoticeCursor02Brk[2];
+ /* 0x0D0 */ mDoExt_btkAnm mNoticeCursorBtk[2];
+ /* 0x100 */ mDoExt_bckAnm mImpactBck;
+ /* 0x11C */ mDoExt_bpkAnm mImpactBpk;
+ /* 0x134 */ mDoExt_brkAnm mImpactBrk;
+ /* 0x14C */ mDoExt_btkAnm mImpactBtk;
/* 0x164 */ cXyz field_0x164;
/* 0x170 */ u8 field_0x170;
/* 0x171 */ u8 field_0x171;
@@ -152,45 +151,56 @@ struct dist_entry {
u32 field_0x18;
}; // Size: 0x1C
+struct type_tbl_entry {
+ s16 field_0x0;
+ u16 field_0x2;
+};
+
class dAttention_c {
public:
+ enum EState {
+ ST_NONE,
+ ST_LOCK,
+ ST_RELEASE,
+ };
+
dAttention_c() {}
/* 80070198 */ dAttention_c(fopAc_ac_c*, u32);
/* 80070774 */ ~dAttention_c();
- /* 80070844 */ void GetLockonList(s32);
- /* 80070880 */ void getActionBtnB();
- /* 80070974 */ void getActionBtnXY();
- /* 80070A70 */ void chkAttMask(u32, u32);
- /* 80070E90 */ void calcWeight(int, fopAc_ac_c*, f32, s16, s16, u32*);
+ /* 80070844 */ dAttList_c* GetLockonList(s32);
+ /* 80070880 */ dAttList_c* getActionBtnB();
+ /* 80070974 */ dAttList_c* getActionBtnXY();
+ /* 80070A70 */ int chkAttMask(u32, u32);
+ /* 80070E90 */ f32 calcWeight(int, fopAc_ac_c*, f32, s16, s16, u32*);
/* 800710C0 */ void setList(int, fopAc_ac_c*, f32, f32, cSAngle, u32);
/* 80071240 */ void initList(u32);
- /* 800713CC */ void makeList();
+ /* 800713CC */ int makeList();
/* 80071424 */ void setOwnerAttentionPos();
- /* 80071488 */ void SelectAttention(fopAc_ac_c*);
+ /* 80071488 */ int SelectAttention(fopAc_ac_c*);
/* 800716B8 */ void sortList();
/* 800718A4 */ void stockAttention();
- /* 80071960 */ void nextAttention();
- /* 80071A68 */ void freeAttention();
- /* 80071A98 */ void chaseAttention();
- /* 80071CC0 */ void EnemyDistance(fopAc_ac_c*);
+ /* 80071960 */ fopAc_ac_c* nextAttention();
+ /* 80071A68 */ int freeAttention();
+ /* 80071A98 */ bool chaseAttention();
+ /* 80071CC0 */ f32 EnemyDistance(fopAc_ac_c*);
/* 80071DEC */ void runSoundProc();
/* 80071E84 */ void runDrawProc();
/* 800720F4 */ void runDebugDisp();
/* 800720F8 */ void checkButton();
- /* 800722A0 */ void triggerProc();
- /* 800722EC */ void lostCheck();
+ /* 800722A0 */ bool triggerProc();
+ /* 800722EC */ int lostCheck();
/* 80072344 */ void judgementStatus4Hold();
/* 800725F0 */ void judgementStatus4Switch();
- /* 80072924 */ void Run();
+ /* 80072924 */ int Run();
/* 80072BD4 */ void Draw();
/* 80072D80 */ void lockSoundStart(u32);
- /* 8007353C */ void LockonTarget(s32);
- /* 800735DC */ void LockonReleaseDistanse();
- /* 800736CC */ void LockonTargetPId(s32);
- /* 80073734 */ void ActionTarget(s32);
- /* 8007378C */ void CheckObjectTarget(s32);
+ /* 8007353C */ fopAc_ac_c* LockonTarget(s32);
+ /* 800735DC */ f32 LockonReleaseDistanse();
+ /* 800736CC */ u32 LockonTargetPId(s32);
+ /* 80073734 */ fopAc_ac_c* ActionTarget(s32);
+ /* 8007378C */ fopAc_ac_c* CheckObjectTarget(s32);
/* 800737E4 */ bool LockonTruth();
- /* 80073838 */ void checkDistance(cXyz*, s16, cXyz*, f32, f32, f32, f32);
+ /* 80073838 */ int checkDistance(cXyz*, s16, cXyz*, f32, f32, f32, f32);
/* 8016E424 */ void LockEdge();
/* 80182994 */ void GetCheckObjectCount();
/* 80182AD0 */ void keepLock(int);
@@ -199,6 +209,10 @@ public:
dAttCatch_c& getCatghTarget() { return mCatghTarget; }
u8 getCatchChgItem() { return mCatghTarget.getChangeItem(); }
BOOL chkFlag(u32 flag) { return mFlags & flag; }
+ void setFlag(u32 flag) { mFlags |= flag; }
+ void clrFlag(u32 flag) { mFlags &= ~flag; }
+ int GetActionCount() { return mActionCount; }
+ int GetLockonCount() { return mLockonCount; }
s8 Lockon() {
/* s32 chk = true;
if (!LockonTruth() && !chkFlag(0x20000000)) {
@@ -209,28 +223,28 @@ public:
return !LockonTruth() && !chkFlag(0x20000000);
}
- static u8 loc_type_tbl[12];
- static u8 act_type_tbl[20];
+ static type_tbl_entry loc_type_tbl[3];
+ static type_tbl_entry act_type_tbl[5];
static dist_entry dist_table[234];
- static u32 loc_type_num;
- static u32 act_type_num;
- static u32 chk_type_tbl;
- static u32 chk_type_num;
+ static int loc_type_num;
+ static int act_type_num;
+ static type_tbl_entry chk_type_tbl[1];
+ static int chk_type_num;
public:
/* 0x000 */ fopAc_ac_c* mpPlayer;
/* 0x004 */ u32 mLockTargetID;
/* 0x008 */ dAttDraw_CallBack_c mpDrawCallback;
- /* 0x00C */ u32 field_0xc;
+ /* 0x00C */ u32 mPadNo;
/* 0x010 */ u32 field_0x10;
/* 0x014 */ u8 field_0x14[4];
/* 0x018 */ JKRSolidHeap* heap;
- /* 0x01C */ cXyz field_0x1c;
+ /* 0x01C */ cXyz mDrawAttnPos;
/* 0x028 */ dAttDraw_c draw[2];
- /* 0x318 */ int field_0x318;
- /* 0x31C */ cXyz field_0x31c;
- /* 0x328 */ u8 field_0x328;
- /* 0x329 */ u8 field_0x329;
+ /* 0x318 */ u32 mTargetActorID;
+ /* 0x31C */ cXyz mOwnerAttnPos;
+ /* 0x328 */ s8 field_0x328;
+ /* 0x329 */ u8 mAttnStatus;
/* 0x32A */ u8 field_0x32a;
/* 0x32B */ u8 field_0x32b;
/* 0x32C */ u8 field_0x32c;
@@ -248,22 +262,17 @@ public:
/* 0x3E0 */ dAttList_c mActionList[4];
/* 0x430 */ int mActionCount;
/* 0x434 */ int mActionOffset;
- /* 0x438 */ dAttList_c field_0x438[4];
+ /* 0x438 */ dAttList_c mCheckObjectList[4];
/* 0x488 */ int mCheckObjectCount;
- /* 0x48C */ int field_0x48c;
+ /* 0x48C */ int mCheckObjectOffset;
/* 0x490 */ dAttHint_c mZHintTarget;
/* 0x49C */ dAttCatch_c mCatghTarget;
/* 0x4B4 */ dAttLook_c mLookTarget;
- /* 0x4C4 */ int field_0x4c4;
- /* 0x4C8 */ u8 field_0x4c8;
- /* 0x4C9 */ u8 field_0x4c9;
- /* 0x4CA */ u8 field_0x4ca;
- /* 0x4CB */ u8 field_0x4cb;
- /* 0x4CC */ u8 field_0x4cc;
- /* 0x4CD */ u8 field_0x4cd;
- /* 0x4CE */ u8 field_0x4ce;
- /* 0x4CF */ u8 field_0x4cf;
- /* 0x4D0 */ dAttParam_c mAttParam;
+ /* 0x4C4 */ int mAttnBlockTimer;
+ /* 0x4C8 */ dAttParam_c mAttParam;
+ /* 0x50C */ u8 field_0x50c[0x514 - 0x50c];
+ /* 0x514 */ u32 mEnemyActorID;
+ /* 0x518 */ f32 mEnemyDist;
}; // Size: 0x51C
STATIC_ASSERT(sizeof(dAttention_c) == 0x51C);
diff --git a/include/d/d_demo.h b/include/d/d_demo.h
index 584e24cc85..15d09fb5cd 100644
--- a/include/d/d_demo.h
+++ b/include/d/d_demo.h
@@ -52,15 +52,15 @@ public:
class dDemo_actor_c : public JStage::TActor {
public:
/* 80038020 */ dDemo_actor_c();
- /* 80038128 */ void getActor();
+ /* 80038128 */ fopAc_ac_c* getActor();
/* 8003815C */ void setActor(fopAc_ac_c*);
- /* 8003819C */ void getPrm_Morf();
+ /* 8003819C */ f32 getPrm_Morf();
/* 80038338 */ void getDemoIDData(int*, int*, int*, u16*, u8*);
/* 80038098 */ virtual ~dDemo_actor_c();
/* 800387EC */ virtual void JSGSetData(u32, void const*, u32);
- /* 8003A05C */ virtual void JSGFindNodeID(char const*) const;
- /* 8003A088 */ virtual void JSGGetNodeTransformation(u32, f32 (*)[4]) const;
+ /* 8003A05C */ virtual s32 JSGFindNodeID(char const*) const;
+ /* 8003A088 */ virtual int JSGGetNodeTransformation(u32, f32 (*)[4]) const;
/* 8003A0D8 */ virtual void JSGGetTranslation(Vec*) const;
/* 80038920 */ virtual void JSGSetTranslation(Vec const&);
/* 8003A0F4 */ virtual void JSGGetScaling(Vec*) const;
@@ -77,6 +77,16 @@ public:
/* 8003A0D0 */ virtual f32 JSGGetTextureAnimationFrameMax() const;
void setModel(J3DModel* p_model) { mModel = p_model; }
+ u8 checkEnable(u16 flag) { return mFlags & flag; }
+ void onEnable(u16 flag) { mFlags |= flag; }
+ cXyz& getTrans() { return mTrans; }
+ cXyz& getScale() { return mScale; }
+ csXyz& getRatate() { return mRotate; }
+ u32 getAnmId() { return mAnmId; }
+ u32 getOldAnmId() { return mOldAnmId; }
+ void setOldAnmId(u32 id) { mOldAnmId = id; }
+ void setAnmFrameMax(f32 max) { mAnmFrameMax = max; }
+ f32 getAnmFrame() { return mAnmFrame; }
private:
/* 0x04 */ u16 mFlags;
@@ -136,6 +146,8 @@ public:
/* 80038EA8 */ virtual void JSGSetAngleAttenuation(f32, GXSpotFn);
/* 80038EC0 */ virtual void JSGSetDirection(Vec const&);
+ void onEnable(u8 flag) { mFlags |= flag; }
+
private:
/* 0x04 */ u8 mFlags;
/* 0x08 */ JStage::TELight mLightType;
@@ -161,6 +173,8 @@ public:
/* 80038F10 */ virtual void JSGSetEndZ(f32);
/* 80038F24 */ virtual void JSGSetColor(GXColor);
+ void onEnable(u8 flag) { mFlags |= flag; }
+
private:
/* 0x04 */ u8 mFlags;
/* 0x05 */ u8 mFogType;
@@ -193,6 +207,8 @@ public:
/* 80038D84 */ virtual f32 JSGGetViewRoll() const;
/* 80038DDC */ virtual void JSGSetViewRoll(f32);
+ void onEnable(u8 flag) { mFlags |= flag; }
+
private:
/* 0x04 */ u8 mFlags;
/* 0x08 */ f32 mProjNear;
@@ -214,6 +230,8 @@ public:
/* 800394C8 */ virtual ~dDemo_ambient_c();
/* 80038DF0 */ virtual void JSGSetColor(GXColor);
+ void onEnable(u8 flag) { mFlags |= flag; }
+
private:
/* 0x04 */ u8 mFlags;
/* 0x05 */ GXColor mColor;
@@ -255,6 +273,8 @@ public:
static s32 getMode() { return m_mode; }
static JStudio::stb::TControl* getControl() { return m_control; }
static bool isStatus(u32 status) { return m_status & status; }
+ static void onStatus(u32 status) { m_status |= status; }
+ static void offStatus(u32 status) { m_status &= ~status; }
static void setBranchData(const u8* p_data) { m_branchData = p_data; }
static s16 m_branchId;
diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h
index 4a4abb8f91..423383e051 100644
--- a/include/d/d_drawlist.h
+++ b/include/d/d_drawlist.h
@@ -226,6 +226,7 @@ public:
/* 80051ADC */ void setScissor(f32, f32, f32, f32);
void setCameraID(int id) { mCameraID = id; }
+ s8 getCameraID() { return mCameraID; }
void setMode(int mode) { mMode = mode; }
f32 getViewPort() { return mXOrig; }
@@ -284,6 +285,7 @@ public:
void set2DOpa(dDlst_base_c* dlst) { set(mp2DOpaSet[0], mp2DOpaSet[1], dlst); }
void set2DOpaTop(dDlst_base_c* dlst) { set(mp2DOpaTopSet[0], mp2DOpaTopSet[1], dlst); }
+ void set2DXlu(dDlst_base_c* dlst) { set(mp2DXluSet[0], mp2DXluSet[1], dlst); }
view_class* getView() { return mView; }
void setView(view_class* view) { mView = view; }
void setWindow(dDlst_window_c* window) { mWindow = window; }
@@ -303,6 +305,8 @@ public:
void setXluListItem3D() { setXluDrawList(mDrawBuffers[DB_XLU_LIST_ITEM3D]); }
void setXluListBG() { setXluDrawList(mDrawBuffers[DB_XLU_LIST_BG]); }
void setOpaListBG() { setOpaDrawList(mDrawBuffers[DB_OPA_LIST_BG]); }
+ void setOpaList3Dlast() { setOpaDrawList(mDrawBuffers[DB_LIST_3D_LAST]); }
+ void setXluList3Dlast() { setXluDrawList(mDrawBuffers[DB_LIST_3D_LAST]); }
void setXluList2DScreen() { setXluDrawList(mDrawBuffers[DB_LIST_2D_SCREEN]); }
void peekZdata() { mPeekZ.peekData(); }
diff --git a/include/d/d_lib.h b/include/d/d_lib.h
index 121bff182e..0f87597d27 100644
--- a/include/d/d_lib.h
+++ b/include/d/d_lib.h
@@ -2,6 +2,7 @@
#define D_D_LIB_H
#include "dolphin/types.h"
+#include "dolphin/os/OS.h"
struct JKRAramArchive;
u32 dLib_getExpandSizeFromAramArchive(JKRAramArchive* arc, char const* resName);
@@ -71,12 +72,13 @@ struct CSTControl : public STControl {
};
struct dLib_time_c {
- /* 80032804 */ void getTime();
+ /* 80032804 */ static OSTime getTime();
/* 80032880 */ static void stopTime();
/* 800328BC */ static void startTime();
- static u8 m_diffTime[4];
- static u8 m_stopTime[4];
+ static OSTime m_diffTime;
+ static OSTime m_stopTime;
+ static bool m_timeStopped;
};
#endif /* D_D_LIB_H */
diff --git a/include/d/d_path.h b/include/d/d_path.h
index 6e4187ba36..c30446e949 100644
--- a/include/d/d_path.h
+++ b/include/d/d_path.h
@@ -2,18 +2,22 @@
#define D_D_PATH_H
#include "dolphin/types.h"
+#include "d/d_stage.h"
-class dStage_dPnt_c;
-
-struct dPath {
+class dPath {
+public:
/* 0x0 */ u16 m_num;
/* 0x2 */ u16 m_nextID;
/* 0x4 */ u8 field_0x4;
/* 0x5 */ u8 m_closed;
/* 0x6 */ u8 field_0x6;
/* 0x8 */ dStage_dPnt_c* m_points;
+
};
+// should be move to dlib TU per chn debug
+inline int dPath_ChkClose(dPath* i_path) { return (i_path->m_closed & 1); }
+
dPath* dPath_GetRoomPath(int path_index, int room_no);
#endif /* D_D_PATH_H */
diff --git a/include/d/d_stage.h b/include/d/d_stage.h
index edc02abc6a..9055acf9af 100644
--- a/include/d/d_stage.h
+++ b/include/d/d_stage.h
@@ -255,7 +255,7 @@ public:
// PPNT
struct dStage_dPnt_c {
/* 0x0 */ int field_0x0;
- /* 0xC */ cXyz m_position;
+ /* 0x4 */ cXyz m_position;
}; // Size: 0x10
struct dStage_FloorInfo_c {
@@ -900,13 +900,14 @@ static int dStage_fieldMapFiliInfo2Init(dStage_dt_c*, void*, int, void*);
static int dStage_fieldMapMapPathInit(dStage_dt_c*, void*, int, void*);
s8 dStage_roomRead_dt_c_GetReverbStage(roomRead_class&, int);
-int dStage_changeScene(int, f32, u32, s8, s16, int);
+int dStage_changeScene(int i_exitId, f32 i_speed, u32 i_mode, s8 i_roomNo, s16 i_angle, int i_layerOverride);
void dStage_infoCreate();
u8 dStage_stagInfo_GetParticleNo(stage_stag_info_class* p_info, int layer);
int dStage_changeSceneExitId(cBgS_PolyInfo& param_0, f32 speed, u32 mode, s8 roomNo, s16 angle);
int dStage_changeScene4Event(int i_exitId, s8 room_no, int i_wipe, bool param_3, f32 speed,
- u32 mode, s16 angle, int param_7);
+ u32 mode, s16 angle, int param_7);
void dStage_Create();
+static s32 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0);
inline s32 dStage_roomRead_dt_c_GetVrboxswitch(roomRead_data_class& data) {
return data.field_0x2 & 8;
diff --git a/include/d/event/d_event.h b/include/d/event/d_event.h
index 04a9a610cb..3b2eb2e9bb 100644
--- a/include/d/event/d_event.h
+++ b/include/d/event/d_event.h
@@ -103,7 +103,9 @@ public:
void setPtI_Id(unsigned int id);
void setPtD(void* ptr);
void setGtItm(u8 itemNo);
- void isOrderOK();
+ BOOL isOrderOK();
+ /* 807DFAD8 */ void checkSkipEdge();
+ /* 807E2908 */ void startCheckSkipEdge(void*);
u16 chkFlag2(u16 flag) { return flag & mFlag2; }
bool runCheck() { return mEventStatus != 0; }
diff --git a/include/d/meter/d_meter2_info.h b/include/d/meter/d_meter2_info.h
index bf07ea3be1..3088f04487 100644
--- a/include/d/meter/d_meter2_info.h
+++ b/include/d/meter/d_meter2_info.h
@@ -49,6 +49,10 @@ class dMeter2_c;
class J2DPicture;
class dMeterMap_c;
+enum dMeter2Info_warpStatus {
+ /* 0x3 */ WARP_DECIDED = 3,
+};
+
class dMeter2Info_c {
public:
class WarpInfo_c {
@@ -246,6 +250,8 @@ void dMeter2Info_setCloth(u8 i_clothId, bool param_1);
void dMeter2Info_setShield(u8 i_itemId, bool param_1);
void dMeter2Info_set2DVibration();
void dMeter2Info_set2DVibrationM();
+static void dMeter2Info_setFloatingMessage(u16 pMessageID, s16 pMessageTimer, bool pWakuVisible);
+static void dMeter2Info_offUseButton(int pButton);
inline void dMeter2Info_Initialize() {
g_meter2_info.init();
@@ -495,6 +501,10 @@ inline void dMeter2Info_onDirectUseItem(int param_0) {
g_meter2_info.onDirectUseItem(param_0);
}
+inline void dMeter2Info_setFloatingFlow(u16 param_0, s16 param_1, bool param_2) {
+ g_meter2_info.setFloatingFlow(param_0, param_1, param_2);
+}
+
char* dMeter2Info_getNumberTextureName(int pIndex);
void dMeter2Info_recieveLetter();
u8 dMeter2Info_getNewLetterNum();
diff --git a/include/d/msg/d_msg_object.h b/include/d/msg/d_msg_object.h
index dbf173e88b..fedaa1cef2 100644
--- a/include/d/msg/d_msg_object.h
+++ b/include/d/msg/d_msg_object.h
@@ -133,7 +133,7 @@ public:
/* 80238320 */ static void onMsgSend();
/* 8023834C */ void offMsgSend();
/* 80238378 */ void isMsgSend();
- /* 802383A4 */ void isMouthCheck();
+ /* 802383A4 */ bool isMouthCheck();
/* 802383D0 */ static u32 getMessageID();
/* 802383E4 */ void getSmellTypeMessageID();
/* 80238410 */ static void setSmellType(u8);
@@ -273,6 +273,10 @@ inline void dMsgObject_readMessageGroup(mDoDvdThd_mountXArchive_c** param_0) {
dMsgObject_getMsgObjectClass()->readMessageGroup(param_0);
}
+inline void dMsgObject_setDemoMessage(u32 param_0) {
+ dMsgObject_getMsgObjectClass()->setDemoMessage(param_0);
+}
+
inline void dMsgObject_setShopWaitTimer(u8 timer) {
dMsgObject_c::setShopWaitTimer(timer);
}
diff --git a/include/d/particle/d_particle.h b/include/d/particle/d_particle.h
index d4a8cc965d..270c1347d0 100644
--- a/include/d/particle/d_particle.h
+++ b/include/d/particle/d_particle.h
@@ -2,9 +2,9 @@
#define D_PARTICLE_D_PARTICLE_H
#include "JSystem/JParticle/JPAParticle.h"
+#include "d/particle/d_particle_name.h"
#include "dolphin/types.h"
#include "f_op/f_op_actor.h"
-#include "d/particle/d_particle_name.h"
class dPa_levelEcallBack : public JPAEmitterCallBack {
public:
@@ -138,8 +138,8 @@ public:
/* 8004AB1C */ void create(u8);
/* 8004ABC4 */ void remove();
- /* 8004AC00 */ void setModel(JPABaseEmitter*, J3DModelData*, dKy_tevstr_c const&, u8, void*, u8,
- u8);
+ /* 8004AC00 */ static void setModel(JPABaseEmitter*, J3DModelData*, dKy_tevstr_c const&, u8,
+ void*, u8, u8);
/* 8004AC90 */ void resetModel(JPABaseEmitter*);
/* 8004ACC0 */ void setupModel(JPABaseEmitter*);
/* 8004ACEC */ void drawModel(JPABaseEmitter*, f32 (*)[4]);
@@ -152,7 +152,15 @@ public:
/* 80050014 */ virtual void drawAfter(JPABaseEmitter*);
/* 8004AAA8 */ virtual void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8);
- static u8 mEcallback[4];
+ static void setModel(JPABaseEmitter* param_0, J3DModelData* param_1,
+ const dKy_tevstr_c& param_2, u8 param_3, J3DAnmTexPattern* param_4,
+ u8 param_5) {
+ setModel(param_0, param_1, param_2, param_3, param_4, param_5);
+ }
+
+ static dPa_modelEcallBack* getEcallback() { return mEcallback; }
+
+ static dPa_modelEcallBack* mEcallback;
static u8 mPcallback[4];
static J3DModel* mModel;
};
@@ -207,7 +215,6 @@ public:
/* 8004FE6C */ virtual ~dPa_fsenthPcallBack();
/* 8004DCA0 */ virtual void execute(JPABaseEmitter*, JPABaseParticle*);
/* 8004DD0C */ virtual void draw(JPABaseEmitter*, JPABaseParticle*);
-
};
class dPa_simpleData_c {
@@ -244,7 +251,7 @@ public:
void offActive() { mStatus &= ~1; }
bool isActive() { return mStatus & 1; }
-
+
private:
/* 0x00 */ u32 mId;
/* 0x04 */ u16 mNameId;
@@ -341,6 +348,10 @@ public:
static void offStatus(u8 status) { mStatus &= ~status; }
static bool isStatus(u8 status) { return mStatus & status; }
+ static dPa_selectTexEcallBack* getTsuboSelectTexEcallBack(int idx) {
+ return ((dPa_selectTexEcallBack*)mTsubo) + idx;
+ }
+
static u8 mTsubo[64];
static u8 mLifeBall[24];
static Mtx mWindViewMatrix;
diff --git a/include/dolphin/ar/ar.h b/include/dolphin/ar/ar.h
index 1a76e3b209..4e7621c45d 100644
--- a/include/dolphin/ar/ar.h
+++ b/include/dolphin/ar/ar.h
@@ -3,10 +3,16 @@
#include "dolphin/types.h"
+#ifdef __cplusplus
extern "C" {
+#endif
+
u32 ARInit(u32*, u32);
u32 ARAlloc(u32);
u32 ARGetSize(void);
-}
+
+#ifdef __cplusplus
+};
+#endif
#endif /* AR_H */
diff --git a/include/dolphin/ar/arq.h b/include/dolphin/ar/arq.h
index 49f8f4e08b..b34cf555a1 100644
--- a/include/dolphin/ar/arq.h
+++ b/include/dolphin/ar/arq.h
@@ -3,10 +3,14 @@
#include "dolphin/types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef void (*ARQCallback)(u32 request_address);
-struct ARQRequest {
- ARQRequest* next;
+typedef struct ARQRequest {
+ struct ARQRequest* next;
u32 owner;
u32 type;
u32 priority;
@@ -14,12 +18,14 @@ struct ARQRequest {
u32 destination;
u32 length;
ARQCallback callback;
-};
+} ARQRequest;
-extern "C" {
void ARQInit(void);
void ARQPostRequest(ARQRequest* task, u32 owner, u32 type, u32 priority, u32 source,
u32 destination, u32 length, ARQCallback callback);
-}
+
+#ifdef __cplusplus
+};
+#endif
#endif /* ARQ_H */
diff --git a/include/dolphin/base/PPCArch.h b/include/dolphin/base/PPCArch.h
index 4af0a94b33..d721eb225c 100644
--- a/include/dolphin/base/PPCArch.h
+++ b/include/dolphin/base/PPCArch.h
@@ -3,4 +3,12 @@
#include "dolphin/types.h"
+union FpscrUnion {
+ f64 f;
+ struct {
+ u32 fpscr_pad;
+ u32 fpscr;
+ } u;
+};
+
#endif /* PPCARCH_H */
diff --git a/include/dolphin/dvd/dvd.h b/include/dolphin/dvd/dvd.h
index 12316f432f..bdf0da3b33 100644
--- a/include/dolphin/dvd/dvd.h
+++ b/include/dolphin/dvd/dvd.h
@@ -3,7 +3,9 @@
#include "dolphin/types.h"
+#ifdef __cplusplus
extern "C" {
+#endif
typedef enum DVDState {
DVD_STATE_END = 0x0,
@@ -19,38 +21,37 @@ typedef enum DVDState {
DVD_STATE_RETRY = 0xb,
DVD_STATE_FATAL_ERROR = -1,
} DVDState;
-}
-struct DVDDirectory {
+typedef struct DVDDirectory {
u32 entry_number;
u32 location;
u32 next;
-};
+} DVDDirectory;
-struct DVDDirectoryEntry {
+typedef struct DVDDirectoryEntry {
u32 entry_number;
BOOL is_directory;
char* name;
-};
+} DVDDirectoryEntry;
-struct DVDDiskID {
- char game_name[4];
- char company[2];
- u8 disk_number;
- u8 game_version;
- u8 is_streaming;
- u8 streaming_buffer_size;
- u8 padding[22];
-};
+typedef struct DVDDiskID {
+ /* 0x00 */ char game_name[4];
+ /* 0x04 */ char company[2];
+ /* 0x06 */ u8 disk_number;
+ /* 0x07 */ u8 game_version;
+ /* 0x08 */ u8 is_streaming;
+ /* 0x09 */ u8 streaming_buffer_size;
+ /* 0x0A */ u8 padding[22];
+} DVDDiskID;
struct DVDFileInfo;
struct DVDCommandBlock;
-typedef void (*DVDCBCallback)(s32 result, DVDCommandBlock* block);
-typedef void (*DVDCallback)(s32 result, DVDFileInfo* info);
+typedef void (*DVDCBCallback)(s32 result, struct DVDCommandBlock* block);
+typedef void (*DVDCallback)(s32 result, struct DVDFileInfo* info);
-struct DVDCommandBlock {
- DVDCommandBlock* next;
- DVDCommandBlock* prev;
+typedef struct DVDCommandBlock {
+ struct DVDCommandBlock* next;
+ struct DVDCommandBlock* prev;
u32 command;
s32 state;
u32 offset;
@@ -61,31 +62,46 @@ struct DVDCommandBlock {
DVDDiskID* disk_id;
DVDCBCallback callback;
void* user_data;
-};
+} DVDCommandBlock;
-struct DVDFileInfo {
+typedef struct DVDFileInfo {
DVDCommandBlock block;
u32 start_address;
u32 length;
DVDCallback callback;
-};
+} DVDFileInfo;
-extern "C" {
-s32 DVDOpen(const char*, DVDFileInfo*);
-s32 DVDClose(DVDFileInfo*);
-s32 DVDReadPrio(DVDFileInfo*, void*, s32, s32, s32);
+typedef struct DVDDriveInfo {
+ /* 0x00 */ u16 field_0x0;
+ /* 0x02 */ u16 device_code;
+ /* 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;
+} DVDDriveInfo;
+
+void DVDInit(void);
+BOOL DVDOpen(const char* filename, DVDFileInfo* fileinfo);
+BOOL DVDClose(DVDFileInfo* fileinfo);
+BOOL DVDReadPrio(DVDFileInfo* fileinfo, void*, s32, s32, s32);
DVDDiskID* DVDGetCurrentDiskID(void);
-s32 DVDFastOpen(long, DVDFileInfo*);
-int DVDGetCommandBlockStatus(DVDCommandBlock*);
-s32 DVDReadAsyncPrio(DVDFileInfo*, void*, long, long, DVDCallback, long);
-s32 DVDConvertPathToEntrynum(const char*);
+BOOL DVDFastOpen(long, DVDFileInfo* fileinfo);
+BOOL DVDGetCommandBlockStatus(DVDCommandBlock*);
+BOOL DVDReadAsyncPrio(DVDFileInfo* fileinfo, void*, long, long, DVDCallback, long);
+BOOL DVDConvertPathToEntrynum(const char*);
DVDState DVDGetDriveStatus(void);
-s32 DVDCheckDisk(void);
+BOOL DVDCheckDisk(void);
-BOOL DVDChangeDir(const char*);
-BOOL DVDCloseDir(DVDDirectory*);
-BOOL DVDOpenDir(const char*, DVDDirectory*);
-BOOL DVDReadDir(DVDDirectory*, DVDDirectoryEntry*);
-}
+BOOL DVDChangeDir(const char* dirname);
+BOOL DVDCloseDir(DVDDirectory* dir);
+BOOL DVDOpenDir(const char*, DVDDirectory* dir);
+BOOL DVDReadDir(DVDDirectory* dir, DVDDirectoryEntry* entry);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* DVD_H */
diff --git a/include/dolphin/gd/GDBase.h b/include/dolphin/gd/GDBase.h
index 31f61bf11a..417b8b0586 100644
--- a/include/dolphin/gd/GDBase.h
+++ b/include/dolphin/gd/GDBase.h
@@ -3,12 +3,16 @@
#include "dolphin/types.h"
-struct GDLObj {
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct GDLObj {
/* 0x0 */ u8* start;
/* 0x4 */ u32 length;
/* 0x8 */ u8* ptr;
/* 0xC */ u8* end;
-}; // Size: 0x10
+} GDLObj; // Size: 0x10
extern GDLObj* __GDCurrentDL;
@@ -20,11 +24,14 @@ inline u32 GDGetGDLObjOffset(GDLObj* obj) {
return (u32)(obj->ptr - obj->start);
}
-extern "C" {
-
void GDInitGDLObj(GDLObj*, u8*, u32);
void GDFlushCurrToMem();
void GDPadCurr32();
-}
+
+typedef void (*GDOverflowCallback)(void);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GDBASE_H */
diff --git a/include/dolphin/gd/GDGeometry.h b/include/dolphin/gd/GDGeometry.h
index 2d09d0f246..078eb39d70 100644
--- a/include/dolphin/gd/GDGeometry.h
+++ b/include/dolphin/gd/GDGeometry.h
@@ -4,11 +4,16 @@
#include "dolphin/gx/GX.h"
#include "dolphin/types.h"
+#ifdef __cplusplus
extern "C" {
+#endif
void GDSetVtxDescv(GXVtxDescList*);
void GDSetArray(GXAttr attr, const void* data, u8 stride);
void GDSetArrayRaw(GXAttr attr, u32 data, u8 stride);
-}
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GDGEOMETRY_H */
diff --git a/include/dolphin/gx/GX.h b/include/dolphin/gx/GX.h
index 3659f4e461..eb8e47bafc 100644
--- a/include/dolphin/gx/GX.h
+++ b/include/dolphin/gx/GX.h
@@ -1,235 +1,46 @@
#ifndef GX_H_
#define GX_H_
+#include "dolphin/gx/GXInit.h"
+#include "dolphin/gx/GXAttr.h"
+#include "dolphin/gx/GXBump.h"
#include "dolphin/gx/GXDisplayList.h"
-#include "dolphin/gx/GXStruct.h"
-#include "dolphin/gx/GXEnum.h"
-#include "dolphin/mtx/mtx.h"
-#include "dolphin/mtx/mtx44.h"
-#include "dolphin/types.h"
-#include "global.h"
+#include "dolphin/gx/GXFifo.h"
+#include "dolphin/gx/GXFrameBuf.h"
+#include "dolphin/gx/GXGeometry.h"
+#include "dolphin/gx/GXLight.h"
+#include "dolphin/gx/GXMisc.h"
+#include "dolphin/gx/GXPerf.h"
+#include "dolphin/gx/GXPixel.h"
+#include "dolphin/gx/GXTev.h"
+#include "dolphin/gx/GXTexture.h"
+#include "dolphin/gx/GXTransform.h"
#ifdef __cplusplus
extern "C" {
#endif
-typedef struct _GXVtxDescList {
- /* 0x0 */ GXAttr attr;
- /* 0x4 */ GXAttrType type;
-} GXVtxDescList; // Size: 0x08
-
-typedef struct _GXVtxAttrFmtList {
- /* 0x00 */ GXAttr mAttrib;
- /* 0x04 */ GXCompCnt mCompCnt;
- /* 0x08 */ GXCompType mCompType;
- /* 0x0C */ u8 mCompShift;
-} GXVtxAttrFmtList; // Size: 0x10
-
-typedef GXTexRegion (*GXTexRegionCallback)(void);
-typedef u32 (*GXTlutRegionCallback)(u32);
-
-typedef struct _GXData {
- /* 0x000 */ u16 field_0x0;
- /* 0x002 */ u16 field_0x2;
- /* 0x004 */ u16 field_0x4;
- /* 0x006 */ u16 field_0x6;
- /* 0x008 */ u32 field_0x8;
- /* 0x00C */ u32 field_0xc;
- /* 0x010 */ u32 field_0x10;
- /* 0x014 */ GXAttrType field_0x14;
- /* 0x018 */ GXAttrType field_0x18;
- /* 0x01C */ GXCompCnt field_0x1c[8];
- /* 0x03C */ GXCompCnt field_0x3c[8];
- /* 0x05C */ u32 field_0x5c[8];
- /* 0x07C */ u32 field_0x7c;
- /* 0x080 */ u32 field_0x80;
- /* 0x084 */ u32 field_0x84;
- /* 0x088 */ u8 field_0x88[0xA8 - 0x88];
- /* 0x0A8 */ u32 field_0xa8[2];
- /* 0x0B0 */ u32 field_0xb0[2];
- /* 0x0B8 */ u32 field_0xb8[8]; // GX_MAX_TEXCOORD
- /* 0x0D8 */ u32 field_0xd8[8]; // GX_MAX_TEXCOORD
- /* 0x0F8 */ u32 field_0xf8;
- /* 0x0FC */ u32 field_0xfc;
- /* 0x100 */ u32 field_0x100[GX_MAX_TEVSTAGE / 2];
- /* 0x120 */ u32 field_0x120;
- /* 0x124 */ u32 field_0x124;
- /* 0x128 */ u8 field_0x128[0x130 - 0x128];
- /* 0x130 */ u32 field_0x130[GX_MAX_TEVSTAGE];
- /* 0x170 */ u32 field_0x170[GX_MAX_TEVSTAGE];
- /* 0x1B0 */ u32 field_0x1b0[GX_MAX_TEVSTAGE / 2];
- /* 0x1D0 */ u32 field_0x1d0;
- /* 0x1D4 */ u32 field_0x1d4;
- /* 0x1D8 */ u32 field_0x1d8;
- /* 0x1DC */ u32 field_0x1dc;
- /* 0x1E0 */ u32 field_0x1e0;
- /* 0x1E4 */ u32 field_0x1e4;
- /* 0x1E8 */ u32 field_0x1e8;
- /* 0x1EC */ u32 field_0x1ec;
- /* 0x1F0 */ u32 field_0x1f0;
- /* 0x1F4 */ u32 field_0x1f4;
- /* 0x1F8 */ u32 field_0x1f8;
- /* 0x1FC */ u32 field_0x1fc;
- /* 0x200 */ u8 field_0x200;
- /* 0x204 */ u32 field_0x204;
- /* 0x208 */ GXTexRegion field_0x208[8];
- /* 0x288 */ GXTexRegion field_0x288[8];
- /* 0x308 */ GXTexRegion field_0x308[8];
- /* 0x388 */ GXTlutRegion field_0x388[16];
- /* 0x488 */ GXTlutRegion field_0x488[4];
- /* 0x4C8 */ GXTexRegionCallback field_0x4c8;
- /* 0x4CC */ GXTlutRegionCallback field_0x4cc;
- /* 0x4D0 */ GXAttrType field_0x4d0;
- /* 0x4D4 */ u8 field_0x4d4;
- /* 0x4D5 */ u8 field_0x4d5;
- /* 0x4D8 */ GXProjectionType field_0x4d8;
- /* 0x4DC */ Mtx field_0x4dc;
- /* 0x50C */ f32 field_0x50c;
- /* 0x510 */ f32 field_0x510;
- /* 0x514 */ u32 field_0x514[8];
- /* 0x534 */ u32 field_0x534[8];
- /* 0x554 */ u32 field_0x554;
- /* 0x558 */ u32 field_0x558[8];
- /* 0x578 */ u8 field_0x578[0x594 - 0x578];
- /* 0x594 */ u32 field_0x594;
- /* 0x598 */ u32 field_0x598;
- /* 0x59C */ u32 field_0x59c;
- /* 0x5A0 */ u8 field_0x5a0[4];
- /* 0x5A4 */ u32 field_0x5a4;
- /* 0x5A8 */ u8 field_0x5a8;
- /* 0x5A9 */ u8 field_0x5a9;
- /* 0x5AA */ u8 field_0x5aa;
- /* 0x5AB */ u8 field_0x5ab;
- /* 0x5AC */ u32 field_0x5ac;
-} GXData; // Size: 0x5B0
-
-STATIC_ASSERT(sizeof(GXData) == 0x5B0);
-
-extern GXData* __GXData;
-
-extern u32* __piReg;
-extern u16* __cpReg;
+// Pack value into bitfield
+// Pack value into bitfield
+#define GX_BITFIELD_SET(field, pos, size, value) (field) = __rlwimi((field), (value), 31 - (pos) - (size) + 1, (pos), (pos) + (size)-1)
#define GX_LOAD_BP_REG 0x61
#define GX_NOP 0
-f32 GXGetYScaleFactor(u16 efb_height, u16 xfb_height);
-u16 GXGetNumXfbLines(u32 efb_height, f32 y_scale);
-
-void GXBegin(GXPrimitive, GXVtxFmt, u16);
-void GXLoadTexObj(GXTexObj*, GXTexMapID);
-void GXInitTexObjLOD(GXTexObj*, GXTexFilter, GXTexFilter, f32, f32, f32, GXBool, GXBool,
- GXAnisotropy);
-void GXInitTexObj(GXTexObj*, void*, u16, u16, GXTexFmt, GXTexWrapMode, GXTexWrapMode, GXBool);
-void GXInitTlutObj(GXTlutObj*, void*, GXTlutFmt, u16);
-void GXLoadTlut(GXTlutObj*, u32);
-void GXInitTexObjCI(GXTexObj*, void*, u16, u16, GXCITexFmt, GXTexWrapMode, GXTexWrapMode, GXBool,
- u32);
-void GXSetNumChans(u8);
-void GXSetNumTevStages(u8);
-void GXSetNumTexGens(u8);
-void GXSetTevOrder(GXTevStageID, GXTexCoordID, GXTexMapID, GXChannelID);
-void GXSetChanCtrl(GXChannelID, GXBool, GXColorSrc, GXColorSrc, u32, GXDiffuseFn, GXAttnFn);
-void GXSetTevOp(GXTevStageID, GXTevMode);
-void GXSetTevColor(GXTevRegID, GXColor);
-void GXSetTevColorIn(GXTevStageID, GXTevColorArg, GXTevColorArg, GXTevColorArg, GXTevColorArg);
-void GXSetTevAlphaIn(GXTevStageID, GXTevAlphaArg, GXTevAlphaArg, GXTevAlphaArg, GXTevAlphaArg);
-void GXSetTevColorOp(GXTevStageID, GXTevOp, GXTevBias, GXTevScale, GXBool, GXTevRegID);
-void GXSetTevAlphaOp(GXTevStageID, GXTevOp, GXTevBias, GXTevScale, GXBool, GXTevRegID);
-void GXSetTevIndirect(GXTevStageID, _GXIndTexStageID, GXIndTexFormat, GXIndTexBiasSel,
- GXIndTexMtxID, GXIndTexWrap, GXIndTexWrap, GXBool, GXBool, GXIndTexAlphaSel);
-void GXSetBlendMode(GXBlendMode, GXBlendFactor, GXBlendFactor, GXLogicOp);
-void GXSetVtxAttrFmt(GXVtxFmt, GXAttr, GXCompCnt, GXCompType, u32);
-void GXClearVtxDesc(void);
-void GXSetVtxDesc(GXAttr, GXAttrType);
-void GXSetArray(GXAttr, void*, u8);
-typedef void (*GXDrawDoneCallback)(void);
-void GXSetDrawDoneCallback(GXDrawDoneCallback);
-void GXDrawDone(void);
-void GXAbortFrame(void);
-void GXFlush(void);
-void GXSetCopyClear(GXColor, u32);
-void GXSetDispCopySrc(u16, u16, u16, u16);
-void GXSetDispCopyDst(u16, u16);
-u32 GXSetDispCopyYScale(f32);
-void GXSetCopyClamp(GXFBClamp);
-void GXSetDispCopyGamma(GXGamma);
-void GXCopyDisp(void*, GXBool);
-void GXSetPixelFmt(GXPixelFmt, GXZFmt16);
-
-struct OSThread;
-OSThread* GXSetCurrentGXThread(void);
-OSThread* GXGetCurrentGXThread(void);
-
-void GXCopyTex(void*, GXBool);
-void GXGetProjectionv(f32*);
-u32 GXGetTexBufferSize(u16 width, u16 height, u32 format, GXBool is_mip_map, u8 max_lod);
-void GXGetViewportv(f32*);
-void GXInitLightColor(GXLightObj*, GXColor);
-void GXInitLightDir(GXLightObj*, f32, f32, f32);
-void GXInitLightDistAttn(GXLightObj*, f32, f32, GXDistAttnFn);
-void GXInitLightPos(GXLightObj*, f32, f32, f32);
-void GXInitLightSpot(GXLightObj*, f32, GXSpotFn);
-void GXInvalidateTexAll(void);
-void GXInitLightAttn(GXLightObj*, f32, f32, f32, f32, f32, f32);
-void GXLoadLightObjImm(GXLightObj*, GXLightID);
-void GXLoadPosMtxImm(Mtx, u32);
-void GXLoadNrmMtxImm(Mtx, u32);
-void GXLoadTexMtxImm(Mtx, u32, GXTexMtxType);
-void GXPixModeSync(void);
-void GXProject(f32, f32, f32, Mtx, f32*, f32*, f32*, f32*, f32*);
-void GXSetAlphaCompare(GXCompare, u8, GXAlphaOp, GXCompare, u8);
-void GXSetAlphaUpdate(GXBool);
-void GXSetChanAmbColor(GXChannelID, GXColor);
-void GXSetChanMatColor(GXChannelID, GXColor);
-void GXSetClipMode(GXClipMode);
-void GXSetCoPlanar(GXBool);
-void GXSetColorUpdate(GXBool);
-void GXSetCopyFilter(GXBool, u8[12][2], GXBool, u8[7]);
-void GXSetCullMode(GXCullMode);
-void GXSetCurrentMtx(u32);
-void GXSetDither(GXBool);
-void GXSetFog(GXFogType, f32, f32, f32, f32, GXColor);
-void GXSetFogRangeAdj(GXBool, u16, GXFogAdjTable*);
-void GXSetNumIndStages(u8);
-void GXSetProjection(Mtx44, GXProjectionType);
-void GXSetScissor(u32, u32, u32, u32);
-void GXSetTevColorS10(GXTevRegID, GXColorS10);
-void GXSetTevKAlphaSel(GXTevStageID, GXTevKAlphaSel);
-void GXSetTevSwapMode(GXTevStageID, GXTevSwapSel, GXTevSwapSel);
-void GXSetTevSwapModeTable(GXTevSwapSel, GXTevColor, GXTevColor, GXTevColor, GXTevColor);
-void GXSetTexCoordGen2(GXTexCoordID, GXTexGenType, GXTexGenSrc, u32, GXBool, u32);
-void GXSetTexCopyDst(u16, u16, GXTexFmt, GXBool);
-void GXSetTexCopySrc(u16, u16, u16, u16);
-void GXSetViewport(f32, f32, f32, f32, f32, f32);
-void GXSetZCompLoc(GXBool);
-void GXSetZMode(GXBool, GXCompare, GXBool);
-void GXSetZTexture(GXZTexOp, GXTexFmt, u32);
-void GXSetPointSize(u8, GXTexOffset);
-void GXSetLineWidth(u8, GXTexOffset);
-void GXSetTevDirect(GXTevStageID);
-void GXSetTevKColor(GXTevKColorID, GXColor);
-void GXSetTevKColorSel(GXTevStageID, GXTevKColorSel);
-void GXGetScissor(u32*, u32*, u32*, u32*);
-void GXSetIndTexMtx(GXIndTexMtxID, Mtx23, s8);
-void GXSetIndTexCoordScale(GXIndTexStageID, GXIndTexScale, GXIndTexScale);
-void GXSetIndTexOrder(GXIndTexStageID, GXTexCoordID, GXTexMapID);
-void GXEnableTexOffsets(GXTexCoordID, GXBool, GXBool);
-void GXSetDstAlpha(GXBool, u8);
-u32 GXGetFifoSize(GXFifoObj*);
-void* GXGetFifoBase(GXFifoObj*);
-GXFifoObj* GXInit(void*, u32);
-GXFifoObj* GXGetCPUFifo(void);
-void GXGetGPStatus(GXBool*, GXBool*, GXBool*, GXBool*, GXBool*);
-void GXReadXfRasMetric(u32*, u32*, u32*, u32*);
-void GXInitFifoBase(GXFifoObj*, void*, u32);
-void GXInitFifoPtrs(GXFifoObj*, void*, void*);
-void GXSaveCPUFifo(GXFifoObj*);
-void GXSetMisc(u32 opt, u32 val);
-void GXInitTexCacheRegion(GXTexRegion* region, GXBool, u32, GXTexCacheSize, u32, GXTexCacheSize);
-void GXPeekZ(u16 x, u16 y, u32* dst);
-void __GXSetDirtyState(void);
-void __GXSendFlushPrim(void);
+typedef union {
+ u8 u8;
+ u16 u16;
+ u32 u32;
+ u64 u64;
+ s8 s8;
+ s16 s16;
+ s32 s32;
+ s64 s64;
+ f32 f32;
+ f64 f64;
+} PPCWGPipe;
+
+volatile PPCWGPipe GXFIFO : 0xCC008000;
#define GFX_FIFO(T) (*(volatile T*)0xCC008000)
diff --git a/include/dolphin/gx/GXAttr.h b/include/dolphin/gx/GXAttr.h
index 9280e4a584..9b9bbdf4ee 100644
--- a/include/dolphin/gx/GXAttr.h
+++ b/include/dolphin/gx/GXAttr.h
@@ -1,6 +1,39 @@
#ifndef GXATTR_H
#define GXATTR_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXEnum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _GXVtxDescList {
+ /* 0x0 */ GXAttr attr;
+ /* 0x4 */ GXAttrType type;
+} GXVtxDescList; // Size: 0x08
+
+typedef struct _GXVtxAttrFmtList {
+ /* 0x00 */ GXAttr mAttrib;
+ /* 0x04 */ GXCompCnt mCompCnt;
+ /* 0x08 */ GXCompType mCompType;
+ /* 0x0C */ u8 mCompShift;
+} GXVtxAttrFmtList; // Size: 0x10
+
+void GXSetVtxDesc(GXAttr attr, GXAttrType type);
+void GXSetVtxDescv(GXVtxDescList* list);
+void __GXSetVCD(void);
+void __GXCalculateVLim(void);
+void GXClearVtxDesc(void);
+void GXSetVtxAttrFmt(GXVtxFmt fmt, GXAttr attr, GXCompCnt cnt, GXCompType type, u32);
+void GXSetVtxAttrFmtv(GXVtxFmt fmt, GXVtxAttrFmtList* list);
+void __GXSetVAT(void);
+void GXSetArray(GXAttr attr, void* base, u8);
+void GXInvalidateVtxCache(void);
+void GXSetTexCoordGen2(GXTexCoordID dst, GXTexGenType type, GXTexGenSrc src, u32 mtx, GXBool renormalize, u32 pt_mtx);
+void GXSetNumTexGens(u8 numTexGens);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXATTR_H */
diff --git a/include/dolphin/gx/GXBump.h b/include/dolphin/gx/GXBump.h
index 79ed20bb9d..29337920c7 100644
--- a/include/dolphin/gx/GXBump.h
+++ b/include/dolphin/gx/GXBump.h
@@ -1,6 +1,24 @@
#ifndef GXBUMP_H
#define GXBUMP_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXEnum.h"
+#include "dolphin/mtx/mtx.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void GXSetTevIndirect(GXTevStageID tevStage, GXIndTexStageID texStage, GXIndTexFormat texFmt,
+ GXIndTexBiasSel biasSel, GXIndTexMtxID mtxID, GXIndTexWrap wrapS,
+ GXIndTexWrap wrapT, u8 addPrev, u8 utcLod, GXIndTexAlphaSel alphaSel);
+void GXSetIndTexMtx(GXIndTexMtxID mtxID, f32 offset[6], s8 scale_exp);
+void GXSetIndTexCoordScale(GXIndTexStageID texStage, GXIndTexScale scaleS, GXIndTexScale scaleT);
+void GXSetIndTexOrder(GXIndTexStageID stage, GXTexCoordID coord, GXTexMapID map);
+void GXSetNumIndStages(u8 num);
+void GXSetTevDirect(GXTevStageID stage);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXBUMP_H */
diff --git a/include/dolphin/gx/GXDisplayList.h b/include/dolphin/gx/GXDisplayList.h
index 54845d6a46..fc8a4d5358 100644
--- a/include/dolphin/gx/GXDisplayList.h
+++ b/include/dolphin/gx/GXDisplayList.h
@@ -3,10 +3,16 @@
#include "dolphin/types.h"
+#ifdef __cplusplus
extern "C" {
+#endif
+
void GXBeginDisplayList(void* list, u32 capacity);
void GXEndDisplayList(void);
void GXCallDisplayList(void* list, u32 nbytes);
+
+#ifdef __cplusplus
};
+#endif
#endif /* GXDISPLAYLIST_H */
diff --git a/include/dolphin/gx/GXEnum.h b/include/dolphin/gx/GXEnum.h
index b8ab1cb40c..591f873efd 100644
--- a/include/dolphin/gx/GXEnum.h
+++ b/include/dolphin/gx/GXEnum.h
@@ -20,12 +20,14 @@ typedef enum _GXCullMode {
/* 0x3 */ GX_CULL_ALL
} GXCullMode;
-typedef enum _GXBool {
+typedef enum _GXBoolVal {
/* 0x0 */ GX_FALSE,
/* 0x1 */ GX_TRUE,
/* 0x0 */ GX_DISABLE = 0,
/* 0x1 */ GX_ENABLE
-} GXBool;
+} GXBoolVal;
+
+typedef u8 GXBool;
typedef enum _GXTexMapID {
/* 0x000 */ GX_TEXMAP0,
@@ -429,11 +431,11 @@ typedef enum _GXAnisotropy {
/* 0x3 */ GX_MAX_ANISOTROPY,
} GXAnisotropy;
-enum GXCITexFmt {
+typedef enum _GXCITexFmt {
/* 0x8 */ GX_TF_C4 = 8,
/* 0x8 */ GX_TF_C8,
/* 0xA */ GX_TF_C14X2
-};
+} GXCITexFmt;
typedef enum _GXTexMtxType {
/* 0x0 */ GX_MTX3x4,
@@ -619,9 +621,11 @@ typedef enum _GXIndTexMtxID {
/* 0x1 */ GX_ITM_0,
/* 0x2 */ GX_ITM_1,
/* 0x3 */ GX_ITM_2,
+ /* 0x4 */ GX_ITM_3,
/* 0x5 */ GX_ITM_S0 = 5,
/* 0x6 */ GX_ITM_S1,
/* 0x7 */ GX_ITM_S2,
+ /* 0x8 */ GX_ITM_S3,
/* 0x9 */ GX_ITM_T0 = 9,
/* 0xA */ GX_ITM_T1,
/* 0xB */ GX_ITM_T2,
@@ -711,7 +715,7 @@ typedef enum _GXTexMtx {
GX_TEXMTX8 = 30 + 8 * 3,
GX_TEXMTX9 = 30 + 9 * 3,
GX_IDENTITY = 60,
-};
+} GXTexMtx;
typedef enum _GXPTTexMtx {
GX_PTTEXMTX0 = 64 + 0 * 3,
@@ -735,7 +739,7 @@ typedef enum _GXPTTexMtx {
GX_PTTEXMTX18 = 64 + 18 * 3,
GX_PTTEXMTX19 = 64 + 19 * 3,
GX_PTIDENTITY = 125,
-};
+} GXPTTexMtx;
typedef enum _GXFBClamp {
/* 0x0 */ GX_CLAMP_NONE,
@@ -776,4 +780,30 @@ typedef enum _GXClipMode {
/* 0x1 */ GX_CLIP_DISABLE,
} GXClipMode;
+typedef enum _GXCopyMode {
+ /* 0x0 */ GX_COPY_PROGRESSIVE,
+ /* 0x1 */ GX_COPY_INTLC_EVEN,
+ /* 0x2 */ GX_COPY_INTLC_ODD,
+} GXCopyMode;
+
+typedef enum _GXAlphaReadMode {
+ /* 0x0 */ GX_READ_00,
+ /* 0x1 */ GX_READ_FF,
+ /* 0x2 */ GX_READ_NONE,
+} GXAlphaReadMode;
+
+typedef enum _GXTlutSize {
+ /* 0x001 */ GX_TLUT_16 = 1,
+ /* 0x002 */ GX_TLUT_32 = 2,
+ /* 0x004 */ GX_TLUT_64 = 4,
+ /* 0x008 */ GX_TLUT_128 = 8,
+ /* 0x010 */ GX_TLUT_256 = 16,
+ /* 0x020 */ GX_TLUT_512 = 32,
+ /* 0x040 */ GX_TLUT_1K = 64,
+ /* 0x080 */ GX_TLUT_2K = 128,
+ /* 0x100 */ GX_TLUT_4K = 256,
+ /* 0x200 */ GX_TLUT_8K = 512,
+ /* 0x400 */ GX_TLUT_16K = 1024,
+} GXTlutSize;
+
#endif /* GXENUM_H */ \ No newline at end of file
diff --git a/include/dolphin/gx/GXFifo.h b/include/dolphin/gx/GXFifo.h
index 8de5a88972..68f955e826 100644
--- a/include/dolphin/gx/GXFifo.h
+++ b/include/dolphin/gx/GXFifo.h
@@ -1,6 +1,38 @@
#ifndef GXFIFO_H
#define GXFIFO_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXStruct.h"
+#include "dolphin/gx/GXEnum.h"
+#include "dolphin/os/OS.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void GXInitFifoBase(GXFifoObj* fifo, void* base, u32 size);
+void GXInitFifoPtrs(GXFifoObj* fifo, void* read_ptr, void* write_ptr);
+void GXSetCPUFifo(void);
+void GXSetGPFifo(void);
+void GXSaveCPUFifo(GXFifoObj* fifo);
+void __GXSaveCPUFifoAux(GXFifoObj* fifo);
+void GXGetGPStatus(GXBool* overhi, GXBool* underlo, GXBool* read_idle, GXBool* cmd_idle, GXBool* breakpoint);
+void* GXGetFifoBase(GXFifoObj* fifo);
+u32 GXGetFifoSize(GXFifoObj* fifo);
+void GXSetBreakPtCallback(void);
+void __GXFifoInit(void);
+void __GXFifoReadEnable(void);
+void __GXFifoReadDisable(void);
+void __GXFifoLink(u8);
+void __GXWriteFifoIntEnable(u8, u8);
+void __GXWriteFifoIntReset(u8, u8);
+void __GXCleanGPFifo(void);
+OSThread* GXSetCurrentGXThread(void);
+OSThread* GXGetCurrentGXThread(void);
+GXFifoObj* GXGetCPUFifo(void);
+u32 GXGetGPFifo(void);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXFIFO_H */
diff --git a/include/dolphin/gx/GXFrameBuf.h b/include/dolphin/gx/GXFrameBuf.h
index 91f4e49604..ffa428cb59 100644
--- a/include/dolphin/gx/GXFrameBuf.h
+++ b/include/dolphin/gx/GXFrameBuf.h
@@ -1,6 +1,31 @@
#ifndef GXFRAMEBUF_H
#define GXFRAMEBUF_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXStruct.h"
+#include "dolphin/gx/GXEnum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void GXSetDispCopySrc(u16 left, u16 top, u16 width, u16 height);
+void GXSetTexCopySrc(u16 left, u16 top, u16 width, u16 height);
+void GXSetDispCopyDst(u16 width, u16 height);
+void GXSetTexCopyDst(u16 width, u16 height, GXTexFmt fmt, GXBool mipmap);
+void GXSetDispCopyFrame2Field(GXCopyMode mode);
+void GXSetCopyClamp(GXFBClamp clamp);
+u16 GXGetNumXfbLines(u32 efb_height, f32 y_scale);
+f32 GXGetYScaleFactor(u16 efb_height, u16 xfb_height);
+u32 GXSetDispCopyYScale(f32 y_scale);
+void GXSetCopyClear(GXColor color, u32 clear_z);
+void GXSetCopyFilter(GXBool antialias, u8 pattern[12][2], GXBool vf, u8 vfilter[7]);
+void GXSetDispCopyGamma(GXGamma gamma);
+void GXCopyDisp(void* dst, GXBool clear);
+void GXCopyTex(void* dst, GXBool clear);
+void GXClearBoundingBox(void);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXFRAMEBUF_H */
diff --git a/include/dolphin/gx/GXGeometry.h b/include/dolphin/gx/GXGeometry.h
index 0adddc6fdb..49315693f3 100644
--- a/include/dolphin/gx/GXGeometry.h
+++ b/include/dolphin/gx/GXGeometry.h
@@ -1,6 +1,25 @@
#ifndef GXGEOMETRY_H
#define GXGEOMETRY_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXStruct.h"
+#include "dolphin/gx/GXEnum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void __GXSetDirtyState(void);
+void GXBegin(GXPrimitive type, GXVtxFmt fmt, u16 vert_num);
+void __GXSendFlushPrim(void);
+void GXSetLineWidth(u8 width, GXTexOffset offsets);
+void GXSetPointSize(u8 size, GXTexOffset offsets);
+void GXEnableTexOffsets(GXTexCoordID coord, GXBool line, GXBool point);
+void GXSetCullMode(GXCullMode mode);
+void GXSetCoPlanar(GXBool enable);
+void __GXSetGenMode(void);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXGEOMETRY_H */
diff --git a/include/dolphin/gx/GXInit.h b/include/dolphin/gx/GXInit.h
index 0fe7f0caf3..881ee2c24a 100644
--- a/include/dolphin/gx/GXInit.h
+++ b/include/dolphin/gx/GXInit.h
@@ -1,6 +1,118 @@
#ifndef GXINIT_H
#define GXINIT_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXEnum.h"
+#include "dolphin/gx/GXStruct.h"
+#include "dolphin/mtx/mtx.h"
+#include "global.h"
+
+typedef GXTexRegion (*GXTexRegionCallback)(GXTexObj* obj);
+typedef GXTlutRegion* (*GXTlutRegionCallback)(u32 name);
+
+typedef struct _GXData {
+ /* 0x000 */ u16 field_0x0;
+ /* 0x002 */ u16 field_0x2;
+ /* 0x004 */ u16 field_0x4;
+ /* 0x006 */ u16 field_0x6;
+ /* 0x008 */ u32 field_0x8;
+ /* 0x00C */ u32 field_0xc;
+ /* 0x010 */ u32 field_0x10;
+ /* 0x014 */ u32 field_0x14;
+ /* 0x018 */ GXAttrType field_0x18;
+ /* 0x01C */ GXCompCnt field_0x1c[8];
+ /* 0x03C */ GXCompCnt field_0x3c[8];
+ /* 0x05C */ u32 field_0x5c[8];
+ /* 0x07C */ u32 field_0x7c;
+ /* 0x080 */ u32 field_0x80;
+ /* 0x084 */ u32 field_0x84;
+ /* 0x088 */ u8 field_0x88[0xA8 - 0x88];
+ /* 0x0A8 */ GXColor ambColors[2];
+ /* 0x0B0 */ GXColor matColors[2];
+ /* 0x0B8 */ u32 field_0xb8[8]; // GX_MAX_TEXCOORD
+ /* 0x0D8 */ u32 field_0xd8[8]; // GX_MAX_TEXCOORD
+ /* 0x0F8 */ u32 field_0xf8;
+ /* 0x0FC */ u32 field_0xfc;
+ /* 0x100 */ u32 field_0x100[GX_MAX_TEVSTAGE / 2];
+ /* 0x120 */ u32 field_0x120;
+ /* 0x124 */ u32 field_0x124;
+ /* 0x128 */ u32 field_0x128;
+ /* 0x12C */ u32 field_0x12c;
+ /* 0x130 */ u32 field_0x130[GX_MAX_TEVSTAGE];
+ /* 0x170 */ u32 field_0x170[GX_MAX_TEVSTAGE];
+ /* 0x1B0 */ u32 field_0x1b0[GX_MAX_TEVSTAGE / 2];
+ /* 0x1D0 */ u32 field_0x1d0;
+ /* 0x1D4 */ u32 field_0x1d4;
+ /* 0x1D8 */ u32 field_0x1d8;
+ /* 0x1DC */ u32 field_0x1dc;
+ /* 0x1E0 */ u32 field_0x1e0;
+ /* 0x1E4 */ u32 field_0x1e4;
+ /* 0x1E8 */ u32 field_0x1e8;
+ /* 0x1EC */ u32 field_0x1ec;
+ /* 0x1F0 */ u32 field_0x1f0;
+ /* 0x1F4 */ u32 field_0x1f4;
+ /* 0x1F8 */ u32 field_0x1f8;
+ /* 0x1FC */ u32 field_0x1fc;
+ /* 0x200 */ u8 field_0x200;
+ /* 0x204 */ u32 field_0x204;
+ /* 0x208 */ GXTexRegion field_0x208[8];
+ /* 0x288 */ GXTexRegion field_0x288[8];
+ /* 0x308 */ GXTexRegion field_0x308[8];
+ /* 0x388 */ GXTlutRegion field_0x388[16];
+ /* 0x488 */ GXTlutRegion field_0x488[4];
+ /* 0x4C8 */ GXTexRegionCallback field_0x4c8;
+ /* 0x4CC */ GXTlutRegionCallback field_0x4cc;
+ /* 0x4D0 */ GXAttrType field_0x4d0;
+ /* 0x4D4 */ u8 field_0x4d4;
+ /* 0x4D5 */ u8 field_0x4d5;
+ /* 0x4D8 */ GXProjectionType field_0x4d8;
+ /* 0x4DC */ Mtx field_0x4dc;
+ /* 0x50C */ f32 field_0x50c;
+ /* 0x510 */ f32 field_0x510;
+ /* 0x514 */ u32 field_0x514[8];
+ /* 0x534 */ u32 field_0x534[8];
+ /* 0x554 */ u32 field_0x554;
+ /* 0x558 */ u32 field_0x558[8];
+ /* 0x578 */ u8 field_0x578[0x594 - 0x578];
+ /* 0x594 */ u32 field_0x594;
+ /* 0x598 */ u32 field_0x598;
+ /* 0x59C */ u32 field_0x59c;
+ /* 0x5A0 */ u8 field_0x5a0[4];
+ /* 0x5A4 */ u32 field_0x5a4;
+ /* 0x5A8 */ u8 field_0x5a8;
+ /* 0x5A9 */ u8 field_0x5a9;
+ /* 0x5AA */ u8 field_0x5aa;
+ /* 0x5AB */ u8 field_0x5ab;
+ /* 0x5AC */ u32 field_0x5ac;
+} GXData; // Size: 0x5B0
+
+STATIC_ASSERT(sizeof(GXData) == 0x5B0);
+
+extern GXData* __GXData;
+
+extern u32* __piReg;
+extern u16* __cpReg;
+extern u8 __peReg[4];
+extern u8 __memReg[4];
+
+inline void GXSetWasteFlags() {
+ GXData* data = __GXData;
+ data->field_0x5ac |= 0x3;
+ data->field_0x2 = 0;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+GXTexRegion* __GXDefaultTexRegionCallback(GXTexObj* obj, GXTexMapID mapID);
+GXTlutRegion* __GXDefaultTlutRegionCallback(u32 tlut);
+void __GXShutdown(s32);
+void __GXInitRevisionBits(void);
+GXFifoObj* GXInit(void* base, u32 size);
+void __GXInitGX(void);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXINIT_H */
diff --git a/include/dolphin/gx/GXLight.h b/include/dolphin/gx/GXLight.h
index 817b2cb816..82fd78a1b0 100644
--- a/include/dolphin/gx/GXLight.h
+++ b/include/dolphin/gx/GXLight.h
@@ -1,6 +1,27 @@
#ifndef GXLIGHT_H
#define GXLIGHT_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXStruct.h"
+#include "dolphin/gx/GXEnum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void GXInitLightAttn(GXLightObj* obj, f32 a0, f32 a1, f32 a2, f32 k0, f32 k1, f32 k2);
+void GXInitLightSpot(GXLightObj* obj, f32 cutoff, GXSpotFn spot_fn);
+void GXInitLightDistAttn(GXLightObj* obj, f32 dist, f32 brightness, GXDistAttnFn dist_fn);
+void GXInitLightPos(GXLightObj* obj, f32 x, f32 y, f32 z);
+void GXInitLightDir(GXLightObj* obj, f32 x, f32 y, f32 z);
+void GXInitLightColor(GXLightObj* obj, GXColor color);
+void GXLoadLightObjImm(GXLightObj* obj, GXLightID light);
+void GXSetChanAmbColor(GXChannelID channel, GXColor color);
+void GXSetChanMatColor(GXChannelID channel, GXColor color);
+void GXSetNumChans(u8 chan_num);
+void GXSetChanCtrl(GXChannelID channel, GXBool enable, GXColorSrc amb_src, GXColorSrc mat_src, u32 light_mask, GXDiffuseFn diff_fn, GXAttnFn attn_fn);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXLIGHT_H */
diff --git a/include/dolphin/gx/GXMisc.h b/include/dolphin/gx/GXMisc.h
index d5deba0820..5a22f30cc8 100644
--- a/include/dolphin/gx/GXMisc.h
+++ b/include/dolphin/gx/GXMisc.h
@@ -1,6 +1,38 @@
#ifndef GXMISC_H
#define GXMISC_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXEnum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void GXSetMisc(u32 id, u32 value);
+void GXFlush(void);
+void __GXAbort(void);
+void GXAbortFrame(void);
+void GXSetDrawDone(void);
+void GXDrawDone(void);
+void GXPixModeSync(void);
+void GXPokeAlphaMode(GXCompare comp, u8 threshold);
+void GXPokeAlphaRead(GXAlphaReadMode mode);
+void GXPokeAlphaUpdate(GXBool enable_update);
+void GXPokeBlendMode(GXBlendMode mode, GXBlendFactor src_factor, GXBlendFactor dst_factor, GXLogicOp op);
+void GXPokeColorUpdate(GXBool enable_update);
+void GXPokeDstAlpha(GXBool enable, u8 alpha);
+void GXPokeDither(GXBool enable);
+void GXPokeZMode(GXBool enable_compare, GXCompare comp);
+void GXPeekZ(u16 x, u16 y, u32* z);
+
+typedef void (*GXDrawSyncCallback)(u16 token);
+void GXSetDrawSyncCallback(GXDrawSyncCallback callback);
+
+typedef void (*GXDrawDoneCallback)(void);
+void GXSetDrawDoneCallback(GXDrawDoneCallback callback);
+void __GXPEInit(void);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXMISC_H */
diff --git a/include/dolphin/gx/GXPerf.h b/include/dolphin/gx/GXPerf.h
index e03b2baf38..821c81b2b5 100644
--- a/include/dolphin/gx/GXPerf.h
+++ b/include/dolphin/gx/GXPerf.h
@@ -3,4 +3,16 @@
#include "dolphin/types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void GXSetGPMetric(u32 perf0, u32 perf1);
+void GXClearGPMetric(void);
+void GXReadXfRasMetric(u32*, u32*, u32*, u32*);
+
+#ifdef __cplusplus
+};
+#endif
+
#endif /* GXPERF_H */
diff --git a/include/dolphin/gx/GXPixel.h b/include/dolphin/gx/GXPixel.h
index e95981c69b..b9b3d3a60b 100644
--- a/include/dolphin/gx/GXPixel.h
+++ b/include/dolphin/gx/GXPixel.h
@@ -1,6 +1,28 @@
#ifndef GXPIXEL_H
#define GXPIXEL_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXStruct.h"
+#include "dolphin/gx/GXEnum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void GXSetFog(GXFogType type, f32 startZ, f32 endZ, f32 nearZ, f32 farZ, GXColor color);
+void GXSetFogRangeAdj(GXBool enable, u16 center, GXFogAdjTable* table);
+void GXSetBlendMode(GXBlendMode mode, GXBlendFactor src_factor, GXBlendFactor dst_factor, GXLogicOp op);
+void GXSetColorUpdate(GXBool enable_update);
+void GXSetAlphaUpdate(GXBool enable_update);
+void GXSetZMode(GXBool enable_compare, GXCompare comp, GXBool enable_update);
+void GXSetZCompLoc(GXBool z_buf_before_tex);
+void GXSetPixelFmt(GXPixelFmt pixel_fmt, GXZFmt16 z_fmt);
+void GXSetDither(GXBool enable_dither);
+void GXSetDstAlpha(GXBool enable, u8 alpha);
+void GXSetFieldMask(GXBool odd_mask, GXBool even_mask);
+void GXSetFieldMode(GXBool field_mode, GXBool half_aspect_ratio);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXPIXEL_H */
diff --git a/include/dolphin/gx/GXStruct.h b/include/dolphin/gx/GXStruct.h
index 4d15b6694f..236a370ca4 100644
--- a/include/dolphin/gx/GXStruct.h
+++ b/include/dolphin/gx/GXStruct.h
@@ -34,7 +34,7 @@ typedef struct _GXRenderModeObj {
/* 0x32 */ u8 vfilter[7];
} GXRenderModeObj;
-STATIC_ASSERT(sizeof(_GXRenderModeObj) == 60);
+STATIC_ASSERT(sizeof(GXRenderModeObj) == 60);
typedef struct _GXTexObj {
/* 0x00 */ u32 texture_filter;
@@ -56,7 +56,20 @@ typedef struct _GXTlutObj {
} GXTlutObj;
typedef struct _GXLightObj {
- /* 0x0 */ u32 data[16];
+ /* 0x00 */ u8 field_0x0[0xc];
+ /* 0x0C */ GXColor color;
+ /* 0x10 */ f32 a0;
+ /* 0x14 */ f32 a1;
+ /* 0x18 */ f32 a2;
+ /* 0x1C */ f32 k0;
+ /* 0x20 */ f32 k1;
+ /* 0x24 */ f32 k2;
+ /* 0x28 */ f32 posX;
+ /* 0x2C */ f32 posY;
+ /* 0x30 */ f32 posZ;
+ /* 0x34 */ f32 dirX;
+ /* 0x38 */ f32 dirY;
+ /* 0x3C */ f32 dirZ;
} GXLightObj;
typedef struct _GXFogAdjTable {
diff --git a/include/dolphin/gx/GXTev.h b/include/dolphin/gx/GXTev.h
index 08ce1ee1b8..20da7b3850 100644
--- a/include/dolphin/gx/GXTev.h
+++ b/include/dolphin/gx/GXTev.h
@@ -1,6 +1,37 @@
#ifndef GXTEV_H
#define GXTEV_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXEnum.h"
+#include "dolphin/gx/GXStruct.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void GXSetTevOp(GXTevStageID id, GXTevMode mode);
+void GXSetTevColorIn(GXTevStageID stage, GXTevColorArg a, GXTevColorArg b, GXTevColorArg c,
+ GXTevColorArg d);
+void GXSetTevAlphaIn(GXTevStageID stage, GXTevAlphaArg a, GXTevAlphaArg b, GXTevAlphaArg c,
+ GXTevAlphaArg d);
+void GXSetTevColorOp(GXTevStageID stage, GXTevOp op, GXTevBias bias, GXTevScale scale, GXBool clamp,
+ GXTevRegID out_reg);
+void GXSetTevAlphaOp(GXTevStageID stage, GXTevOp op, GXTevBias bias, GXTevScale scale, GXBool clamp,
+ GXTevRegID out_reg);
+void GXSetTevColor(GXTevRegID id, GXColor color);
+void GXSetTevColorS10(GXTevRegID id, GXColorS10 color);
+void GXSetTevKColor(GXTevKColorID id, GXColor color);
+void GXSetTevKColorSel(GXTevStageID stage, GXTevKColorSel color_sel);
+void GXSetTevKAlphaSel(GXTevStageID stage, GXTevKAlphaSel alpha_sel);
+void GXSetTevSwapMode(GXTevStageID stage, GXTevSwapSel ras_sel, GXTevSwapSel tex_sel);
+void GXSetTevSwapModeTable(GXTevSwapSel select, GXTevColor r, GXTevColor g, GXTevColor b,
+ GXTevColor a);
+void GXSetAlphaCompare(GXCompare comp0, u8 ref0, GXAlphaOp op, GXCompare comp1, u8 ref1);
+void GXSetZTexture(GXZTexOp op, GXTexFmt fmt, u32 bias);
+void GXSetTevOrder(GXTevStageID stage, GXTexCoordID coord, GXTexMapID map, GXChannelID color);
+void GXSetNumTevStages(u8 num_stages);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXTEV_H */
diff --git a/include/dolphin/gx/GXTexture.h b/include/dolphin/gx/GXTexture.h
index 2f2bbfb6e0..d4d8efdb38 100644
--- a/include/dolphin/gx/GXTexture.h
+++ b/include/dolphin/gx/GXTexture.h
@@ -1,6 +1,49 @@
#ifndef GXTEXTURE_H
#define GXTEXTURE_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXEnum.h"
+#include "dolphin/gx/GXStruct.h"
+#include "dolphin/gx/GXInit.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+u32 GXGetTexBufferSize(u16 width, u16 height, u32 format, GXBool mipmap, u8 max_lod);
+void __GetImageTileCount();
+void GXInitTexObj(GXTexObj* obj, void* image, u16 width, u16 height, GXTexFmt fmt,
+ GXTexWrapMode wrapS, GXTexWrapMode wrapT, GXBool mipmap);
+void GXInitTexObjCI(GXTexObj* obj, void* image, u16 width, u16 height, GXCITexFmt format,
+ GXTexWrapMode wrapS, GXTexWrapMode wrapT, GXBool mipmap, u32 tlut_name);
+void GXInitTexObjLOD(GXTexObj* obj, GXTexFilter min_filter, GXTexFilter max_filter, f32 min_lod,
+ f32 max_lod, f32 lod_bias, GXBool bias_clamp, GXBool edge_lod,
+ GXAnisotropy aniso);
+u16 GXGetTexObjWidth(GXTexObj* obj);
+u16 GXGetTexObjHeight(GXTexObj* obj);
+GXTexFmt GXGetTexObjFmt(GXTexObj* obj);
+GXTexWrapMode GXGetTexObjWrapS(GXTexObj* obj);
+GXTexWrapMode GXGetTexObjWrapT(GXTexObj* obj);
+GXBool GXGetTexObjMipMap(GXTexObj* obj);
+u32 GXGetTexObjTlut(GXTexObj* obj);
+void GXLoadTexObj(GXTexObj* obj, GXTexMapID id);
+void GXInitTlutObj(GXTlutObj* obj, void* lut, GXTlutFmt fmt, u16 entry_num);
+void GXLoadTlut(GXTlutObj* obj, u32 tlut_name);
+void GXInitTexCacheRegion(GXTexRegion* region, GXBool is_32b_mipmap, u32 tmem_even,
+ GXTexCacheSize size_even, u32 tmem_odd, GXTexCacheSize size_odd);
+void GXInitTlutRegion(GXTlutRegion* region, u32 tmem_addr, GXTlutSize tlut_size);
+void GXInvalidateTexAll(void);
+
+GXTexRegionCallback GXSetTexRegionCallback(GXTexRegionCallback callback);
+GXTlutRegionCallback GXSetTlutRegionCallback(GXTlutRegionCallback callback);
+
+void GXSetTexCoordScaleManually(GXTexCoordID coord, GXBool enable, u16 s_scale, u16 t_scale);
+
+void __SetSURegs();
+void __GXSetSUTexRegs();
+void __GXSetTmemConfig();
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXTEXTURE_H */
diff --git a/include/dolphin/gx/GXTransform.h b/include/dolphin/gx/GXTransform.h
index 5ea01f339b..66175f257c 100644
--- a/include/dolphin/gx/GXTransform.h
+++ b/include/dolphin/gx/GXTransform.h
@@ -1,6 +1,32 @@
#ifndef GXTRANSFORM_H
#define GXTRANSFORM_H
-#include "dolphin/types.h"
+#include "dolphin/gx/GXEnum.h"
+#include "dolphin/gx/GXStruct.h"
+#include "dolphin/mtx/mtx.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void GXProject(f32 model_x, f32 model_y, f32 model_z, Mtx model_mtx, f32* proj_mtx, f32* viewpoint,
+ f32* screen_x, f32* screen_y, f32* screen_z);
+void GXSetProjection(Mtx44 mtx, GXProjectionType type);
+void GXSetProjectionv(f32* p);
+void GXGetProjectionv(f32* p);
+void GXLoadPosMtxImm(Mtx mtx, u32 id);
+void GXLoadNrmMtxImm(Mtx mtx, u32 id);
+void GXSetCurrentMtx(u32 id);
+void GXLoadTexMtxImm(Mtx mtx, u32 id, GXTexMtxType type);
+void GXSetViewport(f32 x_orig, f32 y_orig, f32 width, f32 height, f32 near_z, f32 far_z);
+void GXGetViewportv(f32* p);
+void GXSetScissor(u32 left, u32 top, u32 width, u32 height);
+void GXGetScissor(u32* left, u32* top, u32* width, u32* height);
+void GXSetScissorBoxOffset(u32 x_offset, u32 y_offset);
+void GXSetClipMode(GXClipMode mode);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* GXTRANSFORM_H */
diff --git a/include/dolphin/mtx/mtx.h b/include/dolphin/mtx/mtx.h
index 0cf5da75ff..edd5dab9f6 100644
--- a/include/dolphin/mtx/mtx.h
+++ b/include/dolphin/mtx/mtx.h
@@ -6,13 +6,16 @@
#include "dolphin/mtx/vec.h"
#include "dolphin/types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef f32 Mtx[3][4];
typedef f32 Mtx33[3][3];
typedef f32 Mtx23[2][3];
typedef f32 (*MtxP)[4];
typedef const f32 (*CMtxP)[4]; // Change name later?
-extern "C" {
void PSMTXIdentity(Mtx m);
void PSMTXCopy(const Mtx src, Mtx dst);
void PSMTXConcat(const Mtx a, const Mtx b, Mtx ab);
@@ -21,23 +24,20 @@ void PSMTXRotRad(Mtx m, u8 axis, f32 rad);
void PSMTXRotTrig(Mtx m, u8 axis, f32 sin, f32 cos);
f64 __PSMTXRotAxisRadInternal(f64 param_1, f64 param_2, int param_3, int param_4);
void PSMTXRotAxisRad(Mtx m, const Vec* axis, f32 rad);
-void PSMTXTrans(Mtx m, f32 x_trans, f32 y_trans, f32 z_trans);
+void PSMTXTrans(Mtx m, f32 x, f32 y, f32 z);
void PSMTXTransApply(const Mtx src, Mtx dst, f32 x, f32 y, f32 z);
-void PSMTXScale(Mtx m, f32 x_scale, f32 y_scale, f32 z_scale);
-void PSMTXScaleApply(const Mtx src, Mtx dst, f32 x_scale, f32 y_scale, f32 z_scale);
+void PSMTXScale(Mtx m, f32 x, f32 y, f32 z);
+void PSMTXScaleApply(const Mtx src, Mtx dst, f32 x, f32 y, f32 z);
void PSMTXQuat(Mtx m, const Quaternion* q);
-void PSMTXMultVec(const Mtx m, const Vec* src, Vec* dst);
-void PSMTXMultVecSR(const Mtx m, const Vec* src, Vec* dst);
-void PSMTXMultVec(const Mtx m, const Vec* src, Vec* dst);
-void PSMTXMultVecArray(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
-void PSMTXMultVecSR(const Mtx m, const Vec* src, Vec* dst);
-void PSMTXMultVecArraySR(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
void C_MTXLookAt(Mtx m, const Vec* camPos, const Vec* camUp, const Vec* target);
void C_MTXLightPerspective(Mtx m, f32 fovY, f32 aspect, f32 scale_s, f32 scale_t, f32 trans_s,
f32 trans_t);
void C_MTXLightOrtho(Mtx m, f32 top, f32 bottom, f32 left, f32 right, f32 scale_s, f32 scale_t,
f32 trans_s, f32 trans_t);
-}
+
+#ifdef __cplusplus
+};
+#endif
#endif /* MTX_H */
diff --git a/include/dolphin/mtx/mtx44.h b/include/dolphin/mtx/mtx44.h
index 69e2cc84f7..44ed7c7e22 100644
--- a/include/dolphin/mtx/mtx44.h
+++ b/include/dolphin/mtx/mtx44.h
@@ -3,11 +3,17 @@
#include "dolphin/types.h"
-typedef float Mtx44[4][4];
+typedef f32 Mtx44[4][4];
+#ifdef __cplusplus
extern "C" {
+#endif
+
void C_MTXPerspective(Mtx44 m, f32 fovy, f32 aspect, f32 near, f32 far);
void C_MTXOrtho(Mtx44 m, f32 top, f32 bottom, f32 left, f32 right, f32 near, f32 far);
-}
+
+#ifdef __cplusplus
+};
+#endif
#endif /* MTX44_H */
diff --git a/include/dolphin/mtx/mtxvec.h b/include/dolphin/mtx/mtxvec.h
index 171add0e61..add098aac3 100644
--- a/include/dolphin/mtx/mtxvec.h
+++ b/include/dolphin/mtx/mtxvec.h
@@ -2,14 +2,18 @@
#define MTXVEC_H
#include "dolphin/mtx/mtx.h"
-#include "dolphin/mtx/vec.h"
-#include "dolphin/types.h"
+#ifdef __cplusplus
extern "C" {
-void PSMTXMultVec(const Mtx matrix, const Vec* src, Vec* dst);
-void PSMTXMultVecArray(const Mtx matrix, const Vec* src, Vec* dst, u32 count);
-void PSMTXMultVecSR(const Mtx matrix, const Vec* src, Vec* dst);
-void PSMTXMultVecArraySR(const Mtx matrix, const Vec* src, Vec* dst, u32 count);
-}
+#endif
+
+void PSMTXMultVec(const Mtx m, const Vec* src, Vec* dst);
+void PSMTXMultVecSR(const Mtx m, const Vec* src, Vec* dst);
+void PSMTXMultVecArray(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
+void PSMTXMultVecArraySR(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* MTXVEC_H */
diff --git a/include/dolphin/mtx/quat.h b/include/dolphin/mtx/quat.h
index 832c04eef1..42477bb63e 100644
--- a/include/dolphin/mtx/quat.h
+++ b/include/dolphin/mtx/quat.h
@@ -2,16 +2,21 @@
#define QUAT_H
#include "dolphin/mtx/vec.h"
-#include "dolphin/types.h"
-struct Quaternion {
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Quaternion {
f32 x, y, z, w;
-};
+} Quaternion;
-extern "C" {
-void PSQUATMultiply(const Quaternion* src_a, const Quaternion* src_b, Quaternion* dst);
+void PSQUATMultiply(const Quaternion* a, const Quaternion* b, Quaternion* ab);
void C_QUATRotAxisRad(Quaternion* q, const Vec* axis, f32 rad);
void C_QUATSlerp(const Quaternion* p, const Quaternion* q, Quaternion* r, f32 t);
-}
+
+#ifdef __cplusplus
+};
+#endif
#endif /* QUAT_H */
diff --git a/include/dolphin/mtx/vec.h b/include/dolphin/mtx/vec.h
index d52c79d450..29b3961af7 100644
--- a/include/dolphin/mtx/vec.h
+++ b/include/dolphin/mtx/vec.h
@@ -3,47 +3,22 @@
#include "dolphin/types.h"
-struct Vec {
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Vec {
f32 x, y, z;
- f32 GetX() const { return x; }
- f32 GetY() const { return y; }
- f32 GetZ() const { return z; }
- f32 getXDiff(const Vec* other) const { return x - other->x; }
- f32 getYDiff(const Vec* other) const { return y - other->y; }
- f32 getZDiff(const Vec* other) const { return z - other->z; }
- void set(f32 pX, f32 pY, f32 pZ) {
- x = pX;
- y = pY;
- z = pZ;
- }
- void set(const Vec& other) {
- x = other.x;
- y = other.y;
- z = other.z;
- }
-};
+} Vec;
typedef Vec* VecPtr;
typedef Vec Point3d;
typedef Vec* Point3dPtr;
-struct SVec {
+typedef struct SVec {
s16 x, y, z;
+} SVec;
- void set(s16 oX, s16 oY, s16 oZ) {
- x = oX;
- y = oY;
- z = oZ;
- }
-
- void setall(s16 val) {
- x = val;
- y = val;
- z = val;
- }
-};
-
-extern "C" {
void PSVECAdd(const Vec* a, const Vec* b, Vec* ab);
void PSVECSubtract(const Vec* a, const Vec* b, Vec* a_b);
void PSVECScale(const Vec* src, Vec* dst, f32 scale);
@@ -57,6 +32,9 @@ f32 PSVECDistance(const Vec* a, const Vec* b);
void C_VECHalfAngle(const Vec* a, const Vec* b, Vec* half);
void C_VECReflect(const Vec* src, const Vec* normal, Vec* dst);
-}
+
+#ifdef __cplusplus
+};
+#endif
#endif /* VEC_H */
diff --git a/include/dolphin/os/OS.h b/include/dolphin/os/OS.h
index 84c3e63522..d3516b8c06 100644
--- a/include/dolphin/os/OS.h
+++ b/include/dolphin/os/OS.h
@@ -2,6 +2,8 @@
#define OS_H_
#include "Runtime.PPCEABI.H/__va_arg.h"
+#include "dolphin/dvd/dvd.h"
+
#include "dolphin/os/OSAlarm.h"
#include "dolphin/os/OSAlloc.h"
#include "dolphin/os/OSArena.h"
@@ -35,6 +37,20 @@ extern "C" {
#define OS_MESSAGE_NON_BLOCKING 0
#define OS_MESSAGE_BLOCKING 1
+volatile u16 __OSDeviceCode : 0x800030E6;
+
+volatile u32 OS_PI_INTR_CAUSE : 0xCC003000;
+volatile u32 OS_PI_INTR_MASK : 0xCC003004;
+
+volatile u16 OS_MI_INTR_MASK : 0xCC00401C;
+
+volatile u16 OS_DSP_DMA_ADDR_HI : 0xCC005030;
+volatile u16 OS_DSP_DMA_ADDR_LO : 0xCC005032;
+volatile u16 OS_DSP_INTR_MASK : 0xCC00500A;
+
+volatile u16 OS_ARAM_DMA_ADDR_HI : 0xCC005020;
+volatile u16 OS_ARAM_DMA_ADDR_LO : 0xCC005022;
+
BOOL OSIsThreadSuspended(OSThread* thread);
u32 OSGetConsoleType(void);
@@ -58,20 +74,20 @@ void OSReportInit__Fv(void); // needed for inline asm
u8* OSGetStackPointer(void);
void __OSFPRInit(void);
-static void InquiryCallback(u32 param_0, void* param_1);
+static void InquiryCallback(u32 param_0, DVDCommandBlock* param_1);
void OSInit(void);
static void OSExceptionInit(void);
void __OSDBIntegrator(void);
void __OSDBJump(void);
typedef void (*OSExceptionHandler)(OSException, OSContext*);
-OSExceptionHandler __OSSetExceptionHandler(OSException exception, OSExceptionHandler handler);
-OSExceptionHandler __OSGetExceptionHandler(OSException exception);
+OSExceptionHandler __OSSetExceptionHandler(__OSException exception, OSExceptionHandler handler);
+OSExceptionHandler __OSGetExceptionHandler(__OSException exception);
static void OSExceptionVector(void);
void __DBVECTOR();
void __OSEVSetNumber();
void __OSEVEnd();
-static void OSDefaultExceptionHandler(OSException exception, OSContext* context);
+static void OSDefaultExceptionHandler(__OSException exception, OSContext* context);
void __OSPSInit(void);
void __OSGetDIConfig(void);
void OSRegisterVersion(char* version);
@@ -132,7 +148,17 @@ inline void i_OSInitFastCast(void) {
// clang-format on
}
-#include "dolphin/dvd/dvd.h"
+typedef struct OSBootInfo {
+ /* 0x00 */ DVDDiskID disk_info;
+ /* 0x20 */ u32 boot_code;
+ /* 0x24 */ u32 version;
+ /* 0x28 */ u32 memory_size;
+ /* 0x2C */ u32 console_type;
+ /* 0x30 */ void* arena_lo;
+ /* 0x34 */ void* arena_hi;
+ /* 0x38 */ void* fst_location;
+ /* 0x3C */ u32 fst_max_length;
+} OSBootInfo;
struct GLOBAL_MEMORY {
DVDDiskID disk;
diff --git a/include/dolphin/os/OSAlarm.h b/include/dolphin/os/OSAlarm.h
index 536931baa8..56cf7975de 100644
--- a/include/dolphin/os/OSAlarm.h
+++ b/include/dolphin/os/OSAlarm.h
@@ -1,7 +1,6 @@
#ifndef OSALARM_H
#define OSALARM_H
-#include "dolphin/types.h"
#include "dolphin/os/OSTime.h"
#include "dolphin/os/OSError.h"
@@ -14,7 +13,8 @@ typedef struct OSAlarmLink {
/* 0x4 */ struct OSAlarm* next;
} OSAlarmLink;
-typedef void (*OSAlarmHandler)(struct OSAlarm* alarm, struct OSContext* context);
+typedef struct OSAlarm;
+typedef void (*OSAlarmHandler)(struct OSAlarm* alarm, OSContext* context);
typedef struct OSAlarm {
/* 0x00 */ OSAlarmHandler handler;
@@ -31,8 +31,8 @@ static void InsertAlarm(OSAlarm* alarm, s64 time, OSAlarmHandler* handler);
void OSSetAlarm(OSAlarm* alarm, s64 time, OSAlarmHandler* handler);
void OSSetPeriodicAlarm(OSAlarm* alarm, s64 start, s64 period, OSAlarmHandler* handler);
void OSCancelAlarm(OSAlarm* alarm);
-static void DecrementerExceptionCallback(OSException* exception, struct OSContext* context);
-static void DecrementerExceptionHandler(OSException* exception, struct OSContext* context);
+static void DecrementerExceptionCallback(__OSException exception, OSContext* context);
+static void DecrementerExceptionHandler(__OSException exception, OSContext* context);
static s32 OnReset(s32 param_0);
#ifdef __cplusplus
diff --git a/include/dolphin/os/OSAlloc.h b/include/dolphin/os/OSAlloc.h
index b5af8dbf2a..5a5ff4c3f5 100644
--- a/include/dolphin/os/OSAlloc.h
+++ b/include/dolphin/os/OSAlloc.h
@@ -7,11 +7,34 @@
extern "C" {
#endif
+typedef struct OSHeapDescriptor {
+ /* 0x0 */ s32 size;
+ /* 0x4 */ struct OSHeapCell* freeList;
+ /* 0x8 */ struct OSHeapCell* usedList;
+} OSHeapDescriptor;
+
+typedef struct OSHeapCell {
+ /* 0x00 */ struct OSHeapCell* prev;
+ /* 0x04 */ struct OSHeapCell* next;
+ /* 0x08 */ s32 size;
+ /* 0x0C */ struct OSHeapDescriptor* hd;
+ /* 0x10 */ s32 usedSize;
+ /* 0x14 */ char field_0x14[0x20 - 0x14];
+} OSHeapCell;
+
typedef u32 OSHeapHandle;
-static void* DLInsert(void* param_0, void* param_1);
-void OSFreeToHeap(OSHeapHandle heap, void* ptr);
-void OSSetCurrentHeap(OSHeapHandle heap);
+extern volatile s32 __OSCurrHeap;
+
+#define OSRoundUp(x, align) (((x) + (align)-1) & (-(align)))
+#define OSRoundUpPtr(x, align) ((void*)((((u32)(x)) + (align)-1) & (~((align)-1))))
+
+#define OSRoundDown(x, align) ((x) & (-(align)))
+#define OSRoundDownPtr(x, align) ((void*)(((u32)(x)) & (~((align)-1))))
+
+static OSHeapCell* DLInsert(OSHeapCell* list, OSHeapCell* child);
+void OSFreeToHeap(OSHeapHandle handle, void* ptr);
+s32 OSSetCurrentHeap(OSHeapHandle handle);
void* OSInitAlloc(void* lo, void* hi, s32 maxHeaps);
OSHeapHandle OSCreateHeap(void* start, void* end);
diff --git a/include/dolphin/os/OSContext.h b/include/dolphin/os/OSContext.h
index 0de4725bde..7a22d6b231 100644
--- a/include/dolphin/os/OSContext.h
+++ b/include/dolphin/os/OSContext.h
@@ -7,8 +7,6 @@
extern "C" {
#endif
-typedef void (*OSSwitchThreadCallback)(struct OSThread* from, struct OSThread* to);
-
typedef struct OSContext {
/* 0x000 */ u32 gpr[32];
/* 0x080 */ u32 cr;
@@ -16,7 +14,7 @@ typedef struct OSContext {
/* 0x088 */ u32 ctr;
/* 0x08C */ u32 xer;
/* 0x090 */ f64 fpr[32];
- /* 0x190 */ u32 padding_1;
+ /* 0x190 */ u32 field_0x190;
/* 0x194 */ u32 fpscr;
/* 0x198 */ u32 srr0;
/* 0x19C */ u32 srr1;
@@ -26,8 +24,11 @@ typedef struct OSContext {
/* 0x1C4 */ f64 ps[32];
} OSContext;
+OSContext* OS_CURRENT_CONTEXT : 0x800000D4;
+OSContext* OS_CURRENT_FPU_CONTEXT : 0x800000D8;
+
void __OSLoadFPUContext(void);
-void __OSSaveFPUContext(OSContext* context);
+void __OSSaveFPUContext(s32 unused0, s32 unused1, OSContext* context);
void OSSaveFPUContext(OSContext* context);
void OSSetCurrentContext(OSContext* context);
OSContext* OSGetCurrentContext(void);
@@ -36,7 +37,7 @@ void OSLoadContext(OSContext* context);
void OSClearContext(OSContext* context);
void OSInitContext(OSContext* context, u32 pc, u32 lr);
void OSDumpContext(OSContext* context);
-static void OSSwitchFPUContext(OSContext* context);
+static void OSSwitchFPUContext(u8 err, OSContext* context);
void __OSContextInit(void);
void OSFillFPUContext(OSContext* context);
diff --git a/include/dolphin/os/OSError.h b/include/dolphin/os/OSError.h
index 7333e207a4..6f5b41f57d 100644
--- a/include/dolphin/os/OSError.h
+++ b/include/dolphin/os/OSError.h
@@ -1,18 +1,14 @@
#ifndef OSERROR_H
#define OSERROR_H
-#include "dolphin/types.h"
+#include "dolphin/os/OSContext.h"
#ifdef __cplusplus
extern "C" {
#endif
-struct OSContext;
-
extern u32 __OSFpscrEnableBits;
-
typedef u16 OSError;
-typedef void (*OSErrorHandler)(OSError error, OSContext* context, u32, u32);
#define OS_ERROR_SYSTEM_RESET 0
#define OS_ERROR_MACHINE_CHECK 1
@@ -32,7 +28,7 @@ typedef void (*OSErrorHandler)(OSError error, OSContext* context, u32, u32);
#define OS_ERROR_MEMORY_PROTECTION 15
#define OS_ERROR_FLOATING_POINT_EXCEPTION 16
-typedef enum OSException {
+typedef enum {
EXCEPTION_SYSTEM_RESET,
EXCEPTION_MACHINE_CHECK,
EXCEPTION_DSI,
@@ -52,6 +48,10 @@ typedef enum OSException {
EXCEPTION_FLOATING_POINT_EXCEPTION,
} OSException;
+typedef u8 __OSException;
+
+typedef void (*OSErrorHandler)(OSError error, OSContext* context, u32, u32);
+
OSErrorHandler OSSetErrorHandler(OSError error, OSErrorHandler handler);
void __OSUnhandledException(OSException exception, OSContext* context, u32 dsisr, u32 dar);
diff --git a/include/dolphin/os/OSInterrupt.h b/include/dolphin/os/OSInterrupt.h
index 130ed6255d..ac5ccf9779 100644
--- a/include/dolphin/os/OSInterrupt.h
+++ b/include/dolphin/os/OSInterrupt.h
@@ -1,15 +1,52 @@
#ifndef OSINTERRUPT_H
#define OSINTERRUPT_H
-#include "dolphin/types.h"
+#include "dolphin/os/OSContext.h"
#ifdef __cplusplus
extern "C" {
#endif
+typedef enum {
+ OS_INTR_MEM_0,
+ OS_INTR_MEM_1,
+ OS_INTR_MEM_2,
+ OS_INTR_MEM_3,
+ OS_INTR_MEM_ADDRESS,
+ OS_INTR_DSP_AI,
+ OS_INTR_DSP_ARAM,
+ OS_INTR_DSP_DSP,
+ OS_INTR_AI_AI,
+ OS_INTR_EXI_0_EXI,
+ OS_INTR_EXI_0_TC,
+ OS_INTR_EXI_0_EXT,
+ OS_INTR_EXI_1_EXI,
+ OS_INTR_EXI_1_TC,
+ OS_INTR_EXI_1_EXT,
+ OS_INTR_EXI_2_EXI,
+ OS_INTR_EXI_2_TC,
+ OS_INTR_PI_CP,
+ OS_INTR_PI_PE_TOKEN,
+ OS_INTR_PI_PE_FINISH,
+ OS_INTR_PI_SI,
+ OS_INTR_PI_DI,
+ OS_INTR_PI_RSW,
+ OS_INTR_PI_ERROR,
+ OS_INTR_PI_VI,
+ OS_INTR_PI_DEBUG,
+ OS_INTR_PI_HSP,
+ OS_INTR_PI_ACR,
+ OS_INTR_28,
+ OS_INTR_29,
+ OS_INTR_30,
+ OS_INTR_31,
+
+ OS_INTR_MAX
+} OSInterruptType;
+
typedef s16 OSInterrupt;
typedef u32 OSInterruptMask;
-typedef void (*OSInterruptHandler)(OSInterrupt interrupt, struct OSContext* context);
+typedef void (*OSInterruptHandler)(OSInterrupt interrupt, OSContext* context);
BOOL OSDisableInterrupts(void);
void __RAS_OSDisableInterrupts_end(void);
@@ -21,8 +58,11 @@ void __OSInterruptInit(void);
static OSInterruptMask SetInterruptMask(OSInterruptMask param_0, OSInterruptMask param_1);
OSInterruptMask __OSMaskInterrupts(OSInterruptMask mask);
OSInterruptMask __OSUnmaskInterrupts(OSInterruptMask mask);
-void __OSDispatchInterrupt(OSInterrupt interrupt, struct OSContext* context);
-static void ExternalInterruptHandler(OSInterrupt interrupt, struct OSContext* context);
+void __OSDispatchInterrupt(OSInterrupt interrupt, OSContext* context);
+static void ExternalInterruptHandler(OSInterrupt interrupt, OSContext* context);
+
+void __RAS_OSDisableInterrupts_begin(void);
+void __RAS_OSDisableInterrupts_end(void);
#ifdef __cplusplus
};
diff --git a/include/dolphin/os/OSLink.h b/include/dolphin/os/OSLink.h
index 454e6d04f8..06f1bb3015 100644
--- a/include/dolphin/os/OSLink.h
+++ b/include/dolphin/os/OSLink.h
@@ -7,6 +7,14 @@
extern "C" {
#endif
+typedef struct OSModuleQueue {
+ int* first;
+ int* last;
+} OSModuleQueue;
+
+OSModuleQueue __OSModuleList : 0x800030C8;
+void* __OSStringTable : 0x800030D0;
+
typedef struct OSSectionInfo {
u32 mOffset;
u32 mSize;
diff --git a/include/dolphin/os/OSMemory.h b/include/dolphin/os/OSMemory.h
index e91de88948..7a1be5185c 100644
--- a/include/dolphin/os/OSMemory.h
+++ b/include/dolphin/os/OSMemory.h
@@ -13,7 +13,7 @@ static void MEMIntrruptHandler(OSInterrupt interrupt, struct OSContext* context)
void OSProtectRange(u32 channel, void* address, u32 nBytes, u32 control);
static void Config24MB(void);
static void Config48MB(void);
-static void RealMode(void);
+static void RealMode(void* config);
void __OSInitMemoryProtection(void);
#ifdef __cplusplus
diff --git a/include/dolphin/os/OSMessage.h b/include/dolphin/os/OSMessage.h
index d8a42deeda..d4ab6b3601 100644
--- a/include/dolphin/os/OSMessage.h
+++ b/include/dolphin/os/OSMessage.h
@@ -1,7 +1,6 @@
#ifndef OSMESSAGE_H
#define OSMESSAGE_H
-#include "dolphin/types.h"
#include "dolphin/os/OSThread.h"
#ifdef __cplusplus
diff --git a/include/dolphin/os/OSMutex.h b/include/dolphin/os/OSMutex.h
index 81d2c75435..a3815e294a 100644
--- a/include/dolphin/os/OSMutex.h
+++ b/include/dolphin/os/OSMutex.h
@@ -1,24 +1,30 @@
#ifndef OSMUTEX_H
#define OSMUTEX_H
-#include "dolphin/types.h"
#include "dolphin/os/OSThread.h"
#ifdef __cplusplus
extern "C" {
#endif
-void OSInitMutex(struct OSMutex* mutex);
-void OSLockMutex(struct OSMutex* mutex);
-void OSUnlockMutex(struct OSMutex* mutex);
-void __OSUnlockAllMutex(struct OSThread* thread);
-s32 OSTryLockMutex(struct OSMutex* mutex);
-void OSInitCond(struct OSCond* cond);
-void OSWaitCond(struct OSCond* cond, struct OSMutex* mutex);
-void OSSignalCond(struct OSCond* cond);
-s32 __OSCheckMutex(struct OSThread* thread);
-BOOL __OSCheckDeadLock(struct OSThread* thread);
-BOOL __OSCheckMutexes(struct OSThread* thread);
+typedef struct OSMutex {
+ /* 0x00 */ OSThreadQueue queue;
+ /* 0x08 */ OSThread* thread;
+ /* 0x0C */ s32 count;
+ /* 0x10 */ OSMutexLink link;
+} OSMutex; // Size: 0x18
+
+void OSInitMutex(OSMutex* mutex);
+void OSLockMutex(OSMutex* mutex);
+void OSUnlockMutex(OSMutex* mutex);
+void __OSUnlockAllMutex(OSThread* thread);
+s32 OSTryLockMutex(OSMutex* mutex);
+void OSInitCond(OSCond* cond);
+void OSWaitCond(OSCond* cond, OSMutex* mutex);
+void OSSignalCond(OSCond* cond);
+s32 __OSCheckMutex(OSThread* thread);
+BOOL __OSCheckDeadLock(OSThread* thread);
+BOOL __OSCheckMutexes(OSThread* thread);
#ifdef __cplusplus
};
diff --git a/include/dolphin/os/OSReboot.h b/include/dolphin/os/OSReboot.h
index 4b9438a1ac..4c9be11c43 100644
--- a/include/dolphin/os/OSReboot.h
+++ b/include/dolphin/os/OSReboot.h
@@ -9,7 +9,7 @@ extern "C" {
void __OSReboot(u32 param_0, u32 param_1);
void OSSetSaveRegion(void* start, void* end);
-void OSGetSaveRegion(void* start, void* end);
+void OSGetSaveRegion(void** start, void** end);
#ifdef __cplusplus
};
diff --git a/include/dolphin/os/OSSync.h b/include/dolphin/os/OSSync.h
index d7fcc930f5..880f44dd90 100644
--- a/include/dolphin/os/OSSync.h
+++ b/include/dolphin/os/OSSync.h
@@ -10,6 +10,8 @@ extern "C" {
static void SystemCallVector(void);
void __OSInitSystemCall(void);
+void __OSSystemCallVectorEnd(void);
+
#ifdef __cplusplus
};
#endif
diff --git a/include/dolphin/os/OSThread.h b/include/dolphin/os/OSThread.h
index 0776ded1c1..5b77de9412 100644
--- a/include/dolphin/os/OSThread.h
+++ b/include/dolphin/os/OSThread.h
@@ -1,8 +1,6 @@
#ifndef OSTHREAD_H
#define OSTHREAD_H
-#include "dolphin/types.h"
-#include "dolphin/os/OSMutex.h"
#include "dolphin/os/OSContext.h"
#ifdef __cplusplus
@@ -16,24 +14,6 @@ typedef u16 OSThreadState;
#define OS_THREAD_STATE_WAITING 4
#define OS_THREAD_STATE_DEAD 8
-typedef struct OSMutexLink {
- struct OSMutex* prev;
- struct OSMutex* next;
-} OSMutexLink;
-
-typedef struct OSMutexQueue {
- struct OSMutex* prev;
- struct OSMutex* next;
-} OSMutexQueue;
-
-typedef struct OSMutex {
- /* 0x00 */ //OSThreadQueue queue;
- /* 0x08 */ //OSThread* thread;
- /* 0x0C */ //s32 count;
- /* 0x10 */ //OSMutexLink link;
- u8 unk[24];
-} OSMutex; // Size: 0x18
-
typedef struct OSThreadLink {
struct OSThread* prev;
struct OSThread* next;
@@ -44,32 +24,45 @@ typedef struct OSThreadQueue {
/* 0x4 */ struct OSThread* tail;
} OSThreadQueue;
+typedef struct OSMutexLink {
+ struct OSMutex* prev;
+ struct OSMutex* next;
+} OSMutexLink;
+
+typedef struct OSMutexQueue {
+ struct OSMutex* prev;
+ struct OSMutex* next;
+} OSMutexQueue;
+
typedef struct OSCond {
- struct OSThreadQueue queue;
+ OSThreadQueue queue;
} OSCond;
-typedef void (*OSSwitchThreadCallback)(struct OSThread* from, struct OSThread* to);
-
typedef struct OSThread {
- struct OSContext context;
+ OSContext context;
OSThreadState state;
u16 attributes;
s32 suspend_count;
- u32 effective_priority;
+ s32 effective_priority;
u32 base_priority;
void* exit_value;
- struct OSThreadQueue* queue;
- struct OSThreadLink link;
- struct OSThreadQueue join_queue;
+ OSThreadQueue* queue;
+ OSThreadLink link;
+ OSThreadQueue join_queue;
struct OSMutex* mutex;
OSMutexQueue owned_mutexes;
- struct OSThreadLink active_threads_link;
+ OSThreadLink active_threads_link;
u8* stack_base;
u8* stack_end;
u8* error_code;
void* data[2];
} OSThread;
+typedef void (*OSSwitchThreadCallback)(OSThread* from, OSThread* to);
+
+OSThreadQueue OS_THREAD_QUEUE : 0x800000DC;
+OSThread* OS_CURRENT_THREAD : 0x800000E4;
+
static void DefaultSwitchThreadCallback(OSThread* from, OSThread* to);
OSSwitchThreadCallback OSSetSwitchThreadCallback(OSSwitchThreadCallback func);
void __OSThreadInit(void);
diff --git a/include/dolphin/os/OSTime.h b/include/dolphin/os/OSTime.h
index ea432f587f..38470ad781 100644
--- a/include/dolphin/os/OSTime.h
+++ b/include/dolphin/os/OSTime.h
@@ -10,6 +10,8 @@ extern "C" {
typedef s64 OSTime;
typedef u32 OSTick;
+OSTime OS_SYSTEM_TIME : 0x800030D8;
+
typedef struct OSCalendarTime {
/* 0x00 */ s32 seconds;
/* 0x04 */ s32 minutes;
diff --git a/include/dolphin/pad/Pad.h b/include/dolphin/pad/Pad.h
index db289f7102..984b69b2f6 100644
--- a/include/dolphin/pad/Pad.h
+++ b/include/dolphin/pad/Pad.h
@@ -3,12 +3,11 @@
#include "dolphin/types.h"
-typedef enum PADMask {
- // PAD_CHAN3_BIT = (1 << 0),
- // PAD_CHAN2_BIT = (1 << 1),
- // PAD_CHAN1_BIT = (1 << 2),
- // PAD_CHAN0_BIT = (1 << 3),
+#ifdef __cplusplus
+extern "C" {
+#endif
+typedef enum PADMask {
PAD_CHAN3_BIT = (1 << 28),
PAD_CHAN2_BIT = (1 << 29),
PAD_CHAN1_BIT = (1 << 30),
@@ -28,16 +27,18 @@ typedef struct PADStatus {
/* 0xA */ s8 error;
} PADStatus;
-extern "C" {
u32 PADInit(void);
void PADSetAnalogMode(u32 mode);
void PADSetSpec(int spec);
-s32 PADReset(PADMask mask);
+BOOL PADReset(u32 mask);
void PADClampCircle(PADStatus* status);
void PADClamp(PADStatus* status);
-u32 PADRead(PADStatus* status);
+void PADRead(PADStatus* status);
void PADControlMotor(s32 channel, u32 command);
-s32 PADRecalibrate(PADMask mask);
-}
+BOOL PADRecalibrate(u32 mask);
+
+#ifdef __cplusplus
+};
+#endif
#endif /* PAD_H */
diff --git a/include/dolphin/vi/vi.h b/include/dolphin/vi/vi.h
index 350f64483d..e3eb7c8902 100644
--- a/include/dolphin/vi/vi.h
+++ b/include/dolphin/vi/vi.h
@@ -4,18 +4,26 @@
#include "dolphin/gx/GX.h"
#include "dolphin/types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef void (*VIRetraceCallback)(u32);
-extern "C" void VIWaitForRetrace(void);
-extern "C" void VISetNextFrameBuffer(void*);
-extern "C" VIRetraceCallback VISetPreRetraceCallback(VIRetraceCallback);
-extern "C" VIRetraceCallback VISetPostRetraceCallback(VIRetraceCallback);
-extern "C" void VIInit();
-extern "C" void VIConfigure(GXRenderModeObj*);
-extern "C" void VIFlush();
-extern "C" void* VIGetNextFrameBuffer();
-extern "C" void* VIGetCurrentFrameBuffer();
-extern "C" void VISetBlack(BOOL);
-extern "C" u32 VIGetRetraceCount();
+void VIWaitForRetrace(void);
+void VISetNextFrameBuffer(void*);
+VIRetraceCallback VISetPreRetraceCallback(VIRetraceCallback);
+VIRetraceCallback VISetPostRetraceCallback(VIRetraceCallback);
+void VIInit();
+void VIConfigure(GXRenderModeObj*);
+void VIFlush();
+void* VIGetNextFrameBuffer();
+void* VIGetCurrentFrameBuffer();
+void VISetBlack(BOOL);
+u32 VIGetRetraceCount();
+
+#ifdef __cplusplus
+};
+#endif
#endif /* VI_H */
diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h
index e85f70bf2c..a7fe695e1d 100644
--- a/include/f_op/f_op_actor.h
+++ b/include/f_op/f_op_actor.h
@@ -26,6 +26,7 @@ public:
void setMapToolId(u8 id) { mMapToolId = id; }
void setEventId(s16 id) { mEventId = id; }
void setCondition(u16 condition) { mCondition = condition; }
+ u16 getCondition() { return mCondition; }
void setArchiveName(char* name) { mArchiveName = name; }
u8 getMapToolId() { return mMapToolId; }
s16 getEventId() { return mEventId; }
@@ -134,6 +135,28 @@ public:
s8 getRoomNo() const { return current.mRoomNo; }
}; // Size: 0x568
+class fopEn_enemy_c : public fopAc_ac_c {
+public:
+ /* 80019404 */ void initBallModel();
+ /* 800194FC */ void checkBallModelDraw();
+ /* 80019520 */ void setBallModelEffect(dKy_tevstr_c*);
+ /* 800196A0 */ void drawBallModel(dKy_tevstr_c*);
+
+ /* 0x568 */ cXyz mDownPos;
+ /* 0x574 */ cXyz mHeadLockPos;
+ /* 0x580 */ J3DModel* mBallModel;
+ /* 0x584 */ J3DAnmTextureSRTKey* mBtk;
+ /* 0x588 */ J3DAnmTevRegKey* mBrk;
+ /* 0x58C */ u8 field_0x58c;
+ /* 0x58D */ u8 mThrowMode;
+ /* 0x58E */ u16 mFlags;
+ /* 0x590 */ f32 field_0x590;
+ /* 0x594 */ u32 mEffectID1;
+ /* 0x598 */ u32 mEffectID2;
+ /* 0x59C */ u32 mMidnaBindID[3];
+ /* 0x5A8 */ u8 field_0x5a8;
+}; // Size: 0x5AC
+
s32 fopAc_IsActor(void* actor);
#endif
diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h
index 0fd60a1a98..867380a90d 100644
--- a/include/f_op/f_op_actor_mng.h
+++ b/include/f_op/f_op_actor_mng.h
@@ -116,6 +116,10 @@ inline s16 fopAcM_GetName(void* pActor) {
return fpcM_GetName(pActor);
}
+inline MtxP fopAcM_GetMtx(const fopAc_ac_c* pActor) {
+ return pActor->mCullMtx;
+}
+
inline u32 fopAcM_checkStatus(fopAc_ac_c* pActor, u32 status) {
return pActor->mStatus & status;
}
@@ -412,6 +416,7 @@ s32 fopAcM_orderTreasureEvent(fopAc_ac_c*, fopAc_ac_c*, u16, u16);
void* fopAcM_getTalkEventPartner(const fopAc_ac_c*);
void* fopAcM_getItemEventPartner(const fopAc_ac_c*);
void* fopAcM_getEventPartner(const fopAc_ac_c*);
+static void fopAcM_onSwitch(fopAc_ac_c const* param_0, int param_1);
s32 fopAcM_createItemForPresentDemo(cXyz const* p_pos, int i_itemNo, u8 param_2, int i_itemBitNo,
int i_roomNo, csXyz const* p_angle, cXyz const* p_scale);
@@ -459,7 +464,7 @@ void* fopAcM_fastCreateItem(const cXyz* p_pos, int i_itemNo, int i_roomNo, const
s32 fopAcM_createBokkuri(u16, const cXyz*, int, int, int, const cXyz*, int, int);
s32 fopAcM_createWarpHole(const cXyz*, const csXyz*, int, u8, u8, u8);
-void fopAcM_myRoomSearchEnemy(s8 roomNo);
+fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo);
s32 fopAcM_createDisappear(const fopAc_ac_c*, const cXyz*, u8, u8, u8);
void fopAcM_setCarryNow(fopAc_ac_c*, int);
diff --git a/include/f_pc/f_pc_executor.h b/include/f_pc/f_pc_executor.h
index eaf0a22751..fca6a858c1 100644
--- a/include/f_pc/f_pc_executor.h
+++ b/include/f_pc/f_pc_executor.h
@@ -16,6 +16,10 @@ s32 fpcEx_Execute(base_process_class* pProc);
s32 fpcEx_ToExecuteQ(base_process_class* pProc);
void fpcEx_Handler(fpcLnIt_QueueFunc pFunc);
+inline base_process_class* fpcM_Search(fpcLyIt_JudgeFunc pFunc, void* pUserData) {
+ return fpcEx_Search(pFunc, pUserData);
+}
+
extern "C" {
void fpcEx_IsExist__FUi(void);
}
diff --git a/include/global.h b/include/global.h
index fb78565981..8f0e1a3a78 100644
--- a/include/global.h
+++ b/include/global.h
@@ -31,11 +31,6 @@
#define STATIC_ASSERT(...)
#endif
-struct JUTWarn {
- JUTWarn& operator<<(const char*) { return *this; }
- JUTWarn& operator<<(long) { return *this; }
-};
-
// hack to make functions that return comparisons as int match
extern int __cntlzw(unsigned int);
inline BOOL checkEqual(s32 a, s32 b) {
diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h
index fe95da6259..f205d388d1 100644
--- a/include/m_Do/m_Do_audio.h
+++ b/include/m_Do/m_Do_audio.h
@@ -42,13 +42,24 @@ void mDoAud_resetProcess();
bool mDoAud_resetRecover();
void mDoAud_setSceneName(char const* spot, s32 room, s32 layer);
s32 mDoAud_load1stDynamicWave();
+static void mDoAud_setLinkGroupInfo(u8 param_0);
+static void mDoAud_setLinkHp(s32 param_0, s32 param_1);
+static void mDoAud_seStartLevel(u32 param_0, Vec const* param_1, u32 param_2, s8 param_3);
inline void mDoAud_bgmSetSwordUsing(s32 id) {
Z2AudioMgr::getInterface()->mSeqMgr.bgmSetSwordUsing(id);
}
-inline void mDoAud_bgmStart(u32 id) {
- Z2AudioMgr::getInterface()->mSeqMgr.bgmStart(id, 0, 0);
+inline void mDoAud_bgmStart(u32 i_bgmID) {
+ Z2AudioMgr::getInterface()->mSeqMgr.bgmStart(i_bgmID, 0, 0);
+}
+
+inline void mDoAud_subBgmStart(u32 i_bgmID) {
+ Z2AudioMgr::getInterface()->mSeqMgr.subBgmStart(i_bgmID);
+}
+
+inline void mDoAud_bgmNowBattle(f32 param_0) {
+ Z2AudioMgr::getInterface()->mSeqMgr.bgmNowBattle(param_0);
}
inline void mDoAud_bgmStreamPrepare(u32 param_0) {
@@ -75,13 +86,13 @@ inline void mDoAud_setInDarkness(bool state) {
Z2AudioMgr::getInterface()->mSceneMgr.setInDarkness(state);
}
-inline void mDoAud_seStart(u32 sfx_id, const Vec* param_1, u32 param_2, s8 param_3) {
- Z2AudioMgr::getInterface()->mSeMgr.seStart(sfx_id, param_1, param_2, param_3, 1.0f, 1.0f, -1.0f,
+inline void mDoAud_seStart(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) {
+ Z2AudioMgr::getInterface()->mSeMgr.seStart(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f, -1.0f,
-1.0f, 0);
}
-inline void i_mDoAud_seStartLevel(u32 sfx_id, const Vec* param_1, u32 param_2, s8 param_3) {
- Z2AudioMgr::getInterface()->mSeMgr.seStartLevel(sfx_id, param_1, param_2, param_3, 1.0f, 1.0f,
+inline void i_mDoAud_seStartLevel(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) {
+ Z2AudioMgr::getInterface()->mSeMgr.seStartLevel(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f,
-1.0f, -1.0f, 0);
}
diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h
index ab055c090c..b9e22e443d 100644
--- a/include/m_Do/m_Do_ext.h
+++ b/include/m_Do/m_Do_ext.h
@@ -46,17 +46,21 @@ private:
class mDoExt_btkAnm : public mDoExt_baseAnm {
public:
mDoExt_btkAnm() { mpAnm = 0; }
- /* 8000D63C */ int init(J3DMaterialTable*, J3DAnmTextureSRTKey*, int, int, f32, s16, s16);
- /* 8000D6D8 */ void entry(J3DMaterialTable*, f32);
-
- void entry(J3DModelData* data) { entry(data, getFrame()); }
- void entry(J3DModelData* data, f32 frame) { entry(&data->getMaterialTable(), frame); }
- int init(J3DModelData* data, J3DAnmTextureSRTKey* key, int param_2, int param_3, f32 param_4,
- s16 param_5, s16 param_6) {
- return init(&data->getMaterialTable(), key, param_2, param_3, param_4, param_5, param_6);
+ /* 8000D63C */ int init(J3DMaterialTable* i_matTable, J3DAnmTextureSRTKey* i_btk, int i_anmPlay,
+ int i_attribute, f32 i_rate, s16 i_start, s16 param_6);
+ /* 8000D6D8 */ void entry(J3DMaterialTable* i_matTable, f32 i_frame);
+
+ void entry(J3DModelData* i_modelData) { entry(i_modelData, getFrame()); }
+ void entry(J3DModelData* i_modelData, f32 i_frame) {
+ entry(&i_modelData->getMaterialTable(), i_frame);
+ }
+ int init(J3DModelData* i_modelData, J3DAnmTextureSRTKey* i_btk, int i_anmPlay, int i_attribute,
+ f32 i_rate, s16 i_start, s16 param_6) {
+ return init(&i_modelData->getMaterialTable(), i_btk, i_anmPlay, i_attribute, i_rate,
+ i_start, param_6);
}
- int remove(J3DModelData* data) { return data->removeTexMtxAnimator(mpAnm); }
+ int remove(J3DModelData* i_modelData) { return i_modelData->removeTexMtxAnimator(mpAnm); }
private:
/* 0x14 */ J3DAnmTextureSRTKey* mpAnm;
@@ -67,18 +71,22 @@ STATIC_ASSERT(sizeof(mDoExt_btkAnm) == 0x18);
class mDoExt_brkAnm : public mDoExt_baseAnm {
public:
mDoExt_brkAnm() { mpAnm = 0; }
- /* 8000D70C */ int init(J3DMaterialTable*, J3DAnmTevRegKey*, int, int, f32, s16, s16);
- /* 8000D7A8 */ void entry(J3DMaterialTable*, f32);
+ /* 8000D70C */ int init(J3DMaterialTable* i_matTable, J3DAnmTevRegKey* i_brk, int i_anmPlay,
+ int i_attribute, f32 i_rate, s16 i_start, s16 param_6);
+ /* 8000D7A8 */ void entry(J3DMaterialTable* i_matTable, f32 i_frame);
- void entry(J3DModelData* data) { entry(data, getFrame()); }
- void entry(J3DModelData* data, f32 frame) { entry(&data->getMaterialTable(), frame); }
+ void entry(J3DModelData* i_modelData) { entry(i_modelData, getFrame()); }
+ void entry(J3DModelData* i_modelData, f32 i_frame) {
+ entry(&i_modelData->getMaterialTable(), i_frame);
+ }
- int init(J3DModelData* data, J3DAnmTevRegKey* anmKey, int param_2, int param_3, f32 param_4,
- s16 param_5, s16 param_6) {
- return init(&data->getMaterialTable(), anmKey, param_2, param_3, param_4, param_5, param_6);
+ int init(J3DModelData* i_modelData, J3DAnmTevRegKey* i_brk, int i_anmPlay, int i_attribute,
+ f32 i_rate, s16 i_start, s16 param_6) {
+ return init(&i_modelData->getMaterialTable(), i_brk, i_anmPlay, i_attribute, i_rate,
+ i_start, param_6);
}
- int remove(J3DModelData* data) { return data->removeTevRegAnimator(mpAnm); }
+ int remove(J3DModelData* i_modelData) { return i_modelData->removeTevRegAnimator(mpAnm); }
private:
/* 0x14 */ J3DAnmTevRegKey* mpAnm;
@@ -93,16 +101,18 @@ public:
int i_attribute, f32 i_rate, s16 i_start, s16 param_6);
/* 8000D518 */ void entry(J3DMaterialTable* i_matTable, f32 i_frame);
- void entry(J3DModelData* data) { entry(data, getFrame()); }
- void entry(J3DModelData* data, f32 frame) { entry(&data->getMaterialTable(), frame); }
+ void entry(J3DModelData* i_modelData) { entry(i_modelData, getFrame()); }
+ void entry(J3DModelData* i_modelData, f32 i_frame) {
+ entry(&i_modelData->getMaterialTable(), i_frame);
+ }
- int init(J3DModelData* data, J3DAnmColor* anmColor, int param_2, int param_3, f32 param_4,
- s16 param_5, s16 param_6) {
- return init(&data->getMaterialTable(), anmColor, param_2, param_3, param_4, param_5,
- param_6);
+ int init(J3DModelData* i_modelData, J3DAnmColor* i_bpk, int i_anmPlay, int i_attribute,
+ f32 i_rate, s16 i_start, s16 param_6) {
+ return init(&i_modelData->getMaterialTable(), i_bpk, i_anmPlay, i_attribute, i_rate,
+ i_start, param_6);
}
- int remove(J3DModelData* data) { return data->removeMatColorAnimator(mpAnm); }
+ int remove(J3DModelData* i_modelData) { return i_modelData->removeMatColorAnimator(mpAnm); }
private:
/* 0x14 */ J3DAnmColor* mpAnm;
@@ -115,12 +125,16 @@ public:
mDoExt_bckAnm() { mpMtxCalc = NULL; }
/* 8000D7DC */ int init(J3DAnmTransform* i_bck, int i_play, int i_attr, f32 i_rate,
s16 i_startF, s16 i_endF, bool i_modify);
- /* 8000D990 */ void changeBckOnly(J3DAnmTransform*);
- /* 8000D9CC */ void entry(J3DModelData*, f32);
- /* 8000D9E8 */ void entryJoint(J3DModelData*, u16, f32);
+ /* 8000D990 */ void changeBckOnly(J3DAnmTransform* i_bck);
+ /* 8000D9CC */ void entry(J3DModelData* i_modelData, f32 i_frame);
+ /* 8000D9E8 */ void entryJoint(J3DModelData* i_modelData, u16 i_jntNo, f32 i_frame);
- void entry(J3DModelData* data) { entry(data, getFrame()); }
+ void entry(J3DModelData* i_modelData) { entry(i_modelData, getFrame()); }
J3DAnmTransform* getBckAnm() { return mAnm; }
+ void removeJoint (J3DModelData* i_modelData, u16 i_idx) {
+ J3DJoint* mpJnt = i_modelData->getJointNodePointer(i_idx);
+ mpJnt->setMtxCalc(0);
+ }
private:
/* 0x14 */ J3DAnmTransform* mAnm;
@@ -136,16 +150,18 @@ public:
int i_attribute, f32 i_rate, s16 i_start, s16 param_6);
/* 8000D5E8 */ void entry(J3DMaterialTable* i_matTable, s16 i_frame);
- void entry(J3DModelData* data) { entry(data, getFrame()); }
- void entry(J3DModelData* data, s16 frame) { entry(&data->getMaterialTable(), frame); }
+ void entry(J3DModelData* i_modelData) { entry(i_modelData, getFrame()); }
+ void entry(J3DModelData* i_modelData, s16 i_frame) {
+ entry(&i_modelData->getMaterialTable(), i_frame);
+ }
- int init(J3DModelData* data, J3DAnmTexPattern* anmPattern, int param_2, int param_3,
- f32 param_4, s16 param_5, s16 param_6) {
- return init(&data->getMaterialTable(), anmPattern, param_2, param_3, param_4, param_5,
- param_6);
+ int init(J3DModelData* i_modelData, J3DAnmTexPattern* i_btk, int i_anmPlay, int i_attribute,
+ f32 i_rate, s16 i_start, s16 param_6) {
+ return init(&i_modelData->getMaterialTable(), i_btk, i_anmPlay, i_attribute, i_rate,
+ i_start, param_6);
}
- int remove(J3DModelData* data) { return data->removeTexNoAnimator(mpAnm); }
+ int remove(J3DModelData* i_modelData) { return i_modelData->removeTexNoAnimator(mpAnm); }
private:
/* 0x14 */ J3DAnmTexPattern* mpAnm;
@@ -156,6 +172,8 @@ public:
/* 8000DA08 */ int init(J3DDeformData* i_deformData, J3DAnmCluster* i_blk, int i_anmPlay,
int i_attribute, f32 i_rate, s16 i_start, s16 param_6);
+ J3DAnmCluster* getBlkAnm() { return mpAnm; }
+
private:
/* 0x14 */ J3DAnmCluster* mpAnm;
};
@@ -197,7 +215,7 @@ private:
class mDoExt_invisibleModel {
public:
- /* 8000E53C */ int create(J3DModel*, u8);
+ /* 8000E53C */ int create(J3DModel* i_model, u8 param_1);
/* 8000E6C8 */ void entryJoint(cXyz*);
/* 8000E7C0 */ void entryDL(cXyz*);
@@ -219,15 +237,18 @@ class mDoExt_morf_c {
// inheritance causing issues, fix later
public:
/* 8000F950 */ mDoExt_morf_c();
- /* 8000FB7C */ void setMorf(f32);
+ /* 8000FB7C */ void setMorf(f32 i_morf);
/* 8000FBC0 */ void frameUpdate();
/* 8000FAE8 */ virtual ~mDoExt_morf_c();
void setPlaySpeed(f32 speed) { mFrameCtrl.setRate(speed); }
-
f32 getPlaySpeed() { return mFrameCtrl.getRate(); }
f32 getFrame() { return mFrameCtrl.getFrame(); }
+ u8 getPlayMode() { return mFrameCtrl.getAttribute(); }
+ bool isLoop() { return mFrameCtrl.checkState(2); }
+ void setFrame(f32 frame) { mFrameCtrl.setFrame((s16)frame); }
+ f32 getEndFrame() { return mFrameCtrl.getEnd(); }
bool isStop() {
bool stopped = true;
@@ -297,6 +318,8 @@ public:
/* 8000FD10 */ virtual ~mDoExt_McaMorf();
/* 80010074 */ virtual void calc();
+ J3DModel* getModel() { return mpModel; }
+
private:
/* 0x38 */ mDoExt_McaMorfCallBack1_c* mpCallback1;
/* 0x3C */ mDoExt_McaMorfCallBack2_c* mpCallback2;
@@ -365,7 +388,7 @@ struct mDoExt_MtxCalcAnmBlendTblOld
}; // Size: 0xC
struct mDoExt_MtxCalcAnmBlendTbl : public mDoExt_MtxCalcAnmBlendTblOld {
- /* 800D00BC */ void getAnm(int);
+ /* 800D00BC */ J3DAnmTransform* getAnm(int);
/* 80014F3C */ virtual ~mDoExt_MtxCalcAnmBlendTbl();
/* 8000F26C */ virtual void calc();
diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h
index 32b4acb8e8..d989cefe34 100644
--- a/include/m_Do/m_Do_graphic.h
+++ b/include/m_Do/m_Do_graphic.h
@@ -36,6 +36,7 @@ public:
/* 80007F90 */ static void beginRender();
/* 800080D0 */ static void fadeOut(f32);
/* 80007FD8 */ static void fadeOut(f32, _GXColor&);
+ /* 807DFAB4 */ static void fadeIn(f32, _GXColor&);
/* 80008028 */ static void fadeOut_f(f32, _GXColor&);
/* 800080A0 */ static void onBlure(const Mtx);
/* 80008078 */ static void onBlure();
diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h
index 123a7d17b8..1f9d82853c 100644
--- a/include/m_Do/m_Do_mtx.h
+++ b/include/m_Do/m_Do_mtx.h
@@ -4,6 +4,7 @@
#include "SSystem/SComponent/c_sxyz.h"
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/mtx/mtx.h"
+#include "dolphin/mtx/mtxvec.h"
#include "dolphin/mtx/quat.h"
#include "dolphin/types.h"
@@ -54,7 +55,7 @@ public:
static void XrotM(s16 x) { mDoMtx_XrotM(now, x); }
static void inverse() { PSMTXInverse(now, now); }
static void concat(const Mtx m) { PSMTXConcat(now, m, now); }
- static void copy(const Mtx m) { PSMTXCopy(m, now); }
+ static void copy(Mtx m) { PSMTXCopy(now, m); }
static Mtx now;
static Mtx buffer[16];
diff --git a/include/rel/d/a/d_a_alldie/d_a_alldie.h b/include/rel/d/a/d_a_alldie/d_a_alldie.h
index 9e194ee137..37bbe764a9 100644
--- a/include/rel/d/a/d_a_alldie/d_a_alldie.h
+++ b/include/rel/d/a/d_a_alldie/d_a_alldie.h
@@ -1,6 +1,36 @@
#ifndef D_A_ALLDIE_H
#define D_A_ALLDIE_H
-#include "dolphin/types.h"
+#include "f_op/f_op_actor.h"
+
+class daAlldie_c : public fopAc_ac_c {
+public:
+ enum EAction {
+ /* 0x0 */ ACT_WAIT,
+ /* 0x1 */ ACT_CHECK,
+ /* 0x2 */ ACT_TIMER,
+ /* 0x3 */ ACT_ORDER,
+ /* 0x4 */ ACT_NEXT,
+ /* 0x5 */ ACT_EVENT,
+ };
+
+ /* 804D5818 */ u8 getEventNo();
+ /* 804D5824 */ u8 getSwbit();
+ /* 804D5830 */ int actionWait();
+ /* 804D5838 */ int actionCheck();
+ /* 804D5888 */ int actionTimer();
+ /* 804D5938 */ int actionOrder();
+ /* 804D59A0 */ int actionEvent();
+ /* 804D5A44 */ int actionNext();
+ /* 804D5B10 */ int execute();
+
+ inline int create();
+
+ /* 0x568 */ u8 mAction;
+ /* 0x56A */ s16 mTimer;
+ /* 0x56C */ s16 mEventIdx;
+ /* 0x56E */ s16 mNextEventIdx;
+ /* 0x570 */ s16 mMapToolID;
+}; // Size: 0x574
#endif /* D_A_ALLDIE_H */
diff --git a/include/rel/d/a/d_a_boomerang/d_a_boomerang.h b/include/rel/d/a/d_a_boomerang/d_a_boomerang.h
index cd39bb9e4f..e3f802d51b 100644
--- a/include/rel/d/a/d_a_boomerang/d_a_boomerang.h
+++ b/include/rel/d/a/d_a_boomerang/d_a_boomerang.h
@@ -90,6 +90,8 @@ public:
void onStateFlg0(daBoomerang_FLG0 flag) { mStateFlg0 |= flag; }
void onWindCatch() { onStateFlg0(WIND_CATCH); }
+ bool checkForceDelete() const { return mForceDelete; }
+ bool checkCharge() const { return true; }
private:
/* 0x568 */ daMirror_c* field_0x568;
@@ -114,7 +116,7 @@ private:
/* 0x953 */ u8 field_0x953;
/* 0x954 */ u8 field_0x954;
/* 0x955 */ u8 field_0x955;
- /* 0x956 */ u8 field_0x956;
+ /* 0x956 */ bool mForceDelete;
/* 0x957 */ u8 field_0x957;
/* 0x958 */ s16 field_0x958;
/* 0x95A */ s16 field_0x95a;
diff --git a/include/rel/d/a/d_a_horse/d_a_horse.h b/include/rel/d/a/d_a_horse/d_a_horse.h
index fc9d8433af..b109ebe2f7 100644
--- a/include/rel/d/a/d_a_horse/d_a_horse.h
+++ b/include/rel/d/a/d_a_horse/d_a_horse.h
@@ -149,7 +149,7 @@ public:
/* 80844CB0 */ daHorse_c();
bool checkNoBombProc() const { return field_0x16b4 == 0 || field_0x16b4 == 1; }
- bool checkResetStateFlg0(daHorse_RFLG0 flag) { return mResetStateFlg0 & flag; }
+ bool checkResetStateFlg0(daHorse_RFLG0 flag) const { return mResetStateFlg0 & flag; }
bool checkEndResetStateFlg0(daHorse_ERFLG0 flag) { return mEndResetStateFlg0 & flag; }
bool checkStateFlg0(daHorse_FLG0 flag) { return mStateFlg0 & flag; }
f32 getNormalMaxSpeedF() { return mNormalMaxSpeedF; }
@@ -157,6 +157,10 @@ public:
void setDemoStickR(f32 stick) { mDemoStickR = stick; }
void i_changeDemoMode(u32 param_0, int param_1) { field_0x1740 = param_0; field_0x1728 = param_1; }
void i_changeOriginalDemo() { field_0x16b8 = 3; field_0x1728 = 0; }
+ void i_setHorsePosAndAngle(cXyz const* i_pos, s16 i_angle) { (this->*mpSetHorsePosAngleFn)(i_pos, i_angle); }
+
+ bool checkTurnStandCamera() const { return checkResetStateFlg0(TURN_STAND_CAMERA); }
+ bool checkTurnStand() const { return checkResetStateFlg0(TURN_STAND); }
static u8 const m_footJointTable[8];
static f32 const m_callLimitDistance2;
@@ -220,6 +224,15 @@ public:
/* 0x1790 */ f32 mLashMaxSpeedF;
/* 0x1794 */ u8 field_0x1794[0x30];
/* 0x17C4 */ cXyz mDemoPos0;
+ /* 0x17D0 */ u8 field_0x17d0[0x18A4 - 0x17D0];
+ /* 0x18A4 */ int (daHorse_c::*mpProcFn)();
+ /* 0x18A4 */ int (daHorse_c::*mpCheckSpecialWallHitFn)(const cXyz&);
+ /* 0x18A4 */ void (daHorse_c::*mpSetReinPosHandFn)(int);
+ /* 0x18A4 */ void (daHorse_c::*mpSetReinPosNormalFn)();
+ /* 0x18A4 */ int (daHorse_c::*mpCallHorseFn)(const cXyz*);
+ /* 0x18A4 */ int (daHorse_c::*mpSetHorsePosAngleFn)(const cXyz* i_pos, s16 i_angle);
+ /* 0x18A4 */ void (daHorse_c::*mpOnRideFlgFn)();
+ /* 0x18A4 */ void (daHorse_c::*mpOffRideFlgFn)();
};
#endif /* D_A_HORSE_H */
diff --git a/include/rel/d/a/d_a_movie_player/d_a_movie_player.h b/include/rel/d/a/d_a_movie_player/d_a_movie_player.h
index 848f6787a1..8461581f8b 100644
--- a/include/rel/d/a/d_a_movie_player/d_a_movie_player.h
+++ b/include/rel/d/a/d_a_movie_player/d_a_movie_player.h
@@ -4,14 +4,12 @@
#include "dolphin/types.h"
#include "f_op/f_op_actor.h"
-typedef void (*daMP_Func)();
-
class daMP_c : public fopAc_ac_c {
public:
- /* 80031AD0 */ static void daMP_c_THPPlayerPlay();
- /* 80031B24 */ void daMP_c_THPPlayerPause();
- /* 80031A78 */ void daMP_c_Get_MovieRestFrame();
- /* 80031AA4 */ void daMP_c_Set_PercentMovieVolume(f32);
+ /* 80031AD0 */ static int daMP_c_THPPlayerPlay();
+ /* 80031B24 */ static void daMP_c_THPPlayerPause();
+ /* 80031A78 */ static int daMP_c_Get_MovieRestFrame();
+ /* 80031AA4 */ static void daMP_c_Set_PercentMovieVolume(f32);
/* 80878BB8 */ void daMP_c_Get_arg_demoNo();
/* 80878C04 */ void daMP_c_Get_arg_movieNo();
/* 80878C28 */ void daMP_c_Init();
@@ -24,15 +22,15 @@ public:
/* 80878F38 */ void daMP_c_Callback_Main(daMP_c*);
/* 80878F70 */ void daMP_c_Callback_Draw(daMP_c*);
- static u8 m_myObj[4];
+ static daMP_c* m_myObj;
private:
- /* 0x568 */ daMP_Func mpGetMovieRestFrame;
- /* 0x56C */ daMP_Func mpSetPercentMovieVol;
- /* 0x570 */ daMP_Func mpTHPGetTotalFrame;
- /* 0x574 */ daMP_Func mpTHPPlay;
- /* 0x578 */ daMP_Func mpTHPStop;
- /* 0x57C */ daMP_Func mpTHPPause;
+ /* 0x568 */ int (*mpGetMovieRestFrame)(void);
+ /* 0x56C */ void (*mpSetPercentMovieVol)(f32);
+ /* 0x570 */ int (*mpTHPGetTotalFrame)(void);
+ /* 0x574 */ int (*mpTHPPlay)(void);
+ /* 0x578 */ void (*mpTHPStop)(void);
+ /* 0x57C */ int (*mpTHPPause)(void);
}; // Size: 0x580
#endif /* D_A_MOVIE_PLAYER_H */
diff --git a/include/rel/d/a/d_a_tboxSw/d_a_tboxSw.h b/include/rel/d/a/d_a_tboxSw/d_a_tboxSw.h
index 21506b62d5..d3a0c3cbd1 100644
--- a/include/rel/d/a/d_a_tboxSw/d_a_tboxSw.h
+++ b/include/rel/d/a/d_a_tboxSw/d_a_tboxSw.h
@@ -1,6 +1,20 @@
#ifndef D_A_TBOXSW_H
#define D_A_TBOXSW_H
-#include "dolphin/types.h"
+#include "f_op/f_op_actor_mng.h"
+
+class daTboxSw_c : public fopAc_ac_c {
+public:
+ /* 80D66858 */ int Create();
+ /* 80D66860 */ int create();
+ /* 80D668C8 */ int execute();
+ /* 80D66938 */ int draw();
+ /* 80D66940 */ int _delete();
+};
+
+namespace daTboxSw_prm {
+ inline u8 getTboxNo(daTboxSw_c* p_tbox) { return fopAcM_GetParam(p_tbox) & 0x3F; }
+ inline u8 getSwNo(daTboxSw_c* p_tbox) { return fopAcM_GetParam(p_tbox) >> 8; }
+};
#endif /* D_A_TBOXSW_H */
diff --git a/include/rel/d/a/e/d_a_e_wb/d_a_e_wb.h b/include/rel/d/a/e/d_a_e_wb/d_a_e_wb.h
index 0f5478c59d..e752b8586a 100644
--- a/include/rel/d/a/e/d_a_e_wb/d_a_e_wb.h
+++ b/include/rel/d/a/e/d_a_e_wb/d_a_e_wb.h
@@ -4,8 +4,17 @@
#include "Z2AudioLib/Z2Creature.h"
#include "dolphin/types.h"
#include "rel/d/a/d_a_horse/d_a_horse.h"
+#include "SSystem/SComponent/c_phase.h"
+#include "d/cc/d_cc_uty.h"
-class e_wb_class : public fopAc_ac_c {
+enum daE_wb_ACT {
+ /* 0x00 */ ACT_WAIT,
+ /* 0x15 */ ACT_S_DAMAGE = 0x15,
+ /* 0x65 */ ACT_PL_RIDE = 0x65,
+ /* 0x67 */ ACT_PL_RIDE_NOW = 0x67,
+};
+
+class e_wb_class : public fopEn_enemy_c {
public:
BOOL checkWait();
void setPlayerRideNow();
@@ -16,38 +25,133 @@ public:
void setRunRideMode();
private:
- /* 0x0568 */ u8 field_0x568[0x4C];
+ /* 0x05AC */ request_of_phase_process_class mPhase;
/* 0x05B4 */ s16 field_0x5b4;
- /* 0x05B6 */ u8 unk1462[9];
+ /* 0x05B8 */ char* mResName;
+ /* 0x05BC */ u8 field_0x5bc;
+ /* 0x05BD */ u8 field_0x5bd;
+ /* 0x05BE */ u8 field_0x5be;
/* 0x05BF */ bool field_0x5bf;
- /* 0x05C0 */ u8 field_0x5c0[0x20];
- /* 0x05E0 */ void* field_0x5e0;
- /* 0x05E4 */ u8 field_0x5e4[8];
+ /* 0x05C0 */ u8 field_0x5c0;
+ /* 0x05C4 */ cXyz field_0x5c4;
+ /* 0x05D0 */ cXyz field_0x5d0;
+ /* 0x05DC */ s16 field_0x5dc;
+ /* 0x05DE */ s16 field_0x5de;
+ /* 0x05E0 */ mDoExt_McaMorfSO* field_0x5e0;
+ /* 0x05E4 */ f32 field_0x5e4;
+ /* 0x05E8 */ int mAnmID;
/* 0x05EC */ Z2CreatureRide mZ2Ride;
- /* 0x0688 */ u8 unk1673[6];
+ /* 0x0688 */ u8 field_0x688[4];
+ /* 0x068C */ s8 field_0x68c;
/* 0x068E */ s16 field_0x68e;
- /* 0x0690 */ s16 field_0x690;
+ /* 0x0690 */ s16 mActionID;
/* 0x0692 */ u16 field_0x692;
- /* 0x0694 */ u8 unk1684[0xc];
+ /* 0x0694 */ u32 field_0x694;
+ /* 0x0698 */ s16 field_0x698[4];
/* 0x06A0 */ s16 field_0x6a0;
- /* 0x06A2 */ u8 field_0x6a2[0xc];
+ /* 0x06A2 */ u8 field_0x6a2[0x6ae - 0x6a2];
/* 0x06AE */ s16 field_0x6ae;
/* 0x06B0 */ s16 field_0x6b0;
- /* 0x06B2 */ u8 field_0x6b2[0xc];
+ /* 0x06B2 */ s16 field_0x6b2;
+ /* 0x06B4 */ u8 field_0x6b4[0x6b6 - 0x6b4];
+ /* 0x06B6 */ s16 field_0x6b6;
+ /* 0x06B8 */ u8 field_0x6b8[0x6ba - 0x6b8];
+ /* 0x06BA */ s16 field_0x6ba;
+ /* 0x06BC */ u8 field_0x6bc;
+ /* 0x06BD */ u8 field_0x6bd;
/* 0x06BE */ u16 field_0x6be;
- /* 0x06C0 */ u8 field_0x6c0[0xdd];
- /* 0x079D */ u8 field_0x79d;
- /* 0x079E */ u8 field_0x79e[0x4e];
+ /* 0x06C0 */ s8 field_0x6c0;
+ /* 0x06C4 */ cXyz field_0x6c4;
+ /* 0x06D0 */ s16 field_0x6d0;
+ /* 0x06D2 */ s16 field_0x6d2;
+ /* 0x06D4 */ s16 field_0x6d4;
+ /* 0x06D6 */ s16 field_0x6d6;
+ /* 0x06D8 */ u8 field_0x6d8[0x6da - 0x6d8];
+ /* 0x06DA */ s16 field_0x6da;
+ /* 0x06DC */ s16 field_0x6dc;
+ /* 0x06DE */ u8 field_0x6de[0x6e4 - 0x6de];
+ /* 0x06E4 */ u8 field_0x6e4;
+ /* 0x06E5 */ u8 field_0x6e5[0x79a - 0x6e5];
+ /* 0x079A */ s16 field_0x79a;
+ /* 0x079C */ u8 field_0x79c;
+ /* 0x079D */ s8 field_0x79d;
+ /* 0x079E */ s8 field_0x79e;
+ /* 0x079F */ s8 field_0x79f;
+ /* 0x07A0 */ s16 field_0x7a0;
+ /* 0x07A2 */ s8 field_0x7a2;
+ /* 0x07A4 */ s16 field_0x7a4;
+ /* 0x07A6 */ s8 field_0x7a6;
+ /* 0x07A7 */ s8 field_0x7a7;
+ /* 0x07A8 */ f32 field_0x7a8;
+ /* 0x07AC */ dBgS_AcchCir field_0x7ac;
/* 0x07EC */ dBgS_Acch field_0x7ec;
- /* 0x09C4 */ cXyz field_0x9c4;
- /* 0x09D0 */ u8 field_0x9d0[0xa5f];
- /* 0x142F */ u8 field_0x142f;
- /* 0x1430 */ u8 field_0x1430;
+ /* 0x09C4 */ dCcD_Stts field_0x9c4;
+ /* 0x0A00 */ dCcD_Sph field_0xa00[7];
+ /* 0x1288 */ dCcD_Sph field_0x1288;
+ /* 0x13C0 */ dCcU_AtInfo field_0x13c0;
+ /* 0x13E4 */ u8 field_0x13e4;
+ /* 0x13E8 */ u32 field_0x13e8;
+ /* 0x13EC */ u32 field_0x13ec;
+ /* 0x13F0 */ u32 field_0x13f0;
+ /* 0x13F4 */ u32 field_0x13f4;
+ /* 0x13F8 */ u32 field_0x13f8;
+ /* 0x13FC */ u32 field_0x13fc;
+ /* 0x1400 */ u32 field_0x1400;
+ /* 0x1404 */ u32 field_0x1404;
+ /* 0x1408 */ u32 field_0x1408;
+ /* 0x140C */ u32 field_0x140c;
+ /* 0x1410 */ u32 field_0x1410;
+ /* 0x1414 */ u32 field_0x1414;
+ /* 0x1418 */ u32 field_0x1418;
+ /* 0x141C */ u32 field_0x141c;
+ /* 0x1420 */ u32 field_0x1420[3];
+ /* 0x142C */ u8 field_0x142c;
+ /* 0x142D */ u8 field_0x142d;
+ /* 0x142E */ u8 field_0x142e;
+ /* 0x142F */ s8 field_0x142f;
+ /* 0x1430 */ s8 field_0x1430;
/* 0x1432 */ s16 field_0x1432;
- /* 0x1434 */ u8 field_0x1434[0x250];
+ /* 0x1434 */ u32 field_0x1434; // Some actor ID
+ /* 0x1438 */ cXyz field_0x1438;
+ /* 0x1444 */ cXyz field_0x1444;
+ /* 0x1450 */ u8 field_0x1450[0x15d0 - 0x1450];
+ /* 0x15D0 */ mDoExt_3DlineMat1_c field_0x15d0;
+ /* 0x160C */ mDoExt_3DlineMat1_c field_0x160c;
+ /* 0x1648 */ mDoExt_3DlineMat1_c field_0x1648;
/* 0x1684 */ f32 field_0x1684;
- /* 0x1688 */ u8 field_0x1688[0x16];
+ /* 0x1688 */ u8 field_0x1688;
+ /* 0x168A */ u16 field_0x168a;
+ /* 0x168C */ f32 field_0x168c;
+ /* 0x1690 */ f32 field_0x1690;
+ /* 0x1694 */ u8 field_0x1694[0x169e - 0x1694];
/* 0x169E */ s16 field_0x169e;
+ /* 0x16A0 */ s16 field_0x16a0;
+ /* 0x16A4 */ cXyz field_0x16a4;
+ /* 0x16B0 */ cXyz field_0x16b0;
+ /* 0x16BC */ cXyz field_0x16bc;
+ /* 0x16C8 */ cXyz field_0x16c8;
+ /* 0x16D4 */ cXyz field_0x16d4;
+ /* 0x16E0 */ cXyz field_0x16e0;
+ /* 0x16EC */ cXyz field_0x16ec;
+ /* 0x16F8 */ cXyz field_0x16f8;
+ /* 0x1704 */ s16 field_0x1704;
+ /* 0x1708 */ f32 field_0x1708;
+ /* 0x170C */ f32 field_0x170c;
+ /* 0x1710 */ f32 field_0x1710;
+ /* 0x1714 */ f32 field_0x1714;
+ /* 0x1718 */ f32 field_0x1718;
+ /* 0x171C */ u8 field_0x171c[0x1720 - 0x171c];
+ /* 0x1720 */ s8 field_0x1720;
+ /* 0x1721 */ s8 field_0x1721;
+ /* 0x1722 */ s8 field_0x1722;
+ /* 0x1723 */ u8 field_0x1723[0x17c4 - 0x1723];
+ /* 0x17C4 */ u32 field_0x17c4;
+ /* 0x17D0 */ u32 field_0x17d0[4];
+ /* 0x17E0 */ u8 field_0x17e0;
+ /* 0x17E1 */ u8 field_0x17e1;
+ /* 0x17E2 */ s16 mWaitRollAngle;
+ /* 0x17E4 */ u8 field_0x17e4[0x17e8 - 0x17e4];
+ /* 0x17E8 */ f32 mSpeedRate;
};
#endif /* D_A_E_WB_H */
diff --git a/include/rel/d/a/e/d_a_e_yc/d_a_e_yc.h b/include/rel/d/a/e/d_a_e_yc/d_a_e_yc.h
index 46761aaa2e..78d5363285 100644
--- a/include/rel/d/a/e/d_a_e_yc/d_a_e_yc.h
+++ b/include/rel/d/a/e/d_a_e_yc/d_a_e_yc.h
@@ -2,5 +2,140 @@
#define D_A_E_YC_H
#include "dolphin/types.h"
+#include "f_op/f_op_actor.h"
+#include "Z2AudioLib/Z2Creature.h"
+#include "d/com/d_com_inf_game.h"
+// #include "d/bg/d_bg_s_acch.h"
+// #include "d/cc/d_cc_d.h"
+
+// struct dCcD_GStts {
+// /* 80083760 */ dCcD_GStts();
+// /* 80083830 */ void Move();
+// };
+
+// struct dCcD_Stts {
+// /* 80083860 */ void Init(int, int, fopAc_ac_c*);
+// };
+
+// struct dCcD_SrcSph {};
+
+// struct dCcD_Sph {
+// /* 80084A34 */ void Set(dCcD_SrcSph const&);
+// };
+
+// struct cCcD_Obj {};
+
+// struct dCcD_GObjInf {
+// /* 80083A28 */ dCcD_GObjInf();
+// /* 80084460 */ int ChkTgHit();
+// /* 800844F8 */ cCcD_Obj* GetTgHitObj();
+// };
+
+// struct dBgS_PolyPassChk {
+// /* 80078E68 */ void SetObj();
+// };
+
+// struct dBgS_ObjAcch {
+// /* 807F274C */ ~dBgS_ObjAcch();
+// };
+
+// struct dBgS_AcchCir {
+// /* 80075EAC */ dBgS_AcchCir();
+// /* 80075F58 */ void SetWall(f32, f32);
+// };
+
+// struct dBgS {};
+
+// struct dBgS_Acch {
+// /* 80075F94 */ ~dBgS_Acch();
+// /* 800760A0 */ dBgS_Acch();
+// /* 80076248 */ void Set(cXyz*, cXyz*, fopAc_ac_c*, int, dBgS_AcchCir*, cXyz*, csXyz*, csXyz*);
+// /* 80076AAC */ void CrrPos(dBgS&);
+// };
+
+// struct cM3dGSph {
+// /* 8026F648 */ void SetC(cXyz const&);
+// /* 8026F708 */ void SetR(f32);
+// /* 807F26BC */ ~cM3dGSph();
+// };
+
+// struct cM3dGAab {
+// /* 807F2704 */ ~cM3dGAab();
+// };
+
+// struct cCcS {
+// /* 80264BA8 */ void Set(cCcD_Obj*);
+// };
+
+// struct request_of_phase_process_class {};
+
+// struct mDoMtx_stack_c {
+// /* 8000CE38 */ void scaleM(f32, f32, f32);
+
+// static u8 now[48];
+// };
+
+struct daE_YC_HIO_c {
+ /* 807EFECC */ daE_YC_HIO_c();
+ /* 807F27BC */ ~daE_YC_HIO_c();
+};
+
+// struct dVibration_c {
+// /* 8006FA24 */ void StartShock(int, int, cXyz);
+// };
+
+// struct dPa_levelEcallBack {};
+
+// struct dPa_control_c {
+// struct level_c {
+// /* 8004B918 */ void getEmitter(u32);
+// };
+
+// /* 8004C218 */ void setHitMark(u16, fopAc_ac_c*, cXyz const*, csXyz const*, cXyz const*, u32);
+// /* 8004D4CC */ void set(u32, u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*,
+// cXyz const*, u8, dPa_levelEcallBack*, s8, _GXColor const*,
+// _GXColor const*, cXyz const*, f32);
+// /* 8004CA90 */ void set(u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*, cXyz const*,
+// u8, dPa_levelEcallBack*, s8, _GXColor const*, _GXColor const*,
+// cXyz const*, f32);
+// };
+
+class e_yc_class : public fopAc_ac_c {
+public:
+ /* 0x568 */ u8 field_0x568[80];
+ /* 0x5B8 */ int field_0x5B8;
+ /* 0x5BC */ Z2CreatureEnemy mEnemy;
+ /* 0x660 */ int mAnm;
+ /* 0x664 */ int field_0x664;
+ /* 0x668 */ u8 field_0x668[6];
+ /* 0x66E */ s16 mCurrentAction;
+ /* 0x670 */ s16 field_0x670;
+ /* 0x672 */ u8 field_0x672[2];
+ /* 0x674 */ f32 field_0x674;
+ /* 0x678 */ f32 field_0x678;
+ /* 0x67C */ f32 field_0x67C;
+ /* 0x680 */ s16 field_0x680;
+ /* 0x682 */ u8 field_0x682[2];
+ /* 0x684 */ f32 field_0x684;
+ /* 0x688 */ u32 field_0x688;
+ /* 0x68C */ u8 field_0x68C[4];
+ /* 0x690 */ f32 field_0x690;
+ /* 0x694 */ u8 field_0x694[28];
+ /* 0x69C */ f32 field_0x69C;
+ /* 0x6A0 */ s16 field_0x6A0;
+ /* 0x6A2 */ s16 field_0x6A2;
+ /* 0x6A4 */ s16 field_0x6A4;
+ /* 0x6A6 */ s16 field_0x6A6;
+ /* 0x6A8 */ s16 field_0x6A8;
+ /* 0x6AA */ s16 field_0x6AA;
+ /* 0x6AC */ void* field_0x6AC;
+ /* 0x6B0 */ u8 field_0x6B0[72];
+ /* 0x6F4 */ dBgS_Acch mBgS_Acch;
+ /* 0x8CC */ u8 field_0x8CC[28];
+ /* 0x8E8 */ dCcD_GStts mCcD_GStts;
+ /* 0x908 */ dCcD_GObjInf mCcD_GObjInf;
+ /* 0xA0C */ u8 field_0xA0C[364];
+ /* 0xB78 */ cCcD_Obj* mpTgHitObj;
+};
#endif /* D_A_E_YC_H */
diff --git a/include/rel/d/a/kytag/d_a_kytag14/d_a_kytag14.h b/include/rel/d/a/kytag/d_a_kytag14/d_a_kytag14.h
index 0be29bb18c..84b6ffaa30 100644
--- a/include/rel/d/a/kytag/d_a_kytag14/d_a_kytag14.h
+++ b/include/rel/d/a/kytag/d_a_kytag14/d_a_kytag14.h
@@ -1,6 +1,17 @@
#ifndef D_A_KYTAG14_H
#define D_A_KYTAG14_H
-#include "dolphin/types.h"
+#include "f_op/f_op_actor.h"
+
+class kytag14_class : public fopAc_ac_c {
+public:
+ /* 0x568 */ s8 mSaveRoomNo;
+ /* 0x569 */ u8 mSavePoint;
+ /* 0x56A */ u16 mEventID1;
+ /* 0x56C */ u16 mEventID2;
+ /* 0x56E */ u8 mSwitchNo1;
+ /* 0x56F */ u8 mSwitchNo2;
+};
+
#endif /* D_A_KYTAG14_H */
diff --git a/include/rel/d/a/tag/d_a_tag_gstart/d_a_tag_gstart.h b/include/rel/d/a/tag/d_a_tag_gstart/d_a_tag_gstart.h
index e698f6908a..6600a090b5 100644
--- a/include/rel/d/a/tag/d_a_tag_gstart/d_a_tag_gstart.h
+++ b/include/rel/d/a/tag/d_a_tag_gstart/d_a_tag_gstart.h
@@ -1,6 +1,18 @@
#ifndef D_A_TAG_GSTART_H
#define D_A_TAG_GSTART_H
-#include "dolphin/types.h"
+#include "f_op/f_op_actor.h"
+
+class daTagGstart_c : public fopAc_ac_c {
+public:
+ /* 805A3478 */ int create();
+ /* 805A3514 */ ~daTagGstart_c();
+ /* 805A3590 */ int execute();
+
+ /* 0x568 */ u8 mSwNo;
+ /* 0x569 */ u8 mSwNo2;
+ /* 0x56A */ u8 field_0x56a;
+ /* 0x56B */ u8 mType;
+};
#endif /* D_A_TAG_GSTART_H */
diff --git a/include/rel/d/a/tag/d_a_tag_hstop/d_a_tag_hstop.h b/include/rel/d/a/tag/d_a_tag_hstop/d_a_tag_hstop.h
index 2dd21960c8..0e13a0c6f3 100644
--- a/include/rel/d/a/tag/d_a_tag_hstop/d_a_tag_hstop.h
+++ b/include/rel/d/a/tag/d_a_tag_hstop/d_a_tag_hstop.h
@@ -1,6 +1,26 @@
#ifndef D_A_TAG_HSTOP_H
#define D_A_TAG_HSTOP_H
-#include "dolphin/types.h"
+#include "f_op/f_op_actor.h"
+#include "d/msg/d_msg_flow.h"
+
+class daTagHstop_c : public fopAc_ac_c {
+public:
+ /* 805A43EC */ int create();
+ /* 805A45F8 */ ~daTagHstop_c();
+ /* 805A46B8 */ void setActive();
+ /* 805A475C */ int execute();
+
+ static daTagHstop_c* m_top;
+ static dMsgFlow_c m_msgFlow;
+
+ /* 0x568 */ daTagHstop_c* mNext;
+ /* 0x568 */ daTagHstop_c* mPrev;
+ /* 0x570 */ u8 mPrm0;
+ /* 0x571 */ bool mActive;
+ /* 0x572 */ u8 mPrm1;
+ /* 0x573 */ u8 field_0x573;
+ /* 0x574 */ int field_0x574;
+};
#endif /* D_A_TAG_HSTOP_H */
diff --git a/include/rel/d/a/tag/d_a_tag_instruction/d_a_tag_instruction.h b/include/rel/d/a/tag/d_a_tag_instruction/d_a_tag_instruction.h
index 5e28eadbf0..37637780d9 100644
--- a/include/rel/d/a/tag/d_a_tag_instruction/d_a_tag_instruction.h
+++ b/include/rel/d/a/tag/d_a_tag_instruction/d_a_tag_instruction.h
@@ -1,6 +1,8 @@
#ifndef D_A_TAG_INSTRUCTION_H
#define D_A_TAG_INSTRUCTION_H
-#include "dolphin/types.h"
+#include "f_op/f_op_actor_mng.h"
+
+class daTagInst_c : public fopAc_ac_c {};
#endif /* D_A_TAG_INSTRUCTION_H */