Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9b29fb68
Commit
9b29fb68
authored
May 09, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement IWineD3DSurface::SetColorKey.
parent
08dc9e00
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
2 deletions
+91
-2
surface.c
dlls/wined3d/surface.c
+83
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+8
-0
No files found.
dlls/wined3d/surface.c
View file @
9b29fb68
...
...
@@ -1739,8 +1739,89 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPa
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetColorKey
(
IWineD3DSurface
*
iface
,
DWORD
Flags
,
DDCOLORKEY
*
CKey
)
{
FIXME
(
"This is unimplemented for now(d3d7 merge)
\n
"
);
return
WINED3DERR_INVALIDCALL
;
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
BOOL
dirtify
=
FALSE
;
TRACE
(
"(%p)->(%08lx,%p)
\n
"
,
This
,
Flags
,
CKey
);
if
((
Flags
&
DDCKEY_COLORSPACE
)
!=
0
)
{
FIXME
(
" colorkey value not supported (%08lx) !
\n
"
,
Flags
);
return
DDERR_INVALIDPARAMS
;
}
/* Dirtify the surface, but only if a key was changed */
if
(
CKey
)
{
switch
(
Flags
&
~
DDCKEY_COLORSPACE
)
{
case
DDCKEY_DESTBLT
:
if
(
!
(
This
->
CKeyFlags
&
DDSD_CKDESTBLT
))
{
dirtify
=
TRUE
;
}
else
{
dirtify
=
memcmp
(
&
This
->
DestBltCKey
,
CKey
,
sizeof
(
*
CKey
)
)
!=
0
;
}
This
->
DestBltCKey
=
*
CKey
;
This
->
CKeyFlags
|=
DDSD_CKDESTBLT
;
break
;
case
DDCKEY_DESTOVERLAY
:
if
(
!
(
This
->
CKeyFlags
&
DDSD_CKDESTOVERLAY
))
{
dirtify
=
TRUE
;
}
else
{
dirtify
=
memcmp
(
&
This
->
DestOverlayCKey
,
CKey
,
sizeof
(
*
CKey
))
!=
0
;
}
This
->
DestOverlayCKey
=
*
CKey
;
This
->
CKeyFlags
|=
DDSD_CKDESTOVERLAY
;
break
;
case
DDCKEY_SRCOVERLAY
:
if
(
!
(
This
->
CKeyFlags
&
DDSD_CKSRCOVERLAY
))
{
dirtify
=
TRUE
;
}
else
{
dirtify
=
memcmp
(
&
This
->
SrcOverlayCKey
,
CKey
,
sizeof
(
*
CKey
))
!=
0
;
}
This
->
SrcOverlayCKey
=
*
CKey
;
This
->
CKeyFlags
|=
DDSD_CKSRCOVERLAY
;
break
;
case
DDCKEY_SRCBLT
:
if
(
!
(
This
->
CKeyFlags
&
DDSD_CKSRCBLT
))
{
dirtify
=
TRUE
;
}
else
{
dirtify
=
memcmp
(
&
This
->
SrcBltCKey
,
CKey
,
sizeof
(
*
CKey
))
!=
0
;
}
This
->
SrcBltCKey
=
*
CKey
;
This
->
CKeyFlags
|=
DDSD_CKSRCBLT
;
break
;
}
}
else
{
switch
(
Flags
&
~
DDCKEY_COLORSPACE
)
{
case
DDCKEY_DESTBLT
:
dirtify
=
This
->
CKeyFlags
&
DDSD_CKDESTBLT
;
This
->
CKeyFlags
&=
~
DDSD_CKDESTBLT
;
break
;
case
DDCKEY_DESTOVERLAY
:
dirtify
=
This
->
CKeyFlags
&
DDSD_CKDESTOVERLAY
;
This
->
CKeyFlags
&=
~
DDSD_CKDESTOVERLAY
;
break
;
case
DDCKEY_SRCOVERLAY
:
dirtify
=
This
->
CKeyFlags
&
DDSD_CKSRCOVERLAY
;
This
->
CKeyFlags
&=
~
DDSD_CKSRCOVERLAY
;
break
;
case
DDCKEY_SRCBLT
:
dirtify
=
This
->
CKeyFlags
&
DDSD_CKSRCBLT
;
This
->
CKeyFlags
&=
~
DDSD_CKSRCBLT
;
break
;
}
}
if
(
dirtify
)
{
TRACE
(
"Color key changed, dirtifing surface
\n
"
);
This
->
Flags
|=
SFLAG_DIRTY
;
}
return
WINED3D_OK
;
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_PrivateSetup
(
IWineD3DSurface
*
iface
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
9b29fb68
...
...
@@ -835,6 +835,14 @@ struct IWineD3DSurfaceImpl
/* For GetDC */
wineD3DSurface_DIB
dib
;
HDC
hDC
;
/* Color keys for DDraw */
DDCOLORKEY
DestBltCKey
;
DDCOLORKEY
DestOverlayCKey
;
DDCOLORKEY
SrcOverlayCKey
;
DDCOLORKEY
SrcBltCKey
;
DWORD
CKeyFlags
;
};
extern
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
;
...
...
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