You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Compare commits
6 Commits
v2.3.0
...
develop/2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d35022122 | ||
|
|
28869901ec | ||
|
|
83da778f24 | ||
|
|
b3ee950f39 | ||
|
|
956e9e53bb | ||
|
|
bd79d6a45a |
@@ -9,9 +9,3 @@
|
||||
* 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
|
||||
|
||||
@@ -21,12 +21,17 @@
|
||||
#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.
|
||||
* -- DEBUG STARTUP SPAWN PARAMETERS --
|
||||
* Sets a level in order to boot straight into said level, skipping the title screen and file select.
|
||||
* This allows you to quickly test the level or location you're working on.
|
||||
* NOTE: STARTUP_SPAWN_LEVEL is required for the other parameters to have an effect.
|
||||
* NOTE: It is recommended to set STARTUP_SPAWN_POS in addition to STARTUP_SPAWN_AREA, otherwise the default position may be out of bounds.
|
||||
* NOTE: STARTUP_SPAWN_ANGLE is an s16 angle.
|
||||
*/
|
||||
// #define TEST_LEVEL LEVEL_BOB
|
||||
// #define STARTUP_SPAWN_LEVEL LEVEL_BOB
|
||||
// #define STARTUP_SPAWN_AREA 1
|
||||
// #define STARTUP_SPAWN_POS 0, 0, 0
|
||||
// #define STARTUP_SPAWN_ANGLE 0x0
|
||||
|
||||
/**
|
||||
* Enables debug level select. Hold L while the game boots to turn it on.
|
||||
|
||||
@@ -75,7 +75,10 @@
|
||||
|
||||
#ifdef DISABLE_ALL
|
||||
#undef DEBUG_ALL
|
||||
#undef TEST_LEVEL
|
||||
#undef STARTUP_SPAWN_LEVEL
|
||||
#undef STARTUP_SPAWN_AREA
|
||||
#undef STARTUP_SPAWN_POS
|
||||
#undef STARTUP_SPAWN_ANGLE
|
||||
#undef DEBUG_LEVEL_SELECT
|
||||
#undef ENABLE_DEBUG_FREE_MOVE
|
||||
#undef VANILLA_DEBUG
|
||||
@@ -87,6 +90,7 @@
|
||||
#undef COMPLETE_SAVE_FILE
|
||||
#undef DEBUG_FORCE_CRASH_ON_BOOT
|
||||
#undef USE_PROFILER
|
||||
#undef ENABLE_CREDITS_BENCHMARK
|
||||
#endif // DISABLE_ALL
|
||||
|
||||
#ifdef DEBUG_ALL
|
||||
@@ -112,6 +116,12 @@
|
||||
#define COMPLETE_SAVE_FILE
|
||||
#endif // DEBUG_ALL
|
||||
|
||||
#ifndef STARTUP_SPAWN_LEVEL
|
||||
#undef STARTUP_SPAWN_AREA
|
||||
#undef STARTUP_SPAWN_POS
|
||||
#undef STARTUP_SPAWN_ANGLE
|
||||
#endif // STARTUP_SPAWN_LEVEL
|
||||
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
#undef PUPPYPRINT
|
||||
#define PUPPYPRINT
|
||||
@@ -125,6 +135,17 @@
|
||||
#endif // COMPLETE_SAVE_FILE
|
||||
|
||||
|
||||
/*****************
|
||||
* config_benchmark.h
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_CREDITS_BENCHMARK
|
||||
#define DEBUG_ALL
|
||||
#define ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS
|
||||
#define STARTUP_SPAWN_LEVEL LEVEL_CASTLE_GROUNDS
|
||||
#endif
|
||||
|
||||
|
||||
/*****************
|
||||
* config_camera.h
|
||||
*/
|
||||
|
||||
@@ -14,8 +14,8 @@ const LevelScript level_script_entry[] = {
|
||||
INIT_LEVEL(),
|
||||
SLEEP(/*frames*/ 2),
|
||||
BLACKOUT(/*active*/ FALSE),
|
||||
#ifdef TEST_LEVEL
|
||||
SET_REG(/*value*/ TEST_LEVEL),
|
||||
#ifdef STARTUP_SPAWN_LEVEL
|
||||
SET_REG(/*value*/ STARTUP_SPAWN_LEVEL),
|
||||
EXECUTE(/*seg*/ SEGMENT_GLOBAL_LEVEL_SCRIPT, /*script*/ _scriptsSegmentRomStart, /*scriptEnd*/ _scriptsSegmentRomEnd, /*entry*/ level_main_scripts_entry),
|
||||
#else
|
||||
SET_REG(/*value*/ 0),
|
||||
|
||||
@@ -692,6 +692,10 @@ static void level_cmd_unload_area(void) {
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
#ifdef STARTUP_SPAWN_LEVEL
|
||||
static u8 sFirstWarp = TRUE;
|
||||
#endif
|
||||
|
||||
static void level_cmd_set_mario_start_pos(void) {
|
||||
gMarioSpawnInfo->areaIndex = CMD_GET(u8, 2);
|
||||
|
||||
@@ -700,7 +704,25 @@ static void level_cmd_set_mario_start_pos(void) {
|
||||
#else
|
||||
vec3s_copy(gMarioSpawnInfo->startPos, CMD_GET(Vec3s, 6));
|
||||
#endif
|
||||
vec3s_set(gMarioSpawnInfo->startAngle, 0, CMD_GET(s16, 4) * 0x8000 / 180, 0);
|
||||
vec3s_set(gMarioSpawnInfo->startAngle, 0x0, degrees_to_angle(CMD_GET(s16, 4)), 0x0);
|
||||
|
||||
#ifdef STARTUP_SPAWN_LEVEL
|
||||
|
||||
if (sFirstWarp) {
|
||||
sFirstWarp = FALSE;
|
||||
#ifdef STARTUP_SPAWN_AREA
|
||||
if (gAreaData[STARTUP_SPAWN_AREA].terrainData != NULL) {
|
||||
gMarioSpawnInfo->areaIndex = STARTUP_SPAWN_AREA;
|
||||
}
|
||||
#endif
|
||||
#ifdef STARTUP_SPAWN_POS
|
||||
vec3s_set(gMarioSpawnInfo->startPos, STARTUP_SPAWN_POS);
|
||||
#endif
|
||||
#ifdef STARTUP_SPAWN_ANGLE
|
||||
gMarioSpawnInfo->startAngle[1] = STARTUP_SPAWN_ANGLE;
|
||||
#endif
|
||||
}
|
||||
#endif // STARTUP_SPAWN_LEVEL
|
||||
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user