Added a level script function to easily set a skybox for each area

In your level script add the function
CHANGE_AREA_SKYBOX(Area ID, Skybox Segment Start, Skybox Segment End) .
This commit is contained in:
Mineqwerty committed 2021-09-04 20:27:21 -04:00
1 parent 2d86f0a404
commit 33fa7013b0
5 files changed
+23 -2

No files matched your search

+8
View File
@@ -303,6 +303,13 @@ static void level_cmd_load_yay0_texture(void) {
sCurrentCmd = CMD_NEXT;
}
static void level_cmd_change_area_skybox(int area, u8 *start, u8 *end) {
u8 areaCheck = CMD_GET(s16, 2);
gAreaSkyboxStart[areaCheck-1] = CMD_GET(void *, 4);
gAreaSkyboxEnd[areaCheck-1] = CMD_GET(void *, 8);
sCurrentCmd = CMD_NEXT;
}
static void level_cmd_init_level(void) {
init_graph_node_start(NULL, (struct GraphNodeStart *) &gObjParentGraphNode);
clear_objects();
@@ -819,6 +826,7 @@ static void (*LevelScriptJumpTable[])(void) = {
/*3A*/ level_cmd_3A,
/*3B*/ level_cmd_create_whirlpool,
/*3C*/ level_cmd_get_or_set_var,
/*3D*/ level_cmd_change_area_skybox,
};
struct LevelCommand *level_script_execute(struct LevelCommand *cmd) {