clang format

This commit is contained in:
KiritoDv 2025-05-16 02:44:40 +00:00 committed by github-actions[bot]
parent bdf5ca8d60
commit b53a5dbcfa
292 changed files with 36753 additions and 49043 deletions

View File

@ -1,4 +1,2 @@
#include <libultra/types.h>
#include "course_offsets.h"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -51,11 +51,6 @@ extern Gfx mat_ship1_black[];
extern Gfx mat_ship1_engine2[];
extern Gfx ship1_spag1_mesh[];
extern u8 wheels_metal1_i8[];
extern u8 wheels_tire_i8[];
extern Vtx wheels_Spaghetti_002_mesh_vtx_cull[8];

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -127,7 +127,6 @@ extern Gfx mat_castle_fence[];
extern Gfx mat_revert_castle_fence[];
extern Gfx castle_map_002_mesh[];
extern u8 statue_window_rgba16[];
extern u8 statue_flowers1_rgba32[];
extern u8 statue_marble1_ci8[];

View File

@ -9,6 +9,4 @@ extern StaffGhost d_mario_raceway_staff_ghost[];
extern StaffGhost d_royal_raceway_staff_ghost[];
extern StaffGhost d_luigi_raceway_staff_ghost[];
#endif // _STAFF_GHOST_DATA
#endif // _STAFF_GHOST_DATA

View File

@ -12,63 +12,63 @@ Gfx test_course_data_dl[] = {
};
TrackWaypoint test_course_path[] = {
{ 0, 0, 0, 0},
{ 0, 0, -100, 1},
{ 0, 0, -200, 1},
{ 0, 0, -300, 1},
{ 0, 0, -400, 1},
{ 0, 0, -500, 1},
{ 0, 0, -600, 1},
{ 0, 0, -700, 1},
{ 0, 0, -800, 1},
{ 0, 0, -900, 1},
{ 0, 0, -1000, 1},
{ 0, 0, -1096, 1}, // Main point 1
{ 100, 0, -1090, 2},
{ 200, 0, -1085, 2},
{ 300, 0, -1080, 2},
{ 400, 0, -1075, 2},
{ 500, 0, -1072, 2}, // Curve begins to smooth here
{ 600, 0, -1068, 2},
{ 700, 0, -1065, 2},
{ 800, 0, -1063, 2},
{ 900, 0, -1061, 2},
{ 984, 0, -1060, 2}, // Main point 2
{ 990, 0, -900, 3},
{ 995, 0, -800, 3},
{ 997, 0, -700, 3},
{ 998, 0, -600, 3},
{ 999, 0, -500, 3},
{ 999, 0, -400, 3},
{ 999, 0, -300, 3},
{ 999, 0, -200, 3},
{ 999, 0, -100, 3},
{ 999, 0, 0,3},
{ 999, 0, 100, 3},
{ 999, 0, 200, 3},
{ 999, 0, 300, 3},
{ 999, 0, 400, 3},
{ 999, 0, 500, 3},
{ 999, 0, 600, 3},
{ 999, 0, 700, 3},
{ 999, 0, 800, 3},
{ 999, 0, 900, 3},
{ 999, 0, 940, 3}, // Main point 3
{ 900, 0, 945, 4},
{ 800, 0, 945, 4},
{ 700, 0, 947, 4},
{ 600, 0, 948, 4},
{ 500, 0, 949, 4},
{ 400, 0, 949, 4},
{ 300, 0, 949, 4},
{ 200, 0, 950, 4},
{ 100, 0, 950, 4},
{ 0, 0, 0, 0 },
{ 0, 0, -100, 1 },
{ 0, 0, -200, 1 },
{ 0, 0, -300, 1 },
{ 0, 0, -400, 1 },
{ 0, 0, -500, 1 },
{ 0, 0, -600, 1 },
{ 0, 0, -700, 1 },
{ 0, 0, -800, 1 },
{ 0, 0, -900, 1 },
{ 0, 0, -1000, 1 },
{ 0, 0, -1096, 1 }, // Main point 1
{ 100, 0, -1090, 2 },
{ 200, 0, -1085, 2 },
{ 300, 0, -1080, 2 },
{ 400, 0, -1075, 2 },
{ 500, 0, -1072, 2 }, // Curve begins to smooth here
{ 600, 0, -1068, 2 },
{ 700, 0, -1065, 2 },
{ 800, 0, -1063, 2 },
{ 900, 0, -1061, 2 },
{ 984, 0, -1060, 2 }, // Main point 2
{ 990, 0, -900, 3 },
{ 995, 0, -800, 3 },
{ 997, 0, -700, 3 },
{ 998, 0, -600, 3 },
{ 999, 0, -500, 3 },
{ 999, 0, -400, 3 },
{ 999, 0, -300, 3 },
{ 999, 0, -200, 3 },
{ 999, 0, -100, 3 },
{ 999, 0, 0, 3 },
{ 999, 0, 100, 3 },
{ 999, 0, 200, 3 },
{ 999, 0, 300, 3 },
{ 999, 0, 400, 3 },
{ 999, 0, 500, 3 },
{ 999, 0, 600, 3 },
{ 999, 0, 700, 3 },
{ 999, 0, 800, 3 },
{ 999, 0, 900, 3 },
{ 999, 0, 940, 3 }, // Main point 3
{ 900, 0, 945, 4 },
{ 800, 0, 945, 4 },
{ 700, 0, 947, 4 },
{ 600, 0, 948, 4 },
{ 500, 0, 949, 4 },
{ 400, 0, 949, 4 },
{ 300, 0, 949, 4 },
{ 200, 0, 950, 4 },
{ 100, 0, 950, 4 },
// End of path
{ -32768, -32768, -32768, 0 } // Terminator
};
TrackSections test_course_addr[] = {
{ mario_Plane_001_mesh, 255, 255, 0x0000 },
{ mario_Plane_001_mesh, 255, 255, 0x0000 },
{ 0x00000000, 0, 0, 0x00000 },
};

View File

