static.c 2.1 KB

/*---------------------------------------------------------------------*
        Copyright (C) 1997 Nintendo.
        
        $RCSfile: static.c,v $
        $Revision: 1.1.1.1 $
        $Date: 2002/05/02 03:27:12 $
 *---------------------------------------------------------------------*/
#include "headers.h"

/*****************************************************************
 *  RSP initialize						 *
 * Remember,viewport structures have 2 bits of fraction in them. *
 *****************************************************************/

static Vp vp = {
	SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0,	/* scale */
	SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0,	/* translate */
};

Gfx rspinit_dl[] = {
    gsSPViewport(&vp),
    gsSPClearGeometryMode(0xffffffff),
    gsSPSetGeometryMode(G_SHADE | G_SHADING_SMOOTH),
    gsSPEndDisplayList()
};

/******************
 * RDP initialize *
 ******************/
Gfx rdpinit_dl[] = {
    gsDPPipeSync(),
    gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, SCREEN_WD, SCREEN_HT),
	gsDPPipelineMode(G_PM_1PRIMITIVE),
	gsDPSetEnvColor(0,0,0,0),
	gsDPSetPrimColor(0,0,0,0,0,0),
	gsDPSetBlendColor(0,0,0,0),
	gsDPSetFogColor(0,0,0,0),
	gsDPSetFillColor(0),
	gsDPSetPrimDepth(0,0),
	gsDPSetConvert(0,0,0,0,0,0),
	gsDPSetKeyR(0,0,0),
	gsDPSetKeyGB(0,0,0,0,0,0),
    gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
    gsDPSetCycleType(G_CYC_COPY),
    gsDPSetTextureLOD(G_TL_TILE),
    gsDPSetTextureLUT(G_TT_NONE),
    gsDPSetTextureDetail(G_TD_CLAMP),
    gsDPSetTexturePersp(G_TP_PERSP),
    gsDPSetTextureFilter(G_TF_BILERP),
    gsDPSetTextureConvert(G_TC_FILT),
    gsDPSetCombineKey(G_CK_NONE),
    gsDPSetAlphaCompare(G_AC_NONE),
    gsDPSetRenderMode(G_RM_OPA_SURF, G_RM_OPA_SURF2),
    gsDPSetBlendMask(0xff),
    gsDPSetColorDither(G_CD_DISABLE),
    gsDPPipeSync(),
    gsSPEndDisplayList(),
};
Gfx sprite_dl[]={
	gsDPPipeSync(),
	gsDPSetCycleType(G_CYC_COPY),
	gsDPSetTexturePersp(G_TP_NONE),
	gsDPSetTextureLUT(G_TT_NONE),
	gsDPSetTextureLOD(G_TL_LOD),
	gsDPSetAlphaCompare(G_AC_THRESHOLD),
	gsDPSetRenderMode(G_RM_AA_TEX_EDGE,G_RM_AA_TEX_EDGE2),
	gsDPSetCombineMode(G_CC_DECALRGBA,G_CC_DECALRGBA),
	gsSPEndDisplayList()
};