mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 15:01:53 -04:00
462d71cbef
* Makefile: Fix issues with iconv causing it to break under devkitPro / msys The version of iconv included in devkitPro does not have a -o option, so replace it with normal shell redirection. Also, SHIFT-JIS does not have a mapping for ~, so output the Windows CP932 variant instead, which does. See: https://en.wikipedia.org/wiki/Tilde#Unicode_and_Shift_JIS_encoding_of_wave_dash https://en.wikipedia.org/wiki/Code_page_932_(Microsoft_Windows)#Single-byte_character_differences * Update diff configuration -Bbinary doesn't seem to work with my copy of bjdump (it says it can't decode unknown architecture) Cheese things by using expected/ instead of having the user place things manually. * JUTNameTab * J3DPacket / J3DDrawBuffer * format Co-authored-by: lepelog <lepelog@users.noreply.github.com>
115 lines
2.3 KiB
C++
115 lines
2.3 KiB
C++
#ifndef J3DPACKET_H
|
|
#define J3DPACKET_H
|
|
|
|
#include "JSystem/J3DGraphBase/J3DSys.h"
|
|
#include "dolphin/mtx/mtx.h"
|
|
#include "dolphin/types.h"
|
|
|
|
class J3DMatPacket;
|
|
|
|
class J3DDrawBuffer;
|
|
class J3DMaterial;
|
|
class J3DMaterialAnm;
|
|
class J3DModel;
|
|
class J3DMtxBuffer;
|
|
class J3DShape;
|
|
class J3DTexMtx;
|
|
class J3DTexture;
|
|
|
|
class J3DDisplayListObj {
|
|
public:
|
|
J3DError newDisplayList(u32);
|
|
J3DError newSingleDisplayList(u32);
|
|
J3DError single_To_Double();
|
|
void setSingleDisplayList(void*, u32);
|
|
void swapBuffer();
|
|
void callDL() const;
|
|
void beginDL();
|
|
void endDL();
|
|
void beginPatch();
|
|
void endPatch();
|
|
|
|
static u8 sGDLObj[16];
|
|
static u8 sInterruptFlag[4 + 4 /* padding */];
|
|
|
|
void* mpData[2];
|
|
u32 mSize;
|
|
u32 mCapacity;
|
|
};
|
|
|
|
class J3DPacket {
|
|
public:
|
|
void addChildPacket(J3DPacket* pChild);
|
|
|
|
inline void clear() {
|
|
mpNextSibling = NULL;
|
|
mpFirstChild = NULL;
|
|
}
|
|
|
|
virtual bool entry(J3DDrawBuffer* pDrawBuffer);
|
|
virtual void draw();
|
|
virtual ~J3DPacket();
|
|
|
|
public:
|
|
J3DPacket* mpNextSibling;
|
|
J3DPacket* mpFirstChild;
|
|
};
|
|
|
|
class J3DDrawPacket : public J3DPacket {
|
|
public:
|
|
J3DDrawPacket();
|
|
~J3DDrawPacket();
|
|
J3DError newDisplayList(u32);
|
|
J3DError newSingleDisplayList(u32);
|
|
virtual void draw();
|
|
|
|
public:
|
|
void* mpUserData;
|
|
int mFlags;
|
|
char mPad0[0x0C]; // unk
|
|
J3DDisplayListObj* mpDisplayListObj;
|
|
J3DTexMtx* mpTexMtx;
|
|
};
|
|
|
|
class J3DShapePacket : public J3DDrawPacket {
|
|
public:
|
|
J3DShapePacket();
|
|
void calcDifferedBufferSize(u32);
|
|
void newDifferedDisplayList(u32);
|
|
void prepareDraw() const;
|
|
void drawFast();
|
|
|
|
virtual ~J3DShapePacket();
|
|
virtual void draw();
|
|
|
|
public:
|
|
J3DShape* mpShape;
|
|
J3DMtxBuffer* mpMtxBuffer;
|
|
Mtx* mpViewMtx;
|
|
u32 mDiffFlag;
|
|
J3DModel* mpModel;
|
|
};
|
|
|
|
class J3DMatPacket : public J3DDrawPacket {
|
|
public:
|
|
J3DMatPacket();
|
|
void addShapePacket(J3DShapePacket*);
|
|
void beginDiff();
|
|
void endDiff();
|
|
void isSame(J3DMatPacket*) const;
|
|
|
|
virtual ~J3DMatPacket();
|
|
virtual bool entry(J3DDrawBuffer* pDrawBuffer);
|
|
virtual void draw();
|
|
|
|
public:
|
|
J3DShapePacket* mpShapePacket;
|
|
J3DShapePacket* mpFirstShapePacket;
|
|
J3DMaterial* mpMaterial;
|
|
s32 mSortFlags;
|
|
J3DTexture* mpTexture;
|
|
J3DMaterialAnm* mpMaterialAnm;
|
|
};
|
|
|
|
#endif /* J3DPACKET_H */
|