mirror of
https://github.com/HarbourMasters/Starship
synced 2026-08-09 11:14:35 -04:00
Improved match for fox_ti, add custom gbi macro, some cleanup (#178)
* splits * torch * torch again * headers * merges * format * matches * commit * colpoly * SY
This commit is contained in:
@@ -98,7 +98,6 @@ extern Gfx D_6008370[];
|
||||
extern Gfx D_6008770[];
|
||||
extern Gfx D_6008830[];
|
||||
extern Gfx D_6008AA0[];
|
||||
extern Vec3s D_6008E08[];
|
||||
extern Gfx D_6009250[];
|
||||
extern u16* D_6009B34[];
|
||||
extern u16 D_6009BB8[];
|
||||
@@ -391,7 +390,6 @@ extern Gfx D_6032580[];
|
||||
extern Gfx D_6032BC0[];
|
||||
extern Gfx D_6033000[];
|
||||
extern Vec3s D_6033E08[];
|
||||
extern f32 D_603486C[];
|
||||
extern Gfx D_6034B90[];
|
||||
extern f32 D_60359C8[];
|
||||
extern f32 D_6035A14[];
|
||||
|
||||
+2
-2
@@ -428,8 +428,8 @@ void func_80094D20(f32, f32);
|
||||
void func_80096A74(Player* player);
|
||||
|
||||
// fox_97F80
|
||||
void func_80098860(Plane* plane, Vec3f* point, Vec3f* normal);
|
||||
s32 func_800988B4(Vec3f* vec, Plane* plane);
|
||||
void func_80098860(PlaneF* plane, Vec3f* point, Vec3f* normal);
|
||||
s32 func_800988B4(Vec3f* vec, PlaneF* plane);
|
||||
s32 func_800998FC(Vec3f*, Vec3f*, Vec3f*, s32, Vec3f*, f32*);
|
||||
|
||||
// fox_A4290
|
||||
|
||||
+44
-7
@@ -12,12 +12,49 @@
|
||||
#define RGBA16_GRN(color16) (((color16) >> 6) & 0x1F)
|
||||
#define RGBA16_BLU(color16) (((color16) >> 1) & 0x1F)
|
||||
|
||||
// used for convenience while decopming. You should find/replace them with the full macros before PRing
|
||||
#define GDL(dl) gSPDisplayList(gMasterDisp++, dl) // 06000000 dl
|
||||
#define GPC(r, g, b, a) gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, r, g, b, a) // FA000000 RRGGBBAA
|
||||
#define GEC(r, g, b, a) gDPSetEnvColor(gMasterDisp++, r, g, b, a) // FB000000 RRGGBBAA
|
||||
#define GSGM_BACK() gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK) // B7000000 00002000, most common geometry mode changed
|
||||
#define GCGM_BACK() gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK) // B6000000 00002000
|
||||
#define gDPSetupTile(pkt, fmt, siz, width, height, dw, dh, \
|
||||
cms, cmt, masks, maskt, shifts, shiftt) \
|
||||
{ \
|
||||
gDPTileSync(pkt); \
|
||||
gDPSetTile(pkt, fmt, siz, (((width) * siz##_LINE_BYTES)+7)>>3, 0,\
|
||||
G_TX_RENDERTILE, 0, cmt, maskt, shiftt, cms, masks, shifts); \
|
||||
gDPSetTileSize(pkt, G_TX_RENDERTILE, dw, dh, \
|
||||
((width)-1) << G_TEXTURE_IMAGE_FRAC, \
|
||||
((height)-1) << G_TEXTURE_IMAGE_FRAC) \
|
||||
}
|
||||
|
||||
#define gsDPSetupTile(fmt, siz, width, height, dw, dh, \
|
||||
cms, cmt, masks, maskt, shifts, shiftt) \
|
||||
gsDPTileSync(), \
|
||||
gsDPSetTile(fmt, siz, (((width) * siz##_LINE_BYTES)+7)>>3, 0, \
|
||||
G_TX_RENDERTILE, 0, cmt, maskt, shiftt, cms, masks, shifts), \
|
||||
gsDPSetTileSize(G_TX_RENDERTILE, dw, dh, \
|
||||
((width)-1) << G_TEXTURE_IMAGE_FRAC, \
|
||||
((height)-1) << G_TEXTURE_IMAGE_FRAC),
|
||||
|
||||
#define gDPLoadTileTexture(pkt, timg, fmt, siz, width, height) \
|
||||
{ \
|
||||
gDPSetTextureImage(pkt, fmt, siz##_LOAD_BLOCK, 1, timg); \
|
||||
gDPTileSync(pkt); \
|
||||
gDPSetTile(pkt, fmt, siz##_LOAD_BLOCK, 0, 0, G_TX_LOADTILE, \
|
||||
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, \
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); \
|
||||
gDPLoadSync(pkt); \
|
||||
gDPLoadBlock(pkt, G_TX_LOADTILE, 0, 0, \
|
||||
(((width)*(height) + siz##_INCR) >> siz##_SHIFT) -1, \
|
||||
CALC_DXT(width, siz##_BYTES)); \
|
||||
}
|
||||
|
||||
#define gsDPLoadTileTexture(timg, fmt, siz, width, height) \
|
||||
gsDPSetTextureImage(fmt, siz##_LOAD_BLOCK, 1, timg), \
|
||||
gsDPTileSync(), \
|
||||
gsDPSetTile(fmt, siz##_LOAD_BLOCK, 0, 0, G_TX_LOADTILE, \
|
||||
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, \
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD), \
|
||||
gsDPLoadSync(), \
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, \
|
||||
(((width)*(height) + siz##_INCR) >> siz##_SHIFT) -1, \
|
||||
CALC_DXT(width, siz##_BYTES)),
|
||||
|
||||
#define gSPSetOtherModeHi(pkt, settings) gSPSetOtherMode(pkt, G_SETOTHERMODE_H, G_MDSFT_BLENDMASK, 24, settings)
|
||||
#define gsSPSetOtherModeHi(settings) gsSPSetOtherMode(G_SETOTHERMODE_H, G_MDSFT_BLENDMASK, 24, settings)
|
||||
@@ -76,7 +113,7 @@ s32 Animation_GetLimbIndex(Limb* limb, Limb** skeleton);
|
||||
void Animation_DrawLimb(s32 mode, Limb* limb, Limb* *skeleton, Vec3f* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* data);
|
||||
void Animation_DrawSkeleton(s32 mode, Limb** skeletonSegment, Vec3f* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* data, Matrix* transform);
|
||||
s16 Animation_GetFrameData(Animation *animationSegmemt, s32 frame, Vec3f *frameTable);
|
||||
s16 Animation_GetFrameCount(Animation *animationSegment);
|
||||
s32 Animation_GetFrameCount(Animation *animationSegment);
|
||||
void Animation_FindBoundingBox(Gfx* dList, s32 len, Vec3f *min, Vec3f *max, s32 *vtxFound, s32 *vtxCount, Vtx* *vtxList);
|
||||
void Animation_GetDListBoundingBox(Gfx *dList, s32 len, Vec3f *min, Vec3f *max);
|
||||
void Animation_GetSkeletonBoundingBox(Limb** skeletonSegment, Animation *animationSegment, s32 frame, Vec3f *min, Vec3f* max);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#ifndef PREVENT_CONTEXT_REORDERING_H
|
||||
#define PREVENT_CONTEXT_REORDERING_H
|
||||
|
||||
// extern int Dummyhalf;
|
||||
extern int Dummyhalf;
|
||||
// struct Dummy0 {int x;};
|
||||
// struct Dummy1 {int x;};
|
||||
// struct Dummy2 {int x;};
|
||||
struct Dummy3 {int x;};
|
||||
struct Dummy4 {int x;};
|
||||
// struct Dummy3 {int x;};
|
||||
// struct Dummy4 {int x;};
|
||||
struct Dummy5 {int x;};
|
||||
struct Dummy6 {int x;};
|
||||
struct Dummy7 {int x;};
|
||||
|
||||
+10
-5
@@ -9,6 +9,12 @@ typedef struct {
|
||||
/* 0x8 */ f32 z;
|
||||
} Vec3f; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 x;
|
||||
/* 0x2 */ s16 y;
|
||||
/* 0x4 */ s16 z;
|
||||
} Vec3s; // size = 0x6;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3f rot;
|
||||
@@ -21,13 +27,12 @@ typedef struct {
|
||||
typedef struct {
|
||||
/* 0x0 */ Vec3f normal;
|
||||
/* 0xC */ f32 dist;
|
||||
} Plane; // size = 0x10
|
||||
} PlaneF; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 x;
|
||||
/* 0x2 */ s16 y;
|
||||
/* 0x4 */ s16 z;
|
||||
} Vec3s; // size = 0x6;
|
||||
/* 0x0 */ Vec3s normal;
|
||||
/* 0x8 */ s32 dist;
|
||||
} PlaneI; // size = 0xC
|
||||
|
||||
typedef union {
|
||||
float m[4][4];
|
||||
|
||||
@@ -21,9 +21,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Triangle tri;
|
||||
/* 0x06 */ s16 unk_06;
|
||||
/* 0x08 */ Vec3s normal;
|
||||
/* 0x10 */ s32 dist;
|
||||
/* 0x08 */ PlaneI plane;
|
||||
} CollisionPoly; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user