manuals tidy tier 3a: rondes, ternaris, anyofallof, padding, etc.

This commit is contained in:
2026-05-14 19:24:02 +02:00
parent 0b82be193f
commit a48fe51f73
13 changed files with 54 additions and 32 deletions
+6 -2
View File
@@ -12,7 +12,7 @@
#include <vector> // Para std::vector
#define STB_VORBIS_HEADER_ONLY
#include "external/stb_vorbis.c" // Para stb_vorbis_open_memory i streaming
#include "external/stb_vorbis.c" // NOLINT(bugprone-suspicious-include): stb header-only library
// Deleter stateless per a buffers reservats amb `SDL_malloc` / `SDL_LoadWAV*`.
// Compatible amb `std::unique_ptr<Uint8[], SDLFreeDeleter>` — zero size
@@ -57,10 +57,10 @@ struct JA_Sound_t {
struct JA_Channel_t {
JA_Sound_t* sound{nullptr};
SDL_AudioStream* stream{nullptr};
int pos{0};
int times{0};
int group{0};
SDL_AudioStream* stream{nullptr};
JA_Channel_state state{JA_CHANNEL_FREE};
};
@@ -339,6 +339,10 @@ inline auto JA_LoadMusic(const char* filename) -> JA_Music_t* {
fseek(f, 0, SEEK_END);
long fsize = ftell(f);
fseek(f, 0, SEEK_SET);
if (fsize <= 0) {
fclose(f);
return nullptr;
}
auto* buffer = static_cast<Uint8*>(malloc(fsize + 1));
if (buffer == nullptr) {
fclose(f);