mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
gl_draw.c: whitespace
draw.c: (both sw and sw32) fix Draw_nString to be similar to gl_draw.c
This commit is contained in:
parent
140f806d40
commit
6132049bf4
3 changed files with 7 additions and 8 deletions
|
@ -361,8 +361,7 @@ Draw_nString (int x, int y, const char *str, int count)
|
||||||
qfglBegin (GL_QUADS);
|
qfglBegin (GL_QUADS);
|
||||||
|
|
||||||
while (count-- && *str) {
|
while (count-- && *str) {
|
||||||
if ((num = *str++) != 32) // Don't render spaces
|
if ((num = *str++) != 32) { // Don't render spaces
|
||||||
{
|
|
||||||
frow = (num >> 4) * CELL_SIZE;
|
frow = (num >> 4) * CELL_SIZE;
|
||||||
fcol = (num & 15) * CELL_SIZE;
|
fcol = (num & 15) * CELL_SIZE;
|
||||||
|
|
||||||
|
@ -375,7 +374,7 @@ Draw_nString (int x, int y, const char *str, int count)
|
||||||
qfglTexCoord2f (fcol, frow + CELL_SIZE);
|
qfglTexCoord2f (fcol, frow + CELL_SIZE);
|
||||||
qfglVertex2f (x, y + 8);
|
qfglVertex2f (x, y + 8);
|
||||||
}
|
}
|
||||||
x+=8;
|
x += 8;
|
||||||
}
|
}
|
||||||
qfglEnd ();
|
qfglEnd ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,7 +198,7 @@ Draw_Init (void)
|
||||||
It can be clipped to the top of the screen to allow the console to be
|
It can be clipped to the top of the screen to allow the console to be
|
||||||
smoothly scrolled off.
|
smoothly scrolled off.
|
||||||
*/
|
*/
|
||||||
void
|
inline void
|
||||||
Draw_Character (int x, int y, unsigned int num)
|
Draw_Character (int x, int y, unsigned int num)
|
||||||
{
|
{
|
||||||
byte *dest;
|
byte *dest;
|
||||||
|
@ -265,9 +265,9 @@ Draw_String (int x, int y, const char *str)
|
||||||
void
|
void
|
||||||
Draw_nString (int x, int y, const char *str, int count)
|
Draw_nString (int x, int y, const char *str, int count)
|
||||||
{
|
{
|
||||||
int size;
|
while (count-- && *str) {
|
||||||
for (size = 0; size < count; size++, x +=8) {
|
|
||||||
Draw_Character (x, y, *str++);
|
Draw_Character (x, y, *str++);
|
||||||
|
x += 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -327,9 +327,9 @@ Draw_String (int x, int y, const char *str)
|
||||||
void
|
void
|
||||||
Draw_nString (int x, int y, const char *str, int count)
|
Draw_nString (int x, int y, const char *str, int count)
|
||||||
{
|
{
|
||||||
int size;
|
while (count-- && *str) {
|
||||||
for (size = 0; size < count; size++, x += 8) {
|
|
||||||
Draw_Character (x, y, *str++);
|
Draw_Character (x, y, *str++);
|
||||||
|
x += 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue