sm64

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

model.inc.c (13103B)


      1 // Water Bubble
      2 
      3 // 0x0500FE68
      4 static const Lights1 water_bubble_seg5_lights_0500FE68 = gdSPDefLights1(
      5     0xbf, 0xbf, 0xbf,
      6     0xff, 0xff, 0xff, 0x28, 0x28, 0x28
      7 );
      8 
      9 // 0x0500FE80
     10 ALIGNED8 static const Texture water_bubble_seg5_texture_0500FE80[] = {
     11 #include "actors/water_bubble/water_bubble.rgba16.inc.c"
     12 };
     13 
     14 // 0x05010680
     15 static const Vtx water_bubble_seg5_vertex_05010680[] = {
     16     {{{   -20,    -64,    -33}, 0, {     0,      0}, {0xdd, 0x95, 0xc7, 0xff}}},
     17     {{{     0,    -76,      0}, 0, {     0,      0}, {0x00, 0x82, 0x00, 0xff}}},
     18     {{{   -44,    -61,      0}, 0, {     0,      0}, {0xb6, 0x9a, 0x00, 0xff}}},
     19     {{{   -20,    -64,     34}, 0, {     0,      0}, {0xdf, 0x98, 0x3f, 0xff}}},
     20     {{{   -55,    -39,     34}, 0, {     0,      0}, {0xa5, 0xbd, 0x37, 0xff}}},
     21     {{{    21,    -64,     34}, 0, {     0,      0}, {0x22, 0x94, 0x38, 0xff}}},
     22     {{{   -11,    -37,    -64}, 0, {     0,      0}, {0xeb, 0xbe, 0x96, 0xff}}},
     23     {{{   -55,    -39,    -33}, 0, {     0,      0}, {0xa8, 0xbf, 0xc0, 0xff}}},
     24     {{{   -39,      0,    -64}, 0, {     0,      0}, {0xbc, 0x00, 0x96, 0xff}}},
     25     {{{   -68,      0,    -33}, 0, {     0,      0}, {0x8f, 0x00, 0xc8, 0xff}}},
     26     {{{     0,      0,    -76}, 0, {     0,      0}, {0x00, 0x00, 0x82, 0xff}}},
     27     {{{    56,    -39,    -33}, 0, {     0,      0}, {0x5b, 0xbd, 0xc9, 0xff}}},
     28     {{{    73,    -23,      0}, 0, {     0,      0}, {0x78, 0xd9, 0x00, 0xff}}},
     29     {{{    45,    -61,      0}, 0, {     0,      0}, {0x4a, 0x9a, 0x00, 0xff}}},
     30     {{{    56,    -39,     34}, 0, {     0,      0}, {0x58, 0xbf, 0x3f, 0xff}}},
     31     {{{    69,      0,     34}, 0, {     0,      0}, {0x72, 0x00, 0x37, 0xff}}},
     32 };
     33 
     34 // 0x05010780
     35 static const Vtx water_bubble_seg5_vertex_05010780[] = {
     36     {{{    33,    -23,    -64}, 0, {     0,      0}, {0x37, 0xd7, 0x96, 0xff}}},
     37     {{{    56,    -39,    -33}, 0, {     0,      0}, {0x5b, 0xbd, 0xc9, 0xff}}},
     38     {{{    21,    -64,    -33}, 0, {     0,      0}, {0x21, 0x98, 0xc0, 0xff}}},
     39     {{{   -11,    -37,    -64}, 0, {     0,      0}, {0xeb, 0xbe, 0x96, 0xff}}},
     40     {{{   -20,    -64,    -33}, 0, {     0,      0}, {0xdd, 0x95, 0xc7, 0xff}}},
     41     {{{     0,      0,    -76}, 0, {     0,      0}, {0x00, 0x00, 0x82, 0xff}}},
     42     {{{    45,     62,      0}, 0, {     0,      0}, {0x4a, 0x66, 0x00, 0xff}}},
     43     {{{    56,     40,     34}, 0, {     0,      0}, {0x58, 0x40, 0x40, 0xff}}},
     44     {{{    73,     24,      0}, 0, {     0,      0}, {0x78, 0x27, 0x00, 0xff}}},
     45     {{{    69,      0,     34}, 0, {     0,      0}, {0x72, 0x00, 0x37, 0xff}}},
     46     {{{   -44,     62,      0}, 0, {     0,      0}, {0xb6, 0x66, 0x00, 0xff}}},
     47     {{{   -20,     65,     34}, 0, {     0,      0}, {0xdf, 0x68, 0x3f, 0xff}}},
     48     {{{     0,     77,      0}, 0, {     0,      0}, {0x00, 0x7e, 0x00, 0xff}}},
     49     {{{    21,     65,     34}, 0, {     0,      0}, {0x22, 0x6c, 0x38, 0xff}}},
     50     {{{    56,     40,    -33}, 0, {     0,      0}, {0x5b, 0x43, 0xc8, 0xff}}},
     51 };
     52 
     53 // 0x05010870
     54 static const Vtx water_bubble_seg5_vertex_05010870[] = {
     55     {{{    33,     24,    -64}, 0, {     0,      0}, {0x37, 0x29, 0x96, 0xff}}},
     56     {{{    56,     40,    -33}, 0, {     0,      0}, {0x5b, 0x43, 0xc8, 0xff}}},
     57     {{{    69,      0,    -33}, 0, {     0,      0}, {0x6d, 0x00, 0xc1, 0xff}}},
     58     {{{     0,      0,    -76}, 0, {     0,      0}, {0x00, 0x00, 0x82, 0xff}}},
     59     {{{    33,    -23,    -64}, 0, {     0,      0}, {0x37, 0xd7, 0x96, 0xff}}},
     60     {{{    56,    -39,    -33}, 0, {     0,      0}, {0x5b, 0xbd, 0xc9, 0xff}}},
     61     {{{     0,     77,      0}, 0, {     0,      0}, {0x00, 0x7e, 0x00, 0xff}}},
     62     {{{   -20,     65,     34}, 0, {     0,      0}, {0xdf, 0x68, 0x3f, 0xff}}},
     63     {{{    21,     65,     34}, 0, {     0,      0}, {0x22, 0x6c, 0x38, 0xff}}},
     64     {{{   -20,     65,    -33}, 0, {     0,      0}, {0xdd, 0x6b, 0xc7, 0xff}}},
     65     {{{   -44,     62,      0}, 0, {     0,      0}, {0xb6, 0x66, 0x00, 0xff}}},
     66     {{{   -55,     40,     34}, 0, {     0,      0}, {0xa4, 0x43, 0x37, 0xff}}},
     67     {{{   -11,     38,    -64}, 0, {     0,      0}, {0xeb, 0x41, 0x96, 0xff}}},
     68     {{{    21,     65,    -33}, 0, {     0,      0}, {0x21, 0x68, 0xc0, 0xff}}},
     69 };
     70 
     71 // 0x05010950
     72 static const Vtx water_bubble_seg5_vertex_05010950[] = {
     73     {{{   -72,    -23,      0}, 0, {     0,      0}, {0x88, 0xd9, 0x00, 0xff}}},
     74     {{{   -68,      0,     34}, 0, {     0,      0}, {0x92, 0x00, 0x3f, 0xff}}},
     75     {{{   -72,     24,      0}, 0, {     0,      0}, {0x88, 0x27, 0x00, 0xff}}},
     76     {{{   -55,     40,     34}, 0, {     0,      0}, {0xa4, 0x43, 0x37, 0xff}}},
     77     {{{   -68,      0,    -33}, 0, {     0,      0}, {0x8f, 0x00, 0xc8, 0xff}}},
     78     {{{   -55,    -39,     34}, 0, {     0,      0}, {0xa5, 0xbd, 0x37, 0xff}}},
     79     {{{   -39,      0,    -64}, 0, {     0,      0}, {0xbc, 0x00, 0x96, 0xff}}},
     80     {{{   -55,     40,    -33}, 0, {     0,      0}, {0xa8, 0x40, 0xc0, 0xff}}},
     81     {{{     0,      0,    -76}, 0, {     0,      0}, {0x00, 0x00, 0x82, 0xff}}},
     82     {{{   -11,     38,    -64}, 0, {     0,      0}, {0xeb, 0x41, 0x96, 0xff}}},
     83     {{{   -20,     65,    -33}, 0, {     0,      0}, {0xdd, 0x6b, 0xc7, 0xff}}},
     84     {{{    21,    -64,     34}, 0, {     0,      0}, {0x22, 0x94, 0x38, 0xff}}},
     85     {{{     0,    -76,      0}, 0, {     0,      0}, {0x00, 0x82, 0x00, 0xff}}},
     86     {{{    45,    -61,      0}, 0, {     0,      0}, {0x4a, 0x9a, 0x00, 0xff}}},
     87     {{{    21,    -64,    -33}, 0, {     0,      0}, {0x21, 0x98, 0xc0, 0xff}}},
     88     {{{    56,    -39,    -33}, 0, {     0,      0}, {0x5b, 0xbd, 0xc9, 0xff}}},
     89 };
     90 
     91 // 0x05010A50
     92 static const Vtx water_bubble_seg5_vertex_05010A50[] = {
     93     {{{     0,    -76,      0}, 0, {     0,      0}, {0x00, 0x82, 0x00, 0xff}}},
     94     {{{   -20,    -64,    -33}, 0, {     0,      0}, {0xdd, 0x95, 0xc7, 0xff}}},
     95     {{{    21,    -64,    -33}, 0, {     0,      0}, {0x21, 0x98, 0xc0, 0xff}}},
     96     {{{    12,    -37,     65}, 0, {     0,      0}, {0x14, 0xbe, 0x6a, 0xff}}},
     97     {{{    21,    -64,     34}, 0, {     0,      0}, {0x22, 0x94, 0x38, 0xff}}},
     98     {{{    56,    -39,     34}, 0, {     0,      0}, {0x58, 0xbf, 0x3f, 0xff}}},
     99     {{{    40,      0,     65}, 0, {     0,      0}, {0x44, 0x00, 0x6b, 0xff}}},
    100     {{{    69,      0,     34}, 0, {     0,      0}, {0x72, 0x00, 0x37, 0xff}}},
    101     {{{     0,      0,     77}, 0, {     0,      0}, {0x00, 0x00, 0x7e, 0xff}}},
    102     {{{   -55,    -39,     34}, 0, {     0,      0}, {0xa5, 0xbd, 0x37, 0xff}}},
    103     {{{   -72,    -23,      0}, 0, {     0,      0}, {0x88, 0xd9, 0x00, 0xff}}},
    104     {{{   -44,    -61,      0}, 0, {     0,      0}, {0xb6, 0x9a, 0x00, 0xff}}},
    105     {{{   -55,    -39,    -33}, 0, {     0,      0}, {0xa8, 0xbf, 0xc0, 0xff}}},
    106     {{{   -68,      0,    -33}, 0, {     0,      0}, {0x8f, 0x00, 0xc8, 0xff}}},
    107     {{{   -32,    -23,     65}, 0, {     0,      0}, {0xc8, 0xd7, 0x6a, 0xff}}},
    108     {{{   -20,    -64,     34}, 0, {     0,      0}, {0xdf, 0x98, 0x3f, 0xff}}},
    109 };
    110 
    111 // 0x05010B50
    112 static const Vtx water_bubble_seg5_vertex_05010B50[] = {
    113     {{{   -55,     40,     34}, 0, {     0,      0}, {0xa4, 0x43, 0x37, 0xff}}},
    114     {{{   -44,     62,      0}, 0, {     0,      0}, {0xb6, 0x66, 0x00, 0xff}}},
    115     {{{   -72,     24,      0}, 0, {     0,      0}, {0x88, 0x27, 0x00, 0xff}}},
    116     {{{   -55,     40,    -33}, 0, {     0,      0}, {0xa8, 0x40, 0xc0, 0xff}}},
    117     {{{   -68,      0,    -33}, 0, {     0,      0}, {0x8f, 0x00, 0xc8, 0xff}}},
    118     {{{   -20,     65,    -33}, 0, {     0,      0}, {0xdd, 0x6b, 0xc7, 0xff}}},
    119     {{{   -32,     24,     65}, 0, {     0,      0}, {0xc8, 0x29, 0x6a, 0xff}}},
    120     {{{   -68,      0,     34}, 0, {     0,      0}, {0x92, 0x00, 0x3f, 0xff}}},
    121     {{{   -32,    -23,     65}, 0, {     0,      0}, {0xc8, 0xd7, 0x6a, 0xff}}},
    122     {{{   -55,    -39,     34}, 0, {     0,      0}, {0xa5, 0xbd, 0x37, 0xff}}},
    123     {{{     0,      0,     77}, 0, {     0,      0}, {0x00, 0x00, 0x7e, 0xff}}},
    124     {{{     0,     77,      0}, 0, {     0,      0}, {0x00, 0x7e, 0x00, 0xff}}},
    125     {{{    21,     65,    -33}, 0, {     0,      0}, {0x21, 0x68, 0xc0, 0xff}}},
    126     {{{    45,     62,      0}, 0, {     0,      0}, {0x4a, 0x66, 0x00, 0xff}}},
    127     {{{    21,     65,     34}, 0, {     0,      0}, {0x22, 0x6c, 0x38, 0xff}}},
    128     {{{    56,     40,    -33}, 0, {     0,      0}, {0x5b, 0x43, 0xc8, 0xff}}},
    129 };
    130 
    131 // 0x05010C50
    132 static const Vtx water_bubble_seg5_vertex_05010C50[] = {
    133     {{{    12,     38,     65}, 0, {     0,      0}, {0x15, 0x41, 0x6a, 0xff}}},
    134     {{{    21,     65,     34}, 0, {     0,      0}, {0x22, 0x6c, 0x38, 0xff}}},
    135     {{{   -20,     65,     34}, 0, {     0,      0}, {0xdf, 0x68, 0x3f, 0xff}}},
    136     {{{     0,      0,     77}, 0, {     0,      0}, {0x00, 0x00, 0x7e, 0xff}}},
    137     {{{   -32,     24,     65}, 0, {     0,      0}, {0xc8, 0x29, 0x6a, 0xff}}},
    138     {{{   -55,     40,     34}, 0, {     0,      0}, {0xa4, 0x43, 0x37, 0xff}}},
    139     {{{    73,    -23,      0}, 0, {     0,      0}, {0x78, 0xd9, 0x00, 0xff}}},
    140     {{{    69,      0,    -33}, 0, {     0,      0}, {0x6d, 0x00, 0xc1, 0xff}}},
    141     {{{    73,     24,      0}, 0, {     0,      0}, {0x78, 0x27, 0x00, 0xff}}},
    142     {{{    56,     40,    -33}, 0, {     0,      0}, {0x5b, 0x43, 0xc8, 0xff}}},
    143     {{{    69,      0,     34}, 0, {     0,      0}, {0x72, 0x00, 0x37, 0xff}}},
    144     {{{    56,     40,     34}, 0, {     0,      0}, {0x58, 0x40, 0x40, 0xff}}},
    145     {{{    56,    -39,    -33}, 0, {     0,      0}, {0x5b, 0xbd, 0xc9, 0xff}}},
    146     {{{    40,      0,     65}, 0, {     0,      0}, {0x44, 0x00, 0x6b, 0xff}}},
    147 };
    148 
    149 // 0x05010D30 - 0x05011000
    150 const Gfx water_bubble_seg5_dl_05010D30[] = {
    151     gsSPLight(&water_bubble_seg5_lights_0500FE68.l, 1),
    152     gsSPLight(&water_bubble_seg5_lights_0500FE68.a, 2),
    153     gsSPVertex(water_bubble_seg5_vertex_05010680, 16, 0),
    154     gsSP2Triangles( 0,  1,  2, 0x0,  1,  3,  2, 0x0),
    155     gsSP2Triangles( 2,  3,  4, 0x0,  1,  5,  3, 0x0),
    156     gsSP2Triangles( 6,  0,  7, 0x0,  8,  7,  9, 0x0),
    157     gsSP2Triangles(10,  6,  8, 0x0,  6,  7,  8, 0x0),
    158     gsSP2Triangles(11, 12, 13, 0x0, 12, 14, 13, 0x0),
    159     gsSP2Triangles(12, 15, 14, 0x0, 13, 14,  5, 0x0),
    160     gsSPVertex(water_bubble_seg5_vertex_05010780, 15, 0),
    161     gsSP2Triangles( 0,  1,  2, 0x0,  0,  2,  3, 0x0),
    162     gsSP2Triangles( 3,  2,  4, 0x0,  5,  0,  3, 0x0),
    163     gsSP2Triangles( 6,  7,  8, 0x0,  8,  7,  9, 0x0),
    164     gsSP2Triangles(10, 11, 12, 0x0,  6, 13,  7, 0x0),
    165     gsSP1Triangle(14,  6,  8, 0x0),
    166     gsSPVertex(water_bubble_seg5_vertex_05010870, 14, 0),
    167     gsSP2Triangles( 0,  1,  2, 0x0,  3,  0,  4, 0x0),
    168     gsSP2Triangles( 0,  2,  4, 0x0,  4,  2,  5, 0x0),
    169     gsSP2Triangles( 6,  7,  8, 0x0,  9, 10,  6, 0x0),
    170     gsSP2Triangles(10, 11,  7, 0x0, 12,  9, 13, 0x0),
    171     gsSP2Triangles( 3, 12,  0, 0x0, 12, 13,  0, 0x0),
    172     gsSP1Triangle( 0, 13,  1, 0x0),
    173     gsSPVertex(water_bubble_seg5_vertex_05010950, 16, 0),
    174     gsSP2Triangles( 0,  1,  2, 0x0,  2,  1,  3, 0x0),
    175     gsSP2Triangles( 4,  0,  2, 0x0,  0,  5,  1, 0x0),
    176     gsSP2Triangles( 6,  4,  7, 0x0,  8,  6,  9, 0x0),
    177     gsSP2Triangles( 6,  7,  9, 0x0,  9,  7, 10, 0x0),
    178     gsSP2Triangles(11, 12, 13, 0x0, 12, 14, 13, 0x0),
    179     gsSP1Triangle(13, 14, 15, 0x0),
    180     gsSPVertex(water_bubble_seg5_vertex_05010A50, 16, 0),
    181     gsSP2Triangles( 0,  1,  2, 0x0,  3,  4,  5, 0x0),
    182     gsSP2Triangles( 6,  5,  7, 0x0,  3,  5,  6, 0x0),
    183     gsSP2Triangles( 8,  3,  6, 0x0,  9, 10, 11, 0x0),
    184     gsSP2Triangles(10, 12, 11, 0x0, 11, 12,  1, 0x0),
    185     gsSP2Triangles(10, 13, 12, 0x0, 14,  9, 15, 0x0),
    186     gsSP2Triangles(14, 15,  3, 0x0,  3, 15,  4, 0x0),
    187     gsSP1Triangle( 8, 14,  3, 0x0),
    188     gsSPVertex(water_bubble_seg5_vertex_05010B50, 16, 0),
    189     gsSP2Triangles( 0,  1,  2, 0x0,  1,  3,  2, 0x0),
    190     gsSP2Triangles( 2,  3,  4, 0x0,  1,  5,  3, 0x0),
    191     gsSP2Triangles( 6,  0,  7, 0x0,  8,  7,  9, 0x0),
    192     gsSP2Triangles(10,  6,  8, 0x0,  6,  7,  8, 0x0),
    193     gsSP2Triangles(11, 12,  5, 0x0, 13, 12, 11, 0x0),
    194     gsSP2Triangles(14, 13, 11, 0x0, 13, 15, 12, 0x0),
    195     gsSPVertex(water_bubble_seg5_vertex_05010C50, 14, 0),
    196     gsSP2Triangles( 0,  1,  2, 0x0,  3,  0,  4, 0x0),
    197     gsSP2Triangles( 0,  2,  4, 0x0,  4,  2,  5, 0x0),
    198     gsSP2Triangles( 6,  7,  8, 0x0,  8,  7,  9, 0x0),
    199     gsSP2Triangles(10,  6,  8, 0x0,  0, 11,  1, 0x0),
    200     gsSP2Triangles( 6, 12,  7, 0x0, 13, 10, 11, 0x0),
    201     gsSP2Triangles( 3, 13,  0, 0x0, 13, 11,  0, 0x0),
    202     gsSPEndDisplayList(),
    203 };
    204 
    205 // 0x05011000 - 0x05011098
    206 const Gfx water_bubble_seg5_dl_05011000[] = {
    207     gsDPPipeSync(),
    208     gsSPSetGeometryMode(G_TEXTURE_GEN),
    209     gsDPSetCombineMode(G_CC_MODULATERGBFADE, G_CC_MODULATERGBFADE),
    210     gsDPSetEnvColor(255, 255, 255, 205),
    211     gsDPLoadTextureBlock(water_bubble_seg5_texture_0500FE80, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
    212     gsSPTexture(0x07C0, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
    213     gsSPDisplayList(water_bubble_seg5_dl_05010D30),
    214     gsSPTexture(0x07C0, 0x07C0, 0, G_TX_RENDERTILE, G_OFF),
    215     gsDPPipeSync(),
    216     gsSPClearGeometryMode(G_TEXTURE_GEN),
    217     gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
    218     gsDPSetEnvColor(255, 255, 255, 255),
    219     gsSPEndDisplayList(),
    220 };