-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
Cool to see that you're still working on this :-) .
Am 2015-12-15 um 16:41 schrieb Aaryaman Vasishta:
> + * Copyright 2015 Aaryaman Vasishta
I think you can make this 2014-2015.
> +static char *create_testbitmap(const char *filename, LPCSTR resource)
LPCSTR -> const char * is better IMO.
> +{
> +������ ������ static char path[MAX_PATH];
> +������ ������ DWORD written;
> +������ ������ HANDLE file;
> +������ ������ HRSRC res;
> +������ ������ void *ptr;
> +
> +������ ������ GetTempPathA(sizeof(path)/sizeof(WCHAR), path);
Why sizeof(WCHAR)?
> +������ ������ if (img->palette)
> +������ ������ {
> +������ ������ ������ ������ if (depth == 8)
> +������ ������ ������ ������ {
> +������ ������ ������ ������ ������ ������ for (i = 0; i < size; i++)
> +������ ������ ������ ������ ������ ������ {
> +������ ������ ������ ������ ������ ������ ������ ������ if (buffer1[i] != buffer2[i])
> +������ ������ ������ ������ ������ ������ ������ ������ ������ ������ return FALSE;
> +������ ������ ������ ������ ������ ������ }
> +������ ������ ������ ������ }
> +������ ������ ������ ������ else
> +������ ������ ������ ������ {
> +������ ������ ������ ������ ������ ������ /* d3drm aligns the 24bpp texture to 4 bytes in the buffer, with one bype padding from 24bpp texture. */
> +������ ������ ������ ������ ������ ������ /* The image is palettized if the total number of colors used is < 256. */
Does this ever happen? A palettized image with != 8 bpp?