sm64

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

model.inc.c (6987B)


      1 // 0x07008930 - 0x07008948
      2 static const Lights1 sl_seg7_lights_07008930 = gdSPDefLights1(
      3     0x7f, 0x7f, 0x7f,
      4     0xff, 0xff, 0xff, 0x28, 0x28, 0x28
      5 );
      6 
      7 // 0x07008948 - 0x07008960
      8 static const Lights1 sl_seg7_lights_07008948 = gdSPDefLights1(
      9     0x22, 0x17, 0x00,
     10     0x44, 0x2f, 0x00, 0x28, 0x28, 0x28
     11 );
     12 
     13 // 0x07008960 - 0x07008A60
     14 static const Vtx sl_seg7_vertex_07008960[] = {
     15     {{{  1487,   1536,  -3572}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     16     {{{  1691,   1536,  -3435}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     17     {{{  1828,   1536,  -3639}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     18     {{{  1889,   2816,  -1035}, 0, {   990,     92}, {0x00, 0x7f, 0x00, 0xff}}},
     19     {{{  1643,   2816,  -1032}, 0, {     0,    102}, {0x00, 0x7f, 0x00, 0xff}}},
     20     {{{  1643,   2816,   -819}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     21     {{{  1793,   2816,   -819}, 0, {   590,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     22     {{{  1889,   2816,   -925}, 0, {   990,    550}, {0x00, 0x7f, 0x00, 0xff}}},
     23     {{{ -2916,   1024,   -549}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     24     {{{ -2712,   1024,   -412}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     25     {{{ -2575,   1024,   -615}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     26     {{{ -2779,   1024,   -753}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     27     {{{  1624,   1536,  -3776}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     28     {{{  5496,   1024,  -3308}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     29     {{{  5700,   1024,  -3170}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     30     {{{  5837,   1024,  -3374}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     31 };
     32 
     33 // 0x07008A60 - 0x07008B50
     34 static const Vtx sl_seg7_vertex_07008A60[] = {
     35     {{{  1748,   1024,  -4726}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     36     {{{  2089,   1024,  -4792}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     37     {{{  1885,   1024,  -4930}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     38     {{{  1952,   1024,  -4589}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     39     {{{  3475,   1024,  -5856}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     40     {{{  3816,   1024,  -5922}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     41     {{{  3612,   1024,  -6059}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     42     {{{  3679,   1024,  -5718}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     43     {{{  5225,   1055,  -5410}, 0, {     0,      0}, {0x00, 0x7e, 0xfb, 0xff}}},
     44     {{{  5566,   1053,  -5476}, 0, {   990,    990}, {0x00, 0x7e, 0xfb, 0xff}}},
     45     {{{  5362,   1046,  -5613}, 0, {   990,      0}, {0x00, 0x7e, 0xfb, 0xff}}},
     46     {{{  5428,   1062,  -5273}, 0, {     0,    990}, {0x00, 0x7e, 0xfb, 0xff}}},
     47     {{{  -170,   4864,     33}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     48     {{{    33,   4864,    171}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     49     {{{   171,   4864,    -32}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     50 };
     51 
     52 // 0x07008B50 - 0x07008BF0
     53 static const Vtx sl_seg7_vertex_07008B50[] = {
     54     {{{  5496,   1024,  -3308}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     55     {{{  5837,   1024,  -3374}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     56     {{{  5633,   1024,  -3512}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     57     {{{ -3940,   1024,  -1163}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     58     {{{ -3599,   1024,  -1230}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     59     {{{ -3803,   1024,  -1367}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     60     {{{ -3736,   1024,  -1026}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     61     {{{  -170,   4864,     33}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     62     {{{   171,   4864,    -32}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     63     {{{   -32,   4864,   -170}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     64 };
     65 
     66 // 0x07008BF0 - 0x07008C30
     67 static const Vtx sl_seg7_vertex_07008BF0[] = {
     68     {{{  3762,   1024,   5487}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     69     {{{  5401,   1024,   3849}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     70     {{{  3762,   1024,   3849}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     71     {{{  5401,   1024,   5487}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     72 };
     73 
     74 // 0x07008C30 - 0x07008D10
     75 static const Gfx sl_seg7_dl_07008C30[] = {
     76     gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, snow_09009800),
     77     gsDPLoadSync(),
     78     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
     79     gsSPLight(&sl_seg7_lights_07008930.l, 1),
     80     gsSPLight(&sl_seg7_lights_07008930.a, 2),
     81     gsSPVertex(sl_seg7_vertex_07008960, 16, 0),
     82     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
     83     gsSP2Triangles( 3,  5,  6, 0x0,  3,  6,  7, 0x0),
     84     gsSP2Triangles( 8,  9, 10, 0x0,  8, 10, 11, 0x0),
     85     gsSP2Triangles( 0,  2, 12, 0x0, 13, 14, 15, 0x0),
     86     gsSPVertex(sl_seg7_vertex_07008A60, 15, 0),
     87     gsSP2Triangles( 0,  1,  2, 0x0,  0,  3,  1, 0x0),
     88     gsSP2Triangles( 4,  5,  6, 0x0,  4,  7,  5, 0x0),
     89     gsSP2Triangles( 8,  9, 10, 0x0,  8, 11,  9, 0x0),
     90     gsSP1Triangle(12, 13, 14, 0x0),
     91     gsSPVertex(sl_seg7_vertex_07008B50, 10, 0),
     92     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
     93     gsSP2Triangles( 3,  6,  4, 0x0,  7,  8,  9, 0x0),
     94     gsSPEndDisplayList(),
     95 };
     96 
     97 // 0x07008D10 - 0x07008D58
     98 static const Gfx sl_seg7_dl_07008D10[] = {
     99     gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, snow_09009000),
    100     gsDPLoadSync(),
    101     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
    102     gsSPLight(&sl_seg7_lights_07008948.l, 1),
    103     gsSPLight(&sl_seg7_lights_07008948.a, 2),
    104     gsSPVertex(sl_seg7_vertex_07008BF0, 4, 0),
    105     gsSP2Triangles( 0,  1,  2, 0x0,  0,  3,  1, 0x0),
    106     gsSPEndDisplayList(),
    107 };
    108 
    109 // 0x07008D58 - 0x07008DE8
    110 const Gfx sl_seg7_dl_07008D58[] = {
    111     gsDPPipeSync(),
    112     gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
    113     gsSPClearGeometryMode(G_SHADING_SMOOTH),
    114     gsDPSetTile(G_IM_FMT_IA, 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),
    115     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
    116     gsDPTileSync(),
    117     gsDPSetTile(G_IM_FMT_IA, 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(sl_seg7_dl_07008C30),
    120     gsDPTileSync(),
    121     gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
    122     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
    123     gsSPDisplayList(sl_seg7_dl_07008D10),
    124     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
    125     gsDPPipeSync(),
    126     gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
    127     gsSPSetGeometryMode(G_SHADING_SMOOTH),
    128     gsSPEndDisplayList(),
    129 };