sm64

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

model.inc.c (4650B)


      1 // Blue Coin Switch
      2 
      3 // 0x08000000
      4 static const Lights1 blue_coin_switch_seg8_lights_08000000 = gdSPDefLights1(
      5     0x7f, 0x7f, 0x7f,
      6     0xff, 0xff, 0xff, 0x28, 0x28, 0x28
      7 );
      8 
      9 // 0x08000018
     10 ALIGNED8 static const Texture blue_coin_switch_seg8_texture_08000018[] = {
     11 #include "actors/blue_coin_switch/blue_coin_switch_side.rgba16.inc.c"
     12 };
     13 
     14 // 0x08000418
     15 ALIGNED8 static const Texture blue_coin_switch_seg8_texture_08000418[] = {
     16 #include "actors/blue_coin_switch/blue_coin_switch_top.rgba16.inc.c"
     17 };
     18 
     19 // 0x08000C18
     20 static const Vtx blue_coin_switch_seg8_vertex_08000C18[] = {
     21     {{{    26,      0,     26}, 0, {   990,    479}, {0x00, 0x00, 0x7f, 0xff}}},
     22     {{{    26,     26,     26}, 0, {   990,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     23     {{{   -25,     26,     26}, 0, {     0,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     24     {{{   -25,      0,     26}, 0, {     0,    479}, {0x00, 0x00, 0x7f, 0xff}}},
     25     {{{   -25,      0,    -25}, 0, {   990,    479}, {0x00, 0x00, 0x81, 0xff}}},
     26     {{{    26,     26,    -25}, 0, {     0,      0}, {0x00, 0x00, 0x81, 0xff}}},
     27     {{{    26,      0,    -25}, 0, {     0,    479}, {0x00, 0x00, 0x81, 0xff}}},
     28     {{{   -25,     26,    -25}, 0, {   990,      0}, {0x00, 0x00, 0x81, 0xff}}},
     29     {{{   -25,      0,     26}, 0, {   990,    479}, {0x81, 0x00, 0x00, 0xff}}},
     30     {{{   -25,     26,    -25}, 0, {     0,      0}, {0x81, 0x00, 0x00, 0xff}}},
     31     {{{   -25,      0,    -25}, 0, {     0,    479}, {0x81, 0x00, 0x00, 0xff}}},
     32     {{{   -25,     26,     26}, 0, {   990,      0}, {0x81, 0x00, 0x00, 0xff}}},
     33     {{{    26,      0,    -25}, 0, {   990,    479}, {0x7f, 0x00, 0x00, 0xff}}},
     34     {{{    26,     26,    -25}, 0, {   990,      0}, {0x7f, 0x00, 0x00, 0xff}}},
     35     {{{    26,     26,     26}, 0, {     0,      0}, {0x7f, 0x00, 0x00, 0xff}}},
     36     {{{    26,      0,     26}, 0, {     0,    479}, {0x7f, 0x00, 0x00, 0xff}}},
     37 };
     38 
     39 // 0x08000D18
     40 static const Vtx blue_coin_switch_seg8_vertex_08000D18[] = {
     41     {{{    26,     26,    -25}, 0, {   990,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     42     {{{   -25,     26,     26}, 0, {     0,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     43     {{{    26,     26,     26}, 0, {   990,    990}, {0x00, 0x7f, 0x00, 0xff}}},
     44     {{{   -25,     26,    -25}, 0, {     0,      0}, {0x00, 0x7f, 0x00, 0xff}}},
     45 };
     46 
     47 // 0x08000D58 - 0x08000DD0
     48 const Gfx blue_coin_switch_seg8_dl_08000D58[] = {
     49     gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, blue_coin_switch_seg8_texture_08000018),
     50     gsDPLoadSync(),
     51     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
     52     gsSPLight(&blue_coin_switch_seg8_lights_08000000.l, 1),
     53     gsSPLight(&blue_coin_switch_seg8_lights_08000000.a, 2),
     54     gsSPVertex(blue_coin_switch_seg8_vertex_08000C18, 16, 0),
     55     gsSP2Triangles( 0,  1,  2, 0x0,  0,  2,  3, 0x0),
     56     gsSP2Triangles( 4,  5,  6, 0x0,  4,  7,  5, 0x0),
     57     gsSP2Triangles( 8,  9, 10, 0x0,  8, 11,  9, 0x0),
     58     gsSP2Triangles(12, 13, 14, 0x0, 12, 14, 15, 0x0),
     59     gsSPEndDisplayList(),
     60 };
     61 
     62 // 0x08000DD0 - 0x08000E08
     63 const Gfx blue_coin_switch_seg8_dl_08000DD0[] = {
     64     gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, blue_coin_switch_seg8_texture_08000418),
     65     gsDPLoadSync(),
     66     gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
     67     gsSPVertex(blue_coin_switch_seg8_vertex_08000D18, 4, 0),
     68     gsSP2Triangles( 0,  1,  2, 0x0,  0,  3,  1, 0x0),
     69     gsSPEndDisplayList(),
     70 };
     71 
     72 // 0x08000E08 - 0x08000E98
     73 const Gfx blue_coin_switch_seg8_dl_08000E08[] = {
     74     gsDPPipeSync(),
     75     gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
     76     gsSPClearGeometryMode(G_SHADING_SMOOTH),
     77     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),
     78     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
     79     gsDPTileSync(),
     80     gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 4, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
     81     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (16 - 1) << G_TEXTURE_IMAGE_FRAC),
     82     gsSPDisplayList(blue_coin_switch_seg8_dl_08000D58),
     83     gsDPTileSync(),
     84     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),
     85     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
     86     gsSPDisplayList(blue_coin_switch_seg8_dl_08000DD0),
     87     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
     88     gsDPPipeSync(),
     89     gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
     90     gsSPSetGeometryMode(G_SHADING_SMOOTH),
     91     gsSPEndDisplayList(),
     92 };