Merge remote-tracking branch 'origin/main' into tphd

This commit is contained in:
Lurs
2026-08-11 17:07:13 +02:00
1291 changed files with 32756 additions and 20945 deletions
@@ -892,7 +892,7 @@ struct J2DBlendInfo {
/* 0x3 */ u8 mOp;
};
extern const J2DBlendInfo j2dDefaultBlendInfo;
DUSK_GAME_EXTERN const J2DBlendInfo j2dDefaultBlendInfo;
/**
* @ingroup jsystem-j2d
@@ -4,7 +4,7 @@
#include "JSystem/J2DGraph/J2DManage.h"
#include "JSystem/J2DGraph/J2DMatBlock.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
/**
* @ingroup jsystem-j2d
@@ -5,7 +5,7 @@
#include "JSystem/JSupport/JSUList.h"
#include <gx.h>
#include <mtx.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
class J2DAnmBase;
class J2DAnmColor;
@@ -201,7 +201,7 @@ public:
static s16 J2DCast_F32_to_S16(f32 value, u8 arg2);
static JGeometry::TBox2<f32> static_mBounds;
static DUSK_GAME_DATA JGeometry::TBox2<f32> static_mBounds;
public:
/* 0x04 */ u16 field_0x4;
@@ -4,7 +4,7 @@
#include "JSystem/J2DGraph/J2DPane.h"
#include "JSystem/JUtility/JUTTexture.h"
#include "JSystem/JUtility/TColor.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
class J2DMaterial;
class JUTPalette;
@@ -67,8 +67,8 @@ public:
mFontSizeY = y;
}
static char* mStrBuff;
static size_t mStrBuffSize;
static DUSK_GAME_DATA char* mStrBuff;
static DUSK_GAME_DATA size_t mStrBuffSize;
private:
void private_initiate(JUTFont*, f32, f32, JUtility::TColor, JUtility::TColor,
@@ -4,7 +4,7 @@
#include "JSystem/J2DGraph/J2DManage.h"
#include "JSystem/J2DGraph/J2DPane.h"
#include "JSystem/JUtility/TColor.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
class J2DMaterial;
class JUTNameTab;
@@ -90,7 +90,7 @@ public:
static J2DDataManage* getDataManage() { return mDataManage; }
static J2DDataManage* mDataManage;
static DUSK_GAME_DATA J2DDataManage* mDataManage;
/* 0x100 */ bool mScissor;
/* 0x102 */ u16 mMaterialNum;
+20 -20
View File
@@ -4,7 +4,7 @@
#include <gx.h>
#include <mtx.h>
#include "global.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
/**
* @ingroup jsystem-j2d
@@ -46,7 +46,7 @@ struct J2DTexMtxInfo {
}; // Size: 0x24
extern J2DTexMtxInfo const j2dDefaultTexMtxInfo;
DUSK_GAME_EXTERN J2DTexMtxInfo const j2dDefaultTexMtxInfo;
/**
* @ingroup jsystem-j2d
@@ -86,7 +86,7 @@ struct J2DIndTexOrderInfo {
GXTexMapID getTexMapID() const { return (GXTexMapID)mTexMapID; }
};
extern const J2DIndTexOrderInfo j2dDefaultIndTexOrderNull;
DUSK_GAME_EXTERN const J2DIndTexOrderInfo j2dDefaultIndTexOrderNull;
/**
* @ingroup jsystem-j2d
@@ -130,7 +130,7 @@ struct J2DIndTexMtxInfo {
}
};
extern J2DIndTexMtxInfo const j2dDefaultIndTexMtxInfo;
DUSK_GAME_EXTERN J2DIndTexMtxInfo const j2dDefaultIndTexMtxInfo;
/**
* @ingroup jsystem-j2d
@@ -175,7 +175,7 @@ struct J2DIndTexCoordScaleInfo {
GXIndTexScale getScaleT() const { return (GXIndTexScale)mScaleT; }
};
extern const J2DIndTexCoordScaleInfo j2dDefaultIndTexCoordScaleInfo;
DUSK_GAME_EXTERN const J2DIndTexCoordScaleInfo j2dDefaultIndTexCoordScaleInfo;
/**
* @ingroup jsystem-j2d
@@ -239,7 +239,7 @@ inline u32 J2DCalcIndTevStage(J2DIndTevStageInfo info) {
(info.mBiasSel << 4) | (info.mIndFormat << 2) | (info.mIndStage);
}
extern const J2DIndTevStageInfo j2dDefaultIndTevStageInfo;
DUSK_GAME_EXTERN const J2DIndTevStageInfo j2dDefaultIndTevStageInfo;
/**
* @ingroup jsystem-j2d
@@ -289,7 +289,7 @@ struct J2DTexCoordInfo {
}
};
extern J2DTexCoordInfo const j2dDefaultTexCoordInfo[8];
DUSK_GAME_EXTERN J2DTexCoordInfo const j2dDefaultTexCoordInfo[8];
/**
* @ingroup jsystem-j2d
@@ -332,7 +332,7 @@ struct J2DTevOrderInfo {
}
};
extern const J2DTevOrderInfo j2dDefaultTevOrderInfoNull;
DUSK_GAME_EXTERN const J2DTevOrderInfo j2dDefaultTevOrderInfoNull;
/**
* @ingroup jsystem-j2d
@@ -383,7 +383,7 @@ struct J2DTevStageInfo {
/* 0x13 */ u8 field_0x13;
};
extern J2DTevStageInfo const j2dDefaultTevStageInfo;
DUSK_GAME_EXTERN J2DTevStageInfo const j2dDefaultTevStageInfo;
/**
* @ingroup jsystem-j2d
@@ -396,7 +396,7 @@ struct J2DTevSwapModeInfo {
/* 0x3 */ u8 field_0x3;
};
extern const J2DTevSwapModeInfo j2dDefaultTevSwapMode;
DUSK_GAME_EXTERN const J2DTevSwapModeInfo j2dDefaultTevSwapMode;
/**
* @ingroup jsystem-j2d
@@ -565,8 +565,8 @@ inline u8 J2DCalcTevSwapTable(u8 param_0, u8 param_1, u8 param_2, u8 param_3) {
return (param_0 << 6) + (param_1 << 4) + (param_2 << 2) + param_3;
}
extern const J2DTevSwapModeTableInfo j2dDefaultTevSwapModeTable;
extern const u8 j2dDefaultTevSwapTableID;
DUSK_GAME_EXTERN const J2DTevSwapModeTableInfo j2dDefaultTevSwapModeTable;
DUSK_GAME_EXTERN const u8 j2dDefaultTevSwapTableID;
/**
* @ingroup jsystem-j2d
@@ -615,7 +615,7 @@ struct J2DColorChanInfo {
};
inline u16 J2DCalcColorChanID(u8 param_0) { return param_0; }
extern const J2DColorChanInfo j2dDefaultColorChanInfo;
DUSK_GAME_EXTERN const J2DColorChanInfo j2dDefaultColorChanInfo;
/**
* @ingroup jsystem-j2d
@@ -644,12 +644,12 @@ private:
/* 0x0 */ u16 mColorChan;
};
extern const GXColor j2dDefaultColInfo;
extern const GXColorS10 j2dDefaultTevColor;
extern const GXColor j2dDefaultTevKColor;
extern const J2DTevOrderInfo j2dDefaultTevOrderInfoNull;
extern const u8 j2dDefaultPEBlockDither;
extern const u8 j2dDefaultTevSwapTableID;
extern const u16 j2dDefaultAlphaCmp;
DUSK_GAME_EXTERN const GXColor j2dDefaultColInfo;
DUSK_GAME_EXTERN const GXColorS10 j2dDefaultTevColor;
DUSK_GAME_EXTERN const GXColor j2dDefaultTevKColor;
DUSK_GAME_EXTERN const J2DTevOrderInfo j2dDefaultTevOrderInfoNull;
DUSK_GAME_EXTERN const u8 j2dDefaultPEBlockDither;
DUSK_GAME_EXTERN const u8 j2dDefaultTevSwapTableID;
DUSK_GAME_EXTERN const u16 j2dDefaultAlphaCmp;
#endif /* J2DTEVS_H */
@@ -3,8 +3,8 @@
#include "JSystem/J2DGraph/J2DMaterial.h"
#include "JSystem/J2DGraph/J2DPane.h"
#include "dusk/endian.h"
#include "dusk/string.hpp"
#include "helpers/endian.h"
#include "helpers/string.hpp"
class J2DMaterial;
class JUTFont;
@@ -100,7 +100,7 @@ public:
J2DTextBoxVBinding);
void private_readStream(J2DPane*, JSURandomInputStream*, JKRArchive*);
TEXT_SPAN getStringPtr() const;
dusk::TextSpan getSpan() const;
TextSpan getSpan() const;
s32 setString(s16, char const*, ...);
s32 setString(char const*, ...);
@@ -6,7 +6,7 @@
#include <mtx.h>
#include "global.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
#if TARGET_PC
#define OFFSET_PTR_V0 BE(u32)
@@ -3,7 +3,7 @@
#include "JSystem/J3DAssert.h"
#include "JSystem/J3DGraphLoader/J3DClusterLoader.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
class J3DDeformer;
class J3DClusterKey;
@@ -53,8 +53,8 @@ public:
}
static void setJoint(J3DJoint* joint) { mJoint = joint; }
static J3DMtxBuffer* mMtxBuffer;
static J3DJoint* mJoint;
static DUSK_GAME_DATA J3DMtxBuffer* mMtxBuffer;
static DUSK_GAME_DATA J3DJoint* mJoint;
}; // Size: 0x4
typedef int (*J3DJointCallBack)(J3DJoint*, int);
@@ -100,7 +100,7 @@ public:
void setMtxType(u8 type) { mKind = (mKind & ~0xf0) | (type << 4); }
f32 getRadius() const { return mBoundingSphereRadius; }
static J3DMtxCalc* mCurrentMtxCalc;
static DUSK_GAME_DATA J3DMtxCalc* mCurrentMtxCalc;
u8 getKind() const { return mKind & 15; }
@@ -3,7 +3,7 @@
#include "JSystem/J3DAssert.h"
#include "JSystem/J3DGraphBase/J3DTransform.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
class J3DJoint;
class J3DMtxBuffer;
@@ -3,7 +3,6 @@
#include "JSystem/J3DGraphAnimator/J3DSkinDeform.h"
#include "JSystem/J3DGraphBase/J3DPacket.h"
#include "dusk/frame_interpolation.h"
#include <types.h>
enum J3DMdlFlag {
@@ -106,12 +105,13 @@ public:
void setUserArea(uintptr_t area) { mUserArea = area; }
uintptr_t getUserArea() const { return mUserArea; }
Vec* getBaseScale() { return &mBaseScale; }
#if TARGET_PC
void setAnmMtx(int jointNo, Mtx m);
#else
void setAnmMtx(int jointNo, Mtx m) {
mMtxBuffer->setAnmMtx(jointNo, m);
#ifdef TARGET_PC
dusk::frame_interp::record_final_mtx(mMtxBuffer->getAnmMtx(jointNo));
#endif
}
#endif
MtxP getAnmMtx(int jointNo) { return mMtxBuffer->getAnmMtx(jointNo); }
MtxP getWeightAnmMtx(int i) { return mMtxBuffer->getWeightAnmMtx(i); }
J3DSkinDeform* getSkinDeform() { return mSkinDeform; }
@@ -62,10 +62,10 @@ public:
mpNrmMtxArr[1][mCurrentViewNo] = tmp;
}
static Mtx sNoUseDrawMtx;
static Mtx33 sNoUseNrmMtx;
static Mtx* sNoUseDrawMtxPtr;
static Mtx33* sNoUseNrmMtxPtr;
static DUSK_GAME_DATA Mtx sNoUseDrawMtx;
static DUSK_GAME_DATA Mtx33 sNoUseNrmMtx;
static DUSK_GAME_DATA Mtx* sNoUseDrawMtxPtr;
static DUSK_GAME_DATA Mtx33* sNoUseNrmMtxPtr;
/* 0x00 */ J3DJointTree* mJointTree;
/* 0x04 */ u8* mpScaleFlagArr;
@@ -59,9 +59,9 @@ public:
virtual void deform(J3DVertexBuffer*, J3DMtxBuffer*);
virtual ~J3DSkinDeform();
static BE(u16)* sWorkArea_WEvlpMixMtx[1024];
static BE(f32)* sWorkArea_WEvlpMixWeight[1024];
static u16 sWorkArea_MtxReg[1024];
static DUSK_GAME_DATA BE(u16)* sWorkArea_WEvlpMixMtx[1024];
static DUSK_GAME_DATA BE(f32)* sWorkArea_WEvlpMixWeight[1024];
static DUSK_GAME_DATA u16 sWorkArea_MtxReg[1024];
private:
/* 0x04 */ u16* mPosData;
@@ -99,9 +99,9 @@ public:
/* 0x1C */ MtxP mpZMtx;
/* 0x20 */ J3DPacket* mpCallBackPacket;
static sortFunc sortFuncTable[6];
static drawFunc drawFuncTable[2];
static int entryNum;
static DUSK_GAME_DATA sortFunc sortFuncTable[6];
static DUSK_GAME_DATA drawFunc drawFuncTable[2];
static DUSK_GAME_DATA int entryNum;
};
#endif /* J3DDRAWBUFFER_H */
@@ -1437,7 +1437,7 @@ inline u16 calcZModeID(u8 param_0, u8 param_1, u8 param_2) {
return param_1 * 2 + param_0 * 0x10 + param_2;
}
extern u8 j3dZModeTable[96];
DUSK_GAME_EXTERN u8 j3dZModeTable[96];
/**
* @ingroup jsystem-j3d
@@ -125,8 +125,8 @@ public:
u8* getDisplayList(int idx) { return (u8*)mpDisplayList[idx]; }
u32 getDisplayListSize() { return mSize; }
static GDLObj sGDLObj;
static s32 sInterruptFlag;
static DUSK_GAME_DATA GDLObj sGDLObj;
static DUSK_GAME_DATA s32 sInterruptFlag;
/* 0x0 */ void* mpDisplayList[2];
/* 0x8 */ u32 mSize;
@@ -4,8 +4,10 @@
#include "JSystem/J3DGraphBase/J3DShapeDraw.h"
#include "JSystem/J3DAssert.h"
#include "JSystem/J3DGraphBase/J3DFifo.h"
#include "JSystem/JMath/JMath.h"
#include "global.h"
#include <mtx.h>
#include "dusk/endian_gx.hpp"
#include "helpers/endian_gx.hpp"
class J3DShapeMtx;
@@ -78,13 +80,13 @@ public:
virtual void load() const;
virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
static J3DShapeMtx_LoadFunc sMtxLoadPipeline[4];
static u16 sMtxLoadCache[10];
static u32 sCurrentPipeline;
static u8* sCurrentScaleFlag;
static bool sNBTFlag;
static bool sLODFlag;
static u32 sTexMtxLoadType;
static DUSK_GAME_DATA J3DShapeMtx_LoadFunc sMtxLoadPipeline[4];
static DUSK_GAME_DATA u16 sMtxLoadCache[10];
static DUSK_GAME_DATA u32 sCurrentPipeline;
static DUSK_GAME_DATA u8* sCurrentScaleFlag;
static DUSK_GAME_DATA bool sNBTFlag;
static DUSK_GAME_DATA bool sLODFlag;
static DUSK_GAME_DATA u32 sTexMtxLoadType;
static void setCurrentPipeline(u32 pipeline) {
J3D_ASSERT_RANGE(91, pipeline < 4);
@@ -202,8 +204,8 @@ public:
static void resetVcdVatCache() { sOldVcdVatCmd = NULL; }
static void* sOldVcdVatCmd;
static bool sEnvelopeFlag;
static DUSK_GAME_DATA void* sOldVcdVatCmd;
static DUSK_GAME_DATA bool sEnvelopeFlag;
private:
friend struct J3DShapeFactory;
@@ -4,7 +4,7 @@
#include "JSystem/J3DGraphBase/J3DShape.h"
#include "JSystem/J3DAssert.h"
#include <mtx.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
class J3DTexMtx;
class J3DTexGenBlock;
@@ -22,8 +22,8 @@ public:
loadExecute(m);
}
static J3DTexGenBlock* sTexGenBlock;
static J3DTexMtxObj* sTexMtxObj;
static DUSK_GAME_DATA J3DTexGenBlock* sTexGenBlock;
static DUSK_GAME_DATA J3DTexMtxObj* sTexMtxObj;
};
class J3DShapeMtxConcatView;
@@ -75,9 +75,9 @@ public:
void loadMtxConcatView_PNCPU(int, u16) const;
void loadMtxConcatView_PNGP_LOD(int, u16) const;
static J3DShapeMtxConcatView_LoadFunc sMtxLoadPipeline[4];
static J3DShapeMtxConcatView_LoadFunc sMtxLoadLODPipeline[4];
static MtxP sMtxPtrTbl[2];
static DUSK_GAME_DATA J3DShapeMtxConcatView_LoadFunc sMtxLoadPipeline[4];
static DUSK_GAME_DATA J3DShapeMtxConcatView_LoadFunc sMtxLoadLODPipeline[4];
static DUSK_GAME_DATA MtxP sMtxPtrTbl[2];
};
/**
@@ -7,7 +7,7 @@
#include "global.h"
#include "JSystem/JMath/JMath.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
/**
* @ingroup jsystem-j3d
@@ -6,8 +6,8 @@
#include "JSystem/J3DAssert.h"
#include "JSystem/JMath/JMath.h"
#include "dusk/frame_interpolation.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
#include "global.h"
enum J3DSysDrawBuf {
/* 0x0 */ J3DSysDrawBuf_Opa,
@@ -189,25 +189,23 @@ struct J3DSys {
Mtx& getModelDrawMtx(u16 no) { return mModelDrawMtx[no]; }
J3DShapePacket* getShapePacket() { return mShapePacket; }
#if TARGET_PC
void setViewMtx(const Mtx m);
#else
void setViewMtx(const Mtx m) {
#ifdef TARGET_PC
Mtx patched;
if (dusk::frame_interp::lookup_replacement(m, patched)) {
m = patched;
}
#endif
MTXCopy(m, mViewMtx);
}
#endif
J3DModel* getModel() { return mModel; }
static Mtx mCurrentMtx;
static Vec mCurrentS;
static Vec mParentS;
static J3DTexCoordScaleInfo sTexCoordScaleTable[8];
static DUSK_GAME_DATA Mtx mCurrentMtx;
static DUSK_GAME_DATA Vec mCurrentS;
static DUSK_GAME_DATA Vec mParentS;
static DUSK_GAME_DATA J3DTexCoordScaleInfo sTexCoordScaleTable[8];
};
extern u32 j3dDefaultViewNo;
extern J3DSys j3dSys;
DUSK_GAME_EXTERN u32 j3dDefaultViewNo;
DUSK_GAME_EXTERN J3DSys j3dSys;
#endif /* J3DSYS_H */
@@ -6,32 +6,32 @@
#include "JSystem/J3DGraphBase/J3DGD.h"
#include "JSystem/J3DGraphBase/J3DStruct.h"
extern u8 j3dTevSwapTableTable[1024];
DUSK_GAME_EXTERN u8 j3dTevSwapTableTable[1024];
extern const J3DLightInfo j3dDefaultLightInfo;
extern const J3DTexCoordInfo j3dDefaultTexCoordInfo[8];
extern const J3DTexMtxInfo j3dDefaultTexMtxInfo;
extern const J3DIndTexMtxInfo j3dDefaultIndTexMtxInfo;
extern const J3DTevStageInfo j3dDefaultTevStageInfo;
extern const J3DIndTevStageInfo j3dDefaultIndTevStageInfo;
extern const J3DFogInfo j3dDefaultFogInfo;
extern const J3DNBTScaleInfo j3dDefaultNBTScaleInfo;
DUSK_GAME_EXTERN const J3DLightInfo j3dDefaultLightInfo;
DUSK_GAME_EXTERN const J3DTexCoordInfo j3dDefaultTexCoordInfo[8];
DUSK_GAME_EXTERN const J3DTexMtxInfo j3dDefaultTexMtxInfo;
DUSK_GAME_EXTERN const J3DIndTexMtxInfo j3dDefaultIndTexMtxInfo;
DUSK_GAME_EXTERN const J3DTevStageInfo j3dDefaultTevStageInfo;
DUSK_GAME_EXTERN const J3DIndTevStageInfo j3dDefaultIndTevStageInfo;
DUSK_GAME_EXTERN const J3DFogInfo j3dDefaultFogInfo;
DUSK_GAME_EXTERN const J3DNBTScaleInfo j3dDefaultNBTScaleInfo;
extern const GXColor j3dDefaultColInfo;
extern const GXColor j3dDefaultAmbInfo;
DUSK_GAME_EXTERN const GXColor j3dDefaultColInfo;
DUSK_GAME_EXTERN const GXColor j3dDefaultAmbInfo;
extern const u8 j3dDefaultColorChanNum;
extern const J3DTevOrderInfo j3dDefaultTevOrderInfoNull;
extern const J3DIndTexOrderInfo j3dDefaultIndTexOrderNull;
extern const GXColorS10 j3dDefaultTevColor;
extern const J3DIndTexCoordScaleInfo j3dDefaultIndTexCoordScaleInfo;
extern const GXColor j3dDefaultTevKColor;
extern const J3DTevSwapModeInfo j3dDefaultTevSwapMode;
extern const J3DTevSwapModeTableInfo j3dDefaultTevSwapModeTable;
extern const J3DBlendInfo j3dDefaultBlendInfo;
extern const J3DColorChanInfo j3dDefaultColorChanInfo;
extern const u8 j3dDefaultTevSwapTableID;
extern const u16 j3dDefaultAlphaCmpID;
extern const u16 j3dDefaultZModeID;
DUSK_GAME_EXTERN const J3DTevOrderInfo j3dDefaultTevOrderInfoNull;
DUSK_GAME_EXTERN const J3DIndTexOrderInfo j3dDefaultIndTexOrderNull;
DUSK_GAME_EXTERN const GXColorS10 j3dDefaultTevColor;
DUSK_GAME_EXTERN const J3DIndTexCoordScaleInfo j3dDefaultIndTexCoordScaleInfo;
DUSK_GAME_EXTERN const GXColor j3dDefaultTevKColor;
DUSK_GAME_EXTERN const J3DTevSwapModeInfo j3dDefaultTevSwapMode;
DUSK_GAME_EXTERN const J3DTevSwapModeTableInfo j3dDefaultTevSwapModeTable;
DUSK_GAME_EXTERN const J3DBlendInfo j3dDefaultBlendInfo;
DUSK_GAME_EXTERN const J3DColorChanInfo j3dDefaultColorChanInfo;
DUSK_GAME_EXTERN const u8 j3dDefaultTevSwapTableID;
DUSK_GAME_EXTERN const u16 j3dDefaultAlphaCmpID;
DUSK_GAME_EXTERN const u16 j3dDefaultZModeID;
/**
* @ingroup jsystem-j3d
@@ -191,7 +191,7 @@ struct J3DIndTevStage {
/* 0x0 */ u32 mInfo;
};
extern const J3DTevOrderInfo j3dDefaultTevOrderInfoNull;
DUSK_GAME_EXTERN const J3DTevOrderInfo j3dDefaultTevOrderInfoNull;
/**
* @ingroup jsystem-j3d
@@ -209,8 +209,8 @@ struct J3DTevOrder : public J3DTevOrderInfo {
u8 getTexMap() const { return mTexMap; }
};
extern u8 j3dTevSwapTableTable[1024];
extern u8 const j3dDefaultTevSwapTableID;
DUSK_GAME_EXTERN u8 j3dTevSwapTableTable[1024];
DUSK_GAME_EXTERN u8 const j3dDefaultTevSwapTableID;
inline u8 calcTevSwapTableID(u8 param_0, u8 param_1, u8 param_2, u8 param_3) {
return 0x40 * (u8)param_0 + 0x10 * (u8)param_1 + 4 * (u8)param_2 + param_3;
@@ -263,7 +263,7 @@ public:
/* 0x34 */ GXLightObj mLightObj;
}; // Size = 0x74
extern const J3DNBTScaleInfo j3dDefaultNBTScaleInfo;
DUSK_GAME_EXTERN const J3DNBTScaleInfo j3dDefaultNBTScaleInfo;
/**
* @ingroup jsystem-j3d
@@ -287,12 +287,12 @@ struct J3DNBTScale : public J3DNBTScaleInfo {
BE(Vec)* getScale() { return &mScale; }
};
extern const GXColor j3dDefaultColInfo;
extern const GXColor j3dDefaultAmbInfo;
extern const GXColorS10 j3dDefaultTevColor;
extern const GXColor j3dDefaultTevKColor;
extern u8 j3dAlphaCmpTable[768];
extern const u8 j3dDefaultNumChans;
DUSK_GAME_EXTERN const GXColor j3dDefaultColInfo;
DUSK_GAME_EXTERN const GXColor j3dDefaultAmbInfo;
DUSK_GAME_EXTERN const GXColorS10 j3dDefaultTevColor;
DUSK_GAME_EXTERN const GXColor j3dDefaultTevKColor;
DUSK_GAME_EXTERN u8 j3dAlphaCmpTable[768];
DUSK_GAME_EXTERN const u8 j3dDefaultNumChans;
struct J3DNBTScale;
struct J3DTexCoord;
@@ -7,7 +7,7 @@
#include "global.h"
#include <stdint.h>
#include "dusk/gx_helper.h"
#include "helpers/gx_helper.h"
/**
* @ingroup jsystem-j3d
@@ -85,7 +85,7 @@ public:
}
};
extern J3DTexMtxInfo const j3dDefaultTexMtxInfo;
DUSK_GAME_EXTERN J3DTexMtxInfo const j3dDefaultTexMtxInfo;
/**
* @ingroup jsystem-j3d
@@ -117,7 +117,7 @@ private:
/* 0x64 */ Mtx mMtx;
}; // Size: 0x94
extern J3DTexCoordInfo const j3dDefaultTexCoordInfo[8];
DUSK_GAME_EXTERN J3DTexCoordInfo const j3dDefaultTexCoordInfo[8];
/**
* @ingroup jsystem-j3d
@@ -45,10 +45,10 @@ struct J3DTransformInfo {
#endif
}; // Size: 0x20
extern J3DTransformInfo const j3dDefaultTransformInfo;
extern Vec const j3dDefaultScale;
extern Mtx const j3dDefaultMtx;
extern f32 const PSMulUnit01[];
DUSK_GAME_EXTERN J3DTransformInfo const j3dDefaultTransformInfo;
DUSK_GAME_EXTERN Vec const j3dDefaultScale;
DUSK_GAME_EXTERN Mtx const j3dDefaultMtx;
DUSK_GAME_EXTERN f32 const PSMulUnit01[];
void J3DGQRSetup7(u32 param_0, u32 param_1, u32 param_2, u32 param_3);
void J3DCalcBBoardMtx(f32 (*)[4]);
@@ -3,7 +3,7 @@
#include <gx.h>
#include <mtx.h>
#include "dusk/endian_gx.hpp"
#include "helpers/endian_gx.hpp"
class J3DModel;
class J3DAnmVtxColor;
@@ -4,7 +4,7 @@
#include "JSystem/J3DGraphAnimator/J3DAnimation.h"
#include "JSystem/J3DGraphAnimator/J3DAnimation.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
#if TARGET_PC
#define OFFSET_PTR_V0 BE(u32)
@@ -4,7 +4,7 @@
#include "JSystem/J3DGraphBase/J3DSys.h"
#include <mtx.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
class J3DModelData;
class J3DMaterialTable;
@@ -8,8 +8,8 @@
namespace JAHUpdate {
extern JAHioNode* spNode;
extern JORMContext* spMc;
DUSK_GAME_EXTERN JAHioNode* spNode;
DUSK_GAME_EXTERN JORMContext* spMc;
inline void startUpdateNode(JAHioNode* param_1) {
spMc = attachJORMContext(8);
@@ -29,7 +29,7 @@ public:
JSUTree<JAHVirtualNode>* getVirTree() { return &mTree; }
static u32 getVirNodeNum() { return smVirNodeNum; }
static u32 smVirNodeNum;
static DUSK_GAME_DATA u32 smVirNodeNum;
/* 0x04 */ JSUTree<JAHVirtualNode> mTree;
/* 0x20 */ char mName[32];
@@ -38,17 +38,17 @@ public:
static u32 getIntervalX() { return smIntX; }
static u32 getNameWidth() { return smNameWidth; }
static u16 smButtonWidth[];
static u16 smCommentWidth[];
static u16 smComboWidth[];
static u16 smYTop;
static u16 smXLeft;
static u16 smIndentSize;
static u16 smLineHeight;
static u16 smContWidth;
static u16 smIntX;
static u16 smIntY;
static u16 smNameWidth;
static DUSK_GAME_DATA u16 smButtonWidth[];
static DUSK_GAME_DATA u16 smCommentWidth[];
static DUSK_GAME_DATA u16 smComboWidth[];
static DUSK_GAME_DATA u16 smYTop;
static DUSK_GAME_DATA u16 smXLeft;
static DUSK_GAME_DATA u16 smIndentSize;
static DUSK_GAME_DATA u16 smLineHeight;
static DUSK_GAME_DATA u16 smContWidth;
static DUSK_GAME_DATA u16 smIntX;
static DUSK_GAME_DATA u16 smIntY;
static DUSK_GAME_DATA u16 smNameWidth;
u16 getX() { return mX; }
u16 getY() { return mY; }
@@ -41,7 +41,7 @@ public:
static JAHioNode* getCurrentNode() { return smCurrentNode; }
static JAHioNode* smCurrentNode;
static DUSK_GAME_DATA JAHioNode* smCurrentNode;
JSUTree<JAHioNode>* getTree() { return &mTree; }
char* getNodeName() { return mName; }
@@ -4,7 +4,7 @@
namespace JAHioUtil {
char* getString(const char* msg, ...);
extern char mStringBuffer[];
DUSK_GAME_EXTERN char mStringBuffer[];
}
#endif /* JAHIOUTIL_H */
@@ -5,7 +5,7 @@
#include "JSystem/JAudio2/JAIAudible.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "global.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
#include <cstdint>
class JAISound;
@@ -41,21 +41,21 @@ namespace JASDriver {
void subframeCallback();
void DSPSyncCallback();
extern const MixFunc sMixFuncs[4];
extern s16* sDmaDacBuffer[3];
extern JASMixMode sMixMode;
extern f32 sDacRate;
extern u32 sSubFrames;
extern s16** sDspDacBuffer;
extern s32 sDspDacWriteBuffer;
extern s32 sDspDacReadBuffer;
extern s32 sDspStatus;
extern DSPBufCallback sDspDacCallback;
extern s16* lastRspMadep;
extern void (*dacCallbackFunc)(s16*, u32);
extern MixCallback extMixCallback;
extern u32 sOutputRate;
extern u32 sSubFrameCounter;
DUSK_GAME_EXTERN const MixFunc sMixFuncs[4];
DUSK_GAME_EXTERN s16* sDmaDacBuffer[3];
DUSK_GAME_EXTERN JASMixMode sMixMode;
DUSK_GAME_EXTERN f32 sDacRate;
DUSK_GAME_EXTERN u32 sSubFrames;
DUSK_GAME_EXTERN s16** sDspDacBuffer;
DUSK_GAME_EXTERN s32 sDspDacWriteBuffer;
DUSK_GAME_EXTERN s32 sDspDacReadBuffer;
DUSK_GAME_EXTERN s32 sDspStatus;
DUSK_GAME_EXTERN DSPBufCallback sDspDacCallback;
DUSK_GAME_EXTERN s16* lastRspMadep;
DUSK_GAME_EXTERN void (*dacCallbackFunc)(s16*, u32);
DUSK_GAME_EXTERN MixCallback extMixCallback;
DUSK_GAME_EXTERN u32 sOutputRate;
DUSK_GAME_EXTERN u32 sSubFrameCounter;
};
#endif /* JASAICTRL_H */
@@ -4,7 +4,7 @@
#include "JSystem/JAudio2/JASTaskThread.h"
#include "JSystem/JUtility/JUTAssert.h"
#include <dvd.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
class JASChannel;
@@ -256,24 +256,24 @@ public:
* Thread that will be sent DVD load commands.
* This is the JASDvd thread in practice.
*/
static JASTaskThread* sLoadThread;
static DUSK_GAME_DATA JASTaskThread* sLoadThread;
/**
* Buffer used to read DVD data. Can store the size of an entire streamed audio block.
*/
static u8* sReadBuffer;
static DUSK_GAME_DATA u8* sReadBuffer;
/**
* Block size used by all streamed music in the game.
* This is 0x2760 for TP.
*/
static u32 sBlockSize;
static DUSK_GAME_DATA u32 sBlockSize;
/**
* Maximum amount of output channels for all streamed music in the game.
* This is 2 for TP (stereo).
*/
static u32 sChannelMax;
static DUSK_GAME_DATA u32 sChannelMax;
};
#endif /* JASARAMSTREAM_H */
@@ -30,7 +30,7 @@ struct JASAudioThread : public JKRThread, public JASGlobalInstance<JASAudioThrea
/* 0x7c */ OSThreadQueue sThreadQueue;
/* 0x84 */ bool sbPauseFlag; // type unsure
static volatile int snIntCount; // type unsure
static DUSK_GAME_DATA volatile int snIntCount; // type unsure
};
@@ -137,7 +137,7 @@ namespace JASBNKParser {
return ptr[2];
}
extern u32 sUsedHeapSize;
DUSK_GAME_EXTERN u32 sUsedHeapSize;
};
@@ -62,7 +62,7 @@ struct JASBasicWaveBank : public JASWaveBank {
/* 0x24 */ u16 mHandleCount;
/* 0x26 */ u16 mGroupCount;
static u32 mNoLoad;
static DUSK_GAME_DATA u32 mNoLoad;
};
#endif /* JASBASICWAVEBANK_H */
+22 -6
View File
@@ -2,6 +2,7 @@
#define JASCALC_H
#include <types.h>
#include <cstring>
#include <limits>
/**
@@ -10,16 +11,31 @@
*/
struct JASCalc {
static void imixcopy(const s16*, const s16*, s16*, u32);
static void bcopyfast(const void* src, void* dest, u32 size);
#if TARGET_PC
static void bcopyfast(const void* src, void* dest, u32 size) {
std::memcpy(dest, src, size);
}
#if TARGET_ANDROID
static void _bcopy(const void* src, void* dest, u32 size);
static void _bcopy(const void* src, void* dest, u32 size) {
#else
static void bcopy(const void* src, void* dest, u32 size);
static void bcopy(const void* src, void* dest, u32 size) {
#endif
static void bzerofast(void* dest, u32 size);
std::memcpy(dest, src, size);
}
static void bzerofast(void* dest, u32 size) {
std::memset(dest, 0, size);
}
#if TARGET_ANDROID
static void _bzero(void* dest, u32 size);
static void _bzero(void* dest, u32 size) {
#else
static void bzero(void* dest, u32 size) {
#endif
std::memset(dest, 0, size);
}
#else
static void bcopyfast(const void* src, void* dest, u32 size);
static void bcopy(const void* src, void* dest, u32 size);
static void bzerofast(void* dest, u32 size);
static void bzero(void* dest, u32 size);
#endif
static f32 pow2(f32);
@@ -42,7 +58,7 @@ struct JASCalc {
f32 fake3();
#if AVOID_UB
static const s16 CUTOFF_TO_IIR_TABLE[129][4];
static DUSK_GAME_DATA const s16 CUTOFF_TO_IIR_TABLE[129][4];
#else
static const s16 CUTOFF_TO_IIR_TABLE[128][4];
#endif
@@ -166,10 +166,10 @@ public:
u32 field_0x104;
};
static OSMessageQueue sBankDisposeMsgQ;
static OSMessage sBankDisposeMsg[16];
static OSMessage sBankDisposeList[16];
static int sBankDisposeListSize;
static DUSK_GAME_DATA OSMessageQueue sBankDisposeMsgQ;
static DUSK_GAME_DATA OSMessage sBankDisposeMsg[16];
static DUSK_GAME_DATA OSMessage sBankDisposeList[16];
static DUSK_GAME_DATA int sBankDisposeListSize;
};
#endif /* JASCHANNEL_H */
@@ -52,8 +52,8 @@ struct JASPortCmd : JSULink<JASPortCmd> {
Command mFunc;
JASPortArgs* mArgs;
static TPortHead sCommandListOnce;
static TPortHead sCommandListStay;
static DUSK_GAME_DATA TPortHead sCommandListOnce;
static DUSK_GAME_DATA TPortHead sCommandListStay;
};
#endif /* JASCMDSTACK_H */
@@ -63,7 +63,7 @@ struct JASDSPChannel {
static u32 getNumFree();
static u32 getNumBreak();
static JASDSPChannel* sDspChannels;
static DUSK_GAME_DATA JASDSPChannel* sDspChannels;
/* 0x00 */ s32 mStatus;
@@ -196,15 +196,15 @@ namespace JASDsp {
int setFXLine(u8, s16*, JASDsp::FxlineConfig_*);
BOOL changeFXLineParam(u8, u8, uintptr_t);
extern u8 const DSPADPCM_FILTER[64];
extern u32 const DSPRES_FILTER[320];
extern u16 SEND_TABLE[];
extern TChannel* CH_BUF;
extern FxBuf* FX_BUF;
extern f32 sDSPVolume;
DUSK_GAME_EXTERN u8 const DSPADPCM_FILTER[64];
DUSK_GAME_EXTERN u32 const DSPRES_FILTER[320];
DUSK_GAME_EXTERN u16 SEND_TABLE[];
DUSK_GAME_EXTERN TChannel* CH_BUF;
DUSK_GAME_EXTERN FxBuf* FX_BUF;
DUSK_GAME_EXTERN f32 sDSPVolume;
#if DEBUG
extern s32 dspMutex;
DUSK_GAME_EXTERN s32 dspMutex;
#endif
};
@@ -24,11 +24,11 @@ namespace JASDriver {
void DSPSyncCallback();
void updateDacCallback();
extern JASCallbackMgr sDspSyncCallback;
extern JASCallbackMgr sSubFrameCallback;
extern JASCallbackMgr sUpdateDacCallback;
extern u16 MAX_MIXERLEVEL;
extern u32 JAS_SYSTEM_OUTPUT_MODE;
DUSK_GAME_EXTERN JASCallbackMgr sDspSyncCallback;
DUSK_GAME_EXTERN JASCallbackMgr sSubFrameCallback;
DUSK_GAME_EXTERN JASCallbackMgr sUpdateDacCallback;
DUSK_GAME_EXTERN u16 MAX_MIXERLEVEL;
DUSK_GAME_EXTERN u32 JAS_SYSTEM_OUTPUT_MODE;
};
inline void JAISetOutputMode(u32 mode) {
@@ -14,7 +14,7 @@ public:
static JASTaskThread* getThreadPointer();
static bool createThread(s32 priority, int msgCount, u32 stackSize);
static JASTaskThread* sThread;
static DUSK_GAME_DATA JASTaskThread* sThread;
};
#endif /* JASDVDTHREAD_H */
@@ -273,10 +273,10 @@ namespace JASKernel {
u32 getAramFreeSize();
u32 getAramSize();
extern JASHeap audioAramHeap;
extern uintptr_t sAramBase;
extern JKRHeap* sSystemHeap;
extern JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* sCommandHeap;
DUSK_GAME_EXTERN JASHeap audioAramHeap;
DUSK_GAME_EXTERN uintptr_t sAramBase;
DUSK_GAME_EXTERN JKRHeap* sSystemHeap;
DUSK_GAME_EXTERN JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* sCommandHeap;
};
/**
@@ -452,6 +452,6 @@ private:
template <typename T> JASMemPool_MultiThreaded<T> JASPoolAllocObject_MultiThreaded<T>::memPool_;
#endif
extern JKRSolidHeap* JASDram;
DUSK_GAME_EXTERN JKRSolidHeap* JASDram;
#endif /* JASHEAPCTRL_H */
@@ -19,7 +19,7 @@ struct JASLfo {
static void updateFreeRun(f32 param_0) { sFreeRunLfo.incCounter(param_0); }
static JASLfo sFreeRunLfo;
static DUSK_GAME_DATA JASLfo sFreeRunLfo;
/* 0x00 */ u32 field_0x0;
/* 0x04 */ u32 field_0x4;
@@ -2,7 +2,7 @@
#define JASOSCILLATOR_H
#include <types.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
/**
* @ingroup jsystem-jaudio
@@ -92,10 +92,10 @@ struct JASOscillator {
/* 0x1A */ u16 _1A;
/* 0x1C */ int _1C;
static const f32 sCurveTableLinear[17];
static const f32 sCurveTableSampleCell[17];
static const f32 sCurveTableSqRoot[17];
static const f32 sCurveTableSquare[17];
static DUSK_GAME_DATA const f32 sCurveTableLinear[17];
static DUSK_GAME_DATA const f32 sCurveTableSampleCell[17];
static DUSK_GAME_DATA const f32 sCurveTableSqRoot[17];
static DUSK_GAME_DATA const f32 sCurveTableSquare[17];
};
#endif /* JASOSCILLATOR_H */
@@ -13,7 +13,7 @@ struct JASProbe {
void stop();
static void stop(s32);
static JASProbe* sProbeTable[16];
static DUSK_GAME_DATA JASProbe* sProbeTable[16];
/* 0x000 */ char const* mName;
/* 0x004 */ s32 mStartTime;
@@ -73,7 +73,7 @@ public:
/* 0x52 */ u16 field_0x52;
/* 0x54 */ u32 field_0x54;
/* 0x58 */ u32 field_0x58;
static JASSeqParser sDefaultParser;
static DUSK_GAME_DATA JASSeqParser sDefaultParser;
};
#endif /* JASSEQCTRL_H */
@@ -92,9 +92,9 @@ public:
static void registerSeqCallback(u16 (*param_0)(JASTrack*, u16)) { sCallBackFunc = param_0; }
static CmdInfo sCmdInfo[96];
static CmdInfo sExtCmdInfo[255];
static u16 (*sCallBackFunc)(JASTrack*, u16);
static DUSK_GAME_DATA CmdInfo sCmdInfo[96];
static DUSK_GAME_DATA CmdInfo sExtCmdInfo[255];
static DUSK_GAME_DATA u16 (*sCallBackFunc)(JASTrack*, u16);
};
#endif /* JASSEQPARSER_H */
@@ -14,7 +14,7 @@ struct JASSoundParams;
namespace JASDsp {
struct TChannel;
extern const u32 FILTER_MODE_IIR;
DUSK_GAME_EXTERN const u32 FILTER_MODE_IIR;
};
#if !BIT_64
@@ -136,12 +136,12 @@ struct JASTrack : public JASPoolAllocObject_MultiThreaded<JASTrack> {
static void channelUpdateCallback(u32, JASChannel*, JASDsp::TChannel*, void*);
static JASOscillator::Point const sAdsTable[4];
static JASOscillator::Data const sEnvOsc;
static JASOscillator::Data const sPitchEnvOsc;
static DUSK_GAME_DATA JASOscillator::Point const sAdsTable[4];
static DUSK_GAME_DATA JASOscillator::Data const sEnvOsc;
static DUSK_GAME_DATA JASOscillator::Data const sPitchEnvOsc;
static JASDefaultBankTable sDefaultBankTable;
static TList sTrackList;
static DUSK_GAME_DATA JASDefaultBankTable sDefaultBankTable;
static DUSK_GAME_DATA TList sTrackList;
static const int MAX_CHILDREN = 16;
@@ -14,8 +14,8 @@ public:
virtual ~JASVoiceBank();
virtual u32 getType() const;
static const JASOscillator::Data sOscData;
static JASOscillator::Data* sOscTable;
static DUSK_GAME_DATA const JASOscillator::Data sOscData;
static DUSK_GAME_DATA JASOscillator::Data* sOscTable;
};
#endif /* JASVOICEBANK_H */
@@ -89,7 +89,7 @@ public:
static JASBasicWaveBank* createBasicWaveBank(void const*, JKRHeap*);
static JASSimpleWaveBank* createSimpleWaveBank(void const*, JKRHeap*);
static u32 sUsedHeapSize;
static DUSK_GAME_DATA u32 sUsedHeapSize;
};
#endif /* JASWSPARSER_H */
@@ -28,8 +28,8 @@ struct JASWaveArcLoader {
static void setCurrentDir(char const*);
static char* getCurrentDir();
static char sCurrentDir[DIR_MAX];
static JASHeap* sAramHeap;
static DUSK_GAME_DATA char sCurrentDir[DIR_MAX];
static DUSK_GAME_DATA JASHeap* sAramHeap;
};
/**
@@ -33,7 +33,7 @@ struct JASWaveInfo {
/* 0x1E */ s16 mpPenult;
/* 0x20 */ const u32* field_0x20;
static u32 one;
static DUSK_GAME_DATA u32 one;
};
/**
@@ -2,7 +2,7 @@
#define JAUAUDIBLEPARAM_H
#include <types.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
/**
* @ingroup jsystem-jaudio
@@ -2,7 +2,7 @@
#define JAUAUDIOARCINTERPRETER_H
#include <types.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
/**
* @ingroup jsystem-jaudio
@@ -2,7 +2,7 @@
#define JAUSOUNDANIMATOR_H
#include "JSystem/JAudio2/JAISound.h"
#include "dusk/offset_ptr.h"
#include "helpers/offset_ptr.h"
class JAUSoundAnimation;
@@ -3,7 +3,7 @@
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JASGadget.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
/**
* @ingroup jsystem-jaudio
@@ -27,7 +27,7 @@ public:
OSThread* getThread() const { return mThread; }
void setThread(OSThread* thread) { mThread = thread; }
static JSUList<JFWAlarm> sList;
static DUSK_GAME_DATA JSUList<JFWAlarm> sList;
public:
/* 0x28 */ OSThread* mThread;
@@ -108,7 +108,7 @@ public:
int getEfbHeight() const { return JUTVideo::getManager()->getEfbHeight(); }
JUTXfb* getXfbManager() const { return mXfbManager; }
static JFWDisplay* sManager;
static DUSK_GAME_DATA JFWDisplay* sManager;
private:
/* 0x04 */ JUTFader* mFader;
@@ -18,17 +18,17 @@ struct ResFONT;
*/
struct JFWSystem {
struct CSetUpParam {
static s32 maxStdHeaps;
static u32 sysHeapSize;
static u32 fifoBufSize;
static u32 aramAudioBufSize;
static u32 aramGraphBufSize;
static s32 streamPriority;
static s32 decompPriority;
static s32 aPiecePriority;
static ResFONT* systemFontRes;
static const GXRenderModeObj* renderMode;
static u32 exConsoleBufferSize;
static DUSK_GAME_DATA s32 maxStdHeaps;
static DUSK_GAME_DATA u32 sysHeapSize;
static DUSK_GAME_DATA u32 fifoBufSize;
static DUSK_GAME_DATA u32 aramAudioBufSize;
static DUSK_GAME_DATA u32 aramGraphBufSize;
static DUSK_GAME_DATA s32 streamPriority;
static DUSK_GAME_DATA s32 decompPriority;
static DUSK_GAME_DATA s32 aPiecePriority;
static DUSK_GAME_DATA ResFONT* systemFontRes;
static DUSK_GAME_DATA const GXRenderModeObj* renderMode;
static DUSK_GAME_DATA u32 exConsoleBufferSize;
};
static void firstInit();
@@ -67,14 +67,14 @@ struct JFWSystem {
CSetUpParam::renderMode = p_modeObj;
}
static JKRExpHeap* rootHeap;
static JKRExpHeap* systemHeap;
static JKRThread* mainThread;
static JUTDbPrint* debugPrint;
static JUTResFont* systemFont;
static JUTConsoleManager* systemConsoleManager;
static JUTConsole* systemConsole;
static bool sInitCalled;
static DUSK_GAME_DATA JKRExpHeap* rootHeap;
static DUSK_GAME_DATA JKRExpHeap* systemHeap;
static DUSK_GAME_DATA JKRThread* mainThread;
static DUSK_GAME_DATA JUTDbPrint* debugPrint;
static DUSK_GAME_DATA JUTResFont* systemFont;
static DUSK_GAME_DATA JUTConsoleManager* systemConsoleManager;
static DUSK_GAME_DATA JUTConsole* systemConsole;
static DUSK_GAME_DATA bool sInitCalled;
};
#endif /* JFWSYSTEM_H */
@@ -3,7 +3,7 @@
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JGadget/search.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
namespace JGadget {
namespace binary {
@@ -2,7 +2,7 @@
#define JHICOMMONMEM_H
#include <types.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
inline u32 JHIhtonl(u32 v) {
return BSWAP32(v);
@@ -27,8 +27,8 @@ public:
virtual void disablePort() { mPortEnabled = false; }
virtual bool isPort() { return mPortEnabled; }
static u8* mTempBuf;
static u16 mRefCount;
static DUSK_GAME_DATA u8* mTempBuf;
static DUSK_GAME_DATA u16 mRefCount;
/* 0x04 */ u32 mTag;
/* 0x08 */ u16 field_0x8;
@@ -12,12 +12,23 @@ struct JORNodeEvent;
class JORMContext;
class JORServer;
// NOTE (stable game ABI): these classes stay non-polymorphic outside DEBUG
// on purpose. Making them polymorphic under PARTIAL_DEBUG would give every one of the ~250
// derived HIO classes a vptr and turn their plain `void genMessage(JORMContext*);`
// declarations into implicit virtual overrides whose definitions are #if DEBUG-gated; every
// instantiated one then fails to link (missing vtable). Closure types shared with DEBUG TUs
// either declare their own unconditional virtuals (vptr in all TUs anyway) or add a
// PARTIAL_DEBUG-only virtual dtor for vptr parity (see dAttParam_c).
class JOREventListener {
public:
#if DEBUG
JOREventListener() {}
#if TARGET_PC
virtual void listenPropertyEvent(const JORPropertyEvent*) {}
#else
virtual void listenPropertyEvent(const JORPropertyEvent*) = 0;
#endif
#endif
};
class JORReflexible : public JOREventListener {
@@ -30,7 +41,11 @@ public:
virtual void listenPropertyEvent(const JORPropertyEvent*);
virtual void listen(u32, const JOREvent*);
virtual void genObjectInfo(const JORGenEvent*);
#if TARGET_PC
virtual void genMessage(JORMContext*) {}
#else
virtual void genMessage(JORMContext*) = 0;
#endif
virtual void listenNodeEvent(const JORNodeEvent*);
#endif
};
@@ -120,7 +120,7 @@ public:
CallbackLinkList* referEventCallbackList() { return &m_eventCallbackList; }
static JORServer* getInstance() { return instance; }
static JORServer* instance;
static DUSK_GAME_DATA JORServer* instance;
/* 0x0000C */ JORMContext m_context;
/* 0x10020 */ JORReflexible* mp_rootObj;
@@ -65,13 +65,13 @@ public:
static u32 getSZSBufferSize() { return sSZSBufferSize; }
static void setSZSBufferSize(u32 size) { sSZSBufferSize = size; }
static OSMessageQueue sMessageQueue;
static DUSK_GAME_DATA OSMessageQueue sMessageQueue;
private:
static JKRAram* sAramObject;
static u32 sSZSBufferSize;
static OSMessage sMessageBuffer[4];
static JSUList<JKRAMCommand> sAramCommandList;
static DUSK_GAME_DATA JKRAram* sAramObject;
static DUSK_GAME_DATA u32 sSZSBufferSize;
static DUSK_GAME_DATA OSMessage sMessageBuffer[4];
static DUSK_GAME_DATA JSUList<JKRAMCommand> sAramCommandList;
};
inline JKRAramBlock* JKRAllocFromAram(u32 size, JKRAramHeap::EAllocMode allocMode) {
@@ -19,7 +19,7 @@ public:
};
public:
static JSUList<JKRAramBlock> sAramList;
static DUSK_GAME_DATA JSUList<JKRAramBlock> sAramList;
JKRAramHeap(u32, u32);
virtual ~JKRAramHeap();
@@ -62,9 +62,9 @@ struct JKRAramCommand {
*/
class JKRAramPiece {
public:
static OSMutex mMutex;
static DUSK_GAME_DATA OSMutex mMutex;
// TODO: fix type
static JSUList<JKRAMCommand> sAramPieceCommandList;
static DUSK_GAME_DATA JSUList<JKRAMCommand> sAramPieceCommandList;
public:
static JKRAMCommand* prepareCommand(int, uintptr_t, uintptr_t, u32, JKRAramBlock*,
@@ -60,13 +60,13 @@ public:
static void setTransBuffer(u8*, u32, JKRHeap*);
private:
static JKRAramStream* sAramStreamObject;
static OSMessage sMessageBuffer[4];
static OSMessageQueue sMessageQueue;
static DUSK_GAME_DATA JKRAramStream* sAramStreamObject;
static DUSK_GAME_DATA OSMessage sMessageBuffer[4];
static DUSK_GAME_DATA OSMessageQueue sMessageQueue;
static u8* transBuffer;
static u32 transSize;
static JKRHeap* transHeap;
static DUSK_GAME_DATA u8* transBuffer;
static DUSK_GAME_DATA u32 transSize;
static DUSK_GAME_DATA JKRHeap* transHeap;
};
inline JKRAramStream* JKRCreateAramStreamManager(s32 priority) {
@@ -4,7 +4,7 @@
#include "JSystem/JKernel/JKRCompression.h"
#include "JSystem/JKernel/JKRFileLoader.h"
#include "global.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
class JKRHeap;
@@ -242,7 +242,7 @@ public:
static void setCurrentDirID(u32 dirID) { sCurrentDirID = dirID; }
protected:
static u32 sCurrentDirID;
static DUSK_GAME_DATA u32 sCurrentDirID;
};
inline JKRCompression JKRConvertAttrToCompressionType(int attr) {
@@ -61,9 +61,9 @@ public:
static void decodeSZS(u8*, u8*, u32, u32);
static JKRCompression checkCompressed(u8*);
static JKRDecomp* sDecompObject;
static OSMessage sMessageBuffer[8];
static OSMessageQueue sMessageQueue;
static DUSK_GAME_DATA JKRDecomp* sDecompObject;
static DUSK_GAME_DATA OSMessage sMessageBuffer[8];
static DUSK_GAME_DATA OSMessageQueue sMessageQueue;
};
inline void JKRDecompress(u8* srcBuffer, u8* dstBuffer, u32 srcLength, u32 dstLength) {
@@ -55,9 +55,9 @@ public:
static bool isErrorRetry() { return errorRetry; }
// TODO: fix type
static JSUList<JKRADCommand> sDvdAramAsyncList;
static u32 sSZSBufferSize;
static bool errorRetry;
static DUSK_GAME_DATA JSUList<JKRADCommand> sDvdAramAsyncList;
static DUSK_GAME_DATA u32 sSZSBufferSize;
static DUSK_GAME_DATA bool errorRetry;
};
inline JKRAramBlock *JKRDvdToAram(s32 entrynum, u32 p2, JKRExpandSwitch expSwitch, u32 p4, u32 p5, u32 *p6) {
@@ -62,7 +62,7 @@ public:
static JSUList<JKRDvdFile>& getDvdList() { return sDvdList; }
private:
static JSUList<JKRDvdFile> sDvdList;
static DUSK_GAME_DATA JSUList<JKRDvdFile> sDvdList;
};
#endif /* JKRDVDFILE_H */
@@ -33,11 +33,11 @@ class JKRDvdFile;
*/
class JKRDvdRipper {
public:
static JSUList<JKRDMCommand> sDvdAsyncList;
static u32 sSZSBufferSize;
static bool errorRetry;
static DUSK_GAME_DATA JSUList<JKRDMCommand> sDvdAsyncList;
static DUSK_GAME_DATA u32 sSZSBufferSize;
static DUSK_GAME_DATA bool errorRetry;
#if TARGET_PC
static JKRHeap* sHeap;
static DUSK_GAME_DATA JKRHeap* sHeap;
#endif
enum EAllocDirection {
@@ -53,8 +53,8 @@ public:
static void setCurrentVolume(JKRFileLoader* fileLoader) { sCurrentVolume = fileLoader; }
static JSUList<JKRFileLoader>& getVolumeList() { return sVolumeList; }
static JKRFileLoader* sCurrentVolume;
static JSUList<JKRFileLoader> sVolumeList;
static DUSK_GAME_DATA JKRFileLoader* sCurrentVolume;
static DUSK_GAME_DATA JSUList<JKRFileLoader> sVolumeList;
};
inline bool JKRDetachResource(void* resource, JKRFileLoader* fileLoader) {
+17 -17
View File
@@ -11,12 +11,12 @@
class JKRHeap;
typedef void (*JKRErrorHandler)(void*, u32, int);
extern u8 JKRValue_DEBUGFILL_NOTUSE;
extern u8 JKRValue_DEBUGFILL_NEW;
extern u8 JKRValue_DEBUGFILL_DELETE;
DUSK_GAME_EXTERN u8 JKRValue_DEBUGFILL_NOTUSE;
DUSK_GAME_EXTERN u8 JKRValue_DEBUGFILL_NEW;
DUSK_GAME_EXTERN u8 JKRValue_DEBUGFILL_DELETE;
extern s32 fillcheck_dispcount;
extern bool data_8074A8D0_debug;
DUSK_GAME_EXTERN s32 fillcheck_dispcount;
DUSK_GAME_EXTERN bool data_8074A8D0_debug;
#if BIT_64
#define MEM_BLOCK_SIZE 0x20
@@ -194,26 +194,26 @@ public:
}
static void* getState_buf_(TState* state) { return &state->mBuf; }
static void* mCodeStart;
static void* mCodeEnd;
static void* mUserRamStart;
static void* mUserRamEnd;
static u32 mMemorySize;
static JKRAllocCallback sAllocCallback;
static JKRFreeCallback sFreeCallback;
static DUSK_GAME_DATA void* mCodeStart;
static DUSK_GAME_DATA void* mCodeEnd;
static DUSK_GAME_DATA void* mUserRamStart;
static DUSK_GAME_DATA void* mUserRamEnd;
static DUSK_GAME_DATA u32 mMemorySize;
static DUSK_GAME_DATA JKRAllocCallback sAllocCallback;
static DUSK_GAME_DATA JKRFreeCallback sFreeCallback;
static bool sDefaultFillFlag;
static DUSK_GAME_DATA bool sDefaultFillFlag;
static JKRHeap* sRootHeap;
static DUSK_GAME_DATA JKRHeap* sRootHeap;
static JKRHeap* sRootHeap2;
static DUSK_GAME_DATA JKRHeap* sRootHeap2;
static JKRHeap* sSystemHeap;
static DUSK_GAME_DATA JKRHeap* sSystemHeap;
#if !TARGET_PC // Hide sCurrentHeap, we need to make it thread local.
static JKRHeap* sCurrentHeap;
#endif
static JKRErrorHandler mErrorHandler;
static DUSK_GAME_DATA JKRErrorHandler mErrorHandler;
#if TARGET_PC
void setName(const char* name);
@@ -141,7 +141,7 @@ public:
static JKRThread* searchThread(OSThread* thread);
static JSUList<JKRThread>& getList() { return (JSUList<JKRThread>&)sThreadList; }
static JSUList<JKRThread> sThreadList;
static DUSK_GAME_DATA JSUList<JKRThread> sThreadList;
// static u8 sThreadList[12];
#if TARGET_PC
@@ -155,7 +155,7 @@ public:
virtual ~JKRIdleThread() { sThread = NULL; }
virtual void* run() { while (true); }
static void* sThread;
static DUSK_GAME_DATA void* sThread;
};
typedef void (*JKRThreadSwitch_PreCallback)(OSThread* current, OSThread* next);
@@ -181,11 +181,11 @@ public:
static u32 getTotalCount() { return sTotalCount; }
private:
static JKRThreadSwitch* sManager;
static u32 sTotalCount;
static u64 sTotalStart;
static JKRThreadSwitch_PreCallback mUserPreCallback;
static JKRThreadSwitch_PostCallback mUserPostCallback;
static DUSK_GAME_DATA JKRThreadSwitch* sManager;
static DUSK_GAME_DATA u32 sTotalCount;
static DUSK_GAME_DATA u64 sTotalStart;
static DUSK_GAME_DATA JKRThreadSwitch_PreCallback mUserPreCallback;
static DUSK_GAME_DATA JKRThreadSwitch_PostCallback mUserPostCallback;
private:
/* 0x00 */ // vtable
@@ -207,8 +207,8 @@ public:
int check();
static JSUList<JKRTask> sTaskList;
static u8 sEndMesgQueue[32];
static DUSK_GAME_DATA JSUList<JKRTask> sTaskList;
static DUSK_GAME_DATA u8 sEndMesgQueue[32];
/* 0x7C */ JSULink<JKRTask> mTaskLink;
/* 0x8C */ u8 field_0x8c[0x94 - 0x8C];
@@ -141,9 +141,9 @@ struct TAsinAcosTable {
}
};
extern TSinCosTable<13, f32> sincosTable_;
extern TAtanTable<1024, f32> atanTable_;
extern TAsinAcosTable<1024, f32> asinAcosTable_;
DUSK_GAME_EXTERN TSinCosTable<13, f32> sincosTable_;
DUSK_GAME_EXTERN TAtanTable<1024, f32> atanTable_;
DUSK_GAME_EXTERN TAsinAcosTable<1024, f32> asinAcosTable_;
inline f32 acosDegree(f32 x) {
return asinAcosTable_.acosDegree(x);
+1 -1
View File
@@ -4,7 +4,7 @@
#include <mtx.h>
#include <cmath>
#include "dusk/math.h"
#include "helpers/math.h"
typedef f32 Mtx33[3][3];
typedef f32 Mtx23[2][3];
@@ -6,7 +6,7 @@
#else
#include <dolphin.h>
#endif
#include "dusk/endian.h"
#include "helpers/endian.h"
// Struct definitions might be wrong
typedef struct bmg_header_t {
+2 -2
View File
@@ -81,8 +81,8 @@ struct data {
static unsigned int getTagCode(u32 tag) { return tag & 0xFFFF; }
static u8 getTagGroup(u32 tag) { return tag >> 0x10; }
static const BE(u32) ga4cSignature;
static const BE(u32) ga4cSignature_color;
static DUSK_GAME_DATA const BE(u32) ga4cSignature;
static DUSK_GAME_DATA const BE(u32) ga4cSignature_color;
static const int gcTagBegin = '\x1A'; // All text Control Tags will begin with this character
@@ -144,7 +144,7 @@ struct TResourceContainer {
destroyResource_color();
}
static JMessage::locale::parseCharacter_function sapfnParseCharacter_[5];
static DUSK_GAME_DATA JMessage::locale::parseCharacter_function sapfnParseCharacter_[5];
/* 0x00 */ u8 encodingType_;
/* 0x04 */ JMessage::locale::parseCharacter_function pfnParseCharacter_;
@@ -63,13 +63,13 @@ public:
JPABaseShape(u8 const*, JKRHeap*);
void setGX(JPAEmitterWorkData*) const;
static GXBlendMode st_bm[3];
static GXBlendFactor st_bf[10];
static GXLogicOp st_lo[16];
static GXCompare st_c[8];
static GXAlphaOp st_ao[4];
static GXTevColorArg st_ca[6][4];
static GXTevAlphaArg st_aa[2][4];
static DUSK_GAME_DATA GXBlendMode st_bm[3];
static DUSK_GAME_DATA GXBlendFactor st_bf[10];
static DUSK_GAME_DATA GXLogicOp st_lo[16];
static DUSK_GAME_DATA GXCompare st_c[8];
static DUSK_GAME_DATA GXAlphaOp st_ao[4];
static DUSK_GAME_DATA GXTevColorArg st_ca[6][4];
static DUSK_GAME_DATA GXTevAlphaArg st_aa[2][4];
GXBlendMode getBlendMode() const { return st_bm[pBsd->mBlendModeCfg & 0x03]; }
GXBlendFactor getBlendSrc() const { return st_bf[(pBsd->mBlendModeCfg >> 2) & 0x0F]; }
@@ -4,7 +4,7 @@
#include "JSystem/JGeometry.h"
#include <types.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
struct JPAEmitterWorkData;
@@ -2,7 +2,7 @@
#define JPARESOURCE_H
#include <types.h>
#include "dusk/endian.h"
#include "helpers/endian.h"
class JKRHeap;
struct JPAEmitterWorkData;
@@ -109,7 +109,7 @@ struct data {
}
};
static const u32 ga4cSignature;
static DUSK_GAME_DATA const u32 ga4cSignature;
};
struct TObject_TxyzRy : public TObject {
@@ -314,7 +314,7 @@ public:
>
{
TIterator_data_(const TFunctionValue_list_parameter& rParent, const f32* value) {
#if DEBUG
#if PARTIAL_DEBUG || DEBUG
pOwn_ = &rParent;
#endif
pf_ = value;
@@ -372,7 +372,7 @@ public:
return (r1.pf_ - r2.pf_) / suData_size;
}
#if DEBUG
#if PARTIAL_DEBUG || DEBUG
/* 0x00 */ const TFunctionValue_list_parameter* pOwn_;
#endif
/* 0x00 */ const f32* pf_;
@@ -425,7 +425,7 @@ public:
>
{
TIterator_data_(const TFunctionValue_hermite& rParent, const f32* value) {
#if DEBUG
#if PARTIAL_DEBUG || DEBUG
pOwn_ = &rParent;
#endif
pf_ = value;
@@ -491,7 +491,7 @@ public:
return (r1.pf_ - r2.pf_) / r1.uSize_;
}
#if DEBUG
#if PARTIAL_DEBUG || DEBUG
/* 0x00 */ const TFunctionValue_hermite* pOwn_;
/* 0x04 */ const f32* pf_;
/* 0x08 */ u32 uSize_;
@@ -10,7 +10,7 @@ namespace JStudio {
namespace fvb {
namespace data {
extern const char ga4cSignature[4];
DUSK_GAME_EXTERN const char ga4cSignature[4];
const int PARAGRAPH_DATA = 1;
@@ -4,7 +4,7 @@
namespace JStudio {
namespace data {
extern const char ga8cSignature[8];
DUSK_GAME_EXTERN const char ga8cSignature[8];
} // namespace data
} // namespace JStudio
@@ -6,7 +6,7 @@
#define m_PI_D 3.141592653589793
#ifndef __MWERKS__
#include "dusk/math.h"
#include "helpers/math.h"
#endif
namespace JStudio {
@@ -91,7 +91,7 @@ struct TVariableValue {
pOutput_ = (param_1 != NULL) ? param_1 : &soOutput_none_;
}
static TOutput_none_ soOutput_none_;
static DUSK_GAME_DATA TOutput_none_ soOutput_none_;
/* 0x00 */ f32 mValue;
/* 0x04 */ u32 field_0x4;
@@ -249,9 +249,9 @@ struct TAdaptor_actor : public TAdaptor {
/* 0x10 */ TVariableValue mValue[14];
static u32 const sauVariableValue_3_TRANSLATION_XYZ[3];
static u32 const sauVariableValue_3_ROTATION_XYZ[3];
static u32 const sauVariableValue_3_SCALING_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_3_TRANSLATION_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_3_ROTATION_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_3_SCALING_XYZ[3];
}; // Size: 0x128
struct TObject_actor : public TObject {
@@ -267,8 +267,8 @@ struct TAdaptor_ambientLight : public TAdaptor {
/* 0x10 */ TVariableValue mValue[4];
static u32 const sauVariableValue_3_COLOR_RGB[3];
static u32 const sauVariableValue_4_COLOR_RGBA[4];
static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR_RGB[3];
static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR_RGBA[4];
};
struct TObject_ambientLight : public TObject {
@@ -299,9 +299,9 @@ struct TAdaptor_camera : public TAdaptor {
/* 0x10 */ TVariableValue mValue[12];
static u32 const sauVariableValue_3_POSITION_XYZ[3];
static u32 const sauVariableValue_3_TARGET_POSITION_XYZ[3];
static u32 const sauVariableValue_2_DISTANCE_NEAR_FAR[2];
static DUSK_GAME_DATA u32 const sauVariableValue_3_POSITION_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_3_TARGET_POSITION_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_2_DISTANCE_NEAR_FAR[2];
};
struct TObject_camera : public TObject {
@@ -322,9 +322,9 @@ struct TAdaptor_fog : public TAdaptor {
/* 0x10 */ TVariableValue mValue[6];
static u32 const sauVariableValue_3_COLOR_RGB[3];
static u32 const sauVariableValue_4_COLOR_RGBA[4];
static u32 const sauVariableValue_2_RANGE_BEGIN_END[2];
static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR_RGB[3];
static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR_RGBA[4];
static DUSK_GAME_DATA u32 const sauVariableValue_2_RANGE_BEGIN_END[2];
};
struct TObject_fog : public TObject {
@@ -351,11 +351,11 @@ struct TAdaptor_light : public TAdaptor {
/* 0x10 */ TVariableValue mValue[13];
static u32 const sauVariableValue_3_COLOR_RGB[3];
static u32 const sauVariableValue_4_COLOR_RGBA[4];
static u32 const sauVariableValue_3_POSITION_XYZ[3];
static u32 const sauVariableValue_3_TARGET_POSITION_XYZ[3];
static u32 const sauVariableValue_2_DIRECTION_THETA_PHI[2];
static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR_RGB[3];
static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR_RGBA[4];
static DUSK_GAME_DATA u32 const sauVariableValue_3_POSITION_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_3_TARGET_POSITION_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_2_DIRECTION_THETA_PHI[2];
};
struct TObject_light : public TObject {
@@ -396,13 +396,13 @@ struct TAdaptor_particle : public TAdaptor {
/* 0x10 */ TVariableValue mValue[20];
static u32 const sauVariableValue_3_TRANSLATION_XYZ[3];
static u32 const sauVariableValue_3_ROTATION_XYZ[3];
static u32 const sauVariableValue_3_SCALING_XYZ[3];
static u32 const sauVariableValue_3_COLOR_RGB[3];
static u32 const sauVariableValue_4_COLOR_RGBA[4];
static u32 const sauVariableValue_3_COLOR1_RGB[3];
static u32 const sauVariableValue_4_COLOR1_RGBA[4];
static DUSK_GAME_DATA u32 const sauVariableValue_3_TRANSLATION_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_3_ROTATION_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_3_SCALING_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR_RGB[3];
static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR_RGBA[4];
static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR1_RGB[3];
static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR1_RGBA[4];
};
struct TObject_particle : public TObject {
@@ -440,7 +440,7 @@ struct TAdaptor_sound : public TAdaptor {
/* 0x10 */ TVariableValue mValue[13];
static u32 const sauVariableValue_3_POSITION_XYZ[3];
static DUSK_GAME_DATA u32 const sauVariableValue_3_POSITION_XYZ[3];
}; // Size: 0x114
struct TObject_sound : public TObject {
@@ -21,8 +21,8 @@ const int BLOCK_NONE = -1;
// Used to expand a signed 24 int to a signed 32 int
const u32 gu32Mask_TSequence_value_signExpansion = 0xFF000000;
extern const BE(u32) ga4cSignature; // 'STB/0'
extern const s32 gauDataSize_TEParagraph_data[8];
DUSK_GAME_EXTERN const BE(u32) ga4cSignature; // 'STB/0'
DUSK_GAME_EXTERN const s32 gauDataSize_TEParagraph_data[8];
inline void toString_block(char* a5c, u32 arg1) {
// from debug, todo
@@ -94,7 +94,7 @@ struct TAdaptor_sound : public JStudio::TAdaptor_sound {
void set_bPermit_onExit_notEnd_(bool param_1) { field_0x11c = param_1; }
static TVVOSetValue_ saoVVOSetValue_[6];
static DUSK_GAME_DATA TVVOSetValue_ saoVVOSetValue_[6];
/* 0x114 */ TCreateObject* pCreateObject_;
/* 0x118 */ JAISoundHandle opJAISoundHandle_;
@@ -131,8 +131,8 @@ struct TAdaptor_actor : public JStudio::TAdaptor_actor, public JStudio_JStage::T
JStage::TActor* get_pJSG_() { return (JStage::TActor*) pJSGObject_; }
static const TVVOutputObject saoVVOutput_[];
static const TVVOutput_ANIMATION_FRAME_ saoVVOutput_ANIMATION_FRAME_[];
static DUSK_GAME_DATA const TVVOutputObject saoVVOutput_[];
static DUSK_GAME_DATA const TVVOutput_ANIMATION_FRAME_ saoVVOutput_ANIMATION_FRAME_[];
/* 0x130 */ u32 field_0x130;
/* 0x134 */ u32 field_0x134;
@@ -187,7 +187,7 @@ struct TAdaptor_camera : public JStudio::TAdaptor_camera, public TAdaptor_object
JStage::TCamera* get_pJSG_() { return (JStage::TCamera*)pJSGObject_; }
static TVVOutput saoVVOutput_[];
static DUSK_GAME_DATA TVVOutput saoVVOutput_[];
/* 0x108 */ int field_0x108;
/* 0x10C */ JStage::TObject* field_0x10c;
@@ -211,7 +211,7 @@ struct TAdaptor_fog : public JStudio::TAdaptor_fog, public TAdaptor_object_ {
JStage::TFog* get_pJSG_() { return (JStage::TFog*)pJSGObject_; }
static TVariableValueOutput_object_<TAdaptor_fog, JStage::TFog> saoVVOutput_[];
static DUSK_GAME_DATA TVariableValueOutput_object_<TAdaptor_fog, JStage::TFog> saoVVOutput_[];
};
template<class TAdaptor, class TStageObject>
@@ -285,7 +285,7 @@ struct TAdaptor_light : public JStudio::TAdaptor_light, public TAdaptor_object_
int field_0x11c;
static TVVOutput_direction_ saoVVOutput_direction_[6];
static DUSK_GAME_DATA TVVOutput_direction_ saoVVOutput_direction_[6];
};
bool
@@ -2,7 +2,7 @@
#define JSUINPUTSTREAM_H
#include "JSystem/JSupport/JSUIosBase.h"
#include "dusk/endian.h"
#include "helpers/endian.h"
/**
* @ingroup jsystem-jsupport
@@ -55,12 +55,16 @@ public:
void prepend(JUTCacheFont::TGlyphCacheInfo*);
virtual ~JUTCacheFont();
#if TARGET_PC
virtual void loadImage(int, GXTexMapID FONT_DRAW_CTX);
#else
virtual void loadImage(int, GXTexMapID);
#endif
virtual void setBlock();
void setPagingType(EPagingType type) { mPagingType = type; }
static u32 calcCacheSize(u32 param_0, int param_1) { return (ALIGN_NEXT(param_0, 0x20) + 0x40) * param_1; }
static u32 calcCacheSize(u32 param_0, int param_1) { return (ALIGN_NEXT(param_0, 0x20) + sizeof(TCachePage)) * param_1; }
TGXTexObj* getTexObj(void* buffer) const { return &((TCachePage*)buffer)->mTexObj; }
void delete_and_initialize() { deleteMemBlocks_CacheFont(); initialize_state(); }
@@ -152,7 +152,7 @@ public:
static JUTConsoleManager* const getManager() { return sManager; }
static JUTConsoleManager* sManager;
static DUSK_GAME_DATA JUTConsoleManager* sManager;
#ifdef __MWERKS__
typedef JGadget::TLinkList<JUTConsole, -offsetof(JUTConsole, mListNode)> ConsoleList;

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