sm64ex-coop/docs/lua/examples/big-paddle/actors/big_paddle/model.inc.c

253 lines
11 KiB
C

Lights1 big_paddle_f3d_material_lights = gdSPDefLights1(
0x7F, 0x7F, 0x7F,
0xFE, 0xFE, 0xFE, 0x28, 0x28, 0x28);
Gfx big_paddle_custom_box_surface_rgba16_ci4_aligner[] = {gsSPEndDisplayList()};
u8 big_paddle_custom_box_surface_rgba16_ci4[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
Gfx big_paddle_custom_box_surface_rgba16_ci4_pal_rgba16_aligner[] = {gsSPEndDisplayList()};
u8 big_paddle_custom_box_surface_rgba16_ci4_pal_rgba16[] = {
0x00, 0x01, 0x00, 0xff,
};
Vtx big_paddle_paddle_mesh_layer_1_vtx_0[76] = {
{{{-40, -40, -400},0, {982, 982},{0xA6, 0xA6, 0x0, 0xFF}}},
{{{-120, 40, -400},0, {982, 10},{0xA6, 0xA6, 0x0, 0xFF}}},
{{{-120, 40, -800},0, {10, 10},{0xA6, 0xA6, 0x0, 0xFF}}},
{{{-40, -40, -720},0, {10, 982},{0xA6, 0xA6, 0x0, 0xFF}}},
{{{-40, -40, -720},0, {982, 982},{0x0, 0xA6, 0xA6, 0xFF}}},
{{{-120, 40, -800},0, {982, 10},{0x0, 0xA6, 0xA6, 0xFF}}},
{{{120, 40, -800},0, {10, 10},{0x0, 0xA6, 0xA6, 0xFF}}},
{{{40, -40, -720},0, {10, 982},{0x0, 0xA6, 0xA6, 0xFF}}},
{{{40, -40, -720},0, {10, 10},{0x5A, 0xA6, 0x0, 0xFF}}},
{{{120, 40, -800},0, {10, 982},{0x5A, 0xA6, 0x0, 0xFF}}},
{{{120, 40, -400},0, {982, 982},{0x5A, 0xA6, 0x0, 0xFF}}},
{{{40, -40, -400},0, {982, 10},{0x5A, 0xA6, 0x0, 0xFF}}},
{{{40, -40, -400},0, {22, 86},{0x0, 0x0, 0x7F, 0xFF}}},
{{{120, 40, -400},0, {22, 906},{0x0, 0x0, 0x7F, 0xFF}}},
{{{-120, 40, -400},0, {74, 906},{0x0, 0x0, 0x7F, 0xFF}}},
{{{-40, -40, -400},0, {74, 86},{0x0, 0x0, 0x7F, 0xFF}}},
{{{-40, -40, -720},0, {10, 982},{0x0, 0x81, 0x0, 0xFF}}},
{{{40, -40, -720},0, {982, 982},{0x0, 0x81, 0x0, 0xFF}}},
{{{40, -40, -400},0, {982, 10},{0x0, 0x81, 0x0, 0xFF}}},
{{{-40, -40, -400},0, {10, 10},{0x0, 0x81, 0x0, 0xFF}}},
{{{120, 40, -800},0, {10, 982},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-120, 40, -800},0, {982, 982},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-120, 40, -400},0, {982, 10},{0x0, 0x7F, 0x0, 0xFF}}},
{{{120, 40, -400},0, {10, 10},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-40, -40, 40},0, {1008, 1008},{0x81, 0x0, 0x0, 0xFF}}},
{{{-40, 40, 40},0, {1008, -16},{0x81, 0x0, 0x0, 0xFF}}},
{{{-40, 40, -40},0, {-16, -16},{0x81, 0x0, 0x0, 0xFF}}},
{{{-40, -40, -40},0, {-16, 1008},{0x81, 0x0, 0x0, 0xFF}}},
{{{40, 40, -40},0, {-16, 240},{0x4A, 0x0, 0x99, 0xFF}}},
{{{40, -40, -40},0, {-16, 752},{0x4A, 0x0, 0x99, 0xFF}}},
{{{12, -12, -60},0, {1008, 573},{0x4A, 0x0, 0x99, 0xFF}}},
{{{12, 12, -60},0, {1008, 419},{0x4A, 0x0, 0x99, 0xFF}}},
{{{40, -40, -40},0, {-16, -16},{0x7F, 0x0, 0x0, 0xFF}}},
{{{40, 40, -40},0, {-16, 1008},{0x7F, 0x0, 0x0, 0xFF}}},
{{{40, 40, 40},0, {1008, 1008},{0x7F, 0x0, 0x0, 0xFF}}},
{{{40, -40, 40},0, {1008, -16},{0x7F, 0x0, 0x0, 0xFF}}},
{{{40, -40, 40},0, {-16, -16},{0x0, 0x0, 0x7F, 0xFF}}},
{{{40, 40, 40},0, {-16, 1008},{0x0, 0x0, 0x7F, 0xFF}}},
{{{-40, 40, 40},0, {1008, 1008},{0x0, 0x0, 0x7F, 0xFF}}},
{{{-40, -40, 40},0, {1008, -16},{0x0, 0x0, 0x7F, 0xFF}}},
{{{-40, -40, -40},0, {982, 10},{0x0, 0x81, 0x0, 0xFF}}},
{{{40, -40, -40},0, {10, 10},{0x0, 0x81, 0x0, 0xFF}}},
{{{40, -40, 40},0, {10, 982},{0x0, 0x81, 0x0, 0xFF}}},
{{{-40, -40, 40},0, {982, 982},{0x0, 0x81, 0x0, 0xFF}}},
{{{40, 40, -40},0, {-16, 1008},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-40, 40, -40},0, {1008, 1008},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-40, 40, 40},0, {1008, -16},{0x0, 0x7F, 0x0, 0xFF}}},
{{{40, 40, 40},0, {-16, -16},{0x0, 0x7F, 0x0, 0xFF}}},
{{{12, 12, -60},0, {189, -16},{0x7F, 0x0, 0x0, 0xFF}}},
{{{12, -12, -60},0, {189, 1008},{0x7F, 0x0, 0x0, 0xFF}}},
{{{12, -12, -400},0, {803, 1008},{0x7F, 0x0, 0x0, 0xFF}}},
{{{12, 12, -400},0, {803, -16},{0x7F, 0x0, 0x0, 0xFF}}},
{{{40, -40, -40},0, {752, 1008},{0x0, 0xB6, 0x99, 0xFF}}},
{{{-40, -40, -40},0, {240, 1008},{0x0, 0xB6, 0x99, 0xFF}}},
{{{-12, -12, -60},0, {419, -16},{0x0, 0xB6, 0x99, 0xFF}}},
{{{12, -12, -60},0, {573, -16},{0x0, 0xB6, 0x99, 0xFF}}},
{{{-40, 40, -40},0, {240, 1008},{0x0, 0x4A, 0x99, 0xFF}}},
{{{40, 40, -40},0, {752, 1008},{0x0, 0x4A, 0x99, 0xFF}}},
{{{12, 12, -60},0, {573, -16},{0x0, 0x4A, 0x99, 0xFF}}},
{{{-12, 12, -60},0, {419, -16},{0x0, 0x4A, 0x99, 0xFF}}},
{{{-40, -40, -40},0, {-16, 752},{0xB6, 0x0, 0x99, 0xFF}}},
{{{-40, 40, -40},0, {-16, 240},{0xB6, 0x0, 0x99, 0xFF}}},
{{{-12, 12, -60},0, {1008, 419},{0xB6, 0x0, 0x99, 0xFF}}},
{{{-12, -12, -60},0, {1008, 573},{0xB6, 0x0, 0x99, 0xFF}}},
{{{12, -12, -60},0, {1008, 803},{0x0, 0x81, 0x0, 0xFF}}},
{{{-12, -12, -60},0, {-16, 803},{0x0, 0x81, 0x0, 0xFF}}},
{{{-12, -12, -400},0, {-16, 189},{0x0, 0x81, 0x0, 0xFF}}},
{{{12, -12, -400},0, {1008, 189},{0x0, 0x81, 0x0, 0xFF}}},
{{{-12, 12, -60},0, {-16, 803},{0x0, 0x7F, 0x0, 0xFF}}},
{{{12, 12, -60},0, {1008, 803},{0x0, 0x7F, 0x0, 0xFF}}},
{{{12, 12, -400},0, {1008, 189},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-12, 12, -400},0, {-16, 189},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-12, -12, -60},0, {189, 1008},{0x81, 0x0, 0x0, 0xFF}}},
{{{-12, 12, -60},0, {189, -16},{0x81, 0x0, 0x0, 0xFF}}},
{{{-12, 12, -400},0, {803, -16},{0x81, 0x0, 0x0, 0xFF}}},
{{{-12, -12, -400},0, {803, 1008},{0x81, 0x0, 0x0, 0xFF}}},
};
Gfx big_paddle_paddle_mesh_layer_1_tri_0[] = {
gsSPVertex(big_paddle_paddle_mesh_layer_1_vtx_0 + 0, 16, 0),
gsSP1Triangle(0, 1, 2, 0),
gsSP1Triangle(0, 2, 3, 0),
gsSP1Triangle(4, 5, 6, 0),
gsSP1Triangle(4, 6, 7, 0),
gsSP1Triangle(8, 9, 10, 0),
gsSP1Triangle(8, 10, 11, 0),
gsSP1Triangle(12, 13, 14, 0),
gsSP1Triangle(12, 14, 15, 0),
gsSPVertex(big_paddle_paddle_mesh_layer_1_vtx_0 + 16, 16, 0),
gsSP1Triangle(0, 1, 2, 0),
gsSP1Triangle(0, 2, 3, 0),
gsSP1Triangle(4, 5, 6, 0),
gsSP1Triangle(4, 6, 7, 0),
gsSP1Triangle(8, 9, 10, 0),
gsSP1Triangle(8, 10, 11, 0),
gsSP1Triangle(12, 13, 14, 0),
gsSP1Triangle(12, 14, 15, 0),
gsSPVertex(big_paddle_paddle_mesh_layer_1_vtx_0 + 32, 16, 0),
gsSP1Triangle(0, 1, 2, 0),
gsSP1Triangle(0, 2, 3, 0),
gsSP1Triangle(4, 5, 6, 0),
gsSP1Triangle(4, 6, 7, 0),
gsSP1Triangle(8, 9, 10, 0),
gsSP1Triangle(8, 10, 11, 0),
gsSP1Triangle(12, 13, 14, 0),
gsSP1Triangle(12, 14, 15, 0),
gsSPVertex(big_paddle_paddle_mesh_layer_1_vtx_0 + 48, 16, 0),
gsSP1Triangle(0, 1, 2, 0),
gsSP1Triangle(0, 2, 3, 0),
gsSP1Triangle(4, 5, 6, 0),
gsSP1Triangle(4, 6, 7, 0),
gsSP1Triangle(8, 9, 10, 0),
gsSP1Triangle(8, 10, 11, 0),
gsSP1Triangle(12, 13, 14, 0),
gsSP1Triangle(12, 14, 15, 0),
gsSPVertex(big_paddle_paddle_mesh_layer_1_vtx_0 + 64, 12, 0),
gsSP1Triangle(0, 1, 2, 0),
gsSP1Triangle(0, 2, 3, 0),
gsSP1Triangle(4, 5, 6, 0),
gsSP1Triangle(4, 6, 7, 0),
gsSP1Triangle(8, 9, 10, 0),
gsSP1Triangle(8, 10, 11, 0),
gsSPEndDisplayList(),
};
Gfx mat_big_paddle_f3d_material[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetTextureLUT(G_TT_RGBA16),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, big_paddle_custom_box_surface_rgba16_ci4_pal_rgba16),
gsDPTileSync(),
gsDPSetTile(0, 0, 0, 256, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadSync(),
gsDPLoadTLUTCmd(7, 1),
gsDPPipeSync(),
gsDPTileSync(),
gsDPSetTextureImage(G_IM_FMT_CI, G_IM_SIZ_16b, 1, big_paddle_custom_box_surface_rgba16_ci4),
gsDPSetTile(G_IM_FMT_CI, G_IM_SIZ_16b, 0, 0, 7, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0),
gsDPLoadSync(),
gsDPLoadBlock(7, 0, 0, 255, 1024),
gsDPPipeSync(),
gsDPSetTile(G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0),
gsDPSetTileSize(0, 0, 0, 124, 124),
gsSPSetLights1(big_paddle_f3d_material_lights),
gsSPEndDisplayList(),
};
Gfx mat_revert_big_paddle_f3d_material[] = {
gsDPPipeSync(),
gsDPSetTextureLUT(G_TT_NONE),
gsSPEndDisplayList(),
};
Gfx big_paddle_paddle_mesh_layer_1[] = {
gsSPDisplayList(mat_big_paddle_f3d_material),
gsSPDisplayList(big_paddle_paddle_mesh_layer_1_tri_0),
gsSPDisplayList(mat_revert_big_paddle_f3d_material),
gsSPEndDisplayList(),
};
Gfx big_paddle_material_revert_render_settings[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_LIGHTING),
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 0),
gsDPSetEnvColor(255, 255, 255, 255),
gsDPSetAlphaCompare(G_AC_NONE),
gsSPEndDisplayList(),
};