mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-04 09:08:39 -04:00
J3DDrawBuffer yeah
This commit is contained in:
@@ -4,35 +4,12 @@
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
// matches debug
|
||||
inline f32 J3DCalcZValue(register MtxP m, register Vec v) {
|
||||
register f32 temp_f4;
|
||||
register f32 out;
|
||||
register f32 temp_f0;
|
||||
register f32 temp_f2;
|
||||
register f32 temp_f1 = 1.0f;
|
||||
|
||||
// clang-format off
|
||||
asm {
|
||||
psq_l temp_f0, 0(v), 0, 0 /* qr0 */
|
||||
lfs temp_f2, 8(v)
|
||||
psq_l temp_f4, 32(m), 0, 0 /* qr0 */
|
||||
psq_l out, 40(m), 0, 0 /* qr0 */
|
||||
ps_merge00 temp_f2, temp_f2, temp_f1
|
||||
ps_mul temp_f4, temp_f0, temp_f4
|
||||
ps_madd out, temp_f2, out, temp_f4
|
||||
ps_sum0 out, out, out, out
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
class J3DDrawBuffer;
|
||||
class J3DPacket;
|
||||
class J3DDrawPacket;
|
||||
class J3DMatPacket;
|
||||
class J3DShapePacket;
|
||||
class J3DCallBackPacket;
|
||||
|
||||
typedef int (J3DDrawBuffer::*sortFunc)(J3DMatPacket*);
|
||||
typedef void (J3DDrawBuffer::*drawFunc)() const;
|
||||
@@ -75,6 +52,7 @@ public:
|
||||
void setNonSort() { mSortType = 5; }
|
||||
void setZSort() { mSortType = 2; }
|
||||
void setZMtx(MtxP mtx) { mpZMtx = mtx; }
|
||||
void setCallBackPacket(J3DCallBackPacket* pPacket);
|
||||
|
||||
public:
|
||||
/* 0x00 */ J3DPacket** mpBuf;
|
||||
|
||||
@@ -210,4 +210,6 @@ inline void J3DPSMulMtxVec(register Mtx3P mtx, register SVec* vec, register SVec
|
||||
}
|
||||
}
|
||||
|
||||
f32 J3DCalcZValue(register MtxP m, register Vec v);
|
||||
|
||||
#endif /* J3DTRANSFORM_H */
|
||||
|
||||
Reference in New Issue
Block a user