mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-06-03 10:30:56 +00:00
Fixed .lit file (colored lighting) support.
This commit is contained in:
parent
98c7aeb439
commit
244ea57e1a
1 changed files with 11 additions and 8 deletions
|
@ -503,15 +503,18 @@ void Mod_LoadLighting (lump_t *l)
|
||||||
strcat(litfilename, ".lit");
|
strcat(litfilename, ".lit");
|
||||||
|
|
||||||
loadmodel->lightdata = Hunk_AllocName ( l->filelen*3, litfilename);
|
loadmodel->lightdata = Hunk_AllocName ( l->filelen*3, litfilename);
|
||||||
in = loadmodel->lightdata + l->filelen*2; // place the file at the end, so it will not be overwritten until the very last write
|
if (!loadmodel->lightdata) // LordHavoc: someone forgot this... preventing .lit from working
|
||||||
out = loadmodel->lightdata;
|
|
||||||
memcpy (in, mod_base + l->fileofs, l->filelen);
|
|
||||||
for (i = 0;i < l->filelen;i++)
|
|
||||||
{
|
{
|
||||||
d = *in++;
|
in = loadmodel->lightdata + l->filelen*2; // place the file at the end, so it will not be overwritten until the very last write
|
||||||
*out++ = d;
|
out = loadmodel->lightdata;
|
||||||
*out++ = d;
|
memcpy (in, mod_base + l->fileofs, l->filelen);
|
||||||
*out++ = d;
|
for (i = 0;i < l->filelen;i++)
|
||||||
|
{
|
||||||
|
d = *in++;
|
||||||
|
*out++ = d;
|
||||||
|
*out++ = d;
|
||||||
|
*out++ = d;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue