Ok! Then, maybe, you should clean up the statements about unchunked terrain in the manual - I guess it could be somehow confusing for beginners if they come across that stuff the first time.

Here is, by the way, the archive with the promised hmp's: http://www.christian-behrenberg.de/files/shared/a8/bugs/mips.rar

It contains two HMPs and 4 textures. The file "tile_mips_static.hmp" was created by loading the 4 bmps and using them as mipmap data sources; the file "tile_mips_dynamic.hmp" was created by creating consecutive smaller bitmaps from the passed internal BMAP*.

In both cases, "true" is passed for the mips parameter in .SkinSize(...) and BYTE* pointers are passed for the three mipmaps in .SkinBits(...).

For BMAP*'s, I wrote a function, that returns me a BYTE* pointer to the pixeldata. Here is the source:

Code:
BYTE* pixelsForBmap (BMAP* b, BOOL* locked, BYTE** stripped)
{
    BYTE* pixels = NULL;

    if (b && locked && stripped)
    {
        // if bmap was loaded from file, just take the (original) pixels
        if (b->pixels)
            pixels = b->pixels;
        else
        {
            // bmap was created during runtime, therefore no
            // "original" pixels are available

            // we need to lock image to access finalbits!

            bmap_lock(b, 0);
            *locked = true;

            // in the case of an 8888 image (BGRA), we can simply take
            // the finalbits

            if (b->bytespp == 4)
                pixels = (BYTE*)(b->finalbits);
            else
            {
                // problem: 24bit image is specified, but is stored internally
                // different. We have to extract the stuff!

                int n = b->width * b->height * 3;
                *stripped = (BYTE*)sys_malloc(sizeof(BYTE) * n);

                for (int i = 0; i < n; i++)
                    (*stripped)[i] = ((BYTE*)(b->finalbits))[((i / 3) * 4) + (i % 3)];

                pixels = (*stripped);
            }
        }
    }

    return(pixels);
}



The function behaviour is pretty selfexplanatory. If I create a stripped representation of the pixel data, the pointer references are set, so that I can handle such things in my circumstancing code, e.g. for cleanup or the like.

I use this function not only for mipmap BMAP's, but also for the main skin image. If mips is == false and therefore I pass NULL, NULL, NULL as mipmaps to SkinBits, everything is fine and the terrain can be loaded in MED and in the engine... --- So this is the reason why I did two test: because if my internal mipmap calculation is somehow broken, my passed BMAP's, loaded from file, must be correct, because the sizes are right and the function is proofed to be correct (on the main image before).

I hope these information are sufficient for you to find out what is going wrong here on my end smile and thank you very much for your time!!