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
/.cache/
/.clang-tidy-db/
/.codechecker/
# CMake internals
CMakeCache.txt
+9 -8
View File
@@ -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
```
---
+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);
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<int>(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<int>(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<int>(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<int>(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<int>(1.0F * (1 << 10)),
4,
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[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----------------------------");