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
This commit is contained in:
Pheenoh
2022-10-15 15:32:34 -06:00
parent 84950e08b4
commit 85ad8b190d
880 changed files with 23183 additions and 38749 deletions
@@ -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; }
+3 -1
View File
@@ -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;
@@ -34,6 +34,7 @@ public:
u16 getWEvlpMtxNum() const { return mWEvlpMtxNum; }
u16 getJointNum() const { return mJointNum; }
u16 getDrawMtxNum() const { return mDrawMtxData.mEntryNum; }
JUTNameTab* getJointName() const { return mJointName; }
J3DJoint* getRootNode() { return mRootNode; }
J3DJoint* getJointNodePointer(u16 idx) const { return mJointNodePointer[idx]; }
J3DMtxCalc* getBasicMtxCalc() const { return mBasicMtxCalc; }
@@ -33,6 +33,7 @@ public:
J3DShape* getShapeNodePointer(u16 idx) const { return mShapeTable.getShapeNodePointer(idx); }
J3DJoint* getJointNodePointer(u16 idx) const { return mJointTree.getJointNodePointer(idx); }
J3DJointTree& getJointTree() { return mJointTree; }
JUTNameTab* getJointName() const { return mJointTree.getJointName(); }
Mtx& getInvJointMtx(s32 idx) const { return mJointTree.getInvJointMtx(idx); }
J3DTexture* getTexture() const { return mMaterialTable.getTexture(); }
JUTNameTab* getTextureName() const { return mMaterialTable.getTextureName(); }
+27 -12
View File
@@ -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 */
+12 -8
View File
@@ -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
+16
View File
@@ -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;
+32 -4
View File
@@ -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 */
+3
View File
@@ -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; }
+4 -3
View File
@@ -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;
-4
View File
@@ -94,8 +94,4 @@ struct VertexNormal {
Vec data;
};
struct VertexPosition {
Vec data;
};
#endif /* J3DVERTEX_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 */
@@ -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 */
+1
View File
@@ -2,6 +2,7 @@
#define J3DUCLIPPER_H
#include "dolphin/mtx/vec.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
class J3DUClipper {
+26
View File
@@ -19,6 +19,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;
@@ -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>
@@ -9,7 +9,9 @@
namespace JStudio {
namespace data {
struct TEOperationData {};
enum TEOperationData {
UNK_0x19 = 0x19,
};
};
struct TAdaptor;
@@ -50,6 +52,26 @@ public:
/* 8028680C */ virtual void do_wait(u32);
/* 8028682C */ virtual void do_data(void const*, u32, void const*, u32);
void prepareAdaptor() {
if (mpAdaptor != NULL) {
// mpAdaptor->adaptor_setObject_(this);
// mpAdaptor->adaptor_do_begin();
}
}
template<class T>
T* createFromAdaptor(const stb::data::TParse_TBlock_object& param_0, T* param_1) {
T* n = new T(param_0, param_1);
if (n == NULL) {
return NULL;
}
n->prepareAdaptor();
return n;
}
/* 0x34 */ TAdaptor* mpAdaptor;
};
@@ -86,7 +108,11 @@ struct TAdaptor {
/* 80286648 */ void adaptor_setVariableValue_FVR_INDEX_(JStudio::TAdaptor*, JStudio::TControl*,
u32, void const*, u32);
/* 0x4 */ TObject* pObject_;
void adaptor_setObject_(const TObject* pObject) {
pObject_ = pObject;
}
/* 0x4 */ const TObject* pObject_;
/* 0x8 */ TVariableValue* pValue_;
/* 0xC */ u32 u;
};
@@ -73,7 +73,7 @@ struct TParse_TParagraph_data : public TParseData_aligned<4> {
};
TParse_TParagraph_data(const void* content) : TParseData_aligned<4>(content) {}
/* 80289A80 */ void getData(TData*) const;
/* 80289A80 */ void getData(TData* pData) const;
};
// Parses a TObject ("demo object")
+40
View File
@@ -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
+1 -1
View File
@@ -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);
+5
View File
@@ -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 */
+18 -2
View File
@@ -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 */
+2
View File
@@ -3,4 +3,6 @@
#include "dolphin/types.h"
typedef unsigned short wchar_t;
#endif /* MSL_COMMON_SRC_WCHAR_IO_H */
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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
+8 -1
View File
@@ -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 */
+1
View File
@@ -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
+11 -4
View File
@@ -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 */
+4
View File
@@ -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
+6 -6
View File
@@ -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));
+12 -4
View File
@@ -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
+3 -3
View File
@@ -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); }
+3
View File
@@ -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
+12
View File
@@ -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 */
+18
View File
@@ -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) {
@@ -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 */
@@ -3,4 +3,6 @@
#include "dolphin/types.h"
void TRKNubMainLoop(void);
#endif /* METROTRK_PORTABLE_MAINLOOP_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 */
@@ -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 */
@@ -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 */
@@ -3,4 +3,8 @@
#include "dolphin/types.h"
void TRKNubWelcome(void);
s32 TRKTerminateNub(void);
s32 TRKInitializeNub(void);
#endif /* METROTRK_PORTABLE_NUBINIT_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 */
@@ -3,4 +3,7 @@
#include "dolphin/types.h"
void TRKSwapAndGo();
void TRKTargetSetStopped(s32);
#endif /* PPC_GENERIC_TARGIMPL_H */
@@ -3,4 +3,6 @@
#include "dolphin/types.h"
void MWTRACE(u8, char*, ...);
#endif /* UTILS_COMMON_MWTRACE_H */
+11 -11
View File
@@ -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;
+699 -288
View File
File diff suppressed because it is too large Load Diff
+380 -33
View File
@@ -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 */
+106 -44
View File
@@ -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,
HEAVY_STATE_BOOTS = FLG0_UNK_40000000 | EQUIP_HEAVY_BOOTS | FLG0_UNK_20000,
FLG0_HVY_STATE = FLG0_UNK_40000000 | FLG0_EQUIP_HVY_BOOTS | FLG0_UNK_20000,
};
enum daPy_FLG1 { IS_WOLF = 0x2000000, FLG1_UNK_10000 = 0x10000, THROW_DAMAGE = 0x4000, FLG1_UNK_4 = 4, };
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_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();
+47
View File
@@ -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;
};
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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&);
+2 -1
View File
@@ -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; }
+11 -11
View File
@@ -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 */
+127 -63
View File
@@ -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();
};
/* 0x14 vtable */
}; // Size: 0x18
class cBgW_RwgElm {
private:
/* 0x0 */ u8 field_0x0[4];
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;
+15 -15
View File
@@ -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;
+57 -35
View File
@@ -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;
};
+17 -1
View File
@@ -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 */
+112 -14
View File
@@ -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();
}
+23 -7
View File
@@ -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 */
+86 -77
View File
@@ -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:
/* 80070110 */ virtual ~dAttParam_c();
/* 0x38 vtable */
dAttParam_c() {}
/* 80070038 */ dAttParam_c(s32);
private:
/* 0x3C */ f32 mSelCursorAnmSpeed;
/* 0x40 */ f32 mAttnCursorAnmSpeed;
/* 0x44 */ u32 mDispPosX;
/* 0x48 */ u32 mDispPosY;
}; // Size = 0x4C
/* 80070110 */ virtual ~dAttParam_c();
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);
+24 -4
View File
@@ -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;
+4
View File
@@ -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(); }
+5 -3
View File
@@ -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 */
+7 -3
View File
@@ -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 */
+4 -3
View File
@@ -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;
+3 -1
View File
@@ -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; }
+10
View File
@@ -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();
+5 -1
View File
@@ -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);
}
+17 -6
View File
@@ -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;
+7 -1
View File
@@ -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 */
+11 -5
View File
@@ -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 */
+8
View File
@@ -3,4 +3,12 @@
#include "dolphin/types.h"
union FpscrUnion {
f64 f;
struct {
u32 fpscr_pad;
u32 fpscr;
} u;
};
#endif /* PPCARCH_H */
+52 -36
View File
@@ -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 */
+12 -5
View File
@@ -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 */
+6 -1
View File
@@ -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 */
+29 -218
View File
@@ -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);
typedef union {
u8 u8;
u16 u16;
u32 u32;
u64 u64;
s8 s8;
s16 s16;
s32 s32;
s64 s64;
f32 f32;
f64 f64;
} PPCWGPipe;
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);
volatile PPCWGPipe GXFIFO : 0xCC008000;
#define GFX_FIFO(T) (*(volatile T*)0xCC008000)
+34 -1
View File
@@ -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 */
+19 -1
View File
@@ -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 */
+6
View File
@@ -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 */
+36 -6
View File
@@ -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 */
+33 -1
View File
@@ -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 */
+26 -1
View File
@@ -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 */
+20 -1
View File
@@ -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 */
+113 -1
View File
@@ -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 */
+22 -1
View File
@@ -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 */
+33 -1
View File
@@ -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 */
+12
View File
@@ -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 */
+23 -1
View File
@@ -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 */
+15 -2
View File
@@ -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 {
+32 -1
View File
@@ -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 */
+44 -1
View File
@@ -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 */
+27 -1
View File
@@ -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 */
+11 -11
View File
@@ -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 */
+8 -2
View File
@@ -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 */
+11 -7
View File
@@ -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 */
+12 -7
View File
@@ -2,16 +2,21 @@
#define QUAT_H
#include "dolphin/mtx/vec.h"
#include "dolphin/types.h"
struct Quaternion {
f32 x, y, z, w;
};
#ifdef __cplusplus
extern "C" {
void PSQUATMultiply(const Quaternion* src_a, const Quaternion* src_b, Quaternion* dst);
#endif
typedef struct Quaternion {
f32 x, y, z, w;
} Quaternion;
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 */
+12 -34
View File
@@ -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 */
+31 -5
View File
@@ -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;
+4 -4
View File
@@ -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
+26 -3
View File
@@ -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);
+6 -5
View File
@@ -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);

Some files were not shown because too many files have changed in this diff Show More