sm64

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

painting.inc.c (13166B)


      1 #include "game/paintings.h"
      2 
      3 // 0x070241B8 - 0x070241D0
      4 static const Lights1 hmc_seg7_lights_070241B8 = gdSPDefLights1(
      5     0x50, 0x50, 0x50,
      6     0xff, 0xff, 0xff, 0x32, 0x32, 0x32
      7 );
      8 
      9 // 0x070241D0 - 0x070241E8
     10 // No gdSPDefLights1 macro defined because of odd different light value (0xff and 0xfa)
     11 static const Lights1 hmc_seg7_lights_070241D0 = {
     12     {{  {0x40, 0x40, 0x80}, 0, {0x40, 0x40, 0x80}, 0} },
     13     {{{ {0x64, 0x64, 0xff}, 0, {0x64, 0x64, 0xfa}, 0, {0x28, 0x28, 0x28},0} }}
     14 };
     15 
     16 // Appears to lock 4 of the sides when shimmering and in use. Unused.
     17 // 0x070241E8 - 0x07024228
     18 static const Vtx hmc_seg7_vertex_070241E8[] = {
     19     {{{     0,      0,      0}, 0, {   -32,    990}, {0x00, 0x00, 0x7f, 0xff}}},
     20     {{{   614,      0,      0}, 0, {  6100,    990}, {0x00, 0x00, 0x7f, 0xff}}},
     21     {{{   614,    614,      0}, 0, {  6100,  -5142}, {0x00, 0x00, 0x7f, 0xff}}},
     22     {{{     0,    614,      0}, 0, {   -32,  -5142}, {0x00, 0x00, 0x7f, 0xff}}},
     23 };
     24 
     25 // 0x07024228 - 0x07024268
     26 static const Vtx hmc_seg7_vertex_07024228[] = {
     27     {{{     0,      0,      0}, 0, {     0,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     28     {{{   614,      0,      0}, 0, {     0,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     29     {{{   614,    614,      0}, 0, {     0,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     30     {{{     0,    614,      0}, 0, {     0,      0}, {0x00, 0x00, 0x7f, 0xff}}},
     31 };
     32 
     33 // Unused
     34 // 0x07024268 - 0x070242A0
     35 const Gfx hmc_seg7_dl_07024268[] = {
     36     gsDPPipeSync(),
     37     gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
     38     gsSPLight(&hmc_seg7_lights_070241B8.l, 1),
     39     gsSPLight(&hmc_seg7_lights_070241B8.a, 2),
     40     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
     41     gsSPVertex(hmc_seg7_vertex_070241E8, 4, 0),
     42     gsSPEndDisplayList(),
     43 };
     44 
     45 // Unused
     46 // 0x070242A0 - 0x070242D0
     47 const Gfx hmc_seg7_dl_070242A0[] = {
     48     gsSP2Triangles( 0,  1,  2, 0x0,  0,  2,  3, 0x0),
     49     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
     50     gsDPPipeSync(),
     51     gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
     52     gsSPEndDisplayList(),
     53 };
     54 
     55 // 0x070242D0 - 0x070242F0
     56 static const Gfx hmc_seg7_painting_dl_070242D0[] = {
     57     gsDPTileSync(),
     58     gsDPSetTile(G_IM_FMT_RGBA, 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),
     59     gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
     60     gsSPEndDisplayList(),
     61 };
     62 
     63 // 0x070242F0 - 0x07024CD2
     64 static const PaintingData hmc_seg7_pool_texture_map_070242F0[] = {
     65     157, // num mappings
     66     // Format:
     67     // mesh vtx ID, texture X, texture Y
     68       0, 6100, -4832,
     69       1, 6100, -5142,
     70       2, 5582, -5142,
     71       3, 5582, -4526,
     72       4, 6100, -4218,
     73       5, 5070, -4832,
     74       6, 5070, -5142,
     75       7, 3030, -5142,
     76       8, 3030, -4832,
     77       9, 3540, -5142,
     78      10, 2520, -5142,
     79      11, 2520, -4526,
     80      12, 3030, -4218,
     81      13, 3540, -4526,
     82      14, 4050, -4832,
     83      15, 4560, -5142,
     84      16, 5070, -4218,
     85      17, 4560, -4526,
     86      18, 4050, -4218,
     87      19, 5582, -2074,
     88      20, 6100, -2380,
     89      21, 5582, -3300,
     90      22, 6100, -2994,
     91      23, 5582, -2686,
     92      24, 5070, -2380,
     93      25, 4560, -2074,
     94      26, 4560, -3300,
     95      27, 5070, -2994,
     96      28, 5070, -3606,
     97      29, 4050, -2380,
     98      30, 4560, -2686,
     99      31, 3540, -2074,
    100      32, 4050, -3606,
    101      33, 3540, -3300,
    102      34, 4050, -2994,
    103      35, 3540, -2686,
    104      36, 3030, -2380,
    105      37, 2520, -2074,
    106      38, 3030, -2994,
    107      39, 2520, -3300,
    108      40, 3030, -3606,
    109      41, 6100, -3606,
    110      42, 5582, -3912,
    111      43, 4560, -3912,
    112      44, 3540, -3912,
    113      45, 2520, -3912,
    114      46, 4050, -1768,
    115      47, 5070, -1768,
    116      48, 3030, -1768,
    117      49, 6100,   684,
    118      50, 6100,   990,
    119      51, 5582,   990,
    120      52, 5582,  -236,
    121      53, 6100,    70,
    122      54, 5070,   684,
    123      55, 5582,   378,
    124      56, 4560,   990,
    125      57, 5070,   990,
    126      58, 4560,  -236,
    127      59, 5070,    70,
    128      60, 5070,  -542,
    129      61, 4050,   684,
    130      62, 4560,   378,
    131      63, 3540,   990,
    132      64, 4050,   990,
    133      65, 4050,    70,
    134      66, 3540,  -236,
    135      67, 4050,  -542,
    136      68, 3030,   684,
    137      69, 3540,   378,
    138      70, 2520,   990,
    139      71, 3030,   990,
    140      72, 2520,  -236,
    141      73, 3030,    70,
    142      74, 3030,  -542,
    143      75, 6100,  -542,
    144      76, 5582, -1462,
    145      77, 6100, -1154,
    146      78, 5582,  -848,
    147      79, 4560, -1462,
    148      80, 5070, -1154,
    149      81, 4560,  -848,
    150      82, 3540, -1462,
    151      83, 4050, -1154,
    152      84, 3540,  -848,
    153      85, 2520, -1462,
    154      86, 3030, -1154,
    155      87, 2010, -4832,
    156      88,    0, -5142,
    157      89,    0, -4832,
    158      90,  478, -5142,
    159      91,  478, -4526,
    160      92,  988, -4832,
    161      93, 2010, -4218,
    162      94, 1498, -4526,
    163      95, 1498, -5142,
    164      96,  988, -4218,
    165      97, 2520, -2686,
    166      98, 2010, -2380,
    167      99, 1498, -2074,
    168     100, 1498, -3300,
    169     101, 2010, -2994,
    170     102, 2010, -3606,
    171     103, 1498, -2686,
    172     104,  988, -2380,
    173     105,  478, -2074,
    174     106,  478, -3300,
    175     107,  988, -2994,
    176     108,  988, -3606,
    177     109,  478, -2686,
    178     110,    0, -2380,
    179     111,    0, -3606,
    180     112, 1498, -3912,
    181     113,  478, -3912,
    182     114, 1498, -1462,
    183     115,  988, -1768,
    184     116, 2010, -1768,
    185     117,    0, -1768,
    186     118,  478, -1462,
    187     119, 2010,   684,
    188     120, 2520,   378,
    189     121, 2010,   990,
    190     122, 1498,   990,
    191     123, 2010,  -542,
    192     124, 2010,    70,
    193     125, 1498,  -236,
    194     126,  988,   684,
    195     127, 1498,   378,
    196     128,  988,   990,
    197     129,  478,   990,
    198     130,  478,  -236,
    199     131,  988,    70,
    200     132,  988,  -542,
    201     133,    0,   684,
    202     134,  478,   378,
    203     135,    0,  -542,
    204     136, 2520,  -848,
    205     137, 2010, -1154,
    206     138, 1498,  -848,
    207     139,  988, -1154,
    208     140,  478,  -848,
    209     141, 4050, -5142,
    210     142, 6100, -2074,
    211     143, 6100, -1768,
    212     144, 5070, -2074,
    213     145, 4050, -2074,
    214     146, 3030, -2074,
    215     147, 2010, -5142,
    216     148,    0, -4218,
    217     149,  988, -5142,
    218     150, 2010, -2074,
    219     151,  988, -2074,
    220     152,    0, -2994,
    221     153,    0, -2074,
    222     154,    0, -1154,
    223     155,    0,    70,
    224     156,    0,   990,
    225 
    226     264, // num groups
    227     // Grouped by 5 + one remainder group,
    228     // = 15 vertices per group + a few extra triangles
    229       8,  12,  13,
    230       0,   1,   2,
    231       3,   0,   2,
    232       4,   0,   3,
    233       5,   2,   6,
    234       2,   5,   3,
    235       7,   8,   9,
    236       8,   7,  10,
    237      11,   8,  10,
    238      12,   8,  11,
    239       9,   8,  13,
    240      13,  14,   9,
    241      14, 141,   9,
    242       5,   6,  15,
    243       5,  16,   3,
    244      16,   5,  17,
    245      17,   5,  15,
    246      14,  15, 141,
    247      15,  14,  17,
    248      18,  14,  13,
    249      14,  18,  17,
    250      19, 142,  20,
    251      19,  20,  23,
    252      28,  27,  21,
    253      21,  23,  22,
    254      22,  41,  21,
    255      20,  22,  23,
    256      23,  24,  19,
    257      21,  27,  23,
    258      24,  23,  27,
    259      25, 144,  24,
    260      19,  24, 144,
    261      24,  27,  30,
    262      25,  24,  30,
    263      26,  30,  27,
    264      27,  28,  26,
    265      36,  38,  97,
    266      26,  34,  30,
    267      29,  30,  34,
    268      30,  29,  25,
    269      25,  29, 145,
    270      31, 145,  29,
    271      31,  29,  35,
    272      29,  34,  35,
    273      32,  34,  26,
    274      33,  35,  34,
    275      34,  32,  33,
    276      33,  38,  35,
    277      35,  36,  31,
    278      36,  35,  38,
    279      37,  36,  97,
    280      37, 146,  36,
    281      31,  36, 146,
    282      28,  16,  43,
    283      38,  40,  39,
    284      39,  97,  38,
    285      40,  38,  33,
    286      21,  41,  42,
    287      41,   4,  42,
    288       3,  42,   4,
    289      42,  28,  21,
    290      28,  42,  16,
    291       3,  16,  42,
    292      26,  28,  43,
    293      17,  43,  16,
    294      43,  32,  26,
    295      32,  43,  18,
    296      17,  18,  43,
    297      33,  32,  44,
    298      32,  18,  44,
    299      13,  44,  18,
    300      44,  40,  33,
    301      13,  12,  44,
    302      40,  44,  12,
    303      39,  40,  45,
    304      40,  12,  45,
    305      48,  31, 146,
    306      11,  45,  12,
    307      25,  47, 144,
    308      46,  25, 145,
    309      47,  19, 144,
    310      19, 143, 142,
    311      31,  46, 145,
    312      60,  59,  52,
    313      49,  53,  55,
    314      50,  49,  51,
    315      51,  49,  55,
    316      52,  55,  53,
    317      53,  75,  52,
    318      54,  55,  59,
    319      52,  59,  55,
    320      55,  54,  51,
    321      54,  59,  62,
    322      56,  54,  62,
    323      57,  54,  56,
    324      54,  57,  51,
    325      58,  62,  59,
    326      59,  60,  58,
    327      68,  71,  63,
    328      61,  62,  65,
    329      58,  65,  62,
    330      62,  61,  56,
    331      61,  65,  69,
    332      63,  61,  69,
    333      64,  61,  63,
    334      61,  64,  56,
    335      65,  67,  66,
    336      66,  69,  65,
    337      67,  65,  58,
    338      68,  69,  73,
    339      69,  68,  63,
    340      66,  73,  69,
    341      68,  73, 120,
    342      70,  68, 120,
    343      71,  68,  70,
    344      72, 120,  73,
    345      73,  74,  72,
    346      74,  73,  66,
    347      75,  77,  78,
    348      52,  75,  78,
    349      76,  78,  77,
    350      77, 143,  76,
    351      76,  80,  78,
    352      60,  78,  80,
    353      78,  60,  52,
    354      46,  83,  79,
    355      58,  60,  81,
    356      60,  80,  81,
    357      79,  81,  80,
    358      80,  47,  79,
    359      47,  80,  76,
    360      81,  67,  58,
    361      67,  81,  83,
    362      79,  83,  81,
    363      66,  67,  84,
    364      67,  83,  84,
    365      82,  84,  83,
    366      83,  46,  82,
    367      84,  74,  66,
    368      82,  86,  84,
    369      74,  84,  86,
    370      74,  86, 136,
    371      72,  74, 136,
    372      85, 136,  86,
    373      86,  48,  85,
    374      48,  86,  82,
    375      25,  46,  79,
    376      79,  47,  25,
    377      82,  46,  31,
    378      19,  47,  76,
    379      76, 143,  19,
    380      31,  48,  82,
    381      37,  48, 146,
    382      85,  48,  37,
    383      10,  87,  11,
    384      87,  10, 147,
    385      92,  95, 149,
    386      88,  89,  90,
    387      89, 148,  91,
    388      90,  89,  91,
    389      91,  92,  90,
    390      92, 149,  90,
    391      93,  87,  94,
    392      87,  93,  11,
    393      94,  87,  95,
    394      87, 147,  95,
    395      95,  92,  94,
    396      96,  92,  91,
    397      92,  96,  94,
    398      39, 101,  97,
    399      97,  98,  37,
    400      98,  97, 101,
    401      99,  98, 103,
    402      99, 150,  98,
    403      37,  98, 150,
    404      98, 101, 103,
    405     100, 103, 101,
    406     101, 102, 100,
    407     102, 101,  39,
    408     100, 107, 103,
    409     103, 104,  99,
    410     104, 103, 107,
    411     105, 104, 109,
    412     105, 151, 104,
    413      99, 104, 151,
    414     104, 107, 109,
    415     106, 109, 107,
    416     107, 108, 106,
    417     108, 107, 100,
    418     109, 110, 105,
    419     106, 152, 109,
    420     110, 109, 152,
    421     105, 110, 153,
    422     111, 152, 106,
    423      11,  93,  45,
    424     102,  45,  93,
    425      45, 102,  39,
    426     102,  93, 112,
    427     100, 102, 112,
    428      94, 112,  93,
    429     112, 108, 100,
    430     108, 112,  96,
    431      94,  96, 112,
    432     106, 108, 113,
    433     108,  96, 113,
    434      91, 113,  96,
    435      91, 148, 113,
    436     113, 111, 106,
    437     111, 113, 148,
    438     114, 116,  99,
    439      99, 115, 114,
    440     115,  99, 151,
    441      99, 116, 150,
    442      72, 124, 120,
    443     116,  37, 150,
    444      37, 116,  85,
    445     117, 105, 153,
    446     105, 115, 151,
    447     105, 117, 118,
    448     118, 115, 105,
    449     119, 120, 124,
    450     120, 119,  70,
    451     119, 124, 127,
    452     119, 121,  70,
    453     121, 119, 122,
    454     122, 119, 127,
    455     123, 124,  72,
    456     124, 123, 125,
    457     125, 127, 124,
    458     126, 127, 131,
    459     127, 126, 122,
    460     125, 131, 127,
    461     126, 131, 134,
    462     128, 126, 129,
    463     129, 126, 134,
    464     126, 128, 122,
    465     136, 123,  72,
    466     130, 134, 131,
    467     131, 132, 130,
    468     132, 131, 125,
    469     133, 134, 155,
    470     134, 133, 129,
    471     130, 155, 134,
    472     133, 156, 129,
    473     135, 155, 130,
    474     123, 136, 137,
    475      85, 137, 136,
    476     139, 115, 118,
    477     123, 137, 138,
    478     125, 123, 138,
    479     114, 138, 137,
    480     137, 116, 114,
    481     116, 137,  85,
    482     114, 139, 138,
    483     132, 138, 139,
    484     138, 132, 125,
    485     132, 139, 140,
    486     130, 132, 140,
    487     115, 139, 114,
    488     118, 140, 139,
    489     135, 140, 154,
    490     118, 154, 140,
    491     140, 135, 130,
    492     117, 154, 118,
    493 };
    494 
    495 // 0x07024CD4
    496 static const PaintingData *const hmc_seg7_painting_texture_maps_07024CD4[] = {
    497     hmc_seg7_pool_texture_map_070242F0,
    498 };
    499 
    500 UNUSED static const u64 hmc_unused_0 = 0;
    501 
    502 
    503 // 0x07024CE0 - 0x070254E0
    504 ALIGNED8 static const Texture hmc_seg7_texture_07024CE0[] = {
    505 #include "levels/hmc/7.rgba16.inc.c"
    506 };
    507 
    508 // 0x070254E0 - 0x07025518
    509 static const Gfx hmc_seg7_painting_dl_070254E0[] = {
    510     gsDPPipeSync(),
    511     gsSPLight(&hmc_seg7_lights_070241D0.l, 1),
    512     gsSPLight(&hmc_seg7_lights_070241D0.a, 2),
    513     gsSPVertex(hmc_seg7_vertex_07024228, 4, 0),
    514     gsSP2Triangles( 0,  1,  2, 0x0,  0,  2,  3, 0x0),
    515     gsSPEndDisplayList(),
    516 };
    517 
    518 // 0x07025518 - 0x07025594
    519 const Texture *const hmc_seg7_painting_textures_07025518[] = {
    520     hmc_seg7_texture_07024CE0,
    521 };
    522 
    523 // 0x0702551C (PaintingData)
    524 struct Painting cotmc_painting = {
    525     /* id */ 0x000E,
    526     /* Image Count */ 0x01,
    527     /* Texture Type */ PAINTING_ENV_MAP,
    528     /* Floor Status */ 0x00, 0x00 , 0x00 /* which of the painting's nearby special floors Mario's on */,
    529     /* Ripple Status */ 0x00,
    530     /* Rotation */ 270.0f,  0.0f,
    531     /* Position */ 2989.055908f, -4485.120117f, 5135.359863f,
    532     /*                         curr   passive     entry */
    533     /* Ripple Magnitude */     0.0f,    10.0f,    30.0f,
    534     /* Ripple Decay */         1.0f,     1.0f,    0.98f,
    535     /* Ripple Rate */          0.0f,    0.05f,    0.05f,
    536     /* Ripple Dispersion */    0.0f,    15.0f,    15.0f,
    537     /* Curr Ripple Timer */    0.0f,
    538     /* Curr Ripple x, y */     0.0f,  0.0f,
    539     /* Normal DList */ hmc_seg7_painting_dl_070254E0,
    540     /* Texture Maps */ hmc_seg7_painting_texture_maps_07024CD4,
    541     /* Textures */     hmc_seg7_painting_textures_07025518,
    542     /* Texture w, h */ 32, 32,
    543     /* Ripple DList */ hmc_seg7_painting_dl_070242D0,
    544     /* Ripple Trigger */ RIPPLE_TRIGGER_CONTINUOUS,
    545     /* Alpha */ 0xFF,
    546     /* Mario Below */  0x00, 0x00, 0x00, /* Whether or not Mario is below the painting */
    547     /* Size */  723.968018f,
    548 };