Skip to content

Commit

Permalink
lib fixes, J3D included
Browse files Browse the repository at this point in the history
  • Loading branch information
magcius committed Sep 12, 2023
1 parent f167a3e commit 06ec97a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
5 changes: 4 additions & 1 deletion include/JSystem/J3DGraphBase/J3DMatBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "JSystem/J3DGraphBase/J3DTevs.h"
#include "JSystem/J3DGraphBase/J3DTexture.h"
#include "dolphin/types.h"
#include "m_Do/m_Do_lib.h"

struct J3DGXColorS10 : public GXColorS10 {
/* 8000E460 */ J3DGXColorS10() {}
Expand Down Expand Up @@ -593,6 +592,10 @@ struct J3DAlphaCompInfo {

extern const u16 j3dDefaultAlphaCmpID;

inline u32 calcAlphaCmpID(u32 param_1, u32 param_2, u32 param_3) {
return ((param_1 & 0xff) << 5) + ((param_2 & 0xff) << 3) + (param_3 & 0xff);
}

struct J3DAlphaComp {
J3DAlphaComp() {
field_0x0 = j3dDefaultAlphaCmpID;
Expand Down
6 changes: 1 addition & 5 deletions include/d/d_kankyo.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
#include "global.h"
#include "dolphin/gx/GX.h"
#include "SSystem/SComponent/c_xyz.h"

// setup properly later
struct J3DLightObj {
u8 temp[0x74];
};
#include "JSystem/J3DGraphBase/J3DStruct.h"

class J3DModel;

Expand Down
22 changes: 21 additions & 1 deletion include/m_Do/m_Do_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,31 @@ class mDoExt_McaMorfCallBack2_c {
virtual void execute(u16, J3DTransformInfo*) = 0;
};

class mDoExt_McaMorf {
class JAIAnimeSound;

class mDoExt_McaMorf /* : public J3DMtxCalcMaya */ {
public:
mDoExt_McaMorf(J3DModelData*, mDoExt_McaMorfCallBack1_c*, mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, int, float, int, int, int, void*, unsigned long, unsigned long);
virtual ~mDoExt_McaMorf();

void setAnm(J3DAnmTransform*, int, f32, f32, f32, f32, void*);
J3DModel* getModel() { return mpModel; }
void setFrame(f32 frame) { mFrameCtrl.setFrame(frame); }
void updateDL();
void play(Vec *, u32, u8);

u32 pad[0x50]; // J3DMtxCalcMaya
/* 0x50 */ J3DModel* mpModel;
/* 0x54 */ J3DAnmTransform* mpAnm;
/* 0x58 */ J3DFrameCtrl mFrameCtrl;
/* 0x6C */ J3DTransformInfo* mpTransformInfo;
/* 0x70 */ Quaternion* mpQuats;
/* 0x74 */ f32 mCurMorf;
/* 0x78 */ f32 mPrevMorf;
/* 0x7C */ f32 mMorfStep;
/* 0x80 */ JAIAnimeSound * mpSound;
/* 0x84 */ mDoExt_McaMorfCallBack1_c * mpCallBack1;
/* 0x88 */ mDoExt_McaMorfCallBack2_c * mpCallBack2;
};

class mDoExt_3DlineMat_c {
Expand Down

0 comments on commit 06ec97a

Please sign in to comment.