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
7eaf1fe2
Commit
7eaf1fe2
authored
May 20, 2007
by
David Adam
Committed by
Alexandre Julliard
May 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Implement D3DRMCreateColorRGB.
parent
21b7413d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
1 deletion
+17
-1
d3drm.spec
dlls/d3drm/d3drm.spec
+1
-1
math.c
dlls/d3drm/math.c
+5
-0
vector.c
dlls/d3drm/tests/vector.c
+10
-0
d3drmdef.h
include/d3drmdef.h
+1
-0
No files found.
dlls/d3drm/d3drm.spec
View file @
7eaf1fe2
...
...
@@ -2,7 +2,7 @@
@ stdcall D3DRMColorGetBlue(long)
@ stdcall D3DRMColorGetGreen(long)
@ stdcall D3DRMColorGetRed(long)
@ st
ub D3DRMCreateColorRGB
@ st
dcall D3DRMCreateColorRGB(long long long)
@ stdcall D3DRMCreateColorRGBA(long long long long)
@ stdcall D3DRMMatrixFromQuaternion(ptr ptr)
@ stdcall D3DRMQuaternionFromRotation(ptr ptr long)
...
...
dlls/d3drm/math.c
View file @
7eaf1fe2
...
...
@@ -34,6 +34,11 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3drm
);
/* Create a RGB color from its components */
D3DCOLOR
WINAPI
D3DRMCreateColorRGB
(
D3DVALUE
red
,
D3DVALUE
green
,
D3DVALUE
blue
)
{
return
(
D3DRMCreateColorRGBA
(
red
,
green
,
blue
,
255
.
0
));
}
/* Create a RGBA color from its components */
D3DCOLOR
WINAPI
D3DRMCreateColorRGBA
(
D3DVALUE
red
,
D3DVALUE
green
,
D3DVALUE
blue
,
D3DVALUE
alpha
)
{
...
...
dlls/d3drm/tests/vector.c
View file @
7eaf1fe2
...
...
@@ -79,6 +79,7 @@ static LPD3DVECTOR (WINAPI * pD3DRMVectorScale)(LPD3DVECTOR, LPD3DVECTOR, D3DVAL
static
LPD3DVECTOR
(
WINAPI
*
pD3DRMVectorSubtract
)(
LPD3DVECTOR
,
LPD3DVECTOR
,
LPD3DVECTOR
);
static
LPD3DRMQUATERNION
(
WINAPI
*
pD3DRMQuaternionFromRotation
)(
LPD3DRMQUATERNION
,
LPD3DVECTOR
,
D3DVALUE
);
static
LPD3DRMQUATERNION
(
WINAPI
*
pD3DRMQuaternionSlerp
)(
LPD3DRMQUATERNION
,
LPD3DRMQUATERNION
,
LPD3DRMQUATERNION
,
D3DVALUE
);
static
D3DCOLOR
(
WINAPI
*
pD3DRMCreateColorRGB
)(
D3DVALUE
,
D3DVALUE
,
D3DVALUE
);
static
D3DCOLOR
(
WINAPI
*
pD3DRMCreateColorRGBA
)(
D3DVALUE
,
D3DVALUE
,
D3DVALUE
,
D3DVALUE
);
static
D3DVALUE
(
WINAPI
*
pD3DRMColorGetAlpha
)(
D3DCOLOR
);
static
D3DVALUE
(
WINAPI
*
pD3DRMColorGetBlue
)(
D3DCOLOR
);
...
...
@@ -115,6 +116,7 @@ static BOOL InitFunctionPtrs(void)
D3DRM_GET_PROC
(
D3DRMVectorSubtract
)
D3DRM_GET_PROC
(
D3DRMQuaternionFromRotation
)
D3DRM_GET_PROC
(
D3DRMQuaternionSlerp
)
D3DRM_GET_PROC
(
D3DRMCreateColorRGB
)
D3DRM_GET_PROC
(
D3DRMCreateColorRGBA
)
D3DRM_GET_PROC
(
D3DRMColorGetAlpha
)
D3DRM_GET_PROC
(
D3DRMColorGetBlue
)
...
...
@@ -261,6 +263,14 @@ static void ColorTest(void)
D3DCOLOR
color
,
expected_color
,
got_color
;
D3DVALUE
expected
,
got
,
red
,
green
,
blue
,
alpha
;
/*___________D3DRMCreateColorRGB_________________________*/
red
=
0
.
8
;
green
=
0
.
3
;
blue
=
0
.
55
;
expected_color
=
0xffcc4c8c
;
got_color
=
pD3DRMCreateColorRGB
(
red
,
green
,
blue
);
ok
((
expected_color
==
got_color
),
"Expected color=%x, Got color=%x
\n
"
,
expected_color
,
got_color
);
/*___________D3DRMCreateColorRGBA________________________*/
red
=
0
.
1
;
green
=
0
.
4
;
...
...
include/d3drmdef.h
View file @
7eaf1fe2
...
...
@@ -54,6 +54,7 @@ LPD3DVECTOR WINAPI D3DRMVectorReflect(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
LPD3DVECTOR
WINAPI
D3DRMVectorScale
(
LPD3DVECTOR
,
LPD3DVECTOR
,
D3DVALUE
);
LPD3DVECTOR
WINAPI
D3DRMVectorSubtract
(
LPD3DVECTOR
,
LPD3DVECTOR
,
LPD3DVECTOR
);
D3DCOLOR
WINAPI
D3DRMCreateColorRGB
(
D3DVALUE
,
D3DVALUE
,
D3DVALUE
);
D3DCOLOR
WINAPI
D3DRMCreateColorRGBA
(
D3DVALUE
,
D3DVALUE
,
D3DVALUE
,
D3DVALUE
);
D3DVALUE
WINAPI
D3DRMColorGetAlpha
(
D3DCOLOR
);
D3DVALUE
WINAPI
D3DRMColorGetBlue
(
D3DCOLOR
);
...
...
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