sm64

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

model.inc.c (13335B)


      1 // 0x0701FEE0 - 0x0701FEF8
      2 static const Lights1 ccm_seg7_lights_0701FEE0 = gdSPDefLights1(
      3     0x00, 0x00, 0x00,
      4     0x00, 0x00, 0x00, 0x28, 0x28, 0x28
      5 );
      6 
      7 // 0x0701FEF8 - 0x0701FF10
      8 static const Lights1 ccm_seg7_lights_0701FEF8 = gdSPDefLights1(
      9     0x3f, 0x3f, 0x3f,
     10     0xff, 0xff, 0xff, 0x28, 0x28, 0x28
     11 );
     12 
     13 // 0x0701FF10 - 0x0701FF70
     14 static const Vtx ccm_seg7_vertex_0701FF10[] = {
     15     {{{  5124,      0,  -8124}, 0, {   224,    479}, {0x00, 0x00, 0x7f, 0xff}}},
     16     {{{  5124,  -8191,  -8124}, 0, {   479,    479}, {0x00, 0x00, 0x7f, 0xff}}},
     17     {{{  8308,      0,  -8124}, 0, {   223,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     18     {{{  8308,  -8191,  -8124}, 0, {   479,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     19     {{{  8308,   8192,  -8124}, 0, {     0,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     20     {{{  5124,   8192,  -8124}, 0, {     0,    479}, {0x00, 0x00, 0x7f, 0xff}}},
     21 };
     22 
     23 // 0x0701FF70 - 0x07020070
     24 static const Vtx ccm_seg7_vertex_0701FF70[] = {
     25     {{{ -6061,  -5830,  -3601}, 0, {  2012,   3948}, {0x00, 0x82, 0x0e, 0xff}}},
     26     {{{ -5784,  -5830,  -3601}, 0, {  3034,   3948}, {0x00, 0x82, 0x0e, 0xff}}},
     27     {{{ -5784,  -5799,  -3326}, 0, {  3034,   4970}, {0x00, 0x82, 0x0e, 0xff}}},
     28     {{{ -5784,  -5845,  -6133}, 0, { -2074,    -28}, {0x00, 0x00, 0x81, 0xff}}},
     29     {{{ -7167,  -6111,  -6133}, 0, {  3034,    990}, {0x00, 0x00, 0x81, 0xff}}},
     30     {{{ -7167,  -5845,  -6133}, 0, {  3034,      0}, {0x00, 0x00, 0x81, 0xff}}},
     31     {{{ -5784,  -6111,  -6133}, 0, { -2074,    992}, {0x00, 0x00, 0x81, 0xff}}},
     32     {{{ -7167,  -5799,  -3326}, 0, { -2074,   4970}, {0x00, 0x82, 0x0e, 0xff}}},
     33     {{{ -7167,  -5830,  -3601}, 0, { -2074,   3948}, {0x00, 0x82, 0x0e, 0xff}}},
     34     {{{ -6890,  -5830,  -3601}, 0, { -1052,   3948}, {0x00, 0x82, 0x0e, 0xff}}},
     35     {{{ -6890,  -5830,  -3601}, 0, { -1052,   3948}, {0x00, 0x82, 0x0d, 0xff}}},
     36     {{{ -6337,  -5860,  -3876}, 0, {   990,   2926}, {0x00, 0x82, 0x0d, 0xff}}},
     37     {{{ -6061,  -5830,  -3601}, 0, {  2012,   3948}, {0x00, 0x82, 0x0d, 0xff}}},
     38     {{{ -6614,  -5860,  -3876}, 0, {     0,   2926}, {0x00, 0x82, 0x0d, 0xff}}},
     39     {{{ -6890,  -5860,  -3876}, 0, { -1052,   2926}, {0x00, 0x82, 0x0d, 0xff}}},
     40     {{{ -6061,  -5860,  -3876}, 0, {  2012,   2926}, {0x00, 0x82, 0x0d, 0xff}}},
     41 };
     42 
     43 // 0x07020070 - 0x07020170
     44 static const Vtx ccm_seg7_vertex_07020070[] = {
     45     {{{ -6614,  -5860,  -3876}, 0, {     0,   2926}, {0x00, 0x82, 0x0e, 0xff}}},
     46     {{{ -6337,  -6074,  -5800}, 0, {   990,  -4226}, {0x00, 0x82, 0x0e, 0xff}}},
     47     {{{ -6337,  -5860,  -3876}, 0, {   990,   2926}, {0x00, 0x82, 0x0e, 0xff}}},
     48     {{{ -6614,  -6074,  -5800}, 0, {     0,  -4226}, {0x00, 0x82, 0x0e, 0xff}}},
     49     {{{ -6614,  -6074,  -5800}, 0, {     0,  -4226}, {0x00, 0x82, 0x0d, 0xff}}},
     50     {{{ -7166,  -6074,  -5800}, 0, { -2072,  -4226}, {0x00, 0x82, 0x0d, 0xff}}},
     51     {{{ -7167,  -6112,  -6143}, 0, { -2074,  -5502}, {0x00, 0x82, 0x0d, 0xff}}},
     52     {{{ -5784,  -6112,  -6143}, 0, {  3036,  -5502}, {0x00, 0x82, 0x0d, 0xff}}},
     53     {{{ -6337,  -6074,  -5800}, 0, {   990,  -4226}, {0x00, 0x82, 0x0d, 0xff}}},
     54     {{{ -5784,  -6074,  -5800}, 0, {  3036,  -4226}, {0x00, 0x82, 0x0d, 0xff}}},
     55     {{{ -5785,  -5523,  -3326}, 0, {  3034,   5076}, {0x00, 0x7e, 0xf3, 0xff}}},
     56     {{{ -5785,  -5553,  -3601}, 0, {  3034,   4054}, {0x00, 0x7e, 0xf3, 0xff}}},
     57     {{{ -6061,  -5553,  -3601}, 0, {  2012,   4054}, {0x00, 0x7e, 0xf3, 0xff}}},
     58     {{{ -6338,  -5584,  -3876}, 0, {   990,      0}, {0x7e, 0x00, 0x00, 0xff}}},
     59     {{{ -6337,  -6074,  -5800}, 0, {  8144,    990}, {0x7e, 0x00, 0x00, 0xff}}},
     60     {{{ -6338,  -5798,  -5800}, 0, {  8144,      0}, {0x7e, 0x00, 0x00, 0xff}}},
     61 };
     62 
     63 // 0x07020170 - 0x07020270
     64 static const Vtx ccm_seg7_vertex_07020170[] = {
     65     {{{ -5785,  -5523,  -3326}, 0, {  3034,   5076}, {0x00, 0x7e, 0xf3, 0xff}}},
     66     {{{ -6061,  -5553,  -3601}, 0, {  2012,   4054}, {0x00, 0x7e, 0xf3, 0xff}}},
     67     {{{ -6891,  -5553,  -3601}, 0, { -1052,   4054}, {0x00, 0x7e, 0xf3, 0xff}}},
     68     {{{ -6061,  -5553,  -3601}, 0, {  2012,   4054}, {0x00, 0x7e, 0xf2, 0xff}}},
     69     {{{ -6338,  -5584,  -3876}, 0, {   990,   3032}, {0x00, 0x7e, 0xf2, 0xff}}},
     70     {{{ -6891,  -5553,  -3601}, 0, { -1052,   4054}, {0x00, 0x7e, 0xf2, 0xff}}},
     71     {{{ -6338,  -5798,  -5800}, 0, {   990,  -4120}, {0x00, 0x7e, 0xf2, 0xff}}},
     72     {{{ -6614,  -5798,  -5800}, 0, {     0,  -4120}, {0x00, 0x7e, 0xf2, 0xff}}},
     73     {{{ -6614,  -5584,  -3876}, 0, {     0,   3032}, {0x00, 0x7e, 0xf2, 0xff}}},
     74     {{{ -6061,  -5584,  -3876}, 0, {  2012,   3032}, {0x00, 0x7e, 0xf2, 0xff}}},
     75     {{{ -6891,  -5584,  -3876}, 0, { -1052,   3032}, {0x00, 0x7e, 0xf2, 0xff}}},
     76     {{{ -7167,  -5553,  -3601}, 0, { -2074,   4054}, {0x00, 0x7e, 0xf3, 0xff}}},
     77     {{{ -7167,  -5523,  -3326}, 0, { -2074,   5076}, {0x00, 0x7e, 0xf3, 0xff}}},
     78     {{{ -6338,  -5584,  -3876}, 0, {   990,      0}, {0x7e, 0x00, 0x00, 0xff}}},
     79     {{{ -6337,  -5860,  -3876}, 0, {   990,    990}, {0x7e, 0x00, 0x00, 0xff}}},
     80     {{{ -6337,  -6074,  -5800}, 0, {  8144,    990}, {0x7e, 0x00, 0x00, 0xff}}},
     81 };
     82 
     83 // 0x07020270 - 0x07020360
     84 static const Vtx ccm_seg7_vertex_07020270[] = {
     85     {{{ -6338,  -5798,  -5800}, 0, {   990,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     86     {{{ -5784,  -6074,  -5800}, 0, {  3034,    990}, {0x00, 0x00, 0x7f, 0xff}}},
     87     {{{ -5784,  -5798,  -5800}, 0, {  3034,    -30}, {0x00, 0x00, 0x7f, 0xff}}},
     88     {{{ -6061,  -5553,  -3601}, 0, {     0,      0}, {0x7f, 0x00, 0x00, 0xff}}},
     89     {{{ -6061,  -5860,  -3876}, 0, {   990,    990}, {0x7f, 0x00, 0x00, 0xff}}},
     90     {{{ -6061,  -5584,  -3876}, 0, {   990,      0}, {0x7f, 0x00, 0x00, 0xff}}},
     91     {{{ -6061,  -5830,  -3601}, 0, {     0,    990}, {0x7f, 0x00, 0x00, 0xff}}},
     92     {{{ -6891,  -5584,  -3876}, 0, {     0,      0}, {0x82, 0x00, 0x00, 0xff}}},
     93     {{{ -6890,  -5860,  -3876}, 0, {     0,    990}, {0x82, 0x00, 0x00, 0xff}}},
     94     {{{ -6890,  -5830,  -3601}, 0, {   990,    990}, {0x82, 0x00, 0x00, 0xff}}},
     95     {{{ -6891,  -5553,  -3601}, 0, {   990,      0}, {0x82, 0x00, 0x00, 0xff}}},
     96     {{{ -6614,  -5798,  -5800}, 0, { -7184,    -30}, {0x81, 0x00, 0x00, 0xff}}},
     97     {{{ -6614,  -6074,  -5800}, 0, { -7184,    990}, {0x81, 0x00, 0x00, 0xff}}},
     98     {{{ -6614,  -5860,  -3876}, 0, {     0,    990}, {0x81, 0x00, 0x00, 0xff}}},
     99     {{{ -6614,  -5584,  -3876}, 0, {     0,    -30}, {0x81, 0x00, 0x00, 0xff}}},
    100 };
    101 
    102 // 0x07020360 - 0x07020450
    103 static const Vtx ccm_seg7_vertex_07020360[] = {
    104     {{{ -6614,  -5584,  -3876}, 0, {     0,      0}, {0x00, 0x00, 0x81, 0xff}}},
    105     {{{ -6614,  -5860,  -3876}, 0, {     0,    990}, {0x00, 0x00, 0x81, 0xff}}},
    106     {{{ -6890,  -5860,  -3876}, 0, {   990,    990}, {0x00, 0x00, 0x81, 0xff}}},
    107     {{{ -6338,  -5798,  -5800}, 0, {   990,      0}, {0x00, 0x00, 0x7f, 0xff}}},
    108     {{{ -6337,  -6074,  -5800}, 0, {   990,    990}, {0x00, 0x00, 0x7f, 0xff}}},
    109     {{{ -5784,  -6074,  -5800}, 0, {  3034,    990}, {0x00, 0x00, 0x7f, 0xff}}},
    110     {{{ -7167,  -5798,  -5800}, 0, { -2074,    -34}, {0x00, 0x00, 0x7f, 0xff}}},
    111     {{{ -7166,  -6074,  -5800}, 0, { -2074,    988}, {0x00, 0x00, 0x7f, 0xff}}},
    112     {{{ -6614,  -6074,  -5800}, 0, {     0,    990}, {0x00, 0x00, 0x7f, 0xff}}},
    113     {{{ -6614,  -5798,  -5800}, 0, {     0,      0}, {0x00, 0x00, 0x7f, 0xff}}},
    114     {{{ -6891,  -5553,  -3601}, 0, {     0,      0}, {0x00, 0x00, 0x81, 0xff}}},
    115     {{{ -7167,  -5830,  -3601}, 0, {   990,    990}, {0x00, 0x00, 0x81, 0xff}}},
    116     {{{ -7167,  -5553,  -3601}, 0, {   990,      0}, {0x00, 0x00, 0x81, 0xff}}},
    117     {{{ -6890,  -5830,  -3601}, 0, {     0,    990}, {0x00, 0x00, 0x81, 0xff}}},
    118     {{{ -6891,  -5584,  -3876}, 0, {   990,      0}, {0x00, 0x00, 0x81, 0xff}}},
    119 };
    120 
    121 // 0x07020450 - 0x07020540
    122 static const Vtx ccm_seg7_vertex_07020450[] = {
    123     {{{ -7167,  -5836,  -6143}, 0, { -2074,  -5398}, {0x00, 0x7e, 0xf3, 0xff}}},
    124     {{{ -7167,  -5798,  -5800}, 0, { -2074,  -4120}, {0x00, 0x7e, 0xf3, 0xff}}},
    125     {{{ -6614,  -5798,  -5800}, 0, {     0,  -4120}, {0x00, 0x7e, 0xf3, 0xff}}},
    126     {{{ -6061,  -5584,  -3876}, 0, {     0,      0}, {0x00, 0x00, 0x81, 0xff}}},
    127     {{{ -6337,  -5860,  -3876}, 0, {   990,    990}, {0x00, 0x00, 0x81, 0xff}}},
    128     {{{ -6338,  -5584,  -3876}, 0, {   990,      0}, {0x00, 0x00, 0x81, 0xff}}},
    129     {{{ -6061,  -5860,  -3876}, 0, {     0,    990}, {0x00, 0x00, 0x81, 0xff}}},
    130     {{{ -5785,  -5553,  -3601}, 0, {     0,      0}, {0x00, 0x00, 0x81, 0xff}}},
    131     {{{ -6061,  -5830,  -3601}, 0, {   990,    990}, {0x00, 0x00, 0x81, 0xff}}},
    132     {{{ -6061,  -5553,  -3601}, 0, {   990,      0}, {0x00, 0x00, 0x81, 0xff}}},
    133     {{{ -5784,  -5830,  -3601}, 0, {     0,    990}, {0x00, 0x00, 0x81, 0xff}}},
    134     {{{ -7167,  -5534,  -3337}, 0, { -2074,      0}, {0x00, 0x00, 0x7f, 0xff}}},
    135     {{{ -7167,  -5800,  -3337}, 0, { -2074,    990}, {0x00, 0x00, 0x7f, 0xff}}},
    136     {{{ -5784,  -5800,  -3337}, 0, {  3034,    992}, {0x00, 0x00, 0x7f, 0xff}}},
    137     {{{ -5785,  -5534,  -3337}, 0, {  3034,    -28}, {0x00, 0x00, 0x7f, 0xff}}},
    138 };
    139 
    140 // 0x07020540 - 0x07020590
    141 static const Vtx ccm_seg7_vertex_07020540[] = {
    142     {{{ -6338,  -5798,  -5800}, 0, {   990,  -4120}, {0x00, 0x7e, 0xf3, 0xff}}},
    143     {{{ -5784,  -5798,  -5800}, 0, {  3034,  -4120}, {0x00, 0x7e, 0xf3, 0xff}}},
    144     {{{ -5784,  -5836,  -6143}, 0, {  3034,  -5398}, {0x00, 0x7e, 0xf3, 0xff}}},
    145     {{{ -7167,  -5836,  -6143}, 0, { -2074,  -5398}, {0x00, 0x7e, 0xf3, 0xff}}},
    146     {{{ -6614,  -5798,  -5800}, 0, {     0,  -4120}, {0x00, 0x7e, 0xf3, 0xff}}},
    147 };
    148 
    149 // 0x07020590 - 0x070205E8
    150 static const Gfx ccm_seg7_dl_07020590[] = {
    151     gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, ccm_seg7_texture_07003900),
    152     gsDPLoadSync(),
    153     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 16 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
    154     gsSPLight(&ccm_seg7_lights_0701FEE0.l, 1),
    155     gsSPLight(&ccm_seg7_lights_0701FEE0.a, 2),
    156     gsSPVertex(ccm_seg7_vertex_0701FF10, 6, 0),
    157     gsSP2Triangles( 0,  1,  2, 0x0,  1,  3,  2, 0x0),
    158     gsSP2Triangles( 0,  2,  4, 0x0,  5,  0,  4, 0x0),
    159     gsSPEndDisplayList(),
    160 };
    161 
    162 // 0x070205E8 - 0x070207F0
    163 static const Gfx ccm_seg7_dl_070205E8[] = {
    164     gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, ccm_seg7_texture_07003B00),
    165     gsDPLoadSync(),
    166     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
    167     gsSPLight(&ccm_seg7_lights_0701FEF8.l, 1),
    168     gsSPLight(&ccm_seg7_lights_0701FEF8.a, 2),
    169     gsSPVertex(ccm_seg7_vertex_0701FF70, 16, 0),
    170     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
    171     gsSP2Triangles( 3,  6,  4, 0x0,  7,  8,  9, 0x0),
    172     gsSP2Triangles( 7,  9,  2, 0x0, 10, 11, 12, 0x0),
    173     gsSP2Triangles(10, 13, 11, 0x0, 10, 14, 13, 0x0),
    174     gsSP2Triangles( 9,  0,  2, 0x0, 11, 15, 12, 0x0),
    175     gsSPVertex(ccm_seg7_vertex_07020070, 16, 0),
    176     gsSP2Triangles( 0,  1,  2, 0x0,  0,  3,  1, 0x0),
    177     gsSP2Triangles( 4,  5,  6, 0x0,  7,  4,  6, 0x0),
    178     gsSP2Triangles( 7,  8,  4, 0x0,  7,  9,  8, 0x0),
    179     gsSP2Triangles(10, 11, 12, 0x0, 13, 14, 15, 0x0),
    180     gsSPVertex(ccm_seg7_vertex_07020170, 16, 0),
    181     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
    182     gsSP2Triangles( 4,  6,  7, 0x0,  4,  7,  8, 0x0),
    183     gsSP2Triangles( 4,  8,  5, 0x0,  3,  9,  4, 0x0),
    184     gsSP2Triangles( 8, 10,  5, 0x0,  2, 11, 12, 0x0),
    185     gsSP2Triangles( 0,  2, 12, 0x0, 13, 14, 15, 0x0),
    186     gsSPVertex(ccm_seg7_vertex_07020270, 15, 0),
    187     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
    188     gsSP2Triangles( 3,  6,  4, 0x0,  7,  8,  9, 0x0),
    189     gsSP2Triangles( 7,  9, 10, 0x0, 11, 12, 13, 0x0),
    190     gsSP1Triangle(11, 13, 14, 0x0),
    191     gsSPVertex(ccm_seg7_vertex_07020360, 15, 0),
    192     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
    193     gsSP2Triangles( 6,  7,  8, 0x0,  6,  8,  9, 0x0),
    194     gsSP2Triangles(10, 11, 12, 0x0, 10, 13, 11, 0x0),
    195     gsSP1Triangle( 0,  2, 14, 0x0),
    196     gsSPVertex(ccm_seg7_vertex_07020450, 15, 0),
    197     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
    198     gsSP2Triangles( 3,  6,  4, 0x0,  7,  8,  9, 0x0),
    199     gsSP2Triangles( 7, 10,  8, 0x0, 11, 12, 13, 0x0),
    200     gsSP1Triangle(11, 13, 14, 0x0),
    201     gsSPVertex(ccm_seg7_vertex_07020540, 5, 0),
    202     gsSP2Triangles( 0,  1,  2, 0x0,  3,  0,  2, 0x0),
    203     gsSP1Triangle( 3,  4,  0, 0x0),
    204     gsSPEndDisplayList(),
    205 };
    206 
    207 // 0x070207F0 - 0x07020880
    208 const Gfx ccm_seg7_dl_070207F0[] = {
    209     gsDPPipeSync(),
    210     gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
    211     gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
    212     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),
    213     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
    214     gsDPTileSync(),
    215     gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 4, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 4, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 4, G_TX_NOLOD),
    216     gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (16 - 1) << G_TEXTURE_IMAGE_FRAC),
    217     gsSPDisplayList(ccm_seg7_dl_07020590),
    218     gsDPTileSync(),
    219     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),
    220     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
    221     gsSPDisplayList(ccm_seg7_dl_070205E8),
    222     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
    223     gsDPPipeSync(),
    224     gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
    225     gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
    226     gsSPEndDisplayList(),
    227 };