mirror of
https://gitlab.com/kholdfuzion/goldeneye_src
synced 2026-07-11 13:48:47 -04:00
update
This commit is contained in:
@@ -69,6 +69,16 @@
|
||||
/***
|
||||
*** 4 Triangles
|
||||
***/
|
||||
/**
|
||||
* Remarks:
|
||||
* Ryan: I've been learning a lot about PD's graphics microcode lately. It's likely that the decision to
|
||||
* implement tri4 was to reduce memory usage in RDRAM. But to fit 4 tris in one command they had to limit
|
||||
* themselves to 4 bits per vertex, which means they can only address up to 16 vertices. They could have
|
||||
* fit 32 vertices in DMEM if they wanted. In stock microcodes the vertex IDs are pre-multiplied by 10
|
||||
* which makes it easy for the RSP to calculate the vertex offset in the DMEM buffer (it can use a
|
||||
* single shift operation). But because PD is using a compact format there's more work for the RSP to
|
||||
* calculate it. So they've sacrificed RSP performance for memory saving.
|
||||
*/
|
||||
|
||||
//cannot use 2tri with 4tri, so lets just make sure they are undefined so errors happen.
|
||||
#undef gSP2Triangles
|
||||
@@ -186,6 +196,14 @@
|
||||
_g->words.w1 = _SHIFTL(0x06, 24, 8) | _SHIFTL((c), 14, 10) | _SHIFTL((d), 2, 10); \
|
||||
}
|
||||
|
||||
#define gDPLoadTLUTCmd2(pkt, tile, count) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)pkt; \
|
||||
\
|
||||
_g->words.w0 = _SHIFTL(G_LOADTLUT, 24, 8) | 0xff0; \
|
||||
_g->words.w1 = _SHIFTL((tile), 24, 3) | _SHIFTL((count), 14, 10) | 0xff0;\
|
||||
}
|
||||
|
||||
/*
|
||||
* Texturing macro Overrides
|
||||
*/
|
||||
|
||||
+4
-2
@@ -45,9 +45,9 @@
|
||||
|
||||
|
||||
/* Half of PI. (PI/2)*/
|
||||
#define M_HALF_PI M_PI_F / 2
|
||||
#define M_HALF_PI (M_PI_F / 2)
|
||||
/* 3 Halves of PI. (3*(PI/2))*/
|
||||
#define M_THREE_HALF_PI 3 * M_HALF_PI
|
||||
#define M_THREE_HALF_PI (3 * M_HALF_PI)
|
||||
|
||||
|
||||
#define M_U16_MAX_VALUE_F 65536.0f
|
||||
@@ -68,6 +68,8 @@
|
||||
#define RAD2BYTE(RAD) (char)(256.0f / M_TAU_F * (RAD))
|
||||
/* Converts an angle from Degrees to Radians */
|
||||
#define DegToRad(DEG) (float)((DEG) * M_TAU_F / 360.0f)
|
||||
/* Converts an angle from Degrees to Radians with only one multiply*/
|
||||
#define DegToRad1Fact(DEG) (float)((DEG) * (float)(M_TAU / 360.0))
|
||||
/* Converts and halves an angle from Degrees to Radians */
|
||||
#define mDegToHalfRad(x) ((x * M_PI_F) / 360.0f)
|
||||
/* Converts an angle from Radians to Degrees */
|
||||
|
||||
Reference in New Issue
Block a user