diff --git a/.gitignore b/.gitignore index d107827..67e2e7d 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,7 @@ # Editor/LSP tooling caches /.cache/ /.clang-tidy-db/ +/.codechecker/ # CMake internals CMakeCache.txt diff --git a/AGENTS.md b/AGENTS.md index ff537bf..8b3a551 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,13 +50,13 @@ snakePlus/ │ ├── sounds/ # Audio assets (built into soundbank by mmutil) │ ├── 0rigin.xm # FastTracker II background music track (MOD_0RIGIN) -│ ├── 273792__pacomav__plop.wav # Movement plop SFX -│ ├── 332629__treasuresounds__item-pickup.wav # Apple pickup SFX -│ ├── Boom.wav # Rotten / Cursed apple boom SFX -│ ├── denied.wav # Reverse-direction denied thud SFX (synthesized) -│ ├── 167126__crisstanza__unpause.wav # Unpause SFX -│ ├── 167127__crisstanza__pause.wav # Pause SFX -│ └── 73750__timbre__remix-of-benboncan-sad-trombone-more-wah-bright-de-clicked.wav # Fail SFX +│ ├── Boom.wav # Rotten / Cursed apple boom SFX (SFX_BOOM) +│ ├── denied.wav # Reverse-direction denied thud SFX (SFX_DENIED) +│ ├── pause.wav # Pause SFX (SFX_PAUSE) +│ ├── pickup.wav # Apple pickup SFX (SFX_PICKUP) +│ ├── plop.wav # Movement plop SFX (SFX_PLOP) +│ ├── sad_trombone.wav # Fail SFX (SFX_SAD_TROMBONE) +│ └── unpause.wav # Unpause SFX (SFX_UNPAUSE) │ ├── tools/ # Tooling & automation scripts │ └── clang_tidy_watch.sh # File watcher script running clang-tidy on file change @@ -72,7 +72,8 @@ snakePlus/ │ ├── .clang-tidy # Clang-tidy rules and naming conventions ├── .clangd # Clangd LSP configuration and system include paths -└── .gitignore # Git ignore rules for build artifacts and caches +├── .gitignore # Git ignore rules for build artifacts and caches +└── codechecker_skip.txt # Skipfile for CodeChecker to omit external devkitPro headers ``` --- diff --git a/codechecker_skip.txt b/codechecker_skip.txt new file mode 100644 index 0000000..cfc1f8c --- /dev/null +++ b/codechecker_skip.txt @@ -0,0 +1,3 @@ +# Ignore external devkitPro toolchain and system library headers +-/opt/devkitpro/* ++* diff --git a/sounds/167127__crisstanza__pause.wav b/sounds/pause.wav similarity index 100% rename from sounds/167127__crisstanza__pause.wav rename to sounds/pause.wav diff --git a/sounds/332629__treasuresounds__item-pickup.wav b/sounds/pickup.wav similarity index 100% rename from sounds/332629__treasuresounds__item-pickup.wav rename to sounds/pickup.wav diff --git a/sounds/273792__pacomav__plop.wav b/sounds/plop.wav similarity index 100% rename from sounds/273792__pacomav__plop.wav rename to sounds/plop.wav diff --git a/sounds/73750__timbre__remix-of-benboncan-sad-trombone-more-wah-bright-de-clicked.wav b/sounds/sad_trombone.wav similarity index 100% rename from sounds/73750__timbre__remix-of-benboncan-sad-trombone-more-wah-bright-de-clicked.wav rename to sounds/sad_trombone.wav diff --git a/sounds/167126__crisstanza__unpause.wav b/sounds/unpause.wav similarity index 100% rename from sounds/167126__crisstanza__unpause.wav rename to sounds/unpause.wav diff --git a/source/game_audio.cpp b/source/game_audio.cpp index 51ae7e6..3dc15fe 100644 --- a/source/game_audio.cpp +++ b/source/game_audio.cpp @@ -8,16 +8,16 @@ void audio_setup(AudioContext &audio) { mmLoad(MOD_0RIGIN); - mmLoadEffect(SFX_332629__TREASURESOUNDS__ITEM_PICKUP); + mmLoadEffect(SFX_PICKUP); mmLoadEffect(SFX_BOOM); - mmLoadEffect(SFX_167127__CRISSTANZA__PAUSE); - mmLoadEffect(SFX_167126__CRISSTANZA__UNPAUSE); - mmLoadEffect(SFX_273792__PACOMAV__PLOP); - mmLoadEffect(SFX_73750__TIMBRE__REMIX_OF_BENBONCAN_SAD_TROMBONE_MORE_WAH_BRIGHT_DE_CLICKED); + mmLoadEffect(SFX_PAUSE); + mmLoadEffect(SFX_UNPAUSE); + mmLoadEffect(SFX_PLOP); + mmLoadEffect(SFX_SAD_TROMBONE); mmLoadEffect(SFX_DENIED); audio.sfx_pickup = { - { SFX_332629__TREASURESOUNDS__ITEM_PICKUP }, + { SFX_PICKUP }, static_cast(1.0F * (1 << 10)), 0, 255, @@ -33,7 +33,7 @@ void audio_setup(AudioContext &audio) { }; audio.sfx_pause = { - { SFX_167127__CRISSTANZA__PAUSE }, + { SFX_PAUSE }, static_cast(1.0F * (1 << 10)), 2, 255, @@ -41,7 +41,7 @@ void audio_setup(AudioContext &audio) { }; audio.sfx_unpause = { - { SFX_167126__CRISSTANZA__UNPAUSE }, + { SFX_UNPAUSE }, static_cast(1.0F * (1 << 10)), 3, 255, @@ -49,7 +49,7 @@ void audio_setup(AudioContext &audio) { }; audio.sfx_plop = { - { SFX_273792__PACOMAV__PLOP }, + { SFX_PLOP }, static_cast(1.0F * (1 << 10)), 4, 128, @@ -57,7 +57,7 @@ void audio_setup(AudioContext &audio) { }; audio.sfx_fail = { - { SFX_73750__TIMBRE__REMIX_OF_BENBONCAN_SAD_TROMBONE_MORE_WAH_BRIGHT_DE_CLICKED }, + { SFX_SAD_TROMBONE }, static_cast(1.0F * (1 << 10)), 4, 255, diff --git a/source/game_render.cpp b/source/game_render.cpp index 813803a..acee80c 100644 --- a/source/game_render.cpp +++ b/source/game_render.cpp @@ -164,21 +164,18 @@ void draw_game_over_screen(const GameState &state) { iprintf("\x1b[8;4HDifficulty: %s", state.hardMode ? "Hard " : "Normal"); iprintf("\x1b[10;4HCause of Defeat:"); - const char *cause = "Collision"; - switch (state.gameOverReason) { - case GameOverReason::SelfCollision: - cause = "Bite Collision (Hit Body)"; - break; - case GameOverReason::BarrierCollision: - cause = "Energy Barrier Impact"; - break; - case GameOverReason::RottenAppleDepleted: - cause = "Depleted by Rotten Apple"; - break; - default: - cause = "Collision"; - break; - } + const char *const cause = [&state]() { + switch (state.gameOverReason) { + case GameOverReason::SelfCollision: + return "Bite Collision (Hit Body)"; + case GameOverReason::BarrierCollision: + return "Energy Barrier Impact"; + case GameOverReason::RottenAppleDepleted: + return "Depleted by Rotten Apple"; + default: + return "Collision"; + } + }(); iprintf("\x1b[11;4H %s", cause); iprintf("\x1b[14;2H----------------------------");