Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e1815f5e
Commit
e1815f5e
authored
Feb 02, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the IWineD3DPalette typedefs.
parent
5963483f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
25 deletions
+30
-25
device.c
dlls/wined3d/device.c
+5
-5
palette.c
dlls/wined3d/palette.c
+1
-1
surface.c
dlls/wined3d/surface.c
+2
-2
surface_base.c
dlls/wined3d/surface_base.c
+15
-10
surface_gdi.c
dlls/wined3d/surface_gdi.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+6
-6
No files found.
dlls/wined3d/device.c
View file @
e1815f5e
...
...
@@ -1609,14 +1609,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePixelShader(IWineD3DDevice *iface
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreatePalette
(
IWineD3DDevice
*
iface
,
DWORD
flags
,
const
PALETTEENTRY
*
PalEnt
,
void
*
parent
,
IWineD3DPalette
**
P
alette
)
const
PALETTEENTRY
*
entries
,
void
*
parent
,
struct
wined3d_palette
**
p
alette
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DPaletteImpl
*
object
;
struct
wined3d_palette
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, flags %#x, entries %p, palette %p, parent %p.
\n
"
,
iface
,
flags
,
PalEnt
,
P
alette
,
parent
);
iface
,
flags
,
entries
,
p
alette
,
parent
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
...
...
@@ -1625,7 +1625,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePalette(IWineD3DDevice *iface, DW
return
E_OUTOFMEMORY
;
}
hr
=
wined3d_palette_init
(
object
,
This
,
flags
,
PalEnt
,
parent
);
hr
=
wined3d_palette_init
(
object
,
This
,
flags
,
entries
,
parent
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize palette, hr %#x.
\n
"
,
hr
);
...
...
@@ -1634,7 +1634,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePalette(IWineD3DDevice *iface, DW
}
TRACE
(
"Created palette %p.
\n
"
,
object
);
*
Palette
=
(
IWineD3DPalette
*
)
object
;
*
palette
=
object
;
return
WINED3D_OK
;
}
...
...
dlls/wined3d/palette.c
View file @
e1815f5e
...
...
@@ -158,7 +158,7 @@ void * CDECL wined3d_palette_get_parent(const struct wined3d_palette *palette)
return
palette
->
parent
;
}
HRESULT
wined3d_palette_init
(
IWineD3DPaletteImpl
*
palette
,
IWineD3DDeviceImpl
*
device
,
HRESULT
wined3d_palette_init
(
struct
wined3d_palette
*
palette
,
IWineD3DDeviceImpl
*
device
,
DWORD
flags
,
const
PALETTEENTRY
*
entries
,
void
*
parent
)
{
HRESULT
hr
;
...
...
dlls/wined3d/surface.c
View file @
e1815f5e
...
...
@@ -335,7 +335,7 @@ void draw_textured_quad(IWineD3DSurfaceImpl *src_surface, const RECT *src_rect,
static
void
surface_realize_palette
(
IWineD3DSurfaceImpl
*
surface
)
{
IWineD3DPaletteImpl
*
palette
=
surface
->
palette
;
struct
wined3d_palette
*
palette
=
surface
->
palette
;
TRACE
(
"surface %p.
\n
"
,
surface
);
...
...
@@ -2371,7 +2371,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck,
void
d3dfmt_p8_init_palette
(
IWineD3DSurfaceImpl
*
This
,
BYTE
table
[
256
][
4
],
BOOL
colorkey
)
{
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
device
;
IWineD3DPaletteImpl
*
pal
=
This
->
palette
;
struct
wined3d_palette
*
pal
=
This
->
palette
;
BOOL
index_in_alpha
=
FALSE
;
unsigned
int
i
;
...
...
dlls/wined3d/surface_base.c
View file @
e1815f5e
...
...
@@ -216,12 +216,14 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Restore(IWineD3DSurface *iface) {
return
WINED3D_OK
;
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetPalette
(
IWineD3DSurface
*
iface
,
IWineD3DPalette
*
Pal
)
{
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetPalette
(
IWineD3DSurface
*
iface
,
struct
wined3d_palette
*
palette
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
IWineD3DPaletteImpl
*
PalImpl
=
(
IWineD3DPaletteImpl
*
)
Pal
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
Pal
);
if
(
This
->
palette
==
PalImpl
)
{
TRACE
(
"iface %p, palette %p.
\n
"
,
iface
,
palette
);
if
(
This
->
palette
==
palette
)
{
TRACE
(
"Nop palette change
\n
"
);
return
WINED3D_OK
;
}
...
...
@@ -230,12 +232,12 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD
if
(
This
->
resource
.
usage
&
WINED3DUSAGE_RENDERTARGET
)
This
->
palette
->
flags
&=
~
WINEDDPCAPS_PRIMARYSURFACE
;
This
->
palette
=
PalImpl
;
This
->
palette
=
palette
;
if
(
PalImpl
)
if
(
palette
)
{
if
(
This
->
resource
.
usage
&
WINED3DUSAGE_RENDERTARGET
)
PalImpl
->
flags
|=
WINEDDPCAPS_PRIMARYSURFACE
;
palette
->
flags
|=
WINEDDPCAPS_PRIMARYSURFACE
;
This
->
surface_ops
->
surface_realize_palette
(
This
);
}
...
...
@@ -306,11 +308,14 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetColorKey(IWineD3DSurface *iface, DWORD
return
WINED3D_OK
;
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetPalette
(
IWineD3DSurface
*
iface
,
IWineD3DPalette
**
Pal
)
{
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetPalette
(
IWineD3DSurface
*
iface
,
struct
wined3d_palette
**
palette
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
Pal
);
*
Pal
=
(
IWineD3DPalette
*
)
This
->
palette
;
TRACE
(
"iface %p, palette %p.
\n
"
,
iface
,
palette
);
*
palette
=
This
->
palette
;
return
WINED3D_OK
;
}
...
...
dlls/wined3d/surface_gdi.c
View file @
e1815f5e
...
...
@@ -59,7 +59,7 @@ void surface_gdi_cleanup(IWineD3DSurfaceImpl *This)
static
void
gdi_surface_realize_palette
(
IWineD3DSurfaceImpl
*
surface
)
{
IWineD3DPaletteImpl
*
palette
=
surface
->
palette
;
struct
wined3d_palette
*
palette
=
surface
->
palette
;
TRACE
(
"surface %p.
\n
"
,
surface
);
...
...
dlls/wined3d/wined3d_private.h
View file @
e1815f5e
...
...
@@ -58,8 +58,6 @@ typedef struct IWineD3DSwapChainImpl IWineD3DSwapChainImpl;
struct
IWineD3DBaseShaderImpl
;
struct
IWineD3DBaseTextureImpl
;
struct
IWineD3DResourceImpl
;
typedef
struct
wined3d_palette
IWineD3DPaletteImpl
;
typedef
struct
wined3d_palette
IWineD3DPalette
;
/* Texture format fixups */
...
...
@@ -2099,7 +2097,7 @@ struct IWineD3DSurfaceImpl
const
struct
wined3d_surface_ops
*
surface_ops
;
struct
wined3d_subresource_container
container
;
WINED3DSURFACET_DESC
currentDesc
;
IWineD3DPaletteImpl
*
palette
;
/* D3D7 style palette handling */
struct
wined3d_palette
*
palette
;
/* D3D7 style palette handling */
PALETTEENTRY
*
palette9
;
/* D3D8/9 style palette handling */
DWORD
flags
;
...
...
@@ -2199,8 +2197,10 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWOR
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetFlipStatus
(
IWineD3DSurface
*
iface
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_IsLost
(
IWineD3DSurface
*
iface
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_Restore
(
IWineD3DSurface
*
iface
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetPalette
(
IWineD3DSurface
*
iface
,
IWineD3DPalette
**
Pal
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetPalette
(
IWineD3DSurface
*
iface
,
IWineD3DPalette
*
Pal
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetPalette
(
IWineD3DSurface
*
iface
,
struct
wined3d_palette
**
Pal
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetPalette
(
IWineD3DSurface
*
iface
,
struct
wined3d_palette
*
Pal
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetColorKey
(
IWineD3DSurface
*
iface
,
DWORD
flags
,
const
WINEDDCOLORKEY
*
CKey
)
DECLSPEC_HIDDEN
;
DWORD
WINAPI
IWineD3DBaseSurfaceImpl_GetPitch
(
IWineD3DSurface
*
iface
)
DECLSPEC_HIDDEN
;
...
...
@@ -2957,7 +2957,7 @@ struct wined3d_palette
DWORD
flags
;
};
HRESULT
wined3d_palette_init
(
IWineD3DPaletteImpl
*
palette
,
IWineD3DDeviceImpl
*
device
,
HRESULT
wined3d_palette_init
(
struct
wined3d_palette
*
palette
,
IWineD3DDeviceImpl
*
device
,
DWORD
flags
,
const
PALETTEENTRY
*
entries
,
void
*
parent
)
DECLSPEC_HIDDEN
;
/* DirectDraw utility functions */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment