sm64

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

model.inc.c (14507B)


      1 // 0x07023160 - 0x07023178
      2 static const Lights1 hmc_seg7_lights_07023160 = gdSPDefLights1(
      3     0x79, 0x79, 0x79,
      4     0xff, 0xff, 0xff, 0x28, 0x28, 0x28
      5 );
      6 
      7 // 0x07023178 - 0x07023278
      8 static const Vtx hmc_seg7_vertex_07023178[] = {
      9     {{{  -204,      0,      0}, 0, {  2012,   2012}, {0x82, 0x00, 0x00, 0xff}}},
     10     {{{  -173,    102,     33}, 0, {  2830,   3448}, {0x96, 0x41, 0x14, 0xff}}},
     11     {{{  -173,     63,    -86}, 0, {  3648,   3448}, {0x96, 0x28, 0xc9, 0xff}}},
     12     {{{  -173,      0,    108}, 0, {  2012,   3448}, {0x96, 0x00, 0x44, 0xff}}},
     13     {{{   -91,    108,    148}, 0, {  2420,   4888}, {0xc0, 0x40, 0x58, 0xff}}},
     14     {{{   -91,      0,    183}, 0, {  2012,   4888}, {0xc8, 0x00, 0x71, 0xff}}},
     15     {{{   -91,    174,     57}, 0, {  2830,   4888}, {0xc8, 0x6c, 0x23, 0xff}}},
     16     {{{     0,    -62,    195}, 0, {  1808,   6096}, {0x00, 0xd9, 0x78, 0xff}}},
     17     {{{     0,     63,    195}, 0, {  2216,   6096}, {0x00, 0x27, 0x78, 0xff}}},
     18     {{{    92,      0,    183}, 0, {  2012,   7304}, {0x3f, 0x00, 0x6d, 0xff}}},
     19     {{{    92,   -107,    148}, 0, {  1604,   7304}, {0x37, 0xbd, 0x5c, 0xff}}},
     20     {{{    92,    108,    148}, 0, {  2420,   7304}, {0x38, 0x43, 0x5c, 0xff}}},
     21     {{{   -91,    174,    -56}, 0, {  3238,   4888}, {0xc0, 0x68, 0xdf, 0xff}}},
     22     {{{   -91,    108,   -147}, 0, {  3648,   4888}, {0xc8, 0x42, 0xa4, 0xff}}},
     23     {{{     0,    166,    120}, 0, {  2626,   6096}, {0x00, 0x66, 0x4a, 0xff}}},
     24     {{{     0,    205,      0}, 0, {  3034,   6096}, {0x00, 0x7e, 0x00, 0xff}}},
     25 };
     26 
     27 // 0x07023278 - 0x07023378
     28 static const Vtx hmc_seg7_vertex_07023278[] = {
     29     {{{     0,    166,    120}, 0, {  2626,   6096}, {0x00, 0x66, 0x4a, 0xff}}},
     30     {{{    92,    108,    148}, 0, {  2420,   7304}, {0x38, 0x43, 0x5c, 0xff}}},
     31     {{{    92,    174,     57}, 0, {  2830,   7304}, {0x40, 0x68, 0x21, 0xff}}},
     32     {{{     0,    205,      0}, 0, {  3034,   6096}, {0x00, 0x7e, 0x00, 0xff}}},
     33     {{{    92,    174,    -56}, 0, {  3238,   7304}, {0x38, 0x6c, 0xdd, 0xff}}},
     34     {{{  -204,      0,      0}, 0, {     0,   2012}, {0x82, 0x00, 0x00, 0xff}}},
     35     {{{  -173,     63,    -86}, 0, {  -438,   3448}, {0x96, 0x28, 0xc9, 0xff}}},
     36     {{{  -173,    -62,    -86}, 0, {   376,   3448}, {0x96, 0xd8, 0xc9, 0xff}}},
     37     {{{     0,     63,   -194}, 0, {  3852,   6096}, {0x00, 0x27, 0x88, 0xff}}},
     38     {{{    92,    108,   -147}, 0, {  3648,   7304}, {0x3f, 0x40, 0xa8, 0xff}}},
     39     {{{    92,      0,   -182}, 0, {  4056,   7304}, {0x37, 0x00, 0x8e, 0xff}}},
     40     {{{   -91,      0,   -182}, 0, {     0,   4888}, {0xc0, 0x00, 0x93, 0xff}}},
     41     {{{   -91,   -107,   -147}, 0, {   376,   4888}, {0xc8, 0xbd, 0xa4, 0xff}}},
     42     {{{  -173,     63,    -86}, 0, {  3648,   3448}, {0x96, 0x28, 0xc9, 0xff}}},
     43     {{{   -91,    108,   -147}, 0, {  3648,   4888}, {0xc8, 0x42, 0xa4, 0xff}}},
     44     {{{   -91,      0,   -182}, 0, {  4056,   4888}, {0xc0, 0x00, 0x93, 0xff}}},
     45 };
     46 
     47 // 0x07023378 - 0x07023478
     48 static const Vtx hmc_seg7_vertex_07023378[] = {
     49     {{{   -91,    108,   -147}, 0, {  3648,   4888}, {0xc8, 0x42, 0xa4, 0xff}}},
     50     {{{     0,    166,   -119}, 0, {  3442,   6096}, {0x00, 0x66, 0xb6, 0xff}}},
     51     {{{     0,     63,   -194}, 0, {  3852,   6096}, {0x00, 0x27, 0x88, 0xff}}},
     52     {{{    92,    108,   -147}, 0, {  3648,   7304}, {0x3f, 0x40, 0xa8, 0xff}}},
     53     {{{    92,    174,    -56}, 0, {  3238,   7304}, {0x38, 0x6c, 0xdd, 0xff}}},
     54     {{{  -204,      0,      0}, 0, {  2012,   2012}, {0x82, 0x00, 0x00, 0xff}}},
     55     {{{  -173,   -101,     33}, 0, {  1194,   3448}, {0x96, 0xbf, 0x14, 0xff}}},
     56     {{{  -173,      0,    108}, 0, {  2012,   3448}, {0x96, 0x00, 0x44, 0xff}}},
     57     {{{  -204,      0,      0}, 0, {     0,   2012}, {0x82, 0x00, 0x00, 0xff}}},
     58     {{{  -173,    -62,    -86}, 0, {   376,   3448}, {0x96, 0xd8, 0xc9, 0xff}}},
     59     {{{   -91,   -173,    -56}, 0, {   786,   4888}, {0xc0, 0x98, 0xdf, 0xff}}},
     60     {{{   -91,   -107,   -147}, 0, {   376,   4888}, {0xc8, 0xbd, 0xa4, 0xff}}},
     61     {{{   -91,   -173,     57}, 0, {  1194,   4888}, {0xc8, 0x94, 0x23, 0xff}}},
     62     {{{     0,    -62,   -194}, 0, {   172,   6096}, {0x00, 0xd9, 0x88, 0xff}}},
     63     {{{     0,   -165,   -119}, 0, {   582,   6096}, {0x00, 0x9a, 0xb6, 0xff}}},
     64     {{{    92,   -107,   -147}, 0, {   376,   7304}, {0x3f, 0xc0, 0xa8, 0xff}}},
     65 };
     66 
     67 // 0x07023478 - 0x07023558
     68 static const Vtx hmc_seg7_vertex_07023478[] = {
     69     {{{     0,    -62,   -194}, 0, {   172,   6096}, {0x00, 0xd9, 0x88, 0xff}}},
     70     {{{    92,      0,   -182}, 0, {     0,   7304}, {0x37, 0x00, 0x8e, 0xff}}},
     71     {{{    92,   -107,   -147}, 0, {   376,   7304}, {0x3f, 0xc0, 0xa8, 0xff}}},
     72     {{{     0,   -165,   -119}, 0, {   582,   6096}, {0x00, 0x9a, 0xb6, 0xff}}},
     73     {{{    92,   -173,    -56}, 0, {   786,   7304}, {0x38, 0x94, 0xdd, 0xff}}},
     74     {{{  -173,   -101,     33}, 0, {  1194,   3448}, {0x96, 0xbf, 0x14, 0xff}}},
     75     {{{   -91,   -107,    148}, 0, {  1604,   4888}, {0xc1, 0xc0, 0x58, 0xff}}},
     76     {{{  -173,      0,    108}, 0, {  2012,   3448}, {0x96, 0x00, 0x44, 0xff}}},
     77     {{{   -91,   -173,     57}, 0, {  1194,   4888}, {0xc8, 0x94, 0x23, 0xff}}},
     78     {{{   -91,      0,    183}, 0, {  2012,   4888}, {0xc8, 0x00, 0x71, 0xff}}},
     79     {{{     0,   -204,      0}, 0, {   990,   6096}, {0x00, 0x82, 0x00, 0xff}}},
     80     {{{     0,   -165,    120}, 0, {  1398,   6096}, {0x00, 0x9a, 0x4a, 0xff}}},
     81     {{{    92,   -173,     57}, 0, {  1194,   7304}, {0x40, 0x98, 0x21, 0xff}}},
     82     {{{    92,   -107,    148}, 0, {  1604,   7304}, {0x37, 0xbd, 0x5c, 0xff}}},
     83 };
     84 
     85 // 0x07023558 - 0x07023638
     86 static const Vtx hmc_seg7_vertex_07023558[] = {
     87     {{{   205,      0,      0}, 0, {  4056,  10184}, {0x7e, 0x00, 0x00, 0xff}}},
     88     {{{   174,      0,   -107}, 0, {  4056,   8744}, {0x6a, 0x00, 0xbc, 0xff}}},
     89     {{{   174,    102,    -32}, 0, {  3238,   8744}, {0x6a, 0x41, 0xeb, 0xff}}},
     90     {{{     0,     63,   -194}, 0, {  3852,   6096}, {0x00, 0x27, 0x88, 0xff}}},
     91     {{{   -91,      0,   -182}, 0, {  4056,   4888}, {0xc0, 0x00, 0x93, 0xff}}},
     92     {{{   -91,    108,   -147}, 0, {  3648,   4888}, {0xc8, 0x42, 0xa4, 0xff}}},
     93     {{{    92,    108,   -147}, 0, {  3648,   7304}, {0x3f, 0x40, 0xa8, 0xff}}},
     94     {{{    92,      0,   -182}, 0, {  4056,   7304}, {0x37, 0x00, 0x8e, 0xff}}},
     95     {{{    92,    174,    -56}, 0, {  3238,   7304}, {0x38, 0x6c, 0xdd, 0xff}}},
     96     {{{    92,      0,   -182}, 0, {     0,   7304}, {0x37, 0x00, 0x8e, 0xff}}},
     97     {{{     0,    -62,   -194}, 0, {   172,   6096}, {0x00, 0xd9, 0x88, 0xff}}},
     98     {{{     0,     63,   -194}, 0, {  -234,   6096}, {0x00, 0x27, 0x88, 0xff}}},
     99     {{{   -91,   -107,   -147}, 0, {   376,   4888}, {0xc8, 0xbd, 0xa4, 0xff}}},
    100     {{{   -91,      0,   -182}, 0, {     0,   4888}, {0xc0, 0x00, 0x93, 0xff}}},
    101 };
    102 
    103 // 0x07023638 - 0x07023728
    104 static const Vtx hmc_seg7_vertex_07023638[] = {
    105     {{{   205,      0,      0}, 0, {  2012,  10184}, {0x7e, 0x00, 0x00, 0xff}}},
    106     {{{   174,     63,     87}, 0, {  2420,   8744}, {0x6a, 0x28, 0x37, 0xff}}},
    107     {{{   174,    -62,     87}, 0, {  1604,   8744}, {0x6a, 0xd8, 0x37, 0xff}}},
    108     {{{   205,      0,      0}, 0, {  4056,  10184}, {0x7e, 0x00, 0x00, 0xff}}},
    109     {{{   174,    102,    -32}, 0, {  3238,   8744}, {0x6a, 0x41, 0xeb, 0xff}}},
    110     {{{    92,    174,     57}, 0, {  2830,   7304}, {0x40, 0x68, 0x21, 0xff}}},
    111     {{{    92,    174,    -56}, 0, {  3238,   7304}, {0x38, 0x6c, 0xdd, 0xff}}},
    112     {{{    92,    108,    148}, 0, {  2420,   7304}, {0x38, 0x43, 0x5c, 0xff}}},
    113     {{{     0,    166,   -119}, 0, {  3442,   6096}, {0x00, 0x66, 0xb6, 0xff}}},
    114     {{{     0,    205,      0}, 0, {  3034,   6096}, {0x00, 0x7e, 0x00, 0xff}}},
    115     {{{   -91,    174,    -56}, 0, {  3238,   4888}, {0xc0, 0x68, 0xdf, 0xff}}},
    116     {{{   -91,    108,   -147}, 0, {  3648,   4888}, {0xc8, 0x42, 0xa4, 0xff}}},
    117     {{{   -91,    174,     57}, 0, {  2830,   4888}, {0xc8, 0x6c, 0x23, 0xff}}},
    118     {{{    92,      0,    183}, 0, {  2012,   7304}, {0x3f, 0x00, 0x6d, 0xff}}},
    119     {{{    92,   -107,    148}, 0, {  1604,   7304}, {0x37, 0xbd, 0x5c, 0xff}}},
    120 };
    121 
    122 // 0x07023728 - 0x07023828
    123 static const Vtx hmc_seg7_vertex_07023728[] = {
    124     {{{    92,    108,    148}, 0, {  2420,   7304}, {0x38, 0x43, 0x5c, 0xff}}},
    125     {{{     0,    166,    120}, 0, {  2626,   6096}, {0x00, 0x66, 0x4a, 0xff}}},
    126     {{{     0,     63,    195}, 0, {  2216,   6096}, {0x00, 0x27, 0x78, 0xff}}},
    127     {{{   -91,    108,    148}, 0, {  2420,   4888}, {0xc0, 0x40, 0x58, 0xff}}},
    128     {{{   -91,    174,     57}, 0, {  2830,   4888}, {0xc8, 0x6c, 0x23, 0xff}}},
    129     {{{   -91,      0,    183}, 0, {  2012,   4888}, {0xc8, 0x00, 0x71, 0xff}}},
    130     {{{   205,      0,      0}, 0, {  2012,  10184}, {0x7e, 0x00, 0x00, 0xff}}},
    131     {{{   174,    -62,     87}, 0, {  1604,   8744}, {0x6a, 0xd8, 0x37, 0xff}}},
    132     {{{   174,   -101,    -32}, 0, {   786,   8744}, {0x6a, 0xbf, 0xec, 0xff}}},
    133     {{{    92,   -107,    148}, 0, {  1604,   7304}, {0x37, 0xbd, 0x5c, 0xff}}},
    134     {{{    92,   -173,     57}, 0, {  1194,   7304}, {0x40, 0x98, 0x21, 0xff}}},
    135     {{{    92,   -173,    -56}, 0, {   786,   7304}, {0x38, 0x94, 0xdd, 0xff}}},
    136     {{{     0,    -62,    195}, 0, {  1808,   6096}, {0x00, 0xd9, 0x78, 0xff}}},
    137     {{{     0,   -165,    120}, 0, {  1398,   6096}, {0x00, 0x9a, 0x4a, 0xff}}},
    138     {{{   -91,   -107,    148}, 0, {  1604,   4888}, {0xc1, 0xc0, 0x58, 0xff}}},
    139     {{{   -91,   -173,     57}, 0, {  1194,   4888}, {0xc8, 0x94, 0x23, 0xff}}},
    140 };
    141 
    142 // 0x07023828 - 0x070238D8
    143 static const Vtx hmc_seg7_vertex_07023828[] = {
    144     {{{   205,      0,      0}, 0, {     0,  10184}, {0x7e, 0x00, 0x00, 0xff}}},
    145     {{{   174,   -101,    -32}, 0, {   786,   8744}, {0x6a, 0xbf, 0xec, 0xff}}},
    146     {{{   174,      0,   -107}, 0, {     0,   8744}, {0x6a, 0x00, 0xbc, 0xff}}},
    147     {{{     0,   -165,   -119}, 0, {   582,   6096}, {0x00, 0x9a, 0xb6, 0xff}}},
    148     {{{   -91,   -173,    -56}, 0, {   786,   4888}, {0xc0, 0x98, 0xdf, 0xff}}},
    149     {{{   -91,   -107,   -147}, 0, {   376,   4888}, {0xc8, 0xbd, 0xa4, 0xff}}},
    150     {{{    92,   -107,   -147}, 0, {   376,   7304}, {0x3f, 0xc0, 0xa8, 0xff}}},
    151     {{{    92,   -173,    -56}, 0, {   786,   7304}, {0x38, 0x94, 0xdd, 0xff}}},
    152     {{{    92,      0,   -182}, 0, {     0,   7304}, {0x37, 0x00, 0x8e, 0xff}}},
    153     {{{     0,   -204,      0}, 0, {   990,   6096}, {0x00, 0x82, 0x00, 0xff}}},
    154     {{{   -91,   -173,     57}, 0, {  1194,   4888}, {0xc8, 0x94, 0x23, 0xff}}},
    155 };
    156 
    157 // 0x070238D8 - 0x07023BC8
    158 static const Gfx hmc_seg7_dl_070238D8[] = {
    159     gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hmc_seg7_texture_07004800),
    160     gsDPLoadSync(),
    161     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
    162     gsSPLight(&hmc_seg7_lights_07023160.l, 1),
    163     gsSPLight(&hmc_seg7_lights_07023160.a, 2),
    164     gsSPVertex(hmc_seg7_vertex_07023178, 16, 0),
    165     gsSP2Triangles( 0,  1,  2, 0x0,  0,  3,  1, 0x0),
    166     gsSP2Triangles( 3,  4,  1, 0x0,  3,  5,  4, 0x0),
    167     gsSP2Triangles( 1,  4,  6, 0x0,  5,  7,  8, 0x0),
    168     gsSP2Triangles( 7,  9,  8, 0x0,  7, 10,  9, 0x0),
    169     gsSP2Triangles( 8,  9, 11, 0x0,  1, 12,  2, 0x0),
    170     gsSP2Triangles( 1,  6, 12, 0x0,  2, 12, 13, 0x0),
    171     gsSP1Triangle( 6, 14, 15, 0x0),
    172     gsSPVertex(hmc_seg7_vertex_07023278, 16, 0),
    173     gsSP2Triangles( 0,  1,  2, 0x0,  0,  2,  3, 0x0),
    174     gsSP2Triangles( 3,  2,  4, 0x0,  5,  6,  7, 0x0),
    175     gsSP2Triangles( 8,  9, 10, 0x0,  6, 11,  7, 0x0),
    176     gsSP2Triangles( 7, 11, 12, 0x0, 13, 14, 15, 0x0),
    177     gsSPVertex(hmc_seg7_vertex_07023378, 16, 0),
    178     gsSP2Triangles( 0,  1,  2, 0x0,  1,  3,  2, 0x0),
    179     gsSP2Triangles( 1,  4,  3, 0x0,  5,  6,  7, 0x0),
    180     gsSP2Triangles( 8,  9,  6, 0x0,  9, 10,  6, 0x0),
    181     gsSP2Triangles( 9, 11, 10, 0x0,  6, 10, 12, 0x0),
    182     gsSP2Triangles(11, 13, 14, 0x0, 13, 15, 14, 0x0),
    183     gsSPVertex(hmc_seg7_vertex_07023478, 14, 0),
    184     gsSP2Triangles( 0,  1,  2, 0x0,  3,  2,  4, 0x0),
    185     gsSP2Triangles( 5,  6,  7, 0x0,  5,  8,  6, 0x0),
    186     gsSP2Triangles( 7,  6,  9, 0x0,  8, 10, 11, 0x0),
    187     gsSP2Triangles(10, 12, 11, 0x0, 10,  4, 12, 0x0),
    188     gsSP1Triangle(11, 12, 13, 0x0),
    189     gsSPVertex(hmc_seg7_vertex_07023558, 14, 0),
    190     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
    191     gsSP2Triangles( 1,  6,  2, 0x0,  1,  7,  6, 0x0),
    192     gsSP2Triangles( 2,  6,  8, 0x0,  9, 10, 11, 0x0),
    193     gsSP2Triangles(10, 12, 13, 0x0, 10, 13, 11, 0x0),
    194     gsSPVertex(hmc_seg7_vertex_07023638, 15, 0),
    195     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  1, 0x0),
    196     gsSP2Triangles( 4,  5,  1, 0x0,  4,  6,  5, 0x0),
    197     gsSP2Triangles( 1,  5,  7, 0x0,  6,  8,  9, 0x0),
    198     gsSP2Triangles( 8, 10,  9, 0x0,  8, 11, 10, 0x0),
    199     gsSP2Triangles( 9, 10, 12, 0x0,  1, 13,  2, 0x0),
    200     gsSP2Triangles( 1,  7, 13, 0x0,  2, 13, 14, 0x0),
    201     gsSPVertex(hmc_seg7_vertex_07023728, 16, 0),
    202     gsSP2Triangles( 0,  1,  2, 0x0,  1,  3,  2, 0x0),
    203     gsSP2Triangles( 1,  4,  3, 0x0,  2,  3,  5, 0x0),
    204     gsSP2Triangles( 6,  7,  8, 0x0,  7,  9, 10, 0x0),
    205     gsSP2Triangles( 7, 10,  8, 0x0,  8, 10, 11, 0x0),
    206     gsSP2Triangles( 9, 12, 13, 0x0, 12, 14, 13, 0x0),
    207     gsSP2Triangles(12,  5, 14, 0x0, 13, 14, 15, 0x0),
    208     gsSPVertex(hmc_seg7_vertex_07023828, 11, 0),
    209     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
    210     gsSP2Triangles( 1,  6,  2, 0x0,  1,  7,  6, 0x0),
    211     gsSP2Triangles( 2,  6,  8, 0x0,  7,  9,  3, 0x0),
    212     gsSP2Triangles( 9,  4,  3, 0x0,  9, 10,  4, 0x0),
    213     gsSPEndDisplayList(),
    214 };
    215 
    216 // 0x07023BC8 - 0x07023C70
    217 const Gfx hmc_seg7_dl_07023BC8[] = {
    218     gsDPPipeSync(),
    219     gsDPSetCycleType(G_CYC_2CYCLE),
    220     gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2),
    221     gsDPSetDepthSource(G_ZS_PIXEL),
    222     gsDPSetFogColor(0, 0, 0, 255),
    223     gsSPFogPosition(960, 1000),
    224     gsSPSetGeometryMode(G_FOG),
    225     gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_PASS2),
    226     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),
    227     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
    228     gsDPTileSync(),
    229     gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD),
    230     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC),
    231     gsSPDisplayList(hmc_seg7_dl_070238D8),
    232     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
    233     gsDPPipeSync(),
    234     gsDPSetCycleType(G_CYC_1CYCLE),
    235     gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_NOOP2),
    236     gsSPClearGeometryMode(G_FOG),
    237     gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
    238     gsSPEndDisplayList(),
    239 };