mirror of
https://github.com/zeldaret/tp
synced 2026-08-21 14:37:49 -04:00
J3D setup (#155)
* setup j3d classes * remove asm * fixes * fix newDifferedDisplayList
This commit is contained in:
@@ -3,4 +3,23 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct GDLObj {
|
||||
/* 0x0 */ u8* start;
|
||||
/* 0x4 */ u32 length;
|
||||
/* 0x8 */ u8* ptr;
|
||||
/* 0xC */ u8* end;
|
||||
}; // Size: 0x10
|
||||
|
||||
extern "C" void GDInitGDLObj(GDLObj*, u8*, u32);
|
||||
|
||||
extern GDLObj* __GDCurrentDL;
|
||||
|
||||
inline void GDSetCurrent(GDLObj* obj) {
|
||||
__GDCurrentDL = obj;
|
||||
}
|
||||
|
||||
inline u32 GDGetGDLObjOffset(GDLObj* obj) {
|
||||
return (u32)(obj->ptr - obj->start);
|
||||
}
|
||||
|
||||
#endif /* GDBASE_H */
|
||||
|
||||
@@ -10,11 +10,11 @@ typedef struct _GXColor {
|
||||
u8 a;
|
||||
} GXColor;
|
||||
|
||||
struct _GXColorS10 {
|
||||
typedef struct _GXColorS10 {
|
||||
s16 r;
|
||||
s16 g;
|
||||
s16 b;
|
||||
s16 a;
|
||||
};
|
||||
} GXColorS10;
|
||||
|
||||
#endif /* GXTEXTURE_H */
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
#include "dolphin/types.h"
|
||||
|
||||
typedef float Mtx[3][4];
|
||||
typedef float Mtx33[3][3];
|
||||
typedef float Mtx23[2][3];
|
||||
typedef f32 (*MtxP)[4];
|
||||
|
||||
extern "C" {
|
||||
void PSMTXIdentity(Mtx matrix);
|
||||
|
||||
@@ -23,6 +23,16 @@ struct Vec {
|
||||
}
|
||||
};
|
||||
|
||||
struct SVec {
|
||||
s16 x, y, z;
|
||||
|
||||
void set(s16 oX, s16 oY, s16 oZ) {
|
||||
x = oX;
|
||||
y = oY;
|
||||
z = oZ;
|
||||
}
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
void PSVECAdd(const Vec* src_a, const Vec* src_b, Vec* dst);
|
||||
void PSVECSubtract(const Vec* a, const Vec* b, Vec* dst);
|
||||
|
||||
Reference in New Issue
Block a user