Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shaun Ren
wine
Commits
d5ca917a
Commit
d5ca917a
authored
21 years ago
by
Raphael Junqueira
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
- some cosmetic fixes
- fix a bug on IDirect3DVolume8Impl_AddDirtyBox
parent
8ca7e0af
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/d3d8/surface.c
+13
-1
13 additions, 1 deletion
dlls/d3d8/surface.c
dlls/d3d8/volume.c
+28
-10
28 additions, 10 deletions
dlls/d3d8/volume.c
with
41 additions
and
11 deletions
dlls/d3d8/surface.c
+
13
−
1
View file @
d5ca917a
/*
* IDirect3DSurface8 implementation
*
* Copyright 2002 Jason Edmeades
* Copyright 2002-2003 Jason Edmeades
* Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -20,6 +21,8 @@
#include
"config.h"
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include
"windef.h"
#include
"winbase.h"
#include
"winuser.h"
...
...
@@ -76,21 +79,25 @@ HRESULT WINAPI IDirect3DSurface8Impl_GetDevice(LPDIRECT3DSURFACE8 iface, IDirect
IDirect3DDevice8Impl_AddRef
(
*
ppDevice
);
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DSurface8Impl_SetPrivateData
(
LPDIRECT3DSURFACE8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
ICOM_THIS
(
IDirect3DSurface8Impl
,
iface
);
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DSurface8Impl_GetPrivateData
(
LPDIRECT3DSURFACE8
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
ICOM_THIS
(
IDirect3DSurface8Impl
,
iface
);
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DSurface8Impl_FreePrivateData
(
LPDIRECT3DSURFACE8
iface
,
REFGUID
refguid
)
{
ICOM_THIS
(
IDirect3DSurface8Impl
,
iface
);
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DSurface8Impl_GetContainer
(
LPDIRECT3DSURFACE8
iface
,
REFIID
riid
,
void
**
ppContainer
)
{
ICOM_THIS
(
IDirect3DSurface8Impl
,
iface
);
HRESULT
res
;
...
...
@@ -106,6 +113,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_GetContainer(LPDIRECT3DSURFACE8 iface, REFI
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
*
ppContainer
);
return
res
;
}
HRESULT
WINAPI
IDirect3DSurface8Impl_GetDesc
(
LPDIRECT3DSURFACE8
iface
,
D3DSURFACE_DESC
*
pDesc
)
{
ICOM_THIS
(
IDirect3DSurface8Impl
,
iface
);
...
...
@@ -113,6 +121,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface, D3DSURFAC
memcpy
(
pDesc
,
&
This
->
myDesc
,
sizeof
(
D3DSURFACE_DESC
));
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DSurface8Impl_LockRect
(
LPDIRECT3DSURFACE8
iface
,
D3DLOCKED_RECT
*
pLockedRect
,
CONST
RECT
*
pRect
,
DWORD
Flags
)
{
HRESULT
hr
;
ICOM_THIS
(
IDirect3DSurface8Impl
,
iface
);
...
...
@@ -254,6 +263,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_LockRect(LPDIRECT3DSURFACE8 iface, D3DLOCKE
This
->
locked
=
TRUE
;
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DSurface8Impl_UnlockRect
(
LPDIRECT3DSURFACE8
iface
)
{
ICOM_THIS
(
IDirect3DSurface8Impl
,
iface
);
...
...
@@ -374,6 +384,7 @@ unlock_end:
return
D3D_OK
;
}
ICOM_VTABLE
(
IDirect3DSurface8
)
Direct3DSurface8_Vtbl
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
...
...
@@ -390,6 +401,7 @@ ICOM_VTABLE(IDirect3DSurface8) Direct3DSurface8_Vtbl =
IDirect3DSurface8Impl_UnlockRect
,
};
HRESULT
WINAPI
IDirect3DSurface8Impl_LoadTexture
(
LPDIRECT3DSURFACE8
iface
,
GLenum
gl_target
,
GLenum
gl_level
)
{
ICOM_THIS
(
IDirect3DSurface8Impl
,
iface
);
...
...
This diff is collapsed.
Click to expand it.
dlls/d3d8/volume.c
+
28
−
10
View file @
d5ca917a
/*
* IDirect3DVolume8 implementation
*
* Copyright 2002 Jason Edmeades
* Copyright 2002-2003 Jason Edmeades
* Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -20,6 +21,8 @@
#include
"config.h"
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include
"windef.h"
#include
"winbase.h"
#include
"winuser.h"
...
...
@@ -31,8 +34,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
/* IDirect3DVolume IUnknown parts follow: */
HRESULT
WINAPI
IDirect3DVolume8Impl_QueryInterface
(
LPDIRECT3DVOLUME8
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
HRESULT
WINAPI
IDirect3DVolume8Impl_QueryInterface
(
LPDIRECT3DVOLUME8
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ICOM_THIS
(
IDirect3DVolume8Impl
,
iface
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
...
...
@@ -42,7 +44,7 @@ HRESULT WINAPI IDirect3DVolume8Impl_QueryInterface(LPDIRECT3DVOLUME8 iface,REFII
return
D3D_OK
;
}
WARN
(
"(%p)->(%s,%p)
,
not found
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
WARN
(
"(%p)->(%s,%p)
not found
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
...
...
@@ -75,16 +77,19 @@ HRESULT WINAPI IDirect3DVolume8Impl_GetDevice(LPDIRECT3DVOLUME8 iface, IDirect3D
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DVolume8Impl_SetPrivateData
(
LPDIRECT3DVOLUME8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
ICOM_THIS
(
IDirect3DVolume8Impl
,
iface
);
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DVolume8Impl_GetPrivateData
(
LPDIRECT3DVOLUME8
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
ICOM_THIS
(
IDirect3DVolume8Impl
,
iface
);
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DVolume8Impl_FreePrivateData
(
LPDIRECT3DVOLUME8
iface
,
REFGUID
refguid
)
{
ICOM_THIS
(
IDirect3DVolume8Impl
,
iface
);
FIXME
(
"(%p) : stub
\n
"
,
This
);
...
...
@@ -98,12 +103,14 @@ HRESULT WINAPI IDirect3DVolume8Impl_GetContainer(LPDIRECT3DVOLUME8 iface, REFIID
IUnknown_AddRef
(
This
->
Container
);
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DVolume8Impl_GetDesc
(
LPDIRECT3DVOLUME8
iface
,
D3DVOLUME_DESC
*
pDesc
)
{
ICOM_THIS
(
IDirect3DVolume8Impl
,
iface
);
TRACE
(
"(%p) : copying into %p
\n
"
,
This
,
pDesc
);
memcpy
(
pDesc
,
&
This
->
myDesc
,
sizeof
(
D3DVOLUME_DESC
));
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DVolume8Impl_LockBox
(
LPDIRECT3DVOLUME8
iface
,
D3DLOCKED_BOX
*
pLockedVolume
,
CONST
D3DBOX
*
pBox
,
DWORD
Flags
)
{
ICOM_THIS
(
IDirect3DVolume8Impl
,
iface
);
FIXME
(
"(%p) : pBox=%p stub
\n
"
,
This
,
pBox
);
...
...
@@ -162,6 +169,7 @@ HRESULT WINAPI IDirect3DVolume8Impl_LockBox(LPDIRECT3DVOLUME8 iface, D3DLOCKED_B
TRACE
(
"returning memory@%p rpitch(%d) spitch(%d)
\n
"
,
pLockedVolume
->
pBits
,
pLockedVolume
->
RowPitch
,
pLockedVolume
->
SlicePitch
);
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DVolume8Impl_UnlockBox
(
LPDIRECT3DVOLUME8
iface
)
{
ICOM_THIS
(
IDirect3DVolume8Impl
,
iface
);
if
(
FALSE
==
This
->
locked
)
{
...
...
@@ -191,6 +199,7 @@ ICOM_VTABLE(IDirect3DVolume8) Direct3DVolume8_Vtbl =
IDirect3DVolume8Impl_UnlockBox
};
HRESULT
WINAPI
IDirect3DVolume8Impl_CleanDirtyBox
(
LPDIRECT3DVOLUME8
iface
)
{
ICOM_THIS
(
IDirect3DVolume8Impl
,
iface
);
This
->
Dirty
=
FALSE
;
...
...
@@ -210,11 +219,20 @@ HRESULT WINAPI IDirect3DVolume8Impl_CleanDirtyBox(LPDIRECT3DVOLUME8 iface) {
HRESULT
WINAPI
IDirect3DVolume8Impl_AddDirtyBox
(
LPDIRECT3DVOLUME8
iface
,
CONST
D3DBOX
*
pDirtyBox
)
{
ICOM_THIS
(
IDirect3DVolume8Impl
,
iface
);
This
->
Dirty
=
TRUE
;
This
->
lockedBox
.
Left
=
min
(
This
->
lockedBox
.
Left
,
pDirtyBox
->
Left
);
This
->
lockedBox
.
Top
=
min
(
This
->
lockedBox
.
Top
,
pDirtyBox
->
Top
);
This
->
lockedBox
.
Front
=
min
(
This
->
lockedBox
.
Front
,
pDirtyBox
->
Front
);
This
->
lockedBox
.
Right
=
max
(
This
->
lockedBox
.
Right
,
pDirtyBox
->
Right
);
This
->
lockedBox
.
Bottom
=
max
(
This
->
lockedBox
.
Bottom
,
pDirtyBox
->
Bottom
);
This
->
lockedBox
.
Back
=
max
(
This
->
lockedBox
.
Back
,
pDirtyBox
->
Back
);
if
(
NULL
!=
pDirtyBox
)
{
This
->
lockedBox
.
Left
=
min
(
This
->
lockedBox
.
Left
,
pDirtyBox
->
Left
);
This
->
lockedBox
.
Top
=
min
(
This
->
lockedBox
.
Top
,
pDirtyBox
->
Top
);
This
->
lockedBox
.
Front
=
min
(
This
->
lockedBox
.
Front
,
pDirtyBox
->
Front
);
This
->
lockedBox
.
Right
=
max
(
This
->
lockedBox
.
Right
,
pDirtyBox
->
Right
);
This
->
lockedBox
.
Bottom
=
max
(
This
->
lockedBox
.
Bottom
,
pDirtyBox
->
Bottom
);
This
->
lockedBox
.
Back
=
max
(
This
->
lockedBox
.
Back
,
pDirtyBox
->
Back
);
}
else
{
This
->
lockedBox
.
Left
=
0
;
This
->
lockedBox
.
Top
=
0
;
This
->
lockedBox
.
Front
=
0
;
This
->
lockedBox
.
Right
=
This
->
myDesc
.
Width
;
This
->
lockedBox
.
Bottom
=
This
->
myDesc
.
Height
;
This
->
lockedBox
.
Back
=
This
->
myDesc
.
Depth
;
}
return
D3D_OK
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment