1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Implement S2DEX_Obj_RenderMode.

This commit is contained in:
Sergey Lipskiy 2014-10-24 18:21:06 +07:00
parent 6fbdb3f8db
commit 22ea72aaad
5 changed files with 22 additions and 5 deletions

View File

@ -288,4 +288,5 @@ void RSP_Init()
gSP.objMatrix.Y = 0.0f;
gSP.objMatrix.baseScaleX = 1.0f;
gSP.objMatrix.baseScaleY = 1.0f;
gSP.objRendermode = 0;
}

View File

@ -51,7 +51,7 @@ void S2DEX_Select_DL( u32 w0, u32 w1 )
void S2DEX_Obj_RenderMode( u32 w0, u32 w1 )
{
LOG(LOG_WARNING, "S2DEX_Obj_RenderMode unimplemented\n");
gSPObjRendermode(w1);
}
void S2DEX_Obj_Rectangle_R( u32 w0, u32 w1 )

16
S2DEX.h
View File

@ -1,11 +1,19 @@
#ifndef S2DEX_H
#define S2DEX_H
#define G_BGLT_LOADBLOCK 0x0033
#define G_BGLT_LOADTILE 0xfff4
#define G_BGLT_LOADBLOCK 0x0033
#define G_BGLT_LOADTILE 0xfff4
#define G_BG_FLAG_FLIPS 0x01
#define G_BG_FLAG_FLIPT 0x10
#define G_BG_FLAG_FLIPS 0x01
#define G_BG_FLAG_FLIPT 0x10
#define G_OBJRM_NOTXCLAMP 0x01
#define G_OBJRM_XLU 0x02
#define G_OBJRM_ANTIALIAS 0x04
#define G_OBJRM_BILERP 0x08
#define G_OBJRM_SHRINKSIZE_1 0x10
#define G_OBJRM_SHRINKSIZE_2 0x20
#define G_OBJRM_WIDEN 0x40
struct uObjScaleBg
{

View File

@ -2453,6 +2453,11 @@ void gSPObjSubMatrix( u32 mtx )
gSP.objMatrix.baseScaleY = _FIXED2FLOAT(objMtx->BaseScaleY, 10);
}
void gSPObjRendermode(u32 _mode)
{
gSP.objRendermode = _mode;
}
#ifdef __VEC4_OPT
void (*gSPTransformVertex4)(u32 v, float mtx[4][4]) =
gSPTransformVertex4_default;

3
gSP.h
View File

@ -104,6 +104,8 @@ struct gSPInfo
f32 baseScaleX, baseScaleY;
} objMatrix;
u32 objRendermode;
u32 vertexColorBase;
u32 vertexi;
@ -207,6 +209,7 @@ void gSPBgRect1Cyc( u32 bg );
void gSPBgRectCopy( u32 bg );
void gSPObjMatrix( u32 mtx );
void gSPObjSubMatrix( u32 mtx );
void gSPObjRendermode(u32 _mode);
void gSPSetDMAOffsets( u32 mtxoffset, u32 vtxoffset );
void gSPSetDMATexOffset(u32 _addr);
void gSPSetVertexColorBase( u32 base );