107 lines
3.6 KiB
Plaintext
107 lines
3.6 KiB
Plaintext
/********************************************************************************
|
|
Ultra 64 MARIO Brothers
|
|
|
|
common data module
|
|
|
|
Copyright 1995 Nintendo co., ltd. All rights reserved
|
|
|
|
December 12, 1995
|
|
********************************************************************************/
|
|
|
|
|
|
|
|
/********************************************************************************/
|
|
/* Color data. */
|
|
/********************************************************************************/
|
|
|
|
Lights1 RCP_WhiteColor[] = {
|
|
{ { 64, 64, 64,0, 64, 64, 64,0 }, { 255,255,255,0, 255,255,255,0, 0,0,127,0 }},
|
|
};
|
|
|
|
/********************************************************************************/
|
|
/* Gfx screen clear code. */
|
|
/********************************************************************************/
|
|
|
|
Gfx RCP_ClearScreen[] = {
|
|
gsDPPipeSync(),
|
|
gsDPSetRenderMode(G_RM_OPA_SURF, G_RM_OPA_SURF2),
|
|
gsDPSetCycleType(G_CYC_FILL),
|
|
|
|
gsDPSetFillColor(0),
|
|
gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1),
|
|
gsDPPipeSync(),
|
|
gsDPSetCycleType(G_CYC_1CYCLE),
|
|
gsSPEndDisplayList()
|
|
};
|
|
/********************************************************************************/
|
|
/* Static data for string drawing. */
|
|
/********************************************************************************/
|
|
|
|
Gfx RCP_hmsBeginString[] = {
|
|
gsSPClearGeometryMode(G_SHADING_SMOOTH),
|
|
gsSPNumLights(1),
|
|
gsSPLight( (&RCP_WhiteColor[0].l[0]) ,1),
|
|
gsSPLight( (&RCP_WhiteColor[0].a) ,2),
|
|
|
|
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON),
|
|
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
|
gsDPSetTextureFilter(G_TF_POINT),
|
|
gsDPPipeSync(),
|
|
gsSPEndDisplayList()
|
|
};
|
|
|
|
Gfx RCP_hmsDrawCharacter[] = {
|
|
gsxDPLoadTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0,
|
|
G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR,
|
|
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD
|
|
),
|
|
gsSP1Triangle( 0, 1, 2, 0),
|
|
gsSP1Triangle( 0, 2, 3, 0),
|
|
gsSPEndDisplayList()
|
|
};
|
|
|
|
Gfx RCP_hmsEndString[] = {
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPTexture(1, 1, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPSetTextureFilter(G_TF_BILERP),
|
|
gsSPEndDisplayList()
|
|
};
|
|
/********************************************************************************/
|
|
/* Water. */
|
|
/********************************************************************************/
|
|
|
|
static Vtx vtx_water[] = {
|
|
{ -6144, 0, 6144, 0, 0<<6, 32<<6, 30, 100, 200, 128 },
|
|
{ 6144, 0, 6144, 0, 31<<6, 32<<6, 30, 100, 200, 128 },
|
|
{ 6144, 0, -6144, 0, 31<<6, 0<<6, 30, 100, 200, 128 },
|
|
{ -6144, 0, -6144, 0, 0<<6, 0<<6, 30, 100, 200, 128 }
|
|
};
|
|
Gfx RCP_Water[] = {
|
|
gsDPPipeSync(),
|
|
gsSPClearGeometryMode(G_LIGHTING | G_SHADING_SMOOTH),
|
|
gsSPVertex(&vtx_water[0], 4, 0),
|
|
gsSP1Triangle(0, 1, 2, 0),
|
|
gsSP1Triangle(0, 2, 3, 0),
|
|
gsSPSetGeometryMode(G_LIGHTING | G_SHADING_SMOOTH),
|
|
gsSPEndDisplayList()
|
|
};
|
|
/********************************************************************************/
|
|
/* Water filter. */
|
|
/********************************************************************************/
|
|
|
|
static Vtx vtx_water_filter[] = {
|
|
{ -160, -120, 0, 0, 0, 0, 30, 100, 200, 128 },
|
|
{ 160, -120, 0, 0, 0, 0, 30, 100, 200, 128 },
|
|
{ 160, 120, 0, 0, 0, 0, 30, 100, 200, 128 },
|
|
{ -160, 120, 0, 0, 0, 0, 30, 100, 200, 128 }
|
|
};
|
|
Gfx RCP_WaterFilter[] = {
|
|
gsDPPipeSync(),
|
|
gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH),
|
|
gsSPVertex(&vtx_water_filter[0], 4, 0),
|
|
gsSP1Triangle(0, 1, 3, 0),
|
|
gsSP1Triangle(1, 2, 3, 0),
|
|
gsSPSetGeometryMode(G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH),
|
|
gsSPEndDisplayList()
|
|
};
|