mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-27 07:16:57 -04:00
Switch to Aurora headers for GX/VI
Replace GXSetArray() with GXSETARRAY() taking in size everywhere Fix a ton of structs/enums being referred to with underscore name.
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
#include "JSystem/J3DGraphAnimator/J3DAnimation.h"
|
||||
#include "JSystem/JUtility/JUTPalette.h"
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
typedef struct _GXColorS10 GXColorS10;
|
||||
class J2DScreen;
|
||||
struct ResTIMG;
|
||||
|
||||
@@ -66,7 +64,7 @@ public:
|
||||
}
|
||||
}
|
||||
virtual ~J2DAnmVtxColor() {}
|
||||
virtual void getColor(u8, u16, _GXColor*) const {}
|
||||
virtual void getColor(u8, u16, GXColor*) const {}
|
||||
u16 getAnmTableNum(u8 param_0) const {
|
||||
J3D_PANIC(342, param_0 < 2, "Error : range over.");
|
||||
return mAnmTableNum[param_0];
|
||||
@@ -101,7 +99,7 @@ public:
|
||||
}
|
||||
}
|
||||
virtual ~J2DAnmVtxColorKey() {}
|
||||
virtual void getColor(u8, u16, _GXColor*) const;
|
||||
virtual void getColor(u8, u16, GXColor*) const;
|
||||
|
||||
/* 0x24 */ J3DAnmColorKeyTable* mInfoTable[2];
|
||||
/* 0x2C */ s16* mRValues;
|
||||
@@ -122,7 +120,7 @@ public:
|
||||
}
|
||||
}
|
||||
virtual ~J2DAnmVtxColorFull() {}
|
||||
virtual void getColor(u8, u16, _GXColor*) const;
|
||||
virtual void getColor(u8, u16, GXColor*) const;
|
||||
|
||||
/* 0x24 */ J3DAnmColorFullTable* mInfoTable[2];
|
||||
/* 0x2C */ u8* mRValues;
|
||||
@@ -400,7 +398,7 @@ public:
|
||||
}
|
||||
virtual ~J2DAnmColor() {}
|
||||
virtual void searchUpdateMaterialID(J2DScreen*);
|
||||
virtual void getColor(u16, _GXColor*) const {}
|
||||
virtual void getColor(u16, GXColor*) const {}
|
||||
u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; }
|
||||
u16 getUpdateMaterialID(u16 i) const {
|
||||
J3D_PANIC(224, i < mUpdateMaterialNum, "Error : range over.");
|
||||
@@ -430,7 +428,7 @@ public:
|
||||
mInfoTable = NULL;
|
||||
}
|
||||
virtual ~J2DAnmColorKey() {}
|
||||
virtual void getColor(u16, _GXColor*) const;
|
||||
virtual void getColor(u16, GXColor*) const;
|
||||
|
||||
/* 0x30 */ s16* mRValues;
|
||||
/* 0x34 */ s16* mGValues;
|
||||
@@ -468,7 +466,7 @@ public:
|
||||
mInfoTable = NULL;
|
||||
}
|
||||
virtual ~J2DAnmColorFull() {}
|
||||
virtual void getColor(u16, _GXColor*) const;
|
||||
virtual void getColor(u16, GXColor*) const;
|
||||
|
||||
/* 0x30 */ u8* mRValues;
|
||||
/* 0x34 */ u8* mGValues;
|
||||
|
||||
@@ -69,7 +69,7 @@ class J2DTevBlock {
|
||||
public:
|
||||
virtual void initialize() {}
|
||||
virtual void setGX() {}
|
||||
virtual void loadTexture(_GXTexMapID, u32) {}
|
||||
virtual void loadTexture(GXTexMapID, u32) {}
|
||||
virtual u32 getType() = 0;
|
||||
virtual u8 getMaxStage() = 0;
|
||||
virtual void setTexNo(u32, u16) {}
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
|
||||
virtual void initialize();
|
||||
virtual void setGX();
|
||||
virtual void loadTexture(_GXTexMapID, u32);
|
||||
virtual void loadTexture(GXTexMapID, u32);
|
||||
virtual u32 getType() { return 'TVB1'; }
|
||||
virtual u8 getMaxStage() { return 1; }
|
||||
virtual void setTexNo(u32 index, u16 texNo) {
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
|
||||
virtual void initialize();
|
||||
virtual void setGX();
|
||||
virtual void loadTexture(_GXTexMapID, u32);
|
||||
virtual void loadTexture(GXTexMapID, u32);
|
||||
virtual u32 getType() { return 'TVB2'; }
|
||||
virtual u8 getMaxStage() { return 2; }
|
||||
virtual void setTexNo(u32 index, u16 texNo) {
|
||||
@@ -406,7 +406,7 @@ public:
|
||||
|
||||
virtual void initialize();
|
||||
virtual void setGX();
|
||||
virtual void loadTexture(_GXTexMapID, u32);
|
||||
virtual void loadTexture(GXTexMapID, u32);
|
||||
virtual u32 getType() { return 'TVB4'; }
|
||||
virtual u8 getMaxStage() { return 4; }
|
||||
virtual void setTexNo(u32 index, u16 texNo) {
|
||||
@@ -548,7 +548,7 @@ public:
|
||||
|
||||
virtual void initialize();
|
||||
virtual void setGX();
|
||||
virtual void loadTexture(_GXTexMapID, u32);
|
||||
virtual void loadTexture(GXTexMapID, u32);
|
||||
virtual u32 getType() { return 'TVB8'; }
|
||||
virtual u8 getMaxStage() { return 8; }
|
||||
virtual void setTexNo(u32 index, u16 texNo) {
|
||||
@@ -691,7 +691,7 @@ public:
|
||||
|
||||
virtual void initialize();
|
||||
virtual void setGX();
|
||||
virtual void loadTexture(_GXTexMapID, u32);
|
||||
virtual void loadTexture(GXTexMapID, u32);
|
||||
virtual u32 getType() { return 'TV16'; }
|
||||
virtual u8 getMaxStage() { return 16; }
|
||||
virtual void setTexNo(u32 index, u16 texNo) {
|
||||
|
||||
@@ -40,8 +40,6 @@ struct J2DMaterialBlock {
|
||||
BE(u32) field_0x64;
|
||||
};
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
typedef struct _GXColorS10 GXColorS10;
|
||||
struct J2DAlphaCompInfo;
|
||||
struct J2DBlendInfo;
|
||||
struct J2DColorChanInfo;
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
|
||||
setCullBack(mode);
|
||||
}
|
||||
/* vt 0x20 */ virtual void setCullBack(_GXCullMode cmode);
|
||||
/* vt 0x20 */ virtual void setCullBack(GXCullMode cmode);
|
||||
/* vt 0x24 */ virtual void setAlpha(u8 alpha) {
|
||||
mAlpha = alpha;
|
||||
};
|
||||
|
||||
@@ -130,12 +130,12 @@ public:
|
||||
JGeometry::TBox2<f32>(param_4, param_5, param_4 + param_6, param_5 + param_7));
|
||||
}
|
||||
virtual void drawOut(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&);
|
||||
virtual void load(_GXTexMapID param_0, u8 param_1) {
|
||||
virtual void load(GXTexMapID param_0, u8 param_1) {
|
||||
if (param_1 < mTextureNum && param_1 < 2 && mTexture[param_1] != NULL) {
|
||||
mTexture[param_1]->load(param_0);
|
||||
}
|
||||
}
|
||||
virtual void load(u8 param_0) { load((_GXTexMapID)param_0, param_0); }
|
||||
virtual void load(u8 param_0) { load((GXTexMapID)param_0, param_0); }
|
||||
virtual void setBlendRatio(f32 param_0, f32 param_1) {
|
||||
setBlendColorRatio(param_0, param_1);
|
||||
setBlendAlphaRatio(param_0, param_1);
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
virtual ~J2DPictureEx();
|
||||
virtual void setCullBack(bool);
|
||||
virtual void setCullBack(_GXCullMode);
|
||||
virtual void setCullBack(GXCullMode);
|
||||
virtual void setAlpha(u8);
|
||||
virtual void drawSelf(f32, f32, f32 (*)[3][4]);
|
||||
virtual bool isUsed(ResTIMG const*);
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
virtual void drawOut(f32, f32, f32, f32, f32, f32);
|
||||
virtual void drawOut(f32, f32, f32, f32, f32, f32, f32, f32);
|
||||
virtual void drawOut(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&);
|
||||
virtual void load(_GXTexMapID, u8);
|
||||
virtual void load(GXTexMapID, u8);
|
||||
virtual void load(u8);
|
||||
virtual void setBlendColorRatio(f32, f32);
|
||||
virtual void setBlendAlphaRatio(f32, f32);
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
|
||||
virtual ~J2DTextBoxEx();
|
||||
virtual void setCullBack(bool);
|
||||
virtual void setCullBack(_GXCullMode);
|
||||
virtual void setCullBack(GXCullMode);
|
||||
virtual void setAlpha(u8);
|
||||
virtual void drawSelf(f32, f32, f32 (*)[3][4]);
|
||||
virtual bool isUsed(ResTIMG const*);
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
virtual ~J2DWindowEx();
|
||||
virtual void setCullBack(bool);
|
||||
virtual void setCullBack(_GXCullMode);
|
||||
virtual void setCullBack(GXCullMode);
|
||||
virtual void setAlpha(u8);
|
||||
virtual void drawSelf(f32, f32, f32 (*)[3][4]);
|
||||
virtual bool isUsed(ResTIMG const*);
|
||||
|
||||
@@ -53,9 +53,6 @@ struct J3DAnmTransform_ANK1 {
|
||||
/* 0x20 */ BE(u32) translation_data_offset;
|
||||
};
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
typedef struct _GXColorS10 GXColorS10;
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
*
|
||||
@@ -837,8 +834,8 @@ public:
|
||||
class J3DAnmTevRegKey : public J3DAnmBase {
|
||||
public:
|
||||
J3DAnmTevRegKey();
|
||||
void getTevColorReg(u16, _GXColorS10*) const;
|
||||
void getTevKonstReg(u16, _GXColor*) const;
|
||||
void getTevColorReg(u16, GXColorS10*) const;
|
||||
void getTevKonstReg(u16, GXColor*) const;
|
||||
void searchUpdateMaterialID(J3DMaterialTable*);
|
||||
void searchUpdateMaterialID(J3DModelData*);
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ void J3DGDSetTexLookupMode(GXTexMapID, GXTexWrapMode, GXTexWrapMode, GXTexFilter
|
||||
void J3DGDSetTexImgAttr(GXTexMapID, u16, u16, GXTexFmt);
|
||||
void J3DGDSetTexImgPtr(GXTexMapID, void*);
|
||||
void J3DGDSetTexImgPtrRaw(GXTexMapID, u32);
|
||||
void J3DGDSetTexTlut(GXTexMapID, u32, _GXTlutFmt);
|
||||
void J3DGDLoadTlut(void*, u32, _GXTlutSize);
|
||||
void J3DGDSetTexTlut(GXTexMapID, u32, GXTlutFmt);
|
||||
void J3DGDLoadTlut(void*, u32, GXTlutSize);
|
||||
void J3DGDSetIndTexMtx(GXIndTexMtxID, f32 (*)[3], s8);
|
||||
void J3DGDSetIndTexCoordScale(GXIndTexStageID, GXIndTexScale, GXIndTexScale, GXIndTexScale,
|
||||
GXIndTexScale);
|
||||
@@ -93,7 +93,7 @@ void J3DGDSetTevOrder(GXTevStageID, GXTexCoordID, GXTexMapID, GXChannelID, GXTex
|
||||
void J3DGDSetTevKColor(GXTevKColorID, GXColor);
|
||||
void J3DGDSetTevColorS10(GXTevRegID, GXColorS10);
|
||||
void J3DGDSetFog(GXFogType, f32, f32, f32, f32, GXColor);
|
||||
void J3DGDSetFogRangeAdj(u8, u16, _GXFogAdjTable*);
|
||||
void J3DGDSetFogRangeAdj(GXBool, u16, _GXFogAdjTable*);
|
||||
|
||||
inline void J3DGDSetNumChans(u8 numChans) {
|
||||
J3DGDWriteXFCmd(0x1009, numChans);
|
||||
|
||||
@@ -125,8 +125,8 @@ public:
|
||||
static const int kVcdVatDLSize = 0xC0;
|
||||
|
||||
void initialize();
|
||||
void addTexMtxIndexInDL(_GXAttr, u32);
|
||||
void addTexMtxIndexInVcd(_GXAttr);
|
||||
void addTexMtxIndexInDL(GXAttr, u32);
|
||||
void addTexMtxIndexInVcd(GXAttr);
|
||||
void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
|
||||
u16 countBumpMtxNum() const;
|
||||
void loadVtxArray() const;
|
||||
|
||||
@@ -145,13 +145,13 @@ struct J3DSys {
|
||||
void setModelDrawMtx(Mtx* pMtxArr) {
|
||||
J3D_ASSERT_NULLPTR(230, pMtxArr);
|
||||
mModelDrawMtx = pMtxArr;
|
||||
GXSetArray(GX_POS_MTX_ARRAY, mModelDrawMtx, sizeof(*mModelDrawMtx));
|
||||
GXSETARRAY(GX_POS_MTX_ARRAY, mModelDrawMtx, sizeof(*mModelDrawMtx), sizeof(*mModelDrawMtx));
|
||||
}
|
||||
|
||||
void setModelNrmMtx(Mtx33* pMtxArr) {
|
||||
J3D_ASSERT_NULLPTR(241, pMtxArr);
|
||||
mModelNrmMtx = pMtxArr;
|
||||
GXSetArray(GX_NRM_MTX_ARRAY, mModelNrmMtx, sizeof(*mModelNrmMtx));
|
||||
GXSETARRAY(GX_POS_MTX_ARRAY, mModelNrmMtx, sizeof(*mModelNrmMtx), sizeof(*mModelNrmMtx));
|
||||
}
|
||||
|
||||
void* getVtxPos() { return mVtxPos; }
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <dolphin/mtx.h>
|
||||
#include "dusk/endian_gx.hpp"
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
class J3DModel;
|
||||
class J3DAnmVtxColor;
|
||||
class J3DVertexBuffer;
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#include "JSystem/JUtility/JUTXfb.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
typedef struct _GXRenderModeObj GXRenderModeObj;
|
||||
class JKRHeap;
|
||||
|
||||
typedef void (*JFWDisplayUnkFunc)(void);
|
||||
@@ -49,7 +47,7 @@ public:
|
||||
|
||||
void ctor_subroutine(bool);
|
||||
JFWDisplay(JKRHeap*, JUTXfb::EXfbNumber, bool);
|
||||
static JFWDisplay* createManager(_GXRenderModeObj const*, JKRHeap*,
|
||||
static JFWDisplay* createManager(GXRenderModeObj const*, JKRHeap*,
|
||||
JUTXfb::EXfbNumber, bool);
|
||||
void prepareCopyDisp();
|
||||
void drawendXfb_single();
|
||||
@@ -61,9 +59,9 @@ public:
|
||||
void waitBlanking(int);
|
||||
void threadSleep(s64);
|
||||
void clearEfb_init();
|
||||
void clearEfb(int, int, int, int, _GXColor);
|
||||
void clearEfb(int, int, int, int, GXColor);
|
||||
void clearEfb();
|
||||
void clearEfb(_GXColor);
|
||||
void clearEfb(GXColor);
|
||||
void calcCombinationRatio();
|
||||
|
||||
virtual void beginRender();
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <dolphin/types.h>
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
typedef struct _GXRenderModeObj GXRenderModeObj;
|
||||
class JKRExpHeap;
|
||||
class JKRThread;
|
||||
class JUTConsole;
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
void setGlobalAlpha(u8 alpha) { mGlobalPrmClr.a = alpha; }
|
||||
u8 getGlobalAlpha() const { return mGlobalPrmClr.a; }
|
||||
void getGlobalPrmColor(GXColor& color) { color = mGlobalPrmClr; }
|
||||
void getGlobalPrmColor(_GXColor* color) const { *color = mGlobalPrmClr; }
|
||||
void getGlobalPrmColor(GXColor* color) const { *color = mGlobalPrmClr; }
|
||||
void setGlobalPrmColor(u8 r, u8 g, u8 b) { mGlobalPrmClr.r = r; mGlobalPrmClr.g = g; mGlobalPrmClr.b = b; }
|
||||
void setGlobalEnvColor(u8 r, u8 g, u8 b) { mGlobalEnvClr.r = r; mGlobalEnvClr.g = g; mGlobalEnvClr.b = b; }
|
||||
void setVolumeSize(u16 size) { mVolumeSize = size; }
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
|
||||
namespace JStudio {
|
||||
namespace data {
|
||||
enum TEOperationData {
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
void prepend(JUTCacheFont::TGlyphCacheInfo*);
|
||||
|
||||
virtual ~JUTCacheFont();
|
||||
virtual void loadImage(int, _GXTexMapID);
|
||||
virtual void loadImage(int, GXTexMapID);
|
||||
virtual void setBlock();
|
||||
|
||||
void setPagingType(EPagingType type) { mPagingType = type; }
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
typedef struct _GXRenderModeObj GXRenderModeObj;
|
||||
typedef struct OSContext OSContext;
|
||||
class JUTDirectPrint;
|
||||
|
||||
@@ -18,10 +17,10 @@ class JUTDirectPrint;
|
||||
*/
|
||||
class JUTExternalFB {
|
||||
public:
|
||||
JUTExternalFB(_GXRenderModeObj*, GXGamma, void*, u32);
|
||||
JUTExternalFB(GXRenderModeObj*, GXGamma, void*, u32);
|
||||
|
||||
private:
|
||||
/* 0x00 */ _GXRenderModeObj* mRenderMode;
|
||||
/* 0x00 */ GXRenderModeObj* mRenderMode;
|
||||
/* 0x04 */ u32 mSize;
|
||||
/* 0x08 */ u32 field_0x08;
|
||||
/* 0x0C */ u16 field_0x0C;
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
virtual int getFontType() const;
|
||||
virtual ResFONT* getResFont() const;
|
||||
virtual bool isLeadByte(int) const;
|
||||
virtual void loadImage(int, _GXTexMapID);
|
||||
virtual void loadImage(int, GXTexMapID);
|
||||
virtual void setBlock();
|
||||
|
||||
JUTResFont(ResFONT const*, JKRHeap*);
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
bool initiate(ResFONT const*, JKRHeap*);
|
||||
bool protected_initiate(ResFONT const*, JKRHeap*);
|
||||
void countBlock();
|
||||
void loadFont(int, _GXTexMapID, JUTFont::TWidth*);
|
||||
void loadFont(int, GXTexMapID, JUTFont::TWidth*);
|
||||
int getFontCode(int) const;
|
||||
int convertSjis(int, BE(u16)*) const;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <dolphin/gx.h>
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/vi.h>
|
||||
|
||||
typedef u8 (*Pattern)[2];
|
||||
|
||||
@@ -54,7 +55,7 @@ private:
|
||||
static OSTick sVideoInterval;
|
||||
|
||||
private:
|
||||
/* 0x04 */ _GXRenderModeObj* mRenderObj;
|
||||
/* 0x04 */ GXRenderModeObj* mRenderObj;
|
||||
/* 0x08 */ u32 field_0x8;
|
||||
/* 0x0C */ u32 mRetraceCount;
|
||||
/* 0x10 */ u32 field_0x10;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "JSystem/JUtility/JUTVideo.h"
|
||||
|
||||
typedef struct _GXRenderModeObj GXRenderModeObj;
|
||||
class JKRHeap;
|
||||
|
||||
/**
|
||||
@@ -21,7 +20,7 @@ public:
|
||||
|
||||
void clearIndex();
|
||||
void common_init(int);
|
||||
JUTXfb(_GXRenderModeObj const*, JKRHeap*, JUTXfb::EXfbNumber);
|
||||
JUTXfb(GXRenderModeObj const*, JKRHeap*, JUTXfb::EXfbNumber);
|
||||
~JUTXfb();
|
||||
void delXfb(int);
|
||||
static JUTXfb* createManager(JKRHeap*, JUTXfb::EXfbNumber);
|
||||
|
||||
Reference in New Issue
Block a user