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
217516ce
Commit
217516ce
authored
Nov 10, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Define NONAMELESSUNION and NONAMELESSSTRUCT in d3drm_private.h.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2bdc13ef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
29 deletions
+20
-29
d3drm_private.h
dlls/d3drm/d3drm_private.h
+4
-1
device.c
dlls/d3drm/device.c
+3
-7
math.c
dlls/d3drm/math.c
+0
-2
meshbuilder.c
dlls/d3drm/meshbuilder.c
+3
-7
viewport.c
dlls/d3drm/viewport.c
+10
-12
No files found.
dlls/d3drm/d3drm_private.h
View file @
217516ce
...
...
@@ -21,12 +21,15 @@
#ifndef __D3DRM_PRIVATE_INCLUDED__
#define __D3DRM_PRIVATE_INCLUDED__
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define COBJMACROS
#include <assert.h>
#include <math.h>
#include "d3drm.h"
#include "dxfile.h"
#include "d3drmwin.h"
#include "wine/debug.h"
#include "wine/list.h"
#ifndef ARRAY_SIZE
...
...
dlls/d3drm/device.c
View file @
217516ce
...
...
@@ -18,14 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <assert.h>
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "config.h"
#include "wine/port.h"
#include "d3drm_private.h"
#include "initguid.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3drm
);
...
...
@@ -163,7 +159,7 @@ HRESULT d3drm_device_init(struct d3drm_device *device, UINT version, IDirectDraw
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_ZBUFFERBITDEPTH
|
DDSD_WIDTH
|
DDSD_HEIGHT
;
surface_desc
.
ddsCaps
.
dwCaps
=
DDSCAPS_ZBUFFER
;
surface_desc
.
dwZBufferBitDepth
=
16
;
surface_desc
.
u2
.
dwZBufferBitDepth
=
16
;
surface_desc
.
dwWidth
=
desc
.
dwWidth
;
surface_desc
.
dwHeight
=
desc
.
dwHeight
;
hr
=
IDirectDraw_CreateSurface
(
ddraw
,
&
surface_desc
,
&
ds
,
NULL
);
...
...
dlls/d3drm/math.c
View file @
217516ce
...
...
@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSUNION
#include "config.h"
#include "wine/port.h"
...
...
dlls/d3drm/meshbuilder.c
View file @
217516ce
...
...
@@ -19,15 +19,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSUNION
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "rmxfguid.h"
#include "config.h"
#include "wine/port.h"
#include "d3drm_private.h"
#include "rmxfguid.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3drm
);
...
...
dlls/d3drm/viewport.c
View file @
217516ce
...
...
@@ -18,10 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "config.h"
#include "wine/port.h"
#include "d3drm_private.h"
...
...
@@ -39,10 +37,10 @@ static inline struct d3drm_viewport *impl_from_IDirect3DRMViewport2(IDirect3DRMV
static
inline
void
d3drm_normalize_d3d_color
(
D3DCOLORVALUE
*
color_value
,
D3DCOLOR
color
)
{
color_value
->
r
=
RGBA_GETRED
(
color
)
/
255
.
0
f
;
color_value
->
g
=
RGBA_GETGREEN
(
color
)
/
255
.
0
f
;
color_value
->
b
=
RGBA_GETBLUE
(
color
)
/
255
.
0
f
;
color_value
->
a
=
RGBA_GETALPHA
(
color
)
/
255
.
0
f
;
color_value
->
u1
.
r
=
RGBA_GETRED
(
color
)
/
255
.
0
f
;
color_value
->
u2
.
g
=
RGBA_GETGREEN
(
color
)
/
255
.
0
f
;
color_value
->
u3
.
b
=
RGBA_GETBLUE
(
color
)
/
255
.
0
f
;
color_value
->
u4
.
a
=
RGBA_GETALPHA
(
color
)
/
255
.
0
f
;
}
static
HRESULT
d3drm_update_background_material
(
struct
d3drm_viewport
*
viewport
)
...
...
@@ -58,7 +56,7 @@ static HRESULT d3drm_update_background_material(struct d3drm_viewport *viewport)
memset
(
&
mat
,
0
,
sizeof
(
mat
));
mat
.
dwSize
=
sizeof
(
mat
);
d3drm_normalize_d3d_color
(
&
mat
.
diffuse
,
color
);
d3drm_normalize_d3d_color
(
&
mat
.
u
.
diffuse
,
color
);
return
IDirect3DMaterial_SetMaterial
(
viewport
->
material
,
&
mat
);
}
...
...
@@ -427,9 +425,9 @@ static HRESULT WINAPI d3drm_viewport2_Clear(IDirect3DRMViewport2 *iface, DWORD f
TRACE
(
"iface %p, flags %#x.
\n
"
,
iface
,
flags
);
clear_rect
.
x1
=
clear_rect
.
y1
=
0
;
clear_rect
.
x2
=
viewport
->
device
->
width
;
clear_rect
.
y2
=
viewport
->
device
->
height
;
clear_rect
.
u1
.
x1
=
clear_rect
.
u2
.
y1
=
0
;
clear_rect
.
u3
.
x2
=
viewport
->
device
->
width
;
clear_rect
.
u4
.
y2
=
viewport
->
device
->
height
;
if
(
flags
&
D3DRMCLEAR_TARGET
)
{
...
...
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