You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
HackerSM64 v2.0.0
* buffers: refresh 15 and revert to base decomp * behavior script * color helper functions * extended bounds * egeo_layout * fixed model ids * camera conf improved * message panel ucode small * graph node * level script * mathutil updates * mathutil updates (allow unused funcs) * behaviors a - beta_fish * Add librtc and fix some data declarations * Move GRUCODE define to proper location in makefile * Refresh 15 * extra * Make ROM name smaller and change messages printed on build a bit * Fix console (lol) * Update UNF to latest master * Make ucode load from .o's (and also fix Super3D) * Fix crash with rumble + custom mario model * graph node and mathutil * removed behaviors * Ldtob documentation * _Putfld labeling * area * behavior actions * camera * debug updates * bubbles * envfx snow * farcall helpers * game init * geo misc * hud * only check if VC on render init * ingame menu * revert goddard to base decomp * insn disasm * interaction documentation * level geo * level update defines * macro special objects formatting changes * main.h documentation * map parser documentation & formatting * airborne documentation * mario actions automatic documentation * mario actions cutscene documentation * mario actions moving documentation and options * mario actions object documentation and options * mario stationary documentation * mario submerged documentation * mario misc documentation * mario step: ledge grab fixes and documentation * mario documentation * memory.h documentation * moving textures * object behaviors * object collision * fix flamethrower bug * object helpers * object list processor documentation * paintings * platform displacement * print / printf * puppycam absf * puppyprint updates and formatting changes * rendering graph node performance optimizations * rumble opt and doc * hqvm back to ultrasm64 * save file documentation and unlock defines * s2d engine * reset various files to ultrasm64 * file select * intro geo documentation * screen transition documentation * segment2.h * shadow overhaul * skybox refactor * sound init: clean up define usage + documentation * spawn object optimizations and documentation * spawn sound cleanup * sram to ultrasm64 * star select cleanup * title screen cleanup * dialogs / text * rename stomp smoke * stomp smoke -> small water splash * updated README * compilation flags * optimized file positions + support function/data sections * surface collision performance improvements * surface load optimizations * camera conf documentation * Allow easier command for opening puppyprint debug * Rearranged framebuffers & fixed puppyprint console printing * Fix shadow scaling and shifting * Fix SILHOUETTE, OBJECTS_REJ, and ucode loading, also clean up render phase system a bit. * Fixed build with BETTER_HANGING off * Clean up OBJECTS_REJ ifdefs * Fix duplicate comment & graph render layers/flags bitmask * Fixed build with BETTER_HANGING off * Fix Fast64 importing by reverting sSegmentTable change * Readded missing functions that caused build errors with Mario head enabled * Fixed clang compilation issues * Add INTER mode for geo_update_layer_transparency * Fix build warnings * bugfix: miscalculation in obj_turn_toward_object * Some puppytech fixes * Further Puppycamera fixes * Fix BUGFIX_DIALOG_TIME_STOP Fixes #136 * Fix sliding platform bparams * Add LEGACY_SHADOW_IDS define for Fast64 compatibility * Apply suggested changes * Better find_in_bounds_yaw_wdw_bob_thi ifdef * Fix build warnings for unused functions * Fixed stale reference bug from obj_mark_for_deletion change * Fixed incorrect digit for 100s #145 * Change groundpound-fix define and functionality to just disable bonking * Fixed puppyroll #134 * Adjust height value for terrain angle to kick in * fixed hi score flashing * Remove menudata backup (#131) Not considered important enough to keep * Fix fread() build warning * Add COURSE_NUM_TO_INDEX to save_file_get_star_flags check in bhv_unagi_init * Fix approach_s16 return value * Use boolean defines for oCapDoScaleVertically * Make the door lock a part of the key door model to eliminate z-fighting, also reduce z fighting on numbered doors with AUTO_LOD enabled. * Move flames to LAYER_TRANSPARENT_INTER * Resolved some compiler warnings and added FALL_THROUGH define (#168) * Address some more compiler warnings with different define toggles * Remove unnecessary fallthrough attribute * fixed geo_process_billboard floating point exception * Allow water to face any direction * Initialize focOffset so that BBH doesn't crash * Removed superfluous RDP commands when switching microcodes which would override scissor * Set OBJ_FLAG_DONT_CALC_COLL_DIST on bhvUkikiCage * Fix rumble build * Fixed UNLOCK_FPS strobing * Update src/game/object_helpers.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Update src/game/object_helpers.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Fix LEGACY_SHADOW_IDS id conflict * Use the vanilla default value for rotating fire bars if bparam2 is 0 * START_LEVEL safeguard * Fix some drawing distance issues caused by AUTO_COLLISION_DISTANCE * Fix rumble build * Fixed spline poll code using the wrong values for keyframes * Update readme with better credits Better credits for individual contributors * add arthur * added falco and moose * add fazana * le funny typo * added S2DEX engine to credits * silhouette + axo + ratio * remove specific callouts + add auto col distance * Update data/behavior_data.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Update data/behavior_data.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Update data/behavior_data.c Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> * Revert formatting changes to match vanilla decomp * Re-implement Y buffer for find_ceil * Re-implement POWER_STARS_HEAL for normal Power Stars * Start level comment & exit course comment/collapse * utilize reonucam technique for FAST_VERTICAL_CAMERA_MOVEMENT * Fix "MAX_REFERENCED_WALLS" typo * Allow stop_and_set_height_to_floor to work at any height if Mario is teleporting (#213) * Revert stop_and_set_height_to_floor to vanilla Fixes #208 * Fixed sAudioEnabled so that it disables audio CPU processing as well * Fixed puppyprint debug RDP us calculations * Renamed sAudioEnabled to gAudioEnabled * Replaced mtxf_to_mtx_asm with an equivalent implementation that supports WORLD_SCALE * Moved extended bounds and world scale configuration to a new config_world.h file * Default all objects to non-rej (#227) Fixes #221 (Default all objects to non-rej) * Fix #221 * Fix VISUAL_DEBUG breaking/crashing when OBJECTS_REJ is disabled (#211) * Fix VISUAL_DEBUG breaking/crashing when OBJECTS_REJ is disabled * Change vtl decrement in visual_surface_display from 6 to 3 Fixes #207 * Make area in SL igloo wider to prevent a softlock (#233) Fixes #210 * Fix coin formation coins being deleted if they spawn in the middle of a floor, also fix TTM slide coin position (#232) Fixes #201 * Make UNLOCK_ALL apply to more things * Fix wrong ifdef/ifndef in bhv_invisible_objects_under_bridge_init * Change chain chomp load/unload distances depending on number of segments (#237) Fixes #192 * added WATER_PLUNGE_UPWARP define * Add reonucam patch (#239) * added reonucam patch Fixes #218 * Fix how shadows handle water/transparency/height (#228) * Fix how shadows handle water/transparency/height * Change shadow check for flying carpets from a level specific check to a oPlatformOnTrackType check Fixes #179 * added reonucam credit * delete unnecesary patches * Apply suggested changes * murdered more patches * UNLOCK_ALL unlocks the cap boxes * UNLOCK_ALL unlocks cap boxes (slightly more epic edition) * revert ceil buffer * Renamed HD_INTRO_TEXTURES define, separated intro floombas * prevent double definition of floombas * actually prevent floomba redefinition * Develop/refactor default defines (#242) * Changed default config options * Added build dir to includePaths for pngs * disable NO_SLEEP by default * Disable puppyprint by default Sorry fazana 😔 * fix typos * add comment about BETTER_REVERB console perf * disable blue coin switch retry by default * Update config_audio.h Co-authored-by: Reonu <danileon95@gmail.com> Co-authored-by: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com> * revert air step line to vanilla to fix bitfs scaling platform issue (#247) Fixes #200 * Fix stuttering on thin slopes (#248) * Fix stuttering on thin slopes * Revert vec3f_find_ceil calls to vanilla * Rename vec3f_find_ceil to find_mario_ceil * Update src/engine/surface_collision.h Fixes #249 * Swap static and dynamic surface checks back to vanilla order (#253) * Swap static and dynamic surface checks back to vanilla order * re-enable DISABLE_ALL config Fixes #251 #252 * Fixed save and quitting while in widescreen (#257) * Fixed save and quitting while in widescreen * use define for the level * all my homies hate ifdefs * skip wall offsets < 0 (#255) Fixes #255 * #264: Document non-stop stars' issues (#267) * #264: Document non-stop stars' issues * Update include/config/config_game.h * nonstop vanilla comment * derive margin_radius from radius after capping at 200 (#266) Fixes #259 * Config cleanup/refactor (#269) * Moved puppyprint define to graphics / rearranged some debug defines for ease of access * Moved compatibility safeguards to config_safeguards.h * spacing and comment formatting * #272 Move GFX_POOL_SIZE to config_graphics.h * disable EASIER_DIALOG_TRIGGER by default * prevent redefining warnings * small ifdef typo * changed ifndef to undefs Fixes #262 Fixes #272 * Improved movement config documentation related to turning around (#271) Fixes #270 * rename CUSTOM_DEBUG, add comments (#275) * Update README.md (#277) * v2.0.0 Co-authored-by: CrashOveride95 <crashoveride953@gmail.com> Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com> Co-authored-by: n64 <n64> Co-authored-by: Fazana <52551480+FazanaJ@users.noreply.github.com> Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com> Co-authored-by: aglab2 <aglab3@gmail.com> Co-authored-by: gheskett <gheskett@gmail.com> Co-authored-by: Reonu <danileon95@gmail.com> Co-authored-by: Axollyon <20480418+Axollyon@users.noreply.github.com> Co-authored-by: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com>
This commit is contained in:
15
include/config/config_audio.h
Normal file
15
include/config/config_audio.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
/******************
|
||||
* AUDIO SETTINGS *
|
||||
******************/
|
||||
|
||||
// Fixes the castle music sometimes triggering after getting a dialog
|
||||
#define CASTLE_MUSIC_FIX
|
||||
|
||||
// Increase audio heap size to allow for more concurrent notes to be played and for more custom sequences/banks to be imported (not supported for SH)
|
||||
#define EXPAND_AUDIO_HEAP
|
||||
|
||||
// Use 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
|
||||
17
include/config/config_benchmark.h
Normal file
17
include/config/config_benchmark.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
/**********************
|
||||
* BENCHMARK SETTINGS *
|
||||
**********************/
|
||||
/**
|
||||
* 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
|
||||
#define DEBUG_ALL
|
||||
#define ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS
|
||||
#define TEST_LEVEL LEVEL_CASTLE_GROUNDS
|
||||
#endif
|
||||
54
include/config/config_camera.h
Normal file
54
include/config/config_camera.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
/*******************
|
||||
* CAMERA SETTINGS *
|
||||
*******************/
|
||||
|
||||
// Force 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
|
||||
#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)
|
||||
#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)
|
||||
#define DEEP_WATER_CAMERA_MODE 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
|
||||
#define FAST_VERTICAL_CAMERA_MOVEMENT
|
||||
|
||||
// Enables "parallel lakitu camera" or "aglab cam" which lets you move the camera smoothly with the dpad
|
||||
#define PARALLEL_LAKITU_CAM
|
||||
|
||||
// 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.
|
||||
|
||||
/**********************************/
|
||||
/***** Vanilla config options *****/
|
||||
/**********************************/
|
||||
|
||||
// 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
|
||||
#ifdef ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS
|
||||
#define ENABLE_VANILLA_CAM_PROCESSING
|
||||
#endif
|
||||
25
include/config/config_collision.h
Normal file
25
include/config/config_collision.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
/**********************
|
||||
* 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.
|
||||
#define FAST_FLOOR_ALIGN 10
|
||||
|
||||
// Automatically calculate the optimal collision distance for an object based on its vertices.
|
||||
#define AUTO_COLLISION_DISTANCE
|
||||
|
||||
// Allow 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.
|
||||
#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.
|
||||
#define COLLISION_DATA_TYPE s16
|
||||
#define ROOM_DATA_TYPE s8
|
||||
13
include/config/config_cutscenes.h
Normal file
13
include/config/config_cutscenes.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
/*********************
|
||||
* CUTSCENE SETTINGS *
|
||||
*********************/
|
||||
|
||||
// -- CUTSCENE SKIPS --
|
||||
|
||||
// Skip peach letter cutscene
|
||||
#define PEACH_SKIP
|
||||
|
||||
// Uncomment this if you want to skip the title screen (Super Mario 64 logo)
|
||||
//#define SKIP_TITLE_SCREEN
|
||||
53
include/config/config_debug.h
Normal file
53
include/config/config_debug.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#pragma once
|
||||
|
||||
/******************
|
||||
* DEBUG SETTINGS *
|
||||
******************/
|
||||
|
||||
// Enables most debug options, including PUPPYPRINT_DEBUG.
|
||||
// #define DEBUG_ALL
|
||||
|
||||
// Disables all debug options (except PUPPYPRINT)
|
||||
#define DISABLE_ALL
|
||||
|
||||
// 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
|
||||
|
||||
// Enable debug level select. Hold L while the game boots to turn it on.
|
||||
#define DEBUG_LEVEL_SELECT
|
||||
|
||||
// Enable debug free move (DPad up to enter, A to exit).
|
||||
#define ENABLE_DEBUG_FREE_MOVE
|
||||
|
||||
// Include a custom, enhanced performance profiler. (Enables PUPPYPRINT by default in config_safeguards).
|
||||
// #define PUPPYPRINT_DEBUG 1
|
||||
|
||||
// Use 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 DPAD left to show the debug UI.
|
||||
// #define VANILLA_STYLE_CUSTOM_DEBUG
|
||||
|
||||
// Visual debug enables some collision visuals. Tapping Right on the dpad 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
|
||||
|
||||
// Open 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.
|
||||
// #define COMPLETE_SAVE_FILE
|
||||
|
||||
// Removes the limit on FPS
|
||||
// #define UNLOCK_FPS
|
||||
|
||||
// Include vanilla debug functionality.
|
||||
// #define VANILLA_DEBUG
|
||||
|
||||
// Forces a crash when the game starts. Useful for debugging the crash screen.
|
||||
// #define DEBUG_FORCE_CRASH_ON_BOOT
|
||||
75
include/config/config_game.h
Normal file
75
include/config/config_game.h
Normal file
@@ -0,0 +1,75 @@
|
||||
#pragma once
|
||||
|
||||
/*****************
|
||||
* GAME SETTINGS *
|
||||
*****************/
|
||||
|
||||
/**
|
||||
* Enables some mechanics that change behavior depending on hardcoded level numbers.
|
||||
* You may also need to change sLevelsWithRooms in object_helpers.c
|
||||
* TODO: separate this into separate defines, behavior params, or make these mechanics otherwise dynamic
|
||||
*/
|
||||
// #define ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS
|
||||
|
||||
// Disable lives and hide the lives counter
|
||||
#define DISABLE_LIVES
|
||||
|
||||
// Save number of lives to the save file (Does nothing if DISABLE_LIVES is enabled)
|
||||
#define SAVE_NUM_LIVES
|
||||
|
||||
// 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
|
||||
#define MAX_NUM_LIVES 100
|
||||
|
||||
// This can be 0..32767
|
||||
#define MAX_NUM_COINS 999
|
||||
|
||||
// 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.
|
||||
#define X_COIN_STAR 100
|
||||
|
||||
/*
|
||||
* Stars don't kick you out of the level (does not play nicely with vanilla)
|
||||
* In v2.0 there are numerous issues with this define that can be seen here https://github.com/Reonu/HackerSM64/issues/258
|
||||
* Use at your own risk.
|
||||
*/
|
||||
// #define NON_STOP_STARS
|
||||
|
||||
// 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)
|
||||
#define MODEL_ID_COUNT 256
|
||||
|
||||
// Number of supported areas per level.
|
||||
#define AREA_COUNT 8
|
||||
|
||||
// Makes signs and NPCs easier to talk to.
|
||||
// NOTE: Currently has issues with talking to Bowser post-fight,
|
||||
// https://github.com/Reonu/HackerSM64/issues/273
|
||||
// #define EASIER_DIALOG_TRIGGER
|
||||
|
||||
// Show 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 ALSO BUILD FROM JP/SH AND EU TO OBTAIN THE ASSETS]
|
||||
// If this is disabled, backup assets will be used.
|
||||
// #define COMPLETE_EN_US_SEGMENT2
|
||||
|
||||
/// 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.
|
||||
#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.
|
||||
#define PREVENT_DEATH_LOOP
|
||||
|
||||
// The level that the game starts in after file select. The levelscript needs to have a MARIO_POS command for this to work.
|
||||
#define START_LEVEL LEVEL_CASTLE_GROUNDS
|
||||
14
include/config/config_goddard.h
Normal file
14
include/config/config_goddard.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
/********************
|
||||
* GODDARD SETTINGS *
|
||||
********************/
|
||||
|
||||
// Uncomment this if you want to keep the mario head and not skip it
|
||||
// #define KEEP_MARIO_HEAD
|
||||
|
||||
// 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)
|
||||
#define DISABLE_DEMO
|
||||
86
include/config/config_graphics.h
Normal file
86
include/config/config_graphics.h
Normal file
@@ -0,0 +1,86 @@
|
||||
#pragma once
|
||||
|
||||
/*********************
|
||||
* GRAPHICS SETTINGS *
|
||||
*********************/
|
||||
|
||||
// Size of how large the master display list (gDisplayListHead) can be. 6400 is vanilla
|
||||
#define GFX_POOL_SIZE 10000
|
||||
|
||||
// Show a watermark in the title screen that reads "Made with HackerSM64", instead of the copyright message
|
||||
#define INTRO_CREDIT
|
||||
|
||||
// Spawn floombas in the title screen
|
||||
#define INTRO_FLOOMBAS
|
||||
|
||||
// Enable 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)
|
||||
#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.
|
||||
#define AUTO_LOD
|
||||
|
||||
// Include Puppyprint, a display library for text and large images.
|
||||
// Automatically included when PUPPYPRINT_DEBUG is enabled
|
||||
// #define PUPPYPRINT
|
||||
|
||||
// Disable 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.
|
||||
#define IA8_COINS
|
||||
|
||||
// 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 F3DZEX_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
|
||||
|
||||
/**
|
||||
* Mario's silhouette when behind solid objects/surfaces
|
||||
* Also enables new render layers, such as LAYER_ALPHA_DECAL.
|
||||
* The number is the intensity of the silhouette, from 0-255.
|
||||
* NOTE: The overlap between Mario's model parts is visible on certain HLE plugins.
|
||||
* Also, this also disables anti-aliasing on Mario.
|
||||
* NOTE: Regarding performance, silhouette seems to lose 1-2 frames on console.
|
||||
*/
|
||||
// #define SILHOUETTE 127
|
||||
|
||||
// Use 64x64 quarter shadow textures (Vanilla are 16x16).
|
||||
#define HD_SHADOWS
|
||||
|
||||
// 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.
|
||||
#define BURN_SMOKE_FIX
|
||||
|
||||
// Disable the fix to Koopa's unshelled model.
|
||||
#define KOOPA_KEEP_PINK_SHORTS
|
||||
|
||||
// Lightweight directional lighting engine by Fazana. Intended for giving proximity and positional pointlights to small objects.
|
||||
// NOTE: Stil breaks occasionally, and PUPPYLIGHT_NODE doesn't 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, they 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.
|
||||
#define DISABLE_GRAPH_NODE_TYPE_FUNCTIONAL
|
||||
|
||||
// Disables 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
|
||||
|
||||
// Use 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
|
||||
15
include/config/config_interaction.h
Normal file
15
include/config/config_interaction.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
/************************
|
||||
* INTERACTION SETTINGS *
|
||||
************************/
|
||||
|
||||
// Various interaction related settings, bug fixes or QoL changes
|
||||
|
||||
/**
|
||||
* This bug allows mario to move when initiating a dialog,
|
||||
* just as long as mario doesn't enter an action that can
|
||||
* be interrupted with text
|
||||
* Uncomment this to fix this bug, and frustrate speedrunners
|
||||
*/
|
||||
// #define BUGFIX_DIALOG_TIME_STOP
|
||||
19
include/config/config_menu.h
Normal file
19
include/config/config_menu.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
/*****************
|
||||
* MENU SETTINGS *
|
||||
*****************/
|
||||
|
||||
// -- EXIT COURSE SETTINGS --
|
||||
|
||||
// Disable exit course
|
||||
//#define 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.
|
||||
#define EXIT_COURSE_LEVEL LEVEL_CASTLE
|
||||
#define EXIT_COURSE_AREA 0x01
|
||||
#define EXIT_COURSE_NODE 0x1F
|
||||
85
include/config/config_movement.h
Normal file
85
include/config/config_movement.h
Normal file
@@ -0,0 +1,85 @@
|
||||
#pragma once
|
||||
|
||||
/*********************
|
||||
* MOVEMENT SETTINGS *
|
||||
*********************/
|
||||
|
||||
// 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
|
||||
// #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
|
||||
// #define RESET_DIRECTION_WHEN_TURNING_AROUND
|
||||
|
||||
// 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)
|
||||
#define HANGING_SPEED 12.0f
|
||||
|
||||
// Prevents Mario from falling asleep while idle
|
||||
// #define NO_SLEEP
|
||||
|
||||
// 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)
|
||||
//#define NO_FALL_DAMAGE_SOUND
|
||||
|
||||
// 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
|
||||
#define FALL_DAMAGE_HEIGHT_LARGE 3000.0f
|
||||
|
||||
// Disables Mario getting stuck in snow and sand when falling
|
||||
// #define NO_GETTING_BURIED
|
||||
|
||||
// Prevents hands-free holding. (WARNING: Enabling this may make you a total buzzkill)
|
||||
// #define HANDS_FREE_HOLDING_FIX
|
||||
|
||||
// Prevents Mario losing his cap.
|
||||
//#define PREVENT_CAP_LOSS
|
||||
|
||||
// Platform displacement 2 also known as momentum patch. Makes Mario keep the momemtum from moving platforms. Doesn't break treadmills anymore!
|
||||
#define PLATFORM_DISPLACEMENT_2
|
||||
|
||||
// Use Shindou's pole behavior
|
||||
//#define SHINDOU_POLES
|
||||
|
||||
// If A and Z are pressed on the same frame, Mario will long jump instead of ground pound.
|
||||
#define EASIER_LONG_JUMPS
|
||||
|
||||
// Hold Z while twirling to descend faster
|
||||
#define Z_TWIRL
|
||||
|
||||
// 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
|
||||
#define JUMP_KICK_FIX
|
||||
|
||||
// Allow Mario to grab hangable ceilings from any state
|
||||
#define HANGING_FIX
|
||||
|
||||
// The last frame 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.
|
||||
#define WALL_KICK_DEGREES 45
|
||||
|
||||
// This is vanilla behavior, disable to allow ledge grabbing on
|
||||
// any surface angle
|
||||
// #define LEDGE_GRABS_CHECK_SLOPE_ANGLE
|
||||
|
||||
// Disable BLJs and crush SimpleFlips's dreams
|
||||
//#define DISABLE_BLJ
|
||||
|
||||
// Re-enable upwarping when entering water. Forces you to only enter water from the top
|
||||
// #define WATER_PLUNGE_UPWARP
|
||||
75
include/config/config_objects.h
Normal file
75
include/config/config_objects.h
Normal file
@@ -0,0 +1,75 @@
|
||||
#pragma once
|
||||
|
||||
/****************************
|
||||
* SPECIFIC OBJECT SETTINGS *
|
||||
****************************/
|
||||
|
||||
// -- COIN --
|
||||
|
||||
// The distance from Mario which coin formations spawn coins at.
|
||||
// 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.
|
||||
#define COIN_LAVA_FLICKER
|
||||
|
||||
// Allow for retries on collecting the remaining blue coins from a blue coin switch.
|
||||
//#define BLUE_COIN_SWITCH_RETRY
|
||||
|
||||
// -- GOOMBA --
|
||||
|
||||
// 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 support macros (macro_floomba, macro_huge_floomba, macro_tiny_floomba, macro_floomba_triplet_spawner, macro_floomba_quintuplet_spawner).
|
||||
#define FLOOMBAS
|
||||
|
||||
// -- HOOT --
|
||||
|
||||
// Use intendedYaw to control Hoot instead of raw left and right inputs.
|
||||
#define HOOT_YAW_FIX
|
||||
|
||||
// Leaf particles occasionally fall from trees which contain Hoot.
|
||||
#define HOOT_TREE_PARTICLES
|
||||
|
||||
// -- MR I --
|
||||
|
||||
// Uncomment to allow MR I to shoot his particle in any direction
|
||||
// #define MR_I_PITCH_SHOOTING
|
||||
|
||||
// -- WATER RING --
|
||||
|
||||
// Fix DDD water rings by checking for interaction rather than normals.
|
||||
// #define FIX_WATER_RINGS
|
||||
|
||||
// -- POWER STAR --
|
||||
|
||||
// Collecting a Power Star will fully heal Mario.
|
||||
#define POWER_STARS_HEAL
|
||||
|
||||
// -- 1-UP MUSHROOM --
|
||||
|
||||
// Collecting a 1-Up Mushroom will fully heal Mario.
|
||||
#define MUSHROOMS_HEAL
|
||||
|
||||
// -- PLATFORM ON TRACK --
|
||||
|
||||
// The speed of a platform on a track can be controlled by standing near the front or back of it
|
||||
//#define CONTROLLABLE_PLATFORM_SPEED
|
||||
|
||||
// -- CHAIN CHOMP --
|
||||
|
||||
// The number of chain balls the Chain Chomp has. Vanilla is 5.
|
||||
#define CHAIN_CHOMP_NUM_SEGMENTS 5
|
||||
|
||||
// -- POKEY --
|
||||
|
||||
// The number of parts Pokey has, including the head. Vanilla is 5, max is 30.
|
||||
#define POKEY_NUM_SEGMENTS 5
|
||||
|
||||
// -- WIGGLER --
|
||||
|
||||
// The number of segments Wiggler has, not including the head. Vanilla is 4.
|
||||
#define WIGGLER_NUM_SEGMENTS 4
|
||||
25
include/config/config_rom.h
Normal file
25
include/config/config_rom.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
/****************
|
||||
* 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: "
|
||||
#define INTERNAL_ROM_NAME "HackerSM64 "
|
||||
|
||||
// Support Rumble Pak
|
||||
// Currently not recommended, as it may cause random crashes.
|
||||
//#define ENABLE_RUMBLE (1 || VERSION_SH)
|
||||
|
||||
// Clear RAM on boot
|
||||
#define CLEARRAM 1
|
||||
|
||||
// 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.
|
||||
#define BORDER_HEIGHT_CONSOLE 0
|
||||
#define BORDER_HEIGHT_EMULATOR 0
|
||||
164
include/config/config_safeguards.h
Normal file
164
include/config/config_safeguards.h
Normal file
@@ -0,0 +1,164 @@
|
||||
#pragma once
|
||||
|
||||
/*****************************
|
||||
* COMPATIBILITY SAFE GUARDS *
|
||||
*****************************/
|
||||
|
||||
/**
|
||||
* NOTE: Only mess with these if you know what you're doing!
|
||||
* These are put in place to insure that connected functionality works as intended.
|
||||
*/
|
||||
|
||||
|
||||
/*****************
|
||||
* config_graphics
|
||||
*/
|
||||
|
||||
#ifndef F3DZEX_GBI_2
|
||||
#undef OBJECTS_REJ // OBJECTS_REJ requires f3dzex.
|
||||
#endif // !F3DZEX_GBI_2
|
||||
|
||||
#ifndef F3DEX_GBI_SHARED
|
||||
#undef OBJECTS_REJ // Non F3DEX-based ucodes do NOT support ucode switching.
|
||||
#endif // !F3DEX_GBI_SHARED
|
||||
|
||||
#ifdef OBJECTS_REJ
|
||||
// Enable required ucodes.
|
||||
#define F3DEX2_REJ_GBI
|
||||
#define F3DLX2_REJ_GBI
|
||||
#endif // OBJECTS_REJ
|
||||
|
||||
|
||||
/*****************
|
||||
* config_debug
|
||||
*/
|
||||
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
#undef PUPPYPRINT
|
||||
#define PUPPYPRINT
|
||||
#endif
|
||||
|
||||
#ifdef COMPLETE_SAVE_FILE
|
||||
#undef UNLOCK_ALL
|
||||
#define UNLOCK_ALL
|
||||
#endif // COMPLETE_SAVE_FILE
|
||||
|
||||
#ifdef DEBUG_ALL
|
||||
#undef DEBUG_LEVEL_SELECT
|
||||
#define DEBUG_LEVEL_SELECT
|
||||
|
||||
#undef ENABLE_DEBUG_FREE_MOVE
|
||||
#define ENABLE_DEBUG_FREE_MOVE
|
||||
|
||||
#undef PUPPYPRINT
|
||||
#define PUPPYPRINT
|
||||
|
||||
#undef PUPPYPRINT_DEBUG
|
||||
#define PUPPYPRINT_DEBUG 1
|
||||
|
||||
#undef VISUAL_DEBUG
|
||||
#define VISUAL_DEBUG
|
||||
|
||||
#undef UNLOCK_ALL
|
||||
#define UNLOCK_ALL
|
||||
|
||||
#undef COMPLETE_SAVE_FILE
|
||||
#define COMPLETE_SAVE_FILE
|
||||
#endif // DEBUG_ALL
|
||||
|
||||
#ifdef DISABLE_ALL
|
||||
#undef DEBUG_ALL
|
||||
#undef TEST_LEVEL
|
||||
#undef DEBUG_LEVEL_SELECT
|
||||
#undef ENABLE_DEBUG_FREE_MOVE
|
||||
#undef VANILLA_DEBUG
|
||||
#undef VANILLA_STYLE_CUSTOM_DEBUG
|
||||
#undef PUPPYPRINT_DEBUG
|
||||
#undef PUPPYPRINT_DEBUG_CYCLES
|
||||
#undef VISUAL_DEBUG
|
||||
#undef UNLOCK_ALL
|
||||
#undef COMPLETE_SAVE_FILE
|
||||
#undef DEBUG_FORCE_CRASH_ON_BOOT
|
||||
#endif // DISABLE_ALL
|
||||
|
||||
|
||||
/*****************
|
||||
* config_camera
|
||||
*/
|
||||
|
||||
#ifdef FORCED_CAMERA_MODE
|
||||
#undef USE_COURSE_DEFAULT_MODE
|
||||
#define USE_COURSE_DEFAULT_MODE // Forced camera mode overwrites the default mode
|
||||
#endif
|
||||
|
||||
#ifndef WATER_SURFACE_CAMERA_MODE
|
||||
#define WATER_SURFACE_CAMERA_MODE CAMERA_MODE_WATER_SURFACE
|
||||
#endif
|
||||
|
||||
#ifndef DEEP_WATER_CAMERA_MODE
|
||||
#define DEEP_WATER_CAMERA_MODE CAMERA_MODE_BEHIND_MARIO
|
||||
#endif
|
||||
|
||||
#ifndef FLYING_CAMERA_MODE
|
||||
#define FLYING_CAMERA_MODE CAMERA_MODE_BEHIND_MARIO
|
||||
#endif
|
||||
|
||||
|
||||
/*****************
|
||||
* config_game
|
||||
*/
|
||||
|
||||
#ifdef DISABLE_LIVES
|
||||
#undef SAVE_NUM_LIVES
|
||||
#endif // DISABLE_LIVES
|
||||
|
||||
#ifndef START_LEVEL
|
||||
#define START_LEVEL LEVEL_CASTLE_GROUNDS
|
||||
#endif
|
||||
|
||||
|
||||
/*****************
|
||||
* config_goddard
|
||||
*/
|
||||
|
||||
#ifndef KEEP_MARIO_HEAD
|
||||
#undef GODDARD_EASTER_EGG
|
||||
|
||||
#undef DISABLE_DEMO
|
||||
#define DISABLE_DEMO
|
||||
#endif // !KEEP_MARIO_HEAD
|
||||
|
||||
/*****************
|
||||
* config_menu
|
||||
*/
|
||||
|
||||
#ifdef DISABLE_EXIT_COURSE
|
||||
#undef EXIT_COURSE_WHILE_MOVING
|
||||
#undef EXIT_COURSE_LEVEL
|
||||
#undef EXIT_COURSE_AREA
|
||||
#undef EXIT_COURSE_NODE
|
||||
#endif // DISABLE_EXIT_COURSE
|
||||
|
||||
|
||||
/*****************
|
||||
* config_objects
|
||||
*/
|
||||
|
||||
// Enable floombas if the intro floombas are enabled
|
||||
#ifdef INTRO_FLOOMBAS
|
||||
#undef FLOOMBAS
|
||||
#define FLOOMBAS
|
||||
#endif
|
||||
|
||||
|
||||
/*****************
|
||||
* config_rom
|
||||
*/
|
||||
|
||||
#ifndef TARGET_N64
|
||||
#undef BORDER_HEIGHT_CONSOLE
|
||||
#define BORDER_HEIGHT_CONSOLE 0
|
||||
|
||||
#undef BORDER_HEIGHT_EMULATOR
|
||||
#define BORDER_HEIGHT_EMULATOR 0
|
||||
#endif // !TARGET_N64
|
||||
87
include/config/config_world.h
Normal file
87
include/config/config_world.h
Normal file
@@ -0,0 +1,87 @@
|
||||
#pragma once
|
||||
|
||||
// For the static assert macro
|
||||
#include "macros.h"
|
||||
|
||||
/**
|
||||
* World scale value. This allows you to scale down geometry by the given amount, which allows for larger levels
|
||||
* without the distortion you would otherwise get. Larger world scale comes at a cost of precision, which
|
||||
* can increase Z-fighting. Values above 4 should not be necessary.
|
||||
*
|
||||
* Uncomment this out to specifically set it, otherwise world scale will be based off of your extended bounds mode
|
||||
*/
|
||||
// #define WORLD_SCALE 1
|
||||
|
||||
|
||||
/*
|
||||
0: Regular bounds
|
||||
Same as vanilla sm64, boundaries are (-8192 to 8191)
|
||||
16x16 collision cells.
|
||||
1: 2x extended bounds
|
||||
level boundaries are twice as big (-16384 to 16383)
|
||||
Collision calculations remain as fast as vanilla, at the cost of using more RAM.
|
||||
32x32 collision cells.
|
||||
2: Regular bounds (performance)
|
||||
Same boundaries as vanilla (-8192 to 8191), but with twice the amount of collision cells
|
||||
Trades more RAM usage for faster collision calculations.
|
||||
32x32 collision cells.
|
||||
3: 4x extended bounds
|
||||
level boundaries are 4 times as big (-32768 to 32767)
|
||||
Collision calculations remain as fast as vanilla, at the cost of using far more RAM (16 times vanilla).
|
||||
64x64 collision cells.
|
||||
|
||||
If you see "SURFACE POOL FULL" or "SURFACE NODE POOL FULL" in game, you should increase
|
||||
SURFACE_POOL_SIZE or SURFACE_NODE_POOL_SIZE, respectively, or reduce the amount of
|
||||
collision surfaces in your level.
|
||||
*/
|
||||
|
||||
// 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!
|
||||
|
||||
#if EXTENDED_BOUNDS_MODE == 0 // 1x, normal cell size
|
||||
#define LEVEL_BOUNDARY_MAX 0x2000L // 8192
|
||||
#define CELL_SIZE 0x400 // 1024, NUM_CELLS = 16
|
||||
#ifndef WORLD_SCALE
|
||||
#define WORLD_SCALE 1
|
||||
#endif
|
||||
#elif EXTENDED_BOUNDS_MODE == 1 // 2x, normal cell size
|
||||
#define LEVEL_BOUNDARY_MAX 0x4000L // 16384
|
||||
#define CELL_SIZE 0x400 // 1024, NUM_CELLS = 32
|
||||
#ifndef WORLD_SCALE
|
||||
#define WORLD_SCALE 2
|
||||
#endif
|
||||
#elif EXTENDED_BOUNDS_MODE == 2 // 1x, smaller cell size
|
||||
#define LEVEL_BOUNDARY_MAX 0x2000L // 8192
|
||||
#define CELL_SIZE 0x200 // 512, NUM_CELLS = 32
|
||||
#ifndef WORLD_SCALE
|
||||
#define WORLD_SCALE 1
|
||||
#endif
|
||||
#elif EXTENDED_BOUNDS_MODE == 3 // 4x, normal cell size
|
||||
#define LEVEL_BOUNDARY_MAX 0x8000L // 32768
|
||||
#define CELL_SIZE 0x400 // 1024, NUM_CELLS = 64
|
||||
#ifndef WORLD_SCALE
|
||||
#define WORLD_SCALE 4
|
||||
#endif
|
||||
#endif
|
||||
|
||||
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.
|
||||
#define NUM_CELLS (2 * LEVEL_BOUNDARY_MAX / CELL_SIZE)
|
||||
// The maximum amount of collision surfaces (static and dynamic combined)
|
||||
#define SURFACE_POOL_SIZE (LEVEL_BOUNDARY_MAX / 2) // Vanilla: 2300
|
||||
// The maximum amount of SurfaceNodes (static and dynamic combined).
|
||||
// Each cell has a SurfaceNode for every surface which intersects it,
|
||||
// so each cell a Surface intersects with gets its own SurfaceNode,
|
||||
// so larger surfaces means more SurfaceNodes.
|
||||
// Multiply SURFACE_POOL_SIZE by the average amount of cells the surfaces intersect.
|
||||
#define SURFACE_NODE_POOL_SIZE (SURFACE_POOL_SIZE * 4) // Vanilla: 7000
|
||||
|
||||
// Flags for error messages
|
||||
#define NOT_ENOUGH_ROOM_FOR_SURFACES (1 << 0)
|
||||
#define NOT_ENOUGH_ROOM_FOR_NODES (1 << 1)
|
||||
|
||||
// Use this to convert game units to cell coordinates
|
||||
#define GET_CELL_COORD(p) ((((s32)(p) + LEVEL_BOUNDARY_MAX) / CELL_SIZE) & (NUM_CELLS - 1));
|
||||
Reference in New Issue
Block a user