@ -2,388 +2,381 @@
#include <libultra/gbi.h>
#include "assets/other_textures.h"
Lights1 mario_f3dlite_material_009_lights = gdSPDefLights1(
0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x49, 0x49, 0x49);
Lights1 mario_f3dlite_material_009_lights = gdSPDefLights1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x49, 0x49, 0x49);
Lights1 mario_f3dlite_material_lights = gdSPDefLights1(
0x7F, 0x7F, 0x7F,
0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49);
Lights1 mario_f3dlite_material_lights = gdSPDefLights1(0x7F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49);
Vtx mario_Plane_001_mesh_vtx_cull[8] = {
{{ {-431, 0, -1544}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {-431, 0, 1394}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {-431, 9, 1394}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {-431, 9, -1544}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {1522, 0, -1544}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {1522, 0, 1394}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {1522, 9, 1394}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {1522, 9, -1544}, 0, {0, 0}, {0, 0, 0, 0} }},
{ { { -431, 0, -1544 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } }, { { { -431, 0, 1394 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } },
{ { { -431, 9, 1394 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } }, { { { -431, 9, -1544 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } },
{ { { 1522, 0, -1544 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } }, { { { 1522, 0, 1394 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } },
{ { { 1522, 9, 1394 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } }, { { { 1522, 9, -1544 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } },
};
Vtx mario_Plane_001_mesh_vtx_0[114] = {
{{ {984, 0, -1177}, 0, {2037, -25}, {0, 127, 0, 255} }},
{{ {925, 0, -1018}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {1011, 0, -1164}, 0, {2025, 1009}, {0, 127, 0, 255} }},
{{ {961, 0, -1184}, 0, {2035, -23}, {0, 127, 0, 255} }},
{{ {984, 0, -1177}, 0, {2025, 999}, {0, 127, 0, 255} }},
{{ {961, 0, -1184}, 0, {2036, 1008}, {0, 127, 0, 255} }},
{{ {925, 0, -1188}, 0, {2031, -20}, {0, 127, 0, 255} }},
{{ {925, 0, -1018}, 0, {-20, -16}, {0, 127, 0, 255} }},
{{ {-85, 0, 271}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {85, 0, 271}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {85, 0, -716}, 0, {2032, -16}, {0, 127, 0, 255} }},
{{ {-85, 0, -716}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {-85, 0, -716}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {85, 0, -716}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {85, 0, -1018}, 0, {2032, -16}, {0, 127, 0, 255} }},
{{ {-85, 0, -1107}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {-70, 0, -1146}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {-51, 0, -1173}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {85, 0, -1018}, 0, {2032, -16}, {0, 127, 0, 255} }},
{{ {-26, 0, -1192}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {2, 0, -1205}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {30, 0, -1211}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {60, 0, -1214}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {85, 0, -1217}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {124, 0, -1211}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {156, 0, -1188}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {925, 0, -1018}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {925, 0, -1188}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {156, 0, -1188}, 0, {2032, -16}, {0, 127, 0, 255} }},
{{ {85, 0, -1018}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {954, 0, 656}, 0, {-16, 880}, {0, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {1095, 0, 895}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {1095, 0, 417}, 0, {2032, 752}, {0, 127, 0, 255} }},
{{ {1095, 9, -62}, 0, {2032, 496}, {0, 127, 0, 255} }},
{{ {1095, 6, 178}, 0, {2032, 624}, {0, 127, 0, 255} }},
{{ {1095, 0, -540}, 0, {2032, 240}, {0, 127, 0, 255} }},
{{ {1095, 5, -301}, 0, {2032, 368}, {0, 127, 0, 255} }},
{{ {942, 9, -62}, 0, {-16, 496}, {0, 127, 0, 255} }},
{{ {946, 5, 178}, 0, {-16, 624}, {0, 127, 0, 255} }},
{{ {950, 0, 417}, 0, {-16, 752}, {0, 127, 0, 255} }},
{{ {938, 7, -301}, 0, {-16, 368}, {0, 127, 0, 255} }},
{{ {929, 0, -779}, 0, {-16, 112}, {0, 127, 0, 255} }},
{{ {925, 0, -1018}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {1095, 0, -1018}, 0, {2032, -16}, {0, 127, 0, 255} }},
{{ {933, 0, -540}, 0, {-16, 240}, {0, 127, 0, 255} }},
{{ {85, 0, 895}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {958, 0, 1065}, 0, {2032, -16}, {0, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {85, 0, 1065}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {51, 0, 1059}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {21, 0, 1053}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {-9, 0, 1042}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {-31, 0, 1029}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {-50, 0, 1008}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {-70, 0, 981}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {-78, 0, 963}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {-82, 0, 936}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {-85, 0, 895}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {85, 0, 271}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {-85, 0, 271}, 0, {2032, 1008}, {0, 127, 0, 255} }},
{{ {-85, 0, 895}, 0, {2032, -16}, {0, 127, 0, 255} }},
{{ {85, 0, 271}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {-85, 0, 895}, 0, {2032, -16}, {0, 127, 0, 255} }},
{{ {85, 0, 895}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {1095, 0, 895}, 0, {2032, 1008}, {0, 127, 252, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {0, 127, 252, 255} }},
{{ {1090, 1, 933}, 0, {2032, 1008}, {0, 127, 252, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {0, 127, 252, 255} }},
{{ {1090, 1, 933}, 0, {2032, 1008}, {255, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 0, 255} }},
{{ {1086, 1, 957}, 0, {2032, 1008}, {255, 127, 0, 255} }},
{{ {1086, 1, 957}, 0, {2032, 1008}, {255, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 0, 255} }},
{{ {1078, 1, 979}, 0, {2032, 1008}, {255, 127, 0, 255} }},
{{ {1078, 1, 979}, 0, {2032, 1008}, {255, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 0, 255} }},
{{ {1069, 1, 999}, 0, {2032, 1008}, {255, 127, 0, 255} }},
{{ {1069, 1, 999}, 0, {2032, 1008}, {255, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 0, 255} }},
{{ {1059, 1, 1019}, 0, {2032, 1008}, {255, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 0, 255} }},
{{ {1059, 1, 1019}, 0, {2032, 1008}, {255, 127, 255, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 255, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {255, 127, 255, 255} }},
{{ {1042, 1, 1035}, 0, {2032, 1008}, {255, 127, 255, 255} }},
{{ {1059, 1, 1019}, 0, {2032, 1008}, {0, 129, 0, 255} }},
{{ {1042, 1, 1035}, 0, {2032, 1008}, {0, 129, 0, 255} }},
{{ {1020, 1, 1047}, 0, {2032, 1008}, {0, 129, 0, 255} }},
{{ {1038, 1, 1031}, 0, {2032, 1008}, {0, 129, 0, 255} }},
{{ {1042, 1, 1035}, 0, {2032, 1008}, {0, 127, 255, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {0, 127, 255, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {0, 127, 255, 255} }},
{{ {1020, 1, 1047}, 0, {2032, 1008}, {0, 127, 255, 255} }},
{{ {1020, 1, 1047}, 0, {2032, 1008}, {0, 127, 255, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {0, 127, 255, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {0, 127, 255, 255} }},
{{ {991, 1, 1058}, 0, {2032, 1008}, {0, 127, 255, 255} }},
{{ {991, 1, 1058}, 0, {2032, 1008}, {251, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {251, 127, 0, 255} }},
{{ {958, 0, 1065}, 0, {2032, 1008}, {251, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {-16, 1008}, {251, 127, 0, 255} }},
{{ {1095, 0, -1018}, 0, {2024, -19}, {0, 127, 0, 255} }},
{{ {1098, 0, -1036}, 0, {2045, -12}, {0, 127, 0, 255} }},
{{ {925, 0, -1018}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {1098, 0, -1058}, 0, {2040, -24}, {0, 127, 0, 255} }},
{{ {1090, 0, -1080}, 0, {2037, -18}, {0, 127, 0, 255} }},
{{ {1077, 0, -1103}, 0, {2037, -27}, {0, 127, 0, 255} }},
{{ {1059, 0, -1129}, 0, {2040, -13}, {0, 127, 0, 255} }},
{{ {1036, 0, -1149}, 0, {2032, -15}, {0, 127, 0, 255} }},
{{ {1011, 0, -1164}, 0, {2033, -15}, {0, 127, 0, 255} }},
{ { { 984, 0, -1177 }, 0, { 2037, -25 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1018 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 1011, 0, -1164 }, 0, { 2025, 1009 }, { 0, 127, 0, 255 } } },
{ { { 961, 0, -1184 }, 0, { 2035, -23 }, { 0, 127, 0, 255 } } },
{ { { 984, 0, -1177 }, 0, { 2025, 999 }, { 0, 127, 0, 255 } } },
{ { { 961, 0, -1184 }, 0, { 2036, 1008 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1188 }, 0, { 2031, -20 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1018 }, 0, { -20, -16 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, 271 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, 271 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, -716 }, 0, { 2032, -16 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, -716 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, -716 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, -716 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, -1018 }, 0, { 2032, -16 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, -1107 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { -70, 0, -1146 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { -51, 0, -1173 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, -1018 }, 0, { 2032, -16 }, { 0, 127, 0, 255 } } },
{ { { -26, 0, -1192 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 2, 0, -1205 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 30, 0, -1211 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 60, 0, -1214 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, -1217 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 124, 0, -1211 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 156, 0, -1188 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1018 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1188 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { 156, 0, -1188 }, 0, { 2032, -16 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, -1018 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 954, 0, 656 }, 0, { -16, 880 }, { 0, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1095, 0, 895 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1095, 0, 417 }, 0, { 2032, 752 }, { 0, 127, 0, 255 } } },
{ { { 1095, 9, -62 }, 0, { 2032, 496 }, { 0, 127, 0, 255 } } },
{ { { 1095, 6, 178 }, 0, { 2032, 624 }, { 0, 127, 0, 255 } } },
{ { { 1095, 0, -540 }, 0, { 2032, 240 }, { 0, 127, 0, 255 } } },
{ { { 1095, 5, -301 }, 0, { 2032, 368 }, { 0, 127, 0, 255 } } },
{ { { 942, 9, -62 }, 0, { -16, 496 }, { 0, 127, 0, 255 } } },
{ { { 946, 5, 178 }, 0, { -16, 624 }, { 0, 127, 0, 255 } } },
{ { { 950, 0, 417 }, 0, { -16, 752 }, { 0, 127, 0, 255 } } },
{ { { 938, 7, -301 }, 0, { -16, 368 }, { 0, 127, 0, 255 } } },
{ { { 929, 0, -779 }, 0, { -16, 112 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1018 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 1095, 0, -1018 }, 0, { 2032, -16 }, { 0, 127, 0, 255 } } },
{ { { 933, 0, -540 }, 0, { -16, 240 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, 895 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 958, 0, 1065 }, 0, { 2032, -16 }, { 0, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, 1065 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { 51, 0, 1059 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { 21, 0, 1053 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { -9, 0, 1042 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { -31, 0, 1029 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { -50, 0, 1008 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { -70, 0, 981 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { -78, 0, 963 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { -82, 0, 936 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, 895 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, 271 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, 271 }, 0, { 2032, 1008 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, 895 }, 0, { 2032, -16 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, 271 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, 895 }, 0, { 2032, -16 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, 895 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 1095, 0, 895 }, 0, { 2032, 1008 }, { 0, 127, 252, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 0, 127, 252, 255 } } },
{ { { 1090, 1, 933 }, 0, { 2032, 1008 }, { 0, 127, 252, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 0, 127, 252, 255 } } },
{ { { 1090, 1, 933 }, 0, { 2032, 1008 }, { 255, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 0, 255 } } },
{ { { 1086, 1, 957 }, 0, { 2032, 1008 }, { 255, 127, 0, 255 } } },
{ { { 1086, 1, 957 }, 0, { 2032, 1008 }, { 255, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 0, 255 } } },
{ { { 1078, 1, 979 }, 0, { 2032, 1008 }, { 255, 127, 0, 255 } } },
{ { { 1078, 1, 979 }, 0, { 2032, 1008 }, { 255, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 0, 255 } } },
{ { { 1069, 1, 999 }, 0, { 2032, 1008 }, { 255, 127, 0, 255 } } },
{ { { 1069, 1, 999 }, 0, { 2032, 1008 }, { 255, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 0, 255 } } },
{ { { 1059, 1, 1019 }, 0, { 2032, 1008 }, { 255, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 0, 255 } } },
{ { { 1059, 1, 1019 }, 0, { 2032, 1008 }, { 255, 127, 255, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 255, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 255, 127, 255, 255 } } },
{ { { 1042, 1, 1035 }, 0, { 2032, 1008 }, { 255, 127, 255, 255 } } },
{ { { 1059, 1, 1019 }, 0, { 2032, 1008 }, { 0, 129, 0, 255 } } },
{ { { 1042, 1, 1035 }, 0, { 2032, 1008 }, { 0, 129, 0, 255 } } },
{ { { 1020, 1, 1047 }, 0, { 2032, 1008 }, { 0, 129, 0, 255 } } },
{ { { 1038, 1, 1031 }, 0, { 2032, 1008 }, { 0, 129, 0, 255 } } },
{ { { 1042, 1, 1035 }, 0, { 2032, 1008 }, { 0, 127, 255, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 0, 127, 255, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 0, 127, 255, 255 } } },
{ { { 1020, 1, 1047 }, 0, { 2032, 1008 }, { 0, 127, 255, 255 } } },
{ { { 1020, 1, 1047 }, 0, { 2032, 1008 }, { 0, 127, 255, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 0, 127, 255, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 0, 127, 255, 255 } } },
{ { { 991, 1, 1058 }, 0, { 2032, 1008 }, { 0, 127, 255, 255 } } },
{ { { 991, 1, 1058 }, 0, { 2032, 1008 }, { 251, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 251, 127, 0, 255 } } },
{ { { 958, 0, 1065 }, 0, { 2032, 1008 }, { 251, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { -16, 1008 }, { 251, 127, 0, 255 } } },
{ { { 1095, 0, -1018 }, 0, { 2024, -19 }, { 0, 127, 0, 255 } } },
{ { { 1098, 0, -1036 }, 0, { 2045, -12 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1018 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 1098, 0, -1058 }, 0, { 2040, -24 }, { 0, 127, 0, 255 } } },
{ { { 1090, 0, -1080 }, 0, { 2037, -18 }, { 0, 127, 0, 255 } } },
{ { { 1077, 0, -1103 }, 0, { 2037, -27 }, { 0, 127, 0, 255 } } },
{ { { 1059, 0, -1129 }, 0, { 2040, -13 }, { 0, 127, 0, 255 } } },
{ { { 1036, 0, -1149 }, 0, { 2032, -15 }, { 0, 127, 0, 255 } } },
{ { { 1011, 0, -1164 }, 0, { 2033, -15 }, { 0, 127, 0, 255 } } },
};
Gfx mario_Plane_001_mesh_tri_0[] = {
gsSPVertex(mario_Plane_001_mesh_vtx_0 + 0, 30, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 1, 4, 0),
gsSP2Triangles(5, 6, 7, 0, 8, 9, 10, 0),
gsSP2Triangles(8, 10, 11, 0, 12, 13, 14, 0),
gsSP2Triangles(12, 14, 15, 0, 15, 14, 14, 0),
gsSP2Triangles(15, 14, 16, 0, 16, 14, 17, 0),
gsSP2Triangles(14, 18, 17, 0, 17, 18, 18, 0),
gsSP2Triangles(17, 18, 19, 0, 19, 18, 18, 0),
gsSP2Triangles(19, 18, 20, 0, 20, 18, 18, 0),
gsSP2Triangles(20, 18, 21, 0, 21, 18, 14, 0),
gsSP2Triangles(21, 14, 22, 0, 22, 14, 23, 0),
gsSP2Triangles(14, 18, 23, 0, 23, 18, 14, 0),
gsSP2Triangles(23, 14, 24, 0, 24, 14, 18, 0),
gsSP2Triangles(24, 18, 25, 0, 26, 27, 28, 0),
gsSP1Triangle(26, 28, 29, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_0 + 30, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(0, 3, 4, 0, 3, 5, 4, 0),
gsSP2Triangles(0, 4, 6, 0, 4, 7, 6, 0),
gsSP2Triangles(8, 0, 6, 0, 8, 9, 0, 0),
gsSP2Triangles(9, 10, 0, 0, 6, 11, 8, 0),
gsSP2Triangles(6, 12, 11, 0, 6, 13, 12, 0),
gsSP2Triangles(6, 14, 13, 0, 12, 15, 11, 0),
gsSP2Triangles(16, 17, 18, 0, 16, 19, 17, 0),
gsSP2Triangles(19, 16, 16, 0, 19, 16, 20, 0),
gsSP2Triangles(20, 16, 16, 0, 20, 16, 21, 0),
gsSP2Triangles(21, 16, 16, 0, 21, 16, 22, 0),
gsSP2Triangles(22, 16, 16, 0, 22, 16, 23, 0),
gsSP2Triangles(23, 16, 16, 0, 23, 16, 24, 0),
gsSP2Triangles(24, 16, 16, 0, 24, 16, 25, 0),
gsSP2Triangles(25, 16, 16, 0, 25, 16, 26, 0),
gsSP2Triangles(26, 16, 16, 0, 26, 16, 27, 0),
gsSP2Triangles(27, 16, 28, 0, 16, 16, 28, 0),
gsSP1Triangle(29, 30, 31, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_0 + 62, 31, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(4, 6, 5, 0, 7, 8, 9, 0),
gsSP2Triangles(7, 9, 10, 0, 11, 12, 12, 0),
gsSP2Triangles(11, 12, 14, 0, 15, 16, 16, 0),
gsSP2Triangles(15, 16, 18, 0, 19, 20, 21, 0),
gsSP2Triangles(20, 22, 21, 0, 23, 24, 24, 0),
gsSP2Triangles(23, 24, 26, 0, 27, 28, 29, 0),
gsSP1Triangle(27, 29, 30, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_0 + 93, 21, 0),
gsSP2Triangles(0, 1, 1, 0, 0, 1, 3, 0),
gsSP2Triangles(4, 5, 5, 0, 4, 5, 7, 0),
gsSP2Triangles(8, 9, 10, 0, 9, 11, 10, 0),
gsSP2Triangles(12, 13, 14, 0, 13, 15, 14, 0),
gsSP2Triangles(15, 16, 14, 0, 17, 14, 16, 0),
gsSP2Triangles(18, 14, 17, 0, 19, 14, 18, 0),
gsSP1Triangle(20, 14, 19, 0),
gsSPEndDisplayList(),
gsSPVertex(mario_Plane_001_mesh_vtx_0 + 0, 30, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 1, 4, 0),
gsSP2Triangles(5, 6, 7, 0, 8, 9, 10, 0),
gsSP2Triangles(8, 10, 11, 0, 12, 13, 14, 0),
gsSP2Triangles(12, 14, 15, 0, 15, 14, 14, 0),
gsSP2Triangles(15, 14, 16, 0, 16, 14, 17, 0),
gsSP2Triangles(14, 18, 17, 0, 17, 18, 18, 0),
gsSP2Triangles(17, 18, 19, 0, 19, 18, 18, 0),
gsSP2Triangles(19, 18, 20, 0, 20, 18, 18, 0),
gsSP2Triangles(20, 18, 21, 0, 21, 18, 14, 0),
gsSP2Triangles(21, 14, 22, 0, 22, 14, 23, 0),
gsSP2Triangles(14, 18, 23, 0, 23, 18, 14, 0),
gsSP2Triangles(23, 14, 24, 0, 24, 14, 18, 0),
gsSP2Triangles(24, 18, 25, 0, 26, 27, 28, 0),
gsSP1Triangle(26, 28, 29, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_0 + 30, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(0, 3, 4, 0, 3, 5, 4, 0),
gsSP2Triangles(0, 4, 6, 0, 4, 7, 6, 0),
gsSP2Triangles(8, 0, 6, 0, 8, 9, 0, 0),
gsSP2Triangles(9, 10, 0, 0, 6, 11, 8, 0),
gsSP2Triangles(6, 12, 11, 0, 6, 13, 12, 0),
gsSP2Triangles(6, 14, 13, 0, 12, 15, 11, 0),
gsSP2Triangles(16, 17, 18, 0, 16, 19, 17, 0),
gsSP2Triangles(19, 16, 16, 0, 19, 16, 20, 0),
gsSP2Triangles(20, 16, 16, 0, 20, 16, 21, 0),
gsSP2Triangles(21, 16, 16, 0, 21, 16, 22, 0),
gsSP2Triangles(22, 16, 16, 0, 22, 16, 23, 0),
gsSP2Triangles(23, 16, 16, 0, 23, 16, 24, 0),
gsSP2Triangles(24, 16, 16, 0, 24, 16, 25, 0),
gsSP2Triangles(25, 16, 16, 0, 25, 16, 26, 0),
gsSP2Triangles(26, 16, 16, 0, 26, 16, 27, 0),
gsSP2Triangles(27, 16, 28, 0, 16, 16, 28, 0),
gsSP1Triangle(29, 30, 31, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_0 + 62, 31, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(4, 6, 5, 0, 7, 8, 9, 0),
gsSP2Triangles(7, 9, 10, 0, 11, 12, 12, 0),
gsSP2Triangles(11, 12, 14, 0, 15, 16, 16, 0),
gsSP2Triangles(15, 16, 18, 0, 19, 20, 21, 0),
gsSP2Triangles(20, 22, 21, 0, 23, 24, 24, 0),
gsSP2Triangles(23, 24, 26, 0, 27, 28, 29, 0),
gsSP1Triangle(27, 29, 30, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_0 + 93, 21, 0),
gsSP2Triangles(0, 1, 1, 0, 0, 1, 3, 0),
gsSP2Triangles(4, 5, 5, 0, 4, 5, 7, 0),
gsSP2Triangles(8, 9, 10, 0, 9, 11, 10, 0),
gsSP2Triangles(12, 13, 14, 0, 13, 15, 14, 0),
gsSP2Triangles(15, 16, 14, 0, 17, 14, 16, 0),
gsSP2Triangles(18, 14, 17, 0, 19, 14, 18, 0),
gsSP1Triangle(20, 14, 19, 0),
gsSPEndDisplayList(),
};
Vtx mario_Plane_001_mesh_vtx_1[92] = {
{{ {1090, 1, 933}, 0, {1008, 1008}, {32, 123, 0, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {32, 123, 0, 255} }},
{{ {1095, 0, 895}, 0, {1008, 1008}, {32, 123, 0, 255} }},
{{ {1086, 1, 957}, 0, {1008, 1008}, {6, 127, 1, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {6, 127, 1, 255} }},
{{ {1090, 1, 933}, 0, {1008, 1008}, {6, 127, 1, 255} }},
{{ {1078, 1, 979}, 0, {1008, 1008}, {3, 127, 1, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {3, 127, 1, 255} }},
{{ {1086, 1, 957}, 0, {1008, 1008}, {3, 127, 1, 255} }},
{{ {1069, 1, 999}, 0, {1008, 1008}, {3, 127, 1, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {3, 127, 1, 255} }},
{{ {1078, 1, 979}, 0, {1008, 1008}, {3, 127, 1, 255} }},
{{ {1059, 1, 1019}, 0, {1008, 1008}, {3, 127, 1, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {3, 127, 1, 255} }},
{{ {1069, 1, 999}, 0, {1008, 1008}, {3, 127, 1, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {2, 127, 3, 255} }},
{{ {1042, 1, 1035}, 0, {1008, 1008}, {2, 127, 3, 255} }},
{{ {1020, 1, 1047}, 0, {1008, 1008}, {2, 127, 3, 255} }},
{{ {1042, 1, 1035}, 0, {-16, 1008}, {2, 127, 2, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {2, 127, 2, 255} }},
{{ {1059, 1, 1019}, 0, {-16, 1008}, {2, 127, 2, 255} }},
{{ {991, 1, 1058}, 0, {1008, 1008}, {1, 127, 3, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {1, 127, 3, 255} }},
{{ {1020, 1, 1047}, 0, {1008, 1008}, {1, 127, 3, 255} }},
{{ {958, 0, 1065}, 0, {1008, 1008}, {0, 125, 23, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {0, 125, 23, 255} }},
{{ {991, 1, 1058}, 0, {1008, 1008}, {0, 125, 23, 255} }},
{{ {85, 0, -1018}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {85, 0, 895}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {958, 0, 895}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {942, 0, -62}, 0, {1008, 496}, {0, 127, 0, 255} }},
{{ {925, 0, -1018}, 0, {1008, -16}, {0, 127, 0, 255} }},
{{ {-431, 0, 1065}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {-85, 0, 1065}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {-85, 0, -1217}, 0, {1008, -16}, {0, 127, 0, 255} }},
{{ {-431, 0, -1217}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {-431, 0, 1394}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {1522, 0, 1394}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {1522, 0, 1065}, 0, {1008, -16}, {0, 127, 0, 255} }},
{{ {-431, 0, 1065}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {1095, 0, 23}, 0, {-16, 496}, {0, 127, 0, 255} }},
{{ {1095, 0, 1065}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {1522, 0, 1065}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {1095, 0, -1018}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {1522, 0, -1018}, 0, {1008, -16}, {0, 127, 0, 255} }},
{{ {-431, 0, -1544}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {-431, 0, -1217}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {156, 0, -1217}, 0, {240, 1008}, {0, 127, 0, 255} }},
{{ {925, 0, -1217}, 0, {496, 1008}, {0, 127, 0, 255} }},
{{ {1521, 0, -1544}, 0, {1008, -16}, {0, 127, 0, 255} }},
{{ {1521, 0, -1217}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {85, 0, 1065}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {51, 0, 1059}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {-85, 0, 1065}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {21, 0, 1053}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {-9, 0, 1042}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {-31, 0, 1029}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {-50, 0, 1008}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {-70, 0, 981}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {-78, 0, 963}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {-82, 0, 936}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {-85, 0, 895}, 0, {1008, 1008}, {0, 127, 0, 255} }},
{{ {925, 0, -1188}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {961, 0, -1184}, 0, {1010, 1008}, {0, 127, 0, 255} }},
{{ {156, 0, -1217}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {925, 0, -1188}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {925, 0, -1217}, 0, {496, 1008}, {0, 127, 0, 255} }},
{{ {156, 0, -1188}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {124, 0, -1211}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {85, 0, -1217}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {1098, 0, -1036}, 0, {1014, -12}, {0, 127, 0, 255} }},
{{ {1095, 0, -1018}, 0, {1004, -19}, {0, 127, 0, 255} }},
{{ {1522, 0, -1018}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {1098, 0, -1058}, 0, {1012, -24}, {0, 127, 0, 255} }},
{{ {1522, 0, -1058}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {1098, 0, -1217}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {1521, 0, -1217}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {1090, 0, -1080}, 0, {1010, -18}, {0, 127, 0, 255} }},
{{ {1077, 0, -1103}, 0, {1010, -27}, {0, 127, 0, 255} }},
{{ {1059, 0, -1129}, 0, {1012, -13}, {0, 127, 0, 255} }},
{{ {1036, 0, -1149}, 0, {1008, -15}, {0, 127, 0, 255} }},
{{ {1011, 0, -1164}, 0, {1008, -15}, {0, 127, 0, 255} }},
{{ {984, 0, -1177}, 0, {1011, -25}, {0, 127, 0, 255} }},
{{ {961, 0, -1184}, 0, {1010, -23}, {0, 127, 0, 255} }},
{{ {-85, 0, -1107}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {-70, 0, -1146}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {-85, 0, -1217}, 0, {-16, 1008}, {0, 127, 0, 255} }},
{{ {-51, 0, -1173}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {-26, 0, -1192}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {2, 0, -1205}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {30, 0, -1211}, 0, {-16, -16}, {0, 127, 0, 255} }},
{{ {60, 0, -1214}, 0, {-16, -16}, {0, 127, 0, 255} }},
{ { { 1090, 1, 933 }, 0, { 1008, 1008 }, { 32, 123, 0, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 32, 123, 0, 255 } } },
{ { { 1095, 0, 895 }, 0, { 1008, 1008 }, { 32, 123, 0, 255 } } },
{ { { 1086, 1, 957 }, 0, { 1008, 1008 }, { 6, 127, 1, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 6, 127, 1, 255 } } },
{ { { 1090, 1, 933 }, 0, { 1008, 1008 }, { 6, 127, 1, 255 } } },
{ { { 1078, 1, 979 }, 0, { 1008, 1008 }, { 3, 127, 1, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 3, 127, 1, 255 } } },
{ { { 1086, 1, 957 }, 0, { 1008, 1008 }, { 3, 127, 1, 255 } } },
{ { { 1069, 1, 999 }, 0, { 1008, 1008 }, { 3, 127, 1, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 3, 127, 1, 255 } } },
{ { { 1078, 1, 979 }, 0, { 1008, 1008 }, { 3, 127, 1, 255 } } },
{ { { 1059, 1, 1019 }, 0, { 1008, 1008 }, { 3, 127, 1, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 3, 127, 1, 255 } } },
{ { { 1069, 1, 999 }, 0, { 1008, 1008 }, { 3, 127, 1, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 2, 127, 3, 255 } } },
{ { { 1042, 1, 1035 }, 0, { 1008, 1008 }, { 2, 127, 3, 255 } } },
{ { { 1020, 1, 1047 }, 0, { 1008, 1008 }, { 2, 127, 3, 255 } } },
{ { { 1042, 1, 1035 }, 0, { -16, 1008 }, { 2, 127, 2, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 2, 127, 2, 255 } } },
{ { { 1059, 1, 1019 }, 0, { -16, 1008 }, { 2, 127, 2, 255 } } },
{ { { 991, 1, 1058 }, 0, { 1008, 1008 }, { 1, 127, 3, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 1, 127, 3, 255 } } },
{ { { 1020, 1, 1047 }, 0, { 1008, 1008 }, { 1, 127, 3, 255 } } },
{ { { 958, 0, 1065 }, 0, { 1008, 1008 }, { 0, 125, 23, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 0, 125, 23, 255 } } },
{ { { 991, 1, 1058 }, 0, { 1008, 1008 }, { 0, 125, 23, 255 } } },
{ { { 85, 0, -1018 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, 895 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 958, 0, 895 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { 942, 0, -62 }, 0, { 1008, 496 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1018 }, 0, { 1008, -16 }, { 0, 127, 0, 255 } } },
{ { { -431, 0, 1065 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, 1065 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, -1217 }, 0, { 1008, -16 }, { 0, 127, 0, 255 } } },
{ { { -431, 0, -1217 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { -431, 0, 1394 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1522, 0, 1394 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1522, 0, 1065 }, 0, { 1008, -16 }, { 0, 127, 0, 255 } } },
{ { { -431, 0, 1065 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 1095, 0, 23 }, 0, { -16, 496 }, { 0, 127, 0, 255 } } },
{ { { 1095, 0, 1065 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1522, 0, 1065 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1095, 0, -1018 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 1522, 0, -1018 }, 0, { 1008, -16 }, { 0, 127, 0, 255 } } },
{ { { -431, 0, -1544 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { -431, 0, -1217 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 156, 0, -1217 }, 0, { 240, 1008 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1217 }, 0, { 496, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1521, 0, -1544 }, 0, { 1008, -16 }, { 0, 127, 0, 255 } } },
{ { { 1521, 0, -1217 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, 1065 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { 51, 0, 1059 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, 1065 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 21, 0, 1053 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { -9, 0, 1042 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { -31, 0, 1029 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { -50, 0, 1008 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { -70, 0, 981 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { -78, 0, 963 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { -82, 0, 936 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, 895 }, 0, { 1008, 1008 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1188 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 961, 0, -1184 }, 0, { 1010, 1008 }, { 0, 127, 0, 255 } } },
{ { { 156, 0, -1217 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1188 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 925, 0, -1217 }, 0, { 496, 1008 }, { 0, 127, 0, 255 } } },
{ { { 156, 0, -1188 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 124, 0, -1211 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 85, 0, -1217 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 1098, 0, -1036 }, 0, { 1014, -12 }, { 0, 127, 0, 255 } } },
{ { { 1095, 0, -1018 }, 0, { 1004, -19 }, { 0, 127, 0, 255 } } },
{ { { 1522, 0, -1018 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1098, 0, -1058 }, 0, { 1012, -24 }, { 0, 127, 0, 255 } } },
{ { { 1522, 0, -1058 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1098, 0, -1217 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1521, 0, -1217 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { 1090, 0, -1080 }, 0, { 1010, -18 }, { 0, 127, 0, 255 } } },
{ { { 1077, 0, -1103 }, 0, { 1010, -27 }, { 0, 127, 0, 255 } } },
{ { { 1059, 0, -1129 }, 0, { 1012, -13 }, { 0, 127, 0, 255 } } },
{ { { 1036, 0, -1149 }, 0, { 1008, -15 }, { 0, 127, 0, 255 } } },
{ { { 1011, 0, -1164 }, 0, { 1008, -15 }, { 0, 127, 0, 255 } } },
{ { { 984, 0, -1177 }, 0, { 1011, -25 }, { 0, 127, 0, 255 } } },
{ { { 961, 0, -1184 }, 0, { 1010, -23 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, -1107 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { -70, 0, -1146 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { -85, 0, -1217 }, 0, { -16, 1008 }, { 0, 127, 0, 255 } } },
{ { { -51, 0, -1173 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { -26, 0, -1192 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 2, 0, -1205 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 30, 0, -1211 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
{ { { 60, 0, -1214 }, 0, { -16, -16 }, { 0, 127, 0, 255 } } },
};
Gfx mario_Plane_001_mesh_tri_1[] = {
gsSPVertex(mario_Plane_001_mesh_vtx_1 + 0, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 15, 16, 17, 0),
gsSP2Triangles(18, 19, 20, 0, 21, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 27, 28, 29, 0),
gsSP2Triangles(29, 30, 27, 0, 30, 31, 27, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_1 + 32, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0),
gsSP2Triangles(8, 9, 10, 0, 10, 11, 8, 0),
gsSP2Triangles(10, 12, 11, 0, 13, 14, 15, 0),
gsSP2Triangles(13, 15, 16, 0, 16, 17, 13, 0),
gsSP2Triangles(16, 18, 17, 0, 19, 20, 21, 0),
gsSP2Triangles(20, 22, 21, 0, 22, 23, 21, 0),
gsSP2Triangles(24, 21, 23, 0, 24, 25, 21, 0),
gsSP2Triangles(25, 26, 21, 0, 26, 27, 21, 0),
gsSP2Triangles(27, 28, 21, 0, 28, 29, 21, 0),
gsSP1Triangle(30, 31, 16, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_1 + 64, 28, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 1, 0, 0),
gsSP2Triangles(3, 0, 4, 0, 5, 4, 0, 0),
gsSP2Triangles(6, 7, 8, 0, 9, 6, 8, 0),
gsSP2Triangles(9, 8, 10, 0, 11, 9, 10, 0),
gsSP2Triangles(11, 10, 12, 0, 9, 11, 13, 0),
gsSP2Triangles(13, 11, 14, 0, 14, 11, 15, 0),
gsSP2Triangles(15, 11, 16, 0, 16, 11, 17, 0),
gsSP2Triangles(17, 11, 18, 0, 18, 11, 19, 0),
gsSP2Triangles(2, 19, 11, 0, 20, 21, 22, 0),
gsSP2Triangles(23, 22, 21, 0, 23, 24, 22, 0),
gsSP2Triangles(24, 25, 22, 0, 25, 26, 22, 0),
gsSP2Triangles(26, 27, 22, 0, 27, 5, 22, 0),
gsSPEndDisplayList(),
gsSPVertex(mario_Plane_001_mesh_vtx_1 + 0, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 15, 16, 17, 0),
gsSP2Triangles(18, 19, 20, 0, 21, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 27, 28, 29, 0),
gsSP2Triangles(29, 30, 27, 0, 30, 31, 27, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_1 + 32, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0),
gsSP2Triangles(8, 9, 10, 0, 10, 11, 8, 0),
gsSP2Triangles(10, 12, 11, 0, 13, 14, 15, 0),
gsSP2Triangles(13, 15, 16, 0, 16, 17, 13, 0),
gsSP2Triangles(16, 18, 17, 0, 19, 20, 21, 0),
gsSP2Triangles(20, 22, 21, 0, 22, 23, 21, 0),
gsSP2Triangles(24, 21, 23, 0, 24, 25, 21, 0),
gsSP2Triangles(25, 26, 21, 0, 26, 27, 21, 0),
gsSP2Triangles(27, 28, 21, 0, 28, 29, 21, 0),
gsSP1Triangle(30, 31, 16, 0),
gsSPVertex(mario_Plane_001_mesh_vtx_1 + 64, 28, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 1, 0, 0),
gsSP2Triangles(3, 0, 4, 0, 5, 4, 0, 0),
gsSP2Triangles(6, 7, 8, 0, 9, 6, 8, 0),
gsSP2Triangles(9, 8, 10, 0, 11, 9, 10, 0),
gsSP2Triangles(11, 10, 12, 0, 9, 11, 13, 0),
gsSP2Triangles(13, 11, 14, 0, 14, 11, 15, 0),
gsSP2Triangles(15, 11, 16, 0, 16, 11, 17, 0),
gsSP2Triangles(17, 11, 18, 0, 18, 11, 19, 0),
gsSP2Triangles(2, 19, 11, 0, 20, 21, 22, 0),
gsSP2Triangles(23, 22, 21, 0, 23, 24, 22, 0),
gsSP2Triangles(24, 25, 22, 0, 25, 26, 22, 0),
gsSP2Triangles(26, 27, 22, 0, 27, 5, 22, 0),
gsSPEndDisplayList(),
};
Gfx mat_mario_f3dlite_material_009[] = {
gsSPClearGeometryMode(G_CLIPPING),
gsSPSetLights1(mario_f3dlite_material_009_lights),
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, SHADE, TEXEL0_ALPHA, SHADE, 0, 0, 0, ENVIRONMENT, TEXEL0, SHADE, TEXEL0_ALPHA, SHADE, 0, 0, 0, ENVIRONMENT),
gsDPSetAlphaDither(G_AD_NOISE),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 1, gTextureRoad2),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(7, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 8, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0, G_TX_WRAP | G_TX_NOMIRROR, 6, 0),
gsDPSetTileSize(0, 0, 0, 252, 124),
gsSPEndDisplayList(),
gsSPClearGeometryMode(G_CLIPPING),
gsSPSetLights1(mario_f3dlite_material_009_lights),
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, SHADE, TEXEL0_ALPHA, SHADE, 0, 0, 0, ENVIRONMENT, TEXEL0, SHADE, TEXEL0_ALPHA, SHADE, 0,
0, 0, ENVIRONMENT),
gsDPSetAlphaDither(G_AD_NOISE),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 1, gTextureRoad2),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0,
G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(7, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 8, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0, G_TX_WRAP | G_TX_NOMIRROR, 6, 0),
gsDPSetTileSize(0, 0, 0, 252, 124),
gsSPEndDisplayList(),
};
Gfx mat_revert_mario_f3dlite_material_009[] = {
gsSPSetGeometryMode(G_CLIPPING),
gsDPPipeSync(),
gsDPSetAlphaDither(G_AD_DISABLE),
gsSPEndDisplayList(),
gsSPSetGeometryMode(G_CLIPPING),
gsDPPipeSync(),
gsDPSetAlphaDither(G_AD_DISABLE),
gsSPEndDisplayList(),
};
Gfx mat_mario_f3dlite_material[] = {
gsSPClearGeometryMode(G_CLIPPING),
gsSPSetLights1(mario_f3dlite_material_lights),
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetAlphaDither(G_AD_NOISE),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, gTextureGrass1),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP, 0, 0, G_TX_WRAP, 0, 0),
gsDPLoadBlock(7, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_WRAP, 5, 0, G_TX_WRAP, 5, 0),
gsDPSetTileSize(0, 0, 0, 32, 32),
gsSPEndDisplayList(),
gsSPClearGeometryMode(G_CLIPPING),
gsSPSetLights1(mario_f3dlite_material_lights),
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetAlphaDither(G_AD_NOISE),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, gTextureGrass1),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP, 0, 0, G_TX_WRAP, 0, 0),
gsDPLoadBlock(7, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_WRAP, 5, 0, G_TX_WRAP, 5, 0),
gsDPSetTileSize(0, 0, 0, 32, 32),
gsSPEndDisplayList(),
};
Gfx mat_revert_mario_f3dlite_material[] = {
gsSPSetGeometryMode(G_CLIPPING),
gsDPPipeSync(),
gsDPSetAlphaDither(G_AD_DISABLE),
gsSPEndDisplayList(),
gsSPSetGeometryMode(G_CLIPPING),
gsDPPipeSync(),
gsDPSetAlphaDither(G_AD_DISABLE),
gsSPEndDisplayList(),
};
Gfx mario_Plane_001_mesh[] = {
gsSPClearGeometryMode(G_LIGHTING),
gsSPVertex(mario_Plane_001_mesh_vtx_cull + 0, 8, 0),
gsSPSetGeometryMode(G_LIGHTING),
gsSPCullDisplayList(0, 7),
gsSPDisplayList(mat_mario_f3dlite_material_009),
gsSPDisplayList(mario_Plane_001_mesh_tri_0),
gsSPDisplayList(mat_revert_mario_f3dlite_material_009),
gsSPDisplayList(mat_mario_f3dlite_material),
gsSPDisplayList(mario_Plane_001_mesh_tri_1),
gsSPDisplayList(mat_revert_mario_f3dlite_material),
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),
gsSPEndDisplayList(),
gsSPClearGeometryMode(G_LIGHTING),
gsSPVertex(mario_Plane_001_mesh_vtx_cull + 0, 8, 0),
gsSPSetGeometryMode(G_LIGHTING),
gsSPCullDisplayList(0, 7),
gsSPDisplayList(mat_mario_f3dlite_material_009),
gsSPDisplayList(mario_Plane_001_mesh_tri_0),
gsSPDisplayList(mat_revert_mario_f3dlite_material_009),
gsSPDisplayList(mat_mario_f3dlite_material),
gsSPDisplayList(mario_Plane_001_mesh_tri_1),
gsSPDisplayList(mat_revert_mario_f3dlite_material),
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),
gsSPEndDisplayList(),
};

View File

@ -3,14 +3,14 @@
CourseVtx test_course_vertices[] = {
// Top-left vertex (x, y, z), texture coord (tc), color and alpha (ca)
{{ -100, 100, 0}, { 0, 0}, {MACRO_COLOR_FLAG(0xFF, 0x00, 0x00, 0), 0x00}}, // Red
{ { -100, 100, 0 }, { 0, 0 }, { MACRO_COLOR_FLAG(0xFF, 0x00, 0x00, 0), 0x00 } }, // Red
// Top-right vertex
{{ 100, 100, 0}, { 1024, 0}, {MACRO_COLOR_FLAG(0x00, 0xFF, 0x00, 0), 0x00}}, // Green
{ { 100, 100, 0 }, { 1024, 0 }, { MACRO_COLOR_FLAG(0x00, 0xFF, 0x00, 0), 0x00 } }, // Green
// Bottom-right vertex
{{ 100, -100, 0}, { 1024, 1024}, {MACRO_COLOR_FLAG(0x00, 0x00, 0xFF, 0), 0x00}}, // Blue
{ { 100, -100, 0 }, { 1024, 1024 }, { MACRO_COLOR_FLAG(0x00, 0x00, 0xFF, 0), 0x00 } }, // Blue
// Bottom-left vertex
{{ -100, -100, 0}, { 0, 1024}, {MACRO_COLOR_FLAG(0xFF, 0xFF, 0x00, 0), 0x00}}, // Yellow
{ { -100, -100, 0 }, { 0, 1024 }, { MACRO_COLOR_FLAG(0xFF, 0xFF, 0x00, 0), 0x00 } }, // Yellow
};

View File

@ -133,7 +133,7 @@ struct Actor {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
// Duplicate declare for simplicity when externing actors & packed files.
@ -158,25 +158,26 @@ struct TrainCar {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct RailroadCrossing {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 someTimer;
/* 0x06 */ s16 crossingId; // unused now
/* 0x06 */ s16 crossingId; // unused now
/* 0x08 */ void* crossingTrigger; // Crossing Trigger Class
/* 0x10 */ Vec3s rot;
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
// crossingTrigger might ruin struct size when compiled on 32 bit
static_assert(sizeof(struct RailroadCrossing) == sizeof(struct Actor), "RailroadCrossing struct size does not match base struct size");
static_assert(sizeof(struct RailroadCrossing) == sizeof(struct Actor),
"RailroadCrossing struct size does not match base struct size");
struct FallingRock {
/* 0x00 */ s16 type;
@ -190,7 +191,7 @@ struct FallingRock {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct ActorSpawnData {
@ -235,7 +236,7 @@ struct YoshiValleyEgg {
// pathCenter[0] and pathCenter[2] are the X,Z coordinates of the center of the path
/* 0x24 */ Vec3f pathCenter;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct KiwanoFruit {
@ -254,7 +255,7 @@ struct KiwanoFruit {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct PaddleWheelBoat {
@ -269,7 +270,7 @@ struct PaddleWheelBoat {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct PiranhaPlant {
@ -282,7 +283,7 @@ struct PiranhaPlant {
/* 0x24 */ Vec4s timers; // A per-camera timer. Might be more appropriate to call this state
/* 0x2C */ f32 unk_02C;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct PalmTree {
@ -297,7 +298,7 @@ struct PalmTree {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
typedef struct {
@ -314,7 +315,7 @@ typedef struct {
/* 0x18 */ Vec3f unk_18;
/* 0x24 */ Vec3f shellIndices; // Indices in gActorList for the shells "owned" by this parent
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
} TripleShellParent; // size = 0x70
struct ShellActor {
@ -342,7 +343,7 @@ struct ShellActor {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity; // All 0 until the shell is fired
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct ItemBox {
@ -361,7 +362,7 @@ struct ItemBox {
/* 0x28 */ f32 unk_028;
/* 0x2C */ f32 unk_02C;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct FakeItemBox {
@ -378,7 +379,7 @@ struct FakeItemBox {
/* 0x28 */ f32 targetY;
/* 0x2C */ f32 unk_02C;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct BananaBunchParent {
@ -394,7 +395,7 @@ struct BananaBunchParent {
/* 0x1E */ s16 unk_1E;
/* 0x20 */ f32 unk_20[4];
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
struct BananaActor {
@ -417,7 +418,7 @@ struct BananaActor {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ Collision unk30;
const char* model;
const char* model;
}; // size = 0x70
// #pragma GCC diagnostic pop

View File

@ -395,7 +395,7 @@ typedef struct {
s32 nCharacter; // Networked character choice
s32 nStartingRank;
u32 nHasAuthority;
} Player; // size = 0xDD8
} Player; // size = 0xDD8
typedef struct {
// Something related to time trial ghost data?
@ -412,7 +412,6 @@ typedef struct {
uint8_t r, g, b;
} RGB8;
typedef struct {
/* 0x00 */ u16 red;
/* 0x02 */ u16 green;

View File

@ -8,10 +8,10 @@
#include "animation.h"
typedef struct {
const char* addr; // segmented address texture file
u32 file_size; // compressed file size
u32 data_size; // uncompressed texture size
u32 padding; // always zero
const char* addr; // segmented address texture file
u32 file_size; // compressed file size
u32 data_size; // uncompressed texture size
u32 padding; // always zero
} course_texture;
extern uintptr_t d_course_sherbet_land_unk_data1[];

View File

@ -48,7 +48,6 @@
#define HOLD_ALL_DPAD_AND_C_BUTTONS \
(U_JPAD | L_JPAD | R_JPAD | D_JPAD | U_CBUTTONS | L_CBUTTONS | R_CBUTTONS | D_CBUTTONS)
/**
* @brief Jump to demo mode from the debug menu using L and A
*/
@ -208,7 +207,6 @@ enum { COURSE_ONE, COURSE_TWO, COURSE_THREE, COURSE_FOUR };
#define RACE_UNK 6
#define RACE_EXIT 7
/**
* @brief Options for gScreenModeSelection and gActiveScreenMode
*/
@ -306,12 +304,7 @@ enum KART_AI_BEHAVIOURS {
BEHAVIOUR_MAX_SPEED
};
enum DIRECTION {
NORTH,
EAST,
SOUTH,
WEST
};
enum DIRECTION { NORTH, EAST, SOUTH, WEST };
/**
* @brief Balloon status
@ -371,7 +364,6 @@ enum DIRECTION {
#define COLOR_LAVA GPACK_RGB888(0x34, 0x00, 0x00)
#define COLOR_BLACK GPACK_RGB888(0, 0, 0)
/**
*
* Collision mesh flags
@ -387,9 +379,9 @@ enum DIRECTION {
#endif // DEFINES_H
/**
*
*
* Laps
*
*
*/
#define MIN_LAPS 0
#define MAX_LAPS 3
#define MAX_LAPS 3

View File

@ -103,7 +103,7 @@ enum SURFACE_TYPE {
/* 0x0F */ CAVE, // DK Jungle cave
/* 0x10 */ ROPE_BRIDGE, // Bowser's Castle bridge 2, DK Jungle bridge
/* 0x11 */ WOOD_BRIDGE, // Frappe Snowland bridge, Bowser's Castle bridge 1,3, Yoshi Valley bridge 2
/* 0xFB */ WATER_SURFACE = 0xFB, // Water effect and Lakitu picks up the player
/* 0xFB */ WATER_SURFACE = 0xFB, // Water effect and Lakitu picks up the player
/* 0xFC */ BOOST_RAMP_WOOD = 0xFC, // DK Jungle
/* 0xFD */ OUT_OF_BOUNDS, // DK Jungle river island oob / out of bounds
/* 0xFE */ BOOST_RAMP_ASPHALT, // Royal Raceway

View File

@ -214,7 +214,7 @@ class platform {
template <typename T> class proc {
public:
proc(dll const& lib, std::string const& sym)
: m_proc(reinterpret_cast<T*>((void*)::GetProcAddress(lib.handle, sym.c_str()))) {
: m_proc(reinterpret_cast<T*>((void*) ::GetProcAddress(lib.handle, sym.c_str()))) {
}
operator bool() const {
@ -400,16 +400,17 @@ namespace internal {
#if _WIN32
static inline std::wstring str2wstr(std::string const& str) {
int len = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), (int)str.size(), nullptr, 0);
int len = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), (int) str.size(), nullptr, 0);
std::wstring ret(len, '\0');
MultiByteToWideChar(CP_UTF8, 0, str.c_str(), (int)str.size(), (LPWSTR)ret.data(), (int)ret.size());
MultiByteToWideChar(CP_UTF8, 0, str.c_str(), (int) str.size(), (LPWSTR) ret.data(), (int) ret.size());
return ret;
}
static inline std::string wstr2str(std::wstring const& str) {
int len = WideCharToMultiByte(CP_UTF8, 0, str.c_str(), (int)str.size(), nullptr, 0, nullptr, nullptr);
int len = WideCharToMultiByte(CP_UTF8, 0, str.c_str(), (int) str.size(), nullptr, 0, nullptr, nullptr);
std::string ret(len, '\0');
WideCharToMultiByte(CP_UTF8, 0, str.c_str(), (int)str.size(), (LPSTR)ret.data(), (int)ret.size(), nullptr, nullptr);
WideCharToMultiByte(CP_UTF8, 0, str.c_str(), (int) str.size(), (LPSTR) ret.data(), (int) ret.size(), nullptr,
nullptr);
return ret;
}
@ -534,10 +535,10 @@ inline void settings::rescan() {
// Check whether a program is present using “which”.
inline bool settings::check_program(std::string const& program) {
#if _WIN32
(void)program;
(void) program;
return false;
#elif __EMSCRIPTEN__
(void)program;
(void) program;
return false;
#else
int exit_code = -1;
@ -636,7 +637,7 @@ inline bool internal::executor::kill() {
if (m_future.valid()) {
// Close all windows that werent open when we started the future
auto previous_windows = m_windows;
EnumWindows(&enum_windows_callback, (LPARAM)this);
EnumWindows(&enum_windows_callback, (LPARAM) this);
for (auto hwnd : m_windows)
if (previous_windows.find(hwnd) == previous_windows.end()) {
SendMessage(hwnd, WM_CLOSE, 0, 0);
@ -656,7 +657,7 @@ inline bool internal::executor::kill() {
#if _WIN32
inline BOOL CALLBACK internal::executor::enum_windows_callback(HWND hwnd, LPARAM lParam) {
auto that = (executor*)lParam;
auto that = (executor*) lParam;
DWORD pid;
auto tid = GetWindowThreadProcessId(hwnd, &pid);
@ -673,7 +674,7 @@ inline void internal::executor::start_func(std::function<std::string(int*)> cons
auto trampoline = [fun, this]() {
// Save our thread id so that the caller can cancel us
m_tid = GetCurrentThreadId();
EnumWindows(&enum_windows_callback, (LPARAM)this);
EnumWindows(&enum_windows_callback, (LPARAM) this);
m_cond.notify_all();
return fun(&m_exit_code);
};
@ -760,7 +761,7 @@ inline bool internal::executor::ready(int timeout /* = default_wait_timeout */)
}
#elif __EMSCRIPTEN__ || __NX__
// FIXME: do something
(void)timeout;
(void) timeout;
#else
char buf[BUFSIZ];
ssize_t received = read(m_fd, buf, BUFSIZ); // Flawfinder: ignore
@ -866,7 +867,7 @@ inline HANDLE internal::platform::new_style_context::create() {
0,
0,
sys_dir.c_str(),
(LPCSTR)124,
(LPCSTR) 124,
nullptr,
0,
};
@ -892,11 +893,11 @@ inline std::vector<std::string> internal::dialog::desktop_helper() const {
#if __APPLE__
return { "osascript" };
#else
return { flags(flag::has_zenity) ? "zenity"
return { flags(flag::has_zenity) ? "zenity"
: flags(flag::has_matedialog) ? "matedialog"
: flags(flag::has_qarma) ? "qarma"
: flags(flag::has_kdialog) ? "kdialog"
: "echo" };
: flags(flag::has_qarma) ? "qarma"
: flags(flag::has_kdialog) ? "kdialog"
: "echo" };
#endif
}
@ -980,7 +981,7 @@ inline internal::file_dialog::file_dialog(type in_type, std::string const& title
filter_list += '\0';
m_async->start_func([this, in_type, title, default_path, filter_list, options](int* exit_code) -> std::string {
(void)exit_code;
(void) exit_code;
m_wtitle = internal::str2wstr(title);
m_wdefault_path = internal::str2wstr(default_path);
auto wfilter_list = internal::str2wstr(filter_list);
@ -1010,7 +1011,7 @@ inline internal::file_dialog::file_dialog(type in_type, std::string const& title
memset(&bi, 0, sizeof(bi));
bi.lpfn = &bffcallback;
bi.lParam = (LPARAM)this;
bi.lParam = (LPARAM) this;
if (flags(flag::is_vista)) {
if (ole32.is_initialized())
@ -1039,8 +1040,8 @@ inline internal::file_dialog::file_dialog(type in_type, std::string const& title
ofn.lpstrFilter = wfilter_list.c_str();
auto woutput = std::wstring(MAX_PATH * 256, L'\0');
ofn.lpstrFile = (LPWSTR)woutput.data();
ofn.nMaxFile = (DWORD)woutput.size();
ofn.lpstrFile = (LPWSTR) woutput.data();
ofn.nMaxFile = (DWORD) woutput.size();
if (!m_wdefault_path.empty()) {
// If a directory was provided, use it as the initial directory. If
// a valid path was provided, use it as the initial file. Otherwise,
@ -1052,8 +1053,8 @@ inline internal::file_dialog::file_dialog(type in_type, std::string const& title
// second argument is size of buffer, not length of string
StringCchCopyW(ofn.lpstrFile, MAX_PATH * 256 + 1, m_wdefault_path.c_str());
else {
ofn.lpstrFileTitle = (LPWSTR)m_wdefault_path.data();
ofn.nMaxFileTitle = (DWORD)m_wdefault_path.size();
ofn.lpstrFileTitle = (LPWSTR) m_wdefault_path.data();
ofn.nMaxFileTitle = (DWORD) m_wdefault_path.size();
}
}
ofn.lpstrTitle = m_wtitle.c_str();
@ -1101,11 +1102,11 @@ inline internal::file_dialog::file_dialog(type in_type, std::string const& title
});
#elif __EMSCRIPTEN__
// FIXME: do something
(void)in_type;
(void)title;
(void)default_path;
(void)filters;
(void)options;
(void) in_type;
(void) title;
(void) default_path;
(void) filters;
(void) options;
#else
auto command = desktop_helper();
@ -1277,10 +1278,10 @@ inline std::vector<std::string> internal::file_dialog::vector_result() {
#if _WIN32
// Use a static function to pass as BFFCALLBACK for legacy folder select
inline int CALLBACK internal::file_dialog::bffcallback(HWND hwnd, UINT uMsg, LPARAM, LPARAM pData) {
auto inst = (file_dialog*)pData;
auto inst = (file_dialog*) pData;
switch (uMsg) {
case BFFM_INITIALIZED:
SendMessage(hwnd, BFFM_SETSELECTIONW, TRUE, (LPARAM)inst->m_wdefault_path.c_str());
SendMessage(hwnd, BFFM_SETSELECTIONW, TRUE, (LPARAM) inst->m_wdefault_path.c_str());
break;
}
return 0;
@ -1409,12 +1410,12 @@ inline notify::notify(std::string const& title, std::string const& message, icon
}
ENUMRESNAMEPROC icon_enum_callback = [](HMODULE, LPCTSTR, LPTSTR lpName, LONG_PTR lParam) -> BOOL {
((NOTIFYICONDATAW*)lParam)->hIcon = ::LoadIcon(GetModuleHandle(nullptr), lpName);
((NOTIFYICONDATAW*) lParam)->hIcon = ::LoadIcon(GetModuleHandle(nullptr), lpName);
return false;
};
nid->hIcon = ::LoadIcon(nullptr, IDI_APPLICATION);
::EnumResourceNames(nullptr, RT_GROUP_ICON, icon_enum_callback, (LONG_PTR)nid.get());
::EnumResourceNames(nullptr, RT_GROUP_ICON, icon_enum_callback, (LONG_PTR) nid.get());
nid->uTimeout = 5000;
@ -1425,8 +1426,8 @@ inline notify::notify(std::string const& title, std::string const& message, icon
Shell_NotifyIconW(NIM_ADD, nid.get());
#elif __EMSCRIPTEN__
// FIXME: do something
(void)title;
(void)message;
(void) title;
(void) message;
#else
auto command = desktop_helper();
@ -1767,4 +1768,4 @@ inline std::string select_folder::result() {
#endif // PFD_SKIP_IMPLEMENTATION
} // namespace pfd
} // namespace pfd

View File

@ -56,7 +56,7 @@ typedef struct {
/* 0x048 */ TrainCarStuff passengerCars[NUM_PASSENGER_CAR_ENTRIES];
/* 0x0FC */ f32 speed;
/* 0x100 */ s32 someFlags;
s32 numCarriages;
s32 numCarriages;
/* 0x104 */ s32 numCars; // Non-locomotive car count?
/* 0x108 */ s32 unused; // Not read or written. Could be padding?
} TrainStuff; // size = 0x10C

View File

@ -32,7 +32,7 @@ void render_actor_kiwano_fruit(UNUSED Camera* camera, Mat4 arg1, struct Actor* a
// Animate actor by creating an index from rot[0]. Divide by texture size to get whole number 0-2.
// All three animated textures need to be the same size for this to work.
size_t idx = (actor->rot[0] << 0xA) / ResourceGetTexSizeByName(gTextureDksJungleParkwayKiwanoFruit1);
switch(idx) {
switch (idx) {
case 0:
addr = gTextureDksJungleParkwayKiwanoFruit1;
break;
@ -44,7 +44,7 @@ void render_actor_kiwano_fruit(UNUSED Camera* camera, Mat4 arg1, struct Actor* a
break;
}
//addr = segmented_texture_to_virtual((actor->rot[0] << 0xA) + 0x03009000);
// addr = segmented_texture_to_virtual((actor->rot[0] << 0xA) + 0x03009000);
gDPLoadTextureBlock(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(addr), G_IM_FMT_CI, G_IM_SIZ_8b, 32, 32, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);

View File

@ -94,7 +94,7 @@ void render_limb_or_add_mtx(Armature* arg0, s16* arg1, AnimationLimbVector arg2,
}
mtxf_translate_rotate2(modelMatrix, pos, angle);
//convert_to_fixed_point_matrix_animation(&gGfxPool->mtxHud[gMatrixHudCount], modelMatrix);
// convert_to_fixed_point_matrix_animation(&gGfxPool->mtxHud[gMatrixHudCount], modelMatrix);
sMatrixStackSize += 1;
// gSPMatrix(gDisplayListHead++, (&gGfxPool->mtxHud[gMatrixHudCount++]),
// G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);

View File

@ -12,7 +12,8 @@ void sequence_channel_process_sound(struct SequenceChannel* seqChannel, s32 reca
s32 i;
if (seqChannel->changes.as_bitfields.volume || recalculateVolume) {
channelVolume = (seqChannel->volume * (seqChannel->volumeScale * seqChannel->seqPlayer->fadeVolume)) * seqChannel->seqPlayer->gameVolume;
channelVolume = (seqChannel->volume * (seqChannel->volumeScale * seqChannel->seqPlayer->fadeVolume)) *
seqChannel->seqPlayer->gameVolume;
if (seqChannel->seqPlayer->muted && (seqChannel->muteBehavior & MUTE_BEHAVIOR_SOFTEN) != 0) {
channelVolume = seqChannel->seqPlayer->muteVolumeScale * channelVolume;
}

View File

@ -664,7 +664,7 @@ void audio_reset_session(void) {
for (var_s5 = 0; var_s5 < 4; var_s5++) {
gSynthesisReverbs[var_s5].useReverb = 0;
}
gNumSynthesisReverbs = temp_s6->numReverbs;
for (var_s5 = 0; var_s5 < gNumSynthesisReverbs; var_s5++) {
reverb = &gSynthesisReverbs[var_s5];

View File

@ -558,7 +558,7 @@ struct AudioBufferParametersEU {
* The version of that function in MK64 is significantly different
* from its SM64 counterpart
* Or we just have a poor understanding of this part of the system.
**/
**/
struct EuAudioCmd {
union {

View File

@ -11,7 +11,7 @@
#define PRELOAD_BANKS 2
#define PRELOAD_SEQUENCE 1
#define IS_SEQUENCE_CHANNEL_VALID(ptr) ((uintptr_t) (ptr) != (uintptr_t) &gSequenceChannelNone)
#define IS_SEQUENCE_CHANNEL_VALID(ptr) ((uintptr_t) (ptr) != (uintptr_t) & gSequenceChannelNone)
struct SharedDma {
/*0x0*/ u8* buffer; // target, points to pre-allocated buffer

View File

@ -1058,4 +1058,4 @@ void aUnkCmd19Impl(uint8_t f, uint16_t count, uint16_t out_addr, uint16_t in_add
out += 32;
nbytes -= 32 * sizeof(int16_t);
} while (nbytes > 0);
}
}

View File

@ -45,10 +45,8 @@ void aADPCMdecImpl(uint8_t flags, ADPCM_STATE state);
void aResampleImpl(uint8_t flags, uint16_t pitch, RESAMPLE_STATE state);
void aEnvSetup1Impl(uint8_t initial_vol_wet, uint16_t rate_wet, uint16_t rate_left, uint16_t rate_right);
void aEnvSetup2Impl(uint16_t initial_vol_left, uint16_t initial_vol_right);
void aEnvMixerImpl(uint16_t in_addr, uint16_t n_samples, bool swap_reverb,
bool neg_left, bool neg_right,
uint16_t dry_left_addr, uint16_t dry_right_addr,
uint16_t wet_left_addr, uint16_t wet_right_addr);
void aEnvMixerImpl(uint16_t in_addr, uint16_t n_samples, bool swap_reverb, bool neg_left, bool neg_right,
uint16_t dry_left_addr, uint16_t dry_right_addr, uint16_t wet_left_addr, uint16_t wet_right_addr);
void aMixImpl(int16_t gain, uint16_t in_addr, uint16_t out_addr, uint16_t count);
void aS8DecImpl(uint8_t flags, ADPCM_STATE state);
void aAddMixerImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr);
@ -91,4 +89,4 @@ void aUnkCmd19Impl(uint8_t f, uint16_t count, uint16_t out_addr, uint16_t in_add
#define aDownsampleHalf(pkt, nSamples, i, o) aDownsampleHalfImpl(nSamples, i, o)
#define aHiLoGain(pkt, g, buflen, i, a4) aHiLoGainImpl(g, buflen, i)
#define aUnkCmd3(pkt, a1, a2, a3) aUnkCmd3Impl(a1, a2, a3)
#define aUnkCmd19(pkt, a1, a2, a3, a4) aUnkCmd19Impl(a1, a2, a3, a4)
#define aUnkCmd19(pkt, a1, a2, a3, a4) aUnkCmd19Impl(a1, a2, a3, a4)

View File

@ -733,14 +733,15 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer* layer) {
if (seqChannel) {}
}
u8 get_instrument(struct SequenceChannel *seqChannel, u8 instId, struct Instrument **instOut, struct AdsrSettings *adsr) {
struct CtlEntry *bank = GameEngine_LoadBank(seqChannel->bankId);
if(instId >= bank->numInstruments) {
u8 get_instrument(struct SequenceChannel* seqChannel, u8 instId, struct Instrument** instOut,
struct AdsrSettings* adsr) {
struct CtlEntry* bank = GameEngine_LoadBank(seqChannel->bankId);
if (instId >= bank->numInstruments) {
*instOut = NULL;
return 0;
}
struct Instrument* inst = bank->instruments[instId];
if(inst == NULL) {
if (inst == NULL) {
*instOut = NULL;
return 0;
}
@ -911,9 +912,9 @@ void sequence_channel_process_script(struct SequenceChannel* seqChannel) {
case 0xEB: {
cmd = m64_read_u8(state);
struct AudioSequenceData *sequence = GameEngine_LoadSequence(seqPlayer->seqId);
struct AudioSequenceData* sequence = GameEngine_LoadSequence(seqPlayer->seqId);
cmd = sequence->banks[cmd];
if(IS_BANK_LOAD_COMPLETE(cmd)) {
if (IS_BANK_LOAD_COMPLETE(cmd)) {
seqChannel->bankId = cmd;
}
}
@ -1009,9 +1010,9 @@ void sequence_channel_process_script(struct SequenceChannel* seqChannel) {
case 0xC6: {
cmd = m64_read_u8(state);
struct AudioSequenceData *sequence = GameEngine_LoadSequence(seqPlayer->seqId);
struct AudioSequenceData* sequence = GameEngine_LoadSequence(seqPlayer->seqId);
cmd = sequence->banks[cmd];
if(IS_BANK_LOAD_COMPLETE(cmd)) {
if (IS_BANK_LOAD_COMPLETE(cmd)) {
seqChannel->bankId = cmd;
}
break;
@ -1214,7 +1215,7 @@ void sequence_player_process_sequence(struct SequencePlayer* seqPlayer) {
if (seqPlayer->enabled == false) {
return;
}
GameEngine_LoadSequence(seqPlayer->seqId);
GameEngine_LoadBank(seqPlayer->defaultBank[0]);

View File

@ -474,7 +474,8 @@ Acmd* synthesis_process_note(s32 noteIndex, struct NoteSubEu* noteSubEu, struct
} else {
var_a0_2 = (temp_t6 * 9) + sampleAddr;
// var_a0_2 =
// dma_sample_data((uintptr_t) (temp_t6 * 9) + sampleAddr, ALIGN(((loopInfo_2 * 9) + 16), 4),
// dma_sample_data((uintptr_t) (temp_t6 * 9) + sampleAddr, ALIGN(((loopInfo_2 * 9) + 16),
// 4),
// flags, &synthesisState->sampleDmaIndex);
// unsure flags?
}
@ -576,7 +577,7 @@ Acmd* synthesis_process_note(s32 noteIndex, struct NoteSubEu* noteSubEu, struct
resampledTempLen + DMEM_ADDR_RESAMPLED);
break;
}
//break;
// break;
}
if (noteSubEu->finished != false) {
break;

View File

@ -20,7 +20,6 @@
#define DMEM_ADDR_WET_LEFT_CH 0x840
#define DMEM_ADDR_WET_RIGHT_CH 0x9C0
/*
Its not clear what values these macros should have. Neither version seem to
line up for MK64. Maybe each game has unique values for these? I don't know

View File

@ -55,7 +55,7 @@ typedef struct {
/* 0xB0 */ s16 unk_B0;
/* 0xB2 */ s16 unk_B2;
/* 0xB4 */ f32 unk_B4;
size_t cameraId;
size_t cameraId;
} Camera; /* size = 0xB8 */
void camera_init(f32, f32, f32, s16, u32, s32);

View File

@ -108,7 +108,8 @@ extern uintptr_t gHeapEndPtr;
* This allows players to retry or reset a course without reloading the whole course.
* Memory allocated after course load is not zeroed or reset. But should get overwritten by future allocations.
*
* This is a relatively unsafe way to architect a memory pool as old memory could accidentally be used if future allocations do not zero or fully overwrite their free memory.
* This is a relatively unsafe way to architect a memory pool as old memory could accidentally be used if future
* allocations do not zero or fully overwrite their free memory.
*/
extern uintptr_t gFreeMemoryCourseAnchor;
extern uintptr_t gFreeMemoryResetAnchor;

View File

@ -1539,8 +1539,8 @@ void update_vehicles(void) {
generate_player_smoke();
D_8016337C++;
//CM_TickBombKarts();
//CM_VehiclesTick();
// CM_TickBombKarts();
// CM_VehiclesTick();
}
void func_800098FC(s32 arg0, Player* player) {
@ -1664,16 +1664,16 @@ void func_80009B60(s32 playerId) {
if (!(player->unk_0CA & 2) && !(player->unk_0CA & 8)) {
D_80163448 = gPathIndexByPlayerId[playerId];
func_80008DC0(D_80163448);
//if (GetCourse() == GetKalimariDesert()) {
CM_VehicleCollision(playerId, player);
//func_80012DC0(playerId, player);
if (playerId == 0) {
CM_CrossingTrigger();
//func_80013054();
}
// if (GetCourse() == GetKalimariDesert()) {
CM_VehicleCollision(playerId, player);
// func_80012DC0(playerId, player);
if (playerId == 0) {
CM_CrossingTrigger();
// func_80013054();
}
//}
if (GetCourse() == GetDkJungle()) {
//func_80013854(player);
// func_80013854(player);
} else if (GetCourse() == GetToadsTurnpike()) {
func_800148C4(playerId, player);
func_80014A18(playerId, player);
@ -1760,7 +1760,7 @@ void func_80009B60(s32 playerId) {
D_80163210[playerId] = CM_GetProps()->D_0D009568[gCCSelection];
}
CM_AICrossingBehaviour(playerId);
//check_ai_crossing_distance(playerId);
// check_ai_crossing_distance(playerId);
func_8000D3B8(playerId);
func_8000D438(playerId, D_801630E0);
temp_f0 = D_80162FA0[0] - player->pos[0];
@ -1974,7 +1974,7 @@ void func_80009B60(s32 playerId) {
player->effects &= ~0x00200000;
D_80163210[playerId] = D_8016320C;
CM_AICrossingBehaviour(playerId);
//check_ai_crossing_distance(playerId);
// check_ai_crossing_distance(playerId);
func_80008424(playerId, D_8016320C, player);
}
}
@ -2907,7 +2907,7 @@ void set_bomb_kart_spawn_positions(void) {
BombKartSpawn* bombKartSpawn;
for (var_s3 = 0; var_s3 < NUM_BOMB_KARTS_VERSUS; var_s3++) {
//bombKartSpawn = &gBombKartSpawns[gCurrentCourseId][var_s3];
// bombKartSpawn = &gBombKartSpawns[gCurrentCourseId][var_s3];
if (GetCourse() == GetYoshiValley()) {
startingXPos = bombKartSpawn->startingXPos;
startingZPos = bombKartSpawn->startingZPos;
@ -3447,7 +3447,7 @@ void func_8000F2DC(void) {
CM_ClearVehicles();
//set_bomb_kart_spawn_positions();
// set_bomb_kart_spawn_positions();
func_8000EEDC();
}
@ -3639,7 +3639,8 @@ void func_800100F0(s32 pathIndex) {
TrackWaypoint* pathSrc = CM_GetProps()->PathTable2[pathIndex];
if (pathSrc == NULL) {
printf("code_80005FD0.c: Path %d in Course::PathTable2, was NULL.\n Your track is missing a path\n", pathIndex);
printf("code_80005FD0.c: Path %d in Course::PathTable2, was NULL.\n Your track is missing a path\n",
pathIndex);
}
var_v0 = process_path_data(pathDest, pathSrc);
@ -4152,10 +4153,10 @@ void kart_ai_behaviour_start(s32 playerId, Player* player) {
s32 behaviourType;
UNUSED s32 test;
KartAIBehaviour *beh = (KartAIBehaviour*)LOAD_ASSET(CM_GetProps()->AIBehaviour);
KartAIBehaviour* beh = (KartAIBehaviour*) LOAD_ASSET(CM_GetProps()->AIBehaviour);
sCurrentKartAIBehaviour =
&((KartAIBehaviour*)LOAD_ASSET(CM_GetProps()->AIBehaviour))[gCurrentKartAIBehaviourId[playerId]];
sCurrentKartAIBehaviour =
&((KartAIBehaviour*) LOAD_ASSET(CM_GetProps()->AIBehaviour))[gCurrentKartAIBehaviourId[playerId]];
playerWaypoint = gNearestWaypointByPlayerId[playerId];
@ -4219,8 +4220,8 @@ void kart_ai_behaviour_end(s32 playerIndex, Player* player) {
u32 waypointEnd;
s32 behaviourType;
sCurrentKartAIBehaviour = &(
(KartAIBehaviour*) LOAD_ASSET(CM_GetProps()->AIBehaviour))[gPreviousKartAIBehaviourId[playerIndex]];
sCurrentKartAIBehaviour =
&((KartAIBehaviour*) LOAD_ASSET(CM_GetProps()->AIBehaviour))[gPreviousKartAIBehaviourId[playerIndex]];
nearestWaypoint = gNearestWaypointByPlayerId[playerIndex];
behaviourType = sCurrentKartAIBehaviour->type;
waypointEnd = sCurrentKartAIBehaviour->waypointEnd;
@ -4330,7 +4331,8 @@ void generate_ferry_waypoints(void) {
D_80162EB2 = -40;
}
void spawn_vehicle_on_road(Vec3f position, Vec3s rotation, Vec3f velocity, s32 waypointIndex, s32 someMultiplierTheSequel, f32 speed) {
void spawn_vehicle_on_road(Vec3f position, Vec3s rotation, Vec3f velocity, s32 waypointIndex,
s32 someMultiplierTheSequel, f32 speed) {
f32 origXPos;
UNUSED f32 pad;
f32 origZPos;
@ -4338,14 +4340,12 @@ void spawn_vehicle_on_road(Vec3f position, Vec3s rotation, Vec3f velocity, s32 w
origXPos = position[0];
origZPos = position[2];
if (D_8016347A == 0) {
func_8000D6D0(position, (s16*) &waypointIndex, speed,
someMultiplierTheSequel, 0, 3);
func_8000D6D0(position, (s16*) &waypointIndex, speed, someMultiplierTheSequel, 0, 3);
rotation[0] = 0;
rotation[1] = -0x8000;
rotation[2] = 0;
} else {
func_8000D940(position, (s16*) &waypointIndex, speed,
someMultiplierTheSequel, 0);
func_8000D940(position, (s16*) &waypointIndex, speed, someMultiplierTheSequel, 0);
rotation[0] = 0;
rotation[1] = 0;
rotation[2] = 0;
@ -4379,9 +4379,9 @@ void init_vehicles_trains(size_t i, size_t numCarriages, f32 speed) {
gTrainList[i].numCarriages = numCarriages;
//for (i = 0; i < NUM_TRAINS; i++) {
// outputs 160 or 392 depending on the train.
// Wraps the value around to always output a valid waypoint.
// for (i = 0; i < NUM_TRAINS; i++) {
// outputs 160 or 392 depending on the train.
// Wraps the value around to always output a valid waypoint.
waypointOffset = (((i * gVehicle2DWaypointLength) / 2) + 160) % gVehicle2DWaypointLength;
// 120.0f is about the maximum usable value
@ -5891,12 +5891,14 @@ void func_80017054(Camera* camera, UNUSED Player* player, UNUSED s32 index, s32
sp58 = gWaypointCountByPathIndex[pathIndex];
D_80163238 = playerId;
sp56 = gNearestWaypointByCameraId[cameraId];
gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex);
gNearestWaypointByCameraId[cameraId] =
func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex);
// if (GetCourse() == GetYoshiValley()) {
if (gCurrentCourseId == 4) {
if ((sp56 != gNearestWaypointByCameraId[cameraId]) && (gNearestWaypointByCameraId[cameraId] == 1)) {
pathIndex = (D_80163DD8[cameraId] = random_int(4U));
gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex);
gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2],
gNearestWaypointByCameraId[cameraId], pathIndex);
}
}
@ -5923,13 +5925,13 @@ void func_80017054(Camera* camera, UNUSED Player* player, UNUSED s32 index, s32
camX += D_80162FA0[0] * 0.5;
camZ += D_80162FA0[2] * 0.5;
camY = (D_80164550[pathIndex][waypoint1].posY + D_80164550[pathIndex][waypoint2].posY) * 0.5f;
diffX = camX - D_801645F8[cameraId];
diffY = camY - D_80164618[cameraId];
diffZ = camZ - D_80164638[cameraId];
// magnitude
#define SQ(x) (x * x)
distance = sqrtf(SQ(diffX) + SQ(diffY) + SQ(diffZ) );
// magnitude
#define SQ(x) (x * x)
distance = sqrtf(SQ(diffX) + SQ(diffY) + SQ(diffZ));
if (distance != 0.0) {
diffX = D_801645F8[cameraId] + ((D_80164648[cameraId] * diffX) / distance);
diffY = D_80164618[cameraId] + ((D_80164648[cameraId] * diffY) / distance);
@ -5945,10 +5947,14 @@ void func_80017054(Camera* camera, UNUSED Player* player, UNUSED s32 index, s32
camera->pos[2] = diffZ;
}
//camera->pos[0] = camX;
// camera->pos[0] = camX;
camera->pos[1] = diffY + 10.0; // Set camera 10 points above the ground
if (1) { } if (1) { } if (1) { } if (1) { } if (1) { }
if (1) {}
if (1) {}
if (1) {}
if (1) {}
if (1) {}
D_801645F8[cameraId] = diffX;
D_80164638[cameraId] = diffZ;
D_80164618[cameraId] = camY;

View File

@ -769,7 +769,7 @@ void render_object_for_player(s32 cameraId) {
render_object_leaf_particle(cameraId);
if (D_80165730 != 0) {
//render_balloons_grand_prix(cameraId);
// render_balloons_grand_prix(cameraId);
}
if (gModeSelection == BATTLE) {
CM_DrawBattleBombKarts(cameraId);
@ -1632,7 +1632,7 @@ void update_object(void) {
// update_ferries_smoke_particle();
// break;
// }
//if (D_80165730 != 0) {
// if (D_80165730 != 0) {
// func_80074EE8(); // Grand prix balloons
//}
func_80076F2C();

View File

@ -166,7 +166,7 @@ void func_8006EEE8(s32 courseId) {
D_8018D240 = (uintptr_t) CM_GetProps()->Minimap.Texture;
// This is incredibly dumb. MinimapDimensions ought to be something more like
// `u16 MinimapDimensions[][2]` but that doesn't match for some insane reason
gMinimapWidth = CM_GetProps()->Minimap.Width; // MinimapDimensions[courseId * 2];
gMinimapWidth = CM_GetProps()->Minimap.Width; // MinimapDimensions[courseId * 2];
gMinimapHeight = CM_GetProps()->Minimap.Height; // MinimapDimensions[courseId * 2 + 1];
}
@ -197,10 +197,12 @@ void func_8006F008(void) {
// Flip the minimap player markers
if (gIsMirrorMode != 0) {
CM_GetProps()->Minimap.PlayerX = CM_GetProps()->Minimap.Width - CM_GetProps()->Minimap.PlayerX; // gMinimapPlayerX = gMinimapWidth - gMinimapPlayerX
CM_GetProps()->Minimap.PlayerX =
CM_GetProps()->Minimap.Width -
CM_GetProps()->Minimap.PlayerX; // gMinimapPlayerX = gMinimapWidth - gMinimapPlayerX
}
switch(gPlayerCount) {
switch (gPlayerCount) {
case 2:
// Set X coord
if (GetCourse() != GetToadsTurnpike()) {
@ -265,7 +267,7 @@ void func_8006F8CC(void) {
D_801657F0 = 1;
D_80165800[0] = D_80165800[1] = 0;
}
CM_GetProps()->Minimap.Pos[0].Y = 65;
CM_GetProps()->Minimap.Pos[1].Y = 180;
}
@ -494,7 +496,7 @@ void init_cloud_object(s32 objectIndex, s32 arg1, CloudData* arg2) {
temp_v0->direction_angle[1] = arg2->rotY;
temp_v0->unk_09E = arg2->posY;
temp_v0->sizeScaling = (f32) arg2->scalePercent / 100.0;
temp_v0->activeTexture = ((u8(*)[1024])CM_GetProps()->CloudTexture)[arg2->subType];
temp_v0->activeTexture = ((u8(*)[1024]) CM_GetProps()->CloudTexture)[arg2->subType];
func_80073404(objectIndex, 0x40U, 0x20U, D_0D005FB0);
temp_v0->primAlpha = 0x00FF;
}

View File

@ -19,25 +19,23 @@ TrackWaypoint nullPath = { 0x8000, 0x0000, 0x0000, 0x0000 };
// But I cannot be bothered to figure it out
// Used as a ptr in D_800DCBB4
s16 gAIDistances[] = {
0x0014, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023,
0x001e, 0x0019, 0x0032, 0x004b, 0x0064, 0x007d, 0x0096, 0x00af,
0x0028, 0x001e, 0x003c, 0x005a, 0x0078, 0x0096, 0x00b4, 0x00d2,
0x0032, 0x0028, 0x0050, 0x0078, 0x00a0, 0x00c8, 0x00f0, 0x0118,
0x0014, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023, 0x001e, 0x0019, 0x0032,
0x004b, 0x0064, 0x007d, 0x0096, 0x00af, 0x0028, 0x001e, 0x003c, 0x005a, 0x0078, 0x0096,
0x00b4, 0x00d2, 0x0032, 0x0028, 0x0050, 0x0078, 0x00a0, 0x00c8, 0x00f0, 0x0118,
};
// Used as a ptr in D_800DCBB4
s16 gMarioRacewayAIDistances[] = {
0x0014, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023,
0x001e, 0x0019, 0x002d, 0x0041, 0x005a, 0x0073, 0x008c, 0x00a5,
0x0028, 0x0003, 0x0006, 0x0010, 0x002e, 0x0031, 0x003b, 0x0059,
0x0032, 0x001e, 0x003c, 0x003f, 0x0049, 0x004e, 0x006c, 0x008a,
0x0014, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023, 0x001e, 0x0019, 0x002d,
0x0041, 0x005a, 0x0073, 0x008c, 0x00a5, 0x0028, 0x0003, 0x0006, 0x0010, 0x002e, 0x0031,
0x003b, 0x0059, 0x0032, 0x001e, 0x003c, 0x003f, 0x0049, 0x004e, 0x006c, 0x008a,
};
s16 some_data[] = { // Not sure what this is for
0x000a, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023,
0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,
0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,
0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,
s16 some_data[] = {
// Not sure what this is for
0x000a, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023, 0x000a, 0x0005, 0x0005,
0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,
0x0005, 0x0005, 0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,
};
s32 D_800DDB20 = 0x00000000;

View File

@ -522,7 +522,8 @@ SplineData D_800E5D78 = {
// Note the use of the plain SplineData type here. Since these are pointers, we don't care
// about their internal array size
SplineData* D_800E5D9C[] = { &D_800E5988, &D_800E5A44, &D_800E5B08, &D_800E5BD4, &D_800E5C90, &boo6, &boo7, &boo8, &boo9, &boo10 };
SplineData* D_800E5D9C[] = { &D_800E5988, &D_800E5A44, &D_800E5B08, &D_800E5BD4, &D_800E5C90,
&boo6, &boo7, &boo8, &boo9, &boo10 };
// Unused
SplineData* D_800E5DB0 = &D_800E5988;

File diff suppressed because it is too large Load Diff

View File

@ -1582,10 +1582,11 @@ void ceremony_transition_sliding_borders(void) {
gDPSetCycleType(gDisplayListHead++, G_CYC_FILL);
gDPSetFillColor(gDisplayListHead++, (GPACK_RGBA5551(0, 0, 0, 1) << 16 | GPACK_RGBA5551(0, 0, 0, 1)));
gDPFillWideRectangle(gDisplayListHead++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetGameRenderWidth(), (s32)lry);
gDPFillWideRectangle(gDisplayListHead++, OTRGetRectDimensionFromLeftEdge(0), (s32)uly, OTRGetGameRenderWidth(), 239);
//gDPFillRectangle(gDisplayListHead++, 0, 0, 319, (s32) lry);
//gDPFillRectangle(gDisplayListHead++, 0, (s32) uly, 319, 239);
gDPFillWideRectangle(gDisplayListHead++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetGameRenderWidth(), (s32) lry);
gDPFillWideRectangle(gDisplayListHead++, OTRGetRectDimensionFromLeftEdge(0), (s32) uly, OTRGetGameRenderWidth(),
239);
// gDPFillRectangle(gDisplayListHead++, 0, 0, 319, (s32) lry);
// gDPFillRectangle(gDisplayListHead++, 0, (s32) uly, 319, 239);
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
adjust_f32_value_transition(&gSizeSlidingBorders, gOrderedSizeSlidingBorders, D_802856BC / D_802856B4);

View File

@ -57,7 +57,8 @@ void func_80280038(void) {
func_80057FC4(0);
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], gScreenAspect, CM_GetProps()->NearPersp, CM_GetProps()->FarPersp, 1.0f);
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], gScreenAspect, CM_GetProps()->NearPersp,
CM_GetProps()->FarPersp, 1.0f);
gSPPerspNormalize(gDisplayListHead++, perspNorm);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);

View File

@ -72,8 +72,8 @@ void func_80281D00(void) {
}
func_8028150C();
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
guPerspective((Mtx*) &gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], gScreenAspect, CM_GetProps()->NearPersp, CM_GetProps()->FarPersp,
1.0f);
guPerspective((Mtx*) &gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], gScreenAspect, CM_GetProps()->NearPersp,
CM_GetProps()->FarPersp, 1.0f);
gSPPerspNormalize(gDisplayListHead++, perspNorm);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);

View File

@ -19,7 +19,7 @@ typedef struct {
/* 0x0C */ s8 slideDirection; // 0 for slide right, 1 for slide left. May have other uses/effects
/* 0x0D */ s8 textColor;
/* 0x0E */ s16 padding; // Always seems to be 0, never read (that I can see)
} CreditsRenderInfo; // size = 0x10
} CreditsRenderInfo; // size = 0x10
extern CreditsRenderInfo gTextCreditsRenderInfo[]; // gTextCreditsRenderInfo
extern char* gCreditsText[];

View File

@ -7,30 +7,36 @@ extern "C" {
#include "math_util.h"
}
AActor::AActor() {}
AActor::AActor() {
}
// Virtual functions to be overridden by derived classes
void AActor::Tick() { }
void AActor::Draw(Camera *camera) {
void AActor::Tick() {
}
void AActor::Draw(Camera* camera) {
if (Model) {
Mat4 mtx;
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
ApplyMatrixTransformations(mtx, *(FVector*)Pos, *(IRotator*)Rot, Scale);
ApplyMatrixTransformations(mtx, *(FVector*) Pos, *(IRotator*) Rot, Scale);
if (render_set_position(mtx, 0) != 0) {
gSPDisplayList(gDisplayListHead++, Model);
}
}
}
void AActor::Collision(Player* player, AActor* actor) {}
void AActor::VehicleCollision(s32 playerId, Player* player){}
void AActor::Collision(Player* player, AActor* actor) {
}
void AActor::VehicleCollision(s32 playerId, Player* player) {
}
void AActor::Destroy() {
// Set uuid to zero.
memset(uuid, 0, sizeof(uuid));
}
bool AActor::IsMod() { return false; }
bool AActor::IsMod() {
return false;
}
void AActor::SetLocation(FVector pos) {
Pos[0] = pos.x;
Pos[1] = pos.y;

View File

@ -9,28 +9,26 @@ extern "C" {
#include "camera.h"
#include "common_structs.h"
class AActor {
public:
public:
/* 0x00 */ s16 Type = 0;
/* 0x02 */ s16 Flags;
/* 0x04 */ s16 Unk_04;
/* 0x06 */ s16 State;
/* 0x08 */ f32 Unk_08;
/* 0x0C */ f32 BoundingBoxSize;
/* 0x10 */ Vec3s Rot = {0, 0, 0};
/* 0x10 */ Vec3s Rot = { 0, 0, 0 };
/* 0x16 */ s16 Unk_16;
/* 0x18 */ Vec3f Pos;
/* 0x24 */ Vec3f Velocity = {0, 0, 0};
/* 0x24 */ Vec3f Velocity = { 0, 0, 0 };
/* 0x30 */ Collision Unk30;
uint8_t uuid[16];
const char* Name = "";
FVector Scale = {1, 1, 1};
FVector Scale = { 1, 1, 1 };
Gfx* Model = NULL;
virtual ~AActor() = default; // Virtual destructor for proper cleanup in derived classes
virtual ~AActor() = default; // Virtual destructor for proper cleanup in derived classes
explicit AActor();
@ -44,5 +42,4 @@ public:
virtual void Destroy();
virtual bool IsMod();
};
}
}

View File

@ -36,4 +36,3 @@
#include "objects/Snowman.h"
#include "objects/Podium.h"
#include "objects/GrandPrixBalloons.h"

View File

@ -5,13 +5,13 @@
/**
* @file CoreMath.h
*
*
* Basic vector structs for manipulating 2D and 3D coordinates
*
*
*/
/**
*
*
* Applies pos, rot, and scale
*
*/
@ -38,13 +38,8 @@ struct FVector {
return x * other.x + y * other.y + z * other.z;
}
FVector Cross(const FVector& other) const {
return FVector(
y * other.z - z * other.y,
z * other.x - x * other.z,
x * other.y - y * other.x
);
return FVector(y * other.z - z * other.y, z * other.x - x * other.z, x * other.y - y * other.x);
}
float Magnitude() const {
@ -54,15 +49,15 @@ struct FVector {
FVector Normalize() const {
float len = std::sqrt(x * x + y * y + z * z);
if (len > 0.0001f) {
return FVector(
x / len, y / len, z / len
);
return FVector(x / len, y / len, z / len);
}
return FVector(0, 0, 0);
}
FVector() : x(0), y(0), z(0) {}
FVector(float x, float y, float z) : x(x), y(y), z(z) {}
FVector() : x(0), y(0), z(0) {
}
FVector(float x, float y, float z) : x(x), y(y), z(z) {
}
#endif // __cplusplus
};
@ -71,8 +66,10 @@ struct FVector4 {
#ifdef __cplusplus
FVector4() : x(0), y(0), z(0), w(0) {}
FVector4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) {}
FVector4() : x(0), y(0), z(0), w(0) {
}
FVector4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) {
}
#endif // __cplusplus
};
@ -92,8 +89,10 @@ struct FVector2D {
return *this;
}
FVector2D() : x(0), z(0) {}
FVector2D(float x, float z) : x(x), z(z) {}
FVector2D() : x(0), z(0) {
}
FVector2D(float x, float z) : x(x), z(z) {
}
#endif // __cplusplus
};
@ -102,10 +101,11 @@ typedef struct IVector2D {
int32_t X, Y;
#ifdef __cplusplus
IVector2D() : X(0), Y(0) {} // Default constructor
IVector2D(int32_t x, int32_t y) : X(x), Y(y) {} // Constructor to initialize with values
IVector2D() : X(0), Y(0) {
} // Default constructor
IVector2D(int32_t x, int32_t y) : X(x), Y(y) {
} // Constructor to initialize with values
IVector2D& operator=(const IVector2D& other) {
X = other.X;
@ -116,9 +116,8 @@ typedef struct IVector2D {
} IVector2D;
/**
* This struct immediately converts float pitch/yaw/roll in degrees to n64 int16_t binary angles 0-0xFFFF == 0-360 degrees
* ToDegrees() Receive an FRotator of float degrees back.
* Set() Set an n64 int16_t binary angles 0-0xFFFF
* This struct immediately converts float pitch/yaw/roll in degrees to n64 int16_t binary angles 0-0xFFFF == 0-360
* degrees ToDegrees() Receive an FRotator of float degrees back. Set() Set an n64 int16_t binary angles 0-0xFFFF
*/
struct IRotator {
uint16_t pitch, yaw, roll;
@ -126,8 +125,8 @@ struct IRotator {
#ifdef __cplusplus
IRotator& operator=(const IRotator& other) {
pitch = other.pitch;
yaw = other.yaw;
roll = other.roll;
yaw = other.yaw;
roll = other.roll;
return *this;
}
@ -137,21 +136,18 @@ struct IRotator {
roll = r;
}
IRotator() : pitch(0), yaw(0), roll(0) {}
IRotator() : pitch(0), yaw(0), roll(0) {
}
IRotator(float p, float y, float r) {
pitch = p * (UINT16_MAX / 360);
yaw = y * (UINT16_MAX / 360);
roll = r * (UINT16_MAX / 360);
yaw = y * (UINT16_MAX / 360);
roll = r * (UINT16_MAX / 360);
}
// Convert to radians as FVector
[[nodiscard]] FVector ToRadians() const {
float scale = 2.0f * M_PI / 65536.0f;
return FVector(
pitch * scale,
yaw * scale,
roll * scale
);
return FVector(pitch * scale, yaw * scale, roll * scale);
}
#endif // __cplusplus
};
@ -167,26 +163,26 @@ struct FRotator {
#ifdef __cplusplus
FRotator& operator=(const FRotator& other) {
pitch = other.pitch;
yaw = other.yaw;
roll = other.roll;
yaw = other.yaw;
roll = other.roll;
return *this;
}
// Convert to binary rotator 0 --> INT16_MAX
[[nodiscard]] IRotator ToBinary() const {
return IRotator(
static_cast<uint16_t>(pitch * (UINT16_MAX / 360)),
static_cast<uint16_t>(yaw * (UINT16_MAX / 360)),
static_cast<uint16_t>(roll * (UINT16_MAX / 360))
);
return IRotator(static_cast<uint16_t>(pitch * (UINT16_MAX / 360)),
static_cast<uint16_t>(yaw * (UINT16_MAX / 360)),
static_cast<uint16_t>(roll * (UINT16_MAX / 360)));
}
FRotator() : pitch(0), yaw(0), roll(0) {}
FRotator(float p, float y, float r) : pitch(p), yaw(y), roll(r) {}
FRotator() : pitch(0), yaw(0), roll(0) {
}
FRotator(float p, float y, float r) : pitch(p), yaw(y), roll(r) {
}
FRotator(IRotator rot) {
pitch = static_cast<float>(rot.pitch * (360 / UINT16_MAX));
yaw = static_cast<float>(rot.yaw * (360 / UINT16_MAX));
roll = static_cast<float>(rot.roll * (360 / UINT16_MAX));
yaw = static_cast<float>(rot.yaw * (360 / UINT16_MAX));
roll = static_cast<float>(rot.roll * (360 / UINT16_MAX));
}
#endif // __cplusplus
};
@ -200,11 +196,12 @@ struct IPathSpan {
#ifdef __cplusplus
// Default Constructor
IPathSpan() : Start(0), End(0) {}
IPathSpan() : Start(0), End(0) {
}
// Parameterized Constructor
IPathSpan(int InStart, int InEnd)
: Start(InStart), End(InEnd) {}
IPathSpan(int InStart, int InEnd) : Start(InStart), End(InEnd) {
}
// Copy Assignment Operator
IPathSpan& operator=(const IPathSpan& Other) {

View File

@ -42,5 +42,5 @@ size_t Cup::GetSize() {
void Cup::ShuffleCourses() {
// std::random_device rd;
// std::mt19937 g(rd());
//std::shuffle(Courses.begin(), Courses.end(), g);
// std::shuffle(Courses.begin(), Courses.end(), g);
}

View File

@ -8,10 +8,10 @@
class Course; // <-- Forward declare
class Cup {
public:
public:
std::string Id;
const char* Name;
u8 *Thumbnail;
u8* Thumbnail;
size_t CursorPosition = 0; // Course index in cup
std::vector<Course*> Courses;
@ -24,4 +24,4 @@ public:
virtual void SetCourse(size_t position);
virtual Course* GetCourse();
virtual size_t GetSize();
};
};

View File

@ -3,4 +3,4 @@
void* GetCourse(void);
#endif // GAME_API_H
#endif // GAME_API_H

View File

@ -2,7 +2,7 @@
#include "World.h"
void RunGarbageCollector() {
//CleanActors();
// CleanActors();
CleanObjects();
CleanStaticMeshActors();
}

View File

@ -5,7 +5,6 @@
#include "Object.h"
#include "World.h"
void RunGarbageCollector();
void CleanActors();
void CleanStaticMeshActors();

View File

@ -40,7 +40,7 @@ void HarbourMastersIntro::HM_InitIntro() {
_pos = FVector(-1000, -205, -800); // -1000, -210, -800
_rot = IRotator(-5, 100, 0);
_scale = {0.7f, 0.7f, 0.7f};
_scale = { 0.7f, 0.7f, 0.7f };
_ship2Pos = FVector(300, -210, -1960);
_ship2Rot = IRotator(0, 45, 0);
@ -53,18 +53,16 @@ void HarbourMastersIntro::HM_InitIntro() {
_hPos = FVector(-2000, 100, -4900);
_hRot = IRotator(0, -45.0f, 0);
_hScale = {2.0f, 2.0f, 2.0f};
_hScale = { 2.0f, 2.0f, 2.0f };
lusPos = FVector(0, -400, -614); // 12, 190, -1000
lusRot = IRotator(0, 0, 0);
lusScale = FVector(1, 1, 1);
ground_f3d_material_013_lights = gdSPDefLights1(
0x7F, 0x30, 0x80,
0x60, 20, 10, 0x49, 0x49, 0x49
);
ground_f3d_material_013_lights = gdSPDefLights1(0x7F, 0x30, 0x80, 0x60, 20, 10, 0x49, 0x49, 0x49);
gEditor.AddObject("lus", &lusPos, &lusRot, &lusScale, nullptr, 1, Editor::GameObject::CollisionType::BOUNDING_BOX, 10, &DespawnValue, -1);
gEditor.AddObject("lus", &lusPos, &lusRot, &lusScale, nullptr, 1, Editor::GameObject::CollisionType::BOUNDING_BOX,
10, &DespawnValue, -1);
}
void HarbourMastersIntro::HM_TickIntro() {
@ -90,12 +88,14 @@ void HarbourMastersIntro::HM_TickIntro() {
gFadeModeSelection = FADE_MODE_LOGO;
}
find_and_set_tile_size((uintptr_t) ((void*)mat_water_water1), 0, _water);
find_and_set_tile_size((uintptr_t) ((void*)mat_water_water2), _water, 0);;
find_and_set_tile_size((uintptr_t) ((void*) mat_water_water1), 0, _water);
find_and_set_tile_size((uintptr_t) ((void*) mat_water_water2), _water, 0);
;
}
void HarbourMastersIntro::Bob(FVector& pos, IRotator& rot, f32 bobAmp, f32 bobSpeed, f32 tiltAmp, f32 tiltSpeed, f32 rollAmp, f32 rollSpeed) {
float time = (float)gGlobalTimer;
void HarbourMastersIntro::Bob(FVector& pos, IRotator& rot, f32 bobAmp, f32 bobSpeed, f32 tiltAmp, f32 tiltSpeed,
f32 rollAmp, f32 rollSpeed) {
float time = (float) gGlobalTimer;
pos.y = -210 + bobAmp * sin(time * bobSpeed);
@ -104,14 +104,15 @@ void HarbourMastersIntro::Bob(FVector& pos, IRotator& rot, f32 bobAmp, f32 bobSp
rot.roll = (rollAmp * sin(time * rollSpeed)) * (UINT16_MAX / 360);
}
void HarbourMastersIntro::SpagBob(FVector& pos, IRotator& rot, f32 bobAmp, f32 bobSpeed, f32 tiltAmp, f32 tiltSpeed, f32 rollAmp, f32 rollSpeed) {
float time = (float)gGlobalTimer;
void HarbourMastersIntro::SpagBob(FVector& pos, IRotator& rot, f32 bobAmp, f32 bobSpeed, f32 tiltAmp, f32 tiltSpeed,
f32 rollAmp, f32 rollSpeed) {
float time = (float) gGlobalTimer;
pos.y = -205 + bobAmp * sin(time * bobSpeed);
rot.pitch = (-5 + tiltAmp * sin(time * tiltSpeed)) * (UINT16_MAX / 360);
rot.pitch = (-5 + tiltAmp * sin(time * tiltSpeed)) * (UINT16_MAX / 360);
rot.roll = (rollAmp * sin(time * rollSpeed)) * (UINT16_MAX / 360);
rot.roll = (rollAmp * sin(time * rollSpeed)) * (UINT16_MAX / 360);
}
void HarbourMastersIntro::HM_DrawIntro() {
@ -142,7 +143,7 @@ void HarbourMastersIntro::HM_DrawIntro() {
render_set_position(mtx_geo, 0);
gSPDisplayList(gDisplayListHead++, ground_map_mesh);
//gSPDisplayList(gDisplayListHead++, powered_Text_mesh); // Replaced by poweredbylus
// gSPDisplayList(gDisplayListHead++, powered_Text_mesh); // Replaced by poweredbylus
gSPDisplayList(gDisplayListHead++, castle_map_002_mesh);
gSPDisplayList(gDisplayListHead++, road_map_001_mesh);
gSPDisplayList(gDisplayListHead++, water_water1_mesh);
@ -150,7 +151,7 @@ void HarbourMastersIntro::HM_DrawIntro() {
Mat4 lusMtx;
ApplyMatrixTransformations(lusMtx, lusPos, lusRot, lusScale);
render_set_position(lusMtx, 0);
gSPDisplayList(gDisplayListHead++, (Gfx*)"__OTR__hmintro/poweredbylus");
gSPDisplayList(gDisplayListHead++, (Gfx*) "__OTR__hmintro/poweredbylus");
HarbourMastersIntro::Sync();
}
@ -161,7 +162,8 @@ void HarbourMastersIntro::Setup() {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
guPerspective(&gGfxPool->mtxScreen, &perspNorm, 45.0f, 1.3333334f, 100.0f, 12800.0f, 1.0f);
gSPPerspNormalize(gDisplayListHead++, perspNorm);
guLookAt(&gGfxPool->mtxLookAt[0], _camera.Pos.x, _camera.Pos.y, _camera.Pos.z, _camera.LookAt.x, _camera.LookAt.y, _camera.LookAt.z, 0.0f, 1.0f, 0.0f);
guLookAt(&gGfxPool->mtxLookAt[0], _camera.Pos.x, _camera.Pos.y, _camera.Pos.z, _camera.LookAt.x, _camera.LookAt.y,
_camera.LookAt.z, 0.0f, 1.0f, 0.0f);
gDPSetCycleType(gDisplayListHead++, G_CYC_FILL);
gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2);

View File

@ -15,17 +15,20 @@ extern "C" {
#ifdef __cplusplus
class HarbourMastersIntro {
public:
public:
HarbourMastersIntro();
void HM_InitIntro();
void HM_TickIntro();
void HM_DrawIntro();
private:
private:
void Setup();
void Sync();
void Bob(FVector& pos, IRotator& rot, f32 bobAmp, f32 bobSpeed, f32 tiltAmp, f32 tiltSpeed, f32 rollAmp, f32 rollSpeed);
void SpagBob(FVector& pos, IRotator& rot, f32 bobAmp, f32 bobSpeed, f32 tiltAmp, f32 tiltSpeed, f32 rollAmp, f32 rollSpeed);
void Bob(FVector& pos, IRotator& rot, f32 bobAmp, f32 bobSpeed, f32 tiltAmp, f32 tiltSpeed, f32 rollAmp,
f32 rollSpeed);
void SpagBob(FVector& pos, IRotator& rot, f32 bobAmp, f32 bobSpeed, f32 tiltAmp, f32 tiltSpeed, f32 rollAmp,
f32 rollSpeed);
void MoveCloserToCamera(float moveSpeed);
struct HMCamera {
@ -75,4 +78,4 @@ void HM_DrawIntro(void);
}
#endif
#endif // _HM_INTRO_H
#endif // _HM_INTRO_H

View File

@ -99,7 +99,7 @@ void ApplyMatrixTransformations(Mat4 mtx, FVector pos, IRotator rot, FVector sca
mtx[0][2] *= scale.z;
mtx[1][2] *= scale.z;
mtx[2][2] *= scale.z;
// Set the last row and column for the homogeneous coordinate system
mtx[0][3] = 0.0f;
mtx[1][3] = 0.0f;
@ -119,79 +119,76 @@ void AddLocalRotation(Mat4 mat, IRotator rot) {
mat[0][0] = (cos_yaw * cos_roll) + (sin_pitch * sin_yaw * sin_roll);
mat[0][1] = (cos_pitch * sin_roll);
mat[0][2] = (-sin_yaw * cos_roll) + (sin_pitch * cos_yaw * sin_roll);
mat[1][0] = (-cos_yaw * sin_roll) + (sin_pitch * sin_yaw * cos_roll);
mat[1][1] = (cos_pitch * cos_roll);
mat[1][2] = (sin_yaw * sin_roll) + (sin_pitch * cos_yaw * cos_roll);
mat[2][0] = (cos_pitch * sin_yaw);
mat[2][1] = -sin_pitch;
mat[2][2] = (cos_pitch * cos_yaw);
}
// API
extern "C" {
void AddHudMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Hud, mtx, flags);
}
void AddObjectMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Objects, mtx, flags);
}
void AddShadowMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Shadows, mtx, flags);
}
void AddKartMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Karts, mtx, flags);
}
void AddEffectMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Effects, mtx, flags);
}
void AddEffectMatrixFixed(s32 flags) {
AddMatrixFixed(gWorldInstance.Mtx.Effects, flags);
}
void AddEffectMatrixOrtho(void) {
auto& stack = gWorldInstance.Mtx.Effects;
stack.emplace_back();
guOrtho(&stack.back(), 0.0f, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 0.0f, -100.0f, 100.0f, 1.0f);
gSPMatrix(gDisplayListHead++, &stack.back(), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
}
Mtx* GetEffectMatrix(void) {
return GetMatrix(gWorldInstance.Mtx.Effects);
}
/**
* Note that the game doesn't seem to clear all of these at the beginning of a new frame.
* We might need to adjust which ones we clear.
*/
void ClearMatrixPools(void) {
gWorldInstance.Mtx.Hud.clear();
gWorldInstance.Mtx.Objects.clear();
gWorldInstance.Mtx.Shadows.clear();
gWorldInstance.Mtx.Karts.clear();
gWorldInstance.Mtx.Effects.clear();
}
void ClearHudMatrixPool(void) {
gWorldInstance.Mtx.Hud.clear();
}
void ClearEffectsMatrixPool(void) {
gWorldInstance.Mtx.Effects.clear();
}
void ClearObjectsMatrixPool(void) {
gWorldInstance.Mtx.Objects.clear();
}
void AddHudMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Hud, mtx, flags);
}
void AddObjectMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Objects, mtx, flags);
}
void AddShadowMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Shadows, mtx, flags);
}
void AddKartMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Karts, mtx, flags);
}
void AddEffectMatrix(Mat4 mtx, s32 flags) {
AddMatrix(gWorldInstance.Mtx.Effects, mtx, flags);
}
void AddEffectMatrixFixed(s32 flags) {
AddMatrixFixed(gWorldInstance.Mtx.Effects, flags);
}
void AddEffectMatrixOrtho(void) {
auto& stack = gWorldInstance.Mtx.Effects;
stack.emplace_back();
guOrtho(&stack.back(), 0.0f, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 0.0f, -100.0f, 100.0f, 1.0f);
gSPMatrix(gDisplayListHead++, &stack.back(), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
}
Mtx* GetEffectMatrix(void) {
return GetMatrix(gWorldInstance.Mtx.Effects);
}
/**
* Note that the game doesn't seem to clear all of these at the beginning of a new frame.
* We might need to adjust which ones we clear.
*/
void ClearMatrixPools(void) {
gWorldInstance.Mtx.Hud.clear();
gWorldInstance.Mtx.Objects.clear();
gWorldInstance.Mtx.Shadows.clear();
gWorldInstance.Mtx.Karts.clear();
gWorldInstance.Mtx.Effects.clear();
}
void ClearHudMatrixPool(void) {
gWorldInstance.Mtx.Hud.clear();
}
void ClearEffectsMatrixPool(void) {
gWorldInstance.Mtx.Effects.clear();
}
void ClearObjectsMatrixPool(void) {
gWorldInstance.Mtx.Objects.clear();
}
}

View File

@ -29,4 +29,4 @@ void AddShadowMatrix(Mat4 mtx, s32 flags);
}
#endif
#endif // _MATRIX_HEADER_
#endif // _MATRIX_HEADER_

View File

@ -70,7 +70,6 @@ void ModelLoader::Extract(Course* course) {
memcpy(list.gfxBuffer, &gfx[list.gfxStart], list.gfxBufferSize * sizeof(Gfx));
UpdateVtx(list);
}
free(vtx);

View File

@ -10,16 +10,16 @@ extern "C" {
class Course;
/**
*
*
* Lists are deferred until load time so that models that use the same course may all use the same extraction
*
*
* Note ensure that the buffers passed to LoadModelList are big enough for the requested data.
*
*
* This class should only be ran once.
*
*
*
*
* Usage:
*
*
* ModelLoader::LoadModelList bowserStatueList = {
.course = gBowsersCastle,
.gfxBuffer = &gBowserStatueGfx[0],
@ -29,13 +29,13 @@ class Course;
.vtxBufferSize = 717,
.vtxStart = 1942,
};
*
*
* gModelLoader.Add(bowserStatueList);
*/
class ModelLoader {
public:
public:
struct LoadModelList {
Course* course;
@ -50,10 +50,9 @@ public:
void Add(LoadModelList list);
void Load();
private:
struct CourseMap {
};
private:
struct CourseMap {};
void Extract(Course* course);
void UpdateVtx(LoadModelList list);

View File

@ -38,12 +38,12 @@ void PlayerBombKart::func_800563DC(s32 cameraId, s32 arg2) {
D_80183E80[1] = func_800418AC(pos.x, pos.z, camera->pos);
D_80183E80[2] = 0x8000;
rsp_set_matrix_transformation(D_80183E40, D_80183E80, 0.2f);
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007E98);
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007E98);
func_8004B310(arg2);
draw_rectangle_texture_overlap((u8*) common_tlut_bomb, (u8*)common_texture_bomb[residue], (Vtx*)D_0D005AE0, 0x00000020,
0x00000020, 0x00000020, 0x00000020);
draw_rectangle_texture_overlap((u8*) common_tlut_bomb, (u8*) common_texture_bomb[residue], (Vtx*) D_0D005AE0,
0x00000020, 0x00000020, 0x00000020, 0x00000020);
temp_s0 = D_8018D400;
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007B00);
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007B00);
func_8004B414(0, 0, 0, arg2);
D_80183E40[1] = D_80183E40[1] + 4.0;
D_80183E80[2] = 0;
@ -58,22 +58,22 @@ void PlayerBombKart::func_800563DC(s32 cameraId, s32 arg2) {
}
void PlayerBombKart::func_8005669C(s32 arg2) {
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D0079E8);
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D0079E8);
func_8004B310(arg2);
load_texture_block_rgba16_mirror((u8*) D_0D02AA58, 0x00000010, 0x00000010);
D_80183E40[1] = pos.y - 2.0;
D_80183E40[0] = pos.x + 2.0;
D_80183E40[2] = pos.z + 2.0;
func_800431B0(D_80183E40, D_80183E80, 0.15f, (Vtx*)common_vtx_rectangle);
func_800431B0(D_80183E40, D_80183E80, 0.15f, (Vtx*) common_vtx_rectangle);
D_80183E40[0] = pos.x + 2.0;
D_80183E40[2] = pos.z - 2.0;
func_800431B0(D_80183E40, D_80183E80, 0.15f, (Vtx*)common_vtx_rectangle);
func_800431B0(D_80183E40, D_80183E80, 0.15f, (Vtx*) common_vtx_rectangle);
D_80183E40[0] = pos.x - 2.0;
D_80183E40[2] = pos.z - 2.0;
func_800431B0(D_80183E40, D_80183E80, 0.15f, (Vtx*)common_vtx_rectangle);
func_800431B0(D_80183E40, D_80183E80, 0.15f, (Vtx*) common_vtx_rectangle);
D_80183E40[0] = pos.x - 2.0;
D_80183E40[2] = pos.z + 2.0;
func_800431B0(D_80183E40, D_80183E80, 0.15f, (Vtx*)common_vtx_rectangle);
func_800431B0(D_80183E40, D_80183E80, 0.15f, (Vtx*) common_vtx_rectangle);
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
}
@ -91,5 +91,5 @@ void PlayerBombKart::func_800568A0(s32 cameraId) {
// G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
AddHudMatrix(mtx, G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW);
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007B98);
}
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007B98);
}

View File

@ -4,15 +4,14 @@
#include "CoreMath.h"
class PlayerBombKart {
public:
public:
enum PlayerBombKartState {
DISABLED,
ACTIVE,
};
s16 state = PlayerBombKartState::DISABLED;
FVector pos = {0, 0, 0};
FVector pos = { 0, 0, 0 };
f32 surfaceHeight = 0;
s32 _primAlpha = 0;

View File

@ -13,7 +13,7 @@
// public:
// Registry();
// void Add(std::string name, std::function<T*()>);
// template <typename... Args>
// void AddArgs(std::string id);
// T* Get(std::string id);

View File

@ -69,7 +69,6 @@ void TrainSmokeTick() {
if (count != 0) {
boat->SmokeTimer = 100;
}
}
}
}
@ -80,22 +79,21 @@ void TrainSmokeDraw(s32 cameraId) {
for (auto& actor : gWorldInstance.Actors) {
if (auto train = dynamic_cast<ATrain*>(actor)) {
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007AE0);
load_texture_block_i8_nomirror((uint8_t*)D_0D029458, 32, 32);
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007AE0);
load_texture_block_i8_nomirror((uint8_t*) D_0D029458, 32, 32);
func_8004B72C(255, 255, 255, 255, 255, 255, 255);
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;
if ((train->SomeFlags != 0) &&
(is_particle_on_screen(train->Locomotive.position, camera, 0x4000U) != 0)) {
if ((train->SomeFlags != 0) && (is_particle_on_screen(train->Locomotive.position, camera, 0x4000U) != 0)) {
for (size_t i = 0; i < 128; i++) {
render_object_train_smoke_particle(train->SmokeParticles[i], cameraId);
}
}
} else if (auto boat = dynamic_cast<ABoat*>(actor)) {
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007AE0);
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007AE0);
load_texture_block_i8_nomirror((uint8_t*)D_0D029458, 32, 32);
load_texture_block_i8_nomirror((uint8_t*) D_0D029458, 32, 32);
func_8004B72C(255, 255, 255, 255, 255, 255, 255);
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;

View File

@ -8,8 +8,9 @@ extern "C" {
#include "math_util_2.h"
}
StaticMeshActor::StaticMeshActor(std::string name, FVector pos, IRotator rot, FVector scale, std::string model, int32_t* collision) : Name(name), Pos(pos), Rot(rot), Scale(scale), Model(""), Collision(collision) {
StaticMeshActor::StaticMeshActor(std::string name, FVector pos, IRotator rot, FVector scale, std::string model,
int32_t* collision)
: Name(name), Pos(pos), Rot(rot), Scale(scale), Model(""), Collision(collision) {
}
void StaticMeshActor::Draw() {
@ -19,7 +20,7 @@ void StaticMeshActor::Draw() {
if (!Model.empty()) {
ApplyMatrixTransformations(mtx, Pos, Rot, Scale);
if (render_set_position(mtx, 0) != 0) {
gSPDisplayList(gDisplayListHead++, (Gfx*)Model.c_str());
gSPDisplayList(gDisplayListHead++, (Gfx*) Model.c_str());
}
}
}

View File

@ -7,7 +7,7 @@
// todo: Make this class AStaticMeshActor : public AActor
class StaticMeshActor {
public:
public:
std::string Name;
FVector Pos;
IRotator Rot;
@ -22,16 +22,16 @@ public:
// Serialize each field of the class
j["Name"] = Name;
j["Position"] = {Pos.x, Pos.y, Pos.z}; // Assuming FVector has x, y, z fields
j["Rotation"] = {Rot.pitch, Rot.yaw, Rot.roll}; // Assuming IRotator has pitch, yaw, roll fields
j["Scale"] = {Scale.x, Scale.y, Scale.z}; // Assuming FVector has x, y, z fields
j["Position"] = { Pos.x, Pos.y, Pos.z }; // Assuming FVector has x, y, z fields
j["Rotation"] = { Rot.pitch, Rot.yaw, Rot.roll }; // Assuming IRotator has pitch, yaw, roll fields
j["Scale"] = { Scale.x, Scale.y, Scale.z }; // Assuming FVector has x, y, z fields
j["Model"] = Model;
// If Collision is not null, serialize it
if (Collision != nullptr) {
j["Collision"] = *Collision; // Serialize the value that Collision points to
j["Collision"] = *Collision; // Serialize the value that Collision points to
} else {
j["Collision"] = nullptr; // Handle the case where Collision is nullptr
j["Collision"] = nullptr; // Handle the case where Collision is nullptr
}
return j;
@ -39,20 +39,22 @@ public:
void from_json(const nlohmann::json& j) {
Name = j.at("Name").get<std::string>();
Pos = FVector(j.at("Position")[0].get<float>(), j.at("Position")[1].get<float>(), j.at("Position")[2].get<float>());
Rot.Set(j.at("Rotation")[0].get<uint16_t>(), j.at("Rotation")[1].get<uint16_t>(), j.at("Rotation")[2].get<uint16_t>());
Pos = FVector(j.at("Position")[0].get<float>(), j.at("Position")[1].get<float>(),
j.at("Position")[2].get<float>());
Rot.Set(j.at("Rotation")[0].get<uint16_t>(), j.at("Rotation")[1].get<uint16_t>(),
j.at("Rotation")[2].get<uint16_t>());
Scale = FVector(j.at("Scale")[0].get<float>(), j.at("Scale")[1].get<float>(), j.at("Scale")[2].get<float>());
// Deserialize the Model string
Model = j.at("Model").get<std::string>();
// Check if Collision is present in the JSON and deserialize it
//if (j.contains("Collision") && !j["Collision"].is_null()) {
// If Collision is a valid value, allocate memory for it and assign the value
// if (j.contains("Collision") && !j["Collision"].is_null()) {
// If Collision is a valid value, allocate memory for it and assign the value
// Collision = new int32_t(j.at("Collision").get<int32_t>());
//} else {
// If Collision is not present or is null, set it to nullptr
Collision = nullptr;
// If Collision is not present or is null, set it to nullptr
Collision = nullptr;
//}
}

View File

@ -29,9 +29,9 @@ void TrainCrossing::CrossingTrigger() {
s32 i;
OnTriggered = 0;
for (const auto& actor : gWorldInstance.Actors) {
if (auto train = dynamic_cast<ATrain*>(actor)) {;
if (auto train = dynamic_cast<ATrain*>(actor)) {
;
f32 radius = DynamicRadius(train->Locomotive.position, train->Locomotive.velocity, Position);
if (Distance(train->Locomotive.position, Position) < radius) {
@ -61,9 +61,9 @@ void TrainCrossing::AICrossingBehaviour(s32 playerId) {
}
f32 TrainCrossing::Distance(Vec3f a, Vec3f b) {
float dx = b[0] - a[0]; // Difference in x-coordinates
float dy = b[1] - a[1]; // Difference in y-coordinates
float dz = b[2] - a[2]; // Difference in z-coordinates
float dx = b[0] - a[0]; // Difference in x-coordinates
float dy = b[1] - a[1]; // Difference in y-coordinates
float dz = b[2] - a[2]; // Difference in z-coordinates
return sqrt(dx * dx + dy * dy + dz * dz); // Return the distance
}
@ -75,8 +75,7 @@ f32 TrainCrossing::DynamicRadius(Vec3f trainPos, Vec3f trainVelocity, Vec3f cros
trainToCrossing[2] = crossingPos[2] - trainPos[2];
// Dot product to check if the train is approaching or moving away from the crossing
f32 dotProduct = trainToCrossing[0] * trainVelocity[0] +
trainToCrossing[1] * trainVelocity[1] +
f32 dotProduct = trainToCrossing[0] * trainVelocity[0] + trainToCrossing[1] * trainVelocity[1] +
trainToCrossing[2] * trainVelocity[2];
if (dotProduct > 0) {

View File

@ -11,12 +11,12 @@ extern "C" {
* @arg Vec3f position of the crossing
* @arg u32 waypointMin
* @arg u32 waypointMax
*
*
* Min/Max are used to determine the range for AI to stop for the crossing.
*
*
*/
class TrainCrossing {
public:
public:
TrainCrossing(Vec3f position, u32 waypointMin, u32 waypointMax, f32 approachRadius, f32 exitRadius);
Vec3f Position;

View File

@ -21,7 +21,8 @@ extern "C" {
#include "mario_raceway_data.h"
}
World::World() {}
World::World() {
}
Course* CurrentCourse;
Cup* CurrentCup;
@ -38,7 +39,8 @@ void World::SetCourseFromCup() {
CurrentCourse = CurrentCup->GetCourse();
}
TrainCrossing* World::AddCrossing(Vec3f position, u32 waypointMin, u32 waypointMax, f32 approachRadius, f32 exitRadius) {
TrainCrossing* World::AddCrossing(Vec3f position, u32 waypointMin, u32 waypointMax, f32 approachRadius,
f32 exitRadius) {
auto crossing = std::make_shared<TrainCrossing>(position, waypointMin, waypointMax, approachRadius, exitRadius);
Crossings.push_back(crossing);
return crossing.get();
@ -119,11 +121,12 @@ AActor* World::AddActor(AActor* actor) {
Actors.push_back(actor);
if (actor->Model != NULL) {
gEditor.AddObject(actor->Name, (FVector*) &actor->Pos, (IRotator*)&actor->Rot, &actor->Scale,
gEditor.AddObject(actor->Name, (FVector*) &actor->Pos, (IRotator*) &actor->Rot, &actor->Scale,
(Gfx*) LOAD_ASSET_RAW(actor->Model), 1.0f, Editor::GameObject::CollisionType::VTX_INTERSECT,
0.0f, (int32_t*) &actor->Type, 0);
} else {
gEditor.AddObject(actor->Name, (FVector*) &actor->Pos, (IRotator*)&actor->Rot, &actor->Scale, nullptr, 1.0f, Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, (int32_t*)&actor->Type, 0);
gEditor.AddObject(actor->Name, (FVector*) &actor->Pos, (IRotator*) &actor->Rot, &actor->Scale, nullptr, 1.0f,
Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, (int32_t*) &actor->Type, 0);
}
return Actors.back();
}
@ -139,9 +142,12 @@ struct Actor* World::AddBaseActor() {
void World::AddEditorObject(Actor* actor, const char* name) {
if (actor->model != NULL) {
gEditor.AddObject(name, (FVector*) &actor->pos, (IRotator*)&actor->rot, nullptr, (Gfx*)LOAD_ASSET_RAW(actor->model), 1.0f, Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, (int32_t*)&actor->type, 0);
gEditor.AddObject(name, (FVector*) &actor->pos, (IRotator*) &actor->rot, nullptr,
(Gfx*) LOAD_ASSET_RAW(actor->model), 1.0f, Editor::GameObject::CollisionType::VTX_INTERSECT,
0.0f, (int32_t*) &actor->type, 0);
} else {
gEditor.AddObject(name, (FVector*) &actor->pos, (IRotator*)&actor->rot, nullptr, nullptr, 1.0f, Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, (int32_t*)&actor->type, 0);
gEditor.AddObject(name, (FVector*) &actor->pos, (IRotator*) &actor->rot, nullptr, nullptr, 1.0f,
Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, (int32_t*) &actor->type, 0);
}
}
@ -152,7 +158,7 @@ AActor* World::ConvertActorToAActor(Actor* actor) {
// Move the ptr back so that it points at the vtable.
// Which is the initial item in the class, or in other words
// Point to the class.
return reinterpret_cast<AActor*>((char*)actor - sizeof(void*));
return reinterpret_cast<AActor*>((char*) actor - sizeof(void*));
}
/**
@ -161,7 +167,7 @@ AActor* World::ConvertActorToAActor(Actor* actor) {
Actor* World::ConvertAActorToActor(AActor* actor) {
// Move the ptr forward past the vtable.
// This allows C to access the class variables like a normal Actor* struct.
return reinterpret_cast<Actor*>((char*)actor + sizeof(void*));
return reinterpret_cast<Actor*>((char*) actor + sizeof(void*));
}
AActor* World::GetActor(size_t index) {
@ -177,16 +183,18 @@ void World::TickActors() {
}
}
StaticMeshActor* World::AddStaticMeshActor(std::string name, FVector pos, IRotator rot, FVector scale, std::string model, int32_t* collision) {
StaticMeshActor* World::AddStaticMeshActor(std::string name, FVector pos, IRotator rot, FVector scale,
std::string model, int32_t* collision) {
StaticMeshActors.push_back(new StaticMeshActor(name, pos, rot, scale, model, collision));
auto actor = StaticMeshActors.back();
auto gameObj = gEditor.AddObject(actor->Name.c_str(), &actor->Pos, &actor->Rot, &actor->Scale, (Gfx*) LOAD_ASSET_RAW(actor->Model.c_str()), 1.0f,
Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, (int32_t*) &actor->bPendingDestroy, (int32_t) true);
auto gameObj = gEditor.AddObject(
actor->Name.c_str(), &actor->Pos, &actor->Rot, &actor->Scale, (Gfx*) LOAD_ASSET_RAW(actor->Model.c_str()), 1.0f,
Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, (int32_t*) &actor->bPendingDestroy, (int32_t) true);
return actor;
}
void World::DrawStaticMeshActors() {
for (const auto& actor: StaticMeshActors) {
for (const auto& actor : StaticMeshActors) {
actor->Draw();
}
}
@ -194,10 +202,10 @@ void World::DrawStaticMeshActors() {
void World::DeleteStaticMeshActors() {
for (auto it = StaticMeshActors.begin(); it != StaticMeshActors.end();) {
if ((*it)->bPendingDestroy) {
delete *it; // Deallocate memory for the actor
it = StaticMeshActors.erase(it); // Remove the pointer from the vector
delete *it; // Deallocate memory for the actor
it = StaticMeshActors.erase(it); // Remove the pointer from the vector
} else {
++it; // Only increment the iterator if we didn't erase an element
++it; // Only increment the iterator if we didn't erase an element
}
}
}
@ -209,9 +217,13 @@ OObject* World::AddObject(OObject* object) {
Object* cObj = &gObjectList[object->_objectIndex];
if (cObj->model != NULL) {
gEditor.AddObject(object->Name, (FVector*) &cObj->origin_pos[0], (IRotator*)&cObj->orientation, nullptr, (Gfx*)LOAD_ASSET_RAW(cObj->model), 1.0f, Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, &object->_objectIndex, -1);
gEditor.AddObject(object->Name, (FVector*) &cObj->origin_pos[0], (IRotator*) &cObj->orientation, nullptr,
(Gfx*) LOAD_ASSET_RAW(cObj->model), 1.0f,
Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, &object->_objectIndex, -1);
} else {
gEditor.AddObject(object->Name, (FVector*) &cObj->origin_pos[0], (IRotator*)&cObj->orientation, nullptr, nullptr, 1.0f, Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f, &object->_objectIndex, -1);
gEditor.AddObject(object->Name, (FVector*) &cObj->origin_pos[0], (IRotator*) &cObj->orientation, nullptr,
nullptr, 1.0f, Editor::GameObject::CollisionType::VTX_INTERSECT, 0.0f,
&object->_objectIndex, -1);
}
}
@ -228,7 +240,7 @@ void World::TickObjects() {
// This is a fallback to support those objects. Probably don't use this.
void World::TickObjects60fps() {
for (const auto& object : Objects) {
object->Tick60fps();
object->Tick60fps();
}
}
@ -239,19 +251,19 @@ ParticleEmitter* World::AddEmitter(ParticleEmitter* emitter) {
void World::DrawObjects(s32 cameraId) {
for (const auto& object : Objects) {
object->Draw(cameraId);
object->Draw(cameraId);
}
}
void World::TickParticles() {
for (const auto& emitter : Emitters) {
emitter->Tick();
emitter->Tick();
}
}
void World::DrawParticles(s32 cameraId) {
for (const auto& emitter : Emitters) {
emitter->Draw(cameraId);
emitter->Draw(cameraId);
}
}
@ -263,8 +275,8 @@ void World::Reset() {
}
Object* World::GetObjectByIndex(size_t index) {
//if (index < this->Objects.size()) {
// Assuming GameActor::a is accessible, use reinterpret_cast if needed
// if (index < this->Objects.size()) {
// Assuming GameActor::a is accessible, use reinterpret_cast if needed
// return reinterpret_cast<Object*>(&this->Objects[index]->o);
//}
return nullptr; // Or handle the error as needed

View File

@ -48,7 +48,7 @@ class World {
std::vector<Mtx> Effects;
} Matrix;
public:
public:
explicit World();
void AddCourse(Course* course);
@ -63,7 +63,8 @@ public:
Actor* ConvertAActorToActor(AActor* actor);
void DrawStaticMeshActors();
StaticMeshActor* AddStaticMeshActor(std::string name, FVector pos, IRotator rot, FVector scale, std::string model, int32_t* collision);
StaticMeshActor* AddStaticMeshActor(std::string name, FVector pos, IRotator rot, FVector scale, std::string model,
int32_t* collision);
void DeleteStaticMeshActors();
OObject* AddObject(OObject* object);
@ -71,7 +72,7 @@ public:
void TickObjects();
void TickObjects60fps();
void DrawObjects(s32 cameraId);
Object *GetObjectByIndex(size_t);
Object* GetObjectByIndex(size_t);
void TickParticles();
void DrawParticles(s32 cameraId);
@ -89,7 +90,6 @@ public:
World* GetWorld(void);
void ClearWorld(void);
// These are only for browsing through the course list
void SetCourse(const char*);
void NextCourse(void);
@ -97,7 +97,6 @@ public:
Matrix Mtx;
Course* CurrentCourse;
Cup* CurrentCup;
@ -120,8 +119,7 @@ public:
// Holds all available courses
std::vector<Course*> Courses;
size_t CourseIndex = 0; // For browsing courses.
private:
private:
};
extern World gWorldInstance;

View File

@ -14,7 +14,7 @@ ABanana::ABanana(uint16_t playerId, const float pos[3], const s16 rot[3], const
Name = "Banana";
// Initialize the BananaActor's position, rotation, and velocity
std::copy(pos, pos + 3, Pos);
//std::copy(rot, rot + 3, this->a.rot);
// std::copy(rot, rot + 3, this->a.rot);
std::copy(velocity, velocity + 3, Velocity);
Type = 6; // ACTOR_BANANA
@ -23,8 +23,8 @@ ABanana::ABanana(uint16_t playerId, const float pos[3], const s16 rot[3], const
State = HELD_BANANA;
PlayerId = playerId;
//this->a.unk_08 = 0.0f;
// this->a.unk_08 = 0.0f;
Flags |= 0x4000 | 0x1000;
BoundingBoxSize = 2.0f;
@ -48,14 +48,16 @@ ABanana::ABanana(uint16_t playerId, const float pos[3], const s16 rot[3], const
Unk30.orientationVector[2] = 0.0f;
}
void ABanana::Tick() {
update_actor_banana((BananaActor*)this);
void ABanana::Tick() {
update_actor_banana((BananaActor*) this);
}
void ABanana::Draw(Camera *camera) {
render_actor_banana(camera, NULL, (BananaActor*)this);
void ABanana::Draw(Camera* camera) {
render_actor_banana(camera, NULL, (BananaActor*) this);
}
void ABanana::Collision(Player* player, AActor*) {
}
void ABanana::Destroy() {
}
void ABanana::Collision(Player* player, AActor*) { }
void ABanana::Destroy() { }
//void ABanana::Held() {}
// void ABanana::Held() {}

View File

@ -4,8 +4,7 @@
#include "engine/Actor.h"
class ABanana : public AActor {
public:
public:
uint16_t PlayerId;
// Constructor

View File

@ -19,7 +19,7 @@ ABowserStatue::ABowserStatue(FVector pos, ABowserStatue::Behaviour behaviour) {
}
void ABowserStatue::Tick() {
switch(_behaviour) {
switch (_behaviour) {
case DEFAULT:
break;
case CRUSH:
@ -27,7 +27,7 @@ void ABowserStatue::Tick() {
}
}
void ABowserStatue::Draw(Camera *camera) {
void ABowserStatue::Draw(Camera* camera) {
Mat4 mtx;
Vec3f pos;
pos[0] = Pos.x + 76;
@ -43,4 +43,6 @@ void ABowserStatue::Draw(Camera *camera) {
}
}
bool ABowserStatue::IsMod() { return true; }
bool ABowserStatue::IsMod() {
return true;
}

View File

@ -14,11 +14,8 @@ extern Vtx gBowserStatueVtx[717];
extern Gfx gBowserStatueGfx[162];
class ABowserStatue : public AActor {
public:
enum Behaviour {
DEFAULT,
CRUSH
};
public:
enum Behaviour { DEFAULT, CRUSH };
virtual ~ABowserStatue() = default;
explicit ABowserStatue(FVector pos, ABowserStatue::Behaviour behaviour);
@ -28,7 +25,8 @@ public:
virtual bool IsMod() override;
FVector Pos;
private:
private:
ABowserStatue::Behaviour _behaviour;
f32 scale;
};

View File

@ -15,15 +15,15 @@ extern f32 gKartGravityTable[];
}
ACloud::ACloud(FVector pos) {
Name = "Cloud";
Pos[0] = pos.x;
Pos[1] = pos.y;
Pos[2] = pos.z;
Rot[0] = 0;
Rot[1] = 0;
Rot[2] = 0;
Name = "Cloud";
Pos[0] = pos.x;
Pos[1] = pos.y;
Pos[2] = pos.z;
Rot[0] = 0;
Rot[1] = 0;
Rot[2] = 0;
//Flags = -0x8000 | 0x4000;
// Flags = -0x8000 | 0x4000;
BoundingBoxSize = 2.0f;
}
@ -48,7 +48,7 @@ void ACloud::Tick() {
extern Gfx cloud_mesh[];
void ACloud::Draw(Camera *camera) {
void ACloud::Draw(Camera* camera) {
Mat4 mtx;
if (PickedUp) {
@ -58,14 +58,14 @@ void ACloud::Draw(Camera *camera) {
mtxf_pos_rotation_xyz(mtx, Pos, Rot);
if (render_set_position(mtx, 0) != 0) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPDisplayList(gDisplayListHead++, (Gfx*)cloud_mesh);
gSPDisplayList(gDisplayListHead++, (Gfx*) cloud_mesh);
}
}
void ACloud::Collision(Player* player, AActor* actor) {
if (!PickedUp) {
if (query_collision_player_vs_actor_item(player, gWorldInstance.ConvertAActorToActor(actor))) {
// Player has picked up the actor, activate the cloud effect
// Player has picked up the actor, activate the cloud effect
_player = player;
PickedUp = true;
@ -77,61 +77,65 @@ void ACloud::Collision(Player* player, AActor* actor) {
}
}
bool ACloud::IsMod() { return true; }
bool ACloud::IsMod() {
return true;
}
Vtx cloud_mesh_vtx_cull[8] = {
{{ {0, -4, -4}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {0, -4, 4}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {0, 4, 4}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {0, 4, -4}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {0, -4, -4}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {0, -4, 4}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {0, 4, 4}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {0, 4, -4}, 0, {0, 0}, {0, 0, 0, 0} }},
{ { { 0, -4, -4 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } }, { { { 0, -4, 4 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } },
{ { { 0, 4, 4 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } }, { { { 0, 4, -4 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } },
{ { { 0, -4, -4 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } }, { { { 0, -4, 4 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } },
{ { { 0, 4, 4 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } }, { { { 0, 4, -4 }, 0, { 0, 0 }, { 0, 0, 0, 0 } } },
};
Vtx cloud_mesh_vtx_0[4] = {
{{ {0, 4, 4}, 0, {-524, -530}, {255, 255, 255, 166} }},
{{ {0, -4, 4}, 0, {-530, 1516}, {255, 255, 255, 201} }},
{{ {0, -4, -4}, 0, {1516, 1522}, {255, 255, 255, 188} }},
{{ {0, 4, -4}, 0, {1522, -524}, {255, 255, 255, 154} }},
{ { { 0, 4, 4 }, 0, { -524, -530 }, { 255, 255, 255, 166 } } },
{ { { 0, -4, 4 }, 0, { -530, 1516 }, { 255, 255, 255, 201 } } },
{ { { 0, -4, -4 }, 0, { 1516, 1522 }, { 255, 255, 255, 188 } } },
{ { { 0, 4, -4 }, 0, { 1522, -524 }, { 255, 255, 255, 154 } } },
};
Gfx cloud_mesh_tri_0[] = {
gsSPVertex(cloud_mesh_vtx_0 + 0, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSPEndDisplayList(),
gsSPVertex(cloud_mesh_vtx_0 + 0, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSPEndDisplayList(),
};
Gfx mat_cloud_cutout[] = {
gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_FOG | G_SHADING_SMOOTH),
gsSPClearGeometryMode(G_CULL_FRONT | G_CULL_BACK | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_CLIPPING),
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, PRIMITIVE, PRIMITIVE, TEXEL1, 0, 0, 0, TEXEL0, COMBINED, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED),
gsSPSetOtherMode(G_SETOTHERMODE_H, 4, 20, G_AD_NOISE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_2CYCLE | G_PM_NPRIMITIVE),
gsSPSetOtherMode(G_SETOTHERMODE_L, 0, 32, G_AC_NONE | G_ZS_PIXEL | G_RM_FOG_SHADE_A | G_RM_AA_ZB_TEX_EDGE2),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetPrimColor(0, 0, 255, 220, 203, 255),
gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 1, gTexture69C4E4),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(7, 0, 0, 511, 512),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 4, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 1, G_TX_WRAP | G_TX_NOMIRROR, 5, 1),
gsDPSetTileSize(0, 98, 100, 124, 124),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, gTexture66C8F4),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 128, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(6, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 128, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0),
gsDPSetTileSize(1, 0, 0, 124, 124),
gsSPEndDisplayList(),
gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_FOG | G_SHADING_SMOOTH),
gsSPClearGeometryMode(G_CULL_FRONT | G_CULL_BACK | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD |
G_CLIPPING),
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, PRIMITIVE, PRIMITIVE, TEXEL1, 0, 0, 0, TEXEL0, COMBINED, 0, PRIMITIVE, 0, 0, 0, 0,
COMBINED),
gsSPSetOtherMode(G_SETOTHERMODE_H, 4, 20,
G_AD_NOISE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
G_TD_CLAMP | G_TP_PERSP | G_CYC_2CYCLE | G_PM_NPRIMITIVE),
gsSPSetOtherMode(G_SETOTHERMODE_L, 0, 32, G_AC_NONE | G_ZS_PIXEL | G_RM_FOG_SHADE_A | G_RM_AA_ZB_TEX_EDGE2),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetPrimColor(0, 0, 255, 220, 203, 255),
gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 1, gTexture69C4E4),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0,
G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(7, 0, 0, 511, 512),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 4, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 1, G_TX_WRAP | G_TX_NOMIRROR, 5, 1),
gsDPSetTileSize(0, 98, 100, 124, 124),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, gTexture66C8F4),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 128, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0,
G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(6, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 128, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR,
5, 0),
gsDPSetTileSize(1, 0, 0, 124, 124),
gsSPEndDisplayList(),
};
Gfx cloud_mesh[] = {
//gsSPClearGeometryMode(G_LIGHTING),
//gsSPVertex(cloud_mesh_vtx_cull + 0, 8, 0),
gsSPSetGeometryMode(G_LIGHTING),
//gsSPCullDisplayList(0, 7),
gsSPDisplayList(mat_cloud_cutout),
gsSPDisplayList(cloud_mesh_tri_0),
gsSPEndDisplayList(),
// gsSPClearGeometryMode(G_LIGHTING),
// gsSPVertex(cloud_mesh_vtx_cull + 0, 8, 0),
gsSPSetGeometryMode(G_LIGHTING),
// gsSPCullDisplayList(0, 7),
gsSPDisplayList(mat_cloud_cutout),
gsSPDisplayList(cloud_mesh_tri_0),
gsSPEndDisplayList(),
};

View File

@ -12,9 +12,7 @@ extern "C" {
}
class ACloud : public AActor {
public:
public:
// Constructor
ACloud(FVector pos);
@ -28,13 +26,12 @@ public:
bool PickedUp = false;
uint32_t Timer = 0;
Player* _player = NULL;
f32 Hop = 3.0f;
f32 Gravity = 200.0f;
f32 OldHop = 0;
f32 OldGravity = 0;
};

View File

@ -41,14 +41,14 @@ AFinishline::AFinishline(std::optional<FVector> pos) {
BoundingBoxSize = 0.0f;
}
void AFinishline::Tick() {}
void AFinishline::Tick() {
}
void AFinishline::Draw(Camera *camera) {
void AFinishline::Draw(Camera* camera) {
Mat4 mtx;
s16 temp = Pos[2];
s32 maxObjectsReached;
if (gGamestate == CREDITS_SEQUENCE) {
return;
}
@ -64,18 +64,21 @@ void AFinishline::Draw(Camera *camera) {
if (D_800DC5BC != 0) {
gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D001C20);
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D001C20);
} else {
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D001B90);
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D001B90);
}
} else if (D_800DC5BC != 0) {
gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D001C88);
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D001C88);
} else {
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D001BD8);
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D001BD8);
}
}
void AFinishline::Collision(Player* player, AActor* actor) {}
void AFinishline::Collision(Player* player, AActor* actor) {
}
bool AFinishline::IsMod() { return true; }
bool AFinishline::IsMod() {
return true;
}

View File

@ -12,7 +12,7 @@ extern "C" {
}
class AFinishline : public AActor {
public:
public:
/**
* Default behaviour places the finishline at the first waypoint.
* @arg pos, optional. Sets a custom position
@ -29,13 +29,12 @@ public:
bool PickedUp = false;
uint32_t Timer = 0;
Player* _player = NULL;
f32 Hop = 3.0f;
f32 Gravity = 200.0f;
f32 OldHop = 0;
f32 OldGravity = 0;
};

View File

@ -33,7 +33,7 @@ void AMarioSign::Tick() {
}
}
void AMarioSign::Draw(Camera *camera) {
void AMarioSign::Draw(Camera* camera) {
Mat4 sp40;
f32 unk;
@ -50,7 +50,7 @@ void AMarioSign::Draw(Camera *camera) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
mtxf_pos_rotation_xyz(sp40, Pos, Rot);
if (render_set_position(sp40, 0) != 0) {
gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_mario_raceway_dl_sign);
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_mario_raceway_dl_sign);
}
}
}

View File

@ -9,8 +9,7 @@ extern "C" {
}
class AMarioSign : public AActor {
public:
public:
virtual ~AMarioSign() = default;
explicit AMarioSign(FVector pos);

View File

@ -20,8 +20,8 @@ AShip::AShip(FVector pos, AShip::Skin skin) {
Pos[1] = pos.y;
Pos[2] = pos.z;
Scale = FVector(0.4, 0.4, 0.4);
switch(skin) {
switch (skin) {
case GHOSTSHIP:
Name = "Ghostship";
_skin = ghostship_Plane_mesh;
@ -53,4 +53,6 @@ void AShip::Tick() {
// Rot.yaw = -static_cast<int16_t>(angle * (32768.0f / M_PI / 2.0f));
}
bool AShip::IsMod() { return true; }
bool AShip::IsMod() {
return true;
}

View File

@ -11,8 +11,7 @@ extern "C" {
}
class AShip : public AActor {
public:
public:
enum Skin {
GHOSTSHIP,
SHIP2,
@ -26,9 +25,9 @@ public:
virtual bool IsMod() override;
FVector Spawn;
//FVector Pos;
///IRotator Rot = {0, 0, 0};
//FVector Scale = {0.4, 0.4, 0.4};
private:
// FVector Pos;
/// IRotator Rot = {0, 0, 0};
// FVector Scale = {0.4, 0.4, 0.4};
private:
Gfx* _skin;
};

View File

@ -17,12 +17,12 @@ ASpaghettiShip::ASpaghettiShip(FVector pos) {
Pos[2] = pos.z;
Spawn = pos;
Spawn.y += 10;
Scale = {0.4, 0.4, 0.4};
Scale = { 0.4, 0.4, 0.4 };
}
void ASpaghettiShip::Tick() {
static float angle = 0.0f; // Keeps track of the ship's rotation around the circle
float radius = 150.0f; // The radius of the circular path
float radius = 150.0f; // The radius of the circular path
float speed = 0.01f; // Speed of rotation
angle += speed; // Increment the angle to move in a circle
@ -37,22 +37,22 @@ void ASpaghettiShip::Tick() {
WheelRot.pitch += 500;
}
void ASpaghettiShip::Draw(Camera *camera) {
void ASpaghettiShip::Draw(Camera* camera) {
Mat4 shipMtx;
Mat4 objectMtx;
Mat4 resultMtx;
Vec3f hullPos = {Pos[0], Pos[1], Pos[2]};
Vec3s hullRot = {Rot[0], Rot[1], Rot[2]};
Vec3s rot = {WheelRot.pitch, WheelRot.yaw, WheelRot.roll};
Vec3f hullPos = { Pos[0], Pos[1], Pos[2] };
Vec3s hullRot = { Rot[0], Rot[1], Rot[2] };
Vec3s rot = { WheelRot.pitch, WheelRot.yaw, WheelRot.roll };
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
ApplyMatrixTransformations(shipMtx, *(FVector*)Pos, *(IRotator*)Rot, Scale);
ApplyMatrixTransformations(shipMtx, *(FVector*) Pos, *(IRotator*) Rot, Scale);
if (render_set_position(shipMtx, 0) != 0) {}
// Render the ships hull
ApplyMatrixTransformations(objectMtx, {0, 0, 0}, {0, 0, 0}, {1, 1, 1});
ApplyMatrixTransformations(objectMtx, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 1, 1 });
mtxf_multiplication(resultMtx, shipMtx, objectMtx);
if (render_set_position(resultMtx, 3) != 0) {
gSPDisplayList(gDisplayListHead++, ship1_spag1_mesh);
@ -67,10 +67,10 @@ void ASpaghettiShip::Draw(Camera *camera) {
gSPDisplayList(gDisplayListHead++, wheels_Spaghetti_002_mesh);
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
}
// Back tyre
AddLocalRotation(shipMtx, WheelRot);
ApplyMatrixTransformations(objectMtx, FVector(0, 0, -165), {0, 0, 0}, {1, 1, 1});
ApplyMatrixTransformations(objectMtx, FVector(0, 0, -165), { 0, 0, 0 }, { 1, 1, 1 });
mtxf_multiplication(resultMtx, shipMtx, objectMtx);
if (render_set_position(resultMtx, 3) != 0) {
gSPDisplayList(gDisplayListHead++, wheels_Spaghetti_002_mesh);
@ -78,4 +78,6 @@ void ASpaghettiShip::Draw(Camera *camera) {
}
}
bool ASpaghettiShip::IsMod() { return true; }
bool ASpaghettiShip::IsMod() {
return true;
}

View File

@ -11,7 +11,7 @@ extern "C" {
}
class ASpaghettiShip : public AActor {
public:
public:
explicit ASpaghettiShip(FVector pos);
virtual ~ASpaghettiShip() = default;
@ -20,5 +20,5 @@ public:
virtual bool IsMod() override;
FVector Spawn;
IRotator WheelRot = {0, 0, 0};
IRotator WheelRot = { 0, 0, 0 };
};

View File

@ -33,10 +33,12 @@ void AStarship::Tick() {
SetLocation(pos);
// Keep y from changing (or adjust it if necessary)
//Pos.y = Spawn.y;
// Pos.y = Spawn.y;
// Rotate to face forward along the circle
Rot[1] = angle * (180.0f / M_PI) + 90.0f;
}
bool AStarship::IsMod() { return true; }
bool AStarship::IsMod() {
return true;
}

View File

@ -11,7 +11,7 @@ extern "C" {
}
class AStarship : public AActor {
public:
public:
explicit AStarship(FVector pos);
virtual ~AStarship() = default;

View File

@ -37,13 +37,12 @@ void ATree::Draw(Camera* camera) {
return;
}
dist = is_within_render_distance(camera->pos, Pos, camera->rot[1], 0, gCameraZoom[camera - camera1],
DrawDistance);
dist = is_within_render_distance(camera->pos, Pos, camera->rot[1], 0, gCameraZoom[camera - camera1], DrawDistance);
if (CVarGetInteger("gNoCulling", 0) == 1) {
dist = MAX(dist, 0.0f);
}
if (dist < 0.0f) {
return;
}
@ -63,5 +62,7 @@ void ATree::Draw(Camera* camera) {
}
}
void ATree::Collision(Player* player, AActor*) { }
void ATree::Destroy() { }
void ATree::Collision(Player* player, AActor*) {
}
void ATree::Destroy() {
}

View File

@ -7,13 +7,11 @@ extern "C" {
#include "common_structs.h"
}
// Note that this doesn't seem to work right
// Use add_actor_to_empty_slot(test, rot, vel, ACTOR_TREE_MARIO_RACEWAY);
// to spawn stock actors
class ATree : public AActor {
public:
public:
Gfx* Displaylist;
const char* Tlut;
f32 DrawDistance;

View File

@ -22,7 +22,7 @@ void AWarioSign::Tick() {
Rot[1] += 0xB6;
}
void AWarioSign::Draw(Camera *camera) {
void AWarioSign::Draw(Camera* camera) {
Mat4 sp38;
f32 unk =
is_within_render_distance(camera->pos, Pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 16000000.0f);
@ -37,7 +37,7 @@ void AWarioSign::Draw(Camera *camera) {
mtxf_pos_rotation_xyz(sp38, Pos, Rot);
if (render_set_position(sp38, 0) != 0) {
gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_wario_stadium_dl_sign);
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_wario_stadium_dl_sign);
}
}
}

View File

@ -9,8 +9,7 @@ extern "C" {
}
class AWarioSign : public AActor {
public:
public:
virtual ~AWarioSign() = default;
explicit AWarioSign(FVector pos);

View File

@ -15,28 +15,28 @@
#include "assets/boo_frames.h"
extern "C" {
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "memory.h"
#include "course_offsets.h"
#include "course.h"
extern const char *banshee_boardwalk_dls[];
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "memory.h"
#include "course_offsets.h"
#include "course.h"
extern const char* banshee_boardwalk_dls[];
}
const course_texture banshee_boardwalk_textures[] = {
@ -95,7 +95,7 @@ BansheeBoardwalk::BansheeBoardwalk() {
Props.NearPersp = 2.0f;
Props.FarPersp = 2700.0f;
Props.PathSizes = {0x2EE, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
Props.PathSizes = { 0x2EE, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@ -117,12 +117,12 @@ BansheeBoardwalk::BansheeBoardwalk() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_unknown_waypoints);
Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_waypoints);
Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@ -130,14 +130,14 @@ BansheeBoardwalk::BansheeBoardwalk() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
Props.Skybox.TopRight = {0, 0, 0};
Props.Skybox.BottomRight = {0, 0, 0};
Props.Skybox.BottomLeft = {0, 0, 0};
Props.Skybox.TopLeft = {0, 0, 0};
Props.Skybox.FloorTopRight = {0, 0, 0};
Props.Skybox.FloorBottomRight = {0, 0, 0};
Props.Skybox.FloorBottomLeft = {0, 0, 0};
Props.Skybox.FloorTopLeft = {0, 0, 0};
Props.Skybox.TopRight = { 0, 0, 0 };
Props.Skybox.BottomRight = { 0, 0, 0 };
Props.Skybox.BottomLeft = { 0, 0, 0 };
Props.Skybox.TopLeft = { 0, 0, 0 };
Props.Skybox.FloorTopRight = { 0, 0, 0 };
Props.Skybox.FloorBottomRight = { 0, 0, 0 };
Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
Props.Skybox.FloorTopLeft = { 0, 0, 0 };
Props.Sequence = MusicSeq::MUSIC_SEQ_BANSHEE_BOARDWALK;
Props.WaterLevel = -80.0f;
@ -150,19 +150,19 @@ void BansheeBoardwalk::Load() {
D_801625EC = 0;
D_801625F4 = 0;
D_801625F0 = 0;
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_sections));
parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_sections));
func_80295C6C();
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000878), 128, 0, 0, 0);
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000878), 128, 0, 0, 0);
}
void BansheeBoardwalk::LoadTextures() {
}
void BansheeBoardwalk::BeginPlay() {
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_item_box_spawns));
spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_item_box_spawns));
gWorldInstance.AddObject(new OCheepCheep(FVector(xOrientation * -1650.0, -200.0f, -1650.0f), OCheepCheep::CheepType::RACE, IPathSpan(160, 170)));
gWorldInstance.AddObject(new OCheepCheep(FVector(xOrientation * -1650.0, -200.0f, -1650.0f),
OCheepCheep::CheepType::RACE, IPathSpan(160, 170)));
OTrashBin::Behaviour bhv;
if (gModeSelection == TIME_TRIALS) {
@ -178,7 +178,7 @@ void BansheeBoardwalk::BeginPlay() {
}
if ((gGamestate != CREDITS_SEQUENCE) && (gModeSelection != TIME_TRIALS)) {
gWorldInstance.AddObject(new OBat(FVector(0,0,0), IRotator(0, 0, 90)));
gWorldInstance.AddObject(new OBat(FVector(0, 0, 0), IRotator(0, 0, 90)));
gWorldInstance.AddObject(new OBoos(5, IPathSpan(180, 190), IPathSpan(200, 210), IPathSpan(280, 290)));
gWorldInstance.AddObject(new OBoos(5, IPathSpan(490, 500), IPathSpan(510, 520), IPathSpan(620, 630)));
}
@ -207,16 +207,16 @@ void BansheeBoardwalk::UpdateCourseObjects() {
if (gGamestate != CREDITS_SEQUENCE) {
func_8007E4C4();
if (gModeSelection != TIME_TRIALS) {
//update_bat();
// update_bat();
}
//wrapper_update_boos();
// wrapper_update_boos();
}
}
void BansheeBoardwalk::RenderCourseObjects(s32 cameraId) {
if (gGamestate != CREDITS_SEQUENCE) {
//render_object_bat(cameraId);
//render_object_boos(cameraId);
// render_object_bat(cameraId);
// render_object_boos(cameraId);
}
}
@ -224,8 +224,7 @@ void BansheeBoardwalk::SomeSounds() {
}
void BansheeBoardwalk::WhatDoesThisDo(Player* player, int8_t playerId) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) &&
((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x41);
}
@ -239,8 +238,7 @@ void BansheeBoardwalk::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void BansheeBoardwalk::WhatDoesThisDoAI(Player* player, int8_t playerId) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) &&
((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x41);
}
@ -308,12 +306,12 @@ void BansheeBoardwalk::Render(struct UnkStruct_800DC5EC* arg0) {
mtxf_translate(spCC, spA8);
render_set_position(spCC, 0);
gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_banshee_boardwalk_dl_B278);
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_banshee_boardwalk_dl_B278);
gDPPipeSync(gDisplayListHead++);
}
void BansheeBoardwalk::RenderCredits() {
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_banshee_boardwalk_dl_B308));
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_banshee_boardwalk_dl_B308));
}
void BansheeBoardwalk::ScrollingTextures() {
@ -337,7 +335,8 @@ void BansheeBoardwalk::Waypoints(Player* player, int8_t playerId) {
}
}
void BansheeBoardwalk::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
void BansheeBoardwalk::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
uint16_t playerDirection) {
gDPPipeSync(gDisplayListHead++);
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
@ -345,13 +344,14 @@ void BansheeBoardwalk::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pat
gDPSetBlendMask(gDisplayListHead++, 0xFF);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
// d_course_banshee_boardwalk_packed_dl_878
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07000878));
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07000878));
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
gDPPipeSync(gDisplayListHead++);
}
void BansheeBoardwalk::CreditsSpawnActors() {
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000878), 0x32, 0, 0, 0);
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000878), 0x32, 0, 0, 0);
}
void BansheeBoardwalk::Destroy() { }
void BansheeBoardwalk::Destroy() {
}

View File

@ -4,30 +4,30 @@
#include "Course.h"
extern "C" {
#include "assets/banshee_boardwalk_vertices.h"
#include "assets/banshee_boardwalk_displaylists.h"
#include "assets/banshee_boardwalk_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture banshee_boardwalk_textures[];
#include "assets/banshee_boardwalk_vertices.h"
#include "assets/banshee_boardwalk_displaylists.h"
#include "assets/banshee_boardwalk_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture banshee_boardwalk_textures[];
}
class BansheeBoardwalk : public Course {
public:
virtual ~BansheeBoardwalk() = default; // Virtual destructor for proper cleanup in derived classes
public:
virtual ~BansheeBoardwalk() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit BansheeBoardwalk();
// virtual void Load(const char* courseVtx,
// course_texture* textures, const char* displaylists, size_t dlSize);
// virtual void Load(const char* courseVtx,
// course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
//virtual void InitClouds() override;
// virtual void InitClouds() override;
virtual void InitCourseObjects() override;
virtual void UpdateCourseObjects() override;
virtual void RenderCourseObjects(s32 cameraId) override;
@ -35,10 +35,11 @@ public:
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
virtual void RenderCredits() override;
virtual void RenderCredits() override;
virtual void ScrollingTextures() override;
virtual void Waypoints(Player*, int8_t) override;
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
uint16_t playerDirection) override;
virtual void CreditsSpawnActors() override;
virtual void Destroy() override;
};

View File

@ -9,27 +9,27 @@
#include "assets/big_donut_data.h"
extern "C" {
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "memory.h"
extern const char *big_donut_dls[];
extern s16 currentScreenSection;
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "memory.h"
extern const char* big_donut_dls[];
extern s16 currentScreenSection;
}
const course_texture big_donut_textures[] = {
@ -63,7 +63,7 @@ BigDonut::BigDonut() {
Props.AIMinimumSeparation = 0.5f;
Props.AISteeringSensitivity = 40;
Props.PathSizes = {1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
Props.PathSizes = { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@ -98,14 +98,14 @@ BigDonut::BigDonut() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
Props.Skybox.TopRight = {0, 0, 0};
Props.Skybox.BottomRight = {0, 0, 0};
Props.Skybox.BottomLeft = {0, 0, 0};
Props.Skybox.TopLeft = {0, 0, 0};
Props.Skybox.FloorTopRight = {0, 0, 0};
Props.Skybox.FloorBottomRight = {0, 0, 0};
Props.Skybox.FloorBottomLeft = {0, 0, 0};
Props.Skybox.FloorTopLeft = {0, 0, 0};
Props.Skybox.TopRight = { 0, 0, 0 };
Props.Skybox.BottomRight = { 0, 0, 0 };
Props.Skybox.BottomLeft = { 0, 0, 0 };
Props.Skybox.TopLeft = { 0, 0, 0 };
Props.Skybox.FloorTopRight = { 0, 0, 0 };
Props.Skybox.FloorBottomRight = { 0, 0, 0 };
Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
Props.Skybox.FloorTopLeft = { 0, 0, 0 };
Props.Sequence = MusicSeq::MUSIC_SEQ_BATTLE_ARENAS;
Props.WaterLevel = 100.0f;
@ -115,23 +115,23 @@ void BigDonut::Load() {
Course::Load();
// d_course_big_donut_packed_dl_1018
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07001018), 6);
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07001018), 6);
// d_course_big_donut_packed_dl_450
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000450), 6);
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000450), 6);
// d_course_big_donut_packed_dl_AC0
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000AC0), 6);
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000AC0), 6);
// d_course_big_donut_packed_dl_B58
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000B58), 6);
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000B58), 6);
// d_course_big_donut_packed_dl_230
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000230), 6);
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000230), 6);
func_80295C6C();
}
void BigDonut::BeginPlay() {
spawn_all_item_boxes((ActorSpawnData*)LOAD_ASSET_RAW(d_course_big_donut_item_box_spawns));
spawn_all_item_boxes((ActorSpawnData*) LOAD_ASSET_RAW(d_course_big_donut_item_box_spawns));
if (gModeSelection == VERSUS) {
FVector pos = {0, 0, 0};
FVector pos = { 0, 0, 0 };
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][20], 20, 0, 1.0f));
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][40], 40, 0, 1.0f));
@ -154,22 +154,24 @@ void BigDonut::Render(struct UnkStruct_800DC5EC* arg0) {
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
// d_course_big_donut_packed_dl_DE8
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000DE8)));
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000DE8)));
}
// d_course_big_donut_packed_dl_450
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000450)));
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000450)));
// d_course_big_donut_packed_dl_AC0
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000AC0)));
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000AC0)));
// d_course_big_donut_packed_dl_D20
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000D20)));
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000D20)));
// d_course_big_donut_packed_dl_230
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000230)));
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000230)));
}
void BigDonut::RenderCredits() {}
void BigDonut::RenderCredits() {
}
void BigDonut::Waypoints(Player* player, int8_t playerId) {
player->nearestWaypointId = 0;
}
void BigDonut::Destroy() { }
void BigDonut::Destroy() {
}

View File

@ -4,19 +4,19 @@
#include "Course.h"
extern "C" {
#include "assets/big_donut_vertices.h"
#include "assets/big_donut_displaylists.h"
#include "assets/big_donut_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture big_donut_textures[];
#include "assets/big_donut_vertices.h"
#include "assets/big_donut_displaylists.h"
#include "assets/big_donut_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture big_donut_textures[];
}
class BigDonut : public Course {
public:
public:
virtual ~BigDonut() = default;
explicit BigDonut();
@ -24,7 +24,7 @@ public:
virtual void Load() override;
virtual void BeginPlay() override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
virtual void RenderCredits() override;
virtual void RenderCredits() override;
virtual void Waypoints(Player* player, int8_t playerId) override;
virtual void Destroy() override;
};

View File

@ -9,28 +9,28 @@
#include "assets/block_fort_data.h"
extern "C" {
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "memory.h"
#include "course_offsets.h"
extern const char *block_fort_dls[];
extern s16 currentScreenSection;
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "memory.h"
#include "course_offsets.h"
extern const char* block_fort_dls[];
extern s16 currentScreenSection;
}
const course_texture block_fort_textures[] = {
@ -68,7 +68,7 @@ BlockFort::BlockFort() {
Props.NearPersp = 2.0f;
Props.FarPersp = 2700.0f;
Props.PathSizes = {1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
Props.PathSizes = { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@ -103,27 +103,27 @@ BlockFort::BlockFort() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
Props.Skybox.TopRight = {128, 184, 248};
Props.Skybox.BottomRight = {216, 232, 248};
Props.Skybox.BottomLeft = {216, 232, 248};
Props.Skybox.TopLeft = {128, 184, 248};
Props.Skybox.FloorTopRight = {216, 232, 248};
Props.Skybox.FloorBottomRight = {0, 0, 0};
Props.Skybox.FloorBottomLeft = {0, 0, 0};
Props.Skybox.FloorTopLeft = {216, 232, 248};
Props.Skybox.TopRight = { 128, 184, 248 };
Props.Skybox.BottomRight = { 216, 232, 248 };
Props.Skybox.BottomLeft = { 216, 232, 248 };
Props.Skybox.TopLeft = { 128, 184, 248 };
Props.Skybox.FloorTopRight = { 216, 232, 248 };
Props.Skybox.FloorBottomRight = { 0, 0, 0 };
Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
Props.Skybox.FloorTopLeft = { 216, 232, 248 };
Props.Sequence = MusicSeq::MUSIC_SEQ_CHOCO_MOUNTAIN;
}
void BlockFort::Load() {
Course::Load();
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x070015C0), 1);
generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x070015C0), 1);
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
void BlockFort::BeginPlay() {
spawn_all_item_boxes((ActorSpawnData*)LOAD_ASSET_RAW(d_course_block_fort_item_box_spawns));
spawn_all_item_boxes((ActorSpawnData*) LOAD_ASSET_RAW(d_course_block_fort_item_box_spawns));
if (gModeSelection == VERSUS) {
FVector pos = { 0, 0, 0 };
@ -144,7 +144,7 @@ void BlockFort::Render(struct UnkStruct_800DC5EC* arg0) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
// d_course_block_fort_packed_dl_15C0
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x070015C0)));
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x070015C0)));
}
void BlockFort::Waypoints(Player* player, int8_t playerId) {

View File

@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
#include "assets/block_fort_vertices.h"
#include "assets/block_fort_displaylists.h"
#include "assets/block_fort_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture block_fort_textures[];
#include "assets/block_fort_vertices.h"
#include "assets/block_fort_displaylists.h"
#include "assets/block_fort_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture block_fort_textures[];
}
class BlockFort : public Course {
public:
virtual ~BlockFort() = default; // Virtual destructor for proper cleanup in derived classes
public:
virtual ~BlockFort() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit BlockFort();
// virtual void Load(const char* courseVtx,
// course_texture* textures, const char* displaylists, size_t dlSize);
// virtual void Load(const char* courseVtx,
// course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void BeginPlay() override;
virtual void Render(struct UnkStruct_800DC5EC*) override;

View File

@ -11,28 +11,28 @@
#include "bowsers_castle_data.h"
extern "C" {
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "code_8003DC40.h"
#include "memory.h"
#include "course.h"
extern const char *bowsers_castle_dls[];
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "code_8003DC40.h"
#include "memory.h"
#include "course.h"
extern const char* bowsers_castle_dls[];
}
const course_texture bowsers_castle_textures[] = {
@ -97,7 +97,7 @@ BowsersCastle::BowsersCastle() {
Props.NearPersp = 2.0f;
Props.FarPersp = 2700.0f;
Props.PathSizes = {0x30C, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
Props.PathSizes = { 0x30C, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@ -119,12 +119,12 @@ BowsersCastle::BowsersCastle() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_bowsers_castle_unknown_waypoints);
Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_bowsers_castle_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_bowsers_castle_track_waypoints);
Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_bowsers_castle_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@ -132,24 +132,24 @@ BowsersCastle::BowsersCastle() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
Props.Skybox.TopRight = {48, 8, 120};
Props.Skybox.BottomRight = {0, 0, 0};
Props.Skybox.BottomLeft = {0, 0, 0};
Props.Skybox.TopLeft = {48, 8, 120};
Props.Skybox.FloorTopRight = {0, 0, 0};
Props.Skybox.FloorBottomRight = {0, 0, 0};
Props.Skybox.FloorBottomLeft = {0, 0, 0};
Props.Skybox.FloorTopLeft = {0, 0, 0};
Props.Skybox.TopRight = { 48, 8, 120 };
Props.Skybox.BottomRight = { 0, 0, 0 };
Props.Skybox.BottomLeft = { 0, 0, 0 };
Props.Skybox.TopLeft = { 48, 8, 120 };
Props.Skybox.FloorTopRight = { 0, 0, 0 };
Props.Skybox.FloorBottomRight = { 0, 0, 0 };
Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
Props.Skybox.FloorTopLeft = { 0, 0, 0 };
Props.Sequence = MusicSeq::MUSIC_SEQ_BOWSERS_CASTLE;
Props.WaterLevel = -50.0f;
WaterVolumes.push_back({20.0f, 1549.0f, 1859.0f, -1402.0f, -1102.0f});
WaterVolumes.push_back({ 20.0f, 1549.0f, 1859.0f, -1402.0f, -1102.0f });
}
void BowsersCastle::Load() {
Course::Load();
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_bowsers_castle_addr));
parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_bowsers_castle_addr));
func_80295C6C();
find_vtx_and_set_colours(segmented_gfx_to_virtual(reinterpret_cast<void*>(0x07001350)), 0x32, 0, 0, 0);
}
@ -176,8 +176,8 @@ void BowsersCastle::SpawnStockThwomp() {
}
void BowsersCastle::BeginPlay() {
spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_bowsers_castle_tree_spawn));
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_bowsers_castle_item_box_spawns));
spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_bowsers_castle_tree_spawn));
spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_bowsers_castle_item_box_spawns));
switch (gCCSelection) {
case CC_100:
@ -268,7 +268,7 @@ void BowsersCastle::UpdateCourseObjects() {
}
void BowsersCastle::RenderCourseObjects(s32 cameraId) {
//render_object_thwomps(cameraId);
// render_object_thwomps(cameraId);
render_object_bowser_flame(cameraId);
}
@ -276,8 +276,7 @@ void BowsersCastle::SomeSounds() {
}
void BowsersCastle::WhatDoesThisDo(Player* player, int8_t playerId) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x29) &&
((s16) gNearestWaypointByPlayerId[playerId] < 0x1D2)) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x29) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1D2)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x41);
}
@ -291,8 +290,7 @@ void BowsersCastle::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void BowsersCastle::WhatDoesThisDoAI(Player* player, int8_t playerId) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x29) &&
((s16) gNearestWaypointByPlayerId[playerId] < 0x1D2)) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x29) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1D2)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x41);
}
@ -333,10 +331,11 @@ void BowsersCastle::Render(struct UnkStruct_800DC5EC* arg0) {
}
void BowsersCastle::RenderCredits() {
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_bowsers_castle_dl_9148));
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_bowsers_castle_dl_9148));
}
void BowsersCastle::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
void BowsersCastle::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5,
f32* arg6, f32* arg7) {
func_8003E6EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
@ -354,7 +353,8 @@ void BowsersCastle::Waypoints(Player* player, int8_t playerId) {
}
}
void BowsersCastle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
void BowsersCastle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
uint16_t playerDirection) {
if (gActiveScreenMode != SCREEN_MODE_1P) {
return;
}
@ -372,11 +372,12 @@ void BowsersCastle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCo
return;
}
}
gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_bowsers_castle_dl_9228);
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_bowsers_castle_dl_9228);
}
void BowsersCastle::CreditsSpawnActors() {
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07001350), 0x32, 0, 0, 0);
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07001350), 0x32, 0, 0, 0);
}
void BowsersCastle::Destroy() { }
void BowsersCastle::Destroy() {
}

View File

@ -4,31 +4,31 @@
#include "Course.h"
extern "C" {
#include "assets/bowsers_castle_vertices.h"
#include "assets/bowsers_castle_displaylists.h"
#include "assets/bowsers_castle_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture bowsers_castle_textures[];
#include "assets/bowsers_castle_vertices.h"
#include "assets/bowsers_castle_displaylists.h"
#include "assets/bowsers_castle_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture bowsers_castle_textures[];
}
class BowsersCastle : public Course {
public:
virtual ~BowsersCastle() = default; // Virtual destructor for proper cleanup in derived classes
public:
virtual ~BowsersCastle() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit BowsersCastle();
// virtual void Load(const char* courseVtx,
// course_texture* textures, const char* displaylists, size_t dlSize);
// virtual void Load(const char* courseVtx,
// course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
void SpawnStockThwomp();
virtual void BeginPlay() override;
//virtual void InitClouds() override;
// virtual void InitClouds() override;
virtual void InitCourseObjects() override;
virtual void UpdateCourseObjects() override;
virtual void RenderCourseObjects(s32 cameraId) override;
@ -37,9 +37,11 @@ public:
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
virtual void RenderCredits() override;
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
f32* arg7) override;
virtual void Waypoints(Player*, int8_t) override;
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection);
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
uint16_t playerDirection);
virtual void CreditsSpawnActors() override;
virtual void Destroy() override;
};

View File

@ -10,29 +10,29 @@
#include "engine/actors/Finishline.h"
extern "C" {
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "code_8003DC40.h"
#include "memory.h"
#include "course_offsets.h"
#include "course.h"
extern const char *choco_mountain_dls[];
#include "main.h"
#include "camera.h"
#include "course_offsets.h"
#include "code_800029B0.h"
#include "render_courses.h"
#include "code_8006E9C0.h"
#include "code_80057C60.h"
#include "defines.h"
#include "math_util.h"
#include "external.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
#include "render_objects.h"
#include "assets/common_data.h"
#include "save.h"
#include "staff_ghosts.h"
#include "actors.h"
#include "collision.h"
#include "code_8003DC40.h"
#include "memory.h"
#include "course_offsets.h"
#include "course.h"
extern const char* choco_mountain_dls[];
}
const course_texture choco_mountain_textures[] = {
@ -88,7 +88,7 @@ ChocoMountain::ChocoMountain() {
Props.NearPersp = 2.0f;
Props.FarPersp = 1500.0f;
Props.PathSizes = {0x2BC, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
Props.PathSizes = { 0x2BC, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@ -110,12 +110,12 @@ ChocoMountain::ChocoMountain() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_choco_mountain_unknown_waypoints);
Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_choco_mountain_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_choco_mountain_track_waypoints);
Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_choco_mountain_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@ -123,14 +123,14 @@ ChocoMountain::ChocoMountain() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
Props.Skybox.TopRight = {255, 255, 255};
Props.Skybox.BottomRight = {255, 255, 255};
Props.Skybox.BottomLeft = {255, 255, 255};
Props.Skybox.TopLeft = {255, 255, 255};
Props.Skybox.FloorTopRight = {255, 255, 255};
Props.Skybox.FloorBottomRight = {255, 255, 255};
Props.Skybox.FloorBottomLeft = {255, 255, 255};
Props.Skybox.FloorTopLeft = {255, 255, 255};
Props.Skybox.TopRight = { 255, 255, 255 };
Props.Skybox.BottomRight = { 255, 255, 255 };
Props.Skybox.BottomLeft = { 255, 255, 255 };
Props.Skybox.TopLeft = { 255, 255, 255 };
Props.Skybox.FloorTopRight = { 255, 255, 255 };
Props.Skybox.FloorBottomRight = { 255, 255, 255 };
Props.Skybox.FloorBottomLeft = { 255, 255, 255 };
Props.Skybox.FloorTopLeft = { 255, 255, 255 };
Props.Sequence = MusicSeq::MUSIC_SEQ_CHOCO_MOUNTAIN;
Props.WaterLevel = -80.0f;
@ -163,7 +163,7 @@ void ChocoMountain::Load() {
nullify_displaylist((uintptr_t) segmented_gfx_to_virtual(reinterpret_cast<void*>(0x070003C8)));
}
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_choco_mountain_addr));
parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_choco_mountain_addr));
func_802B5CAC(0x238E, 0x31C7, D_8015F590);
func_80295C6C();
}
@ -172,8 +172,9 @@ void ChocoMountain::LoadTextures() {
}
void ChocoMountain::BeginPlay() {
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_choco_mountain_item_box_spawns));
spawn_falling_rocks((struct ActorSpawnData*)LOAD_ASSET_RAW((const char*)d_course_choco_mountain_falling_rock_spawns));
spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_choco_mountain_item_box_spawns));
spawn_falling_rocks(
(struct ActorSpawnData*) LOAD_ASSET_RAW((const char*) d_course_choco_mountain_falling_rock_spawns));
if (gModeSelection == VERSUS) {
FVector pos = { 0, 0, 0 };
@ -206,8 +207,7 @@ void ChocoMountain::SomeSounds() {
}
void ChocoMountain::WhatDoesThisDo(Player* player, int8_t playerId) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0xA0) &&
((s16) gNearestWaypointByPlayerId[playerId] < 0xB4)) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0xA0) && ((s16) gNearestWaypointByPlayerId[playerId] < 0xB4)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x55);
}
@ -221,8 +221,7 @@ void ChocoMountain::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void ChocoMountain::WhatDoesThisDoAI(Player* player, int8_t playerId) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0xA0) &&
((s16) gNearestWaypointByPlayerId[playerId] < 0xB4)) {
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0xA0) && ((s16) gNearestWaypointByPlayerId[playerId] < 0xB4)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x55);
}
@ -283,11 +282,13 @@ void ChocoMountain::Render(struct UnkStruct_800DC5EC* arg0) {
}
void ChocoMountain::RenderCredits() {
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_choco_mountain_dl_71B8));
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_choco_mountain_dl_71B8));
}
void ChocoMountain::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
void ChocoMountain::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5,
f32* arg6, f32* arg7) {
func_8003E37C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
void ChocoMountain::Destroy() { }
void ChocoMountain::Destroy() {
}

View File

@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
#include "assets/choco_mountain_vertices.h"
#include "assets/choco_mountain_displaylists.h"
#include "assets/choco_mountain_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture choco_mountain_textures[];
#include "assets/choco_mountain_vertices.h"
#include "assets/choco_mountain_displaylists.h"
#include "assets/choco_mountain_data.h"
#include "course_offsets.h"
#include "camera.h"
#include "data/some_data.h"
#include "objects.h"
#include "path_spawn_metadata.h"
extern const course_texture choco_mountain_textures[];
}
class ChocoMountain : public Course {
public:
virtual ~ChocoMountain() = default; // Virtual destructor for proper cleanup in derived classes
public:
virtual ~ChocoMountain() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit ChocoMountain();
// virtual void Load(const char* courseVtx,
// course_texture* textures, const char* displaylists, size_t dlSize);
// virtual void Load(const char* courseVtx,
// course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@ -32,7 +32,8 @@ public:
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
virtual void RenderCredits() override;
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
virtual void RenderCredits() override;
virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
f32* arg7) override;
virtual void Destroy() override;
};

View File

@ -43,7 +43,7 @@ Course::Course() {
Props.Minimap.PlayerScaleFactor = 0.22f;
Props.Minimap.FinishlineX = 0;
Props.Minimap.FinishlineY = 0;
Props.Minimap.Colour = {255, 255, 255};
Props.Minimap.Colour = { 255, 255, 255 };
Props.WaterLevel = -10.0f;
Props.LakituTowType = (s32) OLakitu::LakituTowType::NORMAL;
@ -115,11 +115,11 @@ void Course::LoadO2R(std::string trackPath) {
size_t i = 0;
for (auto& path : paths) {
if (i == 0) {
Props.PathTable[0] = (TrackWaypoint*)path.data();
Props.PathTable[0] = (TrackWaypoint*) path.data();
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
Props.PathTable2[0] = (TrackWaypoint*)path.data();
Props.PathTable2[0] = (TrackWaypoint*) path.data();
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@ -140,7 +140,7 @@ void Course::Load() {
// Load from O2R
if (!TrackSectionsPtr.empty()) {
bIsMod = true;
//auto res = std::dynamic_pointer_cast<MK64::TrackSectionsO2RClass>(ResourceLoad(TrackSectionsPtr.c_str()));
// auto res = std::dynamic_pointer_cast<MK64::TrackSectionsO2RClass>(ResourceLoad(TrackSectionsPtr.c_str()));
TrackSectionsO2R* sections = (TrackSectionsO2R*) LOAD_ASSET_RAW(TrackSectionsPtr.c_str());
size_t size = ResourceGetSizeByName(TrackSectionsPtr.c_str());
@ -217,8 +217,9 @@ void Course::ParseCourseSections(TrackSectionsO2R* sections, size_t size) {
} else {
D_8015F5A4 = 0;
}
printf("LOADING DL %s\n", sections[i].addr.c_str());
generate_collision_mesh((Gfx*)LOAD_ASSET_RAW(sections[i].addr.c_str()), sections[i].surfaceType, sections[i].sectionId);
printf("LOADING DL %s\n", sections[i].addr.c_str());
generate_collision_mesh((Gfx*) LOAD_ASSET_RAW(sections[i].addr.c_str()), sections[i].surfaceType,
sections[i].sectionId);
}
}
@ -228,8 +229,8 @@ void Course::TestPath() {
s16 x;
s16 y;
s16 z;
Vec3s rot = {0, 0, 0};
Vec3f vel = {0, 0, 0};
Vec3s rot = { 0, 0, 0 };
Vec3f vel = { 0, 0, 0 };
for (size_t i = 0; i < gWaypointCountByPathIndex[0]; i++) {
x = D_80164550[0][i].posX;
@ -241,7 +242,7 @@ void Course::TestPath() {
}
f32 height = spawn_actor_on_surface(x, 2000.0f, z);
Vec3f itemPos = {x, height, z};
Vec3f itemPos = { x, height, z };
add_actor_to_empty_slot(itemPos, rot, vel, ACTOR_ITEM_BOX);
}
}
@ -337,7 +338,7 @@ void Course::Render(struct UnkStruct_800DC5EC* arg0) {
if (!TrackSectionsPtr.empty()) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
// set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
// set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
@ -347,10 +348,10 @@ void Course::Render(struct UnkStruct_800DC5EC* arg0) {
// d_course_big_donut_packed_dl_DE8
}
TrackSectionsO2R* sections = (TrackSectionsO2R*)LOAD_ASSET_RAW(TrackSectionsPtr.c_str());
TrackSectionsO2R* sections = (TrackSectionsO2R*) LOAD_ASSET_RAW(TrackSectionsPtr.c_str());
size_t size = ResourceGetSizeByName(TrackSectionsPtr.c_str());
for (size_t i = 0; i < (size / sizeof(TrackSectionsO2R)); i++) {
gSPDisplayList(gDisplayListHead++, (Gfx*)LOAD_ASSET_RAW(sections[i].addr.c_str()));
gSPDisplayList(gDisplayListHead++, (Gfx*) LOAD_ASSET_RAW(sections[i].addr.c_str()));
}
}
}
@ -363,8 +364,7 @@ f32 Course::GetWaterLevel(FVector pos, Collision* collision) {
bool found = false;
for (const auto& volume : gWorldInstance.CurrentCourse->WaterVolumes) {
if (pos.x >= volume.MinX && pos.x <= volume.MaxX &&
pos.z >= volume.MinZ && pos.z <= volume.MaxZ) {
if (pos.x >= volume.MinX && pos.x <= volume.MaxX && pos.z >= volume.MinZ && pos.z <= volume.MaxZ) {
// Choose the highest water volume the player is over
if (!found || volume.Height > highestWater) {
highestWater = volume.Height;

Some files were not shown because too many files have changed in this diff Show More