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
4569cbe8
Commit
4569cbe8
authored
Jun 09, 2017
by
Matteo Bruni
Committed by
Alexandre Julliard
Jun 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Move set_number() into d3dx9_private.h.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
74d93d9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
91 deletions
+82
-91
d3dx9_private.h
dlls/d3dx9_36/d3dx9_private.h
+82
-2
util.c
dlls/d3dx9_36/util.c
+0
-89
No files found.
dlls/d3dx9_36/d3dx9_private.h
View file @
4569cbe8
...
...
@@ -123,8 +123,88 @@ const char *debug_d3dxparameter_type(D3DXPARAMETER_TYPE t) DECLSPEC_HIDDEN;
const
char
*
debug_d3dxparameter_registerset
(
D3DXREGISTER_SET
r
)
DECLSPEC_HIDDEN
;
/* parameter type conversion helpers */
void
set_number
(
void
*
outdata
,
D3DXPARAMETER_TYPE
outtype
,
const
void
*
indata
,
D3DXPARAMETER_TYPE
intype
)
DECLSPEC_HIDDEN
;
static
inline
BOOL
get_bool
(
D3DXPARAMETER_TYPE
type
,
const
void
*
data
)
{
switch
(
type
)
{
case
D3DXPT_FLOAT
:
case
D3DXPT_INT
:
case
D3DXPT_BOOL
:
return
!!*
(
DWORD
*
)
data
;
case
D3DXPT_VOID
:
return
*
(
BOOL
*
)
data
;
default:
return
FALSE
;
}
}
static
inline
int
get_int
(
D3DXPARAMETER_TYPE
type
,
const
void
*
data
)
{
switch
(
type
)
{
case
D3DXPT_FLOAT
:
return
(
int
)(
*
(
float
*
)
data
);
case
D3DXPT_INT
:
case
D3DXPT_VOID
:
return
*
(
int
*
)
data
;
case
D3DXPT_BOOL
:
return
get_bool
(
type
,
data
);
default:
return
0
;
}
}
static
inline
float
get_float
(
D3DXPARAMETER_TYPE
type
,
const
void
*
data
)
{
switch
(
type
)
{
case
D3DXPT_FLOAT
:
case
D3DXPT_VOID
:
return
*
(
float
*
)
data
;
case
D3DXPT_INT
:
return
(
float
)(
*
(
int
*
)
data
);
case
D3DXPT_BOOL
:
return
(
float
)
get_bool
(
type
,
data
);
default:
return
0
.
0
f
;
}
}
static
inline
void
set_number
(
void
*
outdata
,
D3DXPARAMETER_TYPE
outtype
,
const
void
*
indata
,
D3DXPARAMETER_TYPE
intype
)
{
if
(
outtype
==
intype
)
{
*
(
DWORD
*
)
outdata
=
*
(
DWORD
*
)
indata
;
return
;
}
switch
(
outtype
)
{
case
D3DXPT_FLOAT
:
*
(
float
*
)
outdata
=
get_float
(
intype
,
indata
);
break
;
case
D3DXPT_BOOL
:
*
(
BOOL
*
)
outdata
=
get_bool
(
intype
,
indata
);
break
;
case
D3DXPT_INT
:
*
(
int
*
)
outdata
=
get_int
(
intype
,
indata
);
break
;
default:
*
(
DWORD
*
)
outdata
=
0
;
break
;
}
}
static
inline
BOOL
is_param_type_sampler
(
D3DXPARAMETER_TYPE
type
)
{
...
...
dlls/d3dx9_36/util.c
View file @
4569cbe8
...
...
@@ -291,95 +291,6 @@ const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r)
#undef WINE_D3DX_TO_STR
/* parameter type conversion helpers */
static
BOOL
get_bool
(
D3DXPARAMETER_TYPE
type
,
const
void
*
data
)
{
switch
(
type
)
{
case
D3DXPT_FLOAT
:
case
D3DXPT_INT
:
case
D3DXPT_BOOL
:
return
*
(
DWORD
*
)
data
!=
0
;
case
D3DXPT_VOID
:
return
*
(
BOOL
*
)
data
;
default:
FIXME
(
"Unhandled type %s.
\n
"
,
debug_d3dxparameter_type
(
type
));
return
FALSE
;
}
}
static
INT
get_int
(
D3DXPARAMETER_TYPE
type
,
const
void
*
data
)
{
switch
(
type
)
{
case
D3DXPT_FLOAT
:
return
(
INT
)(
*
(
FLOAT
*
)
data
);
case
D3DXPT_INT
:
case
D3DXPT_VOID
:
return
*
(
INT
*
)
data
;
case
D3DXPT_BOOL
:
return
get_bool
(
type
,
data
);
default:
FIXME
(
"Unhandled type %s.
\n
"
,
debug_d3dxparameter_type
(
type
));
return
0
;
}
}
static
FLOAT
get_float
(
D3DXPARAMETER_TYPE
type
,
const
void
*
data
)
{
switch
(
type
)
{
case
D3DXPT_FLOAT
:
case
D3DXPT_VOID
:
return
*
(
FLOAT
*
)
data
;
case
D3DXPT_INT
:
return
(
FLOAT
)(
*
(
INT
*
)
data
);
case
D3DXPT_BOOL
:
return
(
FLOAT
)
get_bool
(
type
,
data
);
default:
FIXME
(
"Unhandled type %s.
\n
"
,
debug_d3dxparameter_type
(
type
));
return
0
.
0
f
;
}
}
void
set_number
(
void
*
outdata
,
D3DXPARAMETER_TYPE
outtype
,
const
void
*
indata
,
D3DXPARAMETER_TYPE
intype
)
{
if
(
outtype
==
intype
)
{
*
(
DWORD
*
)
outdata
=
*
(
DWORD
*
)
indata
;
return
;
}
switch
(
outtype
)
{
case
D3DXPT_FLOAT
:
*
(
FLOAT
*
)
outdata
=
get_float
(
intype
,
indata
);
break
;
case
D3DXPT_BOOL
:
*
(
BOOL
*
)
outdata
=
get_bool
(
intype
,
indata
);
break
;
case
D3DXPT_INT
:
*
(
INT
*
)
outdata
=
get_int
(
intype
,
indata
);
break
;
default:
FIXME
(
"Unhandled type %s.
\n
"
,
debug_d3dxparameter_type
(
outtype
));
*
(
DWORD
*
)
outdata
=
0
;
break
;
}
}
/***********************************************************************
* D3DXDebugMute
* Returns always FALSE for us.
...
...
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