mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-01 17:12:15 +00:00
[gl] Remove some more warts
seeing ptexels and pixels together is very confusing
This commit is contained in:
parent
5949753579
commit
62cce7f98c
1 changed files with 9 additions and 10 deletions
|
@ -43,29 +43,28 @@
|
||||||
int
|
int
|
||||||
Mod_Fullbright (byte *skin, int width, int height, const char *name)
|
Mod_Fullbright (byte *skin, int width, int height, const char *name)
|
||||||
{
|
{
|
||||||
byte *ptexels;
|
byte *texels;
|
||||||
int pixels;
|
int pixels;
|
||||||
int texnum = 0;
|
int texnum = 0;
|
||||||
|
|
||||||
pixels = width * height;
|
pixels = width * height;
|
||||||
|
|
||||||
// ptexels = Hunk_Alloc(s);
|
texels = malloc (pixels);
|
||||||
ptexels = malloc (pixels);
|
SYS_CHECKMEM (texels);
|
||||||
SYS_CHECKMEM (ptexels);
|
|
||||||
|
|
||||||
// Check for fullbright pixels
|
// Check for fullbright pixels
|
||||||
if (Mod_CalcFullbright (skin, ptexels, pixels)) {
|
if (Mod_CalcFullbright (skin, texels, pixels)) {
|
||||||
//FIXME black should be transparent for fullbrights (or just fix
|
//FIXME black should be transparent for fullbrights (or just fix
|
||||||
//fullbright rendering in gl)
|
//fullbright rendering in gl)
|
||||||
|
Sys_MaskPrintf (SYS_DEV, "FB Model ID: '%s'\n", name);
|
||||||
for (int i = 0; i < pixels; i++) {
|
for (int i = 0; i < pixels; i++) {
|
||||||
if (!ptexels[i]) {
|
if (!texels[i]) {
|
||||||
ptexels[i] = 255;
|
texels[i] = 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Sys_MaskPrintf (SYS_DEV, "FB Model ID: '%s'\n", name);
|
texnum = GL_LoadTexture (name, width, height, texels, true, true, 1);
|
||||||
texnum = GL_LoadTexture (name, width, height, ptexels, true, true, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free (ptexels);
|
free (texels);
|
||||||
return texnum;
|
return texnum;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue