[Glide64] Cleanup ucode .h files
This commit is contained in:
parent
b8cbfa30c4
commit
4fc4f921e9
|
@ -74,12 +74,10 @@ struct t3dState {
|
||||||
uint32_t othermode1;
|
uint32_t othermode1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct t3dTriN{
|
struct t3dTriN{
|
||||||
uint8_t flag, v2, v1, v0; /* flag is which one for flat shade */
|
uint8_t flag, v2, v1, v0; /* flag is which one for flat shade */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void t3dProcessRDP(uint32_t a)
|
static void t3dProcessRDP(uint32_t a)
|
||||||
{
|
{
|
||||||
if (a)
|
if (a)
|
||||||
|
|
|
@ -99,7 +99,6 @@ static void rsp_vertex(int v0, int n)
|
||||||
v->z = x*rdp.combined[0][2] + y*rdp.combined[1][2] + z*rdp.combined[2][2] + rdp.combined[3][2];
|
v->z = x*rdp.combined[0][2] + y*rdp.combined[1][2] + z*rdp.combined[2][2] + rdp.combined[3][2];
|
||||||
v->w = x*rdp.combined[0][3] + y*rdp.combined[1][3] + z*rdp.combined[2][3] + rdp.combined[3][3];
|
v->w = x*rdp.combined[0][3] + y*rdp.combined[1][3] + z*rdp.combined[2][3] + rdp.combined[3][3];
|
||||||
|
|
||||||
|
|
||||||
if (fabs(v->w) < 0.001) v->w = 0.001f;
|
if (fabs(v->w) < 0.001) v->w = 0.001f;
|
||||||
v->oow = 1.0f / v->w;
|
v->oow = 1.0f / v->w;
|
||||||
v->x_w = v->x * v->oow;
|
v->x_w = v->x * v->oow;
|
||||||
|
@ -144,7 +143,6 @@ static void rsp_vertex(int v0, int n)
|
||||||
#ifdef EXTREME_LOGGING
|
#ifdef EXTREME_LOGGING
|
||||||
FRDP ("v%d - x: %f, y: %f, z: %f, w: %f, u: %f, v: %f, f: %f, z_w: %f, r=%d, g=%d, b=%d, a=%d\n", i>>4, v->x, v->y, v->z, v->w, v->ou*rdp.tiles[rdp.cur_tile].s_scale, v->ov*rdp.tiles[rdp.cur_tile].t_scale, v->f, v->z_w, v->r, v->g, v->b, v->a);
|
FRDP ("v%d - x: %f, y: %f, z: %f, w: %f, u: %f, v: %f, f: %f, z_w: %f, r=%d, g=%d, b=%d, a=%d\n", i>>4, v->x, v->y, v->z, v->w, v->ou*rdp.tiles[rdp.cur_tile].s_scale, v->ov*rdp.tiles[rdp.cur_tile].t_scale, v->f, v->z_w, v->r, v->g, v->b, v->a);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,7 +454,6 @@ static void uc0_movemem()
|
||||||
rdp.light_vector[i][0], rdp.light_vector[i][1], rdp.light_vector[i][2]);
|
rdp.light_vector[i][0], rdp.light_vector[i][1], rdp.light_vector[i][2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case 0x9E: //gSPForceMatrix command. Modification of uc2_movemem:matrix. Gonetz.
|
case 0x9E: //gSPForceMatrix command. Modification of uc2_movemem:matrix. Gonetz.
|
||||||
{
|
{
|
||||||
// do not update the combined matrix!
|
// do not update the combined matrix!
|
||||||
|
@ -825,7 +822,6 @@ static void uc0_texture()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void uc0_setothermode_h()
|
static void uc0_setothermode_h()
|
||||||
{
|
{
|
||||||
LRDP("uc0:setothermode_h: ");
|
LRDP("uc0:setothermode_h: ");
|
||||||
|
|
|
@ -624,7 +624,6 @@ static void uc2_moveword ()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case 0x08:
|
case 0x08:
|
||||||
{
|
{
|
||||||
rdp.fog_multiplier = (short)(rdp.cmd1 >> 16);
|
rdp.fog_multiplier = (short)(rdp.cmd1 >> 16);
|
||||||
|
|
|
@ -51,7 +51,6 @@ static void uc7_colorbase ()
|
||||||
pd_col_addr = segoffset(rdp.cmd1);
|
pd_col_addr = segoffset(rdp.cmd1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
short y;
|
short y;
|
||||||
|
@ -62,7 +61,6 @@ typedef struct
|
||||||
|
|
||||||
short t;
|
short t;
|
||||||
short s;
|
short s;
|
||||||
|
|
||||||
} vtx_uc7;
|
} vtx_uc7;
|
||||||
|
|
||||||
static void uc7_vertex()
|
static void uc7_vertex()
|
||||||
|
@ -117,7 +115,6 @@ static void uc7_vertex ()
|
||||||
v->z = x*rdp.combined[0][2] + y*rdp.combined[1][2] + z*rdp.combined[2][2] + rdp.combined[3][2];
|
v->z = x*rdp.combined[0][2] + y*rdp.combined[1][2] + z*rdp.combined[2][2] + rdp.combined[3][2];
|
||||||
v->w = x*rdp.combined[0][3] + y*rdp.combined[1][3] + z*rdp.combined[2][3] + rdp.combined[3][3];
|
v->w = x*rdp.combined[0][3] + y*rdp.combined[1][3] + z*rdp.combined[2][3] + rdp.combined[3][3];
|
||||||
|
|
||||||
|
|
||||||
if (fabs(v->w) < 0.001) v->w = 0.001f;
|
if (fabs(v->w) < 0.001) v->w = 0.001f;
|
||||||
v->oow = 1.0f / v->w;
|
v->oow = 1.0f / v->w;
|
||||||
v->x_w = v->x * v->oow;
|
v->x_w = v->x * v->oow;
|
||||||
|
@ -176,4 +173,3 @@ static void uc7_vertex ()
|
||||||
vertex++;
|
vertex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,6 @@ static void uc8_moveword ()
|
||||||
uc8_coord_mod[5 + idx] = (rdp.cmd1 & 0xffff) / 65536.0f;
|
uc8_coord_mod[5 + idx] = (rdp.cmd1 & 0xffff) / 65536.0f;
|
||||||
uc8_coord_mod[12 + idx] = uc8_coord_mod[0 + idx] + uc8_coord_mod[4 + idx];
|
uc8_coord_mod[12 + idx] = uc8_coord_mod[0 + idx] + uc8_coord_mod[4 + idx];
|
||||||
uc8_coord_mod[13 + idx] = uc8_coord_mod[1 + idx] + uc8_coord_mod[5 + idx];
|
uc8_coord_mod[13 + idx] = uc8_coord_mod[1 + idx] + uc8_coord_mod[5 + idx];
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (pos == 0x20)
|
else if (pos == 0x20)
|
||||||
{
|
{
|
||||||
|
@ -321,7 +320,6 @@ static void uc8_moveword ()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -449,7 +447,6 @@ static void uc8_movemem ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void uc8_tri4() //by Gugaman Apr 19 2002
|
static void uc8_tri4() //by Gugaman Apr 19 2002
|
||||||
{
|
{
|
||||||
if (rdp.skip_drawing)
|
if (rdp.skip_drawing)
|
||||||
|
|
|
@ -64,15 +64,18 @@ static int Calc_invw (int w) {
|
||||||
Result.W = w;
|
Result.W = w;
|
||||||
if (Result.UW == 0) {
|
if (Result.UW == 0) {
|
||||||
Result.UW = 0x7FFFFFFF;
|
Result.UW = 0x7FFFFFFF;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (Result.W < 0) {
|
if (Result.W < 0) {
|
||||||
neg = TRUE;
|
neg = TRUE;
|
||||||
if (Result.UHW[1] == 0xFFFF && Result.HW[0] < 0) {
|
if (Result.UHW[1] == 0xFFFF && Result.HW[0] < 0) {
|
||||||
Result.W = ~Result.W + 1;
|
Result.W = ~Result.W + 1;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
Result.W = ~Result.W;
|
Result.W = ~Result.W;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
neg = FALSE;
|
neg = FALSE;
|
||||||
}
|
}
|
||||||
for (count = 31; count > 0; count--) {
|
for (count = 31; count > 0; count--) {
|
||||||
|
@ -561,7 +564,6 @@ void uc9_movemem ()
|
||||||
uint32_t addr = segoffset(rdp.cmd1);
|
uint32_t addr = segoffset(rdp.cmd1);
|
||||||
switch (idx)
|
switch (idx)
|
||||||
{
|
{
|
||||||
|
|
||||||
case 0: //save/load
|
case 0: //save/load
|
||||||
if (flag == 0)
|
if (flag == 0)
|
||||||
{
|
{
|
||||||
|
@ -666,7 +668,6 @@ void uc9_movemem ()
|
||||||
default:
|
default:
|
||||||
FRDP("** UNKNOWN %d\n", idx);
|
FRDP("** UNKNOWN %d\n", idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uc9_setscissor()
|
static void uc9_setscissor()
|
||||||
|
|
|
@ -170,7 +170,6 @@ static void fb_rdphalf_1()
|
||||||
branch_dl = rdp.cmd1;
|
branch_dl = rdp.cmd1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void fb_settextureimage()
|
static void fb_settextureimage()
|
||||||
{
|
{
|
||||||
if (rdp.main_ci == 0)
|
if (rdp.main_ci == 0)
|
||||||
|
@ -405,7 +404,6 @@ static void fb_setcolorimage()
|
||||||
{
|
{
|
||||||
cur_fb.status = ci_unknown;
|
cur_fb.status = ci_unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (rdp.ci_count > 0 && rdp.frame_buffers[rdp.ci_count - 1].status == ci_unknown) //status of previous fb was not changed - it is useless
|
if (rdp.ci_count > 0 && rdp.frame_buffers[rdp.ci_count - 1].status == ci_unknown) //status of previous fb was not changed - it is useless
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue