Commit 793bf04e authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Removed the obsolete DIBTexture surface class.

parent fe01f0e7
...@@ -31,7 +31,6 @@ C_SRCS = \ ...@@ -31,7 +31,6 @@ C_SRCS = \
dpalette/main.c \ dpalette/main.c \
dsurface/dga2.c \ dsurface/dga2.c \
dsurface/dib.c \ dsurface/dib.c \
dsurface/dibtexture.c \
dsurface/fakezbuffer.c \ dsurface/fakezbuffer.c \
dsurface/gamma.c \ dsurface/gamma.c \
dsurface/main.c \ dsurface/main.c \
......
/* DIB Section Texture DirectDrawSurface Driver
*
* Copyright 2000 TransGaming Technologies Inc.
*/
#include "config.h"
#include "winerror.h"
#include <assert.h>
#include <stdlib.h>
#include "debugtools.h"
#include "ddraw_private.h"
#include "dsurface/main.h"
#include "dsurface/dib.h"
#include "dsurface/dibtexture.h"
DEFAULT_DEBUG_CHANNEL(ddraw);
static ICOM_VTABLE(IDirectDrawSurface7) DIBTexture_IDirectDrawSurface7_VTable;
HRESULT
DIBTexture_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl* This,
IDirectDrawImpl* pDD,
const DDSURFACEDESC2* pDDSD)
{
HRESULT hr;
hr = DIB_DirectDrawSurface_Construct(This, pDD, pDDSD);
if (FAILED(hr)) return hr;
ICOM_INIT_INTERFACE(This, IDirectDrawSurface7,
DIBTexture_IDirectDrawSurface7_VTable);
This->final_release = DIBTexture_DirectDrawSurface_final_release;
This->duplicate_surface = DIBTexture_DirectDrawSurface_duplicate_surface;
return S_OK;
}
HRESULT
DIBTexture_DirectDrawSurface_Create(IDirectDrawImpl *pDD,
const DDSURFACEDESC2 *pDDSD,
LPDIRECTDRAWSURFACE7 *ppSurf,
IUnknown *pUnkOuter)
{
IDirectDrawSurfaceImpl* This;
HRESULT hr;
assert(pUnkOuter == NULL);
assert(pDDSD->ddsCaps.dwCaps & DDSCAPS_TEXTURE);
This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(*This) + sizeof(DIBTexture_DirectDrawSurfaceImpl));
if (This == NULL) return E_OUTOFMEMORY;
This->private = (DIBTexture_DirectDrawSurfaceImpl*)(This+1);
hr = DIBTexture_DirectDrawSurface_Construct(This, pDD, pDDSD);
if (FAILED(hr))
HeapFree(GetProcessHeap(), 0, This);
else
*ppSurf = ICOM_INTERFACE(This, IDirectDrawSurface7);
return hr;
}
void DIBTexture_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl* This)
{
DIB_DirectDrawSurface_final_release(This);
}
HRESULT
DIBTexture_DirectDrawSurface_duplicate_surface(IDirectDrawSurfaceImpl* This,
LPDIRECTDRAWSURFACE7* ppDup)
{
return DIBTexture_DirectDrawSurface_Create(This->ddraw_owner,
&This->surface_desc, ppDup,
NULL);
}
static ICOM_VTABLE(IDirectDrawSurface7) DIBTexture_IDirectDrawSurface7_VTable =
{
Main_DirectDrawSurface_QueryInterface,
Main_DirectDrawSurface_AddRef,
Main_DirectDrawSurface_Release,
Main_DirectDrawSurface_AddAttachedSurface,
Main_DirectDrawSurface_AddOverlayDirtyRect,
DIB_DirectDrawSurface_Blt,
Main_DirectDrawSurface_BltBatch,
DIB_DirectDrawSurface_BltFast,
Main_DirectDrawSurface_DeleteAttachedSurface,
Main_DirectDrawSurface_EnumAttachedSurfaces,
Main_DirectDrawSurface_EnumOverlayZOrders,
Main_DirectDrawSurface_Flip,
Main_DirectDrawSurface_GetAttachedSurface,
Main_DirectDrawSurface_GetBltStatus,
Main_DirectDrawSurface_GetCaps,
Main_DirectDrawSurface_GetClipper,
Main_DirectDrawSurface_GetColorKey,
Main_DirectDrawSurface_GetDC,
Main_DirectDrawSurface_GetFlipStatus,
Main_DirectDrawSurface_GetOverlayPosition,
Main_DirectDrawSurface_GetPalette,
Main_DirectDrawSurface_GetPixelFormat,
Main_DirectDrawSurface_GetSurfaceDesc,
Main_DirectDrawSurface_Initialize,
Main_DirectDrawSurface_IsLost,
Main_DirectDrawSurface_Lock,
Main_DirectDrawSurface_ReleaseDC,
DIB_DirectDrawSurface_Restore,
Main_DirectDrawSurface_SetClipper,
Main_DirectDrawSurface_SetColorKey,
Main_DirectDrawSurface_SetOverlayPosition,
Main_DirectDrawSurface_SetPalette,
Main_DirectDrawSurface_Unlock,
Main_DirectDrawSurface_UpdateOverlay,
Main_DirectDrawSurface_UpdateOverlayDisplay,
Main_DirectDrawSurface_UpdateOverlayZOrder,
Main_DirectDrawSurface_GetDDInterface,
Main_DirectDrawSurface_PageLock,
Main_DirectDrawSurface_PageUnlock,
DIB_DirectDrawSurface_SetSurfaceDesc,
Main_DirectDrawSurface_SetPrivateData,
Main_DirectDrawSurface_GetPrivateData,
Main_DirectDrawSurface_FreePrivateData,
Main_DirectDrawSurface_GetUniquenessValue,
Main_DirectDrawSurface_ChangeUniquenessValue,
Main_DirectDrawSurface_SetPriority,
Main_DirectDrawSurface_GetPriority,
Main_DirectDrawSurface_SetLOD,
Main_DirectDrawSurface_GetLOD
};
/* Copyright 2000 TransGaming Technologies Inc. */
#ifndef DDRAW_DSURFACE_DIBTEXTURE_H_INCLUDED
#define DDRAW_DSURFACE_DIBTEXTURE_H_INCLUDED
#define DIBTEXTURE_PRIV(surf) \
((DIBTexture_DirectDrawSurfaceImpl*)(surf->private))
#define DIBTEXTURE_PRIV_VAR(name,surf) \
DIBTexture_DirectDrawSurfaceImpl* name = DIBTEXTURE_PRIV(surf)
/* We add a spot for 3D drivers to store some private data. A cleaner
* solution would be to use SetPrivateData, but it's much too slow. */
union DIBTexture_data
{
int i;
void* p;
};
struct DIBTexture_DirectDrawSurfaceImpl_Part
{
union DIBTexture_data data;
};
typedef struct
{
struct DIB_DirectDrawSurfaceImpl_Part dib;
struct DIBTexture_DirectDrawSurfaceImpl_Part dibtexture;
} DIBTexture_DirectDrawSurfaceImpl;
HRESULT
DIBTexture_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl* This,
IDirectDrawImpl* pDD,
const DDSURFACEDESC2* pDDSD);
HRESULT
DIBTexture_DirectDrawSurface_Create(IDirectDrawImpl *pDD,
const DDSURFACEDESC2 *pDDSD,
LPDIRECTDRAWSURFACE7 *ppSurf,
IUnknown *pUnkOuter);
void DIBTexture_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl* This);
HRESULT
DIBTexture_DirectDrawSurface_duplicate_surface(IDirectDrawSurfaceImpl* This,
LPDIRECTDRAWSURFACE7* ppDup);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment