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
49deec61
Commit
49deec61
authored
Oct 05, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: No color keying on surfaces with an alpha channel.
parent
3529560c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
63 deletions
+2
-63
surface.c
dlls/wined3d/surface.c
+2
-63
No files found.
dlls/wined3d/surface.c
View file @
49deec61
...
...
@@ -1562,34 +1562,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
*
type
=
GL_UNSIGNED_INT_8_8_8_8
;
}
break
;
#if 0
/* Not sure if we should do color keying on Alpha-Enabled surfaces */
case WINED3DFMT_A4R4G4B4:
if (colorkey_active)
{
*convert = CONVERT_CK_4444_ARGB;
*format = GL_RGBA;
*internal = GL_RGBA;
*type = GL_UNSIGNED_SHORT_4_4_4_4;
}
break;
case WINED3DFMT_A1R5G5B5:
if (colorkey_active)
{
*convert = CONVERT_CK_1555;
}
case WINED3DFMT_A8R8G8B8:
if (colorkey_active)
{
*convert = CONVERT_CK_8888_ARGB;
*format = GL_RGBA;
*internal = GL_RGBA;
*type = GL_UNSIGNED_INT_8_8_8_8;
}
break;
#endif
default:
break
;
}
...
...
@@ -1677,8 +1650,8 @@ HRESULT d3dfmt_convert_surface(BYTE *src, BYTE *dst, unsigned long len, CONVERT_
prevent 'color bleeding'. This will be done later on if ever it is
too visible.
Note2:
when using color-keying + alpha, are the alpha bits part of the
color-space or not ?
Note2:
Nvidia documents say that their driver does not support alpha + color keying
on the same surface and disables color keying in such a case
*/
unsigned
int
x
;
WORD
*
Source
=
(
WORD
*
)
src
;
...
...
@@ -1698,40 +1671,6 @@ HRESULT d3dfmt_convert_surface(BYTE *src, BYTE *dst, unsigned long len, CONVERT_
}
break
;
case
CONVERT_CK_1555
:
{
unsigned
int
x
;
WORD
*
Source
=
(
WORD
*
)
src
;
WORD
*
Dest
=
(
WORD
*
)
dst
;
for
(
x
=
0
;
x
<
len
*
sizeof
(
WORD
);
x
+=
sizeof
(
WORD
))
{
WORD
color
=
*
Source
++
;
*
Dest
=
(
color
&
0x7FFF
);
if
((
color
<
surf
->
SrcBltCKey
.
dwColorSpaceLowValue
)
||
(
color
>
surf
->
SrcBltCKey
.
dwColorSpaceHighValue
))
*
Dest
|=
(
color
&
0x8000
);
Dest
++
;
}
}
break
;
case
CONVERT_CK_4444_ARGB
:
{
/* Move the four Alpha bits... */
unsigned
int
x
;
WORD
*
Source
=
(
WORD
*
)
src
;
WORD
*
Dest
=
(
WORD
*
)
dst
;
for
(
x
=
0
;
x
<
len
;
x
++
)
{
WORD
color
=
*
Source
++
;
*
dst
=
(
color
&
0x0FFF
)
<<
4
;
if
((
color
<
surf
->
SrcBltCKey
.
dwColorSpaceLowValue
)
||
(
color
>
surf
->
SrcBltCKey
.
dwColorSpaceHighValue
))
*
Dest
|=
(
color
&
0xF000
)
>>
12
;
Dest
++
;
}
}
break
;
default:
ERR
(
"Unsupported conversation type %d
\n
"
,
convert
);
}
...
...
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