mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 00:30:57 +00:00
Move the tex conversion to libQFimage.
This is for the conversion /to/ paletted textures. The conversion is necessary for csqc support. In the process, the conversion has been sped up by implementing a color cache for the conversion process. I haven't measured the difference yet, but Mr Fixit does seem to load much faster for the sw renderer than it did before the change (many months old memory).
This commit is contained in:
parent
d39adc6a64
commit
0cae54d25d
5 changed files with 190 additions and 61 deletions
|
@ -104,7 +104,7 @@ load_image (const char *name)
|
|||
switch (tex->format) {
|
||||
case tex_palette:
|
||||
for (i = 0, s = tex->data, d = image->data; i < pixels; i++) {
|
||||
byte *v = tex->palette + *s++ * 3;
|
||||
const byte *v = tex->palette + *s++ * 3;
|
||||
*d++ = *v++;
|
||||
*d++ = *v++;
|
||||
*d++ = *v++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue