Files
tp/include/JSystem/J3DGraphBase/J3DDrawBuffer.h
T
Jasper St. Pierre 462d71cbef Makefile fixes / JUTNameTab (#129)
* 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>
2021-05-10 11:54:07 -04:00

52 lines
1.1 KiB
C++

#ifndef J3DDRAWBUFFER_H
#define J3DDRAWBUFFER_H
#include "JSystem/J3DGraphBase/J3DSys.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/types.h"
class J3DDrawBuffer;
class J3DPacket;
class J3DDrawPacket;
class J3DMatPacket;
class J3DShapePacket;
typedef void (*J3DDrawBuffer_DrawFunc)(const J3DDrawBuffer* this_);
class J3DDrawBuffer {
public:
~J3DDrawBuffer();
void initialize();
J3DError allocBuffer(u32);
void frameInit();
void entryMatSort(J3DMatPacket*);
void entryMatAnmSort(J3DMatPacket*);
void entryZSort(J3DMatPacket*);
void entryModelSort(J3DMatPacket*);
void entryInvalidSort(J3DMatPacket*);
bool entryNonSort(J3DMatPacket*);
bool entryImm(J3DPacket* pPacket, u16 index);
void draw() const;
void drawHead() const;
void drawTail() const;
inline void calcZRatio();
public:
J3DPacket** mpBuf;
u32 mBufSize;
u32 mDrawType;
u32 mSortType;
float mZNear;
float mZFar;
float mZRatio;
Mtx* mpZMtx;
J3DPacket* mpCallBackPacket;
static u8 sortFuncTable[72];
static u8 drawFuncTable[24];
static u8 entryNum[4 + 4 /* padding */];
};
#endif /* J3DDRAWBUFFER_H */