Skip to content

Commit

Permalink
COMMON: Add Scale parameter to Con_DrawConsole
Browse files Browse the repository at this point in the history
Also removes the ifdef previously added to Con_DrawConsole
  • Loading branch information
Fancy2209 committed Feb 14, 2025
1 parent fa6b18d commit ff47fae
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
11 changes: 5 additions & 6 deletions source/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ The typing input line at the bottom should only be drawn if typing is allowed
================
*/
qboolean console_enabled;
void Con_DrawConsole (int lines, qboolean drawinput)
void Con_DrawConsole (int lines, qboolean drawinput, int scale)
{
int i, x, y;
int rows;
Expand All @@ -604,6 +604,9 @@ void Con_DrawConsole (int lines, qboolean drawinput)
if (!console_enabled && !developer.value)
return;

// Console will look off without this
lines = lines/scale;

// draw the text
con_vislines = lines;

Expand All @@ -618,11 +621,7 @@ void Con_DrawConsole (int lines, qboolean drawinput)
text = con_text + (j % con_totallines)*con_linewidth;

for (x=0 ; x<con_linewidth ; x++)
#ifndef __WII__
Draw_Character ( (x+1)<<3, y, text[x]);
#else
Draw_CharacterRGBA (((x+1)<<3)*1.5, y*1.5, text[x], 255, 255, 255, 255, 1.5);
#endif
Draw_CharacterRGBA ( ((x+1)<<3)*scale, y*scale, text[x], 255, 255, 255, 255, 1.5);
}

// draw the input prompt, user text, and cursor if desired
Expand Down
2 changes: 1 addition & 1 deletion source/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void Con_DrawCharacter (int cx, int line, int num);

void Con_CheckResize (void);
void Con_Init (void);
void Con_DrawConsole (int lines, qboolean drawinput);
void Con_DrawConsole (int lines, qboolean drawinput, int scale);
void Con_Print (char *txt);
void Con_Printf (char *fmt, ...);
void Con_DPrintf (char *fmt, ...);
Expand Down
2 changes: 1 addition & 1 deletion source/ctr/gl/gl_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ void SCR_DrawConsole (void)
if (scr_con_current)
{
scr_copyeverything = 1;
Con_DrawConsole (scr_con_current, true);
Con_DrawConsole (scr_con_current, true, 1);
clearconsole = 0;
}
else
Expand Down
2 changes: 1 addition & 1 deletion source/psp/gu/gu_screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ void SCR_DrawConsole (void)
if (scr_con_current)
{
scr_copyeverything = 1;
Con_DrawConsole (scr_con_current, qtrue);
Con_DrawConsole (scr_con_current, qtrue, 1);
clearconsole = 0;
}
else
Expand Down
2 changes: 1 addition & 1 deletion source/wii/gx/gx_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ void SCR_DrawConsole (void)
if (scr_con_current)
{
scr_copyeverything = 1;
Con_DrawConsole (scr_con_current/1.5, true);
Con_DrawConsole (scr_con_current, true, 1.5);
clearconsole = 0;
}

Expand Down

0 comments on commit ff47fae

Please sign in to comment.