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
+13 -13
View File
@@ -109,7 +109,7 @@ namespace music {
if (command::argc() == 2) {
play(*command::argv(1));
} else {
Con_Printf("music <musicfile>\n");
console::info("music <musicfile>\n");
}
}
@@ -136,9 +136,9 @@ namespace music {
}
if (bgmloop)
Con_Printf("Music will be looped\n");
console::info("Music will be looped\n");
else
Con_Printf("Music will not be looped\n");
console::info("Music will not be looped\n");
}
void _stop() {
@@ -147,7 +147,7 @@ namespace music {
void _jump() {
if (command::argc() != 2) {
Con_Printf("music_jump <ordernum>\n");
console::info("music_jump <ordernum>\n");
} else if (bgmstream) {
S_CodecJumpToOrder(bgmstream, static_cast<int>(std::strtol(command::argv(1)->c_str(), nullptr, 10)));
}
@@ -180,7 +180,7 @@ namespace music {
}
}
Con_Printf("Couldn't handle music file %s\n", filename.c_str());
console::info("Couldn't handle music file %s\n", filename.c_str());
}
void update_stream() {
@@ -239,14 +239,14 @@ namespace music {
{
if (bgmloop) {
if (did_rewind) {
Con_Printf("Stream keeps returning EOF.\n");
console::info("Stream keeps returning EOF.\n");
stop();
return;
}
res = S_CodecRewindStream(bgmstream);
if (res != 0) {
Con_Printf("Stream seek error (%i), stopping.\n", res);
console::info("Stream seek error (%i), stopping.\n", res);
stop();
return;
}
@@ -257,7 +257,7 @@ namespace music {
}
} else /* res < 0: some read error */
{
Con_Printf("Stream read error (%i), stopping.\n", res);
console::info("Stream read error (%i), stopping.\n", res);
stop();
return;
}
@@ -312,7 +312,7 @@ namespace music {
return;
if (filename.empty()) {
Con_DPrintf("null music file name\n");
console::debug("null music file name\n");
return;
}
@@ -332,7 +332,7 @@ namespace music {
}
}
if (chosen == nullptr) {
Con_Printf("Unhandled extension for %s\n", filename.c_str());
console::info("Unhandled extension for %s\n", filename.c_str());
return;
}
q_snprintf(tmp, sizeof(tmp), "%s/%s", chosen->dir, filename.c_str());
@@ -350,7 +350,7 @@ namespace music {
break;
}
Con_Printf("Couldn't handle music file %s\n", filename.c_str());
console::info("Couldn't handle music file %s\n", filename.c_str());
}
void stop() {
@@ -433,13 +433,13 @@ namespace music {
}
if (ext == nullptr)
Con_Printf("Couldn't find a cdrip for track %d\n", static_cast<int>(track));
console::info("Couldn't find a cdrip for track %d\n", static_cast<int>(track));
else {
q_snprintf(tmp, sizeof(tmp), "%s/track%02d.%s",
MUSIC_DIRNAME, static_cast<int>(track), ext);
bgmstream = S_CodecOpenStreamType(tmp, type, bgmloop);
if (!bgmstream)
Con_Printf("Couldn't handle music file %s\n", tmp);
console::info("Couldn't handle music file %s\n", tmp);
}
}
}