mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Code cleanup in gSP.
This commit is contained in:
parent
a6056d4c3c
commit
87695ac8a7
27
gSP.cpp
27
gSP.cpp
|
@ -23,12 +23,11 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
#ifdef DEBUG
|
||||
extern u32 uc_crc, uc_dcrc;
|
||||
extern char uc_str[256];
|
||||
#endif
|
||||
|
||||
void gSPCombineMatrices();
|
||||
void gSPCombineMatrices()
|
||||
{
|
||||
MultMatrix(gSP.matrix.projection, gSP.matrix.modelView[gSP.matrix.modelViewi], gSP.matrix.combined);
|
||||
gSP.changed &= ~CHANGED_MATRIX;
|
||||
}
|
||||
|
||||
void gSPTriangle(s32 v0, s32 v1, s32 v2)
|
||||
{
|
||||
|
@ -285,12 +284,6 @@ static void gSPBillboardVertex_default(u32 v, u32 i)
|
|||
vtx.w += vtx0.w;
|
||||
}
|
||||
|
||||
void gSPCombineMatrices()
|
||||
{
|
||||
MultMatrix(gSP.matrix.projection, gSP.matrix.modelView[gSP.matrix.modelViewi], gSP.matrix.combined);
|
||||
gSP.changed &= ~CHANGED_MATRIX;
|
||||
}
|
||||
|
||||
void gSPClipVertex(u32 v)
|
||||
{
|
||||
SPVertex & vtx = video().getRender().getVertex(v);
|
||||
|
@ -1278,7 +1271,7 @@ void gSPNumLights( s32 n )
|
|||
|
||||
void gSPLightColor( u32 lightNum, u32 packedColor )
|
||||
{
|
||||
lightNum--;
|
||||
--lightNum;
|
||||
|
||||
if (lightNum < 8)
|
||||
{
|
||||
|
@ -1338,7 +1331,7 @@ void gSPTexture( f32 sc, f32 tc, s32 level, s32 tile, s32 on )
|
|||
void gSPEndDisplayList()
|
||||
{
|
||||
if (RSP.PCi > 0)
|
||||
RSP.PCi--;
|
||||
--RSP.PCi;
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
@ -1640,10 +1633,8 @@ void gSPObjLoadTxtr( u32 tx )
|
|||
u32 address = RSP_SegmentToPhysical( tx );
|
||||
uObjTxtr *objTxtr = (uObjTxtr*)&RDRAM[address];
|
||||
|
||||
if ((gSP.status[objTxtr->block.sid >> 2] & objTxtr->block.mask) != objTxtr->block.flag)
|
||||
{
|
||||
switch (objTxtr->block.type)
|
||||
{
|
||||
if ((gSP.status[objTxtr->block.sid >> 2] & objTxtr->block.mask) != objTxtr->block.flag) {
|
||||
switch (objTxtr->block.type) {
|
||||
case G_OBJLT_TXTRBLOCK:
|
||||
gDPSetTextureImage( 0, 1, 0, objTxtr->block.image );
|
||||
gDPSetTile( 0, 1, 0, objTxtr->block.tmem, 7, 0, 0, 0, 0, 0, 0, 0 );
|
||||
|
|
18
gSP.h
18
gSP.h
|
@ -13,7 +13,7 @@
|
|||
#define CHANGED_FOGPOSITION 0x20
|
||||
#define CHANGED_LIGHT 0x40
|
||||
#define CHANGED_CPU_FB_WRITE 0x80
|
||||
#define CHANGED_TEXTURESCALE 0x100
|
||||
#define CHANGED_TEXTURESCALE 0x100
|
||||
|
||||
#define gSPFlushTriangles() \
|
||||
if \
|
||||
|
@ -67,14 +67,14 @@ if \
|
|||
|
||||
struct SPVertex
|
||||
{
|
||||
f32 x, y, z, w;
|
||||
f32 nx, ny, nz, __pad0;
|
||||
f32 r, g, b, a;
|
||||
f32 s, t;
|
||||
f32 x, y, z, w;
|
||||
f32 nx, ny, nz, __pad0;
|
||||
f32 r, g, b, a;
|
||||
f32 s, t;
|
||||
u8 st_scaled;
|
||||
u8 HWLight;
|
||||
s16 flag;
|
||||
u32 clip;
|
||||
s16 flag;
|
||||
u32 clip;
|
||||
};
|
||||
|
||||
typedef SPVertex SPTriangle[3];
|
||||
|
@ -220,9 +220,5 @@ extern void (*gSPTransformVertex)(float vtx[4], float mtx[4][4]);
|
|||
extern void (*gSPLightVertex)(u32 v);
|
||||
extern void (*gSPBillboardVertex)(u32 v, u32 i);
|
||||
|
||||
#ifdef __NEON_OPT
|
||||
void gSPInitNeon();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user