mirror of
https://github.com/zeldaret/tp
synced 2026-06-20 08:13:23 -04:00
move d_a_alink and some related stuff (#130)
* clean up d_a_player * move some of daalink * more daalink / daplayer * setup some daalink members * rest of daalink members setup * remove comment * few more matches * remove asm * more matches * more matches + move e_wb_class * fix some d_save classes Co-authored-by: lepelog <lepelog@users.noreply.github.com>
This commit is contained in:
@@ -7,11 +7,11 @@
|
||||
class J3DFrameCtrl {
|
||||
public:
|
||||
void init(s16);
|
||||
void checkPass(f32);
|
||||
BOOL checkPass(f32);
|
||||
void update();
|
||||
~J3DFrameCtrl();
|
||||
|
||||
float getRate() { return mRate; }
|
||||
float getRate() const { return mRate; }
|
||||
void setAttribute(u8 pAttr) { mAttribute = pAttr; }
|
||||
void setEnd(s16 pEnd) { mEnd = pEnd; }
|
||||
void setRate(float pRate) { mRate = pRate; }
|
||||
|
||||
@@ -1,6 +1,93 @@
|
||||
#ifndef J3DMODEL_H
|
||||
#define J3DMODEL_H
|
||||
|
||||
#include "JSystem/J3DGraphAnimator/J3DModelData.h"
|
||||
#include "dolphin/mtx/mtxvec.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class J3DModel;
|
||||
struct J3DSkinDeform {
|
||||
/* 8032C9B0 */ void initSkinInfo(J3DModelData*);
|
||||
/* 8032CF44 */ void initMtxIndexArray(J3DModelData*);
|
||||
/* 8032D378 */ void changeFastSkinDL(J3DModelData*);
|
||||
/* 8032D738 */ void transformVtxPosNrm(J3DModelData*);
|
||||
/* 8032DFDC */ void deform(J3DModel*);
|
||||
};
|
||||
|
||||
struct J3DDeformData {
|
||||
/* 8032E230 */ void offAllFlag(u32);
|
||||
/* 8032E274 */ void deform(J3DModel*);
|
||||
};
|
||||
|
||||
class J3DMtxBuffer {
|
||||
public:
|
||||
/* 80326214 */ void initialize();
|
||||
/* 80326258 */ void create(J3DModelData*, u32);
|
||||
/* 803268D4 */ void calcWeightEnvelopeMtx();
|
||||
/* 80326ACC */ void calcDrawMtx(u32, Vec const&, f32 const (&)[3][4]);
|
||||
/* 80326D3C */ void calcNrmMtx();
|
||||
/* 80326EF0 */ void calcBBoardMtx();
|
||||
/* 803283B4 */ ~J3DMtxBuffer();
|
||||
|
||||
Mtx* getAnmMtx(int p1) {
|
||||
Mtx* tmp = mMatrices[0];
|
||||
return tmp + (p1);
|
||||
}
|
||||
|
||||
/* 0x00 */ void* mJointTree;
|
||||
/* 0x04 */ u32 field_0x4;
|
||||
/* 0x08 */ u32 field_0x8;
|
||||
/* 0x0C */ Mtx* mMatrices[5];
|
||||
};
|
||||
|
||||
class J3DModel {
|
||||
public:
|
||||
/* 800CFFF4 */ void setBaseTRMtx(f32 (*)[4]);
|
||||
/* 80327100 */ void initialize();
|
||||
/* 80327184 */ void entryModelData(J3DModelData*, u32, u32);
|
||||
/* 80327300 */ void createShapePacket(J3DModelData*);
|
||||
/* 803273CC */ void createMatPacket(J3DModelData*, u32);
|
||||
/* 803275FC */ void newDifferedDisplayList(u32);
|
||||
/* 8032767C */ void lock();
|
||||
/* 803276B4 */ void unlock();
|
||||
/* 803276EC */ void calcMaterial();
|
||||
/* 80327858 */ void calcDiffTexMtx();
|
||||
/* 803279A0 */ void diff();
|
||||
/* 80327A2C */ void setDeformData(J3DDeformData*, u32);
|
||||
/* 80327AA0 */ void setSkinDeform(J3DSkinDeform*, u32);
|
||||
/* 80327BD4 */ void calcAnmMtx();
|
||||
/* 80327C58 */ void calcWeightEnvelopeMtx();
|
||||
/* 80327CA4 */ void update();
|
||||
/* 80327CF0 */ void calc();
|
||||
/* 80327E4C */ void entry();
|
||||
/* 80327F40 */ void viewCalc();
|
||||
/* 80328190 */ void calcNrmMtx();
|
||||
/* 803281B4 */ void calcBumpMtx();
|
||||
/* 803282B8 */ void calcBBoardMtx();
|
||||
/* 803282EC */ void prepareShapePackets();
|
||||
/* 80328350 */ ~J3DModel();
|
||||
Mtx* getAnmMtx(int p1);
|
||||
|
||||
// better way to handle inlines with same name as non-inlines?
|
||||
Mtx* i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); }
|
||||
|
||||
/* 0x00 */ void* vtable;
|
||||
/* 0x04 */ J3DModelData* mModelData;
|
||||
/* 0x08 */ u32 mFlags;
|
||||
/* 0x0C */ u32 field_0x0c;
|
||||
/* 0x10 */ int field_0x10;
|
||||
/* 0x14 */ int mUserData;
|
||||
/* 0x18 */ Vec mPosition;
|
||||
/* 0x24 */ Mtx mBaseTransformMtx;
|
||||
/* 0x54 */ Mtx mInternalView;
|
||||
/* 0x84 */ J3DMtxBuffer* mMtxBuffer;
|
||||
/* 0x88 */ void* mVertexBuffer;
|
||||
/* 0xC0 */ void* mMaterialPacket;
|
||||
/* 0xC4 */ void* mShapePacket;
|
||||
/* 0xC8 */ void* mDeformData;
|
||||
/* 0xCC */ void* mSkinDeform;
|
||||
/* 0xD0 */ void* mVtxColorCalc;
|
||||
/* 0xD4 */ u8 field_0xd4[8];
|
||||
};
|
||||
|
||||
#endif /* J3DMODEL_H */
|
||||
|
||||
@@ -3,4 +3,16 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class J3DModelData {
|
||||
/* 80325D88 */ void clear();
|
||||
/* 80325DA0 */ J3DModelData();
|
||||
/* 80325E14 */ void newSharedDisplayList(u32);
|
||||
/* 80325EC8 */ void indexToPtr();
|
||||
/* 80325F94 */ void makeSharedDL();
|
||||
/* 8032600C */ void simpleCalcMaterial(u16, f32 (*)[4]);
|
||||
/* 803260CC */ void syncJ3DSysPointers() const;
|
||||
/* 803260F8 */ void syncJ3DSysFlags() const;
|
||||
/* 8032617C */ ~J3DModelData();
|
||||
};
|
||||
|
||||
#endif /* J3DMODELDATA_H */
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
#ifndef J3DMATBLOCK_H
|
||||
#define J3DMATBLOCK_H
|
||||
|
||||
#include "dolphin/gx/GXTexture.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class J3DGXColorS10 {
|
||||
public:
|
||||
/* 8000E460 */ J3DGXColorS10();
|
||||
|
||||
_GXColorS10 mColor;
|
||||
};
|
||||
|
||||
#endif /* J3DMATBLOCK_H */
|
||||
|
||||
@@ -51,9 +51,10 @@ public:
|
||||
virtual ~J3DPacket();
|
||||
|
||||
public:
|
||||
J3DPacket* mpNextSibling;
|
||||
J3DPacket* mpFirstChild;
|
||||
};
|
||||
/* 0x04 */ J3DPacket* mpNextSibling;
|
||||
/* 0x08 */ J3DPacket* mpFirstChild;
|
||||
/* 0x0C */ void* mpUserData;
|
||||
}; // Size = 0x10
|
||||
|
||||
class J3DDrawPacket : public J3DPacket {
|
||||
public:
|
||||
@@ -64,7 +65,6 @@ public:
|
||||
virtual void draw();
|
||||
|
||||
public:
|
||||
void* mpUserData;
|
||||
int mFlags;
|
||||
char mPad0[0x0C]; // unk
|
||||
J3DDisplayListObj* mpDisplayListObj;
|
||||
|
||||
@@ -1,6 +1,170 @@
|
||||
#ifndef JAISOUND_H
|
||||
#define JAISOUND_H
|
||||
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "global.h"
|
||||
|
||||
class JAISoundID {
|
||||
public:
|
||||
operator u32() const { return this->mId; }
|
||||
|
||||
JAISoundID(u32 pId) : mId(pId) {}
|
||||
|
||||
JAISoundID(JAISoundID const& other);
|
||||
|
||||
private:
|
||||
u32 mId;
|
||||
};
|
||||
|
||||
struct JASSoundParams {};
|
||||
|
||||
struct JAISoundParams {
|
||||
/* 802A2280 */ void mixOutAll(JASSoundParams const&, JASSoundParams*, f32);
|
||||
|
||||
float field_0x0;
|
||||
float field_0x4;
|
||||
float field_0x8;
|
||||
float field_0xc;
|
||||
float field_0x10;
|
||||
float field_0x14;
|
||||
float field_0x18;
|
||||
float field_0x1c;
|
||||
};
|
||||
|
||||
struct JASTrack {
|
||||
/* 80291444 */ void setChannelMgrCount(u32);
|
||||
/* 802919F4 */ void assignExtBuffer(u32, JASSoundParams*);
|
||||
/* 80291C30 */ void openChild(u32);
|
||||
/* 80292918 */ void writePort(u32, u16);
|
||||
/* 8029297C */ void readPort(u32);
|
||||
};
|
||||
|
||||
class JAISoundHandle;
|
||||
class JAIAudible;
|
||||
class JAIAudience;
|
||||
class JAISound {
|
||||
public:
|
||||
/* 802A21A0 */ void releaseHandle();
|
||||
/* 802A21BC */ void attachHandle(JAISoundHandle*);
|
||||
/* 802A22F8 */ JAISound();
|
||||
/* 802A2328 */ void start_JAISound_(JAISoundID, JGeometry::TVec3<f32> const*, JAIAudience*);
|
||||
/* 802A244C */ void acceptsNewAudible() const;
|
||||
/* 802A2474 */ void newAudible(JGeometry::TVec3<f32> const&, JGeometry::TVec3<f32> const*, u32,
|
||||
JAIAudience*);
|
||||
/* 802A2598 */ void stop();
|
||||
/* 802A24DC */ void stop(u32 fadeout);
|
||||
/* 802A25D8 */ bool asSe();
|
||||
/* 802A25E0 */ bool asSeq();
|
||||
/* 802A25E8 */ bool asStream();
|
||||
/* 802A25F0 */ void die_JAISound_();
|
||||
/* 802A266C */ void increasePrepareCount_JAISound_();
|
||||
/* 802A26B8 */ void calc_JAISound_();
|
||||
/* 802A29DC */ void initTrack_JAISound_(JASTrack*);
|
||||
|
||||
JAISoundID getID() const { return JAISoundID((u32)this->sound_id); }
|
||||
u32 getUserData() const { return user_data; }
|
||||
|
||||
// TODO: do proper struct later
|
||||
void* __vt;
|
||||
struct JAISoundHandle* handle;
|
||||
struct JAIAudible* audible;
|
||||
struct JAIAudience* audience;
|
||||
s32 field_0xc;
|
||||
s32 num_prepare_steps;
|
||||
struct JAISoundID sound_id;
|
||||
u8 field_0x18;
|
||||
u8 field_0x19;
|
||||
u8 field_0x1a;
|
||||
u8 field_0x1b;
|
||||
u32 user_data;
|
||||
float field_0x20;
|
||||
float field_0x24;
|
||||
float field_0x28;
|
||||
s32 field_0x2c;
|
||||
s32 audience_priority;
|
||||
s32 field_0x34;
|
||||
struct JAISoundParams params;
|
||||
u8 field_0x58;
|
||||
u8 field_0x59;
|
||||
u8 field_0x5a;
|
||||
u8 field_0x5b;
|
||||
u8 field_0x5c;
|
||||
u8 field_0x5d;
|
||||
u8 field_0x5e;
|
||||
u8 field_0x5f;
|
||||
u8 field_0x60;
|
||||
u8 field_0x61;
|
||||
u8 field_0x62;
|
||||
u8 field_0x63;
|
||||
u8 field_0x64;
|
||||
u8 field_0x65;
|
||||
u8 field_0x66;
|
||||
u8 field_0x67;
|
||||
u8 field_0x68;
|
||||
u8 field_0x69;
|
||||
u8 field_0x6a;
|
||||
u8 field_0x6b;
|
||||
u8 field_0x6c;
|
||||
u8 field_0x6d;
|
||||
u8 field_0x6e;
|
||||
u8 field_0x6f;
|
||||
u8 field_0x70;
|
||||
u8 field_0x71;
|
||||
u8 field_0x72;
|
||||
u8 field_0x73;
|
||||
u8 field_0x74;
|
||||
u8 field_0x75;
|
||||
u8 field_0x76;
|
||||
u8 field_0x77;
|
||||
u8 field_0x78;
|
||||
u8 field_0x79;
|
||||
u8 field_0x7a;
|
||||
u8 field_0x7b;
|
||||
u8 field_0x7c;
|
||||
u8 field_0x7d;
|
||||
u8 field_0x7e;
|
||||
u8 field_0x7f;
|
||||
u8 field_0x80;
|
||||
u8 field_0x81;
|
||||
u8 field_0x82;
|
||||
u8 field_0x83;
|
||||
u8 field_0x84;
|
||||
u8 field_0x85;
|
||||
u8 field_0x86;
|
||||
u8 field_0x87;
|
||||
u8 field_0x88;
|
||||
u8 field_0x89;
|
||||
u8 field_0x8a;
|
||||
u8 field_0x8b;
|
||||
u8 field_0x8c;
|
||||
u8 field_0x8d;
|
||||
u8 field_0x8e;
|
||||
u8 field_0x8f;
|
||||
u8 field_0x90;
|
||||
u8 field_0x91;
|
||||
u8 field_0x92;
|
||||
u8 field_0x93;
|
||||
};
|
||||
|
||||
class JAISoundHandle {
|
||||
public:
|
||||
JAISoundHandle(); // noninline in JAUClusterSound.cpp
|
||||
~JAISoundHandle();
|
||||
|
||||
bool isSoundAttached() const { return mSound != NULL; }
|
||||
|
||||
JAISound* operator->() const {
|
||||
JUT_ASSERT(mSound != NULL);
|
||||
return mSound;
|
||||
}
|
||||
|
||||
operator bool() const { return isSoundAttached(); }
|
||||
|
||||
void releaseSound();
|
||||
|
||||
private:
|
||||
JAISound* mSound;
|
||||
};
|
||||
|
||||
#endif /* JAISOUND_H */
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef JGEOMETRY_H
|
||||
#define JGEOMETRY_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JGeometry {
|
||||
|
||||
template <typename T>
|
||||
struct TVec3 {
|
||||
T x;
|
||||
T y;
|
||||
T z;
|
||||
};
|
||||
/*
|
||||
template <>
|
||||
struct TVec3<f32> {
|
||||
TVec3(Vec& v) {
|
||||
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
} // namespace JGeometry
|
||||
|
||||
#endif
|
||||
@@ -3,4 +3,23 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class JPABaseParticle;
|
||||
struct _GXTexMapID {};
|
||||
|
||||
struct JPABaseEmitter {
|
||||
/* 8027EB60 */ void createChild(JPABaseParticle*);
|
||||
/* 8027EA40 */ void createParticle();
|
||||
/* 8027EF30 */ void getCurrentCreateNumber() const;
|
||||
/* 8027EF40 */ void getDrawCount() const;
|
||||
/* 8027EF50 */ void loadTexture(u8, _GXTexMapID);
|
||||
};
|
||||
|
||||
class JPAParticleCallBack {
|
||||
public:
|
||||
virtual void temp(); // temp to build OK, remove later
|
||||
~JPAParticleCallBack();
|
||||
virtual void draw(JPABaseEmitter*, JPABaseParticle*);
|
||||
virtual void execute(JPABaseEmitter*, JPABaseParticle*);
|
||||
};
|
||||
|
||||
#endif /* JPAPARTICLE_H */
|
||||
|
||||
@@ -3,4 +3,31 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct ResTIMG { /* Acts as the header to image data. Usually texture data immediately follows it,
|
||||
so any pointer arithmetic to go past the end of this structure is so that a
|
||||
variable sized allocated buffer can be accessed. */
|
||||
u8 texture_format;
|
||||
bool is_alpha_enabled;
|
||||
u16 texture_width;
|
||||
u16 texture_height;
|
||||
u8 wrap_s;
|
||||
u8 wrap_t;
|
||||
bool is_palettes_enabled;
|
||||
u8 palette_format;
|
||||
u16 palette_count;
|
||||
u32 palette_offset;
|
||||
bool is_mip_map_enabled;
|
||||
bool do_edge_lod;
|
||||
bool bias_clamp;
|
||||
u8 max_anisotropy;
|
||||
u8 min_filter;
|
||||
u8 mag_filter;
|
||||
u8 min_lod;
|
||||
u8 max_lod;
|
||||
u8 num_mipmaps;
|
||||
u8 unknown;
|
||||
u16 lod_bias;
|
||||
u32 texture_data_offset;
|
||||
};
|
||||
|
||||
#endif /* JUTTEXTURE_H */
|
||||
|
||||
Reference in New Issue
Block a user