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
df422cf0
Commit
df422cf0
authored
Apr 10, 2008
by
Alexander Dorofeyev
Committed by
Alexandre Julliard
Apr 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Add colorkeyed blit to p8_primary_test.
parent
d8ae8a87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
visual.c
dlls/ddraw/tests/visual.c
+24
-1
No files found.
dlls/ddraw/tests/visual.c
View file @
df422cf0
/*
* Copyright (C) 2007 Stefan Dsinger(for CodeWeavers)
* Copyright (C) 2008 Alexander Dorofeyev
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -2165,6 +2166,7 @@ static void p8_primary_test()
DDBLTFX
ddbltfx
;
COLORREF
color
;
RECT
rect
;
DDCOLORKEY
clrKey
;
unsigned
differences
;
/* An IDirect3DDevice cannot be queryInterfaced from an IDirect3DDevice7 on windows */
...
...
@@ -2275,12 +2277,13 @@ static void p8_primary_test()
ok
(
colortables_check_equality
(
entries
,
coltable
),
"unexpected colortable on offscreen surface
\n
"
);
p8_surface_fill_rect
(
offscreen
,
0
,
0
,
16
,
16
,
1
);
p8_surface_fill_rect
(
offscreen
,
0
,
0
,
16
,
16
,
2
);
memset
(
entries
,
0
,
sizeof
(
entries
));
entries
[
0
].
peRed
=
0xff
;
entries
[
1
].
peGreen
=
0xff
;
entries
[
2
].
peBlue
=
0xff
;
entries
[
3
].
peRed
=
0x80
;
hr
=
IDirectDrawPalette_SetEntries
(
ddprimpal
,
0
,
0
,
256
,
entries
);
ok
(
hr
==
DD_OK
,
"IDirectDrawPalette_SetEntries failed with %08x
\n
"
,
hr
);
...
...
@@ -2288,10 +2291,30 @@ static void p8_primary_test()
ok
(
hr
==
DD_OK
,
"IDirectDrawSurface_BltFast returned: %x
\n
"
,
hr
);
color
=
getPixelColor_GDI
(
Surface1
,
1
,
1
);
ok
(
GetRValue
(
color
)
==
0
&&
GetGValue
(
color
)
==
0x00
&&
GetBValue
(
color
)
==
0xFF
,
"got R %02X G %02X B %02X, expected R 00 G 00 B FF
\n
"
,
GetRValue
(
color
),
GetGValue
(
color
),
GetBValue
(
color
));
/* Color keyed blit. */
p8_surface_fill_rect
(
offscreen
,
0
,
0
,
8
,
8
,
3
);
clrKey
.
dwColorSpaceLowValue
=
3
;
clrKey
.
dwColorSpaceHighValue
=
3
;
hr
=
IDirectDrawSurface_SetColorKey
(
offscreen
,
DDCKEY_SRCBLT
,
&
clrKey
);
ok
(
hr
==
D3D_OK
,
"IDirectDrawSurfac_SetColorKey returned: %x
\n
"
,
hr
);
hr
=
IDirectDrawSurface_BltFast
(
Surface1
,
100
,
100
,
offscreen
,
NULL
,
DDBLTFAST_SRCCOLORKEY
);
ok
(
hr
==
DD_OK
,
"IDirectDrawSurface_BltFast returned: %x
\n
"
,
hr
);
color
=
getPixelColor_GDI
(
Surface1
,
105
,
105
);
ok
(
GetRValue
(
color
)
==
0
&&
GetGValue
(
color
)
==
0xFF
&&
GetBValue
(
color
)
==
0
,
"got R %02X G %02X B %02X, expected R 00 G FF B 00
\n
"
,
GetRValue
(
color
),
GetGValue
(
color
),
GetBValue
(
color
));
color
=
getPixelColor_GDI
(
Surface1
,
112
,
112
);
ok
(
GetRValue
(
color
)
==
0
&&
GetGValue
(
color
)
==
0x00
&&
GetBValue
(
color
)
==
0xFF
,
"got R %02X G %02X B %02X, expected R 00 G 00 B FF
\n
"
,
GetRValue
(
color
),
GetGValue
(
color
),
GetBValue
(
color
));
/* Test blitting and locking patterns that are likely to trigger bugs in opengl renderer (p8
surface conversion and uploading/downloading to/from opengl texture). Similar patterns (
blitting front buffer areas to/from an offscreen surface mixed with locking) are used by C&C
...
...
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