<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 16, 2015 at 3:00 AM, Stefan Dösinger <span dir="ltr"><<a href="mailto:stefandoesinger@gmail.com" target="_blank">stefandoesinger@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<br>
Hi,<br>
<br>
Cool to see that you're still working on this :-) .<br>
<br>
Am 2015-12-15 um 16:41 schrieb Aaryaman Vasishta:<br>
<br>
> + * Copyright 2015 Aaryaman Vasishta<br>
I think you can make this 2014-2015.<br>
<br>
> +static char *create_testbitmap(const char *filename, LPCSTR resource)<br>
LPCSTR -> const char * is better IMO.<br>
> +{<br>
> +    static char path[MAX_PATH];<br>
> +    DWORD written;<br>
> +    HANDLE file;<br>
> +    HRSRC res;<br>
> +    void *ptr;<br>
> +<br>
> +    GetTempPathA(sizeof(path)/sizeof(WCHAR), path);<br>
Why sizeof(WCHAR)?<br></blockquote><div>Copy-paste mistake. Should be char. I had taken this function from the dwrite font tests and slightly modified it, using char instead of wchar. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> +    if (img->palette)<br>
> +    {<br>
> +        if (depth == 8)<br>
> +        {<br>
> +            for (i = 0; i < size; i++)<br>
> +            {<br>
> +                if (buffer1[i] != buffer2[i])<br>
> +                    return FALSE;<br>
> +            }<br>
> +        }<br>
> +        else<br>
> +        {<br>
> +            /* d3drm aligns the 24bpp texture to 4 bytes in the buffer, with one bype padding from 24bpp texture. */<br>
> +            /* The image is palettized if the total number of colors used is < 256. */<br>
Does this ever happen? A palettized image with != 8 bpp?<br></blockquote><div>It does palettize an image with <= 256 colors. I should actually change that comment to <= instead of <.<br></div></div></div></div>