Some linker on different platforms don't handle the garbage collection
correctly and create extreme bloated binaries. Therefore, leave it to the user
to enable this feature or not.
Hires textures in Glide64 can have fmt and size set to a wrong value and still
get loaded. Rice has to store the name of the filename when it got found to
allow it to load such wrong named textures. Otherwise it is part of the index
and on load it will fail to find the file again.
The loading of PNG files is usually CPU bound. This is caused by the filters
and compression used to reduce the size of the file. This operations aren't
necessary when the content is dropped directly after reading the image.
Only loading the PNG headers makes the loading of a complete hires texture
set nearly instant when the I/O is not limited.
Glide64 ignores the fmt and size information stored in the name of the hires
texture when searching in its index of textures. Rice instead replaces the two
lower nibbles of the crc32 with the size and fmt information. This causes
problems when Rice tries to load texture from texture packs made especially for
Glide64.
The behavior of Rice is changed to find texture like Glide64. The option
LoadHiResCRCOnly can be set to False to restore the old behavior
The pngrw functionality for loading PNG files failed to load many texture
images because it didn't expect the bit depth and similar parameters. Rice only
needs 24/32 bit png files and therefore it is good enough to use the libpng
functionality to load all files as (A)RGB images.
Texture packs developed with the focus on Glide64 seem to use too large texture
from time to time. Glide64 crops these textures correctly before they get
replaced.
Rice tend to just drop these textures. Cropping them in this context seems to
be more appropriate.
MacOSX and MinGW don't provide gl.pc or glu.pc to find the cflags or libs using
pkg-config. Removing this search and replacing it with an hardcoded value is
easier on these platforms.
The POSTFIX make option is useful for distributions to compile different
versions of the plugin in parallel. The object files will be stored in a
directory with the postfix appended and the linker result will also have this
postfix appended.
The CROSS_COMPILE make option can be used to automatically prepend the prefix
to all build relevant tools to seamlessly allow cross compilation without
setting each tool name separately.
Cross compiling for MinGW32 would can be done using
$ make -C projects/unix/ CROSS_COMPILE=i686-pc-mingw32- HOST_CPU=i686 UNAME=MINGW