Пример #1
0
static
void RSP_SetDefaultState(void)
{
   unsigned i, j;

	gSPTexture(1.0f, 1.0f, 0, 0, TRUE);
   gDP.loadTile = &gDP.tiles[7];
   gSP.textureTile[0] = &gDP.tiles[0];
   gSP.textureTile[1] = &gDP.tiles[1];
   gSP.lookat[0].x = gSP.lookat[1].x = 1.0f;
   gSP.lookatEnable = false;

   gSP.objMatrix.A = 1.0f;
   gSP.objMatrix.B = 0.0f;
   gSP.objMatrix.C = 0.0f;
   gSP.objMatrix.D = 1.0f;
   gSP.objMatrix.X = 0.0f;
   gSP.objMatrix.Y = 0.0f;
   gSP.objMatrix.baseScaleX = 1.0f;
   gSP.objMatrix.baseScaleY = 1.0f;
   gSP.objRendermode = 0;

   for (i = 0; i < 4; i++)
	   for (j = 0; j < 4; j++)
		   gSP.matrix.modelView[0][i][j] = 0.0f;

   gSP.matrix.modelView[0][0][0] = 1.0f;
   gSP.matrix.modelView[0][1][1] = 1.0f;
   gSP.matrix.modelView[0][2][2] = 1.0f;
   gSP.matrix.modelView[0][3][3] = 1.0f;

   gDP.otherMode._u64 = 0U;
}
Пример #2
0
void F3D_Texture( u32 w0, u32 w1 )
{
	gSPTexture( _FIXED2FLOAT( _SHIFTR( w1, 16, 16 ), 16 ), 
		        _FIXED2FLOAT( _SHIFTR( w1, 0, 16 ), 16 ), 
		        _SHIFTR( w0, 11, 3 ), 
				_SHIFTR( w0, 8, 3 ), 
				_SHIFTR( w0, 0, 8 ) );
}