Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/texture.c:
{hr = IDirect3DCubeTexture9_LockRect(tex, f, m, &lock_rect, NULL, D3DLOCK_READONLY);ok(hr == D3D_OK, "Couldn't lock the texture, error %#lx\n", hr);if (SUCCEEDED(hr)){pitch = lock_rect.Pitch / sizeof(DWORD);for (y = 0; y < size; y++){for (x = 0; x < size; x++){value = ((DWORD *)lock_rect.pBits)[y * pitch + x];v[0] = (value >> 24) & 0xff;v[1] = (value >> 16) & 0xff;v[2] = (value >> 8) & 0xff;v[3] = value & 0xff;
ret = (value >> 15 & 0x1f) << 24
It's just 1 bit for the alpha component, right?