sm64

A Super Mario 64 decompilation
Log | Files | Refs | README | LICENSE

model.inc.c (7048B)


      1 // 0x0700BB18 - 0x0700BB30
      2 static const Lights1 wf_seg7_lights_0700BB18 = gdSPDefLights1(
      3     0x66, 0x66, 0x66,
      4     0xff, 0xff, 0xff, 0x28, 0x28, 0x28
      5 );
      6 
      7 // 0x0700BB30 - 0x0700BC20
      8 static const Vtx wf_seg7_vertex_0700BB30[] = {
      9     {{{   443,      0,   -255}, 0, {  1026,      0}, {0x38, 0x90, 0xf1, 0xff}}},
     10     {{{   512,      0,      0}, 0, {     0,      0}, {0x38, 0x90, 0xf1, 0xff}}},
     11     {{{     0,   -255,      0}, 0, {   498,    988}, {0x38, 0x90, 0xf1, 0xff}}},
     12     {{{  -255,      0,   -442}, 0, {   -66,      0}, {0xd7, 0x90, 0xd7, 0xff}}},
     13     {{{     0,   -255,      0}, 0, {   460,    988}, {0xd7, 0x90, 0xd7, 0xff}}},
     14     {{{  -442,      0,   -255}, 0, {   990,      0}, {0xd7, 0x90, 0xd7, 0xff}}},
     15     {{{  -255,      0,   -442}, 0, {   990,      0}, {0xf1, 0x90, 0xc8, 0xff}}},
     16     {{{     0,      0,   -511}, 0, {   -66,      0}, {0xf1, 0x90, 0xc8, 0xff}}},
     17     {{{     0,   -255,      0}, 0, {   460,    988}, {0xf1, 0x90, 0xc8, 0xff}}},
     18     {{{     0,      0,   -511}, 0, {  1026,      0}, {0x0f, 0x90, 0xc8, 0xff}}},
     19     {{{   256,      0,   -442}, 0, {     0,      0}, {0x0f, 0x90, 0xc8, 0xff}}},
     20     {{{     0,   -255,      0}, 0, {   498,    988}, {0x0f, 0x90, 0xc8, 0xff}}},
     21     {{{   256,      0,   -442}, 0, {  1026,      0}, {0x29, 0x90, 0xd7, 0xff}}},
     22     {{{   443,      0,   -255}, 0, {     0,      0}, {0x29, 0x90, 0xd7, 0xff}}},
     23     {{{     0,   -255,      0}, 0, {   498,    988}, {0x29, 0x90, 0xd7, 0xff}}},
     24 };
     25 
     26 // 0x0700BC20 - 0x0700BD10
     27 static const Vtx wf_seg7_vertex_0700BC20[] = {
     28     {{{  -255,      0,    443}, 0, {  1026,      0}, {0xd7, 0x90, 0x29, 0xff}}},
     29     {{{  -442,      0,    256}, 0, {     0,      0}, {0xd7, 0x90, 0x29, 0xff}}},
     30     {{{     0,   -255,      0}, 0, {   498,    988}, {0xd7, 0x90, 0x29, 0xff}}},
     31     {{{   512,      0,      0}, 0, {  1026,      0}, {0x38, 0x90, 0x0f, 0xff}}},
     32     {{{   443,      0,    256}, 0, {     0,      0}, {0x38, 0x90, 0x0f, 0xff}}},
     33     {{{     0,   -255,      0}, 0, {   498,    988}, {0x38, 0x90, 0x0f, 0xff}}},
     34     {{{   443,      0,    256}, 0, {  1026,      0}, {0x29, 0x90, 0x29, 0xff}}},
     35     {{{   256,      0,    443}, 0, {     0,      0}, {0x29, 0x90, 0x29, 0xff}}},
     36     {{{     0,   -255,      0}, 0, {   498,    988}, {0x29, 0x90, 0x29, 0xff}}},
     37     {{{   256,      0,    443}, 0, {  1026,      0}, {0x0f, 0x90, 0x38, 0xff}}},
     38     {{{     0,      0,    512}, 0, {     0,      0}, {0x0f, 0x90, 0x38, 0xff}}},
     39     {{{     0,   -255,      0}, 0, {   498,    988}, {0x0f, 0x90, 0x38, 0xff}}},
     40     {{{     0,      0,    512}, 0, {  1026,      0}, {0xf1, 0x90, 0x38, 0xff}}},
     41     {{{  -255,      0,    443}, 0, {     0,      0}, {0xf1, 0x90, 0x38, 0xff}}},
     42     {{{     0,   -255,      0}, 0, {   498,    988}, {0xf1, 0x90, 0x38, 0xff}}},
     43 };
     44 
     45 // 0x0700BD10 - 0x0700BD70
     46 static const Vtx wf_seg7_vertex_0700BD10[] = {
     47     {{{  -442,      0,    256}, 0, {  1026,      0}, {0xc8, 0x90, 0x0f, 0xff}}},
     48     {{{  -511,      0,      0}, 0, {     0,      0}, {0xc8, 0x90, 0x0f, 0xff}}},
     49     {{{     0,   -255,      0}, 0, {   498,    988}, {0xc8, 0x90, 0x0f, 0xff}}},
     50     {{{  -442,      0,   -255}, 0, {     0,      0}, {0xc8, 0x90, 0xf1, 0xff}}},
     51     {{{     0,   -255,      0}, 0, {   498,    988}, {0xc8, 0x90, 0xf1, 0xff}}},
     52     {{{  -511,      0,      0}, 0, {  1026,      0}, {0xc8, 0x90, 0xf1, 0xff}}},
     53 };
     54 
     55 // 0x0700BD70 - 0x0700BE30
     56 static const Vtx wf_seg7_vertex_0700BD70[] = {
     57     {{{  -442,      0,   -255}, 0, {  -188,   -714}, {0x00, 0x7f, 0x00, 0xff}}},
     58     {{{   443,      0,    256}, 0, {  2170,    650}, {0x00, 0x7f, 0x00, 0xff}}},
     59     {{{   512,      0,      0}, 0, {  2352,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     60     {{{   443,      0,   -255}, 0, {  2170,   -714}, {0x00, 0x7f, 0x00, 0xff}}},
     61     {{{   256,      0,   -442}, 0, {  1672,  -1212}, {0x00, 0x7f, 0x00, 0xff}}},
     62     {{{     0,      0,   -511}, 0, {   990,  -1394}, {0x00, 0x7f, 0x00, 0xff}}},
     63     {{{  -255,      0,   -442}, 0, {   308,  -1212}, {0x00, 0x7f, 0x00, 0xff}}},
     64     {{{  -255,      0,    443}, 0, {   308,   1146}, {0x00, 0x7f, 0x00, 0xff}}},
     65     {{{     0,      0,    512}, 0, {   990,   1328}, {0x00, 0x7f, 0x00, 0xff}}},
     66     {{{  -511,      0,      0}, 0, {  -370,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     67     {{{  -442,      0,    256}, 0, {  -188,    650}, {0x00, 0x7f, 0x00, 0xff}}},
     68     {{{   256,      0,    443}, 0, {  1672,   1146}, {0x00, 0x7f, 0x00, 0xff}}},
     69 };
     70 
     71 // 0x0700BE30 - 0x0700BED8
     72 static const Gfx wf_seg7_dl_0700BE30[] = {
     73     gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, grass_09005000),
     74     gsDPLoadSync(),
     75     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
     76     gsSPLight(&wf_seg7_lights_0700BB18.l, 1),
     77     gsSPLight(&wf_seg7_lights_0700BB18.a, 2),
     78     gsSPVertex(wf_seg7_vertex_0700BB30, 15, 0),
     79     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
     80     gsSP2Triangles( 6,  7,  8, 0x0,  9, 10, 11, 0x0),
     81     gsSP1Triangle(12, 13, 14, 0x0),
     82     gsSPVertex(wf_seg7_vertex_0700BC20, 15, 0),
     83     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
     84     gsSP2Triangles( 6,  7,  8, 0x0,  9, 10, 11, 0x0),
     85     gsSP1Triangle(12, 13, 14, 0x0),
     86     gsSPVertex(wf_seg7_vertex_0700BD10, 6, 0),
     87     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
     88     gsSPEndDisplayList(),
     89 };
     90 
     91 // 0x0700BED8 - 0x0700BF50
     92 static const Gfx wf_seg7_dl_0700BED8[] = {
     93     gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, grass_09005800),
     94     gsDPLoadSync(),
     95     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
     96     gsSPVertex(wf_seg7_vertex_0700BD70, 12, 0),
     97     gsSP2Triangles( 0,  1,  2, 0x0,  0,  2,  3, 0x0),
     98     gsSP2Triangles( 0,  4,  5, 0x0,  0,  3,  4, 0x0),
     99     gsSP2Triangles( 0,  5,  6, 0x0,  0,  7,  8, 0x0),
    100     gsSP2Triangles( 0,  9, 10, 0x0,  0, 10,  7, 0x0),
    101     gsSP2Triangles( 0,  8, 11, 0x0,  0, 11,  1, 0x0),
    102     gsSPEndDisplayList(),
    103 };
    104 
    105 // 0x0700BF50 - 0x0700BFE0
    106 const Gfx wf_seg7_dl_0700BF50[] = {
    107     gsDPPipeSync(),
    108     gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
    109     gsSPClearGeometryMode(G_SHADING_SMOOTH),
    110     gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
    111     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
    112     gsDPTileSync(),
    113     gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD),
    114     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
    115     gsSPDisplayList(wf_seg7_dl_0700BE30),
    116     gsDPTileSync(),
    117     gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD),
    118     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
    119     gsSPDisplayList(wf_seg7_dl_0700BED8),
    120     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
    121     gsDPPipeSync(),
    122     gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
    123     gsSPSetGeometryMode(G_SHADING_SMOOTH),
    124     gsSPEndDisplayList(),
    125 };