From feff004ef9dce59062c253f86914b1d2f14ea2b8 Mon Sep 17 00:00:00 2001 From: Arceveti Date: Sun, 2 Jan 2022 18:46:31 -0800 Subject: [PATCH 01/42] Fix hardcoded cos values in sm64.h --- include/sm64.h | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/include/sm64.h b/include/sm64.h index 7b8bb683..af7b7232 100644 --- a/include/sm64.h +++ b/include/sm64.h @@ -32,28 +32,30 @@ // Common cos values for degrees, often used for surface Y normals // These are different than coss() -#define COS1 0.9998477f -#define COS5 0.9961947f -#define COS10 0.9848077f -#define COS15 0.9659258f -#define COS20 0.9396926f -#define COS25 0.9063078f // ledge grabs -#define COS30 0.8660254f -#define COS35 0.85264016f -#define COS36 0.8443279f -#define COS38 0.7880108f // mario_floor_is_slippery default -#define COS40 0.80901699f -#define COS45 0.76040596f -#define COS50 0.70710678f // SURFACE_FLAG_X_PROJECTION -#define COS55 0.64944805f -#define COS60 0.58778525f -#define COS65 0.52249856f -#define COS70 0.4539905f +#define COS0 1.0f +#define COS1 0.99984770f // mario_floor_is_slippery, mario_floor_is_slope +#define COS5 0.99619470f // mario_floor_is_slope +#define COS10 0.98480775f // act_butt_slide_air, act_hold_butt_slide_air, mario_floor_is_slippery, mario_floor_is_slope +#define COS15 0.96592583f // mario_floor_is_slope +#define COS20 0.93969262f // mario_floor_is_slippery, mario_floor_is_slope, mario_floor_is_steep +#define COS25 0.90630779f // ledge grabs +#define COS30 0.86602540f // should_get_stuck_in_ground, mario_floor_is_steep +#define COS35 0.81915204f +#define COS36 0.80901699f +#define COS38 0.78801075f // mario_floor_is_slippery default +#define COS40 0.76604444f +#define COS45 0.70710678f // SURFACE_FLAG_X_PROJECTION +#define COS50 0.64278761f +#define COS55 0.57357644f +#define COS60 0.5f +#define COS65 0.42261826f +#define COS70 0.34202014f #define COS73 0.29237169f // common_landing_cancels, check_common_idle_cancels, check_common_hold_idle_cancels -#define COS75 0.38268343f +#define COS75 0.25881905f #define COS78 0.20791169f #define COS80 0.17364818f // braking action -#define COS85 0.23344536f +#define COS85 0.087155743f +#define COS90 0.0f enum RenderLayers { LAYER_FORCE, From 9caafc54eb3940d76cdcfb54223da211275bb481 Mon Sep 17 00:00:00 2001 From: Arceveti Date: Tue, 4 Jan 2022 22:18:35 -0800 Subject: [PATCH 02/42] Fix build warning when NO_GETTING_BURIED is enabled --- src/game/mario_actions_airborne.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index 13c2b626..433e6cf6 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -116,11 +116,12 @@ s32 check_kick_or_dive_in_air(struct MarioState *m) { return FALSE; } -s32 should_get_stuck_in_ground(struct MarioState *m) { #ifdef NO_GETTING_BURIED +s32 should_get_stuck_in_ground(UNUSED struct MarioState *m) { return FALSE; +} #else - +s32 should_get_stuck_in_ground(struct MarioState *m) { u32 terrainType = m->area->terrainType & TERRAIN_MASK; struct Surface *floor = m->floor; s32 flags = floor->flags; @@ -134,8 +135,8 @@ s32 should_get_stuck_in_ground(struct MarioState *m) { } return FALSE; -#endif } +#endif s32 check_fall_damage_or_get_stuck(struct MarioState *m, u32 hardFallAction) { if (should_get_stuck_in_ground(m)) { From 84bbd2ae14e47efc57042fa09a785357e786a86a Mon Sep 17 00:00:00 2001 From: Arceveti Date: Tue, 4 Jan 2022 22:55:19 -0800 Subject: [PATCH 03/42] JP Baserom is no longer required for US build --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index eddd7ea6..bcfd6331 100644 --- a/Makefile +++ b/Makefile @@ -325,10 +325,6 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),) ifeq ($(DUMMY),FAIL) $(error Failed to extract assets) endif - DUMMY != $(PYTHON) extract_assets.py jp >&2 || echo FAIL - ifeq ($(DUMMY),FAIL) - $(error Failed to extract assets) - endif endif # Make tools if out of date From c9523aaa0b516184994e459ce494391bf109555c Mon Sep 17 00:00:00 2001 From: Arceveti Date: Tue, 4 Jan 2022 23:31:39 -0800 Subject: [PATCH 04/42] Fix wrong Y offset for Mr. I iris --- src/game/behaviors/mr_i.inc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/behaviors/mr_i.inc.c b/src/game/behaviors/mr_i.inc.c index 18c6c449..dc2eb1b2 100644 --- a/src/game/behaviors/mr_i.inc.c +++ b/src/game/behaviors/mr_i.inc.c @@ -76,7 +76,7 @@ void bhv_mr_i_iris_loop(void) { obj_build_transform_from_pos_and_angle(o, O_PARENT_RELATIVE_POS_INDEX, O_MOVE_ANGLE_INDEX); obj_translate_local(o, O_POS_INDEX, O_PARENT_RELATIVE_POS_INDEX); o->oFaceAnglePitch = o->oMoveAnglePitch; - o->oGraphYOffset = o->header.gfx.scale[1] * 100.0f; + o->oGraphYOffset = o->parentObj->oBehParams2ndByte ? 200.0f : 100.0f; } if (!o->parentObj->oMrIBlinking) { @@ -128,7 +128,7 @@ void mr_i_body_act_spin_death(void) { cur_obj_become_intangible(); spawn_mist_particles(); o->oMrIScale = scaleModifier * 0.6f; - if (o->oBehParams2ndByte != 0) { + if (o->oBehParams2ndByte != MR_I_BP_NORMAL) { o->oPosY += 100.0f; spawn_default_star(1370, 2000.0f, -320.0f); obj_mark_for_deletion(o); From 886d9841a8e0553027027ff05bef2ea2f5f4d8e9 Mon Sep 17 00:00:00 2001 From: Arceveti Date: Mon, 10 Jan 2022 18:27:08 -0800 Subject: [PATCH 05/42] Better Mr. I offset fix --- src/game/behaviors/mr_i.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/behaviors/mr_i.inc.c b/src/game/behaviors/mr_i.inc.c index dc2eb1b2..09099ebf 100644 --- a/src/game/behaviors/mr_i.inc.c +++ b/src/game/behaviors/mr_i.inc.c @@ -76,7 +76,7 @@ void bhv_mr_i_iris_loop(void) { obj_build_transform_from_pos_and_angle(o, O_PARENT_RELATIVE_POS_INDEX, O_MOVE_ANGLE_INDEX); obj_translate_local(o, O_POS_INDEX, O_PARENT_RELATIVE_POS_INDEX); o->oFaceAnglePitch = o->oMoveAnglePitch; - o->oGraphYOffset = o->parentObj->oBehParams2ndByte ? 200.0f : 100.0f; + o->oGraphYOffset = o->parentObj->oGraphYOffset; } if (!o->parentObj->oMrIBlinking) { From 0789cf118e9504275cfc5d43a6d4b7fa65f6a970 Mon Sep 17 00:00:00 2001 From: Arceveti Date: Mon, 10 Jan 2022 20:50:37 -0800 Subject: [PATCH 06/42] Only extract assets from JP/EU/SH roms if they exist --- Makefile | 20 +++++++++++++++++++- include/config/config_game.h | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bcfd6331..e0f8a992 100644 --- a/Makefile +++ b/Makefile @@ -323,7 +323,25 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),) ifeq ($(NOEXTRACT),0) DUMMY != $(PYTHON) extract_assets.py $(VERSION) >&2 || echo FAIL ifeq ($(DUMMY),FAIL) - $(error Failed to extract assets) + $(error Failed to extract assets from US ROM) + endif + ifneq (,$(wildcard baserom.jp.z64)) + DUMMY != $(PYTHON) extract_assets.py jp >&2 || echo FAIL + ifeq ($(DUMMY),FAIL) + $(error Failed to extract assets from JP ROM) + endif + endif + ifneq (,$(wildcard baserom.eu.z64)) + DUMMY != $(PYTHON) extract_assets.py eu >&2 || echo FAIL + ifeq ($(DUMMY),FAIL) + $(error Failed to extract assets from EU ROM) + endif + endif + ifneq (,$(wildcard baserom.sh.z64)) + DUMMY != $(PYTHON) extract_assets.py sh >&2 || echo FAIL + ifeq ($(DUMMY),FAIL) + $(error Failed to extract assets from SH ROM) + endif endif endif diff --git a/include/config/config_game.h b/include/config/config_game.h index 516e288b..f0803767 100644 --- a/include/config/config_game.h +++ b/include/config/config_game.h @@ -58,7 +58,7 @@ // 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] +// [MAKE SURE TO HAVE EU AND JP/SH BASEROMS TO OBTAIN THE ASSETS] // If this is disabled, backup assets will be used. // #define COMPLETE_EN_US_SEGMENT2 From 2329786f88e856b71db640270152911c11a22c89 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 12 Jan 2022 15:00:22 -0800 Subject: [PATCH 07/42] Make CLEARRAM mandatory (#297) --- include/config/config_rom.h | 3 --- src/boot/main.c | 8 ++------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/config/config_rom.h b/include/config/config_rom.h index bdc340bd..69961d17 100644 --- a/include/config/config_rom.h +++ b/include/config/config_rom.h @@ -12,9 +12,6 @@ // 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 diff --git a/src/boot/main.c b/src/boot/main.c index 7761f07a..72a91ce7 100644 --- a/src/boot/main.c +++ b/src/boot/main.c @@ -478,12 +478,10 @@ void thread1_idle(UNUSED void *arg) { } } -#if CLEARRAM -void ClearRAM(void) -{ +// Clear RAM on boot +void ClearRAM(void) { bzero(_mainSegmentEnd, (size_t)osMemSize - (size_t)OS_K0_TO_PHYSICAL(_mainSegmentEnd)); } -#endif #ifdef ISVPRINT extern u32 gISVDbgPrnAdrs; @@ -502,9 +500,7 @@ void osInitialize_fakeisv() { #endif void main_func(void) { -#if CLEARRAM ClearRAM(); -#endif __osInitialize_common(); #ifdef ISVPRINT osInitialize_fakeisv(); From 38c6e456f119a6c2e480ece74f57d88870c7c811 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Fri, 14 Jan 2022 19:37:56 -0800 Subject: [PATCH 08/42] Fix level enum conflict with 99+ levels (#307) --- include/level_table.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/level_table.h b/include/level_table.h index ace73e5b..77663764 100644 --- a/include/level_table.h +++ b/include/level_table.h @@ -14,8 +14,8 @@ enum LevelNum { LEVEL_COUNT, LEVEL_MAX = LEVEL_COUNT - 1, LEVEL_MIN = LEVEL_NONE + 1, - LEVEL_FILE_SELECT = 100, //! This probably breaks if you have 99+ levels - LEVEL_LEVEL_SELECT = (LEVEL_FILE_SELECT + 1) + LEVEL_FILE_SELECT = LEVEL_COUNT + 1, + LEVEL_LEVEL_SELECT = LEVEL_FILE_SELECT + 1, }; #undef STUB_LEVEL From 6ba4fcdba1310bfb565ce7a6f02e8db0c57b7e04 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Fri, 14 Jan 2022 19:38:10 -0800 Subject: [PATCH 09/42] Set oDrawingDistance to 4500 for WF breakable walls (#304) --- data/behavior_data.c | 1 + 1 file changed, 1 insertion(+) diff --git a/data/behavior_data.c b/data/behavior_data.c index 49d3de0f..946a3808 100644 --- a/data/behavior_data.c +++ b/data/behavior_data.c @@ -791,6 +791,7 @@ const BehaviorScript bhvWfBreakableWallLeft[] = { // WF breakable walls - common: OR_INT(oFlags, (OBJ_FLAG_ACTIVE_FROM_AFAR | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), SET_HITBOX(/*Radius*/ 300, /*Height*/ 400), + SET_FLOAT(oDrawingDistance, 4500), SET_INT(oIntangibleTimer, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_wf_breakable_wall_loop), From 3fac5ad0595f77b3506d414dff770663f527ec85 Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com> Date: Sat, 15 Jan 2022 01:09:34 -0500 Subject: [PATCH 10/42] Downgraded from F3DZEX2.08J to F3DZEX2.08I so that point lighting works on Jabo (#313) * Downgraded from F3DZEX2.08J to F3DZEX2.08I so that point lighting works on Jabo * Swapped to MM's rspboot to fix bug caused by MM's F3DZEX2 --- lib/PR/f3dzex/fifo/F3DZEX_NoN.bin | Bin 5680 -> 5680 bytes lib/PR/f3dzex/fifo/F3DZEX_NoN_data.bin | Bin 1056 -> 1056 bytes lib/rspboot.o | Bin 740 -> 1328 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/PR/f3dzex/fifo/F3DZEX_NoN.bin b/lib/PR/f3dzex/fifo/F3DZEX_NoN.bin index 169d1a405bbc500c5e286da6757a0891fd3f79e8..9aa6e70f1f83c002d4cb544f444ddfb298f96637 100644 GIT binary patch delta 13 Ucmdm>vq6W&OQ1n(Ba4n003JyLxBvhE delta 13 Ucmdm>vq6W&i-AFBBa4n002<>1DgXcg diff --git a/lib/PR/f3dzex/fifo/F3DZEX_NoN_data.bin b/lib/PR/f3dzex/fifo/F3DZEX_NoN_data.bin index 7a5275b18f5c91e6852e3b564f720a44d44311b0..c9d5d3a31160c1223eccced2ff94631d885460ec 100644 GIT binary patch delta 14 VcmZ3$v4CSkG$W(u<`~8!OaLQd1bqMi delta 14 VcmZ3$v4CSkG$W(e<`~8!OaLQj1bzSj diff --git a/lib/rspboot.o b/lib/rspboot.o index 7ca09ee2fdda42564378cf4046112b32815dfb66..30ce8f8a142199a85d32d531ffa46dfc90cff8cd 100644 GIT binary patch literal 1328 zcmb<-^>JflVq|~=Mg|TB1_mSn<_ZM{K?VjBunG+ZZU!ze3rcV>usHPy{y$ zFz_lQ{og3#z`*U5n;qhHHao<-H#@|GIfFqV`Rx^hxZG1`7r+ffk)LEdNh%FtBj;2>ibQavyHY%)rQq z98VCHjtmS8{ONh6U>SB6qB%aw}GRzDNObiSRyhwaz1_lNpBt8oR1A{aY zpOt}uK?{k`#=yX!kHiO=Z4cuMLhK7*U|>uDi9z}CAT|gKLhLU9u|XKj*DFb_C}Ge` zNi0cZ&`T;VX3#52P0!3r%V*H@^$ZBsOH9g4%SlWxX3#50DPqt|&nwkSEGa3ezq0w8$?z2eH;lEfqiz2cH02%Q0A zQRFa?|A@q(@CL;rC~QGm9AM!G;xI5U2ta8?XxxJ048&Xj6^BtUb?OWZ;5?2?9mp<_ z9-RUP2AG{N^CUnLPz*{7Aho6ikTd{FJ0NvC7#J9k)q%^&iMQkUkI}>Q|6DCQ!K4gIG`u YGf$9#fdNS!vpfR>LnKrUhytqv06ej|vj6}9 literal 740 zcmb<-^>JflVq|~=Mg|TB1_oq-F9IM*6A;0m!NA7A%E`bYsldp8pht;8K!KURUV&Yp z!J(aj!J&zR!J%1z!GXnqL8RgTKadVy1{Qu0&G3MM!=b@~!GS}8!H|QYL6m`k2_()8 z6*u7sVsPkC015Geh#n;d76T^+CIJTqb`T$CjssH!gMkwxgN(!fw;=HzB?gHeWd<3A z4?yg7Xu$6tP6igR{U9?K^h#1IN*MG~5=#;pii!)8^7BhVQY%V=OA?Dp zkOf@xQea${#F9i5d5{1|9&8{60S`}RNZ5k?1X2a%gZ<3Fz;HnbA}x z22tRo!N35HBak{~kRSsCBMXFvlQ4Cn3=9lVH6S^#x&ROh4a+h>{0S9i3}IkkD1hpP V=?9sq3KfH?JHo)gU;yR7DFAgJRxSVl From af34a81c06203296c481f889cb1f7f9ec4c4d8c6 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Sun, 16 Jan 2022 21:29:06 -0800 Subject: [PATCH 11/42] Fix credits text ifdef (#301) --- src/game/level_update.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/game/level_update.c b/src/game/level_update.c index 5dd5d777..6b2d27c0 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -65,6 +65,17 @@ const char *credits06[] = { "2COURSE DIRECTORS", "YOICHI YAMADA", "YASUHISA YAMA const char *credits07[] = { "2COURSE DESIGNERS", "KENTA USUI", "NAOKI MORI" }; const char *credits08[] = { "3COURSE DESIGNERS", "YOSHIKI HARUHANA", "MAKOTO MIYANAGA", "KATSUHIKO KANNO" }; +#ifdef VERSION_US +const char *credits09[] = { "1SOUND COMPOSER", "KOJI KONDO" }; +// ...as well as sound effects and sound programmer in order to make room for screen text writer, Mario voice, and Peach voice +const char *credits10[] = { "4SOUND EFFECTS", "SOUND PROGRAMMER", "YOJI INAGAKI", "HIDEAKI SHIMIZU" }; +const char *credits11[] = { "23-D ANIMATORS", "YOSHIAKI KOIZUMI", "SATORU TAKIZAWA" }; +const char *credits12[] = { "1ADDITIONAL GRAPHICS", "MASANAO ARIMOTO" }; +const char *credits13[] = { "3TECHNICAL SUPPORT", "TAKAO SAWANO", "HIROHITO YOSHIMOTO", "HIROTO YADA" }; +const char *credits14[] = { "1TECHNICAL SUPPORT", "SGI N64 PROJECT STAFF" }; +const char *credits15[] = { "2PROGRESS MANAGEMENT", "KIMIYOSHI FUKUI", "KEIZO KATO" }; +const char *credits16[] = { "5SCREEN TEXT WRITER", "TRANSLATION", "LESLIE SWAN", "MINA AKINO", "HIRO YAMADA" }; +#else // VERSION_EU // ...as well as sound composer, sound effects, and sound programmer, and... const char *credits09[] = { "7SOUND COMPOSER", "SOUND EFFECTS", "SOUND PROGRAMMER", "KOJI KONDO", "YOJI INAGAKI", "HIDEAKI SHIMIZU" }; // ...3D animators and additional graphics in order to make room for screen text writer(s), Mario voice, and Peach voice @@ -75,6 +86,7 @@ const char *credits13[] = { "2PROGRESS MANAGEMENT", "KIMIYOSHI FUKUI", "KEIZO KA const char *credits14[] = { "5SCREEN TEXT WRITER", "ENGLISH TRANSLATION", "LESLIE SWAN", "MINA AKINO", "HIRO YAMADA" }; const char *credits15[] = { "4SCREEN TEXT WRITER", "FRENCH TRANSLATION", "JULIEN BARDAKOFF", "KENJI HARAGUCHI" }; const char *credits16[] = { "4SCREEN TEXT WRITER", "GERMAN TRANSLATION", "THOMAS GOERG", "THOMAS SPINDLER" }; +#endif #endif From 36d41a7f949d39a6519eecb7bccbb1193fc8f568 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Sun, 16 Jan 2022 21:30:06 -0800 Subject: [PATCH 12/42] Renamed HackerSM64 modified assets so they don't conflict with vanilla assets (#293) --- ...ace.rgba16.png => flyguy_face.custom.rgba16.png} | Bin actors/flyguy/model.inc.c | 2 +- actors/warp_pipe/model.inc.c | 2 +- ....rgba16.png => warp_pipe_side.custom.rgba16.png} | Bin 4 files changed, 2 insertions(+), 2 deletions(-) rename actors/flyguy/{flyguy_face.rgba16.png => flyguy_face.custom.rgba16.png} (100%) rename actors/warp_pipe/{warp_pipe_side.rgba16.png => warp_pipe_side.custom.rgba16.png} (100%) diff --git a/actors/flyguy/flyguy_face.rgba16.png b/actors/flyguy/flyguy_face.custom.rgba16.png similarity index 100% rename from actors/flyguy/flyguy_face.rgba16.png rename to actors/flyguy/flyguy_face.custom.rgba16.png diff --git a/actors/flyguy/model.inc.c b/actors/flyguy/model.inc.c index c9fc0648..a651ce1b 100644 --- a/actors/flyguy/model.inc.c +++ b/actors/flyguy/model.inc.c @@ -10,7 +10,7 @@ ALIGNED8 static const Texture flyguy_seg8_texture_0800E088[] = { // 0x0800F088 ALIGNED8 static const Texture flyguy_seg8_texture_0800F088[] = { -#include "actors/flyguy/flyguy_face.rgba16.inc.c" +#include "actors/flyguy/flyguy_face.custom.rgba16.inc.c" }; // 0x0800F888 diff --git a/actors/warp_pipe/model.inc.c b/actors/warp_pipe/model.inc.c index 418bd7c9..6e6ec952 100644 --- a/actors/warp_pipe/model.inc.c +++ b/actors/warp_pipe/model.inc.c @@ -96,7 +96,7 @@ static const Vtx warp_pipe_seg3_vertex_03007DC0[] = { // 0x03007E40 ALIGNED8 static const Texture warp_pipe_seg3_texture_03007E40[] = { -#include "actors/warp_pipe/warp_pipe_side.rgba16.inc.c" +#include "actors/warp_pipe/warp_pipe_side.custom.rgba16.inc.c" }; // 0x03008E40 - 0x03008F98 diff --git a/actors/warp_pipe/warp_pipe_side.rgba16.png b/actors/warp_pipe/warp_pipe_side.custom.rgba16.png similarity index 100% rename from actors/warp_pipe/warp_pipe_side.rgba16.png rename to actors/warp_pipe/warp_pipe_side.custom.rgba16.png From 483b72e7da7a672367891e0e9f430bac51f30d8c Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 19 Jan 2022 14:41:14 -0800 Subject: [PATCH 13/42] Fix render menu buttons functions (#300) --- src/menu/file_select.c | 230 +++++++++++++---------------------------- 1 file changed, 69 insertions(+), 161 deletions(-) diff --git a/src/menu/file_select.c b/src/menu/file_select.c index 60f94054..c79a68ca 100644 --- a/src/menu/file_select.c +++ b/src/menu/file_select.c @@ -463,38 +463,44 @@ static const Vec3s sSaveFileButtonPositions[] = { #define MENU_BUTTON_SCALE 0.11111111f /** - * Render buttons for the score menu. + * Render buttons for the menu. * Also check if the save file exists to render a different Mario button. */ -void render_score_menu_buttons(struct Object *scoreButton) { +void render_menu_buttons(s32 selectedButtonID) { + struct Object *button = sMainMenuButtons[selectedButtonID]; + // MENU_BUTTON_SCORE -> 7 + // MENU_BUTTON_COPY -> 14 + // MENU_BUTTON_ERASE -> 21 + s32 idx = (selectedButtonID - 3) * 7; + // File A - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A] = SPAWN_FILE_SELECT_FILE_BUTTON(scoreButton, SAVE_FILE_A); - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A]->oMenuButtonScale = MENU_BUTTON_SCALE; + sMainMenuButtons[idx + 0] = SPAWN_FILE_SELECT_FILE_BUTTON(button, SAVE_FILE_A); + sMainMenuButtons[idx + 0]->oMenuButtonScale = MENU_BUTTON_SCALE; // File B - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B] = SPAWN_FILE_SELECT_FILE_BUTTON(scoreButton, SAVE_FILE_B); - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B]->oMenuButtonScale = MENU_BUTTON_SCALE; + sMainMenuButtons[idx + 1] = SPAWN_FILE_SELECT_FILE_BUTTON(button, SAVE_FILE_B); + sMainMenuButtons[idx + 1]->oMenuButtonScale = MENU_BUTTON_SCALE; // File C - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C] = SPAWN_FILE_SELECT_FILE_BUTTON(scoreButton, SAVE_FILE_C); - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C]->oMenuButtonScale = MENU_BUTTON_SCALE; + sMainMenuButtons[idx + 2] = SPAWN_FILE_SELECT_FILE_BUTTON(button, SAVE_FILE_C); + sMainMenuButtons[idx + 2]->oMenuButtonScale = MENU_BUTTON_SCALE; // File D - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D] = SPAWN_FILE_SELECT_FILE_BUTTON(scoreButton, SAVE_FILE_D); - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D]->oMenuButtonScale = MENU_BUTTON_SCALE; + sMainMenuButtons[idx + 3] = SPAWN_FILE_SELECT_FILE_BUTTON(button, SAVE_FILE_D); + sMainMenuButtons[idx + 3]->oMenuButtonScale = MENU_BUTTON_SCALE; // Return to main menu button - sMainMenuButtons[MENU_BUTTON_SCORE_RETURN] = - spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, + sMainMenuButtons[idx + 4] = + spawn_object_rel_with_rot(button, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, bhvMenuButton, 711, -388, -100, 0x0, -0x8000, 0x0); - sMainMenuButtons[MENU_BUTTON_SCORE_RETURN]->oMenuButtonScale = MENU_BUTTON_SCALE; + sMainMenuButtons[idx + 4]->oMenuButtonScale = MENU_BUTTON_SCALE; // Switch to copy menu button - sMainMenuButtons[MENU_BUTTON_SCORE_COPY_FILE] = - spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_BLUE_COPY_BUTTON, + sMainMenuButtons[idx + 5] = + spawn_object_rel_with_rot(button, selectedButtonID == MENU_BUTTON_SCORE ? MODEL_MAIN_MENU_BLUE_COPY_BUTTON : MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, bhvMenuButton, 0, -388, -100, 0x0, -0x8000, 0x0); - sMainMenuButtons[MENU_BUTTON_SCORE_COPY_FILE]->oMenuButtonScale = MENU_BUTTON_SCALE; + sMainMenuButtons[idx + 5]->oMenuButtonScale = MENU_BUTTON_SCALE; // Switch to erase menu button - sMainMenuButtons[MENU_BUTTON_SCORE_ERASE_FILE] = - spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_RED_ERASE_BUTTON, + sMainMenuButtons[idx + 6] = + spawn_object_rel_with_rot(button, selectedButtonID == MENU_BUTTON_ERASE ? MODEL_MAIN_MENU_BLUE_COPY_BUTTON : MODEL_MAIN_MENU_RED_ERASE_BUTTON, bhvMenuButton, -711, -388, -100, 0x0, -0x8000, 0x0); - sMainMenuButtons[MENU_BUTTON_SCORE_ERASE_FILE]->oMenuButtonScale = MENU_BUTTON_SCALE; + sMainMenuButtons[idx + 6]->oMenuButtonScale = MENU_BUTTON_SCALE; } #define SCORE_TIMER 31 @@ -555,40 +561,6 @@ void check_score_menu_clicked_buttons(struct Object *scoreButton) { #undef SCORE_TIMER -/** - * Render buttons for the copy menu. - * Also check if the save file exists to render a different Mario button. - */ -void render_copy_menu_buttons(struct Object *copyButton) { - // File A - sMainMenuButtons[MENU_BUTTON_COPY_FILE_A] = SPAWN_FILE_SELECT_FILE_BUTTON(copyButton, SAVE_FILE_A); - sMainMenuButtons[MENU_BUTTON_COPY_FILE_A]->oMenuButtonScale = MENU_BUTTON_SCALE; - // File B - sMainMenuButtons[MENU_BUTTON_COPY_FILE_B] = SPAWN_FILE_SELECT_FILE_BUTTON(copyButton, SAVE_FILE_B); - sMainMenuButtons[MENU_BUTTON_COPY_FILE_B]->oMenuButtonScale = MENU_BUTTON_SCALE; - // File C - sMainMenuButtons[MENU_BUTTON_COPY_FILE_C] = SPAWN_FILE_SELECT_FILE_BUTTON(copyButton, SAVE_FILE_C); - sMainMenuButtons[MENU_BUTTON_COPY_FILE_C]->oMenuButtonScale = MENU_BUTTON_SCALE; - // File D - sMainMenuButtons[MENU_BUTTON_COPY_FILE_D] = SPAWN_FILE_SELECT_FILE_BUTTON(copyButton, SAVE_FILE_D); - sMainMenuButtons[MENU_BUTTON_COPY_FILE_D]->oMenuButtonScale = MENU_BUTTON_SCALE; - // Return to main menu button - sMainMenuButtons[MENU_BUTTON_COPY_RETURN] = - spawn_object_rel_with_rot(copyButton, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, - bhvMenuButton, 711, -388, -100, 0x0, -0x8000, 0x0); - sMainMenuButtons[MENU_BUTTON_COPY_RETURN]->oMenuButtonScale = MENU_BUTTON_SCALE; - // Switch to scire menu button - sMainMenuButtons[MENU_BUTTON_COPY_CHECK_SCORE] = - spawn_object_rel_with_rot(copyButton, MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, - bhvMenuButton, 0, -388, -100, 0x0, -0x8000, 0x0); - sMainMenuButtons[MENU_BUTTON_COPY_CHECK_SCORE]->oMenuButtonScale = MENU_BUTTON_SCALE; - // Switch to erase menu button - sMainMenuButtons[MENU_BUTTON_COPY_ERASE_FILE] = - spawn_object_rel_with_rot(copyButton, MODEL_MAIN_MENU_RED_ERASE_BUTTON, - bhvMenuButton, -711, -388, -100, 0x0, -0x8000, 0x0); - sMainMenuButtons[MENU_BUTTON_COPY_ERASE_FILE]->oMenuButtonScale = MENU_BUTTON_SCALE; -} - #define BUZZ_TIMER 21 /** @@ -709,40 +681,6 @@ void check_copy_menu_clicked_buttons(struct Object *copyButton) { } } -/** - * Render buttons for the erase menu. - * Also check if the save file exists to render a different Mario button. - */ -void render_erase_menu_buttons(struct Object *eraseButton) { - // File A - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A] = SPAWN_FILE_SELECT_FILE_BUTTON(eraseButton, SAVE_FILE_A); - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A]->oMenuButtonScale = MENU_BUTTON_SCALE; - // File B - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_B] = SPAWN_FILE_SELECT_FILE_BUTTON(eraseButton, SAVE_FILE_B); - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_B]->oMenuButtonScale = MENU_BUTTON_SCALE; - // File C - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_C] = SPAWN_FILE_SELECT_FILE_BUTTON(eraseButton, SAVE_FILE_C); - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_C]->oMenuButtonScale = MENU_BUTTON_SCALE; - // File D - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_D] = SPAWN_FILE_SELECT_FILE_BUTTON(eraseButton, SAVE_FILE_D); - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_D]->oMenuButtonScale = MENU_BUTTON_SCALE; - // Return to main menu button - sMainMenuButtons[MENU_BUTTON_ERASE_RETURN] = - spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, - bhvMenuButton, 711, -388, -100, 0x0, -0x8000, 0x0); - sMainMenuButtons[MENU_BUTTON_ERASE_RETURN]->oMenuButtonScale = MENU_BUTTON_SCALE; - // Switch to score menu button - sMainMenuButtons[MENU_BUTTON_ERASE_CHECK_SCORE] = - spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, - bhvMenuButton, 0, -388, -100, 0x0, -0x8000, 0x0); - sMainMenuButtons[MENU_BUTTON_ERASE_CHECK_SCORE]->oMenuButtonScale = MENU_BUTTON_SCALE; - // Switch to copy menu button - sMainMenuButtons[MENU_BUTTON_ERASE_COPY_FILE] = - spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_BLUE_COPY_BUTTON, - bhvMenuButton, -711, -388, -100, 0x0, -0x8000, 0x0); - sMainMenuButtons[MENU_BUTTON_ERASE_COPY_FILE]->oMenuButtonScale = MENU_BUTTON_SCALE; -} - /** * Erase Menu phase actions that handles what to do when a file button is clicked. */ @@ -1029,7 +967,7 @@ void load_menu_from_submenu(s16 prevMenuButtonID, s16 selectedButtonID, struct O sSelectedButtonID = selectedButtonID; play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); sMainMenuButtons[selectedButtonID]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; - render_score_menu_buttons(sMainMenuButtons[selectedButtonID]); + render_menu_buttons(selectedButtonID); } } @@ -1114,89 +1052,59 @@ void bhv_menu_button_manager_init(void) { * Also play a sound and/or render buttons depending of the button ID selected. */ void check_main_menu_clicked_buttons(void) { - // Sound mode menu is handled separately because the button ID for it - // is not grouped with the IDs of the other submenus. - if (check_clicked_button(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oPosX, - sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oPosY, 200.0f)) { - sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; - sSelectedButtonID = MENU_BUTTON_SOUND_MODE; - } else { - // Main Menu buttons - s8 buttonID; - // Configure Main Menu button group - for (buttonID = MENU_BUTTON_MAIN_MIN; buttonID < MENU_BUTTON_MAIN_MAX; buttonID++) { - s16 buttonX = sMainMenuButtons[buttonID]->oPosX; - s16 buttonY = sMainMenuButtons[buttonID]->oPosY; + // Sound mode menu is handled separately because the button ID for it + // is not grouped with the IDs of the other submenus. + if (check_clicked_button(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oPosX, + sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oPosY, 200.0f)) { + sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; + sSelectedButtonID = MENU_BUTTON_SOUND_MODE; + } else { + // Main Menu buttons + s8 buttonID; + // Configure Main Menu button group + for (buttonID = MENU_BUTTON_MAIN_MIN; buttonID < MENU_BUTTON_MAIN_MAX; buttonID++) { + s16 buttonX = sMainMenuButtons[buttonID]->oPosX; + s16 buttonY = sMainMenuButtons[buttonID]->oPosY; - if (check_clicked_button(buttonX, buttonY, 200.0f)) { - // If menu button clicked, select it - sMainMenuButtons[buttonID]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; - sSelectedButtonID = buttonID; - break; - } + if (check_clicked_button(buttonX, buttonY, 200.0f)) { + // If menu button clicked, select it + sMainMenuButtons[buttonID]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; + sSelectedButtonID = buttonID; + break; } } + } - // Play sound of the save file clicked - switch (sSelectedButtonID) { - case MENU_BUTTON_PLAY_FILE_A: - play_sound(SAVE_FILE_SOUND, gGlobalSoundSource); + // Play sound of the save file clicked + switch (sSelectedButtonID) { + case MENU_BUTTON_PLAY_FILE_A: + case MENU_BUTTON_PLAY_FILE_B: + case MENU_BUTTON_PLAY_FILE_C: + case MENU_BUTTON_PLAY_FILE_D: + play_sound(SAVE_FILE_SOUND, gGlobalSoundSource); #if ENABLE_RUMBLE - queue_rumble_data(60, 70); - queue_rumble_decay(1); + queue_rumble_data(60, 70); + queue_rumble_decay(1); #endif - break; - case MENU_BUTTON_PLAY_FILE_B: - play_sound(SAVE_FILE_SOUND, gGlobalSoundSource); + break; + // Play sound of the button clicked and render buttons of that menu. + case MENU_BUTTON_SCORE: + case MENU_BUTTON_COPY: + case MENU_BUTTON_ERASE: + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); #if ENABLE_RUMBLE - queue_rumble_data(60, 70); - queue_rumble_decay(1); + queue_rumble_data(5, 80); #endif - break; - case MENU_BUTTON_PLAY_FILE_C: - play_sound(SAVE_FILE_SOUND, gGlobalSoundSource); + render_menu_buttons(sSelectedButtonID); + break; + case MENU_BUTTON_SOUND_MODE: + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); #if ENABLE_RUMBLE - queue_rumble_data(60, 70); - queue_rumble_decay(1); + queue_rumble_data(5, 80); #endif - break; - case MENU_BUTTON_PLAY_FILE_D: - play_sound(SAVE_FILE_SOUND, gGlobalSoundSource); -#if ENABLE_RUMBLE - queue_rumble_data(60, 70); - queue_rumble_decay(1); -#endif - break; - // Play sound of the button clicked and render buttons of that menu. - case MENU_BUTTON_SCORE: - play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); -#if ENABLE_RUMBLE - queue_rumble_data(5, 80); -#endif - render_score_menu_buttons(sMainMenuButtons[MENU_BUTTON_SCORE]); - break; - case MENU_BUTTON_COPY: - play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); -#if ENABLE_RUMBLE - queue_rumble_data(5, 80); -#endif - render_copy_menu_buttons(sMainMenuButtons[MENU_BUTTON_COPY]); - break; - case MENU_BUTTON_ERASE: - play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); -#if ENABLE_RUMBLE - queue_rumble_data(5, 80); -#endif - render_erase_menu_buttons(sMainMenuButtons[MENU_BUTTON_ERASE]); - break; - case MENU_BUTTON_SOUND_MODE: - play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); -#if ENABLE_RUMBLE - queue_rumble_data(5, 80); -#endif - render_sound_mode_menu_buttons(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]); - break; - } + render_sound_mode_menu_buttons(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]); + break; + } } #undef SAVE_FILE_SOUND From 730f020b6d5c3bbafe0fde829fdf1dbfba787c82 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Fri, 21 Jan 2022 20:00:25 -0800 Subject: [PATCH 14/42] Fix formatting inconsistencies in config files (#303) Fix formatting inconsistencies in config files --- include/config/config_audio.h | 8 ++-- include/config/config_benchmark.h | 8 ++-- include/config/config_camera.h | 32 ++++++++-------- include/config/config_collision.h | 4 +- include/config/config_cutscenes.h | 6 +-- include/config/config_debug.h | 22 +++++------ include/config/config_game.h | 33 ++++++++-------- include/config/config_goddard.h | 6 +-- include/config/config_graphics.h | 30 +++++++-------- include/config/config_interaction.h | 9 ++--- include/config/config_menu.h | 8 ++-- include/config/config_movement.h | 59 ++++++++++++++--------------- include/config/config_objects.h | 22 +++++------ include/config/config_rom.h | 6 +-- include/config/config_safeguards.h | 35 ++++++++--------- include/config/config_world.h | 52 ++++++++++++------------- src/game/mario_actions_airborne.c | 22 ++--------- 17 files changed, 172 insertions(+), 190 deletions(-) diff --git a/include/config/config_audio.h b/include/config/config_audio.h index 1d1f5270..23fabaad 100644 --- a/include/config/config_audio.h +++ b/include/config/config_audio.h @@ -4,12 +4,12 @@ * AUDIO SETTINGS * ******************/ -// Fixes the castle music sometimes triggering after getting a dialog +// 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) +// Increases the 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. +// 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 +// #define BETTER_REVERB diff --git a/include/config/config_benchmark.h b/include/config/config_benchmark.h index 980e857f..16a24391 100644 --- a/include/config/config_benchmark.h +++ b/include/config/config_benchmark.h @@ -3,11 +3,11 @@ /********************** * 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 -*/ +/** + * 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 813dc1c0..0cbc7269 100644 --- a/include/config/config_camera.h +++ b/include/config/config_camera.h @@ -4,37 +4,37 @@ * CAMERA SETTINGS * *******************/ -// Force the camera mode to your choice (except when swimming or flying) +// 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 +// 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 dpad +// 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. // #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: +// 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. @@ -42,13 +42,13 @@ /***** 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 +// 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 +// 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 24491efc..f5c162c6 100644 --- a/include/config/config_collision.h +++ b/include/config/config_collision.h @@ -8,10 +8,10 @@ // 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. +// Automatically calculates 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). +// 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. diff --git a/include/config/config_cutscenes.h b/include/config/config_cutscenes.h index 4844dcb3..e39dcb7c 100644 --- a/include/config/config_cutscenes.h +++ b/include/config/config_cutscenes.h @@ -6,8 +6,8 @@ // -- CUTSCENE SKIPS -- -// Skip peach letter cutscene +// Skips the peach letter cutscene. #define PEACH_SKIP -// Uncomment this if you want to skip the title screen (Super Mario 64 logo) -//#define SKIP_TITLE_SCREEN +// 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 6a25c343..1d5b3b88 100644 --- a/include/config/config_debug.h +++ b/include/config/config_debug.h @@ -7,7 +7,7 @@ // 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 // TEST LEVEL @@ -16,37 +16,37 @@ // 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. +// Enables 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). +// Enables debug free move (D-pad up to enter, A to exit). #define ENABLE_DEBUG_FREE_MOVE -// Include 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 -// Use 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 DPAD 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 dpad will cycle between visual hitboxes, visual surfaces, both, and neither. +// 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 -// Open 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. // #define COMPLETE_SAVE_FILE -// Removes the limit on FPS +// Removes the limit on FPS. // #define UNLOCK_FPS -// Include vanilla debug functionality. +// Includes vanilla debug functionality. // #define VANILLA_DEBUG // Forces a crash when the game starts. Useful for debugging the crash screen. diff --git a/include/config/config_game.h b/include/config/config_game.h index f0803767..a1b3289c 100644 --- a/include/config/config_game.h +++ b/include/config/config_game.h @@ -4,29 +4,29 @@ * 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 + * 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 +// Disables lives and hides the lives counter. #define DISABLE_LIVES -// Save 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 -// 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. @@ -39,30 +39,28 @@ */ // #define NON_STOP_STARS -// 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. #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] +// 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 HAVE EU AND JP/SH BASEROMS TO OBTAIN THE ASSETS] +// [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. @@ -71,5 +69,6 @@ // 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. +// 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 19f6d6fe..a7d7a94f 100644 --- a/include/config/config_goddard.h +++ b/include/config/config_goddard.h @@ -4,11 +4,11 @@ * GODDARD SETTINGS * ********************/ -// Uncomment this if you want to keep the mario head and not skip it +// Enables Goddard (the Mario head). // #define KEEP_MARIO_HEAD -// 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 d693f6c0..99743c80 100644 --- a/include/config/config_graphics.h +++ b/include/config/config_graphics.h @@ -4,21 +4,21 @@ * GRAPHICS SETTINGS * *********************/ -// Size of how large the master display list (gDisplayListHead) can be. 6400 is vanilla +// The size of the master display list (gDisplayListHead). 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 +// Show a watermark on the title screen that reads "Made with HackerSM64", instead of the copyright message. #define INTRO_CREDIT -// Spawn floombas in the title screen +// Spawns floombas on the title screen. #define INTRO_FLOOMBAS -// Enable 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) +// 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. @@ -26,17 +26,17 @@ // 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 +// Enables Puppyprint, a display library for text and large images. +// Automatically enabled when PUPPYPRINT_DEBUG is enabled. // #define PUPPYPRINT -// Disable 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. #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). @@ -45,7 +45,7 @@ // #define OBJECTS_REJ /** - * Mario's silhouette when behind solid objects/surfaces + * 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. @@ -63,24 +63,24 @@ // Fixes the game reading the ia8 burn smoke texture as an rgba16. #define BURN_SMOKE_FIX -// Disable the fix to Koopa's unshelled model. +// Disables 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. +// 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, they will appear as sideways in-game if this is enabled. +// 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. #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. +// 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 -// Use old shadow IDs for Fast64 compatibility. This is a temporary fix until Fast64 is updated to use the enum defines. +// 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_interaction.h b/include/config/config_interaction.h index 47ec1fa1..3cf48eed 100644 --- a/include/config/config_interaction.h +++ b/include/config/config_interaction.h @@ -6,10 +6,9 @@ // 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 +/** + * This fixes a bug which allows mario to move when initiating + * a dialog. just as long as mario doesn't enter an action that + * can be interrupted with text. */ // #define BUGFIX_DIALOG_TIME_STOP diff --git a/include/config/config_menu.h b/include/config/config_menu.h index 925c795d..0eae45b5 100644 --- a/include/config/config_menu.h +++ b/include/config/config_menu.h @@ -6,13 +6,13 @@ // -- EXIT COURSE SETTINGS -- -// Disable exit course -//#define DISABLE_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) +// 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 diff --git a/include/config/config_movement.h b/include/config/config_movement.h index 072c3316..6fa9ff7f 100644 --- a/include/config/config_movement.h +++ b/include/config/config_movement.h @@ -7,79 +7,78 @@ // 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 +// 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 +// - 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) -//#define NO_FALL_DAMAGE_SOUND +// 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. (WARNING: Enabling this may make you a total buzzkill) +// Prevents hands-free holding. // #define HANDS_FREE_HOLDING_FIX -// Prevents Mario losing his cap. -//#define PREVENT_CAP_LOSS +// Prevents Mario from 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! +// Enables Platform Displacement 2, also known as momentum patch. Makes Mario keep the momemtum from moving platforms. #define PLATFORM_DISPLACEMENT_2 -// Use Shindou's pole behavior -//#define SHINDOU_POLES +// Uses 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. +// If A and Z are pressed on the same frame while running, Mario will long jump instead of ground pound. #define EASIER_LONG_JUMPS -// 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 -// Allow Mario to grab hangable ceilings from any state +// Allows Mario to grab hangable ceilings from any state. #define HANGING_FIX -// The last frame 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. #define WALL_KICK_DEGREES 45 -// This is vanilla behavior, disable to allow ledge grabbing on -// any surface angle +// This is vanilla behavior, disable it to allow ledge grabbing regardless of floor pitch. // #define LEDGE_GRABS_CHECK_SLOPE_ANGLE -// Disable BLJs and crush SimpleFlips's dreams -//#define DISABLE_BLJ +// Disables BLJs and crushes SimpleFlips's dreams. +// #define DISABLE_BLJ -// Re-enable 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 9158980a..488c4def 100644 --- a/include/config/config_objects.h +++ b/include/config/config_objects.h @@ -6,16 +6,15 @@ // -- COIN -- -// The distance from Mario which coin formations spawn coins at. -// Vanilla is 2000.0f. +// 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. #define COIN_LAVA_FLICKER -// Allow for retries on collecting the remaining blue coins from a blue coin switch. -//#define BLUE_COIN_SWITCH_RETRY +// Allows for retries on collecting the remaining blue coins from a blue coin switch. +// #define BLUE_COIN_SWITCH_RETRY // -- GOOMBA -- @@ -23,25 +22,26 @@ // #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). +// Also supports 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. +// Uses intendedYaw to control Hoot instead of the raw left and right inputs. #define HOOT_YAW_FIX -// Leaf particles occasionally fall from trees which contain Hoot. +// Causes leaf particles to 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 +// Enables 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. +//! NOT IMPLEMENTED // #define FIX_WATER_RINGS // -- POWER STAR -- @@ -56,12 +56,12 @@ // -- 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 +// 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 -- -// 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 -- diff --git a/include/config/config_rom.h b/include/config/config_rom.h index 69961d17..9866b51f 100644 --- a/include/config/config_rom.h +++ b/include/config/config_rom.h @@ -8,11 +8,11 @@ // The end quote should be here: " #define INTERNAL_ROM_NAME "HackerSM64 " -// Support Rumble Pak +// Enables Rumble Pak Support. // Currently not recommended, as it may cause random crashes. -//#define ENABLE_RUMBLE (1 || VERSION_SH) +// #define ENABLE_RUMBLE (1 || VERSION_SH) -// Screen Size Defines +// Screen Size Defines. #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 diff --git a/include/config/config_safeguards.h b/include/config/config_safeguards.h index 22364085..d7729686 100644 --- a/include/config/config_safeguards.h +++ b/include/config/config_safeguards.h @@ -11,7 +11,7 @@ /***************** - * config_graphics + * config_graphics.h */ #ifndef F3DEX_GBI_2 @@ -23,20 +23,20 @@ #endif // !F3DEX_GBI_SHARED #ifdef OBJECTS_REJ -// Enable required ucodes. + // Enable required ucodes. #define F3DEX2_REJ_GBI #define F3DLX2_REJ_GBI #endif // OBJECTS_REJ /***************** - * config_debug + * config_debug.h */ #ifdef PUPPYPRINT_DEBUG #undef PUPPYPRINT #define PUPPYPRINT -#endif +#endif // PUPPYPRINT_DEBUG #ifdef COMPLETE_SAVE_FILE #undef UNLOCK_ALL @@ -83,29 +83,29 @@ /***************** - * config_camera + * config_camera.h */ #ifdef FORCED_CAMERA_MODE #undef USE_COURSE_DEFAULT_MODE - #define USE_COURSE_DEFAULT_MODE // Forced camera mode overwrites the default mode -#endif + #define USE_COURSE_DEFAULT_MODE // Forced camera mode overwrites the default mode. +#endif // FORCED_CAMERA_MODE #ifndef WATER_SURFACE_CAMERA_MODE #define WATER_SURFACE_CAMERA_MODE CAMERA_MODE_WATER_SURFACE -#endif +#endif // !WATER_SURFACE_CAMERA_MODE #ifndef DEEP_WATER_CAMERA_MODE #define DEEP_WATER_CAMERA_MODE CAMERA_MODE_BEHIND_MARIO -#endif +#endif // !DEEP_WATER_CAMERA_MODE #ifndef FLYING_CAMERA_MODE #define FLYING_CAMERA_MODE CAMERA_MODE_BEHIND_MARIO -#endif +#endif // !FLYING_CAMERA_MODE /***************** - * config_game + * config_game.h */ #ifdef DISABLE_LIVES @@ -114,11 +114,11 @@ #ifndef START_LEVEL #define START_LEVEL LEVEL_CASTLE_GROUNDS -#endif +#endif // !START_LEVEL /***************** - * config_goddard + * config_goddard.h */ #ifndef KEEP_MARIO_HEAD @@ -128,8 +128,9 @@ #define DISABLE_DEMO #endif // !KEEP_MARIO_HEAD + /***************** - * config_menu + * config_menu.h */ #ifdef DISABLE_EXIT_COURSE @@ -141,10 +142,10 @@ /***************** - * config_objects + * config_objects.h */ -// Enable floombas if the intro floombas are enabled +// Enable floombas if the intro floombas are enabled. #ifdef INTRO_FLOOMBAS #undef FLOOMBAS #define FLOOMBAS @@ -152,7 +153,7 @@ /***************** - * config_rom + * config_rom.h */ #ifndef TARGET_N64 diff --git a/include/config/config_world.h b/include/config/config_world.h index b7abad3c..173a75da 100644 --- a/include/config/config_world.h +++ b/include/config/config_world.h @@ -7,33 +7,33 @@ * 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 + * + * 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. -*/ +/** + * 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 @@ -79,9 +79,9 @@ STATIC_ASSERT(((EXTENDED_BOUNDS_MODE >= 0) && (EXTENDED_BOUNDS_MODE <= 3)), "You // 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 +// 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)); +// Use this to convert game units to cell coordinates. +#define GET_CELL_COORD(p) ((((s32)(p) + LEVEL_BOUNDARY_MAX) / CELL_SIZE) & (NUM_CELLS - 1)) diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index 433e6cf6..95051294 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -63,30 +63,14 @@ s32 check_fall_damage(struct MarioState *m, u32 hardFallAction) { #ifdef NO_FALL_DAMAGE return FALSE; #endif - f32 fallHeight; - f32 damageHeight; - fallHeight = m->peakHeight - m->pos[1]; + f32 fallHeight = m->peakHeight - m->pos[1]; -#pragma GCC diagnostic push -#if defined(__clang__) -#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#elif defined(__GNUC__) -#pragma GCC diagnostic ignored "-Wtype-limits" -#endif - - //! Never true - if (m->actionState == ACT_GROUND_POUND) { - damageHeight = 600.0f; - } else { - damageHeight = 1150.0f; - } - -#pragma GCC diagnostic pop + f32 damageHeight = FALL_DAMAGE_HEIGHT_SMALL; if (m->action != ACT_TWIRLING && m->floor->type != SURFACE_BURNING) { if (m->vel[1] < -55.0f) { - if (fallHeight > 3000.0f) { + if (fallHeight > FALL_DAMAGE_HEIGHT_LARGE) { m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 16 : 24; #if ENABLE_RUMBLE queue_rumble_data(5, 80); From 4265019923b96f36d642a4c0db6b88af6b28a27a Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Sat, 22 Jan 2022 14:07:55 -0800 Subject: [PATCH 15/42] Fix NON_STOP_STARS & bhvCelebrationStar related issues with Bowser keys (#299) Fix NON_STOP_STARS issues & bhvCelebrationStar related issues with Bowser keys --- include/config/config_game.h | 9 ++++----- include/config/config_graphics.h | 4 ++++ src/audio/external.c | 8 ++++++-- src/audio/external.h | 2 +- src/game/behaviors/celebration_star.inc.c | 13 +++++-------- src/game/interaction.c | 8 ++++++-- src/game/mario_actions_cutscene.c | 18 +++++++++++++++--- 7 files changed, 41 insertions(+), 21 deletions(-) diff --git a/include/config/config_game.h b/include/config/config_game.h index a1b3289c..5c9456eb 100644 --- a/include/config/config_game.h +++ b/include/config/config_game.h @@ -32,13 +32,12 @@ // 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. -*/ +// 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. +// #define KEYS_EXIT_LEVEL + // Uncomment this if you want global star IDs (useful for creating an open world hack ala MVC). // #define GLOBAL_STAR_IDS diff --git a/include/config/config_graphics.h b/include/config/config_graphics.h index 99743c80..1b210736 100644 --- a/include/config/config_graphics.h +++ b/include/config/config_graphics.h @@ -66,6 +66,10 @@ // 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. +// #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. // #define PUPPYLIGHTS diff --git a/src/audio/external.c b/src/audio/external.c index 4aca7632..99bc5c73 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -2401,8 +2401,12 @@ void func_803210D4(u16 fadeDuration) { /** * Called from threads: thread5_game_loop */ -void play_course_clear(void) { - seq_player_play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_CUTSCENE_COLLECT_STAR, 0); +void play_course_clear(s32 isKey) { + if (isKey) { + seq_player_play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_CUTSCENE_COLLECT_KEY, 0); + } else { + seq_player_play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_CUTSCENE_COLLECT_STAR, 0); + } sBackgroundMusicMaxTargetVolume = TARGET_VOLUME_IS_PRESENT_FLAG | 0; #if defined(VERSION_EU) || defined(VERSION_SH) D_EU_80300558 = 2; diff --git a/src/audio/external.h b/src/audio/external.h index 29d46374..6079f439 100644 --- a/src/audio/external.h +++ b/src/audio/external.h @@ -59,7 +59,7 @@ u32 get_current_background_music(void); void play_secondary_music(u8 seqId, u8 bgMusicVolume, u8 volume, u16 fadeTimer); void func_80321080(u16 fadeTimer); void func_803210D4(u16 fadeOutTime); -void play_course_clear(void); +void play_course_clear(s32 isKey); void play_peachs_jingle(void); void play_puzzle_jingle(void); void play_star_fanfare(void); diff --git a/src/game/behaviors/celebration_star.inc.c b/src/game/behaviors/celebration_star.inc.c index a4da1e04..a0af4308 100644 --- a/src/game/behaviors/celebration_star.inc.c +++ b/src/game/behaviors/celebration_star.inc.c @@ -6,18 +6,15 @@ void bhv_celebration_star_init(void) { o->oHomeZ = gMarioObject->header.gfx.pos[2]; o->oMoveAngleYaw = gMarioObject->header.gfx.angle[1] + 0x8000; o->oCelebStarDiameterOfRotation = 100; - if (gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2) { - o->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_BOWSER_KEY]; - o->oFaceAnglePitch = 0; + o->oFaceAnglePitch = 0; + if (obj_has_model(gMarioState->interactObj, MODEL_BOWSER_KEY)) { o->oFaceAngleRoll = 0xC000; cur_obj_scale(0.1f); - o->oCelebStarIsBowserKey = 1; + o->oCelebStarIsBowserKey = TRUE; } else { - o->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_STAR]; - o->oFaceAnglePitch = 0; o->oFaceAngleRoll = 0; cur_obj_scale(0.4f); - o->oCelebStarIsBowserKey = 0; + o->oCelebStarIsBowserKey = FALSE; } } @@ -42,7 +39,7 @@ void celeb_star_act_spin_around_mario(void) { void celeb_star_act_face_camera(void) { if (o->oTimer < 10) { - if (o->oCelebStarIsBowserKey == 0) { + if (o->oCelebStarIsBowserKey == FALSE) { cur_obj_scale((f32) o->oTimer / 10.0f); } else { cur_obj_scale((f32) o->oTimer / 30.0f); diff --git a/src/game/interaction.c b/src/game/interaction.c index f996b867..80b09f6e 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -764,10 +764,14 @@ u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct O u32 starIndex; u32 starGrabAction = ACT_STAR_DANCE_EXIT; #ifdef NON_STOP_STARS + #ifdef KEYS_EXIT_LEVEL + u32 noExit = !obj_has_model(obj, MODEL_BOWSER_KEY); + #else u32 noExit = TRUE; -#else + #endif +#else // !NON_STOP_STARS u32 noExit = (obj->oInteractionSubtype & INT_SUBTYPE_NO_EXIT) != 0; -#endif +#endif // !NON_STOP_STARS u32 grandStar = (obj->oInteractionSubtype & INT_SUBTYPE_GRAND_STAR) != 0; if (m->health >= 0x100) { diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index b7408719..8a65acc6 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -582,15 +582,27 @@ s32 act_debug_free_move(struct MarioState *m) { } void general_star_dance_handler(struct MarioState *m, s32 isInWater) { + struct Object *celebStar = NULL; + if (m->actionState == ACT_STATE_STAR_DANCE_CUTSCENE) { switch (++m->actionTimer) { case 1: - spawn_object(m->marioObj, MODEL_STAR, bhvCelebrationStar); + celebStar = spawn_object(m->marioObj, MODEL_STAR, bhvCelebrationStar); +#ifdef STAR_DANCE_USES_STARS_MODEL + celebStar->header.gfx.sharedChild = m->interactObj->header.gfx.sharedChild; +#else + if (obj_has_model(m->interactObj, MODEL_BOWSER_KEY)) { + obj_set_model(celebStar, MODEL_BOWSER_KEY); + } +#endif disable_background_sound(); + //! TODO: Is this check necessary? Both seem to do the exact same thing. if (m->actionArg & 1) { - play_course_clear(); + // No exit + play_course_clear(obj_has_model(celebStar, MODEL_BOWSER_KEY)); } else { - if (gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2) { + // Exit + if (obj_has_model(celebStar, MODEL_BOWSER_KEY)) { play_music(SEQ_PLAYER_ENV, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_COLLECT_KEY), 0); } else { play_music(SEQ_PLAYER_ENV, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_COLLECT_STAR), 0); From a0e8600776270c727df6e4229151487dde132fd1 Mon Sep 17 00:00:00 2001 From: axollyon <20480418+axollyon@users.noreply.github.com> Date: Tue, 8 Mar 2022 09:49:10 -0500 Subject: [PATCH 16/42] Saves default conf on boot now, simplify condition (#321) --- src/game/save_file.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/game/save_file.c b/src/game/save_file.c index 07f0faad..22fc8a87 100644 --- a/src/game/save_file.c +++ b/src/game/save_file.c @@ -361,16 +361,6 @@ void save_file_load_all(void) { } #ifdef PUPPYCAM -void puppycam_check_save(void) { - if (gSaveBuffer.menuData.firstBoot != 4 - || gSaveBuffer.menuData.saveOptions.sensitivityX < 5 - || gSaveBuffer.menuData.saveOptions.sensitivityY < 5) { - wipe_main_menu_data(); - gSaveBuffer.menuData.firstBoot = 4; - puppycam_default_config(); - } -} - void puppycam_get_save(void) { gPuppyCam.options = gSaveBuffer.menuData.saveOptions; @@ -394,6 +384,15 @@ void puppycam_set_save(void) { gMainMenuDataModified = TRUE; save_main_menu_data(); } + +void puppycam_check_save(void) { + if (gSaveBuffer.menuData.firstBoot != 4) { + wipe_main_menu_data(); + gSaveBuffer.menuData.firstBoot = 4; + puppycam_default_config(); + puppycam_set_save(); + } +} #endif /** From 33b2a07759041c144f919103214c8539d1b5df79 Mon Sep 17 00:00:00 2001 From: tuxlovesyou Date: Fri, 11 Mar 2022 21:10:46 -0600 Subject: [PATCH 17/42] Added LOAD_MIO0_TEXTURE alias for backwards-compatibility (#349) Sometimes tools like Fast64 will export script.c files with LOAD_MIO0_TEXTURE() macro "calls" even when you have "YAY0" toggled under the export menu. To keep this from being a roadblock for compilation, LOAD_MIO0_TEXTURE() is defined in this commit as an alias to the LOAD_YAY0_TEXTURE() macro! :-) --- README.md | 1 + include/level_commands.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 490b2a32..e53df151 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin - **CrashOveride**: creating the [ultrasm64](https://github.com/CrashOveride95/ultrasm64) repo - **falcobuster**: Original coordinate overflow fix (world scale), ASM version of extended bounds - **anonymous_moose**: porting falco's extended bounds to decomp +- **tuxlovesyou**: `LOAD_MIO0_TEXTURE` macro and moral support Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff diff --git a/include/level_commands.h b/include/level_commands.h index fdd35a6c..4c2de0ef 100644 --- a/include/level_commands.h +++ b/include/level_commands.h @@ -310,6 +310,9 @@ enum GoddardScene { CMD_PTR(romEnd) #endif +#undef LOAD_MIO0_TEXTURE +#define LOAD_MIO0_TEXTURE(a,b,c) LOAD_YAY0_TEXTURE(a,b,c) + #define CHANGE_AREA_SKYBOX(area, segStart, segEnd) \ CMD_BBH(LEVEL_CMD_CHANGE_AREA_SKYBOX, 0x0C, area), \ CMD_PTR(segStart), \ From 3f0143ec0f0c866f851d41d9d7a2b5de321e08db Mon Sep 17 00:00:00 2001 From: gheskett Date: Sun, 13 Mar 2022 18:57:17 -0400 Subject: [PATCH 18/42] Fix custom audio files not compiling under MinGW (in case it ever matters) --- tools/audiofile/audiofile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/audiofile/audiofile.cpp b/tools/audiofile/audiofile.cpp index 163237b5..459bc33e 100644 --- a/tools/audiofile/audiofile.cpp +++ b/tools/audiofile/audiofile.cpp @@ -8243,7 +8243,7 @@ File *File::open(const char *path, File::AccessMode mode) flags = O_RDONLY; else if (mode == WriteAccess) flags = O_CREAT | O_WRONLY | O_TRUNC; -#if defined(WIN32) || defined(__CYGWIN__) +#if defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) flags |= O_BINARY; #endif int fd = ::open(path, flags, 0666); From 8cfd9af4ee37eb5eb3123fe58d5843b6c48862c7 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Tue, 15 Mar 2022 14:38:38 -0700 Subject: [PATCH 19/42] Uncomment the last gSPPopMatrix in render_hud_cannon_reticle (#351) --- src/game/ingame_menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index 28c80f34..4103d2c8 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -1448,7 +1448,7 @@ void render_hud_cannon_reticle(void) { gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - // gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } void reset_red_coins_collected(void) { From 65eb5a755fac36d003fd1a23f3543bea62a6c71e Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Fri, 18 Mar 2022 11:02:38 -0700 Subject: [PATCH 20/42] Reimplement 'FIX_WATER_RINGS' (#325) * Reimplement 'FIX_WATER_RINGS' --- include/config/config_objects.h | 5 ++--- src/game/behaviors/water_ring.inc.c | 35 +++++++++++++++++++---------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/include/config/config_objects.h b/include/config/config_objects.h index 488c4def..6763d076 100644 --- a/include/config/config_objects.h +++ b/include/config/config_objects.h @@ -40,9 +40,8 @@ // -- WATER RING -- -// Fix DDD water rings by checking for interaction rather than normals. -//! NOT IMPLEMENTED -// #define FIX_WATER_RINGS +// Fix the water rings in DDD by checking for interaction rather than normals. +#define FIX_WATER_RINGS // -- POWER STAR -- diff --git a/src/game/behaviors/water_ring.inc.c b/src/game/behaviors/water_ring.inc.c index ea5df8fc..1ad4418e 100644 --- a/src/game/behaviors/water_ring.inc.c +++ b/src/game/behaviors/water_ring.inc.c @@ -1,14 +1,13 @@ // water_ring.inc.c +#ifndef FIX_WATER_RINGS f32 water_ring_calc_mario_dist(void) { - f32 marioDistX = o->oPosX - gMarioObject->header.gfx.pos[0]; - f32 marioDistY = o->oPosY - (gMarioObject->header.gfx.pos[1] + 80.0f); - f32 marioDistZ = o->oPosZ - gMarioObject->header.gfx.pos[2]; - f32 marioDistInFront = marioDistX * o->oWaterRingNormalX + marioDistY * o->oWaterRingNormalY - + marioDistZ * o->oWaterRingNormalZ; - - return marioDistInFront; + Vec3f marioDist; + vec3_diff(marioDist, &o->oPosVec, gMarioObject->header.gfx.pos); + marioDist[1] += 80.0f; + return vec3_dot(marioDist, &o->oWaterRingNormalVec); } +#endif void water_ring_init(void) { cur_obj_init_animation(WATER_RING_ANIM_WOBBLE); @@ -16,6 +15,7 @@ void water_ring_init(void) { o->oWaterRingScalePhaseY = (s32)(random_float() * 4096.0f) + 0x1000; o->oWaterRingScalePhaseZ = (s32)(random_float() * 4096.0f) + 0x1000; +#ifndef FIX_WATER_RINGS //! This normal calculation assumes a facing yaw of 0, which is not the case // for the manta ray rings. It also errs by multiplying the normal X by -1. // This cause the ring's orientation for the purposes of collision to be @@ -32,6 +32,7 @@ void water_ring_init(void) { // // o->oFaceAngleYaw = 0; // o->oFaceAngleRoll *= -1; +#endif } void bhv_jet_stream_water_ring_init(void) { @@ -42,16 +43,21 @@ void bhv_jet_stream_water_ring_init(void) { } void water_ring_check_collection(UNUSED f32 avgScale, struct Object *ringManager) { +#ifdef FIX_WATER_RINGS + if (o->oInteractStatus & INT_STATUS_INTERACTED) { +#else f32 marioDistInFront = water_ring_calc_mario_dist(); if (!is_point_close_to_object(o, gMarioObject->header.gfx.pos[0], - gMarioObject->header.gfx.pos[1] + 80.0f, - gMarioObject->header.gfx.pos[2], (avgScale + 0.2f) * 120.0f)) { + gMarioObject->header.gfx.pos[1] + 80.0f, + gMarioObject->header.gfx.pos[2], + (avgScale + 0.2f) * 120.0f)) { o->oWaterRingMarioDistInFront = marioDistInFront; return; } if (o->oWaterRingMarioDistInFront * marioDistInFront < 0.0f) { +#endif struct Object *ringSpawner = o->parentObj; if (ringSpawner) { @@ -73,7 +79,9 @@ void water_ring_check_collection(UNUSED f32 avgScale, struct Object *ringManager o->oAction = WATER_RING_ACT_COLLECTED; } +#ifndef FIX_WATER_RINGS o->oWaterRingMarioDistInFront = marioDistInFront; +#endif } void water_ring_set_scale(f32 avgScale) { @@ -154,8 +162,11 @@ void water_ring_spawner_act_inactive(void) { o->oTimer = 0; } - if ((o->oTimer == 0) || (o->oTimer == 50) || (o->oTimer == 150) || (o->oTimer == 200) - || (o->oTimer == 250)) { + if ((o->oTimer == 0) + || (o->oTimer == 50) + || (o->oTimer == 150) + || (o->oTimer == 200) + || (o->oTimer == 250)) { struct Object *waterRing = spawn_object(o, MODEL_WATER_RING, bhvJetStreamWaterRing); waterRing->oWaterRingIndex = o->oWaterRingMgrNextRingIndex; o->oWaterRingMgrNextRingIndex++; @@ -199,7 +210,7 @@ void manta_water_ring_act_not_collected(void) { if (o->oTimer > 150) { o->oOpacity -= 2; if (o->oOpacity < 3) { - o->activeFlags = ACTIVE_FLAG_DEACTIVATED; + obj_mark_for_deletion(o); } } From 12595397cd1da9e4cb4a042fa033298855dd98e4 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Fri, 18 Mar 2022 11:03:39 -0700 Subject: [PATCH 21/42] Fix OBJECTS_REJ build error & warning + silhouette incompatibility (#324) * Fix OBJECTS_REJ build error & warning * Fix Mario rendering --- src/engine/behavior_script.c | 19 ++++++------------- src/game/rendering_graph_node.c | 2 +- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/engine/behavior_script.c b/src/engine/behavior_script.c index 30db5d76..66b57abc 100644 --- a/src/engine/behavior_script.c +++ b/src/engine/behavior_script.c @@ -894,25 +894,18 @@ void cur_obj_update(void) { } #if SILHOUETTE - COND_BIT(( objFlags & OBJ_FLAG_SILHOUETTE ), o->header.gfx.node.flags, GRAPH_RENDER_SILHOUETTE ); - COND_BIT(( objFlags & OBJ_FLAG_OCCLUDE_SILHOUETTE ), o->header.gfx.node.flags, GRAPH_RENDER_OCCLUDE_SILHOUETTE); + COND_BIT((objFlags & OBJ_FLAG_SILHOUETTE ), o->header.gfx.node.flags, GRAPH_RENDER_SILHOUETTE ); + COND_BIT((objFlags & OBJ_FLAG_OCCLUDE_SILHOUETTE), o->header.gfx.node.flags, GRAPH_RENDER_OCCLUDE_SILHOUETTE); #endif + #ifdef OBJECTS_REJ - s32 objListIndex = OBJ_LIST_PLAYER; - - BehaviorScript *bhvScript = segmented_to_virtual(o->behavior); - if ((bhvScript[0] >> 24) == 0) { - objListIndex = ((bhvScript[0] >> 16) & 0xFFFF); - } - - if (objFlags & OBJ_FLAG_UCODE_SMALL) { + if ((objFlags & OBJ_FLAG_SILHOUETTE) || (objFlags & OBJ_FLAG_UCODE_SMALL)) { o->header.gfx.ucode = GRAPH_NODE_UCODE_REJ; - } - else { + } else { o->header.gfx.ucode = GRAPH_NODE_UCODE_DEFAULT; } - #endif + #ifdef OBJ_OPACITY_BY_CAM_DIST if (objFlags & OBJ_FLAG_OPACITY_FROM_CAMERA_DIST) { obj_set_opacity_from_cam_dist(o); diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index 80818e30..6763218b 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -248,7 +248,7 @@ void switch_ucode(s32 ucode) { switch (ucode) { default: // GRAPH_NODE_UCODE_DEFAULT case GRAPH_NODE_UCODE_DEFAULT: - gSPLoadUcodeL(gDisplayListHead++, gspF3DZEX2_PosLight_fifo); // F3DZEX2_PosLight + gSPLoadUcodeL(gDisplayListHead++, gspF3DZEX2_NoN_PosLight_fifo); // F3DZEX2_PosLight // Reload the necessary RSP settings gSPDisplayList(gDisplayListHead++, init_rsp); break; From b3cb639e6ebf175f08b702120e33a18f440f464a Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com> Date: Fri, 18 Mar 2022 14:15:08 -0400 Subject: [PATCH 22/42] Fixed makefile issue causing audio files to be compiled with different flags the first time they're built (#318) --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 145e1f7d..65345527 100644 --- a/Makefile +++ b/Makefile @@ -630,7 +630,8 @@ $(BUILD_DIR)/src/usb/usb.o: CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wn $(BUILD_DIR)/src/usb/debug.o: OPT_FLAGS := -O0 $(BUILD_DIR)/src/usb/debug.o: CFLAGS += -Wno-unused-parameter -Wno-maybe-uninitialized # File specific opt flags -$(BUILD_DIR)/src/audio/*.o: OPT_FLAGS := -Os -fno-jump-tables +$(BUILD_DIR)/src/audio/heap.o: OPT_FLAGS := -Os -fno-jump-tables +$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -Os -fno-jump-tables $(BUILD_DIR)/src/engine/surface_collision.o: OPT_FLAGS := $(COLLISION_OPT_FLAGS) $(BUILD_DIR)/src/engine/math_util.o: OPT_FLAGS := $(MATH_UTIL_OPT_FLAGS) From bf8ea238e57afb045a4aa3af3412f586316dd72e Mon Sep 17 00:00:00 2001 From: someone2639 Date: Fri, 25 Mar 2022 13:23:34 -0400 Subject: [PATCH 23/42] Fix some bad comment descriptions in math_util (#328) --- README.md | 2 +- src/engine/math_util.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e53df151..c399e901 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff **Lighting Engine by Wiseguy** -- Lighting Engine is available on a separate branch ([base/lighting-engine-wip](https://github.com/Reonu/HackerSM64/tree/base/lighting-engine-wip)). Instructions on how to use it are in the readme of that branch. +- Lighting Engine is available on a separate branch ([base/lighting-engine](https://github.com/Reonu/HackerSM64/tree/base/lighting-engine)). Instructions on how to use it are in the readme of that branch. - Alternatively, the main repo has `Puppylights` available, which is a more lightweight, but limited lighting library intended to be used to modify existing light properties. You can look at `puppylights.c` to find out how to use it. **Puppycam** diff --git a/src/engine/math_util.c b/src/engine/math_util.c index d21ce114..e7fd2f31 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -100,7 +100,7 @@ void min_max_3f(f32 a, f32 b, f32 c, f32 *min, f32 *max) { min_max_3_func(a, b, void min_max_3i(s32 a, s32 b, s32 c, s32 *min, s32 *max) { min_max_3_func(a, b, c, min, max); } void min_max_3s(s16 a, s16 b, s16 c, s16 *min, s16 *max) { min_max_3_func(a, b, c, min, max); } -/// Copy vector 'src' to 'dest' +/// Perform a bitwise copy from vector 'src' to 'dest' #define vec3_copy_bits(destFmt, dest, srcFmt, src) { \ register destFmt x = ((srcFmt *) src)[0]; \ register destFmt y = ((srcFmt *) src)[1]; \ @@ -255,7 +255,7 @@ void vec3s_prod(Vec3s dest, const Vec3s a, const Vec3s b) { vec3_prod_func(s16, #undef vec3_prod_func -/// Add vector 'a' to 'dest' +/// Performs element-wise division of two 3-vectors #define vec3_div_func(fmt, dest, a) { \ register fmt x = ((fmt *) a)[0]; \ register fmt y = ((fmt *) a)[1]; \ @@ -269,7 +269,7 @@ void vec3i_div(Vec3i dest, const Vec3i a) { vec3_div_func(s32, dest, a); } void vec3s_div(Vec3s dest, const Vec3s a) { vec3_div_func(s16, dest, a); } #undef vec3_div_func -/// Make 'dest' the sum of vectors a and b. +/// Make 'dest' the quotient of vectors a and b. #define vec3_quot_func(fmt, dest, a, b) { \ register fmt x1 = ((fmt *) a)[0]; \ register fmt y1 = ((fmt *) a)[1]; \ From f98d43c9de6ebabf7049ca55af71152d92f95fdc Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Sun, 27 Mar 2022 08:20:28 +0100 Subject: [PATCH 24/42] Puppycamera hotfixes (#367) * fixed some embarassing typos --- src/game/puppycam2.c | 3 +++ src/game/puppycam2.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/game/puppycam2.c b/src/game/puppycam2.c index d12251fd..f3ea9dc4 100644 --- a/src/game/puppycam2.c +++ b/src/game/puppycam2.c @@ -1205,6 +1205,9 @@ static void puppycam_script(void) { gPuppyCam.flags &= ~PUPPYCAM_BEHAVIOUR_YAW_ROTATION; } + else { + gPuppyCam.yaw = atan2s(gPuppyCam.pos[2] - gPuppyCam.focus[2], gPuppyCam.pos[0] - gPuppyCam.focus[0]); + } if (volume.angles->pitch != PUPPY_NULL) { gPuppyCam.pitchTarget = volume.angles->pitch; diff --git a/src/game/puppycam2.h b/src/game/puppycam2.h index 66dca9f0..3b2eacb4 100644 --- a/src/game/puppycam2.h +++ b/src/game/puppycam2.h @@ -34,13 +34,13 @@ #include "include/command_macros_base.h" #define PUPPYVOLUME(x, y, z, length, height, width, yaw, functionptr, anglesptr, addflags, removeflags, flagpersistance, room, shape, fov) \ - CMD_BBH(0x3D, 0x24, x), \ + CMD_BBH(0x3D, 0x28, x), \ CMD_HHHHHH(y, z, length, height, width, yaw), \ CMD_PTR(functionptr), \ CMD_PTR(anglesptr), \ CMD_W(addflags), \ CMD_W(removeflags), \ - CMD_BBH(flagpersistance, shape, room) \ + CMD_BBH(flagpersistance, shape, room), \ CMD_BBH(fov, 0x0, 0x0) struct gPuppyOptions From ac0299e5b506526611ff26f205f0450761843d0c Mon Sep 17 00:00:00 2001 From: Gregory Heskett Date: Wed, 30 Mar 2022 17:41:22 -0500 Subject: [PATCH 25/42] Bugfix: 2x+ skyboxes given insufficient memory space (#372) --- src/game/skybox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/skybox.c b/src/game/skybox.c index 96cbe486..f2dd6222 100644 --- a/src/game/skybox.c +++ b/src/game/skybox.c @@ -61,7 +61,7 @@ struct Skybox { struct Skybox sSkyBoxInfo[2]; -typedef const Texture *const SkyboxTexture[80 * SKYBOX_SIZE]; +typedef const Texture *const SkyboxTexture[80 * sqr(SKYBOX_SIZE)]; extern SkyboxTexture bbh_skybox_ptrlist; extern SkyboxTexture bidw_skybox_ptrlist; From 2118234f9b5fba3e7138170c89ad266c65d583af Mon Sep 17 00:00:00 2001 From: CrashOveride95 Date: Sun, 10 Apr 2022 10:44:32 -0400 Subject: [PATCH 26/42] Remove datetime from version.c to make debug builds reproducible --- src/boot/main.c | 1 - src/game/version.c | 1 - src/game/version.h | 1 - 3 files changed, 3 deletions(-) diff --git a/src/boot/main.c b/src/boot/main.c index 72a91ce7..60b03b58 100644 --- a/src/boot/main.c +++ b/src/boot/main.c @@ -312,7 +312,6 @@ void thread3_main(UNUSED void *arg) { #ifdef DEBUG osSyncPrintf("Super Mario 64\n"); osSyncPrintf("Built by: %s\n", __username__); - osSyncPrintf("Date : %s\n", __datetime__); osSyncPrintf("Compiler: %s\n", __compiler__); osSyncPrintf("Linker : %s\n", __linker__); #endif diff --git a/src/game/version.c b/src/game/version.c index ab2da363..3bb2b785 100644 --- a/src/game/version.c +++ b/src/game/version.c @@ -2,6 +2,5 @@ #include "src/game/version_data.h" char __username__[] = __USERNAME__; -char __datetime__[] = __DATETIME__; char __compiler__[] = __COMPILER__; char __linker__[] = __LINKER__; diff --git a/src/game/version.h b/src/game/version.h index ba4d54b1..ca974c9c 100644 --- a/src/game/version.h +++ b/src/game/version.h @@ -2,7 +2,6 @@ #define VER_H extern char __username__[]; -extern char __datetime__[]; extern char __compiler__[]; extern char __linker__[]; From 51f8ccfbb0c43da371aafae34363bada5022dc5e Mon Sep 17 00:00:00 2001 From: CrashOveride95 Date: Sun, 10 Apr 2022 10:47:12 -0400 Subject: [PATCH 27/42] Comment out username printing during debug builds because people use their real names on their computers I still wanna give people the option so --- src/boot/main.c | 2 ++ src/game/version.c | 2 ++ src/game/version.h | 2 ++ tools/make_version.sh | 1 - 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/boot/main.c b/src/boot/main.c index 60b03b58..d673fa05 100644 --- a/src/boot/main.c +++ b/src/boot/main.c @@ -311,7 +311,9 @@ void thread3_main(UNUSED void *arg) { #ifdef DEBUG osSyncPrintf("Super Mario 64\n"); +#if 0 // if your PC username isn't your real name feel free to uncomment osSyncPrintf("Built by: %s\n", __username__); +#endif osSyncPrintf("Compiler: %s\n", __compiler__); osSyncPrintf("Linker : %s\n", __linker__); #endif diff --git a/src/game/version.c b/src/game/version.c index 3bb2b785..890e102a 100644 --- a/src/game/version.c +++ b/src/game/version.c @@ -1,6 +1,8 @@ #include "version.h" #include "src/game/version_data.h" +#if 0 // if your PC username isn't your real name feel free to uncomment char __username__[] = __USERNAME__; +#endif char __compiler__[] = __COMPILER__; char __linker__[] = __LINKER__; diff --git a/src/game/version.h b/src/game/version.h index ca974c9c..1b650076 100644 --- a/src/game/version.h +++ b/src/game/version.h @@ -1,7 +1,9 @@ #ifndef VER_H #define VER_H +#if 0 // if your PC username isn't your real name feel free to uncomment extern char __username__[]; +#endif extern char __compiler__[]; extern char __linker__[]; diff --git a/tools/make_version.sh b/tools/make_version.sh index 167b6c61..185539dc 100755 --- a/tools/make_version.sh +++ b/tools/make_version.sh @@ -1,7 +1,6 @@ echo "#ifndef VER_DATA_H" echo "#define VER_DATA_H" echo "#define __USERNAME__ \"`whoami`@`hostname`\"" -echo "#define __DATETIME__ \"`date`\"" echo "#define __COMPILER__ \"$1gcc version `$1gcc -dumpfullversion`\"" echo "#define __LINKER__ \"$1ld: `$1ld -v`\"" echo "#endif" \ No newline at end of file From 30929298226c8aa4c3e1a7baa0832abf936da8f0 Mon Sep 17 00:00:00 2001 From: Reonu Date: Fri, 15 Apr 2022 01:53:11 +0300 Subject: [PATCH 28/42] Tie JRB dark skybox with ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS (#378) The JRB skybox is darkened if you haven't collected JRB's first star. This behaviour should be under `ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS` --- src/game/skybox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/skybox.c b/src/game/skybox.c index f2dd6222..1cc599f9 100644 --- a/src/game/skybox.c +++ b/src/game/skybox.c @@ -290,11 +290,13 @@ Gfx *create_skybox_facing_camera(s8 player, s8 background, f32 fov, Vec3f pos, V s8 colorIndex = 1; // If the "Plunder in the Sunken Ship" star in JRB is collected, make the sky darker and slightly green +#ifdef ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS if (background == BACKGROUND_ABOVE_CLOUDS && !(save_file_get_star_flags(gCurrSaveFileNum - 1, COURSE_NUM_TO_INDEX(COURSE_JRB)) & STAR_FLAG_ACT_1)) { colorIndex = 0; } - +#endif + //! fov is always set to 90.0f. If this line is removed, then the game crashes because fov is 0 on //! the first frame, which causes a floating point divide by 0 fov = 90.0f; From 642a85fec62e7aa6b2a6e7812ce5e1ead1c77720 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Fri, 15 Apr 2022 09:46:17 -0700 Subject: [PATCH 29/42] Fix build warnings & errors when building non-US versions (#305) * Fix build warnings & errors when building non-US versions * Revert ADSR_STATE_LOOP change in adsr_update in effects.c + add fallthrough comments + clean up ifdefs * null initialization for loadedPool in heap.c * Better placement of null initialization of arg0 in alloc_bank_or_seq --- levels/ending/leveldata.c | 2 ++ levels/intro/geo.c | 12 ++++++------ src/audio/effects.c | 26 ++++++++++---------------- src/audio/external.c | 2 +- src/audio/heap.c | 8 ++++---- src/audio/load_sh.c | 16 ++++++---------- src/audio/seqplayer.c | 14 ++++++-------- src/audio/synthesis.c | 4 ++-- src/audio/synthesis_sh.c | 8 +++++--- src/game/ingame_menu.c | 8 ++++++-- src/game/ingame_menu.h | 2 -- src/menu/file_select.c | 4 ++-- src/menu/star_select.c | 1 + 13 files changed, 51 insertions(+), 56 deletions(-) diff --git a/levels/ending/leveldata.c b/levels/ending/leveldata.c index aa4f1029..7d4cb361 100644 --- a/levels/ending/leveldata.c +++ b/levels/ending/leveldata.c @@ -9,6 +9,7 @@ #ifdef VERSION_EU #include "levels/ending/cake_eu.inc.c" +#ifndef EU_CUSTOM_CAKE_FIX // 0x07023000 - 0x07023FFF ALIGNED8 static const Texture cake_end_texture_eu_35_thank_you[] = { #include "levels/ending/eu_023000.rgba16.inc.c" @@ -38,6 +39,7 @@ ALIGNED8 static const Texture cake_end_texture_eu_39_fin[] = { ALIGNED8 static const Texture cake_end_texture_eu_40_ende[] = { #include "levels/ending/eu_028000.rgba16.inc.c" }; +#endif // !EU_CUSTOM_CAKE_FIX // 0x07029000 - 0x070296D8 const Gfx dl_cake_end_screen[] = { diff --git a/levels/intro/geo.c b/levels/intro/geo.c index 3bd54660..cde8161f 100644 --- a/levels/intro/geo.c +++ b/levels/intro/geo.c @@ -72,11 +72,11 @@ const GeoLayout intro_geo_mario_head_regular[] = { GEO_CLOSE_NODE(), #endif GEO_CLOSE_NODE(), -#if defined(VERSION_SH) - GEO_ZBUFFER(0), - GEO_OPEN_NODE(), - GEO_ASM(INTRO_CONTEXT_NORMAL, geo_intro_rumble_pak_graphic), - GEO_CLOSE_NODE(), +#if defined(ENABLE_RUMBLE) + GEO_ZBUFFER(0), + GEO_OPEN_NODE(), + GEO_ASM(INTRO_CONTEXT_NORMAL, geo_intro_rumble_pak_graphic), + GEO_CLOSE_NODE(), #endif GEO_CLOSE_NODE(), GEO_END(), @@ -105,7 +105,7 @@ const GeoLayout intro_geo_mario_head_dizzy[] = { GEO_CLOSE_NODE(), #endif GEO_CLOSE_NODE(), -#if defined(VERSION_SH) +#if defined(ENABLE_RUMBLE) GEO_ZBUFFER(0), GEO_OPEN_NODE(), GEO_ASM(INTRO_CONTEXT_GAME_OVER, geo_intro_rumble_pak_graphic), diff --git a/src/audio/effects.c b/src/audio/effects.c index aa10c788..7e702d5a 100644 --- a/src/audio/effects.c +++ b/src/audio/effects.c @@ -343,16 +343,12 @@ f32 adsr_update(struct AdsrState *adsr) { s32 adsr_update(struct AdsrState *adsr) { #endif u8 action = adsr->action; -#if defined(VERSION_EU) || defined(VERSION_SH) u8 state = adsr->state; switch (state) { -#else - switch (adsr->state) { -#endif case ADSR_STATE_DISABLED: return 0; - case ADSR_STATE_INITIAL: { + case ADSR_STATE_INITIAL: #if defined(VERSION_JP) || defined(VERSION_US) adsr->current = adsr->initial; adsr->target = adsr->initial; @@ -361,8 +357,7 @@ s32 adsr_update(struct AdsrState *adsr) { adsr->state = ADSR_STATE_HANG; break; } - } - // fallthrough + // fallthrough case ADSR_STATE_START_LOOP: adsr->envIndex = 0; @@ -370,11 +365,12 @@ s32 adsr_update(struct AdsrState *adsr) { adsr->currentHiRes = (adsr->current << 0x10); #endif adsr->state = ADSR_STATE_LOOP; - #ifdef VERSION_SH + // fallthrough restart: #endif // fallthrough + case ADSR_STATE_LOOP: adsr->delay = BSWAP16(adsr->envelope[adsr->envIndex].delay); switch (adsr->delay) { @@ -399,25 +395,23 @@ s32 adsr_update(struct AdsrState *adsr) { #if defined(VERSION_EU) || defined(VERSION_SH) if (adsr->delay >= 4) { adsr->delay = adsr->delay * gAudioBufferParameters.updatesPerFrame -#ifdef VERSION_SH + #ifdef VERSION_SH / gAudioBufferParameters.presetUnk4 -#endif + #endif / 4; } -#if defined(VERSION_SH) + #ifdef VERSION_SH if (adsr->delay == 0) { adsr->delay = 1; } + #endif adsr->target = (f32) BSWAP16(adsr->envelope[adsr->envIndex].arg) / 32767.0f; -#elif defined(VERSION_EU) - adsr->target = (f32) BSWAP16(adsr->envelope[adsr->envIndex].arg) / 32767.0; -#endif adsr->target = adsr->target * adsr->target; adsr->velocity = (adsr->target - adsr->current) / adsr->delay; -#else +#else // !(VERSION_EU || VERSION_SH) adsr->target = BSWAP16(adsr->envelope[adsr->envIndex].arg); adsr->velocity = ((adsr->target - adsr->current) << 0x10) / adsr->delay; -#endif +#endif // !(VERSION_EU || VERSION_SH) adsr->state = ADSR_STATE_FADE; adsr->envIndex++; break; diff --git a/src/audio/external.c b/src/audio/external.c index 99bc5c73..73f1782e 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -1262,7 +1262,7 @@ static void update_game_sound(void) { #endif } else { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728((x04020000 | ((channelIndex & 0xff) << 8), + func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), get_sound_freq_scale(bank, soundIndex) + ((f32) sSoundMovingSpeed[bank] / 400.0f)); #else value = get_sound_freq_scale(bank, soundIndex); diff --git a/src/audio/heap.c b/src/audio/heap.c index b6aba644..7bd23fcc 100644 --- a/src/audio/heap.c +++ b/src/audio/heap.c @@ -380,7 +380,7 @@ void *alloc_bank_or_seq(struct SoundMultiPool *arg0, s32 arg1, s32 size, s32 arg // arg3 = 0, 1 or 2? #ifdef VERSION_SH - struct SoundMultiPool *arg0; + struct SoundMultiPool *arg0 = NULL; #define isSound poolIdx #endif struct TemporaryPool *tp; @@ -758,7 +758,7 @@ void *get_bank_or_seq(s32 poolIdx, s32 arg1, s32 id) { } void *get_bank_or_seq_inner(s32 poolIdx, s32 arg1, s32 bankId) { u32 i; - struct SoundMultiPool* loadedPool; + struct SoundMultiPool* loadedPool = NULL; struct TemporaryPool* temporary; struct PersistentPool* persistent; @@ -931,7 +931,7 @@ void decrease_reverb_gain(void) { #if defined(VERSION_EU) || defined(VERSION_SH) s32 audio_shut_down_and_reset_step(void) { - s32 i, j; + s32 i; switch (gAudioResetStatus) { case 5: @@ -1007,7 +1007,7 @@ void init_reverb_eu(void) { gNumSynthesisReverbs = preset->numReverbs; for (j = 0; j < gNumSynthesisReverbs; j++) { reverb = &gSynthesisReverbs[j]; - reverbSettings = &sReverbSettings[MIN((gAudioResetPresetIdToLoad + j), (sizeof(sReverbSettings) / sizeof(struct ReverbSettingsEU)) - 1)]; + reverbSettings = &sReverbSettings[MIN((u32)(gAudioResetPresetIdToLoad + j), (sizeof(sReverbSettings) / sizeof(struct ReverbSettingsEU)) - 1)]; reverb->windowSize = (reverbSettings->windowSize * 0x40); reverb->downsampleRate = reverbSettings->downsampleRate; reverb->reverbGain = reverbSettings->gain; diff --git a/src/audio/load_sh.c b/src/audio/load_sh.c index de433afb..d1233dce 100644 --- a/src/audio/load_sh.c +++ b/src/audio/load_sh.c @@ -315,7 +315,7 @@ struct AudioBank *load_banks_immediate(s32 seqId, s32 *outDefaultBank) { u8 bank; s32 offset; s32 i; - void *ret; + void *ret = NULL; offset = ((u16 *)gAlBankSets)[canonicalize_index(0, seqId)]; bank = 0xFF; @@ -471,7 +471,6 @@ void load_sequence_internal(s32 player, s32 seqId, UNUSED s32 loadAsync) { u32 s0; s32 count; u8 bank; - s32 i; seqPlayer = &gSequencePlayers[player]; @@ -569,7 +568,7 @@ void *func_sh_802f3688(s32 bankId) { patchInfo.baseAddr2 = NULL; } - ret = func_sh_802f3764(1, bankId, &sp38) + ret = func_sh_802f3764(1, bankId, &sp38); if (ret != NULL && sp38 == 1) { func_sh_802f5310(bankId, ret, &patchInfo, 0); @@ -796,8 +795,7 @@ void func_sh_802f3c38(uintptr_t devAddr, void *vAddr, size_t nbytes, s32 medium) } } -void func_sh_802f3d78(uintptr_t devAddr, void *vAddr, size_t nbytes, s32 arg3) { - uintptr_t sp1C = devAddr; +void func_sh_802f3d78(UNUSED uintptr_t devAddr, void *vAddr, size_t nbytes, UNUSED s32 arg3) { osInvalDCache(vAddr, nbytes); } @@ -1168,8 +1166,7 @@ void func_sh_802f4bd8(struct PendingDmaSample *arg0, s32 len) { // len must be s func_sh_802f3dd0(&arg0->ioMesg, 0, 0, arg0->devAddr, arg0->vAddr, len, &arg0->queue, arg0->medium, shindouDebugPrint102); } -void func_sh_802f4c5c(uintptr_t devAddr, void *vAddr, size_t nbytes, s32 arg3) { - uintptr_t sp1C = devAddr; +void func_sh_802f4c5c(UNUSED uintptr_t devAddr, void *vAddr, size_t nbytes, UNUSED s32 arg3) { osInvalDCache(vAddr, nbytes); } @@ -1319,8 +1316,7 @@ void func_sh_802f50ec(struct PendingDmaAudioBank *arg0, size_t len) { } -void func_sh_802f517c(uintptr_t devAddr, void *vAddr, size_t nbytes, s32 arg3) { - uintptr_t sp1C = devAddr; +void func_sh_802f517c(UNUSED uintptr_t devAddr, void *vAddr, size_t nbytes, UNUSED s32 arg3) { osInvalDCache(vAddr, nbytes); } @@ -1359,7 +1355,7 @@ void patch_sound(struct AudioBankSound *sound, struct AudioBank *memBase, struct } void func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *patchInfo, s32 arg3) { - u8 *addr; + u8 *addr = NULL; s32 sp4C; struct AudioBankSample *temp_s0; s32 i; diff --git a/src/audio/seqplayer.c b/src/audio/seqplayer.c index 766d9b37..910383a3 100644 --- a/src/audio/seqplayer.c +++ b/src/audio/seqplayer.c @@ -448,19 +448,16 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) { struct Instrument *instrument; struct Drum *drum; s32 temp_a0_5; + u16 sp3A = 0; #ifdef VERSION_EU - u16 sp3A; s32 sameSound = TRUE; #else u8 sameSound = TRUE; #endif u8 cmd; UNUSED u8 cmdSemitone; -#ifndef VERSION_EU - u16 sp3A; -#endif f32 tuning; - s32 vel; + s32 vel = 0; UNUSED s32 usedSemitone; f32 freqScale; #ifndef VERSION_EU @@ -1139,6 +1136,7 @@ s32 seq_channel_layer_process_script_part2(struct SequenceChannelLayer *layer) { cmd = m64_read_u8(state) + 0x80; layer->freqScaleMultiplier = unk_sh_data_1[cmd]; // missing break :) + FALL_THROUGH; default: switch (cmd & 0xf0) { @@ -1286,8 +1284,8 @@ s32 seq_channel_layer_process_script_part4(struct SequenceChannelLayer *layer, s s32 seq_channel_layer_process_script_part3(struct SequenceChannelLayer *layer, s32 cmd) { struct M64ScriptState *state = &layer->scriptState; - u16 sp3A; - s32 vel; + u16 sp3A = 0; + s32 vel = 0; struct SequenceChannel *seqChannel = layer->seqChannel; struct SequencePlayer *seqPlayer = seqChannel->seqPlayer; @@ -1653,7 +1651,7 @@ void sequence_channel_process_script(struct SequenceChannel *seqChannel) { } else { eu_stubbed_printf_1("SUB:ERR:BANK %d NOT CACHED.\n", cmd); } - // fallthrough + FALL_THROUGH; #endif case 0xc1: // chan_setinstr ("set program"?) diff --git a/src/audio/synthesis.c b/src/audio/synthesis.c index 551c75d5..71b8bab4 100644 --- a/src/audio/synthesis.c +++ b/src/audio/synthesis.c @@ -513,7 +513,7 @@ u64 *synthesis_execute(u64 *cmdBuf, s32 *writtenCmds, s16 *aiBuf, s32 bufLen) { u32 *aiBufPtr; u64 *cmd = cmdBuf; s32 chunkLen; - s32 nextVolRampTable; + s32 nextVolRampTable = 0; for (i = gAudioBufferParameters.updatesPerFrame; i > 0; i--) { process_sequences(i - 1); @@ -634,7 +634,7 @@ u64 *synthesis_resample_and_mix_reverb(u64 *cmd, s32 bufLen, s16 reverbIndex, s1 aMix(cmd++, 0, 0x7fff, DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_LEFT_CH); aMix(cmd++, 0, 0x8000 + gSynthesisReverbs[reverbIndex].reverbGain, DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_WET_LEFT_CH); } else { - startPad = (item->startPos & 0x7) * 2 + startPad = (item->startPos & 0x7) * 2; paddedLengthA = AUDIO_ALIGN(startPad + item->lengthA, 4); cmd = synthesis_load_reverb_ring_buffer(cmd, DMEM_ADDR_RESAMPLED, (item->startPos - startPad / 2), DEFAULT_LEN_1CH, reverbIndex); diff --git a/src/audio/synthesis_sh.c b/src/audio/synthesis_sh.c index 888ab70b..a95d1d19 100644 --- a/src/audio/synthesis_sh.c +++ b/src/audio/synthesis_sh.c @@ -33,6 +33,7 @@ aSetBuffer(pkt, 0, 0, c + DMEM_ADDR_WET_RIGHT_CH, d); \ aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.right + (off))); +#undef ALIGN #define ALIGN(val, amnt) (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1)) struct VolumeChange { @@ -62,6 +63,7 @@ struct NoteSubEu *gNoteSubsEu; // just that the reverb structure is chosen from an array with index // Identical in EU. void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex, s32 reverbIndex) { + struct ReverbRingBufferItem *item; struct SynthesisReverb *reverb = &gSynthesisReverbs[reverbIndex]; s32 srcPos, dstPos; if (reverb->downsampleRate != 1) { @@ -85,7 +87,7 @@ void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex, s32 reverbIndex) } } - struct ReverbRingBufferItem *item = &reverb->items[reverb->curFrame][updateIndex]; + item = &reverb->items[reverb->curFrame][updateIndex]; s32 nSamples = chunkLen / reverb->downsampleRate; s32 excessiveSamples = (nSamples + reverb->nextRingBufferPos) - reverb->bufSizePerChannel; if (excessiveSamples < 0) { @@ -374,7 +376,7 @@ u64 *synthesis_process_note(s32 noteIndex, struct NoteSubEu *noteSubEu, struct N s32 flags; // sp148, sp11C, t8 u16 resamplingRateFixedPoint; // sp5c, sp11A s32 nSamplesToLoad; //s0, Ec - s32 sp130; //sp128, sp104 + s32 sp130 = 0; //sp128, sp104 UNUSED s32 tempBufLen; s32 t0; u8 *sampleAddr; // sp120, spF4 @@ -394,7 +396,7 @@ u64 *synthesis_process_note(s32 noteIndex, struct NoteSubEu *noteSubEu, struct N s32 nSamplesInThisIteration; // v1_2 u32 a3; u8 *v0_2; - s32 unk_s6; // sp90 + s32 unk_s6 = 0; // sp90 s32 s5Aligned; s32 sp88; s32 sp84; diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index 4103d2c8..45268e4c 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -87,7 +87,6 @@ enum DialogBoxType { #define DEFAULT_DIALOG_BOX_ANGLE 90.0f #define DEFAULT_DIALOG_BOX_SCALE 19.0f -#if defined(VERSION_US) || defined(VERSION_EU) u8 gDialogCharWidths[256] = { // TODO: Is there a way to auto generate this? 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 5, 8, 8, 6, 6, 6, 6, 6, 5, 6, 6, @@ -118,7 +117,6 @@ u8 gDialogCharWidths[256] = { // TODO: Is there a way to auto generate this? #endif 0, 0, 5, 7, 7, 6, 6, 8, 0, 8, 10, 6, 4, 10, 0, 0 }; -#endif s8 gDialogBoxState = DIALOG_STATE_OPENING; f32 gDialogBoxOpenTimer = DEFAULT_DIALOG_BOX_ANGLE; @@ -1369,6 +1367,7 @@ void print_peach_letter_message(void) { void **dialogTable; gInGameLanguage = eu_get_language(); switch (gInGameLanguage) { + default: case LANGUAGE_ENGLISH: dialogTable = segmented_to_virtual(dialog_table_eu_en); break; case LANGUAGE_FRENCH: dialogTable = segmented_to_virtual(dialog_table_eu_fr); break; case LANGUAGE_GERMAN: dialogTable = segmented_to_virtual(dialog_table_eu_de); break; @@ -1388,10 +1387,15 @@ void print_peach_letter_message(void) { gDPSetEnvColor(gDisplayListHead++, 20, 20, 20, gCutsceneMsgFade); print_generic_string(STR_X, STR_Y, str); +#ifdef VERSION_JP + gSPDisplayList(gDisplayListHead++, dl_ia_text_end); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); +#else gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); gSPDisplayList(gDisplayListHead++, dl_ia_text_end); gDPSetEnvColor(gDisplayListHead++, 200, 80, 120, gCutsceneMsgFade); gSPDisplayList(gDisplayListHead++, castle_grounds_seg7_us_dl_0700F2E8); +#endif // at the start/end of message, reset the fade. if (gCutsceneMsgTimer == 0) { diff --git a/src/game/ingame_menu.h b/src/game/ingame_menu.h index a3c9438d..e5fd6410 100644 --- a/src/game/ingame_menu.h +++ b/src/game/ingame_menu.h @@ -112,11 +112,9 @@ enum DialogSpecialChars { DIALOG_CHAR_I_NO_DIA = 0xEB, // 'i' without diacritic DIALOG_CHAR_DOUBLE_LOW_QUOTE = 0xF0, // German opening quotation mark #endif -#if defined(VERSION_US) || defined(VERSION_EU) DIALOG_CHAR_SLASH = 0xD0, DIALOG_CHAR_MULTI_THE = 0xD1, // 'the' DIALOG_CHAR_MULTI_YOU = 0xD2, // 'you' -#endif DIALOG_CHAR_PERIOD = 0x6E, DIALOG_CHAR_COMMA = 0x6F, DIALOG_CHAR_COLOR = 0xDF, diff --git a/src/menu/file_select.c b/src/menu/file_select.c index c79a68ca..e4b45351 100644 --- a/src/menu/file_select.c +++ b/src/menu/file_select.c @@ -122,7 +122,7 @@ unsigned char textEraseFileButton[] = { TEXT_ERASE_FILE_BUTTON }; unsigned char textSoundModes[][8] = { { TEXT_STEREO }, { TEXT_MONO }, { TEXT_HEADSET } }; #if MULTILANG -unsigned char textLanguageSelect[][17] = { { TEXT_LANGUAGE_SELECT }}; +unsigned char textLanguageSelect[][17] = { { TEXT_LANGUAGE_SELECT } }; #endif unsigned char textSoundSelect[] = { TEXT_SOUND_SELECT }; @@ -1788,7 +1788,7 @@ void print_sound_mode_menu_strings(void) { print_hud_lut_string(HUD_LUT_DIFF, SOUND_HUD_X, 32, LANGUAGE_ARRAY(textSoundSelect)); #if MULTILANG - print_hud_lut_string(HUD_LUT_DIFF, 47, 101, LANGUAGE_ARRAY(textLanguageSelect)); + print_hud_lut_string(HUD_LUT_DIFF, 47, 101, LANGUAGE_ARRAY(textLanguageSelect[0])); #endif gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); diff --git a/src/menu/star_select.c b/src/menu/star_select.c index 2fc3d476..3a160c6b 100644 --- a/src/menu/star_select.c +++ b/src/menu/star_select.c @@ -313,6 +313,7 @@ void print_act_selector_strings(void) { #if MULTILANG switch (language) { + default: case LANGUAGE_ENGLISH: actNameTbl = segmented_to_virtual(act_name_table_eu_en); levelNameTbl = segmented_to_virtual(course_name_table_eu_en); From 8d06db06e1ca282214fa2767186ea34dec51264d Mon Sep 17 00:00:00 2001 From: thecozies <79979276+thecozies@users.noreply.github.com> Date: Thu, 28 Apr 2022 09:50:27 -0500 Subject: [PATCH 30/42] Added specific extracted assets to gitignore (#386) * Added specific extracted assets to gitignore * Add .orig files to gitignore Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com> Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com> --- .gitignore | 2123 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 2075 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index 1c08c6f2..d5e1ae91 100644 --- a/.gitignore +++ b/.gitignore @@ -51,54 +51,2081 @@ build/* *.map .assets-local.txt -# Assets. Generally ignored, but ones with "custom" in the name are fine. -/levels/**/*.png -/actors/**/*.png -/textures/**/*.png -/assets/**/*.bin -/sound/**/*.m64 -/sound/**/*.aiff -!/levels/**/*custom*.png -!/levels/**/*custom*/**/*.png -!/actors/**/*custom*.png -!/actors/**/*custom*/**/*.png -!/textures/**/*custom*.png -!/textures/**/*custom*/**/*.png -!/sound/**/*custom*.m64 -!/sound/**/*custom*/**/*.m64 -!/sound/**/*custom*.aiff -!/sound/**/*custom*/**/*.aiff -!/assets/**/*custom*.bin -!/assets/**/*custom*/**/*.bin -!/textures/crash_custom/*.png - -# Specific assets -!/actors/breath_meter/breath_meter_*.png -!/actors/coin/coin_*.ia8.png -!/textures/segment2/light_quarter_circle.ia16.png -!/textures/segment2/segment2.hud_char_j.rgba16.png -!/textures/segment2/segment2.hud_char_q.rgba16.png -!/textures/segment2/segment2.hud_char_v.rgba16.png -!/textures/segment2/segment2.hud_char_x.rgba16.png -!/textures/segment2/segment2.hud_char_z.rgba16.png -!/textures/segment2/segment2.umlaut_us.rgba16.png -!/textures/segment2/segment2.beta_key.rgba16.png -!/textures/segment2/segment2.decimal_point.rgba16.png -!/textures/segment2/segment2.exclamation.rgba16.png -!/textures/segment2/segment2.double_exclamation.rgba16.png -!/textures/segment2/segment2.question.rgba16.png -!/textures/segment2/segment2.ampersand.rgba16.png -!/textures/segment2/segment2.percent.rgba16.png -!/textures/segment2/segment2.minus.rgba16.png -!/textures/segment2/segment2.minus2.rgba16.png -!/textures/segment2/segment2.yellow_coin.rgba16.png -!/textures/segment2/segment2.blue_coin.rgba16.png -!/textures/segment2/segment2.red_coin.rgba16.png -!/textures/segment2/segment2.silver_coin.*.png -!/textures/segment2/shadow_quarter_circle_64.ia8.png -!/textures/segment2/shadow_quarter_square_64.ia8.png - - +# Vanilla Assets. +# You can allow an asset to be committed by deleting one of these lines. +actors/amp/amp_body.rgba16.png +actors/amp/amp_electricity.rgba16.png +actors/amp/amp_eyes.rgba16.png +actors/amp/amp_mouth.rgba16.png +actors/blue_coin_switch/blue_coin_switch_side.rgba16.png +actors/blue_coin_switch/blue_coin_switch_top.rgba16.png +actors/blue_fish/blue_fish.rgba16.png +actors/bobomb/bob-omb_buddy_left_side.rgba16.png +actors/bobomb/bob-omb_buddy_right_side.rgba16.png +actors/bobomb/bob-omb_eyes.rgba16.png +actors/bobomb/bob-omb_eyes_blink.rgba16.png +actors/bobomb/bob-omb_left_side.rgba16.png +actors/bobomb/bob-omb_right_side.rgba16.png +actors/bomb/bomb_left_side.rgba16.png +actors/bomb/bomb_right_side.rgba16.png +actors/bomb/bomb_spike.rgba16.png +actors/boo/boo_eyes.rgba16.png +actors/boo/boo_mouth.rgba16.png +actors/boo_castle/bbh_boo_eyes.rgba16.png +actors/boo_castle/bbh_boo_mouth.rgba16.png +actors/book/book_cover.rgba16.png +actors/bookend/bookend_cover.rgba16.png +actors/bookend/bookend_mouth.rgba16.png +actors/bookend/bookend_pages.rgba16.png +actors/bookend/bookend_spine.rgba16.png +actors/bookend/bookend_tooth.rgba16.png +actors/bowser/bowser_armband.rgba16.png +actors/bowser/bowser_armband_spike.rgba16.png +actors/bowser/bowser_blue_eye_unused.rgba16.png +actors/bowser/bowser_body.rgba16.png +actors/bowser/bowser_chest.rgba16.png +actors/bowser/bowser_claw_edge.rgba16.png +actors/bowser/bowser_claw_horn_angle.rgba16.png +actors/bowser/bowser_claw_horn_tooth.rgba16.png +actors/bowser/bowser_eye_center_0.rgba16.png +actors/bowser/bowser_eye_center_1.rgba16.png +actors/bowser/bowser_eye_closed_0.rgba16.png +actors/bowser/bowser_eye_closed_1.rgba16.png +actors/bowser/bowser_eye_far_left_0.rgba16.png +actors/bowser/bowser_eye_far_left_1.rgba16.png +actors/bowser/bowser_eye_half_closed_0.rgba16.png +actors/bowser/bowser_eye_half_closed_1.rgba16.png +actors/bowser/bowser_eye_left_0.rgba16.png +actors/bowser/bowser_eye_left_1.rgba16.png +actors/bowser/bowser_eye_right_0.rgba16.png +actors/bowser/bowser_eye_right_1.rgba16.png +actors/bowser/bowser_eyebrow.rgba16.png +actors/bowser/bowser_hair.rgba16.png +actors/bowser/bowser_mouth_unused.rgba16.png +actors/bowser/bowser_muzzle.rgba16.png +actors/bowser/bowser_nostrils.rgba16.png +actors/bowser/bowser_shell.rgba16.png +actors/bowser/bowser_shell_edge.rgba16.png +actors/bowser/bowser_tongue.rgba16.png +actors/bowser/bowser_upper_face.rgba16.png +actors/bowser_flame/bowser_flame_0.rgba16.png +actors/bowser_flame/bowser_flame_1.rgba16.png +actors/bowser_flame/bowser_flame_10.rgba16.png +actors/bowser_flame/bowser_flame_11.rgba16.png +actors/bowser_flame/bowser_flame_12.rgba16.png +actors/bowser_flame/bowser_flame_13.rgba16.png +actors/bowser_flame/bowser_flame_2.rgba16.png +actors/bowser_flame/bowser_flame_3.rgba16.png +actors/bowser_flame/bowser_flame_4.rgba16.png +actors/bowser_flame/bowser_flame_5.rgba16.png +actors/bowser_flame/bowser_flame_6.rgba16.png +actors/bowser_flame/bowser_flame_7.rgba16.png +actors/bowser_flame/bowser_flame_8.rgba16.png +actors/bowser_flame/bowser_flame_9.rgba16.png +actors/breakable_box/cork_box_surface.rgba16.png +actors/breakable_box/crazy_box_surface.rgba16.png +actors/bub/bub_eye_border.rgba16.png +actors/bub/bub_eyes.rgba16.png +actors/bub/bub_fins.rgba16.png +actors/bub/bub_scales.rgba16.png +actors/bubba/bubba_eye_border.rgba16.png +actors/bubba/bubba_eyes_unused.rgba16.png +actors/bubba/bubba_fins.rgba16.png +actors/bubba/bubba_scales.rgba16.png +actors/bubba/bubba_sunglasses.rgba16.png +actors/bubble/bubble.rgba16.png +actors/bubble/mr_i_bubble.rgba16.png +actors/bullet_bill/bullet_bill_eye.rgba16.png +actors/bullet_bill/bullet_bill_mouth.rgba16.png +actors/bully/bully_eye.rgba16.png +actors/bully/bully_horn.rgba16.png +actors/bully/bully_left_side.rgba16.png +actors/bully/bully_right_side.rgba16.png +actors/burn_smoke/burn_smoke.ia16.png +actors/butterfly/butterfly_wing.rgba16.png +actors/cannon_barrel/cannon_barrel.rgba16.png +actors/cannon_base/cannon_base.rgba16.png +actors/cannon_lid/cannon_lid.rgba16.png +actors/capswitch/cap_switch_base.rgba16.png +actors/capswitch/cap_switch_head.ia16.png +actors/chain_ball/chain_ball.rgba16.png +actors/chain_chomp/chain_chomp_bright_shine.rgba16.png +actors/chain_chomp/chain_chomp_dull_shine.rgba16.png +actors/chain_chomp/chain_chomp_eye.rgba16.png +actors/chain_chomp/chain_chomp_tongue.rgba16.png +actors/chain_chomp/chain_chomp_tooth.rgba16.png +actors/chair/chair_bottom.rgba16.png +actors/chair/chair_front.rgba16.png +actors/chair/chair_leg.rgba16.png +actors/chair/chair_surface_unused.rgba16.png +actors/checkerboard_platform/checkerboard_platform.rgba16.png +actors/checkerboard_platform/checkerboard_platform_side.rgba16.png +actors/chillychief/chill_bully_eye.rgba16.png +actors/chillychief/chill_bully_left_side.rgba16.png +actors/chillychief/chill_bully_right_side.rgba16.png +actors/chuckya/chuckya_body_arm_left_side.rgba16.png +actors/chuckya/chuckya_body_arm_right_side.rgba16.png +actors/chuckya/chuckya_eyes.rgba16.png +actors/chuckya/chuckya_hand_antenna.rgba16.png +actors/clam_shell/clam_shell.rgba16.png +actors/clam_shell/clam_shell_mouth.rgba16.png +actors/coin/coin_front.ia16.png +actors/coin/coin_side.ia16.png +actors/coin/coin_tilt_left.ia16.png +actors/coin/coin_tilt_right.ia16.png +actors/cyan_fish/cyan_fish.rgba16.png +actors/dirt/dirt_particle.rgba16.png +actors/door/bbh_door.rgba16.png +actors/door/bbh_door_overlay.rgba16.png +actors/door/door_lock.rgba16.png +actors/door/hmc_mural_door.rgba16.png +actors/door/hmc_mural_door_overlay.rgba16.png +actors/door/metal_door.rgba16.png +actors/door/metal_door_overlay.rgba16.png +actors/door/one_star_door_sign.rgba16.png +actors/door/polished_wooden_door.rgba16.png +actors/door/polished_wooden_door_overlay.rgba16.png +actors/door/rough_wooden_door.rgba16.png +actors/door/rough_wooden_door_overlay.rgba16.png +actors/door/three_star_door_sign.rgba16.png +actors/door/zero_star_door_sign.rgba16.png +actors/dorrie/dorrie_eye.rgba16.png +actors/dorrie/dorrie_skin.rgba16.png +actors/dorrie/dorrie_tongue.rgba16.png +actors/exclamation_box/exclamation_box_front.rgba16.png +actors/exclamation_box/exclamation_box_side.rgba16.png +actors/exclamation_box/metal_cap_box_front.rgba16.png +actors/exclamation_box/metal_cap_box_side.rgba16.png +actors/exclamation_box/vanish_cap_box_front.rgba16.png +actors/exclamation_box/vanish_cap_box_side.rgba16.png +actors/exclamation_box/wing_cap_box_front.rgba16.png +actors/exclamation_box/wing_cap_box_side.rgba16.png +actors/exclamation_box_outline/exclamation_box_outline.rgba16.png +actors/exclamation_box_outline/exclamation_point.rgba16.png +actors/explosion/explosion_0.rgba16.png +actors/explosion/explosion_1.rgba16.png +actors/explosion/explosion_2.rgba16.png +actors/explosion/explosion_3.rgba16.png +actors/explosion/explosion_4.rgba16.png +actors/explosion/explosion_5.rgba16.png +actors/explosion/explosion_6.rgba16.png +actors/eyerok/eyerok_bricks.rgba16.png +actors/eyerok/eyerok_eye_closed.rgba16.png +actors/eyerok/eyerok_eye_mostly_closed.rgba16.png +actors/eyerok/eyerok_eye_mostly_open.rgba16.png +actors/eyerok/eyerok_eye_open.rgba16.png +actors/flame/flame_0.ia16.png +actors/flame/flame_1.ia16.png +actors/flame/flame_2.ia16.png +actors/flame/flame_3.ia16.png +actors/flame/flame_4.ia16.png +actors/flame/flame_5.ia16.png +actors/flame/flame_6.ia16.png +actors/flame/flame_7.ia16.png +actors/flyguy/flyguy_cloth_wrinkle.rgba16.png +actors/flyguy/flyguy_face.rgba16.png +actors/flyguy/flyguy_propeller.ia16.png +actors/fwoosh/fwoosh_face.ia16.png +actors/goomba/goomba_body.rgba16.png +actors/goomba/goomba_face.rgba16.png +actors/goomba/goomba_face_blink.rgba16.png +actors/haunted_cage/bbh_cage_bars.rgba16.png +actors/haunted_cage/bbh_cage_double_ornament.rgba16.png +actors/haunted_cage/bbh_cage_floor.rgba16.png +actors/haunted_cage/bbh_cage_garbage.rgba16.png +actors/haunted_cage/bbh_cage_ornament.rgba16.png +actors/haunted_cage/bbh_cage_wooden_base.rgba16.png +actors/heart/spinning_heart.rgba16.png +actors/heave_ho/heave-ho_arm_ornament.rgba16.png +actors/heave_ho/heave-ho_face.rgba16.png +actors/heave_ho/heave-ho_logo.rgba16.png +actors/heave_ho/heave-ho_platform.rgba16.png +actors/heave_ho/heave-ho_roller.rgba16.png +actors/heave_ho/heave-ho_turnkey.rgba16.png +actors/hoot/hoot_eyes.rgba16.png +actors/hoot/hoot_wing.rgba16.png +actors/hoot/hoot_wing_tip.rgba16.png +actors/impact_ring/impact_ring_left_side.ia16.png +actors/impact_ring/impact_ring_right_side.ia16.png +actors/impact_smoke/impact_smoke_0.ia16.png +actors/impact_smoke/impact_smoke_1.ia16.png +actors/impact_smoke/impact_smoke_2.ia16.png +actors/impact_smoke/impact_smoke_3.ia16.png +actors/king_bobomb/bob-omb_buddy_body_unused.rgba16.png +actors/king_bobomb/bob-omb_buddy_left_side_unused.rgba16.png +actors/king_bobomb/bob-omb_buddy_right_side_unused.rgba16.png +actors/king_bobomb/king_bob-omb_arm.rgba16.png +actors/king_bobomb/king_bob-omb_body_unused.rgba16.png +actors/king_bobomb/king_bob-omb_crown_rim.rgba16.png +actors/king_bobomb/king_bob-omb_eyes.rgba16.png +actors/king_bobomb/king_bob-omb_eyes_blink.rgba16.png +actors/king_bobomb/king_bob-omb_hand.rgba16.png +actors/king_bobomb/king_bob-omb_left_side.rgba16.png +actors/king_bobomb/king_bob-omb_right_side.rgba16.png +actors/klepto/klepto_beak.rgba16.png +actors/klepto/klepto_chest_tuft.rgba16.png +actors/klepto/klepto_eye.rgba16.png +actors/klepto/klepto_wing.rgba16.png +actors/klepto/klepto_wing_flap.rgba16.png +actors/koopa/koopa_eye_border.rgba16.png +actors/koopa/koopa_eyes_closed.rgba16.png +actors/koopa/koopa_eyes_open.rgba16.png +actors/koopa/koopa_nostrils.rgba16.png +actors/koopa/koopa_shell_back.rgba16.png +actors/koopa/koopa_shell_front.rgba16.png +actors/koopa/koopa_shell_front_top.rgba16.png +actors/koopa/koopa_shoe.rgba16.png +actors/koopa_flag/koopa_flag_banner.rgba16.png +actors/koopa_shell/koopa_shell_back.rgba16.png +actors/koopa_shell/koopa_shell_front.rgba16.png +actors/lakitu_cameraman/lakitu_camera_lens.rgba16.png +actors/lakitu_cameraman/lakitu_cameraman_cloud_face_unused.rgba16.png +actors/lakitu_cameraman/lakitu_cameraman_eyes_closed.rgba16.png +actors/lakitu_cameraman/lakitu_cameraman_eyes_open.rgba16.png +actors/lakitu_cameraman/lakitu_cameraman_frown.rgba16.png +actors/lakitu_cameraman/lakitu_cameraman_shell.rgba16.png +actors/lakitu_enemy/lakitu_enemy_cloud_face_unused.rgba16.png +actors/lakitu_enemy/lakitu_enemy_eyes_closed.rgba16.png +actors/lakitu_enemy/lakitu_enemy_eyes_open.rgba16.png +actors/lakitu_enemy/lakitu_enemy_frown.rgba16.png +actors/lakitu_enemy/lakitu_enemy_shell.rgba16.png +actors/leaves/leaf.rgba16.png +actors/mad_piano/mad_piano_body.rgba16.png +actors/mad_piano/mad_piano_keys.rgba16.png +actors/mad_piano/mad_piano_keys_corner.rgba16.png +actors/mad_piano/mad_piano_keys_edge.rgba16.png +actors/mad_piano/mad_piano_mouth.rgba16.png +actors/mad_piano/mad_piano_tooth.rgba16.png +actors/manta/manta_eye.rgba16.png +actors/manta/manta_fin_corner.rgba16.png +actors/manta/manta_fin_edge.rgba16.png +actors/manta/manta_gills.rgba16.png +actors/mario/mario_eyes_center.rgba16.png +actors/mario/mario_eyes_closed.rgba16.png +actors/mario/mario_eyes_closed_unused_0.rgba16.png +actors/mario/mario_eyes_closed_unused_1.rgba16.png +actors/mario/mario_eyes_dead.rgba16.png +actors/mario/mario_eyes_down_unused.rgba16.png +actors/mario/mario_eyes_half_closed.rgba16.png +actors/mario/mario_eyes_left_unused.rgba16.png +actors/mario/mario_eyes_right_unused.rgba16.png +actors/mario/mario_eyes_up_unused.rgba16.png +actors/mario/mario_logo.rgba16.png +actors/mario/mario_metal.rgba16.png +actors/mario/mario_metal_wing_tip_unused.rgba16.png +actors/mario/mario_metal_wing_unused.rgba16.png +actors/mario/mario_mustache.rgba16.png +actors/mario/mario_overalls_button.rgba16.png +actors/mario/mario_sideburn.rgba16.png +actors/mario/mario_wing.rgba16.png +actors/mario/mario_wing_tip.rgba16.png +actors/mario_cap/mario_cap_logo.rgba16.png +actors/mario_cap/mario_cap_metal.rgba16.png +actors/mario_cap/mario_cap_metal_wing_tip_unused.rgba16.png +actors/mario_cap/mario_cap_metal_wing_unused.rgba16.png +actors/mario_cap/mario_cap_wing.rgba16.png +actors/mario_cap/mario_cap_wing_tip.rgba16.png +actors/metal_box/metal_box_side.rgba16.png +actors/mips/mips_eyes.rgba16.png +actors/mist/mist.ia16.png +actors/moneybag/moneybag_eyes.rgba16.png +actors/moneybag/moneybag_mouth.rgba16.png +actors/monty_mole/monty_mole_cheek.rgba16.png +actors/monty_mole/monty_mole_claw.rgba16.png +actors/monty_mole/monty_mole_eye.rgba16.png +actors/monty_mole/monty_mole_nose.rgba16.png +actors/monty_mole/monty_mole_tooth.rgba16.png +actors/monty_mole_hole/monty_mole_hole.ia16.png +actors/mr_i_eyeball/mr_i_eyeball_left_side.rgba16.png +actors/mr_i_eyeball/mr_i_eyeball_right_side.rgba16.png +actors/mr_i_iris/mr_i_iris_closed.rgba16.png +actors/mr_i_iris/mr_i_iris_mostly_closed.rgba16.png +actors/mr_i_iris/mr_i_iris_mostly_open.rgba16.png +actors/mr_i_iris/mr_i_iris_open.rgba16.png +actors/mushroom_1up/1-up_mushroom.rgba16.png +actors/peach/peach_chest_jewel.rgba16.png +actors/peach/peach_crown_jewel.rgba16.png +actors/peach/peach_dress.rgba16.png +actors/peach/peach_eye_closed.rgba16.png +actors/peach/peach_eye_mostly_closed.rgba16.png +actors/peach/peach_eye_mostly_open.rgba16.png +actors/peach/peach_eye_open.rgba16.png +actors/peach/peach_lips.rgba16.png +actors/peach/peach_lips_scrunched.rgba16.png +actors/peach/peach_nostril.rgba16.png +actors/pebble/pebble.rgba16.png +actors/penguin/penguin_beak.rgba16.png +actors/penguin/penguin_eye_angry.rgba16.png +actors/penguin/penguin_eye_angry_unused.rgba16.png +actors/penguin/penguin_eye_closed.rgba16.png +actors/penguin/penguin_eye_half_closed.rgba16.png +actors/penguin/penguin_eye_open.rgba16.png +actors/piranha_plant/piranha_plant_bottom_lip.rgba16.png +actors/piranha_plant/piranha_plant_leaf.rgba16.png +actors/piranha_plant/piranha_plant_skin.rgba16.png +actors/piranha_plant/piranha_plant_stem.rgba16.png +actors/piranha_plant/piranha_plant_tongue.rgba16.png +actors/piranha_plant/piranha_plant_tooth.rgba16.png +actors/pokey/pokey_body.rgba16.png +actors/pokey/pokey_face.rgba16.png +actors/pokey/pokey_face_blink.rgba16.png +actors/poundable_pole/poundable_pole_side.rgba16.png +actors/poundable_pole/poundable_pole_top.rgba16.png +actors/power_meter/power_meter_five_segments.rgba16.png +actors/power_meter/power_meter_four_segments.rgba16.png +actors/power_meter/power_meter_full.rgba16.png +actors/power_meter/power_meter_left_side.rgba16.png +actors/power_meter/power_meter_one_segment.rgba16.png +actors/power_meter/power_meter_right_side.rgba16.png +actors/power_meter/power_meter_seven_segments.rgba16.png +actors/power_meter/power_meter_six_segments.rgba16.png +actors/power_meter/power_meter_three_segments.rgba16.png +actors/power_meter/power_meter_two_segments.rgba16.png +actors/purple_switch/purple_switch_base.rgba16.png +actors/purple_switch/purple_switch_exclamation_point.rgba16.png +actors/sand/sand_particle.rgba16.png +actors/scuttlebug/scuttlebug_eye.rgba16.png +actors/scuttlebug/scuttlebug_iris.rgba16.png +actors/scuttlebug/scuttlebug_left_side.rgba16.png +actors/scuttlebug/scuttlebug_leg.rgba16.png +actors/scuttlebug/scuttlebug_right_side.rgba16.png +actors/seaweed/seaweed_base.rgba16.png +actors/seaweed/seaweed_lower_center.rgba16.png +actors/seaweed/seaweed_tip.rgba16.png +actors/seaweed/seaweed_upper_center.rgba16.png +actors/skeeter/skeeter_eye.rgba16.png +actors/skeeter/skeeter_iris.rgba16.png +actors/small_water_splash/small_water_splash_0.ia16.png +actors/small_water_splash/small_water_splash_1.ia16.png +actors/small_water_splash/small_water_splash_2.ia16.png +actors/small_water_splash/small_water_splash_3.ia16.png +actors/small_water_splash/small_water_splash_4.ia16.png +actors/small_water_splash/small_water_splash_5.ia16.png +actors/smoke/smoke.ia16.png +actors/snowman/mr_blizzard_eye.rgba16.png +actors/snowman/mr_blizzard_left_side.rgba16.png +actors/snowman/mr_blizzard_mitten.rgba16.png +actors/snowman/mr_blizzard_mouth.rgba16.png +actors/snowman/mr_blizzard_right_side.rgba16.png +actors/snufit/snufit_body.rgba16.png +actors/snufit/snufit_eye.rgba16.png +actors/snufit/snufit_mask_strap.rgba16.png +actors/snufit/snufit_mouth.rgba16.png +actors/sparkle/sparkle_0.rgba16.png +actors/sparkle/sparkle_1.rgba16.png +actors/sparkle/sparkle_2.rgba16.png +actors/sparkle/sparkle_3.rgba16.png +actors/sparkle/sparkle_4.rgba16.png +actors/sparkle/sparkle_5.rgba16.png +actors/sparkle_animation/sparkle_animation_0.ia16.png +actors/sparkle_animation/sparkle_animation_1.ia16.png +actors/sparkle_animation/sparkle_animation_2.ia16.png +actors/sparkle_animation/sparkle_animation_3.ia16.png +actors/sparkle_animation/sparkle_animation_4.ia16.png +actors/spindrift/spindrift_face.rgba16.png +actors/spindrift/spindrift_head.rgba16.png +actors/spindrift/spindrift_leaf.rgba16.png +actors/spindrift/spindrift_petal.rgba16.png +actors/springboard/springboard_base_unused.rgba16.png +actors/springboard/springboard_top_unused.rgba16.png +actors/star/star_eye.rgba16.png +actors/star/star_surface.rgba16.png +actors/sushi/sushi_eye.rgba16.png +actors/sushi/sushi_snout.rgba16.png +actors/sushi/sushi_tooth.rgba16.png +actors/swoop/swoop_body.rgba16.png +actors/swoop/swoop_eye.rgba16.png +actors/swoop/swoop_nose.rgba16.png +actors/swoop/swoop_wing.rgba16.png +actors/thwomp/thwomp_face.rgba16.png +actors/thwomp/thwomp_surface.rgba16.png +actors/toad/toad_face.rgba16.png +actors/toad/toad_head.rgba16.png +actors/tornado/tornado.ia16.png +actors/treasure_chest/treasure_chest_front.rgba16.png +actors/treasure_chest/treasure_chest_lock.rgba16.png +actors/treasure_chest/treasure_chest_lock_top.rgba16.png +actors/treasure_chest/treasure_chest_side.rgba16.png +actors/tree/palm_tree.rgba16.png +actors/tree/pine_tree.rgba16.png +actors/tree/snowy_pine_tree.rgba16.png +actors/tree/tree_left_side.rgba16.png +actors/tree/tree_right_side.rgba16.png +actors/ukiki/ukiki_butt.rgba16.png +actors/ukiki/ukiki_face.rgba16.png +actors/ukiki/ukiki_face_blink.rgba16.png +actors/ukiki/ukiki_fur.rgba16.png +actors/unagi/unagi_body.rgba16.png +actors/unagi/unagi_eye.rgba16.png +actors/unagi/unagi_head_base.rgba16.png +actors/unagi/unagi_mouth.rgba16.png +actors/unagi/unagi_tail.rgba16.png +actors/unagi/unagi_tooth.rgba16.png +actors/walk_smoke/walk_smoke_0.ia16.png +actors/walk_smoke/walk_smoke_1.ia16.png +actors/walk_smoke/walk_smoke_2.ia16.png +actors/walk_smoke/walk_smoke_3.ia16.png +actors/walk_smoke/walk_smoke_4.ia16.png +actors/walk_smoke/walk_smoke_5.ia16.png +actors/walk_smoke/walk_smoke_6.ia16.png +actors/warp_pipe/warp_pipe_side.rgba16.png +actors/warp_pipe/warp_pipe_top.rgba16.png +actors/water_bubble/water_bubble.rgba16.png +actors/water_mine/water_mine_left_side_unused.rgba16.png +actors/water_mine/water_mine_right_side_unused.rgba16.png +actors/water_mine/water_mine_spike_unused.rgba16.png +actors/water_ring/water_ring.rgba16.png +actors/water_splash/water_splash_0.rgba16.png +actors/water_splash/water_splash_1.rgba16.png +actors/water_splash/water_splash_2.rgba16.png +actors/water_splash/water_splash_3.rgba16.png +actors/water_splash/water_splash_4.rgba16.png +actors/water_splash/water_splash_5.rgba16.png +actors/water_splash/water_splash_6.rgba16.png +actors/water_splash/water_splash_7.rgba16.png +actors/water_wave/water_wave_0.ia16.png +actors/water_wave/water_wave_1.ia16.png +actors/water_wave/water_wave_2.ia16.png +actors/water_wave/water_wave_3.ia16.png +actors/whirlpool/whirlpool.ia16.png +actors/white_particle/snow_particle.rgba16.png +actors/white_particle_small/small_snow_particle.rgba16.png +actors/whomp/whomp_back.rgba16.png +actors/whomp/whomp_face.rgba16.png +actors/whomp/whomp_hand.rgba16.png +actors/whomp/whomp_surface.rgba16.png +actors/wiggler/wiggler_eye.rgba16.png +actors/wiggler/wiggler_flower.rgba16.png +actors/wiggler/wiggler_frown.rgba16.png +actors/wiggler/wiggler_nose_left_side.rgba16.png +actors/wiggler/wiggler_nose_right_side.rgba16.png +actors/wiggler/wiggler_segment_left_side.rgba16.png +actors/wiggler/wiggler_segment_right_side.rgba16.png +actors/wooden_signpost/wooden_signpost_back.rgba16.png +actors/wooden_signpost/wooden_signpost_front.rgba16.png +actors/yellow_sphere/yellow_sphere.rgba16.png +actors/yellow_sphere_small/small_yellow_sphere.rgba16.png +actors/yoshi/yoshi_eye.rgba16.png +actors/yoshi/yoshi_eye_blink.rgba16.png +actors/yoshi/yoshi_nostril.rgba16.png +actors/yoshi_egg/yoshi_egg_0_unused.rgba16.png +actors/yoshi_egg/yoshi_egg_1_unused.rgba16.png +actors/yoshi_egg/yoshi_egg_2_unused.rgba16.png +actors/yoshi_egg/yoshi_egg_3_unused.rgba16.png +actors/yoshi_egg/yoshi_egg_4_unused.rgba16.png +actors/yoshi_egg/yoshi_egg_5_unused.rgba16.png +actors/yoshi_egg/yoshi_egg_6_unused.rgba16.png +actors/yoshi_egg/yoshi_egg_7_unused.rgba16.png +assets/demos/bbh.bin +assets/demos/bitdw.bin +assets/demos/ccm.bin +assets/demos/hmc.bin +assets/demos/jrb.bin +assets/demos/pss.bin +assets/demos/unused.bin +assets/demos/wf.bin +levels/bbh/0.rgba16.png +levels/bbh/1.rgba16.png +levels/bbh/2.rgba16.png +levels/bbh/3.rgba16.png +levels/bbh/4.rgba16.png +levels/bbh/5.rgba16.png +levels/bbh/6.rgba16.png +levels/bitdw/0.rgba16.png +levels/bitdw/1.rgba16.png +levels/bitdw/2.rgba16.png +levels/bitdw/3.rgba16.png +levels/bitfs/0.rgba16.png +levels/bitfs/1.rgba16.png +levels/bitfs/2.rgba16.png +levels/bits/0.rgba16.png +levels/bits/1.rgba16.png +levels/bits/2.rgba16.png +levels/bob/0.rgba16.png +levels/bob/1.rgba16.png +levels/bob/2.rgba16.png +levels/bob/3.rgba16.png +levels/bob/4.rgba16.png +levels/bowser_1/0.rgba16.png +levels/bowser_1/1.rgba16.png +levels/bowser_1/2.rgba16.png +levels/bowser_2/0.rgba16.png +levels/bowser_3/0.rgba16.png +levels/bowser_3/1.rgba16.png +levels/bowser_3/2.rgba16.png +levels/castle_grounds/0.rgba16.png +levels/castle_grounds/1.rgba16.png +levels/castle_grounds/2.rgba16.png +levels/castle_grounds/3.rgba16.png +levels/castle_grounds/4.rgba16.png +levels/castle_grounds/5.ia8.png +levels/castle_inside/1.rgba16.png +levels/castle_inside/10.rgba16.png +levels/castle_inside/11.rgba16.png +levels/castle_inside/12.rgba16.png +levels/castle_inside/13.rgba16.png +levels/castle_inside/14.rgba16.png +levels/castle_inside/15.rgba16.png +levels/castle_inside/16.ia16.png +levels/castle_inside/17.rgba16.png +levels/castle_inside/18.rgba16.png +levels/castle_inside/19.rgba16.png +levels/castle_inside/2.ia16.png +levels/castle_inside/20.rgba16.png +levels/castle_inside/21.rgba16.png +levels/castle_inside/22.rgba16.png +levels/castle_inside/23.rgba16.png +levels/castle_inside/23_us.rgba16.png +levels/castle_inside/24.rgba16.png +levels/castle_inside/24_us.rgba16.png +levels/castle_inside/25.rgba16.png +levels/castle_inside/26.rgba16.png +levels/castle_inside/27.rgba16.png +levels/castle_inside/28.rgba16.png +levels/castle_inside/29.rgba16.png +levels/castle_inside/3.rgba16.png +levels/castle_inside/30.rgba16.png +levels/castle_inside/31.rgba16.png +levels/castle_inside/32.rgba16.png +levels/castle_inside/33.rgba16.png +levels/castle_inside/34.rgba16.png +levels/castle_inside/35.rgba16.png +levels/castle_inside/36.rgba16.png +levels/castle_inside/37.rgba16.png +levels/castle_inside/38.rgba16.png +levels/castle_inside/39.rgba16.png +levels/castle_inside/4.rgba16.png +levels/castle_inside/40.rgba16.png +levels/castle_inside/5.rgba16.png +levels/castle_inside/6.rgba16.png +levels/castle_inside/7.rgba16.png +levels/castle_inside/8.rgba16.png +levels/castle_inside/9.rgba16.png +levels/castle_inside/castle_light.ia16.png +levels/ccm/0.rgba16.png +levels/ccm/1.rgba16.png +levels/ccm/10.rgba16.png +levels/ccm/11.rgba16.png +levels/ccm/12.rgba16.png +levels/ccm/2.rgba16.png +levels/ccm/3.rgba16.png +levels/ccm/4.rgba16.png +levels/ccm/5.rgba16.png +levels/ccm/6.rgba16.png +levels/ccm/7.rgba16.png +levels/ccm/8.ia16.png +levels/ccm/9.ia16.png +levels/cotmc/0.rgba16.png +levels/cotmc/1.rgba16.png +levels/cotmc/2.rgba16.png +levels/cotmc/3.rgba16.png +levels/cotmc/4.rgba16.png +levels/ddd/0.rgba16.png +levels/ddd/1.rgba16.png +levels/ddd/2.rgba16.png +levels/ddd/3.rgba16.png +levels/ddd/4.rgba16.png +levels/ending/cake.png +levels/ending/cake_eu.png +levels/ending/eu_023000.rgba16.png +levels/ending/eu_024000.rgba16.png +levels/ending/eu_025000.rgba16.png +levels/ending/eu_026000.rgba16.png +levels/ending/eu_027000.rgba16.png +levels/ending/eu_028000.rgba16.png +levels/hmc/0.rgba16.png +levels/hmc/1.rgba16.png +levels/hmc/2.rgba16.png +levels/hmc/3.rgba16.png +levels/hmc/4.rgba16.png +levels/hmc/5.rgba16.png +levels/hmc/6.rgba16.png +levels/hmc/7.rgba16.png +levels/intro/0.rgba16.png +levels/intro/1.rgba16.png +levels/intro/2_copyright.rgba16.png +levels/intro/2_eu_copyright.rgba16.png +levels/intro/3_eu_tm.rgba16.png +levels/intro/3_sh_tm.rgba16.png +levels/intro/3_tm.rgba16.png +levels/jrb/0.rgba16.png +levels/jrb/1.rgba16.png +levels/jrb/2.rgba16.png +levels/jrb/3.rgba16.png +levels/lll/0.rgba16.png +levels/lll/1.rgba16.png +levels/lll/10.rgba16.png +levels/lll/11.rgba16.png +levels/lll/12.rgba16.png +levels/lll/13.rgba16.png +levels/lll/14.rgba16.png +levels/lll/15.rgba16.png +levels/lll/16.rgba16.png +levels/lll/17.rgba16.png +levels/lll/18.rgba16.png +levels/lll/19.rgba16.png +levels/lll/2.rgba16.png +levels/lll/20.rgba16.png +levels/lll/21.rgba16.png +levels/lll/22.rgba16.png +levels/lll/23.rgba16.png +levels/lll/24.rgba16.png +levels/lll/25.rgba16.png +levels/lll/26.rgba16.png +levels/lll/27.ia16.png +levels/lll/28.rgba16.png +levels/lll/29.rgba16.png +levels/lll/3.rgba16.png +levels/lll/30.rgba16.png +levels/lll/31.rgba16.png +levels/lll/32.rgba16.png +levels/lll/4.rgba16.png +levels/lll/5.rgba16.png +levels/lll/6.rgba16.png +levels/lll/7.rgba16.png +levels/lll/8.rgba16.png +levels/lll/9.rgba16.png +levels/menu/main_menu_seg7.00018.rgba16.png +levels/menu/main_menu_seg7.00818.rgba16.png +levels/menu/main_menu_seg7.01018.rgba16.png +levels/menu/main_menu_seg7.02018.rgba16.png +levels/menu/main_menu_seg7.03468.rgba16.png +levels/menu/main_menu_seg7.03C68.rgba16.png +levels/menu/main_menu_seg7.04468.rgba16.png +levels/menu/main_menu_seg7.04C68.rgba16.png +levels/menu/main_menu_seg7.05468.rgba16.png +levels/menu/main_menu_seg7.06328.rgba16.png +levels/menu/main_menu_seg7.06B28.rgba16.png +levels/menu/main_menu_seg7.073D0.rgba16.png +levels/menu/main_menu_seg7.075D0.rgba16.png +levels/menu/main_menu_seg7.077D0.rgba16.png +levels/menu/main_menu_seg7.079D0.rgba16.png +levels/menu/main_menu_seg7.07BD0.rgba16.png +levels/menu/main_menu_seg7.07DD0.rgba16.png +levels/menu/main_menu_seg7.07FD0.rgba16.png +levels/menu/main_menu_seg7.081D0.rgba16.png +levels/menu/main_menu_seg7.083D0.rgba16.png +levels/menu/main_menu_seg7.085D0.rgba16.png +levels/menu/main_menu_seg7.087D0.rgba16.png +levels/menu/main_menu_seg7.089D0.rgba16.png +levels/menu/main_menu_seg7.08BD0.rgba16.png +levels/menu/main_menu_seg7.08DD0.rgba16.png +levels/menu/main_menu_seg7.08FD0.rgba16.png +levels/menu/main_menu_seg7.091D0.rgba16.png +levels/menu/main_menu_seg7.093D0.rgba16.png +levels/menu/main_menu_seg7.095D0.rgba16.png +levels/menu/main_menu_seg7.097D0.rgba16.png +levels/menu/main_menu_seg7.099D0.rgba16.png +levels/menu/main_menu_seg7.09BD0.rgba16.png +levels/menu/main_menu_seg7.09DD0.rgba16.png +levels/menu/main_menu_seg7.09FD0.rgba16.png +levels/menu/main_menu_seg7.0A1D0.rgba16.png +levels/menu/main_menu_seg7.0A3D0.rgba16.png +levels/menu/main_menu_seg7.0A5D0.rgba16.png +levels/menu/main_menu_seg7.0A7D0.rgba16.png +levels/menu/main_menu_seg7.0A9D0.rgba16.png +levels/menu/main_menu_seg7.0AC48.ia8.png +levels/menu/main_menu_seg7.0AC88.ia8.png +levels/menu/main_menu_seg7.0ACC8.ia8.png +levels/menu/main_menu_seg7.0AD08.ia8.png +levels/menu/main_menu_seg7.0AD48.ia8.png +levels/menu/main_menu_seg7.0AD88.ia8.png +levels/menu/main_menu_seg7.0ADC8.ia8.png +levels/menu/main_menu_seg7.0AE08.ia8.png +levels/menu/main_menu_seg7.0AE48.ia8.png +levels/menu/main_menu_seg7.0AE88.ia8.png +levels/menu/main_menu_seg7.0AEC8.ia8.png +levels/menu/main_menu_seg7.0AF08.ia8.png +levels/menu/main_menu_seg7.0AF48.ia8.png +levels/menu/main_menu_seg7.0AF88.ia8.png +levels/menu/main_menu_seg7.0AFC8.ia8.png +levels/menu/main_menu_seg7.0B008.ia8.png +levels/menu/main_menu_seg7.0B048.ia8.png +levels/menu/main_menu_seg7.0B088.ia8.png +levels/menu/main_menu_seg7.0B0C8.ia8.png +levels/menu/main_menu_seg7.0B108.ia8.png +levels/menu/main_menu_seg7.0B148.ia8.png +levels/menu/main_menu_seg7.0B188.ia8.png +levels/menu/main_menu_seg7.0B1C8.ia8.png +levels/menu/main_menu_seg7.0B208.ia8.png +levels/menu/main_menu_seg7.0B248.ia8.png +levels/menu/main_menu_seg7.0B288.ia8.png +levels/menu/main_menu_seg7.0B2C8.ia8.png +levels/menu/main_menu_seg7.0B308.ia8.png +levels/menu/main_menu_seg7.0B348.ia8.png +levels/menu/main_menu_seg7.0B388.ia8.png +levels/menu/main_menu_seg7.0B3C8.ia8.png +levels/menu/main_menu_seg7.0B408.ia8.png +levels/menu/main_menu_seg7.0B448.ia8.png +levels/menu/main_menu_seg7.0B488.ia8.png +levels/menu/main_menu_seg7.0B4C8.ia8.png +levels/menu/main_menu_seg7.0B508.ia8.png +levels/menu/main_menu_seg7.0B548.ia8.png +levels/menu/main_menu_seg7.0B588.ia8.png +levels/menu/main_menu_seg7.0B5C8.ia8.png +levels/menu/main_menu_seg7.0B608.ia8.png +levels/menu/main_menu_seg7.0B648.ia8.png +levels/menu/main_menu_seg7.0B688.ia8.png +levels/menu/main_menu_seg7.0B6C8.ia8.png +levels/menu/main_menu_seg7.0B708.ia8.png +levels/menu/main_menu_seg7.0B748.ia8.png +levels/menu/main_menu_seg7.0B788.ia8.png +levels/menu/main_menu_seg7.0B7C8.ia8.png +levels/menu/main_menu_seg7.0B808.ia8.png +levels/menu/main_menu_seg7.0B848.ia8.png +levels/menu/main_menu_seg7.0B888.ia8.png +levels/menu/main_menu_seg7.0B8C8.ia8.png +levels/menu/main_menu_seg7.0B908.ia8.png +levels/menu/main_menu_seg7.0B948.ia8.png +levels/menu/main_menu_seg7.0B988.ia8.png +levels/menu/main_menu_seg7.0B9C8.ia8.png +levels/menu/main_menu_seg7.0BA08.ia8.png +levels/menu/main_menu_seg7.0BA48.ia8.png +levels/menu/main_menu_seg7.0BA88.ia8.png +levels/menu/main_menu_seg7.0BAC8.ia8.png +levels/menu/main_menu_seg7.0BB08.ia8.png +levels/menu/main_menu_seg7.0BB48.ia8.png +levels/menu/main_menu_seg7.0BB88.ia8.png +levels/menu/main_menu_seg7.0BBC8.ia8.png +levels/menu/main_menu_seg7.0BC08.ia8.png +levels/menu/main_menu_seg7.0BC48.ia8.png +levels/menu/main_menu_seg7.0BC88.ia8.png +levels/menu/main_menu_seg7.0BCC8.ia8.png +levels/menu/main_menu_seg7.0BD08.ia8.png +levels/menu/main_menu_seg7.0BD48.ia8.png +levels/menu/main_menu_seg7.0BD88.ia8.png +levels/menu/main_menu_seg7.0BDC8.ia8.png +levels/menu/main_menu_seg7.0BE08.ia8.png +levels/menu/main_menu_seg7.0BE48.ia8.png +levels/menu/main_menu_seg7.0BE88.ia8.png +levels/menu/main_menu_seg7.0BEC8.ia8.png +levels/menu/main_menu_seg7.0BF08.ia8.png +levels/menu/main_menu_seg7.0BF48.ia8.png +levels/menu/main_menu_seg7.0BF88.ia8.png +levels/menu/main_menu_seg7.0BFC8.ia8.png +levels/menu/main_menu_seg7.0C008.ia8.png +levels/menu/main_menu_seg7.0C048.ia8.png +levels/menu/main_menu_seg7.0C088.ia8.png +levels/menu/main_menu_seg7.0C0C8.ia8.png +levels/menu/main_menu_seg7.0C108.ia8.png +levels/menu/main_menu_seg7.0C148.ia8.png +levels/menu/main_menu_seg7.0C188.ia8.png +levels/menu/main_menu_seg7.0C1C8.ia8.png +levels/menu/main_menu_seg7.0C208.ia8.png +levels/menu/main_menu_seg7.0C248.ia8.png +levels/menu/main_menu_seg7.0C288.ia8.png +levels/menu/main_menu_seg7.0C2C8.ia8.png +levels/menu/main_menu_seg7.0C308.ia8.png +levels/menu/main_menu_seg7.0C348.ia8.png +levels/menu/main_menu_seg7.0C388.ia8.png +levels/menu/main_menu_seg7.0C3C8.ia8.png +levels/menu/main_menu_seg7.0C408.ia8.png +levels/menu/main_menu_seg7.0C448.ia8.png +levels/menu/main_menu_seg7.0C488.ia8.png +levels/menu/main_menu_seg7.0C4C8.ia8.png +levels/menu/main_menu_seg7.0C508.ia8.png +levels/menu/main_menu_seg7.0C548.ia8.png +levels/menu/main_menu_seg7.0C588.ia8.png +levels/menu/main_menu_seg7.0C5C8.ia8.png +levels/menu/main_menu_seg7.0C608.ia8.png +levels/menu/main_menu_seg7.0C648.ia8.png +levels/menu/main_menu_seg7.0C688.ia8.png +levels/menu/main_menu_seg7.0C6C8.ia8.png +levels/menu/main_menu_seg7.0C708.ia8.png +levels/menu/main_menu_seg7.0C748.ia8.png +levels/menu/main_menu_seg7.0C788.ia8.png +levels/menu/main_menu_seg7.0C7C8.ia8.png +levels/menu/main_menu_seg7.0C808.ia8.png +levels/menu/main_menu_seg7.0C848.ia8.png +levels/menu/main_menu_seg7.0C888.ia8.png +levels/menu/main_menu_seg7.0C8C8.ia8.png +levels/menu/main_menu_seg7.0C908.ia8.png +levels/menu/main_menu_seg7.0C948.ia8.png +levels/menu/main_menu_seg7.0C988.ia8.png +levels/menu/main_menu_seg7.0C9C8.ia8.png +levels/menu/main_menu_seg7.0CA08.ia8.png +levels/menu/main_menu_seg7.0CA48.ia8.png +levels/menu/main_menu_seg7.0CA88.ia8.png +levels/menu/main_menu_seg7.0CAC8.ia8.png +levels/menu/main_menu_seg7.0CB08.ia8.png +levels/menu/main_menu_seg7.0CB48.ia8.png +levels/menu/main_menu_seg7.0CB88.ia8.png +levels/menu/main_menu_seg7.0CBC8.ia8.png +levels/menu/main_menu_seg7.0CC08.ia8.png +levels/menu/main_menu_seg7.0CC48.ia8.png +levels/menu/main_menu_seg7.0CC88.ia8.png +levels/menu/main_menu_seg7.0CCC8.ia8.png +levels/menu/main_menu_seg7.0D1A8.rgba16.png +levels/menu/main_menu_seg7.0E1A8.rgba16.png +levels/menu/main_menu_seg7_eu.0AF80.ia8.png +levels/menu/main_menu_seg7_eu.0B640.ia8.png +levels/menu/main_menu_seg7_eu.0B680.ia8.png +levels/menu/main_menu_seg7_eu.0B840.ia8.png +levels/menu/main_menu_seg7_eu.0B880.ia8.png +levels/menu/main_menu_seg7_eu.0B8C0.ia8.png +levels/menu/main_menu_seg7_eu.0BDA0.rgba16.png +levels/menu/main_menu_seg7_eu.0CDA0.rgba16.png +levels/menu/main_menu_seg7_eu.0DDA0.rgba16.png +levels/menu/main_menu_seg7_eu.0EDA0.rgba16.png +levels/menu/main_menu_seg7_us.0AC40.ia8.png +levels/menu/main_menu_seg7_us.0AC80.ia8.png +levels/menu/main_menu_seg7_us.0ACC0.ia8.png +levels/menu/main_menu_seg7_us.0AD00.ia8.png +levels/menu/main_menu_seg7_us.0AD40.ia8.png +levels/menu/main_menu_seg7_us.0AD80.ia8.png +levels/menu/main_menu_seg7_us.0ADC0.ia8.png +levels/menu/main_menu_seg7_us.0AE00.ia8.png +levels/menu/main_menu_seg7_us.0AE40.ia8.png +levels/menu/main_menu_seg7_us.0AE80.ia8.png +levels/menu/main_menu_seg7_us.0AEC0.ia8.png +levels/menu/main_menu_seg7_us.0AF00.ia8.png +levels/menu/main_menu_seg7_us.0AF40.ia8.png +levels/menu/main_menu_seg7_us.0AF80.ia8.png +levels/menu/main_menu_seg7_us.0AFC0.ia8.png +levels/menu/main_menu_seg7_us.0B000.ia8.png +levels/menu/main_menu_seg7_us.0B040.ia8.png +levels/menu/main_menu_seg7_us.0B080.ia8.png +levels/menu/main_menu_seg7_us.0B0C0.ia8.png +levels/menu/main_menu_seg7_us.0B100.ia8.png +levels/menu/main_menu_seg7_us.0B140.ia8.png +levels/menu/main_menu_seg7_us.0B180.ia8.png +levels/menu/main_menu_seg7_us.0B1C0.ia8.png +levels/menu/main_menu_seg7_us.0B200.ia8.png +levels/menu/main_menu_seg7_us.0B240.ia8.png +levels/menu/main_menu_seg7_us.0B280.ia8.png +levels/menu/main_menu_seg7_us.0B2C0.ia8.png +levels/menu/main_menu_seg7_us.0B300.ia8.png +levels/menu/main_menu_seg7_us.0B340.ia8.png +levels/menu/main_menu_seg7_us.0B380.ia8.png +levels/menu/main_menu_seg7_us.0B3C0.ia8.png +levels/menu/main_menu_seg7_us.0B400.ia8.png +levels/menu/main_menu_seg7_us.0B440.ia8.png +levels/menu/main_menu_seg7_us.0B480.ia8.png +levels/menu/main_menu_seg7_us.0B4C0.ia8.png +levels/menu/main_menu_seg7_us.0B500.ia8.png +levels/menu/main_menu_seg7_us.0B540.ia8.png +levels/menu/main_menu_seg7_us.0B580.ia8.png +levels/menu/main_menu_seg7_us.0B5C0.ia8.png +levels/menu/main_menu_seg7_us.0B600.ia8.png +levels/menu/main_menu_seg7_us.0B640.ia8.png +levels/menu/main_menu_seg7_us.0B680.ia8.png +levels/menu/main_menu_seg7_us.0B6C0.ia8.png +levels/menu/main_menu_seg7_us.0B700.ia8.png +levels/menu/main_menu_seg7_us.0B740.ia8.png +levels/menu/main_menu_seg7_us.0B780.ia8.png +levels/menu/main_menu_seg7_us.0B7C0.ia8.png +levels/menu/main_menu_seg7_us.0B800.ia8.png +levels/pss/0.rgba16.png +levels/pss/1.ia16.png +levels/pss/2.rgba16.png +levels/rr/1.rgba16.png +levels/rr/2.rgba16.png +levels/rr/quarter_flying_carpet.rgba16.png +levels/sl/0.rgba16.png +levels/sl/1.rgba16.png +levels/sl/2.rgba16.png +levels/sl/3.rgba16.png +levels/sl/4.rgba16.png +levels/ssl/0.rgba16.png +levels/ssl/1.ia16.png +levels/ssl/10.rgba16.png +levels/ssl/11.rgba16.png +levels/ssl/2.rgba16.png +levels/ssl/3.rgba16.png +levels/ssl/4.rgba16.png +levels/ssl/5.rgba16.png +levels/ssl/6.rgba16.png +levels/ssl/7.rgba16.png +levels/ssl/8.rgba16.png +levels/ssl/9.rgba16.png +levels/thi/0.rgba16.png +levels/thi/1.rgba16.png +levels/totwc/0.rgba16.png +levels/totwc/1.rgba16.png +levels/totwc/2.rgba16.png +levels/totwc/3.ia16.png +levels/ttc/0.rgba16.png +levels/ttc/1.rgba16.png +levels/ttc/2.rgba16.png +levels/ttm/0.ia16.png +levels/ttm/1.rgba16.png +levels/ttm/2.rgba16.png +levels/ttm/3.rgba16.png +levels/ttm/4.rgba16.png +levels/ttm/5.rgba16.png +levels/ttm/6.rgba16.png +levels/ttm/7.rgba16.png +levels/ttm/8.rgba16.png +levels/vcutm/0.rgba16.png +levels/vcutm/1.rgba16.png +levels/vcutm/2.rgba16.png +levels/vcutm/3.rgba16.png +levels/wdw/0.rgba16.png +levels/wdw/1.rgba16.png +levels/wdw/2.rgba16.png +levels/wdw/3.rgba16.png +levels/wdw/4.rgba16.png +levels/wf/0.rgba16.png +levels/wf/1.rgba16.png +levels/wf/2.rgba16.png +levels/wf/3.rgba16.png +levels/wf/4.rgba16.png +levels/wf/5.ia8.png +levels/wmotr/0.rgba16.png +levels/wmotr/1.rgba16.png +levels/wmotr/2.rgba16.png +levels/wmotr/3.rgba16.png +levels/wmotr/4.rgba16.png +sound/samples/bowser_organ/00_organ_1.aiff +sound/samples/bowser_organ/01_organ_1_lq.aiff +sound/samples/bowser_organ/02_boys_choir.aiff +sound/samples/course_start/00_la.aiff +sound/samples/instruments/00.aiff +sound/samples/instruments/01_banjo_1.aiff +sound/samples/instruments/02.aiff +sound/samples/instruments/03_human_whistle.aiff +sound/samples/instruments/04_bright_piano.aiff +sound/samples/instruments/05_acoustic_bass.aiff +sound/samples/instruments/06_kick_drum_1.aiff +sound/samples/instruments/07_rimshot.aiff +sound/samples/instruments/08.aiff +sound/samples/instruments/09.aiff +sound/samples/instruments/0A_tambourine.aiff +sound/samples/instruments/0B.aiff +sound/samples/instruments/0C_conga_stick.aiff +sound/samples/instruments/0D_clave.aiff +sound/samples/instruments/0E_hihat_closed.aiff +sound/samples/instruments/0F_hihat_open.aiff +sound/samples/instruments/10_cymbal_bell.aiff +sound/samples/instruments/11_splash_cymbal.aiff +sound/samples/instruments/12_snare_drum_1.aiff +sound/samples/instruments/13_snare_drum_2.aiff +sound/samples/instruments/14_strings_5.aiff +sound/samples/instruments/15_strings_4.aiff +sound/samples/instruments/16_french_horns.aiff +sound/samples/instruments/17_trumpet.aiff +sound/samples/instruments/18_timpani.aiff +sound/samples/instruments/19_brass.aiff +sound/samples/instruments/1A_slap_bass.aiff +sound/samples/instruments/1B_organ_2.aiff +sound/samples/instruments/1C.aiff +sound/samples/instruments/1D.aiff +sound/samples/instruments/1E_closed_triangle.aiff +sound/samples/instruments/1F_open_triangle.aiff +sound/samples/instruments/20_cabasa.aiff +sound/samples/instruments/21_sine_bass.aiff +sound/samples/instruments/22_boys_choir.aiff +sound/samples/instruments/23_strings_1.aiff +sound/samples/instruments/24_strings_2.aiff +sound/samples/instruments/25_strings_3.aiff +sound/samples/instruments/26_crystal_rhodes.aiff +sound/samples/instruments/27_harpsichord.aiff +sound/samples/instruments/28_sitar_1.aiff +sound/samples/instruments/29_orchestra_hit.aiff +sound/samples/instruments/2A.aiff +sound/samples/instruments/2B.aiff +sound/samples/instruments/2C.aiff +sound/samples/instruments/2D_trombone.aiff +sound/samples/instruments/2E_accordion.aiff +sound/samples/instruments/2F_sleigh_bells.aiff +sound/samples/instruments/30_rarefaction-lahna.aiff +sound/samples/instruments/31_rarefaction-convolution.aiff +sound/samples/instruments/32_metal_rimshot.aiff +sound/samples/instruments/33_kick_drum_2.aiff +sound/samples/instruments/34_alto_flute.aiff +sound/samples/instruments/34b_organ.aiff +sound/samples/instruments/34c_organ_lq.aiff +sound/samples/instruments/35_gospel_organ.aiff +sound/samples/instruments/36_sawtooth_synth.aiff +sound/samples/instruments/37_square_synth.aiff +sound/samples/instruments/38_electric_kick_drum.aiff +sound/samples/instruments/39_sitar_2.aiff +sound/samples/instruments/3A_music_box.aiff +sound/samples/instruments/3B_banjo_2.aiff +sound/samples/instruments/3C_acoustic_guitar.aiff +sound/samples/instruments/3D.aiff +sound/samples/instruments/3E_monk_choir.aiff +sound/samples/instruments/3F.aiff +sound/samples/instruments/40_bell.aiff +sound/samples/instruments/41_pan_flute.aiff +sound/samples/instruments/42_vibraphone.aiff +sound/samples/instruments/43_harmonica.aiff +sound/samples/instruments/44_grand_piano.aiff +sound/samples/instruments/45_french_horns_lq.aiff +sound/samples/instruments/45b_la.aiff +sound/samples/instruments/46_pizzicato_strings_1.aiff +sound/samples/instruments/47_pizzicato_strings_2.aiff +sound/samples/instruments/48_steel_drum.aiff +sound/samples/piranha_music_box/00_music_box.aiff +sound/samples/sfx_1/00_twirl.aiff +sound/samples/sfx_1/01_brushing.aiff +sound/samples/sfx_1/02_hand_touch.aiff +sound/samples/sfx_1/03_yoshi.aiff +sound/samples/sfx_1/04_plop.aiff +sound/samples/sfx_1/05_heavy_landing.aiff +sound/samples/sfx_4/00.aiff +sound/samples/sfx_4/01.aiff +sound/samples/sfx_4/02.aiff +sound/samples/sfx_4/03.aiff +sound/samples/sfx_4/04.aiff +sound/samples/sfx_4/05.aiff +sound/samples/sfx_4/06.aiff +sound/samples/sfx_4/07.aiff +sound/samples/sfx_4/08.aiff +sound/samples/sfx_4/09.aiff +sound/samples/sfx_5/00.aiff +sound/samples/sfx_5/01.aiff +sound/samples/sfx_5/02.aiff +sound/samples/sfx_5/03.aiff +sound/samples/sfx_5/04.aiff +sound/samples/sfx_5/05.aiff +sound/samples/sfx_5/06.aiff +sound/samples/sfx_5/07.aiff +sound/samples/sfx_5/08.aiff +sound/samples/sfx_5/09.aiff +sound/samples/sfx_5/0A.aiff +sound/samples/sfx_5/0B.aiff +sound/samples/sfx_5/0C.aiff +sound/samples/sfx_5/0D.aiff +sound/samples/sfx_5/0E.aiff +sound/samples/sfx_5/0F.aiff +sound/samples/sfx_5/10.aiff +sound/samples/sfx_5/11.aiff +sound/samples/sfx_5/12.aiff +sound/samples/sfx_5/13.aiff +sound/samples/sfx_5/14.aiff +sound/samples/sfx_5/15.aiff +sound/samples/sfx_5/16.aiff +sound/samples/sfx_5/17.aiff +sound/samples/sfx_5/18.aiff +sound/samples/sfx_5/19.aiff +sound/samples/sfx_5/1A.aiff +sound/samples/sfx_5/1B.aiff +sound/samples/sfx_5/1C.aiff +sound/samples/sfx_6/00.aiff +sound/samples/sfx_6/01.aiff +sound/samples/sfx_6/02.aiff +sound/samples/sfx_6/03.aiff +sound/samples/sfx_6/04.aiff +sound/samples/sfx_6/05.aiff +sound/samples/sfx_6/06.aiff +sound/samples/sfx_6/07.aiff +sound/samples/sfx_6/08.aiff +sound/samples/sfx_6/09.aiff +sound/samples/sfx_6/0A.aiff +sound/samples/sfx_6/0B.aiff +sound/samples/sfx_6/0C.aiff +sound/samples/sfx_6/0D.aiff +sound/samples/sfx_7/00.aiff +sound/samples/sfx_7/01.aiff +sound/samples/sfx_7/02.aiff +sound/samples/sfx_7/03.aiff +sound/samples/sfx_7/04.aiff +sound/samples/sfx_7/05.aiff +sound/samples/sfx_7/06.aiff +sound/samples/sfx_7/07.aiff +sound/samples/sfx_7/08.aiff +sound/samples/sfx_7/09.aiff +sound/samples/sfx_7/0A.aiff +sound/samples/sfx_7/0B.aiff +sound/samples/sfx_7/0C.aiff +sound/samples/sfx_7/0D_chain_chomp_bark.aiff +sound/samples/sfx_9/00.aiff +sound/samples/sfx_9/01.aiff +sound/samples/sfx_9/02.aiff +sound/samples/sfx_9/03.aiff +sound/samples/sfx_9/04_camera_buzz.aiff +sound/samples/sfx_9/05_camera_shutter.aiff +sound/samples/sfx_9/06.aiff +sound/samples/sfx_mario/00_mario_jump_hoo.aiff +sound/samples/sfx_mario/01_mario_jump_wah.aiff +sound/samples/sfx_mario/02_mario_yah.aiff +sound/samples/sfx_mario/03_mario_haha.aiff +sound/samples/sfx_mario/04_mario_yahoo.aiff +sound/samples/sfx_mario/05_mario_uh.aiff +sound/samples/sfx_mario/06_mario_hrmm.aiff +sound/samples/sfx_mario/07_mario_wah2.aiff +sound/samples/sfx_mario/08_mario_whoa.aiff +sound/samples/sfx_mario/09_mario_eeuh.aiff +sound/samples/sfx_mario/0A_mario_attacked.aiff +sound/samples/sfx_mario/0B_mario_ooof.aiff +sound/samples/sfx_mario/0C_mario_here_we_go.aiff +sound/samples/sfx_mario/0D_mario_yawning.aiff +sound/samples/sfx_mario/0E_mario_snoring1.aiff +sound/samples/sfx_mario/0F_mario_snoring2.aiff +sound/samples/sfx_mario/10_mario_doh.aiff +sound/samples/sfx_mario/11_mario_game_over.aiff +sound/samples/sfx_mario/12_mario_hello.aiff +sound/samples/sfx_mario/13_mario_press_start_to_play.aiff +sound/samples/sfx_mario/14_mario_twirl_bounce.aiff +sound/samples/sfx_mario/15_mario_snoring3.aiff +sound/samples/sfx_mario/16_mario_bye_bye.aiff +sound/samples/sfx_mario/16_mario_so_longa_bowser.aiff +sound/samples/sfx_mario/17_mario_ima_tired.aiff +sound/samples/sfx_mario/18_mario_waha.aiff +sound/samples/sfx_mario/19_mario_yippee.aiff +sound/samples/sfx_mario/1A_mario_lets_a_go.aiff +sound/samples/sfx_mario_peach/00_mario_waaaooow.aiff +sound/samples/sfx_mario_peach/01_mario_hoohoo.aiff +sound/samples/sfx_mario_peach/02_mario_panting.aiff +sound/samples/sfx_mario_peach/03_mario_dying.aiff +sound/samples/sfx_mario_peach/04_mario_on_fire.aiff +sound/samples/sfx_mario_peach/05_mario_uh2.aiff +sound/samples/sfx_mario_peach/06_mario_coughing.aiff +sound/samples/sfx_mario_peach/07_mario_its_a_me_mario.aiff +sound/samples/sfx_mario_peach/08_mario_punch_yah.aiff +sound/samples/sfx_mario_peach/09_mario_punch_hoo.aiff +sound/samples/sfx_mario_peach/0A_mario_mama_mia.aiff +sound/samples/sfx_mario_peach/0B_mario_okey_dokey.aiff +sound/samples/sfx_mario_peach/0C_mario_drowning.aiff +sound/samples/sfx_mario_peach/0D_mario_thank_you_playing_my_game.aiff +sound/samples/sfx_mario_peach/0E_peach_dear_mario.aiff +sound/samples/sfx_mario_peach/0F_peach_mario.aiff +sound/samples/sfx_mario_peach/10_peach_power_of_the_stars.aiff +sound/samples/sfx_mario_peach/11_peach_thanks_to_you.aiff +sound/samples/sfx_mario_peach/12_peach_thank_you_mario.aiff +sound/samples/sfx_mario_peach/13_peach_something_special.aiff +sound/samples/sfx_mario_peach/14_peach_bake_a_cake.aiff +sound/samples/sfx_mario_peach/15_peach_for_mario.aiff +sound/samples/sfx_mario_peach/16_peach_mario2.aiff +sound/samples/sfx_terrain/00_step_default.aiff +sound/samples/sfx_terrain/01_step_grass.aiff +sound/samples/sfx_terrain/02_step_stone.aiff +sound/samples/sfx_terrain/03_step_spooky.aiff +sound/samples/sfx_terrain/04_step_snow.aiff +sound/samples/sfx_terrain/05_step_ice.aiff +sound/samples/sfx_terrain/06_step_metal.aiff +sound/samples/sfx_terrain/07_step_sand.aiff +sound/samples/sfx_water/00_plunge.aiff +sound/samples/sfx_water/01_splash.aiff +sound/samples/sfx_water/02_swim.aiff +sound/sequences/eu/01_cutscene_collect_star.m64 +sound/sequences/eu/02_menu_title_screen.m64 +sound/sequences/eu/03_level_grass.m64 +sound/sequences/eu/04_level_inside_castle.m64 +sound/sequences/eu/05_level_water.m64 +sound/sequences/eu/06_level_hot.m64 +sound/sequences/eu/07_level_boss_koopa.m64 +sound/sequences/eu/08_level_snow.m64 +sound/sequences/eu/09_level_slide.m64 +sound/sequences/eu/0A_level_spooky.m64 +sound/sequences/eu/0B_event_piranha_plant.m64 +sound/sequences/eu/0C_level_underground.m64 +sound/sequences/eu/0D_menu_star_select.m64 +sound/sequences/eu/0E_event_powerup.m64 +sound/sequences/eu/0F_event_metal_cap.m64 +sound/sequences/eu/10_event_koopa_message.m64 +sound/sequences/eu/11_level_koopa_road.m64 +sound/sequences/eu/12_event_high_score.m64 +sound/sequences/eu/13_event_merry_go_round.m64 +sound/sequences/eu/14_event_race.m64 +sound/sequences/eu/15_cutscene_star_spawn.m64 +sound/sequences/eu/16_event_boss.m64 +sound/sequences/eu/17_cutscene_collect_key.m64 +sound/sequences/eu/18_event_endless_stairs.m64 +sound/sequences/eu/19_level_boss_koopa_final.m64 +sound/sequences/eu/1A_cutscene_credits.m64 +sound/sequences/eu/1B_event_solve_puzzle.m64 +sound/sequences/eu/1C_event_toad_message.m64 +sound/sequences/eu/1D_event_peach_message.m64 +sound/sequences/eu/1E_cutscene_intro.m64 +sound/sequences/eu/1F_cutscene_victory.m64 +sound/sequences/eu/20_cutscene_ending.m64 +sound/sequences/eu/21_menu_file_select.m64 +sound/sequences/eu/22_cutscene_lakitu.m64 +sound/sequences/jp/01_cutscene_collect_star.m64 +sound/sequences/jp/02_menu_title_screen.m64 +sound/sequences/jp/03_level_grass.m64 +sound/sequences/jp/04_level_inside_castle.m64 +sound/sequences/jp/05_level_water.m64 +sound/sequences/jp/06_level_hot.m64 +sound/sequences/jp/07_level_boss_koopa.m64 +sound/sequences/jp/08_level_snow.m64 +sound/sequences/jp/09_level_slide.m64 +sound/sequences/jp/0A_level_spooky.m64 +sound/sequences/jp/0B_event_piranha_plant.m64 +sound/sequences/jp/0C_level_underground.m64 +sound/sequences/jp/0D_menu_star_select.m64 +sound/sequences/jp/0E_event_powerup.m64 +sound/sequences/jp/0F_event_metal_cap.m64 +sound/sequences/jp/10_event_koopa_message.m64 +sound/sequences/jp/11_level_koopa_road.m64 +sound/sequences/jp/12_event_high_score.m64 +sound/sequences/jp/13_event_merry_go_round.m64 +sound/sequences/jp/14_event_race.m64 +sound/sequences/jp/15_cutscene_star_spawn.m64 +sound/sequences/jp/16_event_boss.m64 +sound/sequences/jp/17_cutscene_collect_key.m64 +sound/sequences/jp/18_event_endless_stairs.m64 +sound/sequences/jp/19_level_boss_koopa_final.m64 +sound/sequences/jp/1A_cutscene_credits.m64 +sound/sequences/jp/1B_event_solve_puzzle.m64 +sound/sequences/jp/1C_event_toad_message.m64 +sound/sequences/jp/1D_event_peach_message.m64 +sound/sequences/jp/1E_cutscene_intro.m64 +sound/sequences/jp/1F_cutscene_victory.m64 +sound/sequences/jp/20_cutscene_ending.m64 +sound/sequences/jp/21_menu_file_select.m64 +sound/sequences/sh/01_cutscene_collect_star.m64 +sound/sequences/sh/02_menu_title_screen.m64 +sound/sequences/sh/03_level_grass.m64 +sound/sequences/sh/04_level_inside_castle.m64 +sound/sequences/sh/05_level_water.m64 +sound/sequences/sh/06_level_hot.m64 +sound/sequences/sh/07_level_boss_koopa.m64 +sound/sequences/sh/08_level_snow.m64 +sound/sequences/sh/09_level_slide.m64 +sound/sequences/sh/0A_level_spooky.m64 +sound/sequences/sh/0B_event_piranha_plant.m64 +sound/sequences/sh/0C_level_underground.m64 +sound/sequences/sh/0D_menu_star_select.m64 +sound/sequences/sh/0E_event_powerup.m64 +sound/sequences/sh/0F_event_metal_cap.m64 +sound/sequences/sh/10_event_koopa_message.m64 +sound/sequences/sh/11_level_koopa_road.m64 +sound/sequences/sh/12_event_high_score.m64 +sound/sequences/sh/13_event_merry_go_round.m64 +sound/sequences/sh/14_event_race.m64 +sound/sequences/sh/15_cutscene_star_spawn.m64 +sound/sequences/sh/16_event_boss.m64 +sound/sequences/sh/17_cutscene_collect_key.m64 +sound/sequences/sh/18_event_endless_stairs.m64 +sound/sequences/sh/19_level_boss_koopa_final.m64 +sound/sequences/sh/1A_cutscene_credits.m64 +sound/sequences/sh/1B_event_solve_puzzle.m64 +sound/sequences/sh/1C_event_toad_message.m64 +sound/sequences/sh/1D_event_peach_message.m64 +sound/sequences/sh/1E_cutscene_intro.m64 +sound/sequences/sh/1F_cutscene_victory.m64 +sound/sequences/sh/20_cutscene_ending.m64 +sound/sequences/sh/21_menu_file_select.m64 +sound/sequences/sh/22_cutscene_lakitu.m64 +sound/sequences/us/01_cutscene_collect_star.m64 +sound/sequences/us/02_menu_title_screen.m64 +sound/sequences/us/03_level_grass.m64 +sound/sequences/us/04_level_inside_castle.m64 +sound/sequences/us/05_level_water.m64 +sound/sequences/us/06_level_hot.m64 +sound/sequences/us/07_level_boss_koopa.m64 +sound/sequences/us/08_level_snow.m64 +sound/sequences/us/09_level_slide.m64 +sound/sequences/us/0A_level_spooky.m64 +sound/sequences/us/0B_event_piranha_plant.m64 +sound/sequences/us/0C_level_underground.m64 +sound/sequences/us/0D_menu_star_select.m64 +sound/sequences/us/0E_event_powerup.m64 +sound/sequences/us/0F_event_metal_cap.m64 +sound/sequences/us/10_event_koopa_message.m64 +sound/sequences/us/11_level_koopa_road.m64 +sound/sequences/us/12_event_high_score.m64 +sound/sequences/us/13_event_merry_go_round.m64 +sound/sequences/us/14_event_race.m64 +sound/sequences/us/15_cutscene_star_spawn.m64 +sound/sequences/us/16_event_boss.m64 +sound/sequences/us/17_cutscene_collect_key.m64 +sound/sequences/us/18_event_endless_stairs.m64 +sound/sequences/us/19_level_boss_koopa_final.m64 +sound/sequences/us/1A_cutscene_credits.m64 +sound/sequences/us/1B_event_solve_puzzle.m64 +sound/sequences/us/1C_event_toad_message.m64 +sound/sequences/us/1D_event_peach_message.m64 +sound/sequences/us/1E_cutscene_intro.m64 +sound/sequences/us/1F_cutscene_victory.m64 +sound/sequences/us/20_cutscene_ending.m64 +sound/sequences/us/21_menu_file_select.m64 +sound/sequences/us/22_cutscene_lakitu.m64 +textures/cave/hmc_textures.00000.rgba16.png +textures/cave/hmc_textures.01000.rgba16.png +textures/cave/hmc_textures.01800.rgba16.png +textures/cave/hmc_textures.02800.rgba16.png +textures/cave/hmc_textures.03000.rgba16.png +textures/cave/hmc_textures.03800.rgba16.png +textures/cave/hmc_textures.04800.rgba16.png +textures/cave/hmc_textures.05800.rgba16.png +textures/cave/hmc_textures.06800.rgba16.png +textures/cave/hmc_textures.07000.rgba16.png +textures/cave/hmc_textures.07800.rgba16.png +textures/cave/hmc_textures.08800.rgba16.png +textures/cave/hmc_textures.09800.rgba16.png +textures/cave/hmc_textures.0A000.rgba16.png +textures/cave/hmc_textures.0A800.rgba16.png +textures/cave/hmc_textures.0B800.ia16.png +textures/cave/hmc_textures.0C000.ia16.png +textures/crash_screen/crash_screen_font.ia1.png +textures/effect/bubble.06048.rgba16.png +textures/effect/flower.00008.rgba16.png +textures/effect/flower.00808.rgba16.png +textures/effect/flower.01008.rgba16.png +textures/effect/flower.01808.rgba16.png +textures/effect/lava_bubble.02020.rgba16.png +textures/effect/lava_bubble.02820.rgba16.png +textures/effect/lava_bubble.03020.rgba16.png +textures/effect/lava_bubble.03820.rgba16.png +textures/effect/lava_bubble.04020.rgba16.png +textures/effect/lava_bubble.04820.rgba16.png +textures/effect/lava_bubble.05020.rgba16.png +textures/effect/lava_bubble.05820.rgba16.png +textures/effect/tiny_bubble.0684C.rgba16.png +textures/effect/tiny_bubble.06AD8.rgba16.png +textures/fire/lll_textures.00000.rgba16.png +textures/fire/lll_textures.00800.rgba16.png +textures/fire/lll_textures.01000.rgba16.png +textures/fire/lll_textures.01800.rgba16.png +textures/fire/lll_textures.02000.rgba16.png +textures/fire/lll_textures.02800.rgba16.png +textures/fire/lll_textures.03000.rgba16.png +textures/fire/lll_textures.03800.rgba16.png +textures/fire/lll_textures.04000.rgba16.png +textures/fire/lll_textures.04800.rgba16.png +textures/fire/lll_textures.05000.rgba16.png +textures/fire/lll_textures.05800.rgba16.png +textures/fire/lll_textures.06000.rgba16.png +textures/fire/lll_textures.06800.rgba16.png +textures/fire/lll_textures.07000.rgba16.png +textures/fire/lll_textures.07800.rgba16.png +textures/fire/lll_textures.08000.rgba16.png +textures/fire/lll_textures.08800.rgba16.png +textures/fire/lll_textures.09000.rgba16.png +textures/fire/lll_textures.09800.rgba16.png +textures/fire/lll_textures.0A000.rgba16.png +textures/fire/lll_textures.0A800.rgba16.png +textures/fire/lll_textures.0B000.rgba16.png +textures/fire/lll_textures.0B800.rgba16.png +textures/generic/bob_textures.00000.rgba16.png +textures/generic/bob_textures.00800.rgba16.png +textures/generic/bob_textures.01000.rgba16.png +textures/generic/bob_textures.01800.rgba16.png +textures/generic/bob_textures.02000.rgba16.png +textures/generic/bob_textures.02800.rgba16.png +textures/generic/bob_textures.03000.rgba16.png +textures/generic/bob_textures.03800.rgba16.png +textures/generic/bob_textures.04000.rgba16.png +textures/generic/bob_textures.04800.rgba16.png +textures/generic/bob_textures.05000.rgba16.png +textures/generic/bob_textures.05800.rgba16.png +textures/generic/bob_textures.06000.rgba16.png +textures/generic/bob_textures.07000.rgba16.png +textures/generic/bob_textures.07800.rgba16.png +textures/generic/bob_textures.08000.rgba16.png +textures/generic/bob_textures.08800.rgba16.png +textures/generic/bob_textures.09000.rgba16.png +textures/generic/bob_textures.09800.rgba16.png +textures/generic/bob_textures.0A000.rgba16.png +textures/generic/bob_textures.0A800.rgba16.png +textures/generic/bob_textures.0B000.ia16.png +textures/grass/wf_textures.00000.rgba16.png +textures/grass/wf_textures.00800.rgba16.png +textures/grass/wf_textures.01000.rgba16.png +textures/grass/wf_textures.01800.rgba16.png +textures/grass/wf_textures.02000.rgba16.png +textures/grass/wf_textures.02800.rgba16.png +textures/grass/wf_textures.03000.rgba16.png +textures/grass/wf_textures.03800.rgba16.png +textures/grass/wf_textures.04000.rgba16.png +textures/grass/wf_textures.04800.rgba16.png +textures/grass/wf_textures.05000.rgba16.png +textures/grass/wf_textures.05800.rgba16.png +textures/grass/wf_textures.06000.rgba16.png +textures/grass/wf_textures.06800.rgba16.png +textures/grass/wf_textures.07000.rgba16.png +textures/grass/wf_textures.07800.rgba16.png +textures/grass/wf_textures.08000.rgba16.png +textures/grass/wf_textures.08800.rgba16.png +textures/grass/wf_textures.09000.rgba16.png +textures/grass/wf_textures.09800.rgba16.png +textures/grass/wf_textures.0A000.rgba16.png +textures/grass/wf_textures.0A800.rgba16.png +textures/grass/wf_textures.0B000.ia16.png +textures/grass/wf_textures.0B800.ia16.png +textures/inside/inside_castle_textures.00000.rgba16.png +textures/inside/inside_castle_textures.01000.rgba16.png +textures/inside/inside_castle_textures.02000.rgba16.png +textures/inside/inside_castle_textures.03000.rgba16.png +textures/inside/inside_castle_textures.03800.rgba16.png +textures/inside/inside_castle_textures.04000.rgba16.png +textures/inside/inside_castle_textures.04800.rgba16.png +textures/inside/inside_castle_textures.05000.rgba16.png +textures/inside/inside_castle_textures.05800.rgba16.png +textures/inside/inside_castle_textures.06000.rgba16.png +textures/inside/inside_castle_textures.07000.rgba16.png +textures/inside/inside_castle_textures.08000.rgba16.png +textures/inside/inside_castle_textures.08800.rgba16.png +textures/inside/inside_castle_textures.09000.rgba16.png +textures/inside/inside_castle_textures.0A000.rgba16.png +textures/inside/inside_castle_textures.0B000.rgba16.png +textures/inside/inside_castle_textures.0B800.rgba16.png +textures/intro_raw/hand_closed.rgba16.png +textures/intro_raw/hand_open.rgba16.png +textures/intro_raw/mario_face_shine.ia8.png +textures/intro_raw/red_star_0.rgba16.png +textures/intro_raw/red_star_1.rgba16.png +textures/intro_raw/red_star_2.rgba16.png +textures/intro_raw/red_star_3.rgba16.png +textures/intro_raw/red_star_4.rgba16.png +textures/intro_raw/red_star_5.rgba16.png +textures/intro_raw/red_star_6.rgba16.png +textures/intro_raw/red_star_7.rgba16.png +textures/intro_raw/sparkle_0.rgba16.png +textures/intro_raw/sparkle_1.rgba16.png +textures/intro_raw/sparkle_2.rgba16.png +textures/intro_raw/sparkle_3.rgba16.png +textures/intro_raw/sparkle_4.rgba16.png +textures/intro_raw/sparkle_5.rgba16.png +textures/intro_raw/white_star_0.rgba16.png +textures/intro_raw/white_star_1.rgba16.png +textures/intro_raw/white_star_2.rgba16.png +textures/intro_raw/white_star_3.rgba16.png +textures/intro_raw/white_star_4.rgba16.png +textures/intro_raw/white_star_5.rgba16.png +textures/intro_raw/white_star_6.rgba16.png +textures/intro_raw/white_star_7.rgba16.png +textures/ipl3_raw/ipl3_font_00.ia1.png +textures/ipl3_raw/ipl3_font_01.ia1.png +textures/ipl3_raw/ipl3_font_02.ia1.png +textures/ipl3_raw/ipl3_font_03.ia1.png +textures/ipl3_raw/ipl3_font_04.ia1.png +textures/ipl3_raw/ipl3_font_05.ia1.png +textures/ipl3_raw/ipl3_font_06.ia1.png +textures/ipl3_raw/ipl3_font_07.ia1.png +textures/ipl3_raw/ipl3_font_08.ia1.png +textures/ipl3_raw/ipl3_font_09.ia1.png +textures/ipl3_raw/ipl3_font_10.ia1.png +textures/ipl3_raw/ipl3_font_11.ia1.png +textures/ipl3_raw/ipl3_font_12.ia1.png +textures/ipl3_raw/ipl3_font_13.ia1.png +textures/ipl3_raw/ipl3_font_14.ia1.png +textures/ipl3_raw/ipl3_font_15.ia1.png +textures/ipl3_raw/ipl3_font_16.ia1.png +textures/ipl3_raw/ipl3_font_17.ia1.png +textures/ipl3_raw/ipl3_font_18.ia1.png +textures/ipl3_raw/ipl3_font_19.ia1.png +textures/ipl3_raw/ipl3_font_20.ia1.png +textures/ipl3_raw/ipl3_font_21.ia1.png +textures/ipl3_raw/ipl3_font_22.ia1.png +textures/ipl3_raw/ipl3_font_23.ia1.png +textures/ipl3_raw/ipl3_font_24.ia1.png +textures/ipl3_raw/ipl3_font_25.ia1.png +textures/ipl3_raw/ipl3_font_26.ia1.png +textures/ipl3_raw/ipl3_font_27.ia1.png +textures/ipl3_raw/ipl3_font_28.ia1.png +textures/ipl3_raw/ipl3_font_29.ia1.png +textures/ipl3_raw/ipl3_font_30.ia1.png +textures/ipl3_raw/ipl3_font_31.ia1.png +textures/ipl3_raw/ipl3_font_32.ia1.png +textures/ipl3_raw/ipl3_font_33.ia1.png +textures/ipl3_raw/ipl3_font_34.ia1.png +textures/ipl3_raw/ipl3_font_35.ia1.png +textures/ipl3_raw/ipl3_font_36.ia1.png +textures/ipl3_raw/ipl3_font_37.ia1.png +textures/ipl3_raw/ipl3_font_38.ia1.png +textures/ipl3_raw/ipl3_font_39.ia1.png +textures/ipl3_raw/ipl3_font_40.ia1.png +textures/ipl3_raw/ipl3_font_41.ia1.png +textures/ipl3_raw/ipl3_font_42.ia1.png +textures/ipl3_raw/ipl3_font_43.ia1.png +textures/ipl3_raw/ipl3_font_44.ia1.png +textures/ipl3_raw/ipl3_font_45.ia1.png +textures/ipl3_raw/ipl3_font_46.ia1.png +textures/ipl3_raw/ipl3_font_47.ia1.png +textures/ipl3_raw/ipl3_font_48.ia1.png +textures/ipl3_raw/ipl3_font_49.ia1.png +textures/machine/ttc_textures.00000.rgba16.png +textures/machine/ttc_textures.00800.rgba16.png +textures/machine/ttc_textures.01000.rgba16.png +textures/machine/ttc_textures.01800.rgba16.png +textures/machine/ttc_textures.02000.rgba16.png +textures/machine/ttc_textures.02800.rgba16.png +textures/machine/ttc_textures.03000.rgba16.png +textures/machine/ttc_textures.03800.rgba16.png +textures/machine/ttc_textures.04000.rgba16.png +textures/machine/ttc_textures.05000.rgba16.png +textures/machine/ttc_textures.05800.rgba16.png +textures/machine/ttc_textures.06000.rgba16.png +textures/machine/ttc_textures.06800.rgba16.png +textures/machine/ttc_textures.07000.rgba16.png +textures/machine/ttc_textures.07800.rgba16.png +textures/machine/ttc_textures.08000.rgba16.png +textures/machine/ttc_textures.08400.rgba16.png +textures/mountain/ttm_textures.00000.rgba16.png +textures/mountain/ttm_textures.00800.rgba16.png +textures/mountain/ttm_textures.01800.rgba16.png +textures/mountain/ttm_textures.02800.rgba16.png +textures/mountain/ttm_textures.03000.rgba16.png +textures/mountain/ttm_textures.03800.rgba16.png +textures/mountain/ttm_textures.04000.rgba16.png +textures/mountain/ttm_textures.04800.rgba16.png +textures/mountain/ttm_textures.05000.rgba16.png +textures/mountain/ttm_textures.05800.rgba16.png +textures/mountain/ttm_textures.06800.rgba16.png +textures/mountain/ttm_textures.07000.rgba16.png +textures/mountain/ttm_textures.07800.rgba16.png +textures/mountain/ttm_textures.08000.rgba16.png +textures/mountain/ttm_textures.08800.rgba16.png +textures/mountain/ttm_textures.09800.rgba16.png +textures/mountain/ttm_textures.0A000.rgba16.png +textures/mountain/ttm_textures.0A800.rgba16.png +textures/mountain/ttm_textures.0B000.rgba16.png +textures/mountain/ttm_textures.0B800.rgba16.png +textures/mountain/ttm_textures.0C000.rgba16.png +textures/outside/castle_grounds_textures.00000.rgba16.png +textures/outside/castle_grounds_textures.00800.rgba16.png +textures/outside/castle_grounds_textures.01000.rgba16.png +textures/outside/castle_grounds_textures.02000.rgba16.png +textures/outside/castle_grounds_textures.03000.rgba16.png +textures/outside/castle_grounds_textures.03800.rgba16.png +textures/outside/castle_grounds_textures.04000.rgba16.png +textures/outside/castle_grounds_textures.04800.rgba16.png +textures/outside/castle_grounds_textures.05800.rgba16.png +textures/outside/castle_grounds_textures.06000.rgba16.png +textures/outside/castle_grounds_textures.06800.rgba16.png +textures/outside/castle_grounds_textures.07800.rgba16.png +textures/outside/castle_grounds_textures.08000.rgba16.png +textures/outside/castle_grounds_textures.08800.rgba16.png +textures/outside/castle_grounds_textures.09000.rgba16.png +textures/outside/castle_grounds_textures.09800.rgba16.png +textures/outside/castle_grounds_textures.0A000.rgba16.png +textures/outside/castle_grounds_textures.0A800.rgba16.png +textures/outside/castle_grounds_textures.0B000.rgba16.png +textures/outside/castle_grounds_textures.0B400.rgba16.png +textures/outside/castle_grounds_textures.0BC00.ia16.png +textures/segment2/font_graphics.05900.ia4.png +textures/segment2/font_graphics.05940.ia4.png +textures/segment2/font_graphics.05980.ia4.png +textures/segment2/font_graphics.059C0.ia4.png +textures/segment2/font_graphics.05A00.ia4.png +textures/segment2/font_graphics.05A40.ia4.png +textures/segment2/font_graphics.05A80.ia4.png +textures/segment2/font_graphics.05AC0.ia4.png +textures/segment2/font_graphics.05B00.ia4.png +textures/segment2/font_graphics.05B40.ia4.png +textures/segment2/font_graphics.05B80.ia4.png +textures/segment2/font_graphics.05BC0.ia4.png +textures/segment2/font_graphics.05C00.ia4.png +textures/segment2/font_graphics.05C40.ia4.png +textures/segment2/font_graphics.05C80.ia4.png +textures/segment2/font_graphics.05CC0.ia4.png +textures/segment2/font_graphics.05D00.ia4.png +textures/segment2/font_graphics.05D40.ia4.png +textures/segment2/font_graphics.05D80.ia4.png +textures/segment2/font_graphics.05DC0.ia4.png +textures/segment2/font_graphics.05E00.ia4.png +textures/segment2/font_graphics.05E40.ia4.png +textures/segment2/font_graphics.05E80.ia4.png +textures/segment2/font_graphics.05EC0.ia4.png +textures/segment2/font_graphics.05F00.ia1.png +textures/segment2/font_graphics.05F00.ia4.png +textures/segment2/font_graphics.05F10.ia1.png +textures/segment2/font_graphics.05F20.ia1.png +textures/segment2/font_graphics.05F30.ia1.png +textures/segment2/font_graphics.05F40.ia1.png +textures/segment2/font_graphics.05F40.ia4.png +textures/segment2/font_graphics.05F50.ia1.png +textures/segment2/font_graphics.05F60.ia1.png +textures/segment2/font_graphics.05F70.ia1.png +textures/segment2/font_graphics.05F80.ia1.png +textures/segment2/font_graphics.05F80.ia4.png +textures/segment2/font_graphics.05F90.ia1.png +textures/segment2/font_graphics.05FA0.ia1.png +textures/segment2/font_graphics.05FB0.ia1.png +textures/segment2/font_graphics.05FC0.ia1.png +textures/segment2/font_graphics.05FC0.ia4.png +textures/segment2/font_graphics.05FD0.ia1.png +textures/segment2/font_graphics.05FE0.ia1.png +textures/segment2/font_graphics.05FF0.ia1.png +textures/segment2/font_graphics.06000.ia1.png +textures/segment2/font_graphics.06000.ia4.png +textures/segment2/font_graphics.06010.ia1.png +textures/segment2/font_graphics.06020.ia1.png +textures/segment2/font_graphics.06030.ia1.png +textures/segment2/font_graphics.06040.ia1.png +textures/segment2/font_graphics.06040.ia4.png +textures/segment2/font_graphics.06050.ia1.png +textures/segment2/font_graphics.06060.ia1.png +textures/segment2/font_graphics.06070.ia1.png +textures/segment2/font_graphics.06080.ia1.png +textures/segment2/font_graphics.06080.ia4.png +textures/segment2/font_graphics.06090.ia1.png +textures/segment2/font_graphics.060A0.ia1.png +textures/segment2/font_graphics.060B0.ia1.png +textures/segment2/font_graphics.060C0.ia1.png +textures/segment2/font_graphics.060C0.ia4.png +textures/segment2/font_graphics.060D0.ia1.png +textures/segment2/font_graphics.060E0.ia1.png +textures/segment2/font_graphics.060F0.ia1.png +textures/segment2/font_graphics.06100.ia1.png +textures/segment2/font_graphics.06100.ia4.png +textures/segment2/font_graphics.06110.ia1.png +textures/segment2/font_graphics.06120.ia1.png +textures/segment2/font_graphics.06130.ia1.png +textures/segment2/font_graphics.06140.ia1.png +textures/segment2/font_graphics.06140.ia4.png +textures/segment2/font_graphics.06150.ia1.png +textures/segment2/font_graphics.06160.ia1.png +textures/segment2/font_graphics.06170.ia1.png +textures/segment2/font_graphics.06180.ia1.png +textures/segment2/font_graphics.06180.ia4.png +textures/segment2/font_graphics.06190.ia1.png +textures/segment2/font_graphics.061A0.ia1.png +textures/segment2/font_graphics.061B0.ia1.png +textures/segment2/font_graphics.061C0.ia1.png +textures/segment2/font_graphics.061C0.ia4.png +textures/segment2/font_graphics.061D0.ia1.png +textures/segment2/font_graphics.061E0.ia1.png +textures/segment2/font_graphics.061F0.ia1.png +textures/segment2/font_graphics.06200.ia1.png +textures/segment2/font_graphics.06200.ia4.png +textures/segment2/font_graphics.06210.ia1.png +textures/segment2/font_graphics.06220.ia1.png +textures/segment2/font_graphics.06230.ia1.png +textures/segment2/font_graphics.06240.ia1.png +textures/segment2/font_graphics.06240.ia4.png +textures/segment2/font_graphics.06250.ia1.png +textures/segment2/font_graphics.06260.ia1.png +textures/segment2/font_graphics.06270.ia1.png +textures/segment2/font_graphics.06280.ia1.png +textures/segment2/font_graphics.06280.ia4.png +textures/segment2/font_graphics.06290.ia1.png +textures/segment2/font_graphics.062A0.ia1.png +textures/segment2/font_graphics.062B0.ia1.png +textures/segment2/font_graphics.062C0.ia1.png +textures/segment2/font_graphics.062C0.ia4.png +textures/segment2/font_graphics.062D0.ia1.png +textures/segment2/font_graphics.062E0.ia1.png +textures/segment2/font_graphics.062F0.ia1.png +textures/segment2/font_graphics.06300.ia1.png +textures/segment2/font_graphics.06300.ia4.png +textures/segment2/font_graphics.06310.ia1.png +textures/segment2/font_graphics.06320.ia1.png +textures/segment2/font_graphics.06330.ia1.png +textures/segment2/font_graphics.06340.ia1.png +textures/segment2/font_graphics.06340.ia4.png +textures/segment2/font_graphics.06350.ia1.png +textures/segment2/font_graphics.06360.ia1.png +textures/segment2/font_graphics.06370.ia1.png +textures/segment2/font_graphics.06380.ia1.png +textures/segment2/font_graphics.06380.ia4.png +textures/segment2/font_graphics.06390.ia1.png +textures/segment2/font_graphics.063A0.ia1.png +textures/segment2/font_graphics.063B0.ia1.png +textures/segment2/font_graphics.063C0.ia1.png +textures/segment2/font_graphics.063C0.ia4.png +textures/segment2/font_graphics.063D0.ia1.png +textures/segment2/font_graphics.063E0.ia1.png +textures/segment2/font_graphics.063F0.ia1.png +textures/segment2/font_graphics.06400.ia1.png +textures/segment2/font_graphics.06400.ia4.png +textures/segment2/font_graphics.06410.ia1.png +textures/segment2/font_graphics.06420.ia1.png +textures/segment2/font_graphics.06430.ia1.png +textures/segment2/font_graphics.06440.ia1.png +textures/segment2/font_graphics.06440.ia4.png +textures/segment2/font_graphics.06450.ia1.png +textures/segment2/font_graphics.06460.ia1.png +textures/segment2/font_graphics.06470.ia1.png +textures/segment2/font_graphics.06480.ia1.png +textures/segment2/font_graphics.06480.ia4.png +textures/segment2/font_graphics.06490.ia1.png +textures/segment2/font_graphics.064A0.ia1.png +textures/segment2/font_graphics.064B0.ia1.png +textures/segment2/font_graphics.064C0.ia1.png +textures/segment2/font_graphics.064C0.ia4.png +textures/segment2/font_graphics.064D0.ia1.png +textures/segment2/font_graphics.064E0.ia1.png +textures/segment2/font_graphics.064F0.ia1.png +textures/segment2/font_graphics.06500.ia1.png +textures/segment2/font_graphics.06500.ia4.png +textures/segment2/font_graphics.06510.ia1.png +textures/segment2/font_graphics.06520.ia1.png +textures/segment2/font_graphics.06530.ia1.png +textures/segment2/font_graphics.06540.ia4.png +textures/segment2/font_graphics.06580.ia4.png +textures/segment2/font_graphics.065C0.ia4.png +textures/segment2/font_graphics.06600.ia4.png +textures/segment2/font_graphics.06640.ia4.png +textures/segment2/font_graphics.06680.ia4.png +textures/segment2/font_graphics.066C0.ia4.png +textures/segment2/font_graphics.06700.ia4.png +textures/segment2/font_graphics.06740.ia4.png +textures/segment2/font_graphics.06780.ia4.png +textures/segment2/font_graphics.067C0.ia4.png +textures/segment2/font_graphics.06800.ia4.png +textures/segment2/font_graphics.06840.ia4.png +textures/segment2/font_graphics.06880.ia4.png +textures/segment2/font_graphics.068C0.ia4.png +textures/segment2/font_graphics.06900.ia4.png +textures/segment2/font_graphics.06940.ia4.png +textures/segment2/font_graphics.06980.ia4.png +textures/segment2/font_graphics.069C0.ia4.png +textures/segment2/font_graphics.06A00.ia4.png +textures/segment2/font_graphics.06A40.ia4.png +textures/segment2/font_graphics.06A80.ia4.png +textures/segment2/font_graphics.06AC0.ia4.png +textures/segment2/font_graphics.06B00.ia4.png +textures/segment2/font_graphics.06B40.ia4.png +textures/segment2/font_graphics.06B80.ia4.png +textures/segment2/font_graphics.06BC0.ia4.png +textures/segment2/font_graphics.06C00.ia4.png +textures/segment2/font_graphics.06C40.ia4.png +textures/segment2/font_graphics.06C80.ia4.png +textures/segment2/font_graphics.06CC0.ia4.png +textures/segment2/font_graphics.06D00.ia4.png +textures/segment2/font_graphics.06D40.ia4.png +textures/segment2/font_graphics.06D80.ia4.png +textures/segment2/font_graphics.06DC0.ia4.png +textures/segment2/font_graphics.06E00.ia4.png +textures/segment2/font_graphics.06E40.ia4.png +textures/segment2/font_graphics.06E80.ia4.png +textures/segment2/font_graphics.06EC0.ia4.png +textures/segment2/font_graphics.06F00.ia4.png +textures/segment2/font_graphics.06F40.ia4.png +textures/segment2/font_graphics.06F80.ia4.png +textures/segment2/font_graphics.06FC0.ia4.png +textures/segment2/segment2.00000.rgba16.png +textures/segment2/segment2.00200.rgba16.png +textures/segment2/segment2.00400.rgba16.png +textures/segment2/segment2.00600.rgba16.png +textures/segment2/segment2.00800.rgba16.png +textures/segment2/segment2.00A00.rgba16.png +textures/segment2/segment2.00C00.rgba16.png +textures/segment2/segment2.00E00.rgba16.png +textures/segment2/segment2.01000.rgba16.png +textures/segment2/segment2.01200.rgba16.png +textures/segment2/segment2.01400.rgba16.png +textures/segment2/segment2.01600.rgba16.png +textures/segment2/segment2.01800.rgba16.png +textures/segment2/segment2.01A00.rgba16.png +textures/segment2/segment2.01C00.rgba16.png +textures/segment2/segment2.01E00.rgba16.png +textures/segment2/segment2.02000.rgba16.png +textures/segment2/segment2.02200.rgba16.png +textures/segment2/segment2.02400.rgba16.png +textures/segment2/segment2.02600.rgba16.png +textures/segment2/segment2.02800.rgba16.png +textures/segment2/segment2.02A00.rgba16.png +textures/segment2/segment2.02C00.rgba16.png +textures/segment2/segment2.02E00.rgba16.png +textures/segment2/segment2.03000.rgba16.png +textures/segment2/segment2.03200.rgba16.png +textures/segment2/segment2.03400.rgba16.png +textures/segment2/segment2.03600.rgba16.png +textures/segment2/segment2.03800.rgba16.png +textures/segment2/segment2.03A00.rgba16.png +textures/segment2/segment2.03C00.rgba16.png +textures/segment2/segment2.03E00.rgba16.png +textures/segment2/segment2.04000.rgba16.png +textures/segment2/segment2.04200.rgba16.png +textures/segment2/segment2.04400.rgba16.png +textures/segment2/segment2.04600.rgba16.png +textures/segment2/segment2.04800.rgba16.png +textures/segment2/segment2.04A00.rgba16.png +textures/segment2/segment2.04C00.rgba16.png +textures/segment2/segment2.04E00.rgba16.png +textures/segment2/segment2.05000.rgba16.png +textures/segment2/segment2.05200.rgba16.png +textures/segment2/segment2.05400.rgba16.png +textures/segment2/segment2.05600.rgba16.png +textures/segment2/segment2.05800.rgba16.png +textures/segment2/segment2.05A00.rgba16.png +textures/segment2/segment2.05C00.rgba16.png +textures/segment2/segment2.05E00.rgba16.png +textures/segment2/segment2.06000.rgba16.png +textures/segment2/segment2.06200.rgba16.png +textures/segment2/segment2.06280.rgba16.png +textures/segment2/segment2.06300.rgba16.png +textures/segment2/segment2.06380.rgba16.png +textures/segment2/segment2.06400.rgba16.png +textures/segment2/segment2.06480.rgba16.png +textures/segment2/segment2.06500.rgba16.png +textures/segment2/segment2.06580.rgba16.png +textures/segment2/segment2.06600.rgba16.png +textures/segment2/segment2.06680.rgba16.png +textures/segment2/segment2.06700.rgba16.png +textures/segment2/segment2.06780.rgba16.png +textures/segment2/segment2.06800.rgba16.png +textures/segment2/segment2.06880.rgba16.png +textures/segment2/segment2.06900.rgba16.png +textures/segment2/segment2.06980.rgba16.png +textures/segment2/segment2.06A00.rgba16.png +textures/segment2/segment2.06A80.rgba16.png +textures/segment2/segment2.06B00.rgba16.png +textures/segment2/segment2.06B80.rgba16.png +textures/segment2/segment2.06C00.rgba16.png +textures/segment2/segment2.06C80.rgba16.png +textures/segment2/segment2.06D00.rgba16.png +textures/segment2/segment2.06D80.rgba16.png +textures/segment2/segment2.06E00.rgba16.png +textures/segment2/segment2.06E80.rgba16.png +textures/segment2/segment2.06F00.rgba16.png +textures/segment2/segment2.06F80.rgba16.png +textures/segment2/segment2.07000.rgba16.png +textures/segment2/segment2.07080.rgba16.png +textures/segment2/segment2.07100.ia1.png +textures/segment2/segment2.07110.ia1.png +textures/segment2/segment2.07120.ia1.png +textures/segment2/segment2.07130.ia1.png +textures/segment2/segment2.07140.ia1.png +textures/segment2/segment2.07150.ia1.png +textures/segment2/segment2.07160.ia1.png +textures/segment2/segment2.07170.ia1.png +textures/segment2/segment2.07180.ia1.png +textures/segment2/segment2.07190.ia1.png +textures/segment2/segment2.071A0.ia1.png +textures/segment2/segment2.071B0.ia1.png +textures/segment2/segment2.071C0.ia1.png +textures/segment2/segment2.071D0.ia1.png +textures/segment2/segment2.071E0.ia1.png +textures/segment2/segment2.071F0.ia1.png +textures/segment2/segment2.07200.ia1.png +textures/segment2/segment2.07210.ia1.png +textures/segment2/segment2.07220.ia1.png +textures/segment2/segment2.07230.ia1.png +textures/segment2/segment2.07240.ia1.png +textures/segment2/segment2.07250.ia1.png +textures/segment2/segment2.07260.ia1.png +textures/segment2/segment2.07270.ia1.png +textures/segment2/segment2.07280.ia1.png +textures/segment2/segment2.07290.ia1.png +textures/segment2/segment2.072A0.ia1.png +textures/segment2/segment2.072B0.ia1.png +textures/segment2/segment2.072C0.ia1.png +textures/segment2/segment2.072D0.ia1.png +textures/segment2/segment2.072E0.ia1.png +textures/segment2/segment2.072F0.ia1.png +textures/segment2/segment2.07300.ia1.png +textures/segment2/segment2.07310.ia1.png +textures/segment2/segment2.07320.ia1.png +textures/segment2/segment2.07330.ia1.png +textures/segment2/segment2.07340.ia1.png +textures/segment2/segment2.07350.ia1.png +textures/segment2/segment2.07360.ia1.png +textures/segment2/segment2.07370.ia1.png +textures/segment2/segment2.07380.ia1.png +textures/segment2/segment2.07390.ia1.png +textures/segment2/segment2.073A0.ia1.png +textures/segment2/segment2.073B0.ia1.png +textures/segment2/segment2.073C0.ia1.png +textures/segment2/segment2.073D0.ia1.png +textures/segment2/segment2.073E0.ia1.png +textures/segment2/segment2.073F0.ia1.png +textures/segment2/segment2.07400.ia1.png +textures/segment2/segment2.07410.ia1.png +textures/segment2/segment2.07420.ia1.png +textures/segment2/segment2.07430.ia1.png +textures/segment2/segment2.07440.ia1.png +textures/segment2/segment2.07450.ia1.png +textures/segment2/segment2.07460.ia1.png +textures/segment2/segment2.07470.ia1.png +textures/segment2/segment2.07480.ia1.png +textures/segment2/segment2.07490.ia1.png +textures/segment2/segment2.074A0.ia1.png +textures/segment2/segment2.074B0.ia1.png +textures/segment2/segment2.074C0.ia1.png +textures/segment2/segment2.074D0.ia1.png +textures/segment2/segment2.074E0.ia1.png +textures/segment2/segment2.074F0.ia1.png +textures/segment2/segment2.07500.ia1.png +textures/segment2/segment2.07510.ia1.png +textures/segment2/segment2.07520.ia1.png +textures/segment2/segment2.07530.ia1.png +textures/segment2/segment2.07540.ia1.png +textures/segment2/segment2.07550.ia1.png +textures/segment2/segment2.07560.ia1.png +textures/segment2/segment2.07570.ia1.png +textures/segment2/segment2.07580.ia1.png +textures/segment2/segment2.07590.ia1.png +textures/segment2/segment2.075A0.ia1.png +textures/segment2/segment2.075B0.ia1.png +textures/segment2/segment2.075C0.ia1.png +textures/segment2/segment2.075D0.ia1.png +textures/segment2/segment2.075E0.ia1.png +textures/segment2/segment2.075F0.ia1.png +textures/segment2/segment2.07600.ia1.png +textures/segment2/segment2.07610.ia1.png +textures/segment2/segment2.07620.ia1.png +textures/segment2/segment2.07630.ia1.png +textures/segment2/segment2.07640.ia1.png +textures/segment2/segment2.07650.ia1.png +textures/segment2/segment2.07660.ia1.png +textures/segment2/segment2.07670.ia1.png +textures/segment2/segment2.07680.ia1.png +textures/segment2/segment2.07690.ia1.png +textures/segment2/segment2.076A0.ia1.png +textures/segment2/segment2.076B0.ia1.png +textures/segment2/segment2.076C0.ia1.png +textures/segment2/segment2.076D0.ia1.png +textures/segment2/segment2.076E0.ia1.png +textures/segment2/segment2.076F0.ia1.png +textures/segment2/segment2.07700.ia1.png +textures/segment2/segment2.07710.ia1.png +textures/segment2/segment2.07720.ia1.png +textures/segment2/segment2.07730.ia1.png +textures/segment2/segment2.07740.ia1.png +textures/segment2/segment2.07750.ia1.png +textures/segment2/segment2.07760.ia1.png +textures/segment2/segment2.07770.ia1.png +textures/segment2/segment2.07780.ia1.png +textures/segment2/segment2.07790.ia1.png +textures/segment2/segment2.077A0.ia1.png +textures/segment2/segment2.077B0.ia1.png +textures/segment2/segment2.077C0.ia1.png +textures/segment2/segment2.077D0.ia1.png +textures/segment2/segment2.077E0.ia1.png +textures/segment2/segment2.077F0.ia1.png +textures/segment2/segment2.07800.ia1.png +textures/segment2/segment2.07810.ia1.png +textures/segment2/segment2.07820.ia1.png +textures/segment2/segment2.07830.ia1.png +textures/segment2/segment2.07840.ia1.png +textures/segment2/segment2.07850.ia1.png +textures/segment2/segment2.07860.ia1.png +textures/segment2/segment2.07870.ia1.png +textures/segment2/segment2.07880.ia1.png +textures/segment2/segment2.07890.ia1.png +textures/segment2/segment2.078A0.ia1.png +textures/segment2/segment2.078B0.ia1.png +textures/segment2/segment2.078C0.ia1.png +textures/segment2/segment2.078D0.ia1.png +textures/segment2/segment2.078E0.ia1.png +textures/segment2/segment2.078F0.ia1.png +textures/segment2/segment2.07900.ia1.png +textures/segment2/segment2.07910.ia1.png +textures/segment2/segment2.07920.ia1.png +textures/segment2/segment2.07930.ia1.png +textures/segment2/segment2.07940.ia1.png +textures/segment2/segment2.07950.ia1.png +textures/segment2/segment2.07960.ia1.png +textures/segment2/segment2.07970.ia1.png +textures/segment2/segment2.07980.ia1.png +textures/segment2/segment2.07990.ia1.png +textures/segment2/segment2.079A0.ia1.png +textures/segment2/segment2.079B0.ia1.png +textures/segment2/segment2.079C0.ia1.png +textures/segment2/segment2.079D0.ia1.png +textures/segment2/segment2.079E0.ia1.png +textures/segment2/segment2.079F0.ia1.png +textures/segment2/segment2.07A00.ia1.png +textures/segment2/segment2.07A10.ia1.png +textures/segment2/segment2.07A20.ia1.png +textures/segment2/segment2.07A30.ia1.png +textures/segment2/segment2.07A40.ia1.png +textures/segment2/segment2.07A50.ia1.png +textures/segment2/segment2.07A60.ia1.png +textures/segment2/segment2.07A70.ia1.png +textures/segment2/segment2.07A80.ia1.png +textures/segment2/segment2.07A90.ia1.png +textures/segment2/segment2.07AA0.ia1.png +textures/segment2/segment2.07AB0.ia1.png +textures/segment2/segment2.07AC0.ia1.png +textures/segment2/segment2.07AD0.ia1.png +textures/segment2/segment2.07AE0.ia1.png +textures/segment2/segment2.07AF0.ia1.png +textures/segment2/segment2.07B00.ia1.png +textures/segment2/segment2.07B10.ia1.png +textures/segment2/segment2.07B20.ia1.png +textures/segment2/segment2.07B30.ia1.png +textures/segment2/segment2.07B40.ia1.png +textures/segment2/segment2.07B50.rgba16.png +textures/segment2/segment2.07D50.rgba16.png +textures/segment2/segment2.07F50.rgba16.png +textures/segment2/segment2.08150.rgba16.png +textures/segment2/segment2.081D0.rgba16.png +textures/segment2/segment2.0F458.ia8.png +textures/segment2/segment2.0FC58.ia8.png +textures/segment2/segment2.10458.ia8.png +textures/segment2/segment2.11458.ia8.png +textures/segment2/segment2.11C58.rgba16.png +textures/segment2/segment2.12458.rgba16.png +textures/segment2/segment2.12C58.rgba16.png +textures/segment2/segment2.13458.ia16.png +textures/segment2/segment2.13C58.rgba16.png +textures/segment2/segment2.14838.ia8.png +textures/segment2/segment2.umlaut.rgba16.png +textures/segment2/shadow_quarter_circle.ia8.png +textures/segment2/shadow_quarter_square.ia8.png +textures/sky/metal_hole.rgba16.png +textures/sky/rr_textures.00000.rgba16.png +textures/sky/rr_textures.00800.rgba16.png +textures/sky/rr_textures.01000.rgba16.png +textures/sky/rr_textures.01800.rgba16.png +textures/sky/rr_textures.02000.rgba16.png +textures/sky/rr_textures.03000.rgba16.png +textures/sky/rr_textures.03800.rgba16.png +textures/sky/rr_textures.04800.rgba16.png +textures/sky/rr_textures.05000.rgba16.png +textures/sky/rr_textures.05800.rgba16.png +textures/sky/rr_textures.06000.rgba16.png +textures/sky/rr_textures.07000.rgba16.png +textures/sky/rr_textures.07800.rgba16.png +textures/sky/rr_textures.08000.rgba16.png +textures/skyboxes/bbh.png +textures/skyboxes/bidw.png +textures/skyboxes/bitfs.png +textures/skyboxes/bits.png +textures/skyboxes/ccm.png +textures/skyboxes/cloud_floor.png +textures/skyboxes/clouds.png +textures/skyboxes/ssl.png +textures/skyboxes/water.png +textures/skyboxes/wdw.png +textures/snow/ccm_textures.00000.rgba16.png +textures/snow/ccm_textures.00800.rgba16.png +textures/snow/ccm_textures.01000.rgba16.png +textures/snow/ccm_textures.02000.rgba16.png +textures/snow/ccm_textures.02800.rgba16.png +textures/snow/ccm_textures.03000.rgba16.png +textures/snow/ccm_textures.03800.rgba16.png +textures/snow/ccm_textures.04000.rgba16.png +textures/snow/ccm_textures.04800.rgba16.png +textures/snow/ccm_textures.05000.rgba16.png +textures/snow/ccm_textures.05800.rgba16.png +textures/snow/ccm_textures.06000.rgba16.png +textures/snow/ccm_textures.06800.rgba16.png +textures/snow/ccm_textures.07000.rgba16.png +textures/snow/ccm_textures.08000.rgba16.png +textures/snow/ccm_textures.08800.rgba16.png +textures/snow/ccm_textures.09000.ia16.png +textures/snow/ccm_textures.09800.ia16.png +textures/spooky/bbh_textures.00000.rgba16.png +textures/spooky/bbh_textures.00800.rgba16.png +textures/spooky/bbh_textures.01800.rgba16.png +textures/spooky/bbh_textures.02800.rgba16.png +textures/spooky/bbh_textures.03800.rgba16.png +textures/spooky/bbh_textures.04800.rgba16.png +textures/spooky/bbh_textures.05000.rgba16.png +textures/spooky/bbh_textures.06000.rgba16.png +textures/spooky/bbh_textures.06800.rgba16.png +textures/spooky/bbh_textures.07000.rgba16.png +textures/spooky/bbh_textures.08000.rgba16.png +textures/spooky/bbh_textures.08800.rgba16.png +textures/spooky/bbh_textures.09000.rgba16.png +textures/spooky/bbh_textures.0A000.rgba16.png +textures/spooky/bbh_textures.0A800.ia16.png +textures/spooky/bbh_textures.0B000.ia16.png +textures/spooky/bbh_textures.0B800.ia16.png +textures/title_screen_bg/title_screen_bg.001C0.rgba16.png +textures/title_screen_bg/title_screen_bg.00E40.rgba16.png +textures/title_screen_bg/title_screen_bg.01AC0.rgba16.png +textures/title_screen_bg/title_screen_bg.02740.rgba16.png +textures/title_screen_bg/title_screen_bg.033C0.rgba16.png +textures/title_screen_bg/title_screen_bg.04040.rgba16.png +textures/title_screen_bg/title_screen_bg.04CC0.rgba16.png +textures/title_screen_bg/title_screen_bg.05940.rgba16.png +textures/title_screen_bg/title_screen_bg.06648.rgba16.png +textures/water/jrb_textures.00000.rgba16.png +textures/water/jrb_textures.00800.rgba16.png +textures/water/jrb_textures.01800.rgba16.png +textures/water/jrb_textures.02800.rgba16.png +textures/water/jrb_textures.03800.rgba16.png +textures/water/jrb_textures.04800.rgba16.png +textures/water/jrb_textures.05800.rgba16.png +textures/water/jrb_textures.06000.rgba16.png +textures/water/jrb_textures.06800.rgba16.png +textures/water/jrb_textures.07800.rgba16.png +textures/water/jrb_textures.08800.rgba16.png +textures/water/jrb_textures.09000.rgba16.png +textures/water/jrb_textures.0A000.rgba16.png +textures/water/jrb_textures.0A800.rgba16.png +textures/water/jrb_textures.0B800.rgba16.png # libultra From 031cc24fa67dc14b709914eb99e11275497c2c70 Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com> Date: Sun, 1 May 2022 00:42:58 -0400 Subject: [PATCH 31/42] New profiler (#390) * Implemented new lightweight CPU/RDP profiler * Integrated new profiler into puppyprint debug and improved profiler visuals, removed existing puppyprint profiling code --- include/config/config_debug.h | 4 + include/config/config_safeguards.h | 45 ++--- src/audio/load.c | 30 ---- src/boot/main.c | 33 ++-- src/boot/memory.c | 6 - src/engine/math_util.c | 6 - src/engine/surface_collision.c | 48 ----- src/engine/surface_load.c | 12 -- src/game/area.c | 12 +- src/game/camera.c | 8 - src/game/crash_screen.c | 6 - src/game/fasttext.c | 87 +++++++++ src/game/fasttext.h | 14 ++ src/game/game_init.c | 29 +-- src/game/hud.c | 9 +- src/game/newfont2_swapped.bin | Bin 0 -> 4032 bytes src/game/object_list_processor.c | 32 ++-- src/game/profiling.c | 279 +++++++++++++++++++++++++++++ src/game/profiling.h | 61 +++++++ src/game/puppyprint.c | 249 ++++++------------------- src/game/puppyprint.h | 37 +--- src/game/sound_init.c | 39 +--- 22 files changed, 578 insertions(+), 468 deletions(-) create mode 100644 src/game/fasttext.c create mode 100644 src/game/fasttext.h create mode 100644 src/game/newfont2_swapped.bin create mode 100644 src/game/profiling.c create mode 100644 src/game/profiling.h diff --git a/include/config/config_debug.h b/include/config/config_debug.h index 1d5b3b88..fc5ac8e9 100644 --- a/include/config/config_debug.h +++ b/include/config/config_debug.h @@ -10,6 +10,10 @@ // 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. +// #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. diff --git a/include/config/config_safeguards.h b/include/config/config_safeguards.h index d7729686..299226ce 100644 --- a/include/config/config_safeguards.h +++ b/include/config/config_safeguards.h @@ -33,15 +33,21 @@ * config_debug.h */ -#ifdef PUPPYPRINT_DEBUG - #undef PUPPYPRINT - #define PUPPYPRINT -#endif // PUPPYPRINT_DEBUG - -#ifdef COMPLETE_SAVE_FILE +#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 - #define UNLOCK_ALL -#endif // COMPLETE_SAVE_FILE + #undef COMPLETE_SAVE_FILE + #undef DEBUG_FORCE_CRASH_ON_BOOT + #undef USE_PROFILER +#endif // DISABLE_ALL #ifdef DEBUG_ALL #undef DEBUG_LEVEL_SELECT @@ -66,20 +72,17 @@ #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 +#ifdef PUPPYPRINT_DEBUG + #undef PUPPYPRINT + #define PUPPYPRINT + #undef USE_PROFILER + #define USE_PROFILER +#endif // PUPPYPRINT_DEBUG + +#ifdef COMPLETE_SAVE_FILE #undef UNLOCK_ALL - #undef COMPLETE_SAVE_FILE - #undef DEBUG_FORCE_CRASH_ON_BOOT -#endif // DISABLE_ALL + #define UNLOCK_ALL +#endif // COMPLETE_SAVE_FILE /***************** diff --git a/src/audio/load.c b/src/audio/load.c index 268fbf2a..f484871a 100644 --- a/src/audio/load.c +++ b/src/audio/load.c @@ -137,14 +137,8 @@ u8 audioString49[] = "BANK LOAD MISS! FOR %d\n"; * Performs an asynchronus (normal priority) DMA copy */ void audio_dma_copy_async(uintptr_t devAddr, void *vAddr, size_t nbytes, OSMesgQueue *queue, OSIoMesg *mesg) { -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif osInvalDCache(vAddr, nbytes); osPiStartDma(mesg, OS_MESG_PRI_NORMAL, OS_READ, devAddr, vAddr, nbytes, queue); -#if PUPPYPRINT_DEBUG - dmaAudioTime[perfIteration] += (osGetTime() - first); -#endif } /** @@ -152,18 +146,12 @@ void audio_dma_copy_async(uintptr_t devAddr, void *vAddr, size_t nbytes, OSMesgQ * to 0x1000 bytes transfer at once. */ void audio_dma_partial_copy_async(uintptr_t *devAddr, u8 **vAddr, ssize_t *remaining, OSMesgQueue *queue, OSIoMesg *mesg) { -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif ssize_t transfer = MIN(*remaining, 0x1000); *remaining -= transfer; osInvalDCache(*vAddr, transfer); osPiStartDma(mesg, OS_MESG_PRI_NORMAL, OS_READ, *devAddr, *vAddr, transfer, queue); *devAddr += transfer; *vAddr += transfer; -#if PUPPYPRINT_DEBUG - dmaAudioTime[perfIteration] += (osGetTime() - first); -#endif } void decrease_sample_dma_ttls() { @@ -208,9 +196,6 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) { u32 i; u32 dmaIndex; ssize_t bufferPos; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif if (arg2 != 0 || *dmaIndexRef >= sSampleDmaListSize1) { for (i = sSampleDmaListSize1; i < gSampleDmaNumListItems; i++) { @@ -235,9 +220,6 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) { } dma->ttl = 60; *dmaIndexRef = (u8) i; -#if PUPPYPRINT_DEBUG - dmaAudioTime[perfIteration] += (osGetTime() - first); -#endif #if defined(VERSION_EU) return &dma->buffer[(devAddr - dma->source)]; #else @@ -277,14 +259,8 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) { } dma->ttl = 2; #if defined(VERSION_EU) - #if PUPPYPRINT_DEBUG - dmaAudioTime[perfIteration] += (osGetTime() - first); - #endif return dma->buffer + (devAddr - dma->source); #else - #if PUPPYPRINT_DEBUG - dmaAudioTime[perfIteration] += (osGetTime() - first); - #endif return (devAddr - dma->source) + dma->buffer; #endif } @@ -310,18 +286,12 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) { osPiStartDma(&gCurrAudioFrameDmaIoMesgBufs[gCurrAudioFrameDmaCount++], OS_MESG_PRI_NORMAL, OS_READ, dmaDevAddr, dma->buffer, transfer, &gCurrAudioFrameDmaQueue); *dmaIndexRef = dmaIndex; -#if PUPPYPRINT_DEBUG - dmaAudioTime[perfIteration] += (osGetTime() - first); -#endif return (devAddr - dmaDevAddr) + dma->buffer; #else gCurrAudioFrameDmaCount++; osPiStartDma(&gCurrAudioFrameDmaIoMesgBufs[gCurrAudioFrameDmaCount - 1], OS_MESG_PRI_NORMAL, OS_READ, dmaDevAddr, dma->buffer, transfer, &gCurrAudioFrameDmaQueue); *dmaIndexRef = dmaIndex; -#if PUPPYPRINT_DEBUG - dmaAudioTime[perfIteration] += (osGetTime() - first); -#endif return dma->buffer + (devAddr - dmaDevAddr); #endif } diff --git a/src/boot/main.c b/src/boot/main.c index d673fa05..c3f82d02 100644 --- a/src/boot/main.c +++ b/src/boot/main.c @@ -19,6 +19,7 @@ #endif #include "game/puppyprint.h" #include "game/puppylights.h" +#include "game/profiling.h" // Message IDs enum MessageIDs { @@ -185,10 +186,8 @@ void start_gfx_sptask(void) { if (gActiveSPTask == NULL && sCurrentDisplaySPTask != NULL && sCurrentDisplaySPTask->state == SPTASK_STATE_NOT_STARTED) { -#if PUPPYPRINT_DEBUG - rspDelta = osGetTime(); -#endif start_sptask(M_GFXTASK); + profiler_rsp_started(PROFILER_RSP_GFX); } } @@ -220,15 +219,14 @@ void handle_vblank(void) { } else { pretend_audio_sptask_done(); } + profiler_rsp_started(PROFILER_RSP_AUDIO); } } else { if (gActiveSPTask == NULL && sCurrentDisplaySPTask != NULL && sCurrentDisplaySPTask->state != SPTASK_STATE_FINISHED) { -#if PUPPYPRINT_DEBUG - rspDelta = osGetTime(); -#endif start_sptask(M_GFXTASK); + profiler_rsp_started(PROFILER_RSP_GFX); } } #if ENABLE_RUMBLE @@ -253,9 +251,9 @@ void handle_sp_complete(void) { // The gfx task completed before we had time to interrupt it. // Mark it finished, just like below. curSPTask->state = SPTASK_STATE_FINISHED; -#if PUPPYPRINT_DEBUG - profiler_update(rspGenTime, rspDelta); -#endif + profiler_rsp_completed(PROFILER_RSP_GFX); + } else { + profiler_rsp_yielded(); } // Start the audio task, as expected by handle_vblank. @@ -264,12 +262,19 @@ void handle_sp_complete(void) { } else { pretend_audio_sptask_done(); } + profiler_rsp_started(PROFILER_RSP_AUDIO); } else { curSPTask->state = SPTASK_STATE_FINISHED; if (curSPTask->task.t.type == M_AUDTASK) { + profiler_rsp_completed(PROFILER_RSP_AUDIO); // After audio tasks come gfx tasks. if ((sCurrentDisplaySPTask != NULL) && (sCurrentDisplaySPTask->state != SPTASK_STATE_FINISHED)) { + if (sCurrentDisplaySPTask->state == SPTASK_STATE_INTERRUPTED) { + profiler_rsp_resumed(); + } else { + profiler_rsp_started(PROFILER_RSP_GFX); + } start_sptask(M_GFXTASK); } sCurrentAudioSPTask = NULL; @@ -280,9 +285,7 @@ void handle_sp_complete(void) { // The SP process is done, but there is still a Display Processor notification // that needs to arrive before we can consider the task completely finished and // null out sCurrentDisplaySPTask. That happens in handle_dp_complete. -#if PUPPYPRINT_DEBUG - profiler_update(rspGenTime, rspDelta); -#endif + profiler_rsp_completed(PROFILER_RSP_GFX); } } } @@ -326,9 +329,6 @@ void thread3_main(UNUSED void *arg) { while (TRUE) { OSMesg msg; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif osRecvMesg(&gIntrMesgQueue, &msg, OS_MESG_BLOCK); switch ((uintptr_t) msg) { case MESG_VI_VBLANK: @@ -347,9 +347,6 @@ void thread3_main(UNUSED void *arg) { handle_nmi_request(); break; } -#if PUPPYPRINT_DEBUG - profiler_update(taskTime, first); -#endif } } diff --git a/src/boot/memory.c b/src/boot/memory.c index 4c3bd940..5abf5c72 100644 --- a/src/boot/memory.c +++ b/src/boot/memory.c @@ -259,9 +259,6 @@ u32 main_pool_pop_state(void) { */ void dma_read(u8 *dest, u8 *srcStart, u8 *srcEnd) { u32 size = ALIGN16(srcEnd - srcStart); -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif osInvalDCache(dest, size); while (size != 0) { @@ -275,9 +272,6 @@ void dma_read(u8 *dest, u8 *srcStart, u8 *srcEnd) { srcStart += copySize; size -= copySize; } -#if PUPPYPRINT_DEBUG - dmaTime[perfIteration] += (osGetTime() - first); -#endif } /** diff --git a/src/engine/math_util.c b/src/engine/math_util.c index e7fd2f31..7732eec7 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -1377,9 +1377,6 @@ void find_surface_on_ray_list(struct SurfaceNode *list, Vec3f orig, Vec3f dir, f f32 length; Vec3f chk_hit_pos; f32 top, bottom; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif // Get upper and lower bounds of ray if (dir[1] >= 0.0f) { // Ray is upwards. @@ -1403,9 +1400,6 @@ void find_surface_on_ray_list(struct SurfaceNode *list, Vec3f orig, Vec3f dir, f *max_length = length; } } -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += osGetTime() - first; -#endif } void find_surface_on_ray_cell(s32 cellX, s32 cellZ, Vec3f orig, Vec3f normalized_dir, f32 dir_length, struct Surface **hit_surface, Vec3f hit_pos, f32 *max_length, s32 flags) { diff --git a/src/engine/surface_collision.c b/src/engine/surface_collision.c index 01f0a3c1..73bb7034 100644 --- a/src/engine/surface_collision.c +++ b/src/engine/surface_collision.c @@ -175,16 +175,10 @@ s32 find_wall_collisions(struct WallCollisionData *colData) { s32 numCollisions = 0; s32 x = colData->x; s32 z = colData->z; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif colData->numWalls = 0; if (is_outside_level_bounds(x, z)) { -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += osGetTime() - first; -#endif return numCollisions; } @@ -207,9 +201,6 @@ s32 find_wall_collisions(struct WallCollisionData *colData) { // Increment the debug tracker. gNumCalls.wall++; #endif -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += osGetTime() - first; -#endif return numCollisions; } @@ -326,18 +317,12 @@ static struct Surface *find_ceil_from_list(struct SurfaceNode *surfaceNode, s32 f32 find_ceil(f32 posX, f32 posY, f32 posZ, struct Surface **pceil) { f32 height = CELL_HEIGHT_LIMIT; f32 dynamicHeight = CELL_HEIGHT_LIMIT; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif s32 x = posX; s32 y = posY; s32 z = posZ; *pceil = NULL; if (is_outside_level_bounds(x, z)) { -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += (osGetTime() - first); -#endif return height; } @@ -379,9 +364,6 @@ f32 find_ceil(f32 posX, f32 posY, f32 posZ, struct Surface **pceil) { // Increment the debug tracker. gNumCalls.ceil++; #endif -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += osGetTime() - first; -#endif return height; } @@ -563,10 +545,6 @@ f32 unused_find_dynamic_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfl * Find the highest floor under a given position and return the height. */ f32 find_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor) { -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif - f32 height = FLOOR_LOWER_LIMIT; f32 dynamicHeight = FLOOR_LOWER_LIMIT; @@ -580,9 +558,6 @@ f32 find_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor) { *pfloor = NULL; if (is_outside_level_bounds(x, z)) { -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += (osGetTime() - first); -#endif return height; } // Each level is split into cells to limit load, find the appropriate cell. @@ -626,9 +601,6 @@ f32 find_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor) { #ifdef VANILLA_DEBUG // Increment the debug tracker. gNumCalls.floor++; -#endif -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += (osGetTime() - first); #endif return height; } @@ -682,9 +654,6 @@ s32 find_water_level_and_floor(s32 x, s32 y, s32 z, struct Surface **pfloor) { s32 loX, hiX, loZ, hiZ; TerrainData *p = gEnvironmentRegions; struct Surface *floor = NULL; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif s32 waterLevel = find_water_floor(x, y, z, &floor); if (p != NULL && waterLevel == FLOOR_LOWER_LIMIT) { @@ -710,9 +679,6 @@ s32 find_water_level_and_floor(s32 x, s32 y, s32 z, struct Surface **pfloor) { *pfloor = floor; } -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += (osGetTime() - first); -#endif return waterLevel; } @@ -724,9 +690,6 @@ s32 find_water_level(s32 x, s32 z) { // TODO: Allow y pos s32 loX, hiX, loZ, hiZ; TerrainData *p = gEnvironmentRegions; struct Surface *floor = NULL; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif s32 waterLevel = find_water_floor(x, ((gCollisionFlags & COLLISION_FLAG_CAMERA) ? gLakituState.pos[1] : gMarioState->pos[1]), z, &floor); if ((p != NULL) && (waterLevel == FLOOR_LOWER_LIMIT)) { @@ -750,10 +713,6 @@ s32 find_water_level(s32 x, s32 z) { // TODO: Allow y pos } } -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += osGetTime() - first; -#endif - return waterLevel; } @@ -765,9 +724,6 @@ s32 find_poison_gas_level(s32 x, s32 z) { s32 loX, hiX, loZ, hiZ; s32 gasLevel = FLOOR_LOWER_LIMIT; TerrainData *p = gEnvironmentRegions; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif if (p != NULL) { s32 numRegions = *p++; @@ -794,10 +750,6 @@ s32 find_poison_gas_level(s32 x, s32 z) { } } -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += osGetTime() - first; -#endif - return gasLevel; } diff --git a/src/engine/surface_load.c b/src/engine/surface_load.c index 1553bab4..786c97f0 100644 --- a/src/engine/surface_load.c +++ b/src/engine/surface_load.c @@ -470,9 +470,6 @@ u32 get_area_terrain_size(TerrainData *data) { void load_area_terrain(s32 index, TerrainData *data, RoomData *surfaceRooms, s16 *macroObjects) { s32 terrainLoadType; TerrainData *vertexData = NULL; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif // Initialize the data for this. gEnvironmentRegions = NULL; @@ -519,9 +516,6 @@ void load_area_terrain(s32 index, TerrainData *data, RoomData *surfaceRooms, s16 gNumStaticSurfaceNodes = gSurfaceNodesAllocated; gNumStaticSurfaces = gSurfacesAllocated; -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += osGetTime() - first; -#endif } /** @@ -646,9 +640,6 @@ static void get_optimal_coll_dist(struct Object *obj) { */ void load_object_collision_model(void) { TerrainData vertexData[600]; -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif TerrainData *collisionData = o->collisionData; f32 marioDist = o->oDistanceToMario; @@ -686,7 +677,4 @@ void load_object_collision_model(void) { } } COND_BIT((marioDist < o->oDrawingDistance), o->header.gfx.node.flags, GRAPH_RENDER_ACTIVE); -#if PUPPYPRINT_DEBUG - collisionTime[perfIteration] += osGetTime() - first; -#endif } diff --git a/src/game/area.c b/src/game/area.c index f52c3135..70e90707 100644 --- a/src/game/area.c +++ b/src/game/area.c @@ -25,6 +25,7 @@ #include "puppyprint.h" #include "debug_box.h" #include "engine/colors.h" +#include "profiling.h" struct SpawnInfo gPlayerSpawnInfos[1]; struct GraphNode *gGraphNodePointers[MODEL_ID_COUNT]; @@ -375,10 +376,6 @@ void play_transition_after_delay(s16 transType, s16 time, u8 red, u8 green, u8 b } void render_game(void) { -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); - OSTime colTime = collisionTime[perfIteration]; -#endif if (gCurrentArea != NULL && !gWarpTransition.pauseRendering) { if (gCurrentArea->graphNode) { geo_process_root(gCurrentArea->graphNode, gViewportOverride, gViewportClip, gFBSetColor); @@ -434,11 +431,10 @@ void render_game(void) { gViewportOverride = NULL; gViewportClip = NULL; - + + profiler_update(PROFILER_TIME_GFX); + profiler_print_times(); #if PUPPYPRINT_DEBUG - profiler_update(graphTime, first); - graphTime[perfIteration] -= (collisionTime[perfIteration] - colTime); - // graphTime[perfIteration] -= profilerTime[perfIteration]; //! Graph time is inaccurate and wrongly reaches 0 sometimes puppyprint_render_profiler(); #endif } diff --git a/src/game/camera.c b/src/game/camera.c index 819f235c..21d40773 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -2871,10 +2871,6 @@ void update_lakitu(struct Camera *c) { * Gets controller input, checks for cutscenes, handles mode changes, and moves the camera */ void update_camera(struct Camera *c) { -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); - OSTime colTime = collisionTime[perfIteration]; -#endif gCamera = c; update_camera_hud_status(c); if (c->cutscene == CUTSCENE_NONE @@ -3117,10 +3113,6 @@ void update_camera(struct Camera *c) { } #endif gLakituState.lastFrameAction = sMarioCamState->action; -#if PUPPYPRINT_DEBUG - profiler_update(cameraTime, first); - cameraTime[perfIteration] -= collisionTime[perfIteration]-colTime; -#endif } /** diff --git a/src/game/crash_screen.c b/src/game/crash_screen.c index 6214e8fb..f95b0286 100644 --- a/src/game/crash_screen.c +++ b/src/game/crash_screen.c @@ -402,9 +402,6 @@ void thread2_crash_screen(UNUSED void *arg) { osSetEventMesg(OS_EVENT_CPU_BREAK, &gCrashScreen.mesgQueue, (OSMesg) 1); osSetEventMesg(OS_EVENT_FAULT, &gCrashScreen.mesgQueue, (OSMesg) 2); while (TRUE) { -#if PUPPYPRINT_DEBUG - OSTime first = osGetTime(); -#endif if (thread == NULL) { osRecvMesg(&gCrashScreen.mesgQueue, &mesg, 1); thread = get_crashed_thread(); @@ -433,9 +430,6 @@ void thread2_crash_screen(UNUSED void *arg) { read_controller_inputs(THREAD_2_CRASH_SCREEN); draw_crash_screen(thread); } -#if PUPPYPRINT_DEBUG - profiler_update(faultTime, first); -#endif } } diff --git a/src/game/fasttext.c b/src/game/fasttext.c new file mode 100644 index 00000000..3cb5bf9c --- /dev/null +++ b/src/game/fasttext.c @@ -0,0 +1,87 @@ +// This file is a modification of a file from https://github.com/danbolt/n64-jam-1, which was licensed under the MPL-2.0 License +// See the original repo for more details. + +#include + +#define TEX_ASCII_START '!' +#define TAB_WIDTH 16 + +#define G_CC_TEXT PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0 + +__asm__( + ".section \".rodata\", \"a\", @progbits\n" + ".global fast_font\n" + "fast_font:\n" + ".incbin \"src/game/newfont2_swapped.bin\"\n" + ".previous\n" +); + +extern u8 fast_font[]; + +int computeS(unsigned char letter) { + int idx = letter; + if (letter > 'z') { + idx -= (3 + 2 + 3 + 1 + 3); + } else if (letter > '^') { + idx -= (2 + 3 + 1 + 3); + } else if (letter > 'Z') { + idx -= (3 + 1 + 3); + } else if (letter > '?') { + idx -= (1 + 3); + } else if (letter > ';') { + idx -= (3); + } + + return (idx - TEX_ASCII_START) * 8; +} + +static const u8 fast_text_font_kerning[] = { + /* */ 2, /*!*/ 4, /*"*/ 5, /*#*/ 0, /*$*/ 0, /*%*/ 7, /*&*/ 7, /*'*/ 2, /*(*/ 5, /*)*/ 5, /***/ 0, /*+*/ 7, /*,*/ 3, /*-*/ 7, /*.*/ 3, /*/*/ 7, + /*0*/ 7, /*1*/ 7, /*2*/ 7, /*3*/ 7, /*4*/ 7, /*5*/ 7, /*6*/ 7, /*7*/ 7, /*8*/ 7, /*9*/ 7, /*:*/ 3, /*;*/ 3, /*<*/ 0, /*=*/ 0, /*>*/ 0, /*?*/ 7, + /*@*/ 0, /*A*/ 7, /*B*/ 7, /*C*/ 7, /*D*/ 7, /*E*/ 7, /*F*/ 7, /*G*/ 7, /*H*/ 7, /*I*/ 6, /*J*/ 5, /*K*/ 7, /*L*/ 7, /*M*/ 7, /*N*/ 7, /*O*/ 7, + /*P*/ 7, /*Q*/ 7, /*R*/ 7, /*S*/ 7, /*T*/ 7, /*U*/ 7, /*V*/ 7, /*W*/ 7, /*X*/ 7, /*Y*/ 7, /*Z*/ 7, /*[*/ 0, /*\*/ 0, /*]*/ 0, /*^*/ 6, /*_*/ 0, + /*`*/ 0, /*a*/ 6, /*b*/ 6, /*c*/ 6, /*d*/ 6, /*e*/ 6, /*f*/ 6, /*g*/ 6, /*h*/ 6, /*i*/ 2, /*j*/ 6, /*k*/ 5, /*l*/ 3, /*m*/ 6, /*n*/ 6, /*o*/ 6, + /*p*/ 6, /*q*/ 6, /*r*/ 6, /*s*/ 6, /*t*/ 6, /*u*/ 6, /*v*/ 6, /*w*/ 6, /*x*/ 6, /*y*/ 6, /*z*/ 6, /*{*/ 0, /*|*/ 0, /*}*/ 0, /*~*/ 7, +}; + +void drawSmallString_impl(Gfx **dl, int x, int y, const char* string, int r, int g, int b) { + int i = 0; + int xPos = x; + int yPos = y; + int s = 0; + Gfx *dlHead = *dl; + + gDPLoadTextureBlock_4bS(dlHead++, fast_font, G_IM_FMT_IA, 672, 12, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gDPSetPrimColor(dlHead++, 0, 0, r, g, b, 255); + gDPSetCombineMode(dlHead++, G_CC_TEXT, G_CC_TEXT); + gDPPipeSync(dlHead++); + + while (string[i] != '\0') { + unsigned int cur_char = string[i]; + + if (cur_char == '\n') { + xPos = x; + yPos += 12; + i++; + continue; + } + + if (cur_char == '\t') { + int xDist = xPos - x + 1; + int tabCount = (xDist + TAB_WIDTH - 1) / TAB_WIDTH; + xPos = tabCount * TAB_WIDTH + x; + } else { + if (cur_char != ' ') { + s = computeS(cur_char); + gSPTextureRectangle(dlHead++, (xPos + 0) << 2, (yPos + 0) << 2, (xPos + 8) << 2, (yPos + 12) << 2, 0, s << 5, 0, 1 << 10, 1 << 10); + } + xPos += fast_text_font_kerning[cur_char - ' ']; + } + + i++; + } + gDPSetPrimColor(dlHead++, 0, 0, 255, 255, 255, 255); + gDPPipeSync(dlHead++); + + *dl = dlHead; +} diff --git a/src/game/fasttext.h b/src/game/fasttext.h new file mode 100644 index 00000000..9842d164 --- /dev/null +++ b/src/game/fasttext.h @@ -0,0 +1,14 @@ +#ifndef __FASTTEXT_H__ +#define __FASTTEXT_H__ + +void drawSmallString_impl(Gfx**, int, int, const char*, int, int , int); + +static inline void drawSmallString(Gfx **dl, int x, int y, const char* string) { + drawSmallString_impl(dl, x, y, string, 255, 255, 255); +} + +static inline void drawSmallStringCol(Gfx **dl, int x, int y, const char* string, int r, int g, int b) { + drawSmallString_impl(dl, x, y, string, r, g, b); +} + +#endif diff --git a/src/game/game_init.c b/src/game/game_init.c index 8ab354f8..3fd9ff70 100644 --- a/src/game/game_init.c +++ b/src/game/game_init.c @@ -29,6 +29,7 @@ #include "puppycam2.h" #include "debug_box.h" #include "vc_check.h" +#include "profiling.h" // First 3 controller slots struct Controller gControllers[3]; @@ -729,10 +730,6 @@ void setup_game_memory(void) { * Main game loop thread. Runs forever as long as the game continues. */ void thread5_game_loop(UNUSED void *arg) { -#if PUPPYPRINT_DEBUG - OSTime lastTime = 0; -#endif - setup_game_memory(); #if ENABLE_RUMBLE init_rumble_pak_scheduler_queue(); @@ -762,19 +759,12 @@ void thread5_game_loop(UNUSED void *arg) { render_init(); while (TRUE) { + profiler_frame_setup(); // If the reset timer is active, run the process to reset the game. if (gResetTimer != 0) { draw_reset_bars(); continue; } -#if PUPPYPRINT_DEBUG - while (TRUE) { - lastTime = osGetTime(); - collisionTime[perfIteration] = 0; - // graphTime[perfIteration] = 0; - behaviourTime[perfIteration] = 0; - dmaTime[perfIteration] = 0; -#endif // If any controllers are plugged in, start read the data for when // read_controller_inputs is called later. @@ -788,25 +778,12 @@ void thread5_game_loop(UNUSED void *arg) { audio_game_loop_tick(); select_gfx_pool(); read_controller_inputs(THREAD_5_GAME_LOOP); + profiler_update(PROFILER_TIME_CONTROLLERS); addr = level_script_execute(addr); #if !PUPPYPRINT_DEBUG && defined(VISUAL_DEBUG) debug_box_input(); #endif #if PUPPYPRINT_DEBUG - profiler_update(scriptTime, lastTime); - scriptTime[perfIteration] -= profilerTime[perfIteration]; - scriptTime[perfIteration] -= profilerTime2[perfIteration]; - if (benchmarkLoop > 0 && benchOption == 0) { - benchmarkLoop--; - benchMark[benchmarkLoop] = (osGetTime() - lastTime); - if (benchmarkLoop == 0) { - puppyprint_profiler_finished(); - break; - } - } else { - break; - } - } puppyprint_profiler_process(); #endif diff --git a/src/game/hud.c b/src/game/hud.c index 93f7fa3f..2138e067 100644 --- a/src/game/hud.c +++ b/src/game/hud.c @@ -52,6 +52,9 @@ u8 curFrameTimeIndex = 0; #include "PR/os_convert.h" +#ifdef USE_PROFILER +float profiler_get_fps(); +#else // Call once per frame f32 calculate_and_update_fps() { OSTime newTime = osGetTime(); @@ -64,9 +67,14 @@ f32 calculate_and_update_fps() { } return ((f32)FRAMETIME_COUNT * 1000000.0f) / (s32)OS_CYCLES_TO_USEC(newTime - oldTime); } +#endif void print_fps(s32 x, s32 y) { +#ifdef USE_PROFILER + f32 fps = profiler_get_fps(); +#else f32 fps = calculate_and_update_fps(); +#endif char text[14]; sprintf(text, "FPS %2.2f", fps); @@ -75,7 +83,6 @@ void print_fps(s32 x, s32 y) { #else print_text(x, y, text); #endif - } // ------------ END OF FPS COUNER ----------------- diff --git a/src/game/newfont2_swapped.bin b/src/game/newfont2_swapped.bin new file mode 100644 index 0000000000000000000000000000000000000000..72cf2c53ed95e374a692e3647832d7c2fdec7223 GIT binary patch literal 4032 zcmZQzU|_S;1Hd#`Lue?74Z@+J5H^Sg=>&;^ zFo;c0%nEfl$fXc_p{&r*01yj?8NjIqMnY6#BU!P8L+Jm|uOPLcumoY&{{al3Fa@ze zIR0yB0PENI08m)6ehpv%sRoII(kw_H9J9s;g#P~@${PQb0Yrl^L+Jmn@&EsS1+if? zhz$yEF#i8P6l6|lXec-yKr|@KK^PR?AR2^0@eQKEdO#`>@dM%ofb=2MKvZIoU%!HK z7&uKp+zj#&D4qO=i$g>peuc0hDzTBQ;84RR!@v+9`X8P?L3te%rl2qbVQ^S}jSm2Y zBPjkLVqhmQFvKGajsF_|m4WqZ0EiC#|CNC?{{L4H8-hbaK{SK}X^RJkGe~V zG$^b=;SR=MOlz?9A=>O85;i;6n3Hi!Qlqxfzv9? zk6%Gy3c`>u1L;FxuugFJgTz3ZS;4&jq3|#TnF}`yqzZ&X!5Tp<7zW1=C|*MUgF`Iz z|JQ){|6c<@bm;&8U^*U5{||_d{|e573=HuBp!^96OHla3)I(^99+2Mn|6f5W13;-6 zj6=aBC|!UP8z_uG7!)?3Fa@ze7*rmB${mpTAUTj2EYpC}5l9R~gZ#h%3h>bXp`dgN z;MAQa*Qa2SF7j)Xz!6C@iCD%U`M0EN`o|KRY& zR391u77GC7SxB0PhGak}v`hh|K~Ok>FeofRVFY4>Fxalpui%UgvJ(`RU~y0q3ljVHtd`4wDtf*cADyHH4YfWjCYrUBrb9uOZ7 zO>>}d3I)~8&~OCtL1hJq2B{7G52>fW{s*T^P}&4xkR6~j2ntIO#z>!`;4%Z8K0$R7 zD9k|WK=m@nPaypu8YBny11SAK>vV9){QnQGH$eUc$%8ORJqSb0fRwRdaZnxx>Ho?A zDia_v0yPU9ieNb~3tU%$%mC{HrF(FB0%==-(qufS&Vu9%P?-X8|NsAJ_I?GIpP`_34kQ(W(<7*!0);&&kAl-Rs2%wqkuE{;1Wu#>A?*cF7=bV-e2~*8 zs2u`okb=SyBnMIh4m+?5LHPqD3UU)DzCnCY4Fzu5z}ugowhst{!Ve?^W`pW2P`E+r zLy#s=y$NpXf;b=yQU}5yHYSGH2@+=omD!-87SslY(jakgD-2W`LB&8WMXs+QW`pW{ zP>l}4p`f-Gxb6ql*Pw6!s}BH~1PXDm|G=$NkY2EVKrPo$P&*RT*8#PFz-r+2JIGED z28A04gV-<(&gY?!vH>IpN*^E^ghBBJqKU;|y`aD)Rs$||paw54IU>bD>5Y(5i2ooY zF14^S5hM=^I}ir3K^VjaVGtXPAwdr=KS4}vK>-p6t0j`aW(JX3(Ug&I5-9ni8HR%k RO0hVkAYE}3Nl@5 +#include +#include "game_init.h" + +#include "profiling.h" +#include "fasttext.h" + +#ifdef USE_PROFILER + +#define RDP_CYCLE_CONV(x) ((10 * (x)) / 625) // 62.5 million cycles per frame + +typedef struct { + u32 counts[PROFILING_BUFFER_SIZE]; + u32 total; +} ProfileTimeData; + +ProfileTimeData all_profiling_data[PROFILER_TIME_COUNT]; + +int profile_buffer_index = -1; +int rsp_buffer_indices[PROFILER_RSP_COUNT]; +// Holds either the start time if the task is running, or the amount of time the task has run for so far if yielded +u32 rsp_pending_times[PROFILER_RSP_COUNT]; +u32 prev_start; +u32 start; +u32 prev_time; +u32 audio_start; +u32 audio_buffer_index; +u32 preempted_time; + +static void buffer_update(ProfileTimeData* data, u32 new, int buffer_index) { + u32 old = data->counts[buffer_index]; + data->total -= old; + data->total += new; + data->counts[buffer_index] = new; +} + +void profiler_update(enum ProfilerTime which) { + u32 cur_time = osGetCount(); + u32 diff; + ProfileTimeData* cur_data = &all_profiling_data[which]; + + diff = cur_time - prev_time; + + u32 saved = __osDisableInt(); + u32 cur_preempted_time = preempted_time; + preempted_time = 0; + __osRestoreInt(saved); + if (cur_preempted_time > 0) { + diff -= cur_preempted_time; + start += cur_preempted_time; + } + + buffer_update(cur_data, diff, profile_buffer_index); + prev_time = cur_time; +} + +void profiler_rsp_started(enum ProfilerRSPTime which) { + rsp_pending_times[which] = osGetCount(); +} + +void profiler_rsp_completed(enum ProfilerRSPTime which) { + ProfileTimeData* cur_data = &all_profiling_data[PROFILER_TIME_RSP_GFX + which]; + int cur_index = rsp_buffer_indices[which]; + u32 time = osGetCount() - rsp_pending_times[which]; + rsp_pending_times[which] = 0; + + buffer_update(cur_data, time, cur_index); + cur_index++; + if (cur_index >= PROFILING_BUFFER_SIZE) { + cur_index = 0; + } + rsp_buffer_indices[which] = cur_index; +} + +void profiler_rsp_resumed() { + rsp_pending_times[PROFILER_RSP_GFX] = osGetCount() - rsp_pending_times[PROFILER_RSP_GFX]; +} + +// This ends up being the same math as resumed, so we just use resumed for both +// void profiler_rsp_yielded() { +// rsp_pending_times[PROFILER_RSP_GFX] = osGetCount() - rsp_pending_times[PROFILER_RSP_GFX]; +// } + +void profiler_audio_started() { + audio_start = osGetCount(); +} + +void profiler_audio_completed() { + ProfileTimeData* cur_data = &all_profiling_data[PROFILER_TIME_AUDIO]; + u32 time = osGetCount() - audio_start; + u32 cur_index = audio_buffer_index; + + preempted_time = time; + buffer_update(cur_data, time, cur_index); + cur_index++; + if (cur_index >= PROFILING_BUFFER_SIZE) { + cur_index = 0; + } + + audio_buffer_index = cur_index; +} + +static void update_fps_timer() { + u32 diff = start - prev_start; + + buffer_update(&all_profiling_data[PROFILER_TIME_FPS], diff, profile_buffer_index); + prev_start = start; +} + +static void update_total_timer() { + u32 saved = __osDisableInt(); + u32 cur_preempted_time = preempted_time; + preempted_time = 0; + __osRestoreInt(saved); + + prev_time = start + cur_preempted_time; + profiler_update(PROFILER_TIME_TOTAL); +} + +static void update_rdp_timers() { + u32 tmem = IO_READ(DPC_TMEM_REG); + u32 cmd = IO_READ(DPC_BUFBUSY_REG); + u32 pipe = IO_READ(DPC_PIPEBUSY_REG); + + if (gGlobalTimer > 5) { + IO_WRITE(DPC_STATUS_REG, (DPC_CLR_CLOCK_CTR | DPC_CLR_CMD_CTR | DPC_CLR_PIPE_CTR | DPC_CLR_TMEM_CTR)); + } + + buffer_update(&all_profiling_data[PROFILER_TIME_TMEM], tmem, profile_buffer_index); + buffer_update(&all_profiling_data[PROFILER_TIME_CMD], cmd, profile_buffer_index); + buffer_update(&all_profiling_data[PROFILER_TIME_PIPE], pipe, profile_buffer_index); +} + +#ifdef PUPPYPRINT_DEBUG +extern u8 sPPDebugPage; +extern u8 fDebug; +#endif + +float profiler_get_fps() { + return (1000000.0f * PROFILING_BUFFER_SIZE) / (OS_CYCLES_TO_USEC(all_profiling_data[PROFILER_TIME_FPS].total)); +} + +u32 profiler_get_cpu_cycles() { + u32 cpu_normal_time = all_profiling_data[PROFILER_TIME_TOTAL].total / PROFILING_BUFFER_SIZE; + u32 cpu_audio_time = all_profiling_data[PROFILER_TIME_AUDIO].total / PROFILING_BUFFER_SIZE; + return cpu_normal_time + cpu_audio_time * 2; +} + +u32 profiler_get_rsp_cycles() { + u32 rsp_graphics_time = all_profiling_data[PROFILER_TIME_RSP_GFX].total / PROFILING_BUFFER_SIZE; + u32 rsp_audio_time = all_profiling_data[PROFILER_TIME_RSP_AUDIO].total / PROFILING_BUFFER_SIZE; + return rsp_graphics_time + rsp_audio_time; +} + +u32 profiler_get_rdp_cycles() { + u32 rdp_pipe_cycles = all_profiling_data[PROFILER_TIME_PIPE].total; + u32 rdp_tmem_cycles = all_profiling_data[PROFILER_TIME_TMEM].total; + u32 rdp_cmd_cycles = all_profiling_data[PROFILER_TIME_CMD].total; + + u32 rdp_max_cycles = MAX(MAX(rdp_pipe_cycles, rdp_tmem_cycles), rdp_cmd_cycles); + + return rdp_max_cycles / PROFILING_BUFFER_SIZE; +} + +u32 profiler_get_cpu_microseconds() { + u32 cpu_normal_time = OS_CYCLES_TO_USEC(all_profiling_data[PROFILER_TIME_TOTAL].total / PROFILING_BUFFER_SIZE); + u32 cpu_audio_time = OS_CYCLES_TO_USEC(all_profiling_data[PROFILER_TIME_AUDIO].total / PROFILING_BUFFER_SIZE); + return cpu_normal_time + cpu_audio_time * 2; +} + +u32 profiler_get_rsp_microseconds() { + u32 rsp_graphics_time = OS_CYCLES_TO_USEC(all_profiling_data[PROFILER_TIME_RSP_GFX].total / PROFILING_BUFFER_SIZE); + u32 rsp_audio_time = OS_CYCLES_TO_USEC(all_profiling_data[PROFILER_TIME_RSP_AUDIO].total / PROFILING_BUFFER_SIZE); + return rsp_graphics_time + rsp_audio_time; +} + +u32 profiler_get_rdp_microseconds() { + u32 rdp_pipe_cycles = all_profiling_data[PROFILER_TIME_PIPE].total; + u32 rdp_tmem_cycles = all_profiling_data[PROFILER_TIME_TMEM].total; + u32 rdp_cmd_cycles = all_profiling_data[PROFILER_TIME_CMD].total; + + u32 rdp_max_cycles = MAX(MAX(rdp_pipe_cycles, rdp_tmem_cycles), rdp_cmd_cycles); + + return RDP_CYCLE_CONV(rdp_max_cycles / PROFILING_BUFFER_SIZE); +} + +void profiler_print_times() { + u32 microseconds[PROFILER_TIME_COUNT]; + char text_buffer[196]; + + update_fps_timer(); + update_total_timer(); + update_rdp_timers(); + +#ifndef PUPPYPRINT_DEBUG + static u8 show_profiler = 0; + if (gPlayer1Controller->buttonPressed & L_TRIG) { + show_profiler ^= 1; + } +#endif + +#ifdef PUPPYPRINT_DEBUG + if (fDebug && sPPDebugPage == 0) { +#else + if (show_profiler) { +#endif + for (int i = 0; i < PROFILER_TIME_COUNT; i++) { + if (i < PROFILER_TIME_TMEM) { + microseconds[i] = OS_CYCLES_TO_USEC(all_profiling_data[i].total / PROFILING_BUFFER_SIZE); + } else { + microseconds[i] = RDP_CYCLE_CONV(all_profiling_data[i].total / PROFILING_BUFFER_SIZE); + } + } + + // audio time is removed from the main thread profiling, so add it back here + u32 total_cpu = microseconds[PROFILER_TIME_TOTAL] + microseconds[PROFILER_TIME_AUDIO] * 2; + u32 total_rsp = microseconds[PROFILER_TIME_RSP_GFX] + microseconds[PROFILER_TIME_RSP_AUDIO]; + u32 max_rdp = MAX(MAX(microseconds[PROFILER_TIME_TMEM], microseconds[PROFILER_TIME_CMD]), microseconds[PROFILER_TIME_PIPE]); + + sprintf(text_buffer, + "FPS: %5.2f\n" + "\n" + "CPU\t\t%d (%d%%)\n" + " Input\t\t%d\n" + " Dynamic\t\t%d\n" + " Mario\t\t\t%d\n" + " Behavior\t\t%d\n" + " Graph\t\t%d\n" + " Audio\t\t\t%d\n" + "\n" + "RDP\t\t%d (%d%%)\n" + " Tmem\t\t\t%d\n" + " Cmd\t\t\t%d\n" + " Pipe\t\t\t%d\n" + "\n" + "RSP\t\t%d (%d%%)\n" + " Gfx\t\t\t%d\n" + " Audio\t\t\t%d\n", + 1000000.0f / microseconds[PROFILER_TIME_FPS], + total_cpu, total_cpu / 333, + microseconds[PROFILER_TIME_CONTROLLERS], + microseconds[PROFILER_TIME_DYNAMIC], + microseconds[PROFILER_TIME_MARIO], + microseconds[PROFILER_TIME_BEHAVIOR_BEFORE_MARIO] + microseconds[PROFILER_TIME_BEHAVIOR_AFTER_MARIO], + microseconds[PROFILER_TIME_GFX], + microseconds[PROFILER_TIME_AUDIO] * 2, // audio is 60Hz, so double the average + max_rdp, max_rdp / 333, + microseconds[PROFILER_TIME_TMEM], + microseconds[PROFILER_TIME_CMD], + microseconds[PROFILER_TIME_PIPE], + total_rsp, total_rsp / 333, + microseconds[PROFILER_TIME_RSP_GFX], + microseconds[PROFILER_TIME_RSP_AUDIO] + ); + + Gfx* dlHead = gDisplayListHead; + gDPPipeSync(dlHead++); + gDPSetCycleType(dlHead++, G_CYC_1CYCLE); + gDPSetRenderMode(dlHead++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); + gDPSetTexturePersp(dlHead++, G_TP_NONE); + gDPSetTextureFilter(dlHead++, G_TF_POINT); + gDPSetTextureLUT(dlHead++, G_TT_NONE); + drawSmallStringCol(&dlHead, 10, 10, text_buffer, 255, 255, 255); + gDisplayListHead = dlHead; + } +} + +void profiler_frame_setup() { + profile_buffer_index++; + preempted_time = 0; + + if (profile_buffer_index >= PROFILING_BUFFER_SIZE) { + profile_buffer_index = 0; + } + + prev_time = start = osGetCount(); +} + +#endif diff --git a/src/game/profiling.h b/src/game/profiling.h new file mode 100644 index 00000000..48bbe34c --- /dev/null +++ b/src/game/profiling.h @@ -0,0 +1,61 @@ +#ifndef __PROFILING_H__ +#define __PROFILING_H__ + +#include +#include "macros.h" +#include "config/config_debug.h" +#include "config/config_safeguards.h" + +#define PROFILING_BUFFER_SIZE 64 + +enum ProfilerTime { + PROFILER_TIME_FPS, + PROFILER_TIME_CONTROLLERS, + PROFILER_TIME_SPAWNER, + PROFILER_TIME_DYNAMIC, + PROFILER_TIME_BEHAVIOR_BEFORE_MARIO, + PROFILER_TIME_MARIO, + PROFILER_TIME_BEHAVIOR_AFTER_MARIO, + PROFILER_TIME_GFX, + PROFILER_TIME_AUDIO, + PROFILER_TIME_TOTAL, + PROFILER_TIME_RSP_GFX, + PROFILER_TIME_RSP_AUDIO, + PROFILER_TIME_TMEM, + PROFILER_TIME_PIPE, + PROFILER_TIME_CMD, + PROFILER_TIME_COUNT, +}; + +enum ProfilerRSPTime { + PROFILER_RSP_GFX, + PROFILER_RSP_AUDIO, + PROFILER_RSP_COUNT +}; + +#ifdef USE_PROFILER +void profiler_update(enum ProfilerTime which); +void profiler_print_times(); +void profiler_frame_setup(); +void profiler_rsp_started(enum ProfilerRSPTime which); +void profiler_rsp_completed(enum ProfilerRSPTime which); +void profiler_rsp_resumed(); +void profiler_audio_started(); +void profiler_audio_completed(); +// See profiling.c to see why profiler_rsp_yielded isn't its own function +static ALWAYS_INLINE void profiler_rsp_yielded() { + profiler_rsp_resumed(); +} +#else +#define profiler_update(which) +#define profiler_print_times() +#define profiler_frame_setup() +#define profiler_rsp_started(which) +#define profiler_rsp_completed(which) +#define profiler_rsp_resumed() +#define profiler_audio_started() +#define profiler_audio_completed() +#define profiler_rsp_yielded() +#endif + +#endif diff --git a/src/game/puppyprint.c b/src/game/puppyprint.c index 9987026b..ab9dce05 100644 --- a/src/game/puppyprint.c +++ b/src/game/puppyprint.c @@ -68,34 +68,9 @@ s32 benchmarkTimer = 0; s32 benchmarkProgramTimer = 0; s8 benchmarkType = 0; // General -u32 cpuTime = 0; u32 rspTime = 0; u32 rdpTime = 0; -u32 ramTime = 0; -u32 loadTime = 0; -u32 gLastOSTime = 0; -u32 rspDelta = 0; s32 benchMark[NUM_BENCH_ITERATIONS + 2]; -// CPU -u32 collisionTime[NUM_PERF_ITERATIONS + 1]; -u32 behaviourTime[NUM_PERF_ITERATIONS + 1]; -u32 scriptTime[NUM_PERF_ITERATIONS + 1]; -u32 graphTime[NUM_PERF_ITERATIONS + 1]; -u32 audioTime[NUM_PERF_ITERATIONS + 1]; -u32 dmaTime[NUM_PERF_ITERATIONS + 1]; -u32 dmaAudioTime[NUM_PERF_ITERATIONS + 1]; -u32 faultTime[NUM_PERF_ITERATIONS + 1]; -u32 taskTime[NUM_PERF_ITERATIONS + 1]; -u32 profilerTime[NUM_PERF_ITERATIONS + 1]; -u32 profilerTime2[NUM_PERF_ITERATIONS + 1]; -u32 cameraTime[NUM_PERF_ITERATIONS + 1]; -// RSP -u32 audioTime[NUM_PERF_ITERATIONS + 1]; -u32 rspGenTime[NUM_PERF_ITERATIONS + 1]; -// RDP -u32 bufferTime[NUM_PERF_ITERATIONS + 1]; -u32 tmemTime[NUM_PERF_ITERATIONS + 1]; -u32 busTime[NUM_PERF_ITERATIONS + 1]; // RAM s8 ramViewer = FALSE; s32 ramsizeSegment[NUM_TLB_SEGMENTS + 1] = { @@ -306,6 +281,7 @@ void print_ram_overview(void) { sprintf(textBytes, "RAM: %06X/%06X (%d_)", main_pool_available(), mempool, (s32)(((f32)main_pool_available() / (f32)mempool) * 100)); print_small_text(SCREEN_CENTER_X, (SCREEN_HEIGHT - 16), textBytes, PRINT_TEXT_ALIGN_CENTRE, PRINT_ALL, FONT_OUTLINE); + puppyprint_calculate_ram_usage(); print_ram_bar(); } @@ -477,12 +453,6 @@ extern s16 gVisualSurfaceCount; void puppyprint_render_collision(void) { char textBytes[200]; -#ifdef PUPPYPRINT_DEBUG_CYCLES - sprintf(textBytes, "Collision: %dc", collisionTime[NUM_PERF_ITERATIONS]); -#else - sprintf(textBytes, "Collision: %dus", collisionTime[NUM_PERF_ITERATIONS]); -#endif - print_small_text(304, 48, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL, 1); sprintf(textBytes, "Pool Size: %X#Node Size: %X#Surfaces Allocated: %d#Nodes Allocated: %d#Current Cell: %d", (SURFACE_NODE_POOL_SIZE * sizeof(struct SurfaceNode)), (SURFACE_POOL_SIZE * sizeof(struct Surface)), gSurfacesAllocated, gSurfaceNodesAllocated, gVisualSurfaceCount); @@ -512,55 +482,47 @@ void puppyprint_render_collision(void) { #endif } -struct CPUBar { - u32 *time; - ColorRGB colour; - const char str[32]; -}; - extern void print_fps(s32 x, s32 y); -struct CPUBar cpu_ordering_table[] = { - { collisionTime, COLOR_RGB_RED, { "Collision: " }}, - { graphTime, COLOR_RGB_BLUE, { "Graph: " }}, - { behaviourTime, COLOR_RGB_GREEN, { "Behaviour: " }}, - { audioTime, COLOR_RGB_YELLOW, { "Audio: " }}, - { cameraTime, COLOR_RGB_CYAN, { "Camera: " }}, - { dmaTime, COLOR_RGB_MAGENTA, { "DMA: " }}, -}; +u32 profiler_get_cpu_cycles(); +u32 profiler_get_rsp_cycles(); +u32 profiler_get_rdp_cycles(); -#define CPU_TABLE_MAX (sizeof(cpu_ordering_table) / sizeof(struct CPUBar)) -#define ADDTIMES MAX(((collisionTime[MX] + graphTime[MX] + behaviourTime[MX] + audioTime[MX] + cameraTime[MX] + dmaTime[MX]) / 80), 1) +u32 profiler_get_cpu_microseconds(); +u32 profiler_get_rsp_microseconds(); +u32 profiler_get_rdp_microseconds(); void print_basic_profiling(void) { + u32 cpuTime; + u32 rspTime; + u32 rdpTime; char textBytes[90]; - print_fps(16, 40); + print_fps(16, 16); #ifdef PUPPYPRINT_DEBUG_CYCLES + cpuTime = profiler_get_cpu_cycles(); + rspTime = profiler_get_rsp_cycles(); + rdpTime = profiler_get_rdp_cycles(); sprintf(textBytes, "CPU: %dc (%d_)#RSP: %dc (%d_)#RDP: %dc (%d_)", cpuTime, (cpuTime / 15625), rspTime, (rspTime / 15625), rdpTime, (rdpTime / 15625)); #else + cpuTime = profiler_get_cpu_microseconds(); + rspTime = profiler_get_rsp_microseconds(); + rdpTime = profiler_get_rdp_microseconds(); sprintf(textBytes, "CPU: %dus (%d_)#RSP: %dus (%d_)#RDP: %dus (%d_)", cpuTime, (cpuTime / 333), rspTime, (rspTime / 333), rdpTime, (rdpTime / 333)); #endif - print_small_text(16, 52, textBytes, PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE); + print_small_text(16, 28, textBytes, PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE); } void puppyprint_render_standard(void) { - s32 perfPercentage[CPU_TABLE_MAX]; - s32 graphPos; - s32 prevGraph; - u32 i; - s32 viewedNums; char textBytes[80]; - print_basic_profiling(); - sprintf(textBytes, "OBJ: %d/%d", gObjectCounter, OBJECT_POOL_CAPACITY); - print_small_text(16, 124, textBytes, PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE); + print_small_text((SCREEN_WIDTH - 16), 16, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL, FONT_OUTLINE); #ifndef ENABLE_CREDITS_BENCHMARK // Very little point printing useless info if Mario doesn't even exist. @@ -571,7 +533,7 @@ void puppyprint_render_standard(void) { (s32)(gMarioState->pos[2]), (u16)(gMarioState->faceAngle[1]), (u32)(gMarioState->action & ACT_ID_MASK)); - print_small_text(16, 140, textBytes, PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE); + print_small_text((SCREEN_WIDTH - 16), 32, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL, FONT_OUTLINE); } // Same for the camera, especially so because this will crash otherwise. if (gCamera) { @@ -584,66 +546,51 @@ void puppyprint_render_standard(void) { } #endif - // Just to keep screen estate a little friendlier. -#define MX NUM_PERF_ITERATIONS - for (i = 0; i < CPU_TABLE_MAX; i++) { - perfPercentage[i] = MAX((cpu_ordering_table[i].time[MX] / ADDTIMES), 0); - } -#undef ADDTIMES -#undef MX + // Old profiler bar code, can be restored one day if desired to work with new profiler + // s32 graphPos; + // s32 prevGraph; + // u32 i; + // s32 viewedNums; - viewedNums = 0; - for (i = 0; i < CPU_TABLE_MAX; i++) { - s32 num = cpu_ordering_table[i].time[NUM_PERF_ITERATIONS]; - if (num != 0) { -#ifdef PUPPYPRINT_DEBUG_CYCLES - sprintf(textBytes, "%s%dc", cpu_ordering_table[i].str, num); -#else - sprintf(textBytes, "%s%dus", cpu_ordering_table[i].str, num); -#endif - print_small_text((SCREEN_WIDTH - 16), (40 + (viewedNums * 12)), textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL, FONT_OUTLINE); - viewedNums++; - } - } + // prepare_blank_box(); + // viewedNums = 0; - s32 barY = (28 + (viewedNums * 12)) + 16; - prepare_blank_box(); - viewedNums = 0; + // // Render CPU breakdown bar. + // for (i = 0; i < CPU_TABLE_MAX; i++) { + // if (perfPercentage[i] == 0 + // && (i != CPU_TABLE_MAX - 1)) { + // continue; + // } - // Render CPU breakdown bar. - for (i = 0; i < CPU_TABLE_MAX; i++) { - if (perfPercentage[i] == 0 - && (i != CPU_TABLE_MAX - 1)) { - continue; - } + // if (viewedNums == 0) { + // graphPos = ((SCREEN_WIDTH - 96) + perfPercentage[i]); + // render_blank_box((SCREEN_WIDTH - 96), barY, graphPos, (barY + 8), + // cpu_ordering_table[i].colour[0], + // cpu_ordering_table[i].colour[1], + // cpu_ordering_table[i].colour[2], 255); + // } else if (i == (CPU_TABLE_MAX - 1)) { + // graphPos = ((SCREEN_WIDTH - 96) + perfPercentage[i]); + // render_blank_box(prevGraph, barY, (SCREEN_WIDTH - 16), (barY + 8), + // cpu_ordering_table[i].colour[0], + // cpu_ordering_table[i].colour[1], + // cpu_ordering_table[i].colour[2], 255); + // } else { + // graphPos += perfPercentage[i]; + // render_blank_box(prevGraph, barY, graphPos, (barY + 8), + // cpu_ordering_table[i].colour[0], + // cpu_ordering_table[i].colour[1], + // cpu_ordering_table[i].colour[2], 255); + // } - if (viewedNums == 0) { - graphPos = ((SCREEN_WIDTH - 96) + perfPercentage[i]); - render_blank_box((SCREEN_WIDTH - 96), barY, graphPos, (barY + 8), - cpu_ordering_table[i].colour[0], - cpu_ordering_table[i].colour[1], - cpu_ordering_table[i].colour[2], 255); - } else if (i == (CPU_TABLE_MAX - 1)) { - graphPos = ((SCREEN_WIDTH - 96) + perfPercentage[i]); - render_blank_box(prevGraph, barY, (SCREEN_WIDTH - 16), (barY + 8), - cpu_ordering_table[i].colour[0], - cpu_ordering_table[i].colour[1], - cpu_ordering_table[i].colour[2], 255); - } else { - graphPos += perfPercentage[i]; - render_blank_box(prevGraph, barY, graphPos, (barY + 8), - cpu_ordering_table[i].colour[0], - cpu_ordering_table[i].colour[1], - cpu_ordering_table[i].colour[2], 255); - } + // viewedNums++; + // prevGraph = graphPos; + // } - viewedNums++; - prevGraph = graphPos; - } - - finish_blank_box(); + // finish_blank_box(); } + + void puppyprint_render_minimal(void) { print_basic_profiling(); } @@ -686,12 +633,10 @@ void render_page_menu(void) { } void puppyprint_render_profiler(void) { - OSTime first = osGetTime(); print_set_envcolour(255, 255, 255, 255); if (!fDebug) { - profiler_update(profilerTime, first); return; } @@ -700,39 +645,9 @@ void puppyprint_render_profiler(void) { if (sDebugMenu) { render_page_menu(); } - profiler_update(profilerTime, first); -} - -void profiler_update(u32 *time, OSTime time2) { - time[perfIteration] = (osGetTime() - time2); -} - -void get_average_perf_time(u32 *time, s32 is_rdp) { - // This takes all but the last index of the timer array, and creates an average value, which is written to the last index. - s32 i = 0; - s32 total = 0; - for (i = 0; i < NUM_PERF_ITERATIONS; i++) { - total += time[i]; - } - - total /= NUM_PERF_ITERATIONS; - total = MAX(total, 0); - if (is_rdp) - { - time[NUM_PERF_ITERATIONS] = RDP_CYCLE_CONV(total); - } - else - { - time[NUM_PERF_ITERATIONS] = CYCLE_CONV(total); - } } void puppyprint_profiler_process(void) { - bufferTime[perfIteration] = (IO_READ(DPC_BUFBUSY_REG)); - tmemTime[perfIteration] = (IO_READ(DPC_TMEM_REG)); - busTime[perfIteration] = (IO_READ(DPC_PIPEBUSY_REG)); - OSTime newTime = osGetTime(); - if (fDebug && (gPlayer1Controller->buttonPressed & L_TRIG)) { sDebugMenu ^= TRUE; if (sDebugMenu == FALSE) { @@ -760,54 +675,6 @@ void puppyprint_profiler_process(void) { sDebugOption = 0; } } - - if (!(gGlobalTimer % NUM_PERF_ITERATIONS)) { - get_average_perf_time( scriptTime, FALSE); - get_average_perf_time( behaviourTime, FALSE); - get_average_perf_time( collisionTime, FALSE); - get_average_perf_time( graphTime, FALSE); - get_average_perf_time( audioTime, FALSE); - get_average_perf_time( dmaTime, FALSE); - get_average_perf_time( dmaAudioTime, FALSE); - get_average_perf_time( faultTime, FALSE); - get_average_perf_time( taskTime, FALSE); - get_average_perf_time( profilerTime, FALSE); - get_average_perf_time( profilerTime2, FALSE); - get_average_perf_time( cameraTime, FALSE); - - // Performed twice a frame without fail, so doubled to have a more representative value. - audioTime[NUM_PERF_ITERATIONS] *= 2; - dmaAudioTime[NUM_PERF_ITERATIONS] *= 2; - dmaTime[NUM_PERF_ITERATIONS] += dmaAudioTime[NUM_PERF_ITERATIONS]; - - get_average_perf_time(rspGenTime, FALSE); - - get_average_perf_time(bufferTime, TRUE); - get_average_perf_time( tmemTime, TRUE); - get_average_perf_time( busTime, TRUE); - - rdpTime = bufferTime[NUM_PERF_ITERATIONS]; - rdpTime = MAX(rdpTime, tmemTime[NUM_PERF_ITERATIONS]); - rdpTime = MAX(rdpTime, busTime[NUM_PERF_ITERATIONS]); -#if BBPLAYER == 1 // iQue RDP registers need to be halved to be correct. - rdpTime /= 2; -#endif - cpuTime = (scriptTime[NUM_PERF_ITERATIONS] - + taskTime[NUM_PERF_ITERATIONS] - + faultTime[NUM_PERF_ITERATIONS] - + audioTime[NUM_PERF_ITERATIONS]); - rspTime = rspGenTime[NUM_PERF_ITERATIONS]; - puppyprint_calculate_ram_usage(); - } - - gLastOSTime = newTime; - if (gGlobalTimer > 5) { - IO_WRITE(DPC_STATUS_REG, (DPC_CLR_CLOCK_CTR | DPC_CLR_CMD_CTR | DPC_CLR_PIPE_CTR | DPC_CLR_TMEM_CTR)); - } - if (perfIteration++ == (NUM_PERF_ITERATIONS - 1)) { - perfIteration = 0; - } - profiler_update(profilerTime2, newTime); } #endif diff --git a/src/game/puppyprint.h b/src/game/puppyprint.h index 7608adc9..a43d51a1 100644 --- a/src/game/puppyprint.h +++ b/src/game/puppyprint.h @@ -2,17 +2,9 @@ #include "segment2.h" -// This is how many indexes of timers are saved at once. higher creates a smoother average, but naturally uses more RAM. 15's fine. -// #define NUM_PERF_ITERATIONS 15 -#define NUM_PERF_ITERATIONS 16 #define NUM_BENCH_ITERATIONS 150 #define LOG_BUFFER_SIZE 16 -#ifdef ENABLE_CREDITS_BENCHMARK -#undef NUM_PERF_ITERATIONS -#define NUM_PERF_ITERATIONS 60 -#endif - struct PuppyPrintPage{ void (*func)(); char name[32]; @@ -58,35 +50,8 @@ extern s32 mempool; extern u8 benchOption; // General -extern u32 cpuTime; -extern u32 rspTime; -extern u32 rdpTime; -extern u32 ramTime; -extern u32 loadTime; -extern u32 rspDelta; -extern s32 benchMark[NUM_BENCH_ITERATIONS + 2]; +extern s32 benchMark[NUM_BENCH_ITERATIONS + 2]; -// CPU -extern u32 collisionTime[NUM_PERF_ITERATIONS + 1]; -extern u32 behaviourTime[NUM_PERF_ITERATIONS + 1]; -extern u32 scriptTime[NUM_PERF_ITERATIONS + 1]; -extern u32 graphTime[NUM_PERF_ITERATIONS + 1]; -extern u32 audioTime[NUM_PERF_ITERATIONS + 1]; -extern u32 dmaTime[NUM_PERF_ITERATIONS + 1]; -extern u32 dmaAudioTime[NUM_PERF_ITERATIONS + 1]; -extern u32 faultTime[NUM_PERF_ITERATIONS + 1]; -extern u32 taskTime[NUM_PERF_ITERATIONS + 1]; -extern u32 cameraTime[NUM_PERF_ITERATIONS + 1]; -extern u32 profilerTime[NUM_PERF_ITERATIONS + 1]; -extern u32 profilerTime2[NUM_PERF_ITERATIONS + 1]; -// RSP -extern u32 rspGenTime[NUM_PERF_ITERATIONS + 1]; -// RDP -extern u32 bufferTime[NUM_PERF_ITERATIONS + 1]; -extern u32 tmemTime[NUM_PERF_ITERATIONS + 1]; -extern u32 busTime[NUM_PERF_ITERATIONS + 1]; - -extern void profiler_update(u32 *time, OSTime time2); extern void puppyprint_profiler_process(void); extern void puppyprint_render_profiler(void); extern void puppyprint_profiler_finished(void); diff --git a/src/game/sound_init.c b/src/game/sound_init.c index db5c3213..b7d4088a 100644 --- a/src/game/sound_init.c +++ b/src/game/sound_init.c @@ -15,6 +15,7 @@ #include "sound_init.h" #include "rumble_init.h" #include "puppyprint.h" +#include "profiling.h" #define MUSIC_NONE 0xFFFF @@ -341,10 +342,6 @@ void thread4_sound(UNUSED void *arg) { audio_init(); sound_init(); -#if PUPPYPRINT_DEBUG - OSTime lastTime; -#endif - osCreateMesgQueue(&sSoundMesgQueue, sSoundMesgBuf, ARRAY_COUNT(sSoundMesgBuf)); set_vblank_handler(1, &sSoundVblankHandler, &sSoundMesgQueue, (OSMesg) 512); @@ -352,34 +349,14 @@ void thread4_sound(UNUSED void *arg) { OSMesg msg; osRecvMesg(&sSoundMesgQueue, &msg, OS_MESG_BLOCK); -#if PUPPYPRINT_DEBUG - while (TRUE) { - lastTime = osGetTime(); - dmaAudioTime[perfIteration] = 0; -#endif - if (gResetTimer < 25) { - struct SPTask *spTask; - spTask = create_next_audio_frame_task(); - if (spTask != NULL) { - dispatch_audio_sptask(spTask); - } -#if PUPPYPRINT_DEBUG - profiler_update(audioTime, lastTime); - audioTime[perfIteration] -= dmaAudioTime[perfIteration]; - if (benchmarkLoop > 0 && benchOption == 1) { - benchmarkLoop--; - benchMark[benchmarkLoop] = osGetTime() - lastTime; - if (benchmarkLoop == 0) { - puppyprint_profiler_finished(); - break; - } - } else { - break; - } -#endif + profiler_audio_started(); + if (gResetTimer < 25) { + struct SPTask *spTask; + spTask = create_next_audio_frame_task(); + if (spTask != NULL) { + dispatch_audio_sptask(spTask); } -#if PUPPYPRINT_DEBUG } -#endif + profiler_audio_completed(); } } From ad3aa42efffcfcba670ceca11ad358d06853c9bc Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Mon, 2 May 2022 11:56:04 -0700 Subject: [PATCH 32/42] Fix construct_float by changing addiu to ori (#394) --- src/engine/math_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/math_util.c b/src/engine/math_util.c index 7732eec7..722d1246 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -1506,14 +1506,14 @@ static ALWAYS_INLINE float construct_float(const float f) : "=r"(r) : "K"(upper)); } else if ((i & 0xFFFF0000) == 0) { - __asm__ ("addiu %0, $0, %1" + __asm__ ("ori %0, $0, %1" : "+r"(r) : "K"(lower)); } else { __asm__ ("lui %0, %1" : "=r"(r) : "K"(upper)); - __asm__ ("addiu %0, %0, %1" + __asm__ ("ori %0, %0, %1" : "+r"(r) : "K"(lower)); } From fe6aee22e127868470e4b135864f0e7f714a6932 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Mon, 2 May 2022 12:36:59 -0700 Subject: [PATCH 33/42] Remove redundant snufit offset vector (fixes gcc11 compiler warning) (#395) --- include/object_fields.h | 6 +----- src/game/behaviors/snufit.inc.c | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/object_fields.h b/include/object_fields.h index b95e1792..5c2f275e 100644 --- a/include/object_fields.h +++ b/include/object_fields.h @@ -973,11 +973,7 @@ #define /*0x104*/ oSnufitBodyScalePeriod OBJECT_FIELD_S32(0x1F) #define /*0x108*/ oSnufitBodyBaseScale OBJECT_FIELD_S32(0x20) #define /*0x10C*/ oSnufitBullets OBJECT_FIELD_S32(0x21) -#define /*0x1AC*/ oSnufitOffsetVec OBJECT_FIELD_S16(0x49, 0) // start pos of s16 vec -#define /*0x1AC*/ oSnufitXOffset OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oSnufitYOffset OBJECT_FIELD_S16(0x49, 1) -#define /*0x1B0*/ oSnufitZOffset OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oSnufitBodyScale OBJECT_FIELD_S16(0x4A, 1) +#define /*0x1AC*/ oSnufitBodyScale OBJECT_FIELD_S16(0x49, 0) /* Spindel */ #define /*0x0F4*/ oSpindelMoveTimer OBJECT_FIELD_S32(0x1B) diff --git a/src/game/behaviors/snufit.inc.c b/src/game/behaviors/snufit.inc.c index dfd43474..19a6d153 100644 --- a/src/game/behaviors/snufit.inc.c +++ b/src/game/behaviors/snufit.inc.c @@ -38,7 +38,9 @@ Gfx *geo_snufit_move_mask(s32 callContext, struct GraphNode *node, UNUSED Mat4 * if (callContext == GEO_CONTEXT_RENDER) { struct Object *obj = (struct Object *) gCurGraphNodeObject; struct GraphNodeTranslationRotation *transNode = (struct GraphNodeTranslationRotation *) node->next; - vec3s_copy(transNode->translation, &obj->oSnufitOffsetVec); + transNode->translation[0] = 0; + transNode->translation[1] = -32; + transNode->translation[2] = obj->oSnufitRecoil + 180; } return NULL; @@ -147,8 +149,6 @@ void bhv_snufit_loop(void) { o->oPosY = o->oHomeY + 8.0f * coss(4000 * gGlobalTimer); o->oPosZ = o->oHomeZ + 100.0f * sins(o->oSnufitCircularPeriod); - o->oSnufitYOffset = -0x20; - o->oSnufitZOffset = o->oSnufitRecoil + 180; o->oSnufitBodyScale = (s16)(o->oSnufitBodyBaseScale + 666 + o->oSnufitBodyBaseScale * coss(o->oSnufitBodyScalePeriod)); From 4cfbc656a9a04eda9cf57129cd5f2f8bf5eacce3 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Thu, 19 May 2022 14:12:28 -0700 Subject: [PATCH 34/42] Re-implement FALL_DAMAGE_HEIGHT_SMALL usage in play_far_fall_sound (#407) --- src/game/mario_actions_airborne.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index 95051294..7103228f 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -28,7 +28,7 @@ void play_far_fall_sound(struct MarioState *m) { u32 action = m->action; if (!(action & ACT_FLAG_INVULNERABLE) && action != ACT_TWIRLING && action != ACT_FLYING && !(m->flags & MARIO_FALL_SOUND_PLAYED)) { - if (m->peakHeight - m->pos[1] > 1150.0f) { + if (m->peakHeight - m->pos[1] > FALL_DAMAGE_HEIGHT_SMALL) { play_sound(SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject); m->flags |= MARIO_FALL_SOUND_PLAYED; } From a1ab7c51f0f8f6d33fbdaf7e841f52de2a8b8933 Mon Sep 17 00:00:00 2001 From: KazeEmanuar <46371299+KazeEmanuar@users.noreply.github.com> Date: Thu, 9 Jun 2022 16:04:58 +0200 Subject: [PATCH 35/42] Made raycasts not hit backfaces * Update name of lighting engine branch in readme --- src/engine/math_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/math_util.c b/src/engine/math_util.c index 722d1246..c410e558 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -1339,8 +1339,8 @@ s32 ray_surface_intersect(Vec3f orig, Vec3f dir, f32 dir_length, struct Surface vec3f_cross(h, dir, e2); // Determine the cos(angle) difference between ray and surface normals. f32 det = vec3f_dot(e1, h); - // Check if we're perpendicular from the surface. - if ((det > -NEAR_ZERO) && (det < NEAR_ZERO)) return FALSE; + // Check if we're perpendicular or pointing away from the surface. + if (det < NEAR_ZERO) return FALSE; // Check if we're making contact with the surface. // Make f the inverse of the cos(angle) between ray and surface normals. f32 f = 1.0f / det; // invDet From c938bbf407e562168f728f94960eaf643a228154 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Thu, 9 Jun 2022 07:52:10 -0700 Subject: [PATCH 36/42] Add missing check for 9 vert shadows in LEGACY_SHADOW_IDS ifdef (#406) * Add missing check for 9 vert shadows in LEGACY_SHADOW_IDS ifdef * Add legacy shadow ids to ShadowType enum --- src/engine/graph_node.c | 10 +++++++--- src/game/shadow.h | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/engine/graph_node.c b/src/engine/graph_node.c index 95a9a06a..7143d9dd 100644 --- a/src/engine/graph_node.c +++ b/src/engine/graph_node.c @@ -430,11 +430,15 @@ struct GraphNodeShadow *init_graph_node_shadow(struct AllocOnlyPool *pool, if (graphNode != NULL) { #ifdef LEGACY_SHADOW_IDS - if (shadowType == 1 || shadowType == 2 || shadowType == 99) { + if (shadowType == LEGACY_SHADOW_CIRCLE_9_VERTS + || shadowType == LEGACY_SHADOW_CIRCLE_4_VERTS + || shadowType == LEGACY_SHADOW_CIRCLE_4_VERTS_FLAT_UNUSED + || shadowType == LEGACY_SHADOW_CIRCLE_PLAYER) { shadowType = SHADOW_CIRCLE; - } else if (shadowType == 11 || shadowType == 12) { + } else if (shadowType == LEGACY_SHADOW_SQUARE_SCALABLE + || shadowType == LEGACY_SHADOW_SQUARE_TOGGLABLE) { shadowType = SHADOW_SQUARE; - } else if (shadowType == 10) { + } else if (shadowType == LEGACY_SHADOW_SQUARE_PERMANENT) { shadowType = SHADOW_SQUARE_PERMANENT; } #endif diff --git a/src/game/shadow.h b/src/game/shadow.h index dd4049cb..f7670293 100644 --- a/src/game/shadow.h +++ b/src/game/shadow.h @@ -12,6 +12,14 @@ */ enum ShadowType { #ifdef LEGACY_SHADOW_IDS + LEGACY_SHADOW_CIRCLE_9_VERTS = 0, + LEGACY_SHADOW_CIRCLE_4_VERTS = 1, + LEGACY_SHADOW_CIRCLE_4_VERTS_FLAT_UNUSED = 2, + LEGACY_SHADOW_SQUARE_PERMANENT = 10, + LEGACY_SHADOW_SQUARE_SCALABLE = 11, + LEGACY_SHADOW_SQUARE_TOGGLABLE = 12, + LEGACY_SHADOW_CIRCLE_PLAYER = 99, + SHADOW_CIRCLE = 5, SHADOW_CIRCLE_PLAYER = SHADOW_CIRCLE, SHADOW_CIRCLE_4_VERTS = SHADOW_CIRCLE, From aa1a48afebcc0f680ffd20c6540da9dd4399512f Mon Sep 17 00:00:00 2001 From: Reonu Date: Tue, 28 Jun 2022 03:15:47 +0100 Subject: [PATCH 37/42] Fix shindou audio bzero size (#426) --- src/audio/heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/heap.c b/src/audio/heap.c index 7bd23fcc..46d601a6 100644 --- a/src/audio/heap.c +++ b/src/audio/heap.c @@ -169,7 +169,7 @@ void reset_bank_and_seq_load_status(void) { #ifdef VERSION_SH bzero(&gBankLoadStatus, sizeof(gBankLoadStatus)); bzero(&gUnkLoadStatus, sizeof(gUnkLoadStatus)); - bzero(&gSeqLoadStatus, sizeof(gBankLoadStatus)); + bzero(&gSeqLoadStatus, sizeof(gSeqLoadStatus)); #else bzero(&gBankLoadStatus, sizeof(gBankLoadStatus)); // Setting this array to zero is equivilent to SOUND_LOAD_STATUS_NOT_LOADED bzero(&gSeqLoadStatus, sizeof(gSeqLoadStatus)); // Same dealio From 1012fb79576ca466ca21a11af7d9125cd93c40a7 Mon Sep 17 00:00:00 2001 From: Reonu Date: Tue, 28 Jun 2022 03:17:44 +0100 Subject: [PATCH 38/42] Add extra hud defines (#409) * Added extra HUD defines * moved the defines to hud.h --- src/game/hud.c | 16 ++++------------ src/game/hud.h | 12 ++++++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/game/hud.c b/src/game/hud.c index 2138e067..292ccef8 100644 --- a/src/game/hud.c +++ b/src/game/hud.c @@ -26,11 +26,6 @@ * cannon reticle, and the unused keys. **/ -#define HUD_POWER_METER_X 140 -#define HUD_POWER_METER_EMPHASIZED_Y 166 -#define HUD_POWER_METER_Y 200 -#define HUD_POWER_METER_HIDDEN_Y 300 - #ifdef BREATH_METER // #ifdef DISABLE_LIVES // #define HUD_BREATH_METER_X 64 @@ -395,7 +390,6 @@ void render_hud_breath_meter(void) { } #endif -#define HUD_TOP_Y 209 /** * Renders the amount of lives Mario has. @@ -422,13 +416,11 @@ void render_debug_mode(void) { * Renders the amount of coins collected. */ void render_hud_coins(void) { - print_text(168, HUD_TOP_Y, "$"); // 'Coin' glyph - print_text(184, HUD_TOP_Y, "*"); // 'X' glyph - print_text_fmt_int(198, HUD_TOP_Y, "%d", gHudDisplay.coins); + print_text(HUD_COINS_X, HUD_TOP_Y, "$"); // 'Coin' glyph + print_text((HUD_COINS_X + 16), HUD_TOP_Y, "*"); // 'X' glyph + print_text_fmt_int((HUD_COINS_X + 30), HUD_TOP_Y, "%d", gHudDisplay.coins); } -#define HUD_STARS_X 78 - /** * Renders the amount of stars collected. * Disables "X" glyph when Mario has 100 stars or more. @@ -498,7 +490,7 @@ void set_hud_camera_status(s16 status) { */ void render_hud_camera_status(void) { Texture *(*cameraLUT)[6] = segmented_to_virtual(&main_hud_camera_lut); - s32 x = GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(54); + s32 x = GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(HUD_CAMERA_X); s32 y = 205; if (sCameraHUD.status == CAM_STATUS_NONE) { diff --git a/src/game/hud.h b/src/game/hud.h index 4eca7802..7a7146e3 100644 --- a/src/game/hud.h +++ b/src/game/hud.h @@ -4,6 +4,18 @@ #include #include +#define HUD_POWER_METER_X 140 +#define HUD_POWER_METER_EMPHASIZED_Y 166 +#define HUD_POWER_METER_Y 200 +#define HUD_POWER_METER_HIDDEN_Y 300 + +#define HUD_TOP_Y 209 +#define HUD_BOTTOM_Y 19 // Same height as the Lakitu icon + +#define HUD_COINS_X 168 +#define HUD_STARS_X 78 // This starts counting from the right edge +#define HUD_CAMERA_X 54 // This starts counting from the right edge + enum PowerMeterAnimation { POWER_METER_HIDDEN, POWER_METER_EMPHASIZED, From cf570b4406d62ecc59fd75af0181544955c9a84f Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com> Date: Tue, 28 Jun 2022 07:57:14 -0400 Subject: [PATCH 39/42] Added dcache coherency emulation test that disables instant input if passed (fixes Ares) (#427) --- src/game/game_init.c | 25 ++++++++++++++++++++++--- src/game/game_init.h | 1 + 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/game/game_init.c b/src/game/game_init.c index 3fd9ff70..cd09fa3c 100644 --- a/src/game/game_init.c +++ b/src/game/game_init.c @@ -1,4 +1,5 @@ #include +#include #include "sm64.h" #include "gfx_dimensions.h" @@ -45,6 +46,7 @@ OSContStatus gControllerStatuses[4]; OSContPad gControllerPads[4]; u8 gControllerBits; u8 gIsConsole = TRUE; // Needs to be initialized before audio_reset_session is called +u8 gCacheEmulated = TRUE; u8 gBorderHeight; #ifdef VANILLA_STYLE_CUSTOM_DEBUG u8 gCustomDebugMode; @@ -390,6 +392,21 @@ void draw_reset_bars(void) { osRecvMesg(&gGameVblankQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } +void check_cache_emulation() { + // Disable interrupts to ensure that nothing evicts the variable from cache while we're using it. + u32 saved = __osDisableInt(); + // Create a variable with an initial value of 1. This value will remain cached. + volatile u8 sCachedValue = 1; + // Overwrite the variable directly in RDRAM without going through cache. + // This should preserve its value of 1 in dcache if dcache is emulated correctly. + *(u8*)(K0_TO_K1(&sCachedValue)) = 0; + // Read the variable back from dcache, if it's still 1 then cache is emulated correctly. + // If it's zero, then dcache is not emulated correctly. + gCacheEmulated = sCachedValue; + // Restore interrupts + __osRestoreInt(saved); +} + /** * Initial settings for the first rendered frame. */ @@ -401,6 +418,7 @@ void render_init(void) { gIsConsole = FALSE; gBorderHeight = BORDER_HEIGHT_EMULATOR; gIsVC = IS_VC(); + check_cache_emulation(); } else { gIsConsole = TRUE; gBorderHeight = BORDER_HEIGHT_CONSOLE; @@ -418,7 +436,8 @@ void render_init(void) { // Skip incrementing the initial framebuffer index on emulators so that they display immediately as the Gfx task finishes // VC probably emulates osViSwapBuffer accurately so instant patch breaks VC compatibility - if (gIsConsole || gIsVC) { // Read RDP Clock Register, has a value of zero on emulators + // Currently, Ares passes the cache emulation test and has issues with single buffering so disable it there as well. + if (gIsConsole || gIsVC || gCacheEmulated) { sRenderingFramebuffer++; } gGlobalTimer++; @@ -456,8 +475,8 @@ void display_and_vsync(void) { #ifndef UNLOCK_FPS osRecvMesg(&gGameVblankQueue, &gMainReceivedMesg, OS_MESG_BLOCK); #endif - // Skip swapping buffers on emulator so that they display immediately as the Gfx task finishes - if (gIsConsole || gIsVC) { // Read RDP Clock Register, has a value of zero on emulators + // Skip swapping buffers on inaccurate emulators other than VC so that they display immediately as the Gfx task finishes + if (gIsConsole || gIsVC || gCacheEmulated) { if (++sRenderedFramebuffer == 3) { sRenderedFramebuffer = 0; } diff --git a/src/game/game_init.h b/src/game/game_init.h index 3ed0132e..36916060 100644 --- a/src/game/game_init.h +++ b/src/game/game_init.h @@ -48,6 +48,7 @@ extern u8 *gGfxPoolEnd; extern struct GfxPool *gGfxPool; extern u8 gControllerBits; extern u8 gIsConsole; +extern u8 gCacheEmulated; extern u8 gBorderHeight; #ifdef VANILLA_STYLE_CUSTOM_DEBUG extern u8 gCustomDebugMode; From e5af0e8ca5c158dfef90f938efe3e4d130813e05 Mon Sep 17 00:00:00 2001 From: Reonu Date: Tue, 28 Jun 2022 14:28:54 +0100 Subject: [PATCH 40/42] Add :Zone_Identifier files to gitignore (#428) --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index d5e1ae91..b5f4359e 100644 --- a/.gitignore +++ b/.gitignore @@ -2143,3 +2143,6 @@ lib/libs2d_engine.a # .orig files *.orig + +# :Zone_Identifier files +*Zone.Identifier From 1691e48326f322fd36149f491e74a904fe5c3823 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Tue, 28 Jun 2022 06:30:49 -0700 Subject: [PATCH 41/42] Fix inverted tilting pyramids when platform displacement 2 is disabled (#397) --- include/object_fields.h | 1 - .../behaviors/tilting_inverted_pyramid.inc.c | 41 +++++++++++-------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/include/object_fields.h b/include/object_fields.h index 5c2f275e..2ee01bcd 100644 --- a/include/object_fields.h +++ b/include/object_fields.h @@ -1043,7 +1043,6 @@ #define /*0x0F4*/ oTiltingPyramidNormalX OBJECT_FIELD_F32(O_TILTING_PYRAMID_NORMAL_X_INDEX) #define /*0x0F8*/ oTiltingPyramidNormalY OBJECT_FIELD_F32(O_TILTING_PYRAMID_NORMAL_Y_INDEX) #define /*0x0FC*/ oTiltingPyramidNormalZ OBJECT_FIELD_F32(O_TILTING_PYRAMID_NORMAL_Z_INDEX) -#define /*0x10C*/ oTiltingPyramidMarioOnPlatform OBJECT_FIELD_S32(0x21) /* Toad Message */ #define /*0x108*/ oToadMessageDialogId OBJECT_FIELD_U32(0x20) diff --git a/src/game/behaviors/tilting_inverted_pyramid.inc.c b/src/game/behaviors/tilting_inverted_pyramid.inc.c index 881bbdf6..5ae23a70 100644 --- a/src/game/behaviors/tilting_inverted_pyramid.inc.c +++ b/src/game/behaviors/tilting_inverted_pyramid.inc.c @@ -8,9 +8,8 @@ * Initialize the object's transform matrix with Y being up. */ void bhv_platform_normals_init(void) { - Mat4 *transform = &o->transform; vec3f_set(&o->oTiltingPyramidNormalVec, 0.0f, 1.0f, 0.0f); - mtxf_align_terrain_normal(*transform, &o->oTiltingPyramidNormalVec, &o->oPosVec, 0); + mtxf_align_terrain_normal(o->transform, &o->oTiltingPyramidNormalVec, &o->oPosVec, 0); } /** @@ -20,24 +19,32 @@ void bhv_platform_normals_init(void) { void bhv_tilting_inverted_pyramid_loop(void) { #ifndef PLATFORM_DISPLACEMENT_2 Vec3f posBeforeRotation, posAfterRotation; - // Mario's position - Vec3f m; + Vec3f marioPos, dist; #endif Vec3f targetNormal; Mat4 *transform = &o->transform; + s32 marioOnPlatform = (gMarioObject->platform == o); - if (gMarioObject->platform == o) { - vec3_diff(targetNormal, &gMarioObject->oPosVec, &o->oPosVec); + if (marioOnPlatform) { #ifndef PLATFORM_DISPLACEMENT_2 - vec3f_copy(m, gMarioStates[0].pos); - linear_mtxf_mul_vec3f(*transform, posBeforeRotation, targetNormal); + // Target the normal in Mario's direction + vec3_diff(dist, gMarioStates[0].pos, &o->oPosVec); + + // Get Mario's position before the rotation + vec3f_copy(marioPos, gMarioStates[0].pos); + + linear_mtxf_mul_vec3f(*transform, posBeforeRotation, dist); + targetNormal[0] = dist[0]; + targetNormal[2] = dist[2]; +#else // PLATFORM_DISPLACEMENT_2 + targetNormal[0] = gMarioStates[0].pos[0] - o->oPosX; + targetNormal[2] = gMarioStates[0].pos[2] - o->oPosZ; #endif targetNormal[1] = 500.0f; vec3f_normalize(targetNormal); - o->oTiltingPyramidMarioOnPlatform = TRUE; } else { + // Target normal is directly upwards when Mario is not on the platform. vec3f_set(targetNormal, 0.0f, 1.0f, 0.0f); - o->oTiltingPyramidMarioOnPlatform = FALSE; } // Approach the normals by 0.01f towards the new goal, then create a transform matrix and orient the object. @@ -45,16 +52,16 @@ void bhv_tilting_inverted_pyramid_loop(void) { approach_f32_symmetric_bool(&o->oTiltingPyramidNormalX, targetNormal[0], 0.01f); approach_f32_symmetric_bool(&o->oTiltingPyramidNormalY, targetNormal[1], 0.01f); approach_f32_symmetric_bool(&o->oTiltingPyramidNormalZ, targetNormal[2], 0.01f); - mtxf_align_terrain_normal(*transform, &o->oTiltingPyramidNormalVec, &o->oPosVec, 0); + mtxf_align_terrain_normal(*transform, &o->oTiltingPyramidNormalVec, &o->oPosVec, 0x0); #ifndef PLATFORM_DISPLACEMENT_2 // If Mario is on the platform, adjust his position for the platform tilt. - if (o->oTiltingPyramidMarioOnPlatform) { - linear_mtxf_mul_vec3f(*transform, posAfterRotation, targetNormal); - m[0] += posAfterRotation[0] - posBeforeRotation[0]; - m[1] += posAfterRotation[1] - posBeforeRotation[1]; - m[2] += posAfterRotation[2] - posBeforeRotation[2]; - vec3f_copy(gMarioStates[0].pos, m); + if (marioOnPlatform) { + linear_mtxf_mul_vec3f(*transform, posAfterRotation, dist); + marioPos[0] += posAfterRotation[0] - posBeforeRotation[0]; + marioPos[1] += posAfterRotation[1] - posBeforeRotation[1]; + marioPos[2] += posAfterRotation[2] - posBeforeRotation[2]; + vec3f_copy(gMarioStates[0].pos, marioPos); } #endif From 62d6ee135f3f8e5fc9a4764885dc5cdb9d54ad59 Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com> Date: Tue, 28 Jun 2022 09:43:19 -0400 Subject: [PATCH 42/42] HackerSM64 2.0.2 release --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 0ac852dd..f3b15f3f 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -v2.0.1 +v2.0.2