Added big paddle example

This commit is contained in:
MysterD 2022-03-30 21:36:47 -07:00
parent 1773153971
commit 784614347b
9 changed files with 386 additions and 0 deletions

View File

@ -0,0 +1,69 @@
const Collision big_paddle_collision[] = {
COL_INIT(),
COL_VERTEX_INIT(24),
COL_VERTEX(-40, -40, -400),
COL_VERTEX(-120, 40, -400),
COL_VERTEX(-120, 40, -800),
COL_VERTEX(-40, -40, -720),
COL_VERTEX(120, 40, -800),
COL_VERTEX(40, -40, -720),
COL_VERTEX(120, 40, -400),
COL_VERTEX(40, -40, -400),
COL_VERTEX(-40, -40, 40),
COL_VERTEX(-40, 40, 40),
COL_VERTEX(-40, 40, -40),
COL_VERTEX(-40, -40, -40),
COL_VERTEX(40, 40, -40),
COL_VERTEX(40, -40, -40),
COL_VERTEX(12, -12, -60),
COL_VERTEX(12, 12, -60),
COL_VERTEX(40, 40, 40),
COL_VERTEX(40, -40, 40),
COL_VERTEX(12, -12, -400),
COL_VERTEX(12, 12, -400),
COL_VERTEX(-12, -12, -60),
COL_VERTEX(-12, 12, -60),
COL_VERTEX(-12, -12, -400),
COL_VERTEX(-12, 12, -400),
COL_TRI_INIT(SURFACE_DEFAULT, 38),
COL_TRI(0, 1, 2),
COL_TRI(0, 2, 3),
COL_TRI(3, 2, 4),
COL_TRI(3, 4, 5),
COL_TRI(5, 4, 6),
COL_TRI(5, 6, 7),
COL_TRI(7, 6, 1),
COL_TRI(7, 1, 0),
COL_TRI(3, 5, 7),
COL_TRI(3, 7, 0),
COL_TRI(4, 2, 1),
COL_TRI(4, 1, 6),
COL_TRI(8, 9, 10),
COL_TRI(8, 10, 11),
COL_TRI(12, 13, 14),
COL_TRI(12, 14, 15),
COL_TRI(13, 12, 16),
COL_TRI(13, 16, 17),
COL_TRI(17, 16, 9),
COL_TRI(17, 9, 8),
COL_TRI(11, 13, 17),
COL_TRI(11, 17, 8),
COL_TRI(12, 10, 9),
COL_TRI(12, 9, 16),
COL_TRI(15, 14, 18),
COL_TRI(15, 18, 19),
COL_TRI(13, 11, 20),
COL_TRI(13, 20, 14),
COL_TRI(10, 12, 15),
COL_TRI(10, 15, 21),
COL_TRI(11, 10, 21),
COL_TRI(11, 21, 20),
COL_TRI(14, 20, 22),
COL_TRI(14, 22, 18),
COL_TRI(21, 15, 19),
COL_TRI(21, 19, 23),
COL_TRI(20, 21, 23),
COL_TRI(20, 23, 22),
COL_TRI_STOP(),
COL_END()
};

View File

@ -0,0 +1 @@
extern const Collision big_paddle_collision[];

View File

@ -0,0 +1,10 @@
#include "src/game/envfx_snow.h"
const GeoLayout big_paddle_geo[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, big_paddle_paddle_mesh_layer_1),
GEO_DISPLAY_LIST(LAYER_OPAQUE, big_paddle_material_revert_render_settings),
GEO_CLOSE_NODE(),
GEO_END(),
};

View File

@ -0,0 +1,10 @@
extern const GeoLayout big_paddle_geo[];
extern Lights1 big_paddle_f3d_material_lights;
extern u8 big_paddle_custom_box_surface_rgba16_ci4[];
extern u8 big_paddle_custom_box_surface_rgba16_ci4_pal_rgba16[];
extern Vtx big_paddle_paddle_mesh_layer_1_vtx_0[76];
extern Gfx big_paddle_paddle_mesh_layer_1_tri_0[];
extern Gfx mat_big_paddle_f3d_material[];
extern Gfx mat_revert_big_paddle_f3d_material[];
extern Gfx big_paddle_paddle_mesh_layer_1[];
extern Gfx big_paddle_material_revert_render_settings[];

View File

@ -0,0 +1,252 @@
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(),
};

Binary file not shown.

View File

@ -0,0 +1,43 @@
-- name: Big Paddle
-- description: Press DPAD+down to spawn a Big Paddle
E_MODEL_BIG_PADDLE = smlua_model_util_get_id("big_paddle_geo")
COL_BIG_PADDLE = smlua_collision_util_get("big_paddle_collision")
----------------------------------
function bhv_big_paddle_init(obj)
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
obj.oCollisionDistance = 1000
obj.collisionData = COL_BIG_PADDLE
network_init_object(obj, false, nil)
end
function bhv_big_paddle_loop(obj)
obj.oFaceAnglePitch = obj.oFaceAnglePitch + 0x100
load_object_collision_model()
end
id_bhvBigPaddle = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_big_paddle_init, bhv_big_paddle_loop)
----------------------------------
function mario_update_local(m)
if (m.controller.buttonPressed & D_JPAD) ~= 0 then
print('spawning paddle: ', id_bhvBigPaddle, E_MODEL_BIG_PADDLE, COL_BIG_PADDLE)
-- spawn paddle
spawn_sync_object(
id_bhvBigPaddle,
E_MODEL_BIG_PADDLE,
m.pos.x, m.pos.y, m.pos.z,
nil)
end
end
function mario_update(m)
if m.playerIndex == 0 then
mario_update_local(m)
end
end
hook_event(HOOK_MARIO_UPDATE, mario_update)

View File

@ -51,6 +51,7 @@ All of this is a holdover from when there were only two players. It was a reason
- [Replace Goomba Behavior](examples/behavior-replace-goomba.lua)
- [Add to Goomba Behavior](examples/behavior-add-to-goomba.lua)
- [Behavior with Surface Collisions](examples/behavior-surface-collisions.lua)
- [Custom Surface Collisions](examples/big-paddle)
- [Custom Box Model](examples/custom-box-model)
- [Custom Player Model](examples/koopa-player-model)
- [Moonjump](examples/Moonjump.lua)