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
9bfbfcbe
Commit
9bfbfcbe
authored
Jun 23, 2006
by
Francois Gouget
Committed by
Alexandre Julliard
Jun 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assorted spelling, case and grammar fixes.
parent
9607151e
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
158 additions
and
158 deletions
+158
-158
clipper.c
dlls/ddraw/clipper.c
+2
-2
ddraw.c
dlls/ddraw/ddraw.c
+63
-63
ddraw_private.h
dlls/ddraw/ddraw_private.h
+4
-4
device.c
dlls/ddraw/device.c
+35
-35
direct3d.c
dlls/ddraw/direct3d.c
+11
-11
executebuffer.c
dlls/ddraw/executebuffer.c
+1
-1
gamma.c
dlls/ddraw/gamma.c
+1
-1
main.c
dlls/ddraw/main.c
+4
-4
surface.c
dlls/ddraw/surface.c
+22
-22
d3d.c
dlls/ddraw/tests/d3d.c
+1
-1
utils.c
dlls/ddraw/utils.c
+5
-5
vertexbuffer.c
dlls/ddraw/vertexbuffer.c
+2
-2
viewport.c
dlls/ddraw/viewport.c
+1
-1
shlfolder.c
dlls/shell32/shlfolder.c
+1
-1
device.c
dlls/wined3d/device.c
+1
-1
stateblock.c
dlls/wined3d/stateblock.c
+1
-1
surface_gdi.c
dlls/wined3d/surface_gdi.c
+1
-1
utils.c
dlls/wined3d/utils.c
+1
-1
resource.h
programs/winefile/resource.h
+1
-1
No files found.
dlls/ddraw/clipper.c
View file @
9bfbfcbe
...
...
@@ -212,7 +212,7 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetClipList(
*
* Sets or deletes (if lprgn is NULL) the clip list
*
* This implementation is a stu
p
and returns DD_OK always to make the app
* This implementation is a stu
b
and returns DD_OK always to make the app
* happy.
*
* PARAMS
...
...
@@ -265,7 +265,7 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetHWnd(
*
* Return values:
* DD_OK on success
* DDERR_ALREADYINITIALIZED if this interface isn't initialized al
l
ready
* DDERR_ALREADYINITIALIZED if this interface isn't initialized already
*****************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClipperImpl_Initialize
(
LPDIRECTDRAWCLIPPER
iface
,
LPDIRECTDRAW
lpDD
,
DWORD
dwFlags
...
...
dlls/ddraw/ddraw.c
View file @
9bfbfcbe
...
...
@@ -66,7 +66,7 @@ static const DDDEVICEIDENTIFIER2 deviceidentifier =
IDirectDrawImpl
*
ddraw_list
;
/*****************************************************************************
* IUnkown Methods
* IUnk
n
own Methods
*****************************************************************************/
/*****************************************************************************
...
...
@@ -76,7 +76,7 @@ IDirectDrawImpl *ddraw_list;
* IDirectDraw interfaces in version 1, 2, 4 and 7, and IDirect3D interfaces
* in version 1, 2, 3 and 7. An IDirect3DDevice can be created with this
* method.
* The returned interface is AddRef() before it's returned
* The returned interface is AddRef()
-ed
before it's returned
*
* Rules for QueryInterface:
* http://msdn.microsoft.com/library/default.asp? \
...
...
@@ -197,7 +197,7 @@ IDirectDrawImpl_QueryInterface(IDirectDraw7 *iface,
/*****************************************************************************
* IDirectDraw7::AddRef
*
* Increses the interfaces refcount. Used for version 1, 2, 4 and 7
* Incre
a
ses the interfaces refcount. Used for version 1, 2, 4 and 7
*
* Returns: The new refcount
*****************************************************************************/
...
...
@@ -267,7 +267,7 @@ IDirectDrawImpl_Destroy(IDirectDrawImpl *This)
/*****************************************************************************
* IDirectDraw7::Release
*
* Decreses the refcount. If the refcount falls to 0, the object is destroyed
* Decre
a
ses the refcount. If the refcount falls to 0, the object is destroyed
*
* Returns: The new refcount
*****************************************************************************/
...
...
@@ -350,7 +350,7 @@ IDirectDrawImpl_SetupFullscreenWindow(IDirectDrawImpl *This,
* TODO: Should I move it to 0/0 too?
*/
SetWindowPos
(
window
,
0
/* InsertAfter, ignored */
,
0
,
0
,
0
,
0
,
/* Pos, Size, igored */
0
,
0
,
0
,
0
,
/* Pos, Size, ig
n
ored */
SWP_FRAMECHANGED
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
);
}
...
...
@@ -388,14 +388,14 @@ IDirectDrawImpl_RestoreWindow(IDirectDrawImpl *This,
/* Inform the window about the update */
SetWindowPos
(
window
,
0
/* InsertAfter, ignored */
,
0
,
0
,
0
,
0
,
/* Pos, Size, igored */
0
,
0
,
0
,
0
,
/* Pos, Size, ig
n
ored */
SWP_FRAMECHANGED
|
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
);
}
/*****************************************************************************
* IDirectDraw7::SetCooperativeLevel
*
* Sets the cooerative level for the DirectDraw object, and the window
* Sets the coo
p
erative level for the DirectDraw object, and the window
* assigned to it. The cooperative level determines the general behavior
* of the DirectDraw application
*
...
...
@@ -407,7 +407,7 @@ IDirectDrawImpl_RestoreWindow(IDirectDrawImpl *This,
* If you think that this function caused the failure because it writes a
* fixme, be sure to run again with a +ddraw trace.
*
* What is known about cooperative levels(See the ddraw modes test):
* What is known about cooperative levels
(See the ddraw modes test):
* DDSCL_EXCLUSIVE and DDSCL_FULLSCREEN must be used with each other
* DDSCL_NORMAL is not compatible with DDSCL_EXCLUSIVE or DDSCL_FULLSCREEN
* DDSCL_SETFOCUSWINDOW can be passed only in DDSCL_NORMAL mode, but after that
...
...
@@ -415,13 +415,13 @@ IDirectDrawImpl_RestoreWindow(IDirectDrawImpl *This,
* DDSCL_SETFOCUSWINDOW may only be used with DDSCL_NOWINDOWCHANGES
*
* Handled flags: DDSCL_NORMAL, DDSCL_FULLSCREEN, DDSCL_EXCLUSIVE,
* DDSCL_SETFOCUSWINDOW(partially)
* DDSCL_SETFOCUSWINDOW
(partially)
*
* Unhandled flags, which should be implemented
* DDSCL_SETDEVICEWINDOW: Sets a window specially used for rendering(I don't
* DDSCL_SETDEVICEWINDOW: Sets a window specially used for rendering
(I don't
* expect any difference to a normal window for wine)
* DDSCL_CREATEDEVICEWINDOW: Tells ddraw to create it
'
s own window for
* rendering(Possible test case: Half-life)
* DDSCL_CREATEDEVICEWINDOW: Tells ddraw to create its own window for
* rendering
(Possible test case: Half-life)
*
* Unsure about these: DDSCL_FPUSETUP DDSCL_FPURESERVE
*
...
...
@@ -432,8 +432,8 @@ IDirectDrawImpl_RestoreWindow(IDirectDrawImpl *This,
* Returns:
* DD_OK if the cooperative level was set successfully
* DDERR_INVALIDPARAMS if the passed cooperative level combination is invalid
* DDERR_HWNDAL
L
READYSET if DDSCL_SETFOCUSWINDOW is passed in exclusive mode
* (Pro
p
ably others too, have to investigate)
* DDERR_HWNDALREADYSET if DDSCL_SETFOCUSWINDOW is passed in exclusive mode
* (Pro
b
ably others too, have to investigate)
*
*****************************************************************************/
static
HRESULT
WINAPI
...
...
@@ -465,7 +465,7 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface,
return
DDERR_INVALIDPARAMS
;
}
/* Handle those levels first which set varios hwnds */
/* Handle those levels first which set vario
u
s hwnds */
if
(
cooplevel
&
DDSCL_SETFOCUSWINDOW
)
{
/* This isn't compatible with a lot of flags */
...
...
@@ -620,7 +620,7 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface,
* IDirectDraw7::SetDisplayMode
*
* Sets the display screen resolution, color depth and refresh frequency
* when in fullscreen mode(in theory).
* when in fullscreen mode
(in theory).
* Possible return values listed in the SDK suggest that this method fails
* when not in fullscreen mode, but this is wrong. Windows 2000 happily sets
* the display mode in DDSCL_NORMAL mode without an hwnd specified.
...
...
@@ -653,7 +653,7 @@ IDirectDrawImpl_SetDisplayMode(IDirectDraw7 *iface,
if
(
!
Width
||
!
Height
)
{
ERR
(
"Width=%ld, Height=%ld, what to do?
\n
"
,
Width
,
Height
);
/* It looks like Need for
speed Po
sche Unleashed expects DD_OK here */
/* It looks like Need for
Speed Por
sche Unleashed expects DD_OK here */
return
DD_OK
;
}
...
...
@@ -661,8 +661,8 @@ IDirectDrawImpl_SetDisplayMode(IDirectDraw7 *iface,
if(!(This->cooperative_level & DDSCL_EXCLUSIVE))
return DDERR_NOEXCLUSIVEMODE;
* This is WRONG. Don't know if the SDK is completely
* wrong and if there are any coditions when DDERR_NOEXCLUSIVE
* is returned, but Half-Life 1.1.1.1(Steam version)
* wrong and if there are any co
n
ditions when DDERR_NOEXCLUSIVE
* is returned, but Half-Life 1.1.1.1
(Steam version)
* depends on this
*/
...
...
@@ -728,16 +728,16 @@ IDirectDrawImpl_RestoreDisplayMode(IDirectDraw7 *iface)
/*****************************************************************************
* IDirectDraw7::GetCaps
*
* Returns the drives capa
tib
lities
* Returns the drives capa
bi
lities
*
* Used for version 1, 2, 4 and 7
*
* Params:
* DriverCaps: Structure to write the Hardware accel
l
erated caps to
* DriverCaps: Structure to write the Hardware accelerated caps to
* HelCaps: Structure to write the emulation caps to
*
* Returns
* This implementation return
d
DD_OK only
* This implementation return
s
DD_OK only
*
*****************************************************************************/
static
HRESULT
WINAPI
...
...
@@ -870,7 +870,7 @@ IDirectDrawImpl_GetDisplayMode(IDirectDraw7 *iface,
* Params:
* NumCodes: Contains the number of Codes that Codes can carry. Returns the number
* of enumerated codes
* Codes: Pointer to an array of DWORDs where the supported codes are wri
i
ten
* Codes: Pointer to an array of DWORDs where the supported codes are wri
t
ten
* to
*
* Returns
...
...
@@ -910,7 +910,7 @@ IDirectDrawImpl_GetMonitorFrequency(IDirectDraw7 *iface,
ICOM_THIS_FROM
(
IDirectDrawImpl
,
IDirectDraw7
,
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
Freq
);
/* Ideally this should be in WineD3D, as it concern
e
s the screen setup,
/* Ideally this should be in WineD3D, as it concerns the screen setup,
* but for now this should make the games happy
*/
*
Freq
=
60
;
...
...
@@ -975,7 +975,7 @@ IDirectDrawImpl_GetAvailableVidMem(IDirectDraw7 *iface, DDSCAPS2 *Caps, DWORD *t
}
/* Todo: System memory vs local video memory vs non-local video memory
* The MSDN also mention
e
s differences between texture memory and other
* The MSDN also mentions differences between texture memory and other
* resources, but that's not important
*/
...
...
@@ -1075,7 +1075,7 @@ IDirectDrawImpl_WaitForVerticalBlank(IDirectDraw7 *iface,
/*****************************************************************************
* IDirectDraw7::GetScanLine
*
* Returns the scan line that is be
e
ing drawn on the monitor
* Returns the scan line that is being drawn on the monitor
*
* Parameters:
* Scanline: Address to write the scan line value to
...
...
@@ -1133,7 +1133,7 @@ IDirectDrawImpl_TestCooperativeLevel(IDirectDraw7 *iface)
/* Description from MSDN:
* For fullscreen apps return DDERR_NOEXCLUSIVEMODE if the user switched
* away from the app with e.g. alt-tab. Windowed apps receive
* DDERR_EXCLUSIVEMODEALREADYSET if another application created a
n
* DDERR_EXCLUSIVEMODEALREADYSET if another application created a
* DirectDraw object in exclusive mode. DDERR_WRONGMODE is returned,
* when the video mode has changed
*/
...
...
@@ -1195,7 +1195,7 @@ IDirectDrawImpl_GetGDISurface(IDirectDraw7 *iface,
DDSCAPS2
ddsCaps
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
GDISurface
);
/* Get the back buffer from the wineD3DDevice and search it
'
s
/* Get the back buffer from the wineD3DDevice and search its
* attached surfaces for the front buffer
*/
hr
=
IWineD3DDevice_GetBackBuffer
(
This
->
wineD3DDevice
,
...
...
@@ -1280,7 +1280,7 @@ IDirectDrawImpl_EnumDisplayModesCB(IUnknown *pDevice,
* IDirectDraw7::EnumDisplayModes
*
* Enumerates the supported Display modes. The modes can be filtered with
* the DDSD paramter.
* the DDSD param
e
ter.
*
* Params:
* Flags: can be DDEDM_REFRESHRATES and DDEDM_STANDARDVGAMODES
...
...
@@ -1340,7 +1340,7 @@ IDirectDrawImpl_EnumDisplayModes(IDirectDraw7 *iface,
*
* Params:
* Flags: DDEM_MODEPASSED or DDEM_MODEFAILED
* Timeout: Returns the amount of seco
u
nds left before the mode would have
* Timeout: Returns the amount of seconds left before the mode would have
* been failed automatically
*
* Returns:
...
...
@@ -1372,7 +1372,7 @@ IDirectDrawImpl_EvaluateMode(IDirectDraw7 *iface,
*
* Returns:
* On success it returns DD_OK
* DDERR_INVALIDPARAMS if DDDI is NULL
;
* DDERR_INVALIDPARAMS if DDDI is NULL
*
*****************************************************************************/
static
HRESULT
WINAPI
...
...
@@ -1381,7 +1381,7 @@ IDirectDrawImpl_GetDeviceIdentifier(IDirectDraw7 *iface,
DWORD
Flags
)
{
ICOM_THIS_FROM
(
IDirectDrawImpl
,
IDirectDraw7
,
iface
);
TRACE
(
"(%p)->(%p,%08lx)
\n
"
,
This
,
DDDI
,
Flags
);
TRACE
(
"(%p)->(%p,%08lx)
\n
"
,
This
,
DDDI
,
Flags
);
if
(
!
DDDI
)
return
DDERR_INVALIDPARAMS
;
...
...
@@ -1453,10 +1453,10 @@ IDirectDrawImpl_RestoreAllSurfaces(IDirectDraw7 *iface)
* Tests the specified video modes to update the system registry with
* refresh rate information. StartModeTest starts the mode test,
* EvaluateMode is used to fail or pass a mode. If EvaluateMode
* isn't called with
hin 15 secou
nds, the mode is failed automatically
* isn't called with
in 15 seco
nds, the mode is failed automatically
*
* As refresh rates are handled by the X server, I don't think this
* Metho
s
is important
* Metho
d
is important
*
* Params:
* Modes: An array of mode specifications
...
...
@@ -1466,7 +1466,7 @@ IDirectDrawImpl_RestoreAllSurfaces(IDirectDraw7 *iface)
* Returns:
* Returns DDERR_TESTFINISHED if flags contains DDSMT_ISTESTREQUIRED,
* if no modes are passed, DDERR_INVALIDPARAMS is returned,
* otherwise DD_OK
;
* otherwise DD_OK
*
*****************************************************************************/
static
HRESULT
WINAPI
...
...
@@ -1496,7 +1496,7 @@ IDirectDrawImpl_StartModeTest(IDirectDraw7 *iface,
* IDirectDrawImpl_RecreateSurfacesCallback
*
* Enumeration callback for IDirectDrawImpl_RecreateAllSurfaces.
* It re-recreates the WineD3DSurface. It's pretty st
e
ightforward
* It re-recreates the WineD3DSurface. It's pretty st
ra
ightforward
*
*****************************************************************************/
HRESULT
WINAPI
...
...
@@ -1592,7 +1592,7 @@ IDirectDrawImpl_RecreateSurfacesCallback(IDirectDrawSurface7 *surf,
/* TODO: Copy the surface content, except for render targets */
if
(
IWineD3DSurface_Release
(
wineD3DSurface
)
==
0
)
TRACE
(
"Surface released successful
l
, next surface
\n
"
);
TRACE
(
"Surface released successful, next surface
\n
"
);
else
ERR
(
"Something's still holding the old WineD3DSurface
\n
"
);
...
...
@@ -1606,7 +1606,7 @@ IDirectDrawImpl_RecreateSurfacesCallback(IDirectDrawSurface7 *surf,
*
* A function, that converts all wineD3DSurfaces to the new implementation type
* It enumerates all surfaces with IWineD3DDevice::EnumSurfaces, creates a
* new WineD3DSurface, cop
y
s the content and releases the old surface
* new WineD3DSurface, cop
ie
s the content and releases the old surface
*
*****************************************************************************/
static
HRESULT
...
...
@@ -1666,7 +1666,7 @@ D3D7CB_CreateSurface(IUnknown *device,
int
i
;
TRACE
(
"(%p) call back. surf=%p
\n
"
,
device
,
surf
);
/* Find the wanted mipmap. There are enough
t
mipmaps in the chain */
/* Find the wanted mipmap. There are enough mipmaps in the chain */
for
(
i
=
0
;
i
<
level
;
i
++
)
surf
=
surf
->
next_complex
;
...
...
@@ -1740,12 +1740,12 @@ IDirectDrawImpl_CreateNewSurface(IDirectDrawImpl *This,
/* Policy if all surface implementations are available:
* First, check if a default type was set with winecfg. If not,
* try Xrender surfaces, and use them if they work. Next, check if
* accel
l
erated OpenGL is available, and use GL surfaces in this
* case. If all fails, use GDI surfaces. If a 3DDEVICE surface
* accelerated OpenGL is available, and use GL surfaces in this
* case. If all
else
fails, use GDI surfaces. If a 3DDEVICE surface
* was created, always use OpenGL surfaces.
*
* (Note: Xrender surfaces are not implemented
by
now, the
* unaccel
l
erated implementation uses GDI to render in Software)
* (Note: Xrender surfaces are not implemented
for
now, the
* unaccelerated implementation uses GDI to render in Software)
*/
/* Store the type. If it needs to be changed, all WineD3DSurfaces have to
...
...
@@ -1899,7 +1899,7 @@ IDirectDrawImpl_CreateNewSurface(IDirectDrawImpl *This,
{
parImpl
->
child
=
(
IUnknown
*
)
(
*
ppSurf
)
->
WineD3DSurface
;
/* The IParent releases the WineD3DSurface, and
* the ddraw surface does that too. Hold a
n
reference
* the ddraw surface does that too. Hold a reference
*/
IWineD3DSurface_AddRef
((
*
ppSurf
)
->
WineD3DSurface
);
}
...
...
@@ -1914,7 +1914,7 @@ IDirectDrawImpl_CreateNewSurface(IDirectDrawImpl *This,
This
->
surface_list
=
*
ppSurf
;
/* Here we could store all created surfaces in the DirectDrawImpl structure,
* But this could also be delegated to WineDDraw, as it keeps track of all it
'
s
* But this could also be delegated to WineDDraw, as it keeps track of all its
* resources. Not implemented for now, as there are more important things ;)
*/
...
...
@@ -1986,7 +1986,7 @@ IDirectDrawImpl_CreateNewSurface(IDirectDrawImpl *This,
/*****************************************************************************
* IDirectDraw7::CreateSurface
*
* Creates a new IDirectDrawSurface object and returns it
'
s interface.
* Creates a new IDirectDrawSurface object and returns its interface.
*
* The surface connections with wined3d are a bit tricky. Basically it works
* like this:
...
...
@@ -2002,9 +2002,9 @@ IDirectDrawImpl_CreateNewSurface(IDirectDrawImpl *This,
* the WineD3DSurface when the ddraw surface is destroyed.
*
* However, for all surfaces which can be in a container in WineD3D,
* we have to do this. These surfaces are ususally comple
y
surfaces,
* so this concern
e
s primary surfaces with a front and a back buffer,
* and textures
textures
.
* we have to do this. These surfaces are ususally comple
x
surfaces,
* so this concerns primary surfaces with a front and a back buffer,
* and textures.
*
* |------------------------| |-----------------|
* | DDraw surface | | Containter |
...
...
@@ -2121,7 +2121,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
/* Modify some flags */
memset
(
&
desc2
,
0
,
sizeof
(
desc2
));
desc2
.
dwSize
=
sizeof
(
desc2
);
/*For the struct copy */
desc2
.
dwSize
=
sizeof
(
desc2
);
/*
For the struct copy */
DD_STRUCT_COPY_BYSIZE
(
&
desc2
,
DDSD
);
desc2
.
dwSize
=
sizeof
(
desc2
);
/* To override a possibly smaller size */
desc2
.
u4
.
ddpfPixelFormat
.
dwSize
=
sizeof
(
DDPIXELFORMAT
);
/* Just to be sure */
...
...
@@ -2168,7 +2168,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
/* Wait: It could be a Z buffer */
if
(
desc2
.
ddsCaps
.
dwCaps
&
DDSCAPS_ZBUFFER
)
{
switch
(
desc2
.
u2
.
dwMipMapCount
)
/* Who had this glo
u
rious idea? */
switch
(
desc2
.
u2
.
dwMipMapCount
)
/* Who had this glorious idea? */
{
case
15
:
PixelFormat_WineD3DtoDD
(
&
desc2
.
u4
.
ddpfPixelFormat
,
WINED3DFMT_D15S1
);
...
...
@@ -2243,7 +2243,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
else
{
/* Undocumented feature: Create sublevels until
* ei
ght
er the width or the height is 1
* ei
th
er the width or the height is 1
*/
DWORD
min
=
desc2
.
dwWidth
<
desc2
.
dwHeight
?
desc2
.
dwWidth
:
desc2
.
dwHeight
;
...
...
@@ -2301,7 +2301,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
IDirectDrawSurfaceImpl
*
iterator
;
/* increase the mipmap level, but only if a mipmap is created
* In this case, also hal
f
the size
* In this case, also hal
ve
the size
*/
if
(
DDSD
->
ddsCaps
.
dwCaps
&
DDSCAPS_MIPMAP
)
{
...
...
@@ -2340,7 +2340,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
/* If the implementation is OpenGL and there's no d3ddevice, attach a d3ddevice
* But attach the d3ddevice only if the currently created surface was
* a primary surface
(2D app in 3D mode) or a 3DDEVICE surface
(3D app)
* a primary surface
(2D app in 3D mode) or a 3DDEVICE surface
(3D app)
* The only case I can think of where this doesn't apply is when a
* 2D app was configured by the user to run with OpenGL and it didn't create
* the render target as first surface. In this case the render target creation
...
...
@@ -2387,7 +2387,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
if
(
desc2
.
ddsCaps
.
dwCaps
&
DDSCAPS_MIPMAP
)
{
/* a mipmap is created, create enough
t
levels */
/* a mipmap is created, create enough levels */
levels
=
desc2
.
u2
.
dwMipMapCount
;
}
else
...
...
@@ -2607,7 +2607,7 @@ IDirectDrawImpl_EnumSurfaces(IDirectDraw7 *iface,
*
* Params
* device: The WineD3DDevice's parent
* Width, Height, Format: Dimesions and pixelformat of the render target
* Width, Height, Format: Dime
n
sions and pixelformat of the render target
* Ignored, because the surface already exists
* MultiSample, MultisampleQuality, Lockable: Ignored for the same reason
* Lockable: ignored
...
...
@@ -2707,7 +2707,7 @@ D3D7CB_CreateDepthStencilSurface(IUnknown *device,
* D3D7CB_CreateAdditionalSwapChain
*
* Callback function for WineD3D which creates a new WineD3DSwapchain
* interface. It also creates a IParent interface to store that pointer,
* interface. It also creates a
n
IParent interface to store that pointer,
* so the WineD3DSwapchain has a parent and can be released when the D3D
* device is destroyed
*****************************************************************************/
...
...
@@ -2757,7 +2757,7 @@ D3D7CB_CreateAdditionalSwapChain(IUnknown *device,
/*****************************************************************************
* IDirectDrawImpl_AttachD3DDevice
*
* Initializes the D3D capa
tib
lities of WineD3D
* Initializes the D3D capa
bi
lities of WineD3D
*
* Params:
* primary: The primary surface for D3D
...
...
@@ -2835,7 +2835,7 @@ IDirectDrawImpl_AttachD3DDevice(IDirectDrawImpl *This,
SwapEffect
=
WINED3DSWAPEFFECT_COPY
;
Flags
=
0
;
MultiSampleQuality
=
0
;
FullScreen_RefreshRateInHz
=
WINED3DPRESENT_RATE_DEFAULT
;
/* Default rate: It's al
l
ready set */
FullScreen_RefreshRateInHz
=
WINED3DPRESENT_RATE_DEFAULT
;
/* Default rate: It's already set */
PresentationInterval
=
WINED3DPRESENT_INTERVAL_DEFAULT
;
TRACE
(
"Passing mode %d
\n
"
,
Mode
.
Format
);
...
...
@@ -2855,7 +2855,7 @@ IDirectDrawImpl_AttachD3DDevice(IDirectDrawImpl *This,
localParameters
.
FullScreen_RefreshRateInHz
=
&
FullScreen_RefreshRateInHz
;
localParameters
.
PresentationInterval
=
&
PresentationInterval
;
/* Set this NOW, otherwise creating the depth stencil surface will cause a
n
/* Set this NOW, otherwise creating the depth stencil surface will cause a
* recursive loop until ram or emulated video memory is full
*/
This
->
d3d_initialized
=
TRUE
;
...
...
@@ -2998,8 +2998,8 @@ IDirectDrawImpl_CreatePalette(IDirectDraw7 *iface,
* IDirectDraw7::DuplicateSurface
*
* Duplicates a surface. The surface memory points to the same memory as
* the original surface, and it's released when the last surface refer
r
ing
* it is released. I guess that's beyond Wines surface management right now
* the original surface, and it's released when the last surface refer
enc
ing
* it is released. I guess that's beyond Wine
'
s surface management right now
* (Idea: create a new DDraw surface with the same WineD3DSurface. I need a
* test application to implement this)
*
...
...
@@ -3033,7 +3033,7 @@ IDirectDrawImpl_DuplicateSurface(IDirectDraw7 *iface,
*****************************************************************************/
const
IDirectDraw7Vtbl
IDirectDraw7_Vtbl
=
{
/*** IUnkown ***/
/*** IUnk
n
own ***/
IDirectDrawImpl_QueryInterface
,
IDirectDrawImpl_AddRef
,
IDirectDrawImpl_Release
,
...
...
dlls/ddraw/ddraw_private.h
View file @
9bfbfcbe
...
...
@@ -98,7 +98,7 @@ struct IDirectDrawImpl
IDirectDrawSurfaceImpl
*
DepthStencilBuffer
;
BOOL
d3d_initialized
;
/*
m
isc ddraw fields */
/*
M
isc ddraw fields */
UINT
total_vidmem
;
DWORD
cur_scanline
;
BOOL
fake_vblank
;
...
...
@@ -121,7 +121,7 @@ struct IDirectDrawImpl
IDirect3DDeviceImpl
*
d3ddevice
;
int
d3dversion
;
/* Varios HWNDs */
/* Vario
u
s HWNDs */
HWND
focuswindow
;
HWND
devicewindow
;
...
...
@@ -396,7 +396,7 @@ struct IDirectDrawPaletteImpl
const
IDirectDrawPaletteVtbl
IDirectDrawPalette_Vtbl
;
/******************************************************************************
* DirectDraw ClassFactory
I
mplementation - incomplete
* DirectDraw ClassFactory
i
mplementation - incomplete
******************************************************************************/
typedef
struct
{
...
...
@@ -470,7 +470,7 @@ struct IDirect3DMaterialImpl
void
(
*
activate
)(
IDirect3DMaterialImpl
*
this
);
};
/* VTables in varios versions */
/* VTables in vario
u
s versions */
const
IDirect3DMaterialVtbl
IDirect3DMaterial_Vtbl
;
const
IDirect3DMaterial2Vtbl
IDirect3DMaterial2_Vtbl
;
const
IDirect3DMaterial3Vtbl
IDirect3DMaterial3_Vtbl
;
...
...
dlls/ddraw/device.c
View file @
9bfbfcbe
...
...
@@ -70,7 +70,7 @@ const GUID IID_D3DDEVICE_WineD3D = {
*
* Used to query other interfaces from a Direct3DDevice interface.
* It can return interface pointers to all Direct3DDevice versions as well
* as IDirectDraw and IDirect3D. For a link
for
QueryInterface
* as IDirectDraw and IDirect3D. For a link
to
QueryInterface
* rules see ddraw.c, IDirectDraw7::QueryInterface
*
* Exists in Version 1, 2, 3 and 7
...
...
@@ -217,7 +217,7 @@ Thunk_IDirect3DDeviceImpl_1_QueryInterface(IDirect3DDevice *iface,
* IDirect3DDevice7::AddRef
*
* Increases the refcount....
* The most exciting Method, definitly
* The most exciting Method, definit
e
ly
*
* Exists in Version 1, 2, 3 and 7
*
...
...
@@ -435,7 +435,7 @@ IDirect3DDeviceImpl_1_Initialize(IDirect3DDevice *iface,
/*****************************************************************************
* IDirect3DDevice7::GetCaps
*
* Retrieves the device's capa
tib
lities
* Retrieves the device's capa
bi
lities
*
* This implementation is used for Version 7 only, the older versions have
* their own implementation.
...
...
@@ -463,8 +463,8 @@ IDirect3DDeviceImpl_7_GetCaps(IDirect3DDevice7 *iface,
/*****************************************************************************
* IDirect3DDevice3::GetCaps
*
* Retrieves the capa
tib
lities of the hardware device and the emulation
* device. For Wine, hardware and emulation are the same(it's all HW).
* Retrieves the capa
bi
lities of the hardware device and the emulation
* device. For Wine, hardware and emulation are the same
(it's all HW).
*
* This implementation is used for Version 1, 2, and 3. Version 7 has its own
*
...
...
@@ -634,7 +634,7 @@ Thunk_IDirect3DDeviceImpl_1_GetStats(IDirect3DDevice *iface,
* Params:
* Desc: Buffer description
* ExecuteBuffer: Address to return the Interface pointer at
* UnkOuter: Must be NULL. Basically for aggreation, which ddraw doesn't
* UnkOuter: Must be NULL. Basically for aggre
g
ation, which ddraw doesn't
* support
*
* Returns:
...
...
@@ -874,7 +874,7 @@ Thunk_IDirect3DDeviceImpl_1_DeleteViewport(IDirect3DDevice *iface,
/*****************************************************************************
* IDirect3DDevice3::NextViewport
*
* Returns a
n
viewport from the viewport list, depending on the
* Returns a viewport from the viewport list, depending on the
* passed viewport and the flags.
*
* Exists in Version 1, 2 and 3. Note that all Viewport interface versions
...
...
@@ -886,7 +886,7 @@ Thunk_IDirect3DDeviceImpl_1_DeleteViewport(IDirect3DDevice *iface,
*
* Returns:
* D3D_OK on success
* DDERR_INVALIDPARAMS if the flags were wrong,
i
r Viewport was NULL
* DDERR_INVALIDPARAMS if the flags were wrong,
o
r Viewport was NULL
*
*****************************************************************************/
static
HRESULT
WINAPI
...
...
@@ -1093,7 +1093,7 @@ EnumTextureFormatsCB(IUnknown *Device,
(
fmt
==
WINED3DFMT_V8U8
)
||
(
fmt
==
WINED3DFMT_L6V5U5
)
)
{
/* These formats exist
exist
in D3D3 and D3D7 only,
/* These formats exist in D3D3 and D3D7 only,
* so do not call the older callback
*/
if
(
cbs
->
cbv7
)
return
cbs
->
cbv7
(
pformat
,
cbs
->
Context
);
...
...
@@ -1115,7 +1115,7 @@ EnumTextureFormatsCB(IUnknown *Device,
* and a EnumTextureFormatsCB translated the WineD3DFormats to DDraw
* formats and calls the application callback.
*
* This is for Version 7 and 3,
the
older versions have a different
* This is for Version 7 and 3, older versions have a different
* callback function and their own implementation
*
* Params:
...
...
@@ -1385,7 +1385,7 @@ IDirect3DDeviceImpl_1_DeleteMatrix(IDirect3DDevice *iface,
* Version 1, 2, 3 and 7
*
* Returns:
* D3D_OK on sucess, for details see IWineD3DDevice::BeginScene
* D3D_OK on suc
c
ess, for details see IWineD3DDevice::BeginScene
*
*****************************************************************************/
static
HRESULT
WINAPI
...
...
@@ -1784,7 +1784,7 @@ Thunk_IDirect3DDeviceImpl_2_GetRenderTarget(IDirect3DDevice2 *iface,
/*****************************************************************************
* IDirect3DDevice3::Begin
*
* Begins a description block of vertices. This is sim
m
ilar to glBegin()
* Begins a description block of vertices. This is similar to glBegin()
* and glEnd(). After a call to IDirect3DDevice3::End, the vertices
* described with IDirect3DDevice::Vertex are drawn.
*
...
...
@@ -1853,7 +1853,7 @@ Thunk_IDirect3DDeviceImpl_2_Begin(IDirect3DDevice2 *iface,
* Params:
* PrimitiveType: Primitive type to draw
* VertexType: A FVF description of the vertex format
* Vertices: pointer to an array containg the vertices
* Vertices: pointer to an array contain
in
g the vertices
* NumVertices: The number of vertices in the vertex array
* Flags: Some flags ...
*
...
...
@@ -1908,7 +1908,7 @@ Thunk_IDirect3DDeviceImpl_2_BeginIndexed(IDirect3DDevice2 *iface,
* IDirect3DDevice3::Vertex
*
* Draws a vertex as described by IDirect3DDevice3::Begin. It places all
* drawn vertices in a
n vertex buffer. If the buffer is t
o small, its
* drawn vertices in a
vertex buffer. If the buffer is to
o small, its
* size is increased.
*
* Version 2 and 3
...
...
@@ -1962,7 +1962,7 @@ Thunk_IDirect3DDeviceImpl_2_Vertex(IDirect3DDevice2 *iface,
/*****************************************************************************
* IDirect3DDevice3::Index
*
* Specifies an index to a
n
vertex to be drawn. The vertex array has to
* Specifies an index to a vertex to be drawn. The vertex array has to
* be specified with BeginIndexed first.
*
* Parameters:
...
...
@@ -2256,7 +2256,7 @@ Thunk_IDirect3DDeviceImpl_2_SetRenderState(IDirect3DDevice2 *iface,
*
* Returns:
* D3D_OK on success
* DDERR_INVALIDPARAMS if the paramters were incorrect
* DDERR_INVALIDPARAMS if the param
e
ters were incorrect
* Also check IDirect3DDevice7::SetRenderState
*
*****************************************************************************/
...
...
@@ -2449,11 +2449,11 @@ Thunk_IDirect3DDeviceImpl_2_GetLightState(IDirect3DDevice2 *iface,
/*****************************************************************************
* IDirect3DDevice7::SetTransform
*
* Assign
e
s a D3DMATRIX to a transform type. The transform types are defined
* Assigns a D3DMATRIX to a transform type. The transform types are defined
* in include/d3dtypes.h.
* The D3DTRANSFORMSTATE_WORLD (=1) is translated to D3DTS_WORLDMATRIX(0)
* (=255) for wined3d, because the 1 transform state was removed in d3d8
* and WineD3D al
l
ready understands the replacement D3DTS_WORLDMATRIX(0)
* and WineD3D already understands the replacement D3DTS_WORLDMATRIX(0)
*
* Version 2, 3 and 7
*
...
...
@@ -2643,7 +2643,7 @@ Thunk_IDirect3DDeviceImpl_2_MultiplyTransform(IDirect3DDevice2 *iface,
/*****************************************************************************
* IDirect3DDevice7::DrawPrimitive
*
* Draws primitves based on vertices in an application-provided pointer
* Draws primit
i
ves based on vertices in an application-provided pointer
*
* Version 2, 3 and 7. The IDirect3DDevice2 thunk converts the fixed vertex type into
* an FVF format for D3D7
...
...
@@ -3014,7 +3014,7 @@ Thunk_IDirect3DDeviceImpl_2_GetClipStatus(IDirect3DDevice2 *iface,
*
* Params:
* PrimitiveType: The primitive type to draw
* VertexType: The FVF description of the vertices to draw(for the stride??)
* VertexType: The FVF description of the vertices to draw
(for the stride??)
* D3DDrawPrimStrideData: A D3DDRAWPRIMITIVESTRIDEDDATA structure describing
* the vertex data locations
* VertexCount: The number of vertices to draw
...
...
@@ -3044,8 +3044,8 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
/* Get the strided data right. the wined3d structure is a bit bigger
* Watch out: The contents of the strided data are determined by the fvf,
* not by the members set in D3DDrawPrimStrideData. So it's valid
* to have diffuse.lpvData set to 0xdeadbeef
and not setting the diffuse
*
flag
in the fvf.
* to have diffuse.lpvData set to 0xdeadbeef
if the diffuse flag is
*
not set
in the fvf.
*/
if
(
VertexType
&
D3DFVF_POSITION_MASK
)
{
...
...
@@ -3300,7 +3300,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(IDirect3DDevice7 *iface,
return
hr
;
}
/* Set the vertex stream souce */
/* Set the vertex stream sou
r
ce */
hr
=
IWineD3DDevice_SetStreamSource
(
This
->
wineD3DDevice
,
0
/* StreamNumber */
,
vb
->
wineD3DVertexBuffer
,
...
...
@@ -3462,7 +3462,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
This
->
indexbuffer
,
0
);
/* Set the vertex stream souce */
/* Set the vertex stream sou
r
ce */
hr
=
IWineD3DDevice_SetStreamSource
(
This
->
wineD3DDevice
,
0
/* StreamNumber */
,
vb
->
wineD3DVertexBuffer
,
...
...
@@ -3513,19 +3513,19 @@ Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitiveVB(IDirect3DDevice3 *iface,
*
* Calculates the visibility of spheres in the current viewport. The spheres
* are passed in the Centers and Radii arrays, the results are passed back
* in the ReturnValues array. Return values are ei
ght
er completely visible,
* in the ReturnValues array. Return values are ei
th
er completely visible,
* partially visible or completely invisible.
* The return value consist of a combination of D3DCLIP_* flags, or it's
* 0 if the sphere is completely visible(according to the SDK, not checked)
*
* Sounds like an overdose math ;)
* Sounds like an overdose
of
math ;)
*
* Version 3 and 7
*
* Params:
* Centers: Array containing the sphere centers
* Radii: Array containing the sphere radi
s
* NumSpheres: The number of centers and radii
s
in the arrays
* Radii: Array containing the sphere radi
i
* NumSpheres: The number of centers and radii in the arrays
* Flags: Some flags
* ReturnValues: Array to write the results to
*
...
...
@@ -3564,7 +3564,7 @@ IDirect3DDeviceImpl_7_ComputeSphereVisibility(IDirect3DDevice7 *iface,
* Not visible
* ->Some intersections: Partially visible
*
* Implement this call in WineD3D. Ei
ght
er implement the
* Implement this call in WineD3D. Ei
th
er implement the
* matrix and vector stuff in WineD3D, or use some external
* math library.
*/
...
...
@@ -3663,7 +3663,7 @@ Thunk_IDirect3DDeviceImpl_3_GetTexture(IDirect3DDevice3 *iface,
/*****************************************************************************
* IDirect3DDevice7::SetTexture
*
* Assign
es a texture to a texture stage. Is the texture AddRef
ed?
* Assign
s a texture to a texture stage. Is the texture AddRef-
ed?
*
* Version 3 and 7
*
...
...
@@ -3848,7 +3848,7 @@ Thunk_IDirect3DDeviceImpl_3_SetTextureStageState(IDirect3DDevice3 *iface,
* Version 3 and 7
*
* Params:
* NumPasses: Address to write the number of nec
c
essary passes for the
* NumPasses: Address to write the number of necessary passes for the
* desired effect to.
*
* Returns:
...
...
@@ -4012,7 +4012,7 @@ IDirect3DDeviceImpl_7_SetMaterial(IDirect3DDevice7 *iface,
* Version 7
*
* Params:
* Mat: D3DMATERIAL7 structure to write the material paramters to
* Mat: D3DMATERIAL7 structure to write the material param
e
ters to
*
* Returns:
* D3D_OK on success
...
...
@@ -4313,7 +4313,7 @@ IDirect3DDeviceImpl_7_CreateStateBlock(IDirect3DDevice7 *iface,
/*****************************************************************************
* IDirect3DDevice7::Load
*
* Loads a
n
rectangular area from the source into the destination texture.
* Loads a rectangular area from the source into the destination texture.
* It can also copy the source to the faces of a cubic environment map
*
* Version 7
...
...
@@ -4385,7 +4385,7 @@ IDirect3DDeviceImpl_7_LightEnable(IDirect3DDevice7 *iface,
/*****************************************************************************
* IDirect3DDevice7::GetLightEnable
*
* Retrieves if the light with the given index is enable
s
or not
* Retrieves if the light with the given index is enable
d
or not
*
* Version 7
*
...
...
@@ -4479,7 +4479,7 @@ IDirect3DDeviceImpl_7_GetClipPlane(IDirect3DDevice7 *iface,
* IDirect3DDevice7::GetInfo
*
* Retrieves some information about the device. The DirectX sdk says that
* this version return
es S_FALSE for all retail build of DirectX, that's
* this version return
s S_FALSE for all retail builds of DirectX, that's what
* this implementation does.
*
* Params:
...
...
dlls/ddraw/direct3d.c
View file @
9bfbfcbe
...
...
@@ -243,7 +243,7 @@ IDirect3DImpl_7_EnumDevices(IDirect3D7 *iface,
* IDirect3D3::EnumDevices
*
* Enumerates all supported Direct3DDevice interfaces. This is the
* implementation for Direct3D 1 to Direc3D 3, Version 7 has it
'
s own.
* implementation for Direct3D 1 to Direc3D 3, Version 7 has its own.
*
* Version 1, 2 and 3
*
...
...
@@ -425,7 +425,7 @@ Thunk_IDirect3DImpl_1_CreateLight(IDirect3D *iface,
* IDirect3D3::CreateMaterial
*
* Creates an IDirect3DMaterial interface. This interface is used by Direct3D3
* and older versions. The IDirect3DMaterial implementation wraps it
'
s
* and older versions. The IDirect3DMaterial implementation wraps its
* functionality to IDirect3DDevice7::SetMaterial and friends.
*
* Version 1, 2 and 3
...
...
@@ -521,7 +521,7 @@ Thunk_IDirect3DImpl_1_CreateMaterial(IDirect3D *iface,
* by Direct3D and earlier versions for Viewport management. In Direct3D7
* it has been replaced by a viewport structure and
* IDirect3DDevice7::*Viewport. Wine's IDirect3DViewport implementation
* uses the IDirect3DDevice7 methods for it
'
s functionality
* uses the IDirect3DDevice7 methods for its functionality
*
* Params:
* Viewport: Address to store the new interface pointer
...
...
@@ -600,7 +600,7 @@ Thunk_IDirect3DImpl_1_CreateViewport(IDirect3D *iface,
*
* Verion 1, 2 and 3
* Params:
* D3DDFS: Describes the requested device chara
k
teristics
* D3DDFS: Describes the requested device chara
c
teristics
* D3DFDR: Returns the device description
*
* Returns:
...
...
@@ -767,12 +767,12 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface,
IndexBufferParent
->
ref
=
1
;
/* Create an Index Buffer. WineD3D needs one for Drawing indexed primitives
* Create a (hopefully) long enough
t
buffer, and copy the indices into it
* Create a (hopefully) long enough buffer, and copy the indices into it
* Ideally, a IWineD3DIndexBuffer::SetData method could be created, which
* takes the pointer and avoids the memcpy
*/
hr
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
wineD3DDevice
,
0x40000
,
/* Leng
ht
. Don't know how long it should be */
0x40000
,
/* Leng
th
. Don't know how long it should be */
0
,
/* Usage */
WINED3DFMT_INDEX16
,
/* Format. D3D7 uses WORDS */
WINED3DPOOL_DEFAULT
,
...
...
@@ -832,7 +832,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface,
}
/* AddRef the render target. Also AddRef the render target from ddraw,
* because if it
released before the app releases the D3D device, the D3D capatib
lities
* because if it
is released before the app releases the D3D device, the D3D capabi
lities
* of WineD3D will be uninitialized, which has bad effects.
*
* In most cases, those surfaces are the surfaces are the same anyway, but this will simply
...
...
@@ -919,7 +919,7 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface,
HRESULT
hr
;
TRACE
(
"(%p)->(%p,%p,%08lx)
\n
"
,
This
,
Desc
,
VertexBuffer
,
Flags
);
TRACE
(
"(%p) Vertex buffer description:
\n
"
,
This
);
TRACE
(
"(%p) Vertex buffer description:
\n
"
,
This
);
TRACE
(
"(%p) dwSize=%ld
\n
"
,
This
,
Desc
->
dwSize
);
TRACE
(
"(%p) dwCaps=%08lx
\n
"
,
This
,
Desc
->
dwCaps
);
TRACE
(
"(%p) FVF=%08lx
\n
"
,
This
,
Desc
->
dwFVF
);
...
...
@@ -1081,7 +1081,7 @@ Thunk_IDirect3DImpl_3_EnumZBufferFormats(IDirect3D3 *iface,
/*****************************************************************************
* IDirect3D7::EvictManagedTextures
*
* Removes all managed textures(=surfaces with DDSCAPS2_TEXTUREMANAGE or
* Removes all managed textures
(=surfaces with DDSCAPS2_TEXTUREMANAGE or
* DDSCAPS2_D3DTEXTUREMANAGE caps) to be removed from video memory.
*
* Version 3 and 7
...
...
@@ -1121,8 +1121,8 @@ Thunk_IDirect3DImpl_3_EvictManagedTextures(IDirect3D3 *iface)
*
* Params:
* WineD3D: The interface to get the caps from
* Desc123: Old D3D <3 structure to fill(needed)
* Desc7: D3D7 device desc structure to fill(needed)
* Desc123: Old D3D <3 structure to fill
(needed)
* Desc7: D3D7 device desc structure to fill
(needed)
*
* Returns
* D3D_OK on success, or the return value of IWineD3D::GetCaps
...
...
dlls/ddraw/executebuffer.c
View file @
9bfbfcbe
...
...
@@ -78,7 +78,7 @@ static void _dump_D3DEXECUTEBUFFERDESC(LPD3DEXECUTEBUFFERDESC lpDesc) {
* for drawing the vertices. It is called from
* IDirect3DDevice::Execute
*
* TODO: Perhaps some comments about the varios opcodes wouldn't hurt
* TODO: Perhaps some comments about the vario
u
s opcodes wouldn't hurt
*
* Don't declare this static, as it's called from device.c,
* IDirect3DDevice::Execute
...
...
dlls/ddraw/gamma.c
View file @
9bfbfcbe
...
...
@@ -46,7 +46,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
WINE_DECLARE_DEBUG_CHANNEL
(
ddraw_thunk
);
/**********************************************************
* IUnkown parts follow
* IUnk
n
own parts follow
**********************************************************/
/**********************************************************
...
...
dlls/ddraw/main.c
View file @
9bfbfcbe
...
...
@@ -71,7 +71,7 @@ WINED3DSURFTYPE DefaultSurfaceType = SURFACE_UNKNOWN;
* iid: requested version ID.
*
* Returns:
* DD_OK if the Interface was created sucessfully
* DD_OK if the Interface was created suc
c
essfully
* CLASS_E_NOAGGREGATION if UnkOuter is not NULL
* E_OUTOFMEMORY if some allocation failed
*
...
...
@@ -111,7 +111,7 @@ DDRAW_Create(GUID *guid,
devicetype
=
0
;
}
/* DDraw doesn't support aggreation, according to msdn */
/* DDraw doesn't support aggre
g
ation, according to msdn */
if
(
UnkOuter
!=
NULL
)
return
CLASS_E_NOAGGREGATION
;
...
...
@@ -169,7 +169,7 @@ DDRAW_Create(GUID *guid,
/* Initialized member...
*
* It is set to false at creation time, and set to true in
* IDirectDraw7::Initialize. It
'
s sole purpose is to return DD_OK on
* IDirectDraw7::Initialize. Its sole purpose is to return DD_OK on
* initialize only once
*/
This
->
initialized
=
FALSE
;
...
...
@@ -177,7 +177,7 @@ DDRAW_Create(GUID *guid,
/* Initialize WineD3DDevice
*
* It is used for screen setup, surface and palette creation
* When a Direct3DDevice7 is created, the D3D capa
tib
lities of WineD3D are
* When a Direct3DDevice7 is created, the D3D capa
bi
lities of WineD3D are
* initialized
*/
hr
=
IWineD3D_CreateDevice
(
wineD3D
,
...
...
dlls/ddraw/surface.c
View file @
9bfbfcbe
...
...
@@ -51,7 +51,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ddraw
);
/*****************************************************************************
* IUnkown parts follow
* IUnk
n
own parts follow
*****************************************************************************/
/*****************************************************************************
...
...
@@ -172,7 +172,7 @@ IDirectDrawSurfaceImpl_AddRef(IDirectDrawSurface7 *iface)
*
* A helper function for IDirectDrawSurface7::Release
*
* Frees the surface, regardless of it
'
s refcount.
* Frees the surface, regardless of its refcount.
* See IDirectDrawSurface7::Release for more information
*
* Params:
...
...
@@ -196,10 +196,10 @@ static void IDirectDrawSurfaceImpl_Destroy(IDirectDrawSurfaceImpl *This)
/* Check for attached surfaces and detach them */
if
(
This
->
first_attached
!=
This
)
{
/* Well, this shouldn't happen: The surface be
e
ing attached is addref()ed
/* Well, this shouldn't happen: The surface being attached is addref()ed
* in AddAttachedSurface, so it shouldn't be released until DeleteAttachedSurface
* is called, because the refcount is h
o
ld. It looks like the app released()
* it often enough
t
to force this
* is called, because the refcount is h
e
ld. It looks like the app released()
* it often enough to force this
*/
IDirectDrawSurface7
*
root
=
ICOM_INTERFACE
(
This
->
first_attached
,
IDirectDrawSurface7
);
IDirectDrawSurface7
*
detach
=
ICOM_INTERFACE
(
This
,
IDirectDrawSurface7
);
...
...
@@ -262,16 +262,16 @@ static void IDirectDrawSurfaceImpl_Destroy(IDirectDrawSurfaceImpl *This)
* It has a nice graph explaining the connection.
*
* What happens here is basically this:
* When a surface is destroyed, it
'
s WineD3DSurface is released,
* When a surface is destroyed, its WineD3DSurface is released,
* and the refcount of the DirectDraw interface is reduced by 1. If it has
* complex surfaces attached to it, then these surfaces are destroyed too,
* regardless of their refcount. If any surface be
e
ing destroyed has another
* surface attached to it(with a "soft" attachment, not complex), then
* regardless of their refcount. If any surface being destroyed has another
* surface attached to it
(with a "soft" attachment, not complex), then
* this surface is detached with DeleteAttachedSurface.
*
* When the surface is a texture, the WineD3DTexture is released.
* If the surface is the Direct3D render target, then the D3D
* capa
tib
lities of the WineD3DDevice are uninitialized, which causes the
* capa
bi
lities of the WineD3DDevice are uninitialized, which causes the
* swapchain to be released.
*
* Returns:
...
...
@@ -394,7 +394,7 @@ IDirectDrawSurfaceImpl_Release(IDirectDrawSurface7 *iface)
/*****************************************************************************
* IDirectDrawSurface7::GetAttachedSurface
*
* Returns an attached surface with the requested caps. Surface attchment
* Returns an attached surface with the requested caps. Surface att
a
chment
* and complex surfaces are not clearly described by the MSDN or sdk,
* so this method is tricky and likely to contain problems.
* This implementation searches the complex chain first, then the
...
...
@@ -405,7 +405,7 @@ IDirectDrawSurfaceImpl_Release(IDirectDrawSurface7 *iface)
* returned. The MSDN says that this method fails if more than one surface
* matches the caps, but apparently this is incorrect.
*
* The found surface is AddRef
ed before it'
s returned.
* The found surface is AddRef
-ed before it i
s returned.
*
* Params:
* Caps: Pointer to a DDCAPS2 structure describing the caps asked for
...
...
@@ -461,7 +461,7 @@ IDirectDrawSurfaceImpl_GetAttachedSurface(IDirectDrawSurface7 *iface,
* that matches the capabilities requested."
*
* The mipmap demo of the DirectX7 sdk shows what to do here:
* aparently apps expect the first found surface to be returned.
* ap
p
arently apps expect the first found surface to be returned.
*/
TRACE
(
"(%p): Returning surface %p
\n
"
,
This
,
surf
);
...
...
@@ -493,7 +493,7 @@ IDirectDrawSurfaceImpl_GetAttachedSurface(IDirectDrawSurface7 *iface,
* that matches the capabilities requested."
*
* The mipmap demo of the DirectX7 sdk shows what to do here:
* aparently apps expect the first found surface to be returned.
* ap
p
arently apps expect the first found surface to be returned.
*/
TRACE
(
"(%p): Returning surface %p
\n
"
,
This
,
surf
);
...
...
@@ -526,7 +526,7 @@ IDirectDrawSurfaceImpl_GetAttachedSurface(IDirectDrawSurface7 *iface,
/*****************************************************************************
* IDirectDrawSurface7::Lock
*
* Locks the surface and return
e
s a pointer to the surface's memory
* Locks the surface and returns a pointer to the surface's memory
*
* Params:
* Rect: Rectangle to lock. If NULL, the whole surface is locked
...
...
@@ -716,18 +716,18 @@ IDirectDrawSurfaceImpl_Blt(IDirectDrawSurface7 *iface,
/*****************************************************************************
* IDirectDrawSurface7::AddAttachedSurface
*
* Attaches a
n
surface to another surface. Surface attachments are
* Attaches a surface to another surface. Surface attachments are
* incorrectly described in the SDK and the MSDN, and this method
* is prone to bugs. The surface that is attached is AddRefed.
* is prone to bugs. The surface that is attached is AddRef
-
ed.
*
* The attachment list consists of a first surface(first_attached) and
* The attachment list consists of a first surface
(first_attached) and
* for each surface a pointer to the next attached surface (next_attached).
* For the first surface, and a surface that has no attachments
* first_attached points to the surface itself. A surface that has
* no successors in the chain has next_attached set to NULL.
*
* Newly attached surfaces are attached right after the root surface. The
* complex chains are handled sep
erately in a sim
milar chain, with
* complex chains are handled sep
arately in a si
milar chain, with
* first_complex and next_complex. If a surface is attached to a complex
* surface compound, it's attached to the surface that the app requested,
* not the complex root. See GetAttachedSurface for a description
...
...
@@ -833,7 +833,7 @@ IDirectDrawSurfaceImpl_DeleteAttachedSurface(IDirectDrawSurface7 *iface,
* and all parent surfaces */
}
/* Find the
Pr
ecessor of the detached surface */
/* Find the
pred
ecessor of the detached surface */
while
(
Prev
)
{
if
(
Prev
->
next_attached
==
Surf
)
break
;
...
...
@@ -1046,7 +1046,7 @@ IDirectDrawSurfaceImpl_SetPrivateData(IDirectDrawSurface7 *iface,
/*****************************************************************************
* IDirectDrawSurface7::GetPrivateData
*
* Return
e
s the private data set with IDirectDrawSurface7::SetPrivateData
* Returns the private data set with IDirectDrawSurface7::SetPrivateData
*
* Params:
* tag: GUID of the data to return
...
...
@@ -1080,7 +1080,7 @@ IDirectDrawSurfaceImpl_GetPrivateData(IDirectDrawSurface7 *iface,
/*****************************************************************************
* IDirectDrawSurface7::FreePrivateData
*
* Frees private stored in the surface
* Frees private
data
stored in the surface
*
* Params:
* tag: Tag of the data to free
...
...
@@ -1645,7 +1645,7 @@ static HRESULT WINAPI IDirectDrawSurfaceImpl_ChangeUniquenessValue(IDirectDrawSu
volatile
IDirectDrawSurfaceImpl
*
vThis
=
This
;
TRACE
(
"(%p)
\n
"
,
This
);
/* A uniquness value of 0 is apparently special.
/* A uniqu
e
ness value of 0 is apparently special.
* This needs to be checked. */
while
(
1
)
{
DWORD
old_uniqueness_value
=
vThis
->
uniqueness_value
;
...
...
dlls/ddraw/tests/d3d.c
View file @
9bfbfcbe
...
...
@@ -33,7 +33,7 @@ static LPDIRECT3DVERTEXBUFFER7 lpVBufDest1 = NULL;
static
LPDIRECT3DVERTEXBUFFER7
lpVBufDest2
=
NULL
;
/* To compare bad floating point numbers. Not the ideal way to do it,
* but it should be enough
t
for here */
* but it should be enough for here */
#define comparefloat(a, b) ( ((a - b) < 0.0001) && ((a-b) > -0.0001) )
static
HRESULT
(
WINAPI
*
pDirectDrawCreateEx
)(
LPGUID
,
LPVOID
*
,
REFIID
,
LPUNKNOWN
);
...
...
dlls/ddraw/utils.c
View file @
9bfbfcbe
...
...
@@ -467,7 +467,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DDPixelFormat)
case
8
:
if
(
DDPixelFormat
->
u1
.
dwAlphaBitDepth
==
8
)
return
WINED3DFMT_A8L8
;
ERR
(
"Unkown Alpha / Lumincase bit depth combination
\n
"
);
ERR
(
"Unk
n
own Alpha / Lumincase bit depth combination
\n
"
);
return
WINED3DFMT_UNKNOWN
;
}
}
...
...
@@ -484,7 +484,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DDPixelFormat)
return
WINED3DFMT_L8
;
default:
ERR
(
"Unkown luminance-only bit depth 0x%lx
\n
"
,
DDPixelFormat
->
u1
.
dwLuminanceBitCount
);
ERR
(
"Unk
n
own luminance-only bit depth 0x%lx
\n
"
,
DDPixelFormat
->
u1
.
dwLuminanceBitCount
);
return
WINED3DFMT_UNKNOWN
;
}
}
...
...
@@ -497,7 +497,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DDPixelFormat)
switch
(
DDPixelFormat
->
u1
.
dwZBufferBitDepth
)
{
case
8
:
ERR
(
"8 Bits Z+Stencil buffer pixelformat is not supported. Returning WINED3DFMT_UNKOWN
\n
"
);
ERR
(
"8 Bits Z+Stencil buffer pixelformat is not supported. Returning WINED3DFMT_UNK
N
OWN
\n
"
);
return
WINED3DFMT_UNKNOWN
;
case
15
:
...
...
@@ -519,7 +519,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DDPixelFormat)
return
WINED3DFMT_D24X4S4
;
default:
ERR
(
"Unkown Z buffer depth %ld
\n
"
,
DDPixelFormat
->
u1
.
dwZBufferBitDepth
);
ERR
(
"Unk
n
own Z buffer depth %ld
\n
"
,
DDPixelFormat
->
u1
.
dwZBufferBitDepth
);
return
WINED3DFMT_UNKNOWN
;
}
}
...
...
@@ -1123,7 +1123,7 @@ void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps)
* Params:
* dest: Pointer to the destination matrix
* src1: Pointer to the first source matrix
* src2: Pointer to the seco
u
nd source matrix
* src2: Pointer to the second source matrix
*
*****************************************************************************/
void
...
...
dlls/ddraw/vertexbuffer.c
View file @
9bfbfcbe
...
...
@@ -188,8 +188,8 @@ Thunk_IDirect3DVertexBufferImpl_1_Release(IDirect3DVertexBuffer *iface)
* IDirect3DVertexBuffer7::Lock
*
* Locks the vertex buffer and returns a pointer to the vertex data
* Locking vertex buffers is sim
m
ilar to locking surfaces, because Windows
* uses surfaces to store vertex data internally(According to the DX sdk)
* Locking vertex buffers is similar to locking surfaces, because Windows
* uses surfaces to store vertex data internally
(According to the DX sdk)
*
* Params:
* Flags: Locking flags. Relevant here are DDLOCK_READONLY, DDLOCK_WRITEONLY,
...
...
dlls/ddraw/viewport.c
View file @
9bfbfcbe
...
...
@@ -676,7 +676,7 @@ IDirect3DViewportImpl_NextLight(IDirect3DViewport3 *iface,
* IDirect3DViewport3::GetViewport2
*
* Returns the currently set viewport in a D3DVIEWPORT2 structure.
* Sim
m
ilar to IDirect3DViewport3::GetViewport
* Similar to IDirect3DViewport3::GetViewport
*
* Params:
* lpData: Pointer to the structure to fill
...
...
dlls/shell32/shlfolder.c
View file @
9bfbfcbe
...
...
@@ -189,7 +189,7 @@ HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc,
* via IPersistFolder3 or IPersistFolder.
*
* NOTES
* pathRoot can be NULL for Folders be
e
ing a drive.
* pathRoot can be NULL for Folders being a drive.
* In this case the absolute path is built from pidlChild (eg. C:)
*/
static
HRESULT
SHELL32_CoCreateInitSF
(
LPCITEMIDLIST
pidlRoot
,
LPCWSTR
pathRoot
,
...
...
dlls/wined3d/device.c
View file @
9bfbfcbe
...
...
@@ -5184,7 +5184,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
x
/=
2
;
y
/=
2
;
/* Msdn mention
e
s that Direct3D9 keeps a list of clipped vertices
/* Msdn mentions that Direct3D9 keeps a list of clipped vertices
* outside of the main vertex buffer memory. That needs some more
* investigation...
*/
...
...
dlls/wined3d/stateblock.c
View file @
9bfbfcbe
...
...
@@ -89,7 +89,7 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
IWineD3DVertexDeclaration_Release
(
This
->
vertexDecl
);
}
/* NOTE: according to MSDN: The applicaion is responsible for making sure the texture references are cleared down */
/* NOTE: according to MSDN: The applica
t
ion is responsible for making sure the texture references are cleared down */
for
(
counter
=
0
;
counter
<
GL_LIMITS
(
textures
);
counter
++
)
{
if
(
This
->
textures
[
counter
])
{
/* release our 'internal' hold on the texture */
...
...
dlls/wined3d/surface_gdi.c
View file @
9bfbfcbe
...
...
@@ -438,7 +438,7 @@ _Blt_ColorFill(BYTE *buf,
/*****************************************************************************
* IWineD3DSurface::Blt, GDI version
*
* Performs blits to a surface, eigh
t
er from a source of source-less blts
* Performs blits to a surface, eigher from a source of source-less blts
* This is the main functionality of DirectDraw
*
* Params:
...
...
dlls/wined3d/utils.c
View file @
9bfbfcbe
...
...
@@ -2086,7 +2086,7 @@ BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]
Rect
->
top
-=
This
->
glRect
.
top
;
Rect
->
bottom
-=
This
->
glRect
.
top
;
/* Get the gl coordinates. The gl rectangle is a power of 2, eigh
t
er the max size,
/* Get the gl coordinates. The gl rectangle is a power of 2, eigher the max size,
* or the pow2Width / pow2Height of the surface
*/
glTexCoord
[
0
]
=
(
float
)
Rect
->
left
/
(
float
)
(
This
->
glRect
.
right
-
This
->
glRect
.
left
);
...
...
programs/winefile/resource.h
View file @
9bfbfcbe
...
...
@@ -25,7 +25,7 @@
#define IDI_WINEFILE 100
/* accel
l
erators and menus */
/* accelerators and menus */
#define IDA_WINEFILE 101
#define IDM_WINEFILE 102
...
...
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