d3dx9: Implement D3DXLoadVolumeFromVolume.
This commit is contained in:
parent
09519eece1
commit
9e262e1a9b
|
@ -195,7 +195,7 @@
|
|||
@ stdcall D3DXLoadVolumeFromMemory(ptr ptr ptr ptr long long long ptr ptr long long)
|
||||
@ stub D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr)
|
||||
@ stub D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr)
|
||||
@ stub D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long)
|
||||
@ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long)
|
||||
@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr)
|
||||
@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr)
|
||||
@ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr)
|
||||
|
|
|
@ -141,3 +141,46 @@ HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume,
|
|||
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DXLoadVolumeFromVolume(IDirect3DVolume9 *dst_volume,
|
||||
const PALETTEENTRY *dst_palette,
|
||||
const D3DBOX *dst_box,
|
||||
IDirect3DVolume9 *src_volume,
|
||||
const PALETTEENTRY *src_palette,
|
||||
const D3DBOX *src_box,
|
||||
DWORD filter,
|
||||
D3DCOLOR color_key)
|
||||
{
|
||||
HRESULT hr;
|
||||
D3DBOX box;
|
||||
D3DVOLUME_DESC desc;
|
||||
D3DLOCKED_BOX locked_box;
|
||||
|
||||
TRACE("(%p, %p, %p, %p, %p, %p, %#x, %#x)\n",
|
||||
dst_volume, dst_palette, dst_box, src_volume, src_palette, src_box,
|
||||
filter, color_key);
|
||||
|
||||
if (!dst_volume || !src_volume) return D3DERR_INVALIDCALL;
|
||||
|
||||
IDirect3DVolume9_GetDesc(src_volume, &desc);
|
||||
|
||||
if (!src_box)
|
||||
{
|
||||
box.Left = box.Top = 0;
|
||||
box.Right = desc.Width;
|
||||
box.Bottom = desc.Height;
|
||||
box.Front = 0;
|
||||
box.Back = desc.Depth;
|
||||
}
|
||||
else box = *src_box;
|
||||
|
||||
hr = IDirect3DVolume9_LockBox(src_volume, &locked_box, &box, D3DLOCK_READONLY);
|
||||
if (FAILED(hr)) return hr;
|
||||
|
||||
hr = D3DXLoadVolumeFromMemory(dst_volume, dst_palette, dst_box,
|
||||
locked_box.pBits, desc.Format, locked_box.RowPitch, locked_box.SlicePitch,
|
||||
src_palette, &box, filter, color_key);
|
||||
|
||||
IDirect3DVolume9_UnlockBox(src_volume);
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue