Whitespace, remove misleading .png extension from external conchars loader.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2003-09-20 04:29:42 +00:00
parent 9027648721
commit dc84232079

View file

@ -127,11 +127,11 @@ Draw_InitText (void)
int i;
if (r_init) {
if (vaelements > 3)
if (vaelements > 3) {
tVAsize = vaelements - (vaelements % 4);
else if (vaelements >= 0)
} else if (vaelements >= 0) {
tVAsize = 2048;
else
} else
tVAsize = 0;
if (tVAsize) {
@ -178,24 +178,23 @@ Draw_PicFromWad (const char *name)
qpic_t *p;
tex_t *targa;
targa = LoadImage (name);
if (targa) {
p = malloc (sizeof (qpic_t));
p->width = targa->width;
p->height = targa->height;
gl = (glpic_t *) p->data;
if (targa->format < 4)
gl->texnum = GL_LoadTexture (name, targa->width,
targa->height, targa->data, false, false, 3);
else
gl->texnum = GL_LoadTexture (name, targa->width,
targa->height, targa->data, false, true, 4);
if (targa->format < 4) {
gl->texnum = GL_LoadTexture (name, targa->width, targa->height,
targa->data, false, false, 3);
} else
gl->texnum = GL_LoadTexture (name, targa->width, targa->height,
targa->data, false, true, 4);
} else {
p = W_GetLumpName (name);
gl = (glpic_t *) p->data;
gl->texnum = GL_LoadTexture (name, p->width, p->height,
p->data, false, true, 1);
gl->texnum = GL_LoadTexture (name, p->width, p->height, p->data,
false, true, 1);
}
return p;
}
@ -232,10 +231,10 @@ Draw_CachePic (const char *path, qboolean alpha)
// Check for a .tga first
targa = LoadImage (path);
if (targa) {
if (targa->format < 4)
if (targa->format < 4) {
gl->texnum = GL_LoadTexture ("", targa->width, targa->height,
targa->data, false, alpha, 3);
else
} else
gl->texnum = GL_LoadTexture ("", targa->width, targa->height,
targa->data, false, alpha, 4);
pic->pic.width = targa->width;
@ -322,7 +321,6 @@ Draw_TextBox (int x, int y, int width, int lines, byte alpha)
qfglColor3ubv (color_white);
}
void
Draw_Init (void)
{
@ -336,24 +334,24 @@ Draw_Init (void)
// write the version string into the background before turning it into a
// texture
image = LoadImage ("gfx/conchars.png");
image = LoadImage ("gfx/conchars");
if (image) {
if (image->format < 4)
char_texture = GL_LoadTexture ("charset",
image->width, image->height,
image->data, false, false, 3);
else
char_texture = GL_LoadTexture ("charset",
image->width, image->height,
image->data, false, true, 4);
if (image->format < 4) {
char_texture = GL_LoadTexture ("charset", image->width,
image->height, image->data, false,
false, 3);
} else
char_texture = GL_LoadTexture ("charset", image->width,
image->height, image->data, false,
true, 4);
} else {
draw_chars = W_GetLumpName ("conchars");
for (i = 0; i < 256 * 64; i++)
if (draw_chars[i] == 0)
draw_chars[i] = 255; // proper transparent color
char_texture = GL_LoadTexture ("charset", 128, 128, draw_chars,
false, true, 1);
char_texture = GL_LoadTexture ("charset", 128, 128, draw_chars, false,
true, 1);
}
// now turn them into textures
@ -501,8 +499,7 @@ Draw_AltString (int x, int y, const char *str)
y1 = (float) y;
while (*str) {
if ((num = *str++ | 0x80) != (0x80 | 32)) // Don't render spaces
{
if ((num = *str++ | 0x80) != (0x80 | 32)) { // Don't render spaces
queue_character (x1, y1, num);
tVA_increment ();
}
@ -696,9 +693,9 @@ Draw_ConsoleBackground (int lines, byte alpha)
qfglScalef (xfactor, xfactor, xfactor);
}
// slide console up/down or stretch it?
if (gl_constretch->int_val)
if (gl_constretch->int_val) {
ofs = 0;
else
} else
ofs = (vid.conheight - lines) / (float) vid.conheight;
color_0_8[3] = alpha;