sm64

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

title_screen_bg.c (7185B)


      1 #include <ultra64.h>
      2 #include "sm64.h"
      3 
      4 #include "make_const_nonconst.h"
      5 
      6 // 0x0A000000 - 0x0A000100
      7 static const Vtx title_screen_bg_vertex_0A000000[] = {
      8     {{{     0,     60,     -1}, 0, {     0,    608}, {0xff, 0xff, 0xff, 0xff}}},
      9     {{{    80,     60,     -1}, 0, {  2528,    608}, {0xff, 0xff, 0xff, 0xff}}},
     10     {{{    80,     80,     -1}, 0, {  2528,      0}, {0xff, 0xff, 0xff, 0xff}}},
     11     {{{     0,     80,     -1}, 0, {     0,      0}, {0xff, 0xff, 0xff, 0xff}}},
     12     {{{     0,     40,     -1}, 0, {     0,    608}, {0xff, 0xff, 0xff, 0xff}}},
     13     {{{    80,     40,     -1}, 0, {  2528,    608}, {0xff, 0xff, 0xff, 0xff}}},
     14     {{{    80,     60,     -1}, 0, {  2528,      0}, {0xff, 0xff, 0xff, 0xff}}},
     15     {{{     0,     60,     -1}, 0, {     0,      0}, {0xff, 0xff, 0xff, 0xff}}},
     16     {{{     0,     20,     -1}, 0, {     0,    608}, {0xff, 0xff, 0xff, 0xff}}},
     17     {{{    80,     20,     -1}, 0, {  2528,    608}, {0xff, 0xff, 0xff, 0xff}}},
     18     {{{    80,     40,     -1}, 0, {  2528,      0}, {0xff, 0xff, 0xff, 0xff}}},
     19     {{{     0,     40,     -1}, 0, {     0,      0}, {0xff, 0xff, 0xff, 0xff}}},
     20     {{{     0,      0,     -1}, 0, {     0,    608}, {0xff, 0xff, 0xff, 0xff}}},
     21     {{{    80,      0,     -1}, 0, {  2528,    608}, {0xff, 0xff, 0xff, 0xff}}},
     22     {{{    80,     20,     -1}, 0, {  2528,      0}, {0xff, 0xff, 0xff, 0xff}}},
     23     {{{     0,     20,     -1}, 0, {     0,      0}, {0xff, 0xff, 0xff, 0xff}}},
     24 };
     25 
     26 // 0x0A000100 - 0x0A000118
     27 const Gfx title_screen_bg_dl_0A000100[] = {
     28     gsDPSetCombineMode(G_CC_DECALRGB, G_CC_DECALRGB),
     29     gsDPSetRenderMode(G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2),
     30     gsSPEndDisplayList(),
     31 };
     32 
     33 // 0x0A000118 - 0x0A000130
     34 const Gfx title_screen_bg_dl_0A000118[] = {
     35     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
     36     gsSPVertex(title_screen_bg_vertex_0A000000, 16, 0),
     37     gsSPEndDisplayList(),
     38 };
     39 
     40 // 0x0A000130 - 0x0A000148
     41 const Gfx title_screen_bg_dl_0A000130[] = {
     42     gsSP2Triangles( 0,  1,  2, 0x0,  0,  2,  3, 0x0),
     43     gsSPEndDisplayList(),
     44 };
     45 
     46 // 0x0A000148 - 0x0A000160
     47 const Gfx title_screen_bg_dl_0A000148[] = {
     48     gsSP2Triangles( 4,  5,  6, 0x0,  4,  6,  7, 0x0),
     49     gsSPEndDisplayList(),
     50 };
     51 
     52 // 0x0A000160 - 0x0A000178
     53 const Gfx title_screen_bg_dl_0A000160[] = {
     54     gsSP2Triangles( 8,  9, 10, 0x0,  8, 10, 11, 0x0),
     55     gsSPEndDisplayList(),
     56 };
     57 
     58 // 0x0A000178 - 0x0A000190
     59 const Gfx title_screen_bg_dl_0A000178[] = {
     60     gsSP2Triangles(12, 13, 14, 0x0, 12, 14, 15, 0x0),
     61     gsSPEndDisplayList(),
     62 };
     63 
     64 // 0x0A000190 - 0x0A0001C0
     65 const Gfx title_screen_bg_dl_0A000190[] = {
     66     gsDPPipeSync(),
     67     gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
     68     gsSPSetGeometryMode(G_LIGHTING),
     69     gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
     70     gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
     71     gsSPEndDisplayList(),
     72 };
     73 
     74 #if defined(VERSION_CN)
     75 
     76 // 0x0A0001C0
     77 ALIGNED8 static const Texture title_texture_0A0001C0[] = {
     78 #include "textures/title_screen_bg/title_screen_bg_ique.001C0.rgba16.inc.c"
     79 };
     80 
     81 // 0x0A000E40
     82 ALIGNED8 static const Texture title_texture_0A000E40[] = {
     83 #include "textures/title_screen_bg/title_screen_bg_ique.00E40.rgba16.inc.c"
     84 };
     85 
     86 // 0x0A001AC0
     87 ALIGNED8 static const Texture title_texture_0A001AC0[] = {
     88 #include "textures/title_screen_bg/title_screen_bg_ique.01AC0.rgba16.inc.c"
     89 };
     90 
     91 // 0x0A002740
     92 ALIGNED8 static const Texture title_texture_0A002740[] = {
     93 #include "textures/title_screen_bg/title_screen_bg_ique.02740.rgba16.inc.c"
     94 };
     95 
     96 // 0x0A0033C0
     97 ALIGNED8 static const Texture title_texture_0A0033C0[] = {
     98 #include "textures/title_screen_bg/title_screen_bg_ique.033C0.rgba16.inc.c"
     99 };
    100 
    101 // 0x0A004040
    102 ALIGNED8 static const Texture title_texture_0A004040[] = {
    103 #include "textures/title_screen_bg/title_screen_bg_ique.04040.rgba16.inc.c"
    104 };
    105 
    106 // 0x0A004CC0
    107 ALIGNED8 static const Texture title_texture_0A004CC0[] = {
    108 #include "textures/title_screen_bg/title_screen_bg_ique.04CC0.rgba16.inc.c"
    109 };
    110 
    111 // 0x0A005940
    112 ALIGNED8 static const Texture title_texture_0A005940[] = {
    113 #include "textures/title_screen_bg/title_screen_bg_ique.05940.rgba16.inc.c"
    114 };
    115 
    116 #else
    117 
    118 // 0x0A0001C0
    119 ALIGNED8 static const Texture title_texture_0A0001C0[] = {
    120 #include "textures/title_screen_bg/title_screen_bg.001C0.rgba16.inc.c"
    121 };
    122 
    123 // 0x0A000E40
    124 ALIGNED8 static const Texture title_texture_0A000E40[] = {
    125 #include "textures/title_screen_bg/title_screen_bg.00E40.rgba16.inc.c"
    126 };
    127 
    128 // 0x0A001AC0
    129 ALIGNED8 static const Texture title_texture_0A001AC0[] = {
    130 #include "textures/title_screen_bg/title_screen_bg.01AC0.rgba16.inc.c"
    131 };
    132 
    133 // 0x0A002740
    134 ALIGNED8 static const Texture title_texture_0A002740[] = {
    135 #include "textures/title_screen_bg/title_screen_bg.02740.rgba16.inc.c"
    136 };
    137 
    138 // 0x0A0033C0
    139 ALIGNED8 static const Texture title_texture_0A0033C0[] = {
    140 #include "textures/title_screen_bg/title_screen_bg.033C0.rgba16.inc.c"
    141 };
    142 
    143 // 0x0A004040
    144 ALIGNED8 static const Texture title_texture_0A004040[] = {
    145 #include "textures/title_screen_bg/title_screen_bg.04040.rgba16.inc.c"
    146 };
    147 
    148 // 0x0A004CC0
    149 ALIGNED8 static const Texture title_texture_0A004CC0[] = {
    150 #include "textures/title_screen_bg/title_screen_bg.04CC0.rgba16.inc.c"
    151 };
    152 
    153 // 0x0A005940
    154 ALIGNED8 static const Texture title_texture_0A005940[] = {
    155 #include "textures/title_screen_bg/title_screen_bg.05940.rgba16.inc.c"
    156 };
    157 
    158 #endif
    159 
    160 // 0x0A0065C0
    161 const Texture *const mario_title_texture_table[] = {
    162     title_texture_0A0001C0, title_texture_0A000E40, title_texture_0A001AC0, title_texture_0A002740,
    163 };
    164 
    165 // 0x0A0065D0
    166 const Texture *const game_over_texture_table[] = {
    167     title_texture_0A0033C0, title_texture_0A004040, title_texture_0A004CC0, title_texture_0A005940,
    168 };
    169 
    170 UNUSED static const u64 title_screen_bg_unused_0 = 0;
    171 
    172 #if defined(VERSION_SH) || defined(VERSION_CN)
    173 const Gfx title_screen_bg_dl_0A0065E8[] = {
    174     gsDPPipeSync(),
    175     gsDPSetCycleType(G_CYC_COPY),
    176     gsDPSetTexturePersp(G_TP_NONE),
    177     gsDPSetTextureFilter(G_TF_POINT),
    178     gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2),
    179     gsSPEndDisplayList(),
    180 };
    181 
    182 const Gfx title_screen_bg_dl_0A006618[] = {
    183     gsDPPipeSync(),
    184     gsDPSetCycleType(G_CYC_1CYCLE),
    185     gsDPSetTexturePersp(G_TP_PERSP),
    186     gsDPSetTextureFilter(G_TF_BILERP),
    187     gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
    188     gsSPEndDisplayList(),
    189 };
    190 
    191 ALIGNED8 static const u8 title_texture_rumble_pak[] = {
    192 #include "textures/title_screen_bg/title_screen_bg.06648.rgba16.inc.c"
    193 };
    194 
    195 const Gfx title_screen_bg_dl_0A007548[] = {
    196     gsDPPipeSync(),
    197     gsDPSetCycleType(G_CYC_COPY),
    198     gsDPSetTexturePersp(G_TP_NONE),
    199     gsDPSetTextureFilter(G_TF_POINT),
    200     gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2),
    201     gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, 319, 239),
    202     gsDPLoadTextureTile(title_texture_rumble_pak, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 0, 0, 0, 79, 23, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 7, 5, G_TX_NOLOD, G_TX_NOLOD),
    203     gsSPTextureRectangle(220 << 2, 200 << 2, 299 << 2, 223 << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10),
    204     gsDPPipeSync(),
    205     gsDPSetCycleType(G_CYC_1CYCLE),
    206     gsDPSetTexturePersp(G_TP_PERSP),
    207     gsDPSetTextureFilter(G_TF_BILERP),
    208     gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
    209     gsSPEndDisplayList(),
    210 };
    211 #endif