Ryan C. Gordon
2011-05-08 24c032bb92a19c9cc0e1ed751d24737af5a04e23

Added a width and height query.

1 files modified
7 ■■■■ changed files
mojodds.c 7 ●●●● patch | view | raw | blame | history
mojodds.c
@@ -174,7 +174,8 @@
// !!! FIXME: improve the crap out of this API later.
int MOJODDS_getTexture(const void *_ptr, const unsigned long _len,
                       const void **_tex, unsigned long *_texlen, int *_dxtver)
                       const void **_tex, unsigned long *_texlen, int *_dxtver,
                       unsigned int *_w, unsigned int *_h)
{
    size_t len = (size_t) _len;
    const uint8 *ptr = (const uint8 *) _ptr;
@@ -183,7 +184,9 @@
        return 0;
    *_tex = (const void *) ptr;
    *_texlen = (long) header.dwPitchOrLinearSize;
    *_texlen = (unsigned long) header.dwPitchOrLinearSize;
    *_w = (unsigned int) header.dwWidth;
    *_h = (unsigned int) header.dwHeight;
    switch (header.ddspf.dwFourCC)
    {