fix: resolve CodeChecker findings and add CodeChecker ignore rules

- Refactor cause in draw_game_over_screen to an immediately invoked lambda, eliminating dead store warning
- Rename sound effect files to standard-compliant names without double underscores to prevent reserved macro warnings in soundbank.h
- Update source/game_audio.cpp to use clean SFX_* macro identifiers
- Add codechecker_skip.txt to ignore external devkitPro toolchain headers
- Ignore .codechecker/ output artifacts directory in .gitignore
- Update AGENTS.md file tree and sound asset references
This commit is contained in:
phillip committed 2026-10-04 01:51:10 +02:00
1 parent f4c77b32d1
commit d30c0d0330
10 files changed
+35 -33

No files matched your search

+1
View File
@@ -55,6 +55,7 @@
# Editor/LSP tooling caches # Editor/LSP tooling caches
/.cache/ /.cache/
/.clang-tidy-db/ /.clang-tidy-db/
/.codechecker/
# CMake internals # CMake internals
CMakeCache.txt CMakeCache.txt
+9 -8
View File
@@ -50,13 +50,13 @@ snakePlus/
│ │
├── sounds/ # Audio assets (built into soundbank by mmutil) ├── sounds/ # Audio assets (built into soundbank by mmutil)
│ ├── 0rigin.xm # FastTracker II background music track (MOD_0RIGIN) │ ├── 0rigin.xm # FastTracker II background music track (MOD_0RIGIN)
│ ├── 273792__pacomav__plop.wav # Movement plop SFX │ ├── Boom.wav # Rotten / Cursed apple boom SFX (SFX_BOOM)
│ ├── 332629__treasuresounds__item-pickup.wav # Apple pickup SFX │ ├── denied.wav # Reverse-direction denied thud SFX (SFX_DENIED)
│ ├── Boom.wav # Rotten / Cursed apple boom SFX │ ├── pause.wav # Pause SFX (SFX_PAUSE)
│ ├── denied.wav # Reverse-direction denied thud SFX (synthesized) │ ├── pickup.wav # Apple pickup SFX (SFX_PICKUP)
│ ├── 167126__crisstanza__unpause.wav # Unpause SFX │ ├── plop.wav # Movement plop SFX (SFX_PLOP)
│ ├── 167127__crisstanza__pause.wav # Pause SFX │ ├── sad_trombone.wav # Fail SFX (SFX_SAD_TROMBONE)
│ └── 73750__timbre__remix-of-benboncan-sad-trombone-more-wah-bright-de-clicked.wav # Fail SFX │ └── unpause.wav # Unpause SFX (SFX_UNPAUSE)
│ │
├── tools/ # Tooling & automation scripts ├── tools/ # Tooling & automation scripts
│ └── clang_tidy_watch.sh # File watcher script running clang-tidy on file change │ └── 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 ├── .clang-tidy # Clang-tidy rules and naming conventions
├── .clangd # Clangd LSP configuration and system include paths ├── .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
``` ```
--- ---
+3
View File
@@ -0,0 +1,3 @@
# Ignore external devkitPro toolchain and system library headers
-/opt/devkitpro/*
+*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+10 -10
View File
@@ -8,16 +8,16 @@ void audio_setup(AudioContext &audio) {
mmLoad(MOD_0RIGIN); mmLoad(MOD_0RIGIN);
mmLoadEffect(SFX_332629__TREASURESOUNDS__ITEM_PICKUP); mmLoadEffect(SFX_PICKUP);
mmLoadEffect(SFX_BOOM); mmLoadEffect(SFX_BOOM);
mmLoadEffect(SFX_167127__CRISSTANZA__PAUSE); mmLoadEffect(SFX_PAUSE);
mmLoadEffect(SFX_167126__CRISSTANZA__UNPAUSE); mmLoadEffect(SFX_UNPAUSE);
mmLoadEffect(SFX_273792__PACOMAV__PLOP); mmLoadEffect(SFX_PLOP);
mmLoadEffect(SFX_73750__TIMBRE__REMIX_OF_BENBONCAN_SAD_TROMBONE_MORE_WAH_BRIGHT_DE_CLICKED); mmLoadEffect(SFX_SAD_TROMBONE);
mmLoadEffect(SFX_DENIED); mmLoadEffect(SFX_DENIED);
audio.sfx_pickup = { audio.sfx_pickup = {
{ SFX_332629__TREASURESOUNDS__ITEM_PICKUP }, { SFX_PICKUP },
static_cast<int>(1.0F * (1 << 10)), static_cast<int>(1.0F * (1 << 10)),
0, 0,
255, 255,
@@ -33,7 +33,7 @@ void audio_setup(AudioContext &audio) {
}; };
audio.sfx_pause = { audio.sfx_pause = {
{ SFX_167127__CRISSTANZA__PAUSE }, { SFX_PAUSE },
static_cast<int>(1.0F * (1 << 10)), static_cast<int>(1.0F * (1 << 10)),
2, 2,
255, 255,
@@ -41,7 +41,7 @@ void audio_setup(AudioContext &audio) {
}; };
audio.sfx_unpause = { audio.sfx_unpause = {
{ SFX_167126__CRISSTANZA__UNPAUSE }, { SFX_UNPAUSE },
static_cast<int>(1.0F * (1 << 10)), static_cast<int>(1.0F * (1 << 10)),
3, 3,
255, 255,
@@ -49,7 +49,7 @@ void audio_setup(AudioContext &audio) {
}; };
audio.sfx_plop = { audio.sfx_plop = {
{ SFX_273792__PACOMAV__PLOP }, { SFX_PLOP },
static_cast<int>(1.0F * (1 << 10)), static_cast<int>(1.0F * (1 << 10)),
4, 4,
128, 128,
@@ -57,7 +57,7 @@ void audio_setup(AudioContext &audio) {
}; };
audio.sfx_fail = { audio.sfx_fail = {
{ SFX_73750__TIMBRE__REMIX_OF_BENBONCAN_SAD_TROMBONE_MORE_WAH_BRIGHT_DE_CLICKED }, { SFX_SAD_TROMBONE },
static_cast<int>(1.0F * (1 << 10)), static_cast<int>(1.0F * (1 << 10)),
4, 4,
255, 255,
+12 -15
View File
@@ -164,21 +164,18 @@ void draw_game_over_screen(const GameState &state) {
iprintf("\x1b[8;4HDifficulty: %s", state.hardMode ? "Hard " : "Normal"); iprintf("\x1b[8;4HDifficulty: %s", state.hardMode ? "Hard " : "Normal");
iprintf("\x1b[10;4HCause of Defeat:"); iprintf("\x1b[10;4HCause of Defeat:");
const char *cause = "Collision"; const char *const cause = [&state]() {
switch (state.gameOverReason) { switch (state.gameOverReason) {
case GameOverReason::SelfCollision: case GameOverReason::SelfCollision:
cause = "Bite Collision (Hit Body)"; return "Bite Collision (Hit Body)";
break; case GameOverReason::BarrierCollision:
case GameOverReason::BarrierCollision: return "Energy Barrier Impact";
cause = "Energy Barrier Impact"; case GameOverReason::RottenAppleDepleted:
break; return "Depleted by Rotten Apple";
case GameOverReason::RottenAppleDepleted: default:
cause = "Depleted by Rotten Apple"; return "Collision";
break; }
default: }();
cause = "Collision";
break;
}
iprintf("\x1b[11;4H %s", cause); iprintf("\x1b[11;4H %s", cause);
iprintf("\x1b[14;2H----------------------------"); iprintf("\x1b[14;2H----------------------------");