From f65eb9a003702a9734b173f3aa85ff276c9d5231 Mon Sep 17 00:00:00 2001 From: Tubular Bells <60239773+MSpiller7@users.noreply.github.com> Date: Wed, 3 Aug 2022 15:05:03 -0500 Subject: [PATCH] Reformat config comments (#470) --- include/config/config_audio.h | 10 ++- include/config/config_benchmark.h | 2 +- include/config/config_camera.h | 66 ++++++++++++------ include/config/config_collision.h | 28 +++++--- include/config/config_cutscenes.h | 12 +++- include/config/config_debug.h | 74 ++++++++++++++------ include/config/config_game.h | 84 ++++++++++++++++------- include/config/config_goddard.h | 12 +++- include/config/config_graphics.h | 108 +++++++++++++++++++++--------- include/config/config_menu.h | 14 ++-- include/config/config_movement.h | 108 ++++++++++++++++++++++-------- include/config/config_objects.h | 108 ++++++++++++++++++++++-------- include/config/config_rom.h | 22 ++++-- include/config/config_world.h | 16 +++-- 14 files changed, 473 insertions(+), 191 deletions(-) diff --git a/include/config/config_audio.h b/include/config/config_audio.h index edb0dbed..5148c0d9 100644 --- a/include/config/config_audio.h +++ b/include/config/config_audio.h @@ -4,7 +4,9 @@ * AUDIO SETTINGS * ******************/ -// Do not restart the music on cap grabs. +/** + * Do not restart the music on cap grabs. + */ #define PERSISTENT_CAP_MUSIC /** @@ -22,6 +24,8 @@ #define MAX_SIMULTANEOUS_NOTES_EMULATOR 40 #define MAX_SIMULTANEOUS_NOTES_CONSOLE 24 -// Uses a much better implementation of reverb over vanilla's fake echo reverb. Great for caves or eerie levels, as well as just a better audio experience in general. -// Reverb parameters can be configured in audio/synthesis.c to meet desired aesthetic/performance needs. Currently US/JP only. Hurts emulator and console performance. +/** + * Uses a much better implementation of reverb over vanilla's fake echo reverb. Great for caves or eerie levels, as well as just a better audio experience in general. + * Reverb parameters can be configured in audio/synthesis.c to meet desired aesthetic/performance needs. Currently US/JP only. Hurts emulator and console performance. + */ // #define BETTER_REVERB diff --git a/include/config/config_benchmark.h b/include/config/config_benchmark.h index 16a24391..478443d6 100644 --- a/include/config/config_benchmark.h +++ b/include/config/config_benchmark.h @@ -7,7 +7,7 @@ /** * Enabling this will enable a set of defines in order to run a benchmark on the game. * Currently this just starts the credits, and enables PUPPYPRINT_DEBUG. -*/ + */ // #define ENABLE_CREDITS_BENCHMARK #ifdef ENABLE_CREDITS_BENCHMARK diff --git a/include/config/config_camera.h b/include/config/config_camera.h index 0cbc7269..3fea62ba 100644 --- a/include/config/config_camera.h +++ b/include/config/config_camera.h @@ -4,51 +4,73 @@ * CAMERA SETTINGS * *******************/ -// Forces the camera mode to your choice (except when swimming or flying). -// It does this by setting the area's camera->defMode to this mode, and also -// changes hardcoded modes to use c->defMode. -// Note: removes door cutscenes due to the way they're designed to work with specific modes. -// Search for FORCED_CAMERA_MODE in camera.c for more information. +/** + * Forces the camera mode to your choice (except when swimming or flying). + * It does this by setting the area's camera->defMode to this mode, and also + * changes hardcoded modes to use c->defMode. + * Note: removes door cutscenes due to the way they're designed to work with specific modes. + * Search for FORCED_CAMERA_MODE in camera.c for more information. + */ #define FORCED_CAMERA_MODE CAMERA_MODE_8_DIRECTIONS -// Changes hardcoded camera mode reverting to instead use the area's default mode (defMode). -// If you're using a FORCED_CAMERA_MODE, this must be on for it to work. +/** + * Changes hardcoded camera mode reverting to instead use the area's default mode (defMode). + * If you're using a FORCED_CAMERA_MODE, this must be on for it to work. + */ #define USE_COURSE_DEFAULT_MODE /***** Movement specific camera modes: *****/ -// Camera mode when Mario is < 400 units away from the water surface (default is CAMERA_MODE_WATER_SURFACE). +/** + * Camera mode when Mario is < 400 units away from the water surface (default is CAMERA_MODE_WATER_SURFACE). + */ #define WATER_SURFACE_CAMERA_MODE CAMERA_MODE_WATER_SURFACE -// Camera mode when Mario is > 800 units away from the water surface (default is CAMERA_MODE_BEHIND_MARIO). +/** + * Camera mode when Mario is > 800 units away from the water surface (default is CAMERA_MODE_BEHIND_MARIO). + */ #define DEEP_WATER_CAMERA_MODE CAMERA_MODE_BEHIND_MARIO -// Camera mode when Mario is flying (default is CAMERA_MODE_BEHIND_MARIO). +/** + * Camera mode when Mario is flying (default is CAMERA_MODE_BEHIND_MARIO). + */ #define FLYING_CAMERA_MODE CAMERA_MODE_BEHIND_MARIO /*******************************************/ -// Makes the camera approach Mario's height much more quickly. +/** + * Makes the camera approach Mario's height much more quickly. + */ #define FAST_VERTICAL_CAMERA_MOVEMENT -// Enables "parallel lakitu camera" or "aglab cam" which lets you move the camera smoothly with the D-pad. +/** + * Enables "parallel lakitu camera" or "aglab cam" which lets you move the camera smoothly with the D-pad. + */ #define PARALLEL_LAKITU_CAM -// Enables Puppy Camera 2, a rewritten camera that can be freely configured and modified. +/** + * Enables Puppy Camera 2, a rewritten camera that can be freely configured and modified. + */ // #define PUPPYCAM -// Note: Reonucam is available, but because we had no time to test it properly, it's included as a patch rather than being in the code by default. -// Run this command to apply the patch if you want to use it: -// tools/apply_patch.sh enhancements/reonucam.patch -// Consider it a beta, but it should work fine. Please report any bugs with it. Applying the patch will simply add a define here, so you can still turn it off even after patching. +/** + * Note: Reonucam is available, but because we had no time to test it properly, it's included as a patch rather than being in the code by default. + * Run this command to apply the patch if you want to use it: + * tools/apply_patch.sh enhancements/reonucam.patch + * Consider it a beta, but it should work fine. Please report any bugs with it. Applying the patch will simply add a define here, so you can still turn it off even after patching. + */ /**********************************/ /***** Vanilla config options *****/ /**********************************/ -// Included for ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS define. +/** + * Included for ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS define. + */ #include "config_game.h" -// Allow course specific camera processing. -// You will likely want this disabled in non-vanilla hacks. -// This is automatically enabled when ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS is enabled, -// but feel free to override it if you really want to for some reason/ +/** + * Allow course specific camera processing. + * You will likely want this disabled in non-vanilla hacks. + * This is automatically enabled when ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS is enabled, + * but feel free to override it if you really want to for some reason. + */ #ifdef ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS #define ENABLE_VANILLA_CAM_PROCESSING #endif diff --git a/include/config/config_collision.h b/include/config/config_collision.h index f5c162c6..83e2782e 100644 --- a/include/config/config_collision.h +++ b/include/config/config_collision.h @@ -4,22 +4,32 @@ * COLLISION SETTINGS * **********************/ -// Reduces some find_floor calls, at the cost of some barely noticeable smoothness in Mario's visual movement in a few actions at higher speeds. -// The defined number is the forward speed threshold before the change is active, since it's only noticeable at lower speeds. +/** + * Reduces some find_floor calls, at the cost of some barely noticeable smoothness in Mario's visual movement in a few actions at higher speeds. + * The defined number is the forward speed threshold before the change is active, since it's only noticeable at lower speeds. + */ #define FAST_FLOOR_ALIGN 10 -// Automatically calculates the optimal collision distance for an object based on its vertices. +/** + * Automatically calculates the optimal collision distance for an object based on its vertices. + */ #define AUTO_COLLISION_DISTANCE -// Allows all surfaces types to have force, (doesn't require setting force, just allows it to be optional). +/** + * Allows all surfaces types to have force, (doesn't require setting force, just allows it to be optional). + */ #define ALL_SURFACES_HAVE_FORCE -// Number of walls that can push Mario at once. Vanilla is 4. +/** + * Number of walls that can push Mario at once. Vanilla is 4. + */ #define MAX_REFERENCED_WALLS 4 -// Collision data is the type that the collision system uses. All data by default is stored as an s16, but you may change it to s32. -// Naturally, that would double the size of all collision data, but would allow you to use 32 bit values instead of 16. -// Rooms are s8 in vanilla, but if you somehow have more than 255 rooms, you may raise this number. -// Currently, they *must* say as s8, because the room tables generated by literally anything are explicitly u8 and don't use a macro, making this currently infeasable. +/** + * Collision data is the type that the collision system uses. All data by default is stored as an s16, but you may change it to s32. + * Naturally, that would double the size of all collision data, but would allow you to use 32 bit values instead of 16. + * Rooms are s8 in vanilla, but if you somehow have more than 255 rooms, you may raise this number. + * Currently, they *must* say as s8, because the room tables generated by literally anything are explicitly u8 and don't use a macro, making this currently infeasable. + */ #define COLLISION_DATA_TYPE s16 #define ROOM_DATA_TYPE s8 diff --git a/include/config/config_cutscenes.h b/include/config/config_cutscenes.h index e39dcb7c..e1b0bdc5 100644 --- a/include/config/config_cutscenes.h +++ b/include/config/config_cutscenes.h @@ -4,10 +4,16 @@ * CUTSCENE SETTINGS * *********************/ -// -- CUTSCENE SKIPS -- +/************************ + * -- CUTSCENE SKIPS -- * + ************************/ -// Skips the peach letter cutscene. +/** + * Skips the peach letter cutscene. + */ #define PEACH_SKIP -// Skips the title/splash screen (Super Mario 64 logo). +/** + * Skips the title/splash screen (Super Mario 64 logo). + */ // #define SKIP_TITLE_SCREEN diff --git a/include/config/config_debug.h b/include/config/config_debug.h index 376c66bd..e384729a 100644 --- a/include/config/config_debug.h +++ b/include/config/config_debug.h @@ -4,54 +4,84 @@ * DEBUG SETTINGS * ******************/ -// Enables most debug options, including PUPPYPRINT_DEBUG. +/** + * Enables most debug options, including PUPPYPRINT_DEBUG. + */ // #define DEBUG_ALL -// Disables all debug options (except PUPPYPRINT). +/** + * Disables all debug options (except PUPPYPRINT). + */ #define DISABLE_ALL -// Enables a comprehensive standalone profiler. Automatically enabled by PUPPYPRINT_DEBUG. -// If not using PUPPYPRINT_DEBUG, press L to toggle the profiler. +/** + * Enables a comprehensive standalone profiler. Automatically enabled by PUPPYPRINT_DEBUG. + * If not using PUPPYPRINT_DEBUG, press L to toggle the profiler. + */ #define USE_PROFILER -// TEST LEVEL -// Uncomment this define and set a test level in order to boot straight into said level. -// This allows you to quickly test the level you're working on. -// If you want the game to boot normally, just comment out the define again. +/** + * -- TEST LEVEL -- + * Uncomment this define and set a test level in order to boot straight into said level. + * This allows you to quickly test the level you're working on. + * If you want the game to boot normally, just comment out the define again. + */ // #define TEST_LEVEL LEVEL_BOB -// Enables debug level select. Hold L while the game boots to turn it on. +/** + * Enables debug level select. Hold L while the game boots to turn it on. + */ #define DEBUG_LEVEL_SELECT -// Enables debug free move (D-pad up to enter, A to exit). +/** + * Enables debug free move (D-pad up to enter, A to exit). + */ #define ENABLE_DEBUG_FREE_MOVE -// Enables a custom, enhanced performance profiler. (Enables PUPPYPRINT by default in config_safeguards). +/** + * Enables a custom, enhanced performance profiler. (Enables PUPPYPRINT by default in config_safeguards). + */ // #define PUPPYPRINT_DEBUG 1 -// Uses cycles instead of microseconds in Puppyprint debug output. +/** + * Uses cycles instead of microseconds in Puppyprint debug output. + */ // #define PUPPYPRINT_DEBUG_CYCLES -// A vanilla style debug mode. It doesn't rely on a text engine, but it's much less powerful that PUPPYPRINT_DEBUG. -// Press D-pad left to show the debug UI. +/** + * A vanilla style debug mode. It doesn't rely on a text engine, but it's much less powerful that PUPPYPRINT_DEBUG. + * Press D-pad left to show the debug UI. + */ // #define VANILLA_STYLE_CUSTOM_DEBUG -// Visual debug enables some collision visuals. Tapping Right on the D-pad will cycle between visual hitboxes, visual surfaces, both, and neither. -// If puppyprint is enabled, then this can be cycled only while the screen is active. +/** + * Visual debug enables some collision visuals. Tapping Right on the D-pad will cycle between visual hitboxes, visual surfaces, both, and neither. + * If puppyprint is enabled, then this can be cycled only while the screen is active. + */ // #define VISUAL_DEBUG -// Opens all courses and doors. Used for debugging purposes to unlock all content. +/** + * Opens all courses and doors. Used for debugging purposes to unlock all content. + */ #define UNLOCK_ALL -// Same as above, but also reads all save file flags as complete. -// This will not overwrite existing save file data unless you save over it. +/** + * Same as above, but also reads all save file flags as complete. + * This will not overwrite existing save file data unless you save over it. + */ // #define COMPLETE_SAVE_FILE -// Removes the limit on FPS. +/** + * Removes the limit on FPS. + */ // #define UNLOCK_FPS -// Includes vanilla debug functionality. +/** + * Includes vanilla debug functionality. + */ // #define VANILLA_DEBUG -// Forces a crash when the game starts. Useful for debugging the crash screen. +/** + * Forces a crash when the game starts. Useful for debugging the crash screen. + */ // #define DEBUG_FORCE_CRASH_ON_BOOT diff --git a/include/config/config_game.h b/include/config/config_game.h index 5c9456eb..4af73dd2 100644 --- a/include/config/config_game.h +++ b/include/config/config_game.h @@ -11,63 +11,101 @@ */ // #define ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS -// Disables lives and hides the lives counter. +/** + * Disables lives and hides the lives counter. + */ #define DISABLE_LIVES -// Saves the number of lives to the save file (Does nothing if DISABLE_LIVES is enabled). +/** + * Saves the number of lives to the save file (Does nothing if DISABLE_LIVES is enabled). + */ #define SAVE_NUM_LIVES -// This is the number of lives Mario starts with after a game over or starting the game for the first time (must be lower than 127). +/** + * This is the number of lives Mario starts with after a game over or starting the game for the first time (must be lower than 127). + */ #define DEFAULT_NUM_LIVES 4 -// This can be 0..127. +/** + * This can be 0..127. + */ #define MAX_NUM_LIVES 100 -// This can be 0..32767. +/** + * This can be 0..32767. + */ #define MAX_NUM_COINS 999 -// Air/breath meter is separate from health meter when underwater. +/** + * Air/breath meter is separate from health meter when underwater. + */ // #define BREATH_METER -// Number of coins to spawn the "100 coin" star. If you remove the define altogether, then there won't be a 100 coin star at all. +/** + * Number of coins to spawn the "100 coin" star. If you remove the define altogether, then there won't be a 100 coin star at all. + */ #define X_COIN_STAR 100 -// Stars don't kick you out of the level (does not play nicely with vanilla). +/** + * Stars don't kick you out of the level (does not play nicely with vanilla). + */ // #define NON_STOP_STARS -// Bowser keys always exit the level. Only has an effect if NON_STOP_STARS is enabled. +/** + * Bowser keys always exit the level. Only has an effect if NON_STOP_STARS is enabled. + */ // #define KEYS_EXIT_LEVEL -// Uncomment this if you want global star IDs (useful for creating an open world hack ala MVC). +/** + * Uncomment this if you want global star IDs (useful for creating an open world hack ala MVC). + */ // #define GLOBAL_STAR_IDS -// Number of possible unique model ID's (keep it higher than 256). +/** + * Number of possible unique model ID's (keep it higher than 256). + */ #define MODEL_ID_COUNT 256 -// Number of supported areas per level. +/** + * Number of supported areas per level. + */ #define AREA_COUNT 8 -// Makes signs and NPCs easier to talk to. +/** + * Makes signs and NPCs easier to talk to. + */ // #define EASIER_DIALOG_TRIGGER -// Shows an "A" when Mario is able to talk [requires EASIER_DIALOG_TRIGGER]. +/** + * Shows an "A" when Mario is able to talk [requires EASIER_DIALOG_TRIGGER]. + */ // #define DIALOG_INDICATOR -// Include the English characters that were missing from US segment2 -// J, Q, V, X, Z, ¨, !, !!, ?, &, %, ., and the beta key. -// [MAKE SURE TO INCLUDE EU AND JP/SH BASEROMS IN THE REPO TO OBTAIN THE ASSETS] -// If this is disabled, backup assets will be used. +/** + * Include the English characters that were missing from US segment2 + * J, Q, V, X, Z, ¨, !, !!, ?, &, %, ., and the beta key. + * [MAKE SURE TO INCLUDE EU AND JP/SH BASEROMS IN THE REPO TO OBTAIN THE ASSETS] + * If this is disabled, backup assets will be used. + */ // #define COMPLETE_EN_US_SEGMENT2 -// Removes multi-language cake screen. +/** + * Removes multi-language cake screen. + */ #define EU_CUSTOM_CAKE_FIX -// Adds multiple languages to the game. Just a placeholder for the most part, because it only works with EU, and must be enabled with EU. +/** + * Adds multiple languages to the game. Just a placeholder for the most part, because it only works with EU, and must be enabled with EU. + */ #define MULTILANG (0 || VERSION_EU) -// Prevents infinite death loops by always restoring Mario's health when he's warped to any kind of warp while dead. +/** + * Prevents infinite death loops by always restoring Mario's health when he's warped to any kind of warp while dead. + */ #define PREVENT_DEATH_LOOP -// The level that the game starts with immediately after file select. -// The levelscript needs to have a MARIO_POS command for this to work. +/** + * The level that the game starts with immediately after file select. + * The levelscript needs to have a MARIO_POS command for this to work. + */ #define START_LEVEL LEVEL_CASTLE_GROUNDS diff --git a/include/config/config_goddard.h b/include/config/config_goddard.h index a7d7a94f..42b0ef9b 100644 --- a/include/config/config_goddard.h +++ b/include/config/config_goddard.h @@ -4,11 +4,17 @@ * GODDARD SETTINGS * ********************/ -// Enables Goddard (the Mario head). +/** + * Enables Goddard (the Mario head). + */ // #define KEEP_MARIO_HEAD -// Enables the Goddard easter egg from Shindou (has no effect if KEEP_MARIO_HEAD is disabled). +/** + * Enables the Goddard easter egg from Shindou (has no effect if KEEP_MARIO_HEAD is disabled). + */ #define GODDARD_EASTER_EGG -// Disables the demo that plays when idle on the start screen (has no effect if KEEP_MARIO_HEAD is disabled). +/** + * Disables the demo that plays when idle on the start screen (has no effect if KEEP_MARIO_HEAD is disabled). + */ #define DISABLE_DEMO diff --git a/include/config/config_graphics.h b/include/config/config_graphics.h index 1b210736..34efdeb0 100644 --- a/include/config/config_graphics.h +++ b/include/config/config_graphics.h @@ -4,44 +4,66 @@ * GRAPHICS SETTINGS * *********************/ -// The size of the master display list (gDisplayListHead). 6400 is vanilla. +/** + * The size of the master display list (gDisplayListHead). 6400 is vanilla. + */ #define GFX_POOL_SIZE 10000 -// Show a watermark on the title screen that reads "Made with HackerSM64", instead of the copyright message. +/** + * Show a watermark on the title screen that reads "Made with HackerSM64", instead of the copyright message. + */ #define INTRO_CREDIT -// Spawns floombas on the title screen. +/** + * Spawns floombas on the title screen. + */ #define INTRO_FLOOMBAS -// Enables widescreen (16:9) support. +/** + * Enables widescreen (16:9) support. + */ #define WIDE -// Skybox size modifier, changing this will add support for larger skybox images. NOTE: Vanilla skyboxes may break if you change this option. Be sure to rescale them accordingly. -// Whenever you change this, make sure to run "make -C tools clean" to rebuild the skybox tool (alternatively go into skyconv.c and change the file in any way (like adding/deleting a space) to specifically rebuild that tool). -// When increasing this, you should probably also increase the GFX pool size (the GFX_POOL_SIZE define above). +/** + * Skybox size modifier, changing this will add support for larger skybox images. NOTE: Vanilla skyboxes may break if you change this option. Be sure to rescale them accordingly. + * Whenever you change this, make sure to run "make -C tools clean" to rebuild the skybox tool (alternatively go into skyconv.c and change the file in any way (like adding/deleting a space) to specifically rebuild that tool). + * When increasing this, you should probably also increase the GFX pool size (the GFX_POOL_SIZE define above). + */ #define SKYBOX_SIZE 1 -// When this option is enabled, LODs will ONLY work on console. -// When this option is disabled, LODs will work regardless of whether console or emulator is used. -// Regardless of whether this setting is enabled or not, you can use gIsConsole to wrap your own code in a console check. +/** + * When this option is enabled, LODs will ONLY work on console. + * When this option is disabled, LODs will work regardless of whether console or emulator is used. + * Regardless of whether this setting is enabled or not, you can use gIsConsole to wrap your own code in a console check. + */ #define AUTO_LOD -// Enables Puppyprint, a display library for text and large images. -// Automatically enabled when PUPPYPRINT_DEBUG is enabled. +/** + * Enables Puppyprint, a display library for text and large images. + * Automatically enabled when PUPPYPRINT_DEBUG is enabled. + */ // #define PUPPYPRINT -// Disables AA (Improves console performance but causes visible seams between unconnected geometry). +/** + * Disables AA (Improves console performance but causes visible seams between unconnected geometry). + */ // #define DISABLE_AA -// Makes the coins ia8 64x64 instead of ia16 32x32. Uses new ia8 textures so that vanilla coins look better. +/** + * Makes the coins ia8 64x64 instead of ia16 32x32. Uses new ia8 textures so that vanilla coins look better. + */ #define IA8_COINS -// Similar to the above, but 30 FPS (Textures by InTheBeef, cleaned up by Arceveti). +/** + * Similar to the above, but 30 FPS (Textures by InTheBeef, cleaned up by Arceveti). + */ #define IA8_30FPS_COINS -// Use .rej microcode for certain objects (experimental - only should be used when F3DEX_GBI_2 is defined). -// For advanced users only. Does not work perfectly out the box, best used when exported actor models are -// using 64 vertex sizes, offered by Fast64 in the microcode menu. +/** + * Use .rej microcode for certain objects (experimental - only should be used when F3DEX_GBI_2 is defined). + * For advanced users only. Does not work perfectly out the box, best used when exported actor models are + * using 64 vertex sizes, offered by Fast64 in the microcode menu. + */ // #define OBJECTS_REJ /** @@ -54,37 +76,57 @@ */ // #define SILHOUETTE 127 -// Use 64x64 quarter shadow textures (Vanilla are 16x16). +/** + * Use 64x64 quarter shadow textures (Vanilla are 16x16). + */ #define HD_SHADOWS -// Makes certain objects (mainly trees) transparent when the camera gets close. +/** + * Makes certain objects (mainly trees) transparent when the camera gets close. + */ // #define OBJ_OPACITY_BY_CAM_DIST -// Fixes the game reading the ia8 burn smoke texture as an rgba16. +/** + * Fixes the game reading the ia8 burn smoke texture as an rgba16. + */ #define BURN_SMOKE_FIX -// Disables the fix to Koopa's unshelled model. +/** + * Disables the fix to Koopa's unshelled model. + */ #define KOOPA_KEEP_PINK_SHORTS -// Uses the star object's model in the star dance cutscene. -// This has a side effect of making the star dance star also transparent when Mario collects a transparent star. +/** + * Uses the star object's model in the star dance cutscene. + * This has a side effect of making the star dance star also transparent when Mario collects a transparent star. + */ // #define STAR_DANCE_USES_STARS_MODEL -// Lightweight directional lighting engine by Fazana. Intended for giving proximity and positional pointlights to small objects. -// NOTE: Still breaks occasionally, and PUPPYLIGHT_NODE might not work in areas that aren't area 1. +/** + * Lightweight directional lighting engine by Fazana. Intended for giving proximity and positional pointlights to small objects. + * NOTE: Still breaks occasionally, and PUPPYLIGHT_NODE might not work in areas that aren't area 1. + */ // #define PUPPYLIGHTS -// Uses the correct "up" vector for the guLookAtReflect call in geo_process_master_list_sub. -// It is sideways in vanilla, and since vanilla's environment map textures are sideways too, those will appear as sideways in-game if this is enabled. -// Make sure your custom environment map textures are the correct orientation. +/** + * Uses the correct "up" vector for the guLookAtReflect call in geo_process_master_list_sub. + * It is sideways in vanilla, and since vanilla's environment map textures are sideways too, those will appear as sideways in-game if this is enabled. + * Make sure your custom environment map textures are the correct orientation. + */ // #define FIX_REFLECT_MTX -// This improves performance a bit, and does not seem to break anything. +/** + * This improves performance a bit, and does not seem to break anything. + */ #define DISABLE_GRAPH_NODE_TYPE_FUNCTIONAL -// Disables all object shadows. You'll probably only want this either as a last resort for performance or if you're making a super stylized hack. +/** + * Disables all object shadows. You'll probably only want this either as a last resort for performance or if you're making a super stylized hack. + */ // #define DISABLE_SHADOWS -// Uses old shadow IDs for Fast64 compatibility. This is a temporary fix until Fast64 is updated to use the enum defines. -// NOTE: When this is enabled, The 49th hardcoded rectangle shadow will act as a regular circular shadow, due to Mario's shadow ID being 99 in vanilla. +/** + * Uses old shadow IDs for Fast64 compatibility. This is a temporary fix until Fast64 is updated to use the enum defines. + * NOTE: When this is enabled, The 49th hardcoded rectangle shadow will act as a regular circular shadow, due to Mario's shadow ID being 99 in vanilla. + */ #define LEGACY_SHADOW_IDS diff --git a/include/config/config_menu.h b/include/config/config_menu.h index 0eae45b5..c3909221 100644 --- a/include/config/config_menu.h +++ b/include/config/config_menu.h @@ -6,14 +6,20 @@ // -- EXIT COURSE SETTINGS -- -// Disables Exit Course. +/** + * Disables Exit Course. + */ // #define DISABLE_EXIT_COURSE -// Decides whether you can exit course while moving (has no effect if you disable Exit Course). +/** + * Decides whether you can exit course while moving (has no effect if you disable Exit Course). + */ #define EXIT_COURSE_WHILE_MOVING -// Decides which level, area and warp ID the "Exit Course" option takes you to (has no effect if you disable Exit Course). -// Ensure that the warp exists, or else the game will crash. +/** + * Decides which level, area and warp ID the "Exit Course" option takes you to (has no effect if you disable Exit Course). + * Ensure that the warp exists, or else the game will crash. + */ #define EXIT_COURSE_LEVEL LEVEL_CASTLE #define EXIT_COURSE_AREA 0x01 #define EXIT_COURSE_NODE 0x1F diff --git a/include/config/config_movement.h b/include/config/config_movement.h index 4d909c11..dddf8f25 100644 --- a/include/config/config_movement.h +++ b/include/config/config_movement.h @@ -4,83 +4,133 @@ * MOVEMENT SETTINGS * *********************/ -// Changes Mario's ground turn radius by making it dependent on the analog stick magnitude and speed. +/** + * Changes Mario's ground turn radius by making it dependent on the analog stick magnitude and speed. + */ // #define VELOCITY_BASED_TURN_SPEED -// Allows Mario to easily side flip when moving forwards at any speed. +/** + * Allows Mario to easily side flip when moving forwards at any speed. + */ // #define SIDE_FLIP_AT_LOW_SPEEDS -// Allows Mario to aim towards a new direction at the end of turning around, -// and allows Mario to turn around multiple times in a row. +/** + * Allows Mario to aim towards a new direction at the end of turning around, + * and allows Mario to turn around multiple times in a row. + */ // #define RESET_DIRECTION_WHEN_TURNING_AROUND -// Improved hanging: -// - Doesn't require holding down the A button. -// - Precise turning control. -// - Prevents falling from the edges. +/** + * Improved hanging: + * - Doesn't require holding down the A button. + * - Precise turning control. + * - Prevents falling from the edges. + */ #define BETTER_HANGING -// Change the movement speed when hanging from a ceiling (the vanilla value is 4.0f, has no effect if BETTER_HANGING is enabled). +/** + * Change the movement speed when hanging from a ceiling (the vanilla value is 4.0f, has no effect if BETTER_HANGING is enabled). + */ #define HANGING_SPEED 12.0f -// Prevents Mario from falling asleep while idle. +/** + * Prevents Mario from falling asleep while idle. + */ // #define NO_SLEEP -// Disables fall damage. +/** + * Disables fall damage. + */ #define NO_FALL_DAMAGE -// Disables the scream that mario makes when falling off a great height (this is separate from actual fall damage). +/** + * Disables the scream that mario makes when falling off a great height (this is separate from actual fall damage). + */ // #define NO_FALL_DAMAGE_SOUND -// Fall height for normal fall damage. Vanilla is 1150.0f. +/** + * Fall height for normal fall damage. Vanilla is 1150.0f. + */ #define FALL_DAMAGE_HEIGHT_SMALL 1150.0f -// Fall height for double fall damage. Vanilla is 3000.0f. +/** + * Fall height for double fall damage. Vanilla is 3000.0f. + */ #define FALL_DAMAGE_HEIGHT_LARGE 3000.0f -// Disables Mario getting stuck in snow and sand when falling. +/** + * Disables Mario getting stuck in snow and sand when falling. + */ // #define NO_GETTING_BURIED -// Prevents hands-free holding. +/** + * Prevents hands-free holding. + */ // #define HANDS_FREE_HOLDING_FIX -// Prevents Mario from losing his cap. +/** + * Prevents Mario from losing his cap. + */ // #define PREVENT_CAP_LOSS -// Enables Platform Displacement 2, also known as momentum patch. Makes Mario keep the momemtum from moving platforms. +/** + * Enables Platform Displacement 2, also known as momentum patch. Makes Mario keep the momemtum from moving platforms. + */ #define PLATFORM_DISPLACEMENT_2 -// Uses Shindou's pole behavior. +/** + * Uses Shindou's pole behavior. + */ // #define SHINDOU_POLES -// If A and Z are pressed on the same frame while running, Mario will long jump instead of ground pound. +/** + * If A and Z are pressed on the same frame while running, Mario will long jump instead of ground pound. + */ #define EASIER_LONG_JUMPS -// Enables the ability to hold Z while twirling to descend faster. +/** + * Enables the ability to hold Z while twirling to descend faster. + */ #define Z_TWIRL -// Disables bonks when ground pounding next to a wall. +/** + * Disables bonks when ground pounding next to a wall. + */ #define DISABLE_GROUNDPOUND_BONK -// Allows Mario to jump kick on steep surfaces that are set to be non slippery, instead of being forced to dive. +/** + * Allows Mario to jump kick on steep surfaces that are set to be non slippery, instead of being forced to dive. + */ #define JUMP_KICK_FIX -// Allows Mario to grab hangable ceilings from any state. +/** + * Allows Mario to grab hangable ceilings from any state. + */ #define HANGING_FIX -// The last frame after hitting a wall that will be considered a firsty when wallkicking. +/** + * The last frame after hitting a wall that will be considered a firsty when wallkicking. + */ #define FIRSTY_LAST_FRAME 1 -// The maximum angle the player can wall kick, in degrees. 0..90. To allow 45 degree wall kicks, you must supply `46` to allow 45 and under. +/** + * The maximum angle the player can wall kick, in degrees. 0..90. To allow 45 degree wall kicks, you must supply `46` to allow 45 and under. + */ #define WALL_KICK_DEGREES 45 -// This is vanilla behavior, disable it to allow ledge grabbing regardless of floor pitch. +/** + * This is vanilla behavior, disable it to allow ledge grabbing regardless of floor pitch. + */ // #define LEDGE_GRABS_CHECK_SLOPE_ANGLE -// Disables BLJs and crushes SimpleFlips's dreams. +/** + * Disables BLJs and crushes SimpleFlips's dreams. + */ // #define DISABLE_BLJ -// Re-enables upwarping when entering water. Forces you to only enter water from the top. +/** + * Re-enables upwarping when entering water. Forces you to only enter water from the top. + */ // #define WATER_PLUNGE_UPWARP /** diff --git a/include/config/config_objects.h b/include/config/config_objects.h index 6763d076..6f2a9952 100644 --- a/include/config/config_objects.h +++ b/include/config/config_objects.h @@ -4,71 +4,123 @@ * SPECIFIC OBJECT SETTINGS * ****************************/ -// -- COIN -- +/************** + * -- COIN -- + **************/ -// The distance from Mario at which coin formations spawn their coins. Vanilla is 2000.0f. -// Set this to o->oDrawingDistance for a more reasonable range at the cost of performance. +/** + * The distance from Mario at which coin formations spawn their coins. Vanilla is 2000.0f. + * Set this to o->oDrawingDistance for a more reasonable range at the cost of performance. + */ #define COIN_FORMATION_DISTANCE 2000.0f -// Moving Coins flicker and disappear when they hit lava instead of being instantly deleted. +/** + * Moving Coins flicker and disappear when they hit lava instead of being instantly deleted. + */ #define COIN_LAVA_FLICKER -// Allows for retries on collecting the remaining blue coins from a blue coin switch. +/** + * Allows for retries on collecting the remaining blue coins from a blue coin switch. + */ // #define BLUE_COIN_SWITCH_RETRY -// -- GOOMBA -- +/**************** + * -- GOOMBA -- + ****************/ -// Tiny Goombas (from THI) always drop their coin. +/** + * Tiny Goombas (from THI) always drop their coin. + */ // #define TINY_GOOMBA_ALWAYS_DROPS_COIN -// Floombas! These fellas sport custom behaviors (bhvFloomba, bhvFloombaTripletSpawner) and of course the iconic Floomba texture. -// Also supports macros (macro_floomba, macro_huge_floomba, macro_tiny_floomba, macro_floomba_triplet_spawner, macro_floomba_quintuplet_spawner). +/** + * Floombas! These fellas sport custom behaviors (bhvFloomba, bhvFloombaTripletSpawner) and of course the iconic Floomba texture. + * Also supports macros (macro_floomba, macro_huge_floomba, macro_tiny_floomba, macro_floomba_triplet_spawner, macro_floomba_quintuplet_spawner). + */ #define FLOOMBAS -// -- HOOT -- +/************** + * -- HOOT -- + **************/ -// Uses intendedYaw to control Hoot instead of the raw left and right inputs. +/** + * Uses intendedYaw to control Hoot instead of the raw left and right inputs. + */ #define HOOT_YAW_FIX -// Causes leaf particles to occasionally fall from trees which contain Hoot. +/** + * Causes leaf particles to occasionally fall from trees which contain Hoot. + */ #define HOOT_TREE_PARTICLES -// -- MR I -- +/************** + * -- MR I -- + **************/ -// Enables Mr I to shoot his particle in any direction. +/** + * Enables Mr I to shoot his particle in any direction. + */ // #define MR_I_PITCH_SHOOTING -// -- WATER RING -- +/******************** + * -- WATER RING -- + ********************/ -// Fix the water rings in DDD by checking for interaction rather than normals. +/** + * Fix the water rings in DDD by checking for interaction rather than normals. + */ #define FIX_WATER_RINGS -// -- POWER STAR -- +/******************** + * -- POWER STAR -- + ********************/ -// Collecting a Power Star will fully heal Mario. +/** + * Collecting a Power Star will fully heal Mario. + */ #define POWER_STARS_HEAL -// -- 1-UP MUSHROOM -- +/********************** + * -- 1-UP MUSHROOM -- + **********************/ -// Collecting a 1-Up Mushroom will fully heal Mario. +/** + * Collecting a 1-Up Mushroom will fully heal Mario. + */ #define MUSHROOMS_HEAL -// -- PLATFORM ON TRACK -- +/*************************** + * -- PLATFORM ON TRACK -- + ***************************/ -// Allows the speed of a platform on a track to be controlled by standing near the front or back of it. +/** + * Allows the speed of a platform on a track to be controlled by standing near the front or back of it. + */ // #define CONTROLLABLE_PLATFORM_SPEED -// -- CHAIN CHOMP -- +/********************* + * -- CHAIN CHOMP -- + *********************/ -// The number of chain balls the Chain Chomp has. Vanilla is 5. +/** + * The number of chain balls the Chain Chomp has. Vanilla is 5. + */ #define CHAIN_CHOMP_NUM_SEGMENTS 5 -// -- POKEY -- +/*************** + * -- POKEY -- + ***************/ -// The number of parts Pokey has, including the head. Vanilla is 5, max is 30. +/** + * The number of parts Pokey has, including the head. Vanilla is 5, max is 30. + */ #define POKEY_NUM_SEGMENTS 5 -// -- WIGGLER -- +/***************** + * -- WIGGLER -- + *****************/ -// The number of segments Wiggler has, not including the head. Vanilla is 4. +/** + * The number of segments Wiggler has, not including the head. Vanilla is 4. + */ #define WIGGLER_NUM_SEGMENTS 4 diff --git a/include/config/config_rom.h b/include/config/config_rom.h index 9866b51f..14ddd21c 100644 --- a/include/config/config_rom.h +++ b/include/config/config_rom.h @@ -4,19 +4,27 @@ * ROM SETTINGS * ****************/ -// Internal ROM name. NEEDS TO BE **EXACTLY** 20 CHARACTERS. Can't be 19 characters, can't be 21 characters. You can fill it with spaces. -// The end quote should be here: " +/** + * Internal ROM name. NEEDS TO BE **EXACTLY** 20 CHARACTERS. Can't be 19 characters, can't be 21 characters. You can fill it with spaces. + * The end quote should be here: " + */ #define INTERNAL_ROM_NAME "HackerSM64 " -// Enables Rumble Pak Support. -// Currently not recommended, as it may cause random crashes. +/** + * Enables Rumble Pak Support. + * Currently not recommended, as it may cause random crashes. + */ // #define ENABLE_RUMBLE (1 || VERSION_SH) -// Screen Size Defines. +/** + * Screen Size Defines. + */ #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 -// Height of the black borders at the top and bottom of the screen for NTSC Versions. You can set it to different values for console and emulator. -// There is generally no reason to have a value other than 0 for emulator. As for console, it provides a (small) performance boost. +/** + * Height of the black borders at the top and bottom of the screen for NTSC Versions. You can set it to different values for console and emulator. + * There is generally no reason to have a value other than 0 for emulator. As for console, it provides a (small) performance boost. + */ #define BORDER_HEIGHT_CONSOLE 0 #define BORDER_HEIGHT_EMULATOR 0 diff --git a/include/config/config_world.h b/include/config/config_world.h index 2840d33a..08ef1548 100644 --- a/include/config/config_world.h +++ b/include/config/config_world.h @@ -30,10 +30,14 @@ * 64x64 collision cells. */ -// Set this to the extended bounds mode you want, then do "make clean". +/** + * Set this to the extended bounds mode you want, then do "make clean". + */ #define EXTENDED_BOUNDS_MODE 1 -// Don't touch the stuff past this point unless you know what you're doing! +/************************************************************************** + * Don't touch the stuff past this point unless you know what you're doing! + **************************************************************************/ #if EXTENDED_BOUNDS_MODE == 0 // 1x, normal cell size #define LEVEL_BOUNDARY_MAX 0x2000L // 8192 @@ -63,8 +67,12 @@ STATIC_ASSERT(((EXTENDED_BOUNDS_MODE >= 0) && (EXTENDED_BOUNDS_MODE <= 3)), "You must set a valid extended bounds mode!"); -// The amount of cells in each axis in an area. +/** + * The amount of cells in each axis in an area. + */ #define NUM_CELLS (2 * LEVEL_BOUNDARY_MAX / CELL_SIZE) -// Use this to convert game units to cell coordinates. +/** + * Use this to convert game units to cell coordinates. + */ #define GET_CELL_COORD(p) ((((s32)(p) + LEVEL_BOUNDARY_MAX) / CELL_SIZE) & (NUM_CELLS - 1))