Revamp chroma key stage & make default level

This commit is contained in:
Llennpie 2022-08-24 18:03:52 -04:00
parent e58b542a54
commit 3ba38043e0
22 changed files with 54 additions and 292 deletions

View file

@ -1510,6 +1510,7 @@ static void ParseGeoSymbol(GfxData* aGfxData, DataNode<GeoLayout>* aNode, GeoLay
geo_symbol_2(GEO_ASM, 1);
geo_symbol_2(GEO_BACKGROUND, 1);
geo_symbol_1(GEO_BACKGROUND_COLOR, 0);
geo_symbol_0(GEO_BACKGROUND_DYN);
geo_symbol_0(GEO_NOP_1A);
geo_symbol_5(GEO_HELD_OBJECT, 2);
geo_symbol_2(GEO_SCALE, 0);

View file

@ -12,6 +12,6 @@ const LevelScript level_script_entry[] = {
SLEEP(/*frames*/ 2),
BLACKOUT(/*active*/ FALSE),
SET_REG(/*value*/ 0),
EXECUTE(/*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ level_intro_entry_1),
EXECUTE(/*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ script_intro_L1),
JUMP(/*target*/ level_script_entry),
};

View file

@ -19,12 +19,12 @@
#include "levels/menu/header.h"
const LevelScript level_main_menu_entry_1[] = {
INIT_LEVEL(),
FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd),
LOAD_MIO0(/*seg*/ 0x07, _menu_segment_7SegmentRomStart, _menu_segment_7SegmentRomEnd),
LOAD_RAW(/*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd),
ALLOC_LEVEL_POOL(),
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, geo_menu_mario_save_button),
//INIT_LEVEL(),
//FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd),
//LOAD_MIO0(/*seg*/ 0x07, _menu_segment_7SegmentRomStart, _menu_segment_7SegmentRomEnd),
//LOAD_RAW(/*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd),
//ALLOC_LEVEL_POOL(),
/*LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, geo_menu_mario_save_button),
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_RED_ERASE_BUTTON, geo_menu_erase_button),
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_BLUE_COPY_BUTTON, geo_menu_copy_button),
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, geo_menu_file_button),
@ -33,27 +33,27 @@ const LevelScript level_main_menu_entry_1[] = {
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_MARIO_NEW_BUTTON, geo_menu_mario_new_button),
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, geo_menu_mario_new_button_fade),
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_PURPLE_SOUND_BUTTON, geo_menu_sound_button),
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_GENERIC_BUTTON, geo_menu_generic_button),
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_GENERIC_BUTTON, geo_menu_generic_button),*/
AREA(/*index*/ 1, geo_menu_file_select_strings_and_menu_cursor),
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, 0, -19000, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvMenuButtonManager),
OBJECT(/*model*/ MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, /*pos*/ 0, 0, -19000, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvYellowBackgroundInMenu),
TERRAIN(/*terrainData*/ main_menu_seg7_collision),
END_AREA(),
//AREA(/*index*/ 1, geo_menu_file_select_strings_and_menu_cursor),
// OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, 0, -19000, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvMenuButtonManager),
// OBJECT(/*model*/ MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, /*pos*/ 0, 0, -19000, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvYellowBackgroundInMenu),
// TERRAIN(/*terrainData*/ main_menu_seg7_collision),
//END_AREA(),
FREE_LEVEL_POOL(),
LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0021),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
CALL(/*arg*/ 0, /*func*/ lvl_init_menu_values_and_cursor_pos),
CALL_LOOP(/*arg*/ 0, /*func*/ lvl_update_obj_and_load_file_selected),
GET_OR_SET(/*op*/ OP_SET, /*var*/ VAR_CURR_SAVE_FILE_NUM),
STOP_MUSIC(/*fadeOutTime*/ 0x00BE),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
SLEEP(/*frames*/ 16),
CLEAR_LEVEL(),
SLEEP_BEFORE_EXIT(/*frames*/ 1),
SET_REG(/*value*/ LEVEL_CASTLE_GROUNDS),
//FREE_LEVEL_POOL(),
//LOAD_AREA(/*area*/ 1),
//SET_MENU_MUSIC(/*seq*/ 0x0021),
//TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
//CALL(/*arg*/ 0, /*func*/ lvl_init_menu_values_and_cursor_pos),
//CALL_LOOP(/*arg*/ 0, /*func*/ lvl_update_obj_and_load_file_selected),
//GET_OR_SET(/*op*/ OP_SET, /*var*/ VAR_CURR_SAVE_FILE_NUM),
//STOP_MUSIC(/*fadeOutTime*/ 0x00BE),
//TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
//SLEEP(/*frames*/ 16),
//CLEAR_LEVEL(),
//SLEEP_BEFORE_EXIT(/*frames*/ 1),
SET_REG(LEVEL_SA),
EXIT_AND_EXECUTE(/*seg*/ 0x15, _scriptsSegmentRomStart, _scriptsSegmentRomEnd, level_main_scripts_entry),
};

