Overhaul to console structure, a bit

This commit is contained in:
iikorni
2026-08-30 00:50:23 -05:00
parent de75b014b3
commit 216dd1aecd
70 changed files with 2081 additions and 2260 deletions
+9 -9
View File
@@ -72,7 +72,7 @@ static int WAV_ReadChunkInfo(FILE *f, char *name)
len = FGetLittleLong(f);
if (len < 0)
{
Con_Printf("WAV: Negative chunk length\n");
console::info("WAV: Negative chunk length\n");
return -1;
}
@@ -120,14 +120,14 @@ static bool WAV_ReadRIFFHeader(const char *name, FILE *file, snd_info_t *info)
strncmp(dump, "RIFF", 4) != 0 ||
strncmp(&dump[8], "WAVE", 4) != 0)
{
Con_Printf("%s is missing RIFF/WAVE chunks\n", name);
console::info("%s is missing RIFF/WAVE chunks\n", name);
return false;
}
/* Scan for the format chunk */
if ((fmtlen = WAV_FindRIFFChunk(file, "fmt ")) < 0)
{
Con_Printf("%s is missing fmt chunk\n", name);
console::info("%s is missing fmt chunk\n", name);
return false;
}
@@ -135,7 +135,7 @@ static bool WAV_ReadRIFFHeader(const char *name, FILE *file, snd_info_t *info)
wav_format = FGetLittleShort(file);
if (wav_format != WAV_FORMAT_PCM)
{
Con_Printf("%s is not Microsoft PCM format\n", name);
console::info("%s is not Microsoft PCM format\n", name);
return false;
}
@@ -147,7 +147,7 @@ static bool WAV_ReadRIFFHeader(const char *name, FILE *file, snd_info_t *info)
if (info->bits != 8 && info->bits != 16)
{
Con_Printf("%s is not 8 or 16 bit\n", name);
console::info("%s is not 8 or 16 bit\n", name);
return false;
}
@@ -164,20 +164,20 @@ static bool WAV_ReadRIFFHeader(const char *name, FILE *file, snd_info_t *info)
/* Scan for the data chunk */
if ((info->size = WAV_FindRIFFChunk(file, "data")) < 0)
{
Con_Printf("%s is missing data chunk\n", name);
console::info("%s is missing data chunk\n", name);
return false;
}
if (info->channels != 1 && info->channels != 2)
{
Con_Printf("Unsupported number of channels %d in %s\n",
console::info("Unsupported number of channels %d in %s\n",
info->channels, name);
return false;
}
info->samples = (info->size / info->width) / info->channels;
if (info->samples == 0)
{
Con_Printf("%s has zero samples\n", name);
console::info("%s has zero samples\n", name);
return false;
}
@@ -203,7 +203,7 @@ static bool S_WAV_CodecOpenStream(snd_stream_t *stream)
stream->fh.start = ftell(stream->fh.file); /* reset to data position */
if (stream->fh.start - start + stream->info.size > stream->fh.length)
{
Con_Printf("%s data size mismatch\n", stream->name);
console::info("%s data size mismatch\n", stream->name);
return false;
}