Files
tp/include/JSystem/J3DGraphBase/J3DDrawBuffer.h
T
TakaRikka f8979749e3 j2d / map_path work, d_drawlist / d_attention cleanup (#208)
* work on fop actor / actor mng, daalink, d_a_obj_item

* d_a_title mostly decompiled

* daalink / d_event / JMessage / dmsg_out_font work

* msg_scrn_base / msg_scrn_boss

* some work on mDo machine, d_menu_save, d_tresure, and various

* remove asm

* progress

* finish d_menu_save / d_pane_class_alpha / d_pane_class / rename some data

* rename more data

* remove asm / progress

* match all of d_pane_class

* fixes / some dKankyo doc

* bunch of j2d work. d_drawlist / d_attention cleanup

* progress / asm

* cleanup wip

* decompile JStage

* setup some more JStudio structs

* set up d_demo classes

* some d_demo work

* cleanup dolphin os stuff

* some initial dEvent documentation

* some At collision documentation

* match JUTConsole::doDraw

* dbgs work / split up some of d_a_alink into .inc files

* d_a_alink_spinner work
2022-08-30 15:22:17 -06:00

55 lines
1.4 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() { initialize(); }
~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();
void setNonSort() { mSortType = 5; }
void setZSort() { mSortType = 2; }
public:
/* 0x00 */ J3DPacket** mpBuf;
/* 0x04 */ u32 mBufSize;
/* 0x08 */ u32 mDrawType;
/* 0x0C */ u32 mSortType;
/* 0x10 */ f32 mZNear;
/* 0x14 */ f32 mZFar;
/* 0x18 */ f32 mZRatio;
/* 0x1C */ Mtx* mpZMtx;
/* 0x20 */ J3DPacket* mpCallBackPacket;
static u8 sortFuncTable[72];
static u8 drawFuncTable[24];
static u8 entryNum[4 + 4 /* padding */];
};
#endif /* J3DDRAWBUFFER_H */