View file

@ -1,14 +1,14 @@
const Collision sa_area_1_collision[] = {
COL_INIT(),
COL_VERTEX_INIT(8),
COL_VERTEX(7000, 100, -7000),
COL_VERTEX(-7000, 100, -7000),
COL_VERTEX(-7000, 100, 7000),
COL_VERTEX(7000, 100, 7000),
COL_VERTEX(7000, -100, 7000),
COL_VERTEX(-7000, -100, 7000),
COL_VERTEX(-7000, -100, -7000),
COL_VERTEX(7000, -100, -7000),
COL_VERTEX(6400, 100, -6400),
COL_VERTEX(-6400, 100, -6400),
COL_VERTEX(-6400, 100, 6400),
COL_VERTEX(6400, 100, 6400),
COL_VERTEX(6400, -100, 6400),
COL_VERTEX(-6400, -100, 6400),
COL_VERTEX(-6400, -100, -6400),
COL_VERTEX(6400, -100, -6400),
COL_TRI_INIT(SURFACE_DEFAULT, 12),
COL_TRI(0, 1, 2),
COL_TRI(0, 2, 3),

View file

@ -20,7 +20,7 @@ const GeoLayout sa_area_1[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45.0000, 100, 30000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(CAMERA_MODE_8_DIRECTIONS, 0, 0, 0, 0, -100, 0, geo_camera_main),
GEO_CAMERA(CAMERA_MODE_CLOSE, 0, 0, 0, 0, -100, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_BRANCH(1, sa_area_1_geo),
GEO_RENDER_OBJ(),

View file

@ -1,27 +0,0 @@
const Collision sa_area_2_collision[] = {
COL_INIT(),
COL_VERTEX_INIT(8),
COL_VERTEX(7000, 100, -7000),
COL_VERTEX(-7000, 100, -7000),
COL_VERTEX(-7000, 100, 7000),
COL_VERTEX(7000, 100, 7000),
COL_VERTEX(7000, -100, 7000),
COL_VERTEX(-7000, -100, 7000),
COL_VERTEX(-7000, -100, -7000),
COL_VERTEX(7000, -100, -7000),
COL_TRI_INIT(SURFACE_DEFAULT, 12),
COL_TRI(0, 1, 2),
COL_TRI(0, 2, 3),
COL_TRI(4, 3, 2),
COL_TRI(4, 2, 5),
COL_TRI(5, 2, 1),
COL_TRI(5, 1, 6),
COL_TRI(6, 7, 4),
COL_TRI(6, 4, 5),
COL_TRI(7, 0, 3),
COL_TRI(7, 3, 4),
COL_TRI(6, 1, 0),
COL_TRI(6, 0, 7),
COL_TRI_STOP(),
COL_END()
};

View file

@ -1,33 +0,0 @@
#include "src/game/envfx_snow.h"
const GeoLayout sa_area_2_geo[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_CLOSE_NODE(),
GEO_RETURN(),
};
const GeoLayout sa_area_2[] = {
GEO_NODE_SCREEN_AREA(10, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2),
GEO_OPEN_NODE(),
GEO_ZBUFFER(0),
GEO_OPEN_NODE(),
GEO_NODE_ORTHO(100.0000),
GEO_OPEN_NODE(),
GEO_BACKGROUND_COLOR(0x003F),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_ZBUFFER(1),
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45.0000, 100, 30000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(CAMERA_MODE_8_DIRECTIONS, 0, 0, 0, 0, -100, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_BRANCH(1, sa_area_2_geo),
GEO_RENDER_OBJ(),
GEO_ASM(ENVFX_MODE_NONE, geo_envfx_main),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_END(),
};

View file

@ -1,4 +0,0 @@
const MacroObject sa_area_2_macro_objs[] = {
MACRO_OBJECT_END(),
};

View file

@ -1,27 +0,0 @@
const Collision sa_area_3_collision[] = {
COL_INIT(),
COL_VERTEX_INIT(8),
COL_VERTEX(7000, 100, -7000),
COL_VERTEX(-7000, 100, -7000),
COL_VERTEX(-7000, 100, 7000),
COL_VERTEX(7000, 100, 7000),
COL_VERTEX(7000, -100, 7000),
COL_VERTEX(-7000, -100, 7000),
COL_VERTEX(-7000, -100, -7000),
COL_VERTEX(7000, -100, -7000),
COL_TRI_INIT(SURFACE_DEFAULT, 12),
COL_TRI(0, 1, 2),
COL_TRI(0, 2, 3),
COL_TRI(4, 3, 2),
COL_TRI(4, 2, 5),
COL_TRI(5, 2, 1),
COL_TRI(5, 1, 6),
COL_TRI(6, 7, 4),
COL_TRI(6, 4, 5),
COL_TRI(7, 0, 3),
COL_TRI(7, 3, 4),
COL_TRI(6, 1, 0),
COL_TRI(6, 0, 7),
COL_TRI_STOP(),
COL_END()
};

View file

@ -1,33 +0,0 @@
#include "src/game/envfx_snow.h"
const GeoLayout sa_area_3_geo[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_CLOSE_NODE(),
GEO_RETURN(),
};
const GeoLayout sa_area_3[] = {
GEO_NODE_SCREEN_AREA(10, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2),
GEO_OPEN_NODE(),
GEO_ZBUFFER(0),
GEO_OPEN_NODE(),
GEO_NODE_ORTHO(100.0000),
GEO_OPEN_NODE(),
GEO_BACKGROUND_COLOR(0xF83F),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_ZBUFFER(1),
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45.0000, 100, 30000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(CAMERA_MODE_8_DIRECTIONS, 0, 0, 0, 0, -100, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_BRANCH(1, sa_area_3_geo),
GEO_RENDER_OBJ(),
GEO_ASM(ENVFX_MODE_NONE, geo_envfx_main),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_END(),
};

View file

@ -1,4 +0,0 @@
const MacroObject sa_area_3_macro_objs[] = {
MACRO_OBJECT_END(),
};

View file

@ -1,27 +0,0 @@
const Collision sa_area_4_collision[] = {
COL_INIT(),
COL_VERTEX_INIT(8),
COL_VERTEX(7000, 100, -7000),
COL_VERTEX(-7000, 100, -7000),
COL_VERTEX(-7000, 100, 7000),
COL_VERTEX(7000, 100, 7000),
COL_VERTEX(7000, -100, 7000),
COL_VERTEX(-7000, -100, 7000),
COL_VERTEX(-7000, -100, -7000),
COL_VERTEX(7000, -100, -7000),
COL_TRI_INIT(SURFACE_DEFAULT, 12),
COL_TRI(0, 1, 2),
COL_TRI(0, 2, 3),
COL_TRI(4, 3, 2),
COL_TRI(4, 2, 5),
COL_TRI(5, 2, 1),
COL_TRI(5, 1, 6),
COL_TRI(6, 7, 4),
COL_TRI(6, 4, 5),
COL_TRI(7, 0, 3),
COL_TRI(7, 3, 4),
COL_TRI(6, 1, 0),
COL_TRI(6, 0, 7),
COL_TRI_STOP(),
COL_END()
};

View file

@ -1,33 +0,0 @@
#include "src/game/envfx_snow.h"
const GeoLayout sa_area_4_geo[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_CLOSE_NODE(),
GEO_RETURN(),
};
const GeoLayout sa_area_4[] = {
GEO_NODE_SCREEN_AREA(10, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2),
GEO_OPEN_NODE(),
GEO_ZBUFFER(0),
GEO_OPEN_NODE(),
GEO_NODE_ORTHO(100.0000),
GEO_OPEN_NODE(),
GEO_BACKGROUND_COLOR(0x07C1),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_ZBUFFER(1),
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45.0000, 100, 30000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(CAMERA_MODE_8_DIRECTIONS, 0, 0, 0, 0, -100, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_BRANCH(1, sa_area_4_geo),
GEO_RENDER_OBJ(),
GEO_ASM(ENVFX_SNOW_NORMAL, geo_envfx_main),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_END(),
};

View file

@ -1,4 +0,0 @@
const MacroObject sa_area_4_macro_objs[] = {
MACRO_OBJECT_END(),
};

View file

@ -1,4 +1 @@
#include "levels/sa/area_1/geo.inc.c"
#include "levels/sa/area_2/geo.inc.c"
#include "levels/sa/area_3/geo.inc.c"
#include "levels/sa/area_4/geo.inc.c"

View file

@ -2,16 +2,4 @@ extern const GeoLayout sa_area_1_geo[];
extern const GeoLayout sa_area_1[];
extern const Collision sa_area_1_collision[];
extern const MacroObject sa_area_1_macro_objs[];
extern const GeoLayout sa_area_2_geo[];
extern const GeoLayout sa_area_2[];
extern const Collision sa_area_2_collision[];
extern const MacroObject sa_area_2_macro_objs[];
extern const GeoLayout sa_area_3_geo[];
extern const GeoLayout sa_area_3[];
extern const Collision sa_area_3_collision[];
extern const MacroObject sa_area_3_macro_objs[];
extern const GeoLayout sa_area_4_geo[];
extern const GeoLayout sa_area_4[];
extern const Collision sa_area_4_collision[];
extern const MacroObject sa_area_4_macro_objs[];
extern Gfx sa_dl_material_revert_render_settings[];

View file

@ -1,13 +1,4 @@
#include "levels/sa/area_1/collision.inc.c"
#include "levels/sa/area_1/macro.inc.c"
#include "levels/sa/area_1/spline.inc.c"
#include "levels/sa/area_2/collision.inc.c"
#include "levels/sa/area_2/macro.inc.c"
#include "levels/sa/area_2/spline.inc.c"
#include "levels/sa/area_3/collision.inc.c"
#include "levels/sa/area_3/macro.inc.c"
#include "levels/sa/area_3/spline.inc.c"
#include "levels/sa/area_4/collision.inc.c"
#include "levels/sa/area_4/macro.inc.c"
#include "levels/sa/area_4/spline.inc.c"
#include "levels/sa/model.inc.c"

View file

@ -13,14 +13,20 @@
#include "actors/common1.h"
/* Fast64 begin persistent block [includes] */
/* Fast64 end persistent block [includes] */
#include "make_const_nonconst.h"
#include "levels/sa/header.h"
/* Fast64 begin persistent block [scripts] */
/* Fast64 end persistent block [scripts] */
const LevelScript level_sa_entry[] = {
INIT_LEVEL(),
LOAD_MIO0(0x07, _sa_segment_7SegmentRomStart, _sa_segment_7SegmentRomEnd),
LOAD_MIO0_TEXTURE(0x09, _inside_mio0SegmentRomStart, _inside_mio0SegmentRomEnd),
LOAD_MIO0(0x0A, _water_skybox_mio0SegmentRomStart, _water_skybox_mio0SegmentRomEnd),
LOAD_MIO0(0x0A, _wdw_skybox_mio0SegmentRomStart, _wdw_skybox_mio0SegmentRomEnd),
LOAD_MIO0(0x0B, _effect_mio0SegmentRomStart, _effect_mio0SegmentRomEnd),
LOAD_MIO0(0x05, _group4_mio0SegmentRomStart, _group4_mio0SegmentRomEnd),
LOAD_RAW(0x0C, _group4_geoSegmentRomStart, _group4_geoSegmentRomEnd),
@ -31,6 +37,9 @@ const LevelScript level_sa_entry[] = {
JUMP_LINK(script_func_global_5),
JUMP_LINK(script_func_global_14),
/* Fast64 begin persistent block [level commands] */
/* Fast64 end persistent block [level commands] */
AREA(1, sa_area_1),
WARP_NODE(0x0A, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
WARP_NODE(0xF0, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
@ -41,48 +50,12 @@ const LevelScript level_sa_entry[] = {
MACRO_OBJECTS(sa_area_1_macro_objs),
STOP_MUSIC(0),
TERRAIN_TYPE(TERRAIN_GRASS),
/* Fast64 begin persistent block [area commands] */
/* Fast64 end persistent block [area commands] */
END_AREA(),
/*
AREA(2, sa_area_2),
WARP_NODE(0x0A, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
WARP_NODE(0xF0, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
WARP_NODE(0xF1, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
OBJECT(MODEL_NONE, 0, 200, 0, 0, 0, 0, 0x000A0000, bhvSpinAirborneWarp),
MARIO_POS(0x02, 0, 0, 0, 0),
TERRAIN(sa_area_2_collision),
MACRO_OBJECTS(sa_area_2_macro_objs),
STOP_MUSIC(0),
TERRAIN_TYPE(TERRAIN_GRASS),
END_AREA(),
AREA(3, sa_area_3),
WARP_NODE(0x0A, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
WARP_NODE(0xF0, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
WARP_NODE(0xF1, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
OBJECT(MODEL_NONE, 0, 200, 0, 0, 0, 0, 0x000A0000, bhvSpinAirborneWarp),
MARIO_POS(0x03, 0, 0, 0, 0),
TERRAIN(sa_area_3_collision),
MACRO_OBJECTS(sa_area_3_macro_objs),
STOP_MUSIC(0),
TERRAIN_TYPE(TERRAIN_GRASS),
END_AREA(),
AREA(4, sa_area_4),
WARP_NODE(0x0A, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
WARP_NODE(0xF0, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
WARP_NODE(0xF1, LEVEL_BOB, 0x01, 0x0A, WARP_NO_CHECKPOINT),
OBJECT(MODEL_NONE, 0, 200, 0, 0, 0, 0, 0x000A0000, bhvSpinAirborneWarp),
MARIO_POS(0x04, 0, 0, 200, 0),
TERRAIN(sa_area_4_collision),
MACRO_OBJECTS(sa_area_4_macro_objs),
STOP_MUSIC(0),
TERRAIN_TYPE(TERRAIN_GRASS),
END_AREA(),
*/
FREE_LEVEL_POOL(),
MARIO_POS(0x04, 0, 0, 200, 0),
MARIO_POS(0x01, 0, 0, 200, 0),
CALL(0, lvl_init_or_update),
CALL_LOOP(1, lvl_init_or_update),
CLEAR_LEVEL(),

View file

@ -7,6 +7,7 @@
#include "graph_node.h"
#include "saturn/saturn.h"
#include "pc/configfile.h"
#include "game/area.h"
typedef void (*GeoLayoutCommandProc)(void);
@ -262,7 +263,10 @@ void geo_layout_cmd_node_perspective(void) {
s16 fov = cur_geo_cmd_s16(0x02);
s16 near = cur_geo_cmd_s16(0x04);
if (configEditorNearClipping)
// Near clipping
// This is a double edged sword:
// It allows Mario to get super close to the camera, but messes with the fog
if (configEditorNearClipping || gCurrLevelNum == LEVEL_SA)
near = 1;
s16 far = cur_geo_cmd_s16(0x06);