sm64

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

model.inc.c (4879B)


      1 // 0x07012C08 - 0x07012C20
      2 static const Lights1 wdw_seg7_lights_07012C08 = gdSPDefLights1(
      3     0x99, 0x99, 0x99,
      4     0xff, 0xff, 0xff, 0x28, 0x28, 0x28
      5 );
      6 
      7 // 0x07012C20 - 0x07012C60
      8 static const Vtx wdw_seg7_vertex_07012C20[] = {
      9     {{{    63,    127,    -60}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     10     {{{   -64,    127,     67}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     11     {{{    63,    127,     67}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     12     {{{   -64,    127,    -60}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     13 };
     14 
     15 // 0x07012C60 - 0x07012D50
     16 static const Vtx wdw_seg7_vertex_07012C60[] = {
     17     {{{    63,    127,    -60}, 0, {     0,      0}, {0x00, 0x00, 0x81, 0xff}}},
     18     {{{   -64,      0,    -60}, 0, {   990,    990}, {0x00, 0x00, 0x81, 0xff}}},
     19     {{{   -64,    127,    -60}, 0, {   990,      0}, {0x00, 0x00, 0x81, 0xff}}},
     20     {{{    63,    127,     67}, 0, {     0,      0}, {0x7f, 0x00, 0x00, 0xff}}},
     21     {{{    63,      0,     67}, 0, {     0,    990}, {0x7f, 0x00, 0x00, 0xff}}},
     22     {{{    63,      0,    -60}, 0, {   990,    990}, {0x7f, 0x00, 0x00, 0xff}}},
     23     {{{    63,    127,    -60}, 0, {   990,      0}, {0x7f, 0x00, 0x00, 0xff}}},
     24     {{{   -64,    127,     67}, 0, {     0,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     25     {{{   -64,      0,     67}, 0, {     0,    990}, {0x00, 0x00, 0x7f, 0xff}}},
     26     {{{    63,      0,     67}, 0, {   990,    990}, {0x00, 0x00, 0x7f, 0xff}}},
     27     {{{    63,    127,     67}, 0, {   990,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     28     {{{   -64,    127,    -60}, 0, {     0,      0}, {0x81, 0x00, 0x00, 0xff}}},
     29     {{{   -64,      0,    -60}, 0, {     0,    990}, {0x81, 0x00, 0x00, 0xff}}},
     30     {{{   -64,      0,     67}, 0, {   990,    990}, {0x81, 0x00, 0x00, 0xff}}},
     31     {{{   -64,    127,     67}, 0, {   990,      0}, {0x81, 0x00, 0x00, 0xff}}},
     32 };
     33 
     34 // 0x07012D50 - 0x07012DC0
     35 static const Vtx wdw_seg7_vertex_07012D50[] = {
     36     {{{    63,      0,     67}, 0, {     0,    990}, {0x00, 0x81, 0x00, 0xff}}},
     37     {{{   -64,      0,     67}, 0, {   990,    990}, {0x00, 0x81, 0x00, 0xff}}},
     38     {{{   -64,      0,    -60}, 0, {   990,      0}, {0x00, 0x81, 0x00, 0xff}}},
     39     {{{    63,    127,    -60}, 0, {     0,      0}, {0x00, 0x00, 0x81, 0xff}}},
     40     {{{    63,      0,    -60}, 0, {     0,    990}, {0x00, 0x00, 0x81, 0xff}}},
     41     {{{   -64,      0,    -60}, 0, {   990,    990}, {0x00, 0x00, 0x81, 0xff}}},
     42     {{{    63,      0,    -60}, 0, {     0,      0}, {0x00, 0x81, 0x00, 0xff}}},
     43 };
     44 
     45 // 0x07012DC0 - 0x07012E08
     46 static const Gfx wdw_seg7_dl_07012DC0[] = {
     47     gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, wdw_seg7_texture_07001800),
     48     gsDPLoadSync(),
     49     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
     50     gsSPLight(&wdw_seg7_lights_07012C08.l, 1),
     51     gsSPLight(&wdw_seg7_lights_07012C08.a, 2),
     52     gsSPVertex(wdw_seg7_vertex_07012C20, 4, 0),
     53     gsSP2Triangles( 0,  1,  2, 0x0,  0,  3,  1, 0x0),
     54     gsSPEndDisplayList(),
     55 };
     56 
     57 // 0x07012E08 - 0x07012E88
     58 static const Gfx wdw_seg7_dl_07012E08[] = {
     59     gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, grass_09004000),
     60     gsDPLoadSync(),
     61     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
     62     gsSPVertex(wdw_seg7_vertex_07012C60, 15, 0),
     63     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
     64     gsSP2Triangles( 3,  5,  6, 0x0,  7,  8,  9, 0x0),
     65     gsSP2Triangles( 7,  9, 10, 0x0, 11, 12, 13, 0x0),
     66     gsSP1Triangle(11, 13, 14, 0x0),
     67     gsSPVertex(wdw_seg7_vertex_07012D50, 7, 0),
     68     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
     69     gsSP1Triangle( 0,  2,  6, 0x0),
     70     gsSPEndDisplayList(),
     71 };
     72 
     73 // 0x07012E88 - 0x07012F18
     74 const Gfx wdw_seg7_dl_07012E88[] = {
     75     gsDPPipeSync(),
     76     gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
     77     gsSPClearGeometryMode(G_SHADING_SMOOTH),
     78     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),
     79     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
     80     gsDPTileSync(),
     81     gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
     82     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
     83     gsSPDisplayList(wdw_seg7_dl_07012DC0),
     84     gsDPTileSync(),
     85     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),
     86     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
     87     gsSPDisplayList(wdw_seg7_dl_07012E08),
     88     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
     89     gsDPPipeSync(),
     90     gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
     91     gsSPSetGeometryMode(G_SHADING_SMOOTH),
     92     gsSPEndDisplayList(),
     93 };