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
+14 -14
View File
@@ -58,7 +58,7 @@ draw
CenterPrint ()
SlowPrint ()
Screen_Update ();
Con_Printf ();
console::info ();
net
turn off messages option
@@ -653,9 +653,9 @@ void SCR_SetUpToDrawConsole(void) {
return; // never a console with loading plaque
// decide on the height of the console
con_forcedup = !cl.worldmodel || cls.signon != SIGNONS;
console::forced_up = !cl.worldmodel || cls.signon != SIGNONS;
if (con_forcedup) {
if (console::forced_up) {
scr_conlines = glheight; //full screen //johnfitz -- glheight instead of vid.height
scr_con_current = scr_conlines;
} else if (key_dest == key_console)
@@ -681,7 +681,7 @@ void SCR_SetUpToDrawConsole(void) {
if (clearconsole++ < vid.numpages)
Sbar_Changed();
if (!con_forcedup && scr_con_current)
if (!console::forced_up && scr_con_current)
scr_tileclear_updates = 0; //johnfitz
}
@@ -710,9 +710,9 @@ SCREEN SHOTS
*/
static void SCR_ScreenShot_Usage(void) {
Con_Printf("usage: screenshot <format> <quality>\n");
Con_Printf(" format must be \"png\" or \"tga\" or \"jpg\"\n");
Con_Printf(" quality must be 1-100\n");
console::info("usage: screenshot <format> <quality>\n");
console::info(" format must be \"png\" or \"tga\" or \"jpg\"\n");
console::info(" quality must be 1-100\n");
return;
}
@@ -761,13 +761,13 @@ void SCR_ScreenShot_f(void) {
break; // file doesn't exist
}
if (i == 10000) {
Con_Printf("SCR_ScreenShot_f: Couldn't find an unused filename\n");
console::info("SCR_ScreenShot_f: Couldn't find an unused filename\n");
return;
}
//get data
if (!(buffer = (byte *) malloc(glwidth * glheight * 3))) {
Con_Printf("SCR_ScreenShot_f: Couldn't allocate memory\n");
console::info("SCR_ScreenShot_f: Couldn't allocate memory\n");
return;
}
@@ -785,9 +785,9 @@ void SCR_ScreenShot_f(void) {
ok = false;
if (ok)
Con_Printf("Wrote %s\n", imagename);
console::info("Wrote %s\n", imagename);
else
Con_Printf("SCR_ScreenShot_f: Couldn't create %s\n", imagename);
console::info("SCR_ScreenShot_f: Couldn't create %s\n", imagename);
free(buffer);
}
@@ -988,12 +988,12 @@ void SCR_UpdateScreen(void) {
if (scr_disabled_for_loading) {
if (realtime - scr_disabled_time > 60) {
scr_disabled_for_loading = false;
Con_Printf("load failed.\n");
console::info("load failed.\n");
} else
return;
}
if (!scr_initialized || !con_initialized)
if (!scr_initialized || !console::initialized)
return; // not initialized yet
@@ -1019,7 +1019,7 @@ void SCR_UpdateScreen(void) {
if (scr_drawdialog) //new game confirm
{
if (con_forcedup)
if (console::forced_up)
Draw_ConsoleBackground();
else
Sbar_Draw();