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
6e408c4f
Commit
6e408c4f
authored
Aug 28, 2000
by
Lionel Ulmer
Committed by
Alexandre Julliard
Aug 28, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added ARGB 1555 format
- fixed refcount problem for Add/DeleteAttachedSurface
parent
1c79bbb1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
2 deletions
+38
-2
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+10
-0
d3dtexture.c
dlls/ddraw/d3dtexture.c
+22
-0
main.c
dlls/ddraw/dsurface/main.c
+6
-2
No files found.
dlls/ddraw/d3ddevice/mesa.c
View file @
6e408c4f
...
@@ -357,6 +357,16 @@ static HRESULT enum_texture_format_OpenGL(LPD3DENUMTEXTUREFORMATSCALLBACK cb,
...
@@ -357,6 +357,16 @@ static HRESULT enum_texture_format_OpenGL(LPD3DENUMTEXTUREFORMATSCALLBACK cb,
return
DD_OK
;
return
DD_OK
;
#endif
#endif
TRACE
(
"Enumerating GL_ARGB (no direct OpenGL equivalent - conversion needed)
\n
"
);
pformat
->
dwFlags
=
DDPF_RGB
|
DDPF_ALPHAPIXELS
;
pformat
->
u
.
dwRGBBitCount
=
16
;
pformat
->
u1
.
dwRBitMask
=
0x00007C00
;
pformat
->
u2
.
dwGBitMask
=
0x000003E0
;
pformat
->
u3
.
dwBBitMask
=
0x0000001F
;
pformat
->
u4
.
dwRGBAlphaBitMask
=
0x00008000
;
if
(
cb
(
&
sdesc
,
context
)
==
0
)
return
DD_OK
;
TRACE
(
"Enumerating Paletted (8)
\n
"
);
TRACE
(
"Enumerating Paletted (8)
\n
"
);
pformat
->
dwFlags
=
DDPF_PALETTEINDEXED8
;
pformat
->
dwFlags
=
DDPF_PALETTEINDEXED8
;
pformat
->
u
.
dwRGBBitCount
=
8
;
pformat
->
u
.
dwRGBBitCount
=
8
;
...
...
dlls/ddraw/d3dtexture.c
View file @
6e408c4f
...
@@ -530,6 +530,28 @@ HRESULT WINAPI IDirect3DTexture2Impl_Load(
...
@@ -530,6 +530,28 @@ HRESULT WINAPI IDirect3DTexture2Impl_Load(
GL_RGBA
,
GL_RGBA
,
GL_UNSIGNED_SHORT_4_4_4_4
,
GL_UNSIGNED_SHORT_4_4_4_4
,
src_d
->
u1
.
lpSurface
);
src_d
->
u1
.
lpSurface
);
}
else
if
(
src_d
->
ddpfPixelFormat
.
u4
.
dwRGBAlphaBitMask
==
0x00008000
)
{
/* Converting the 1555 format in 5551 packed */
WORD
*
surface
=
(
WORD
*
)
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
src_d
->
dwWidth
*
src_d
->
dwHeight
*
sizeof
(
WORD
));
DWORD
i
;
WORD
*
src
=
(
WORD
*
)
src_d
->
u1
.
lpSurface
,
*
dst
=
surface
;
for
(
i
=
0
;
i
<
src_d
->
dwHeight
*
src_d
->
dwWidth
;
i
++
)
{
*
dst
++
=
(((
*
src
&
0x8000
)
>>
15
)
|
((
*
src
&
0x7FFF
)
<<
1
));
src
++
;
}
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_RGBA
,
src_d
->
dwWidth
,
src_d
->
dwHeight
,
0
,
GL_RGBA
,
GL_UNSIGNED_SHORT_5_5_5_1
,
surface
);
HeapFree
(
GetProcessHeap
(),
0
,
surface
);
}
else
{
}
else
{
ERR
(
"Unhandled texture format (bad Aplha channel for a 16 bit texture)
\n
"
);
ERR
(
"Unhandled texture format (bad Aplha channel for a 16 bit texture)
\n
"
);
}
}
...
...
dlls/ddraw/dsurface/main.c
View file @
6e408c4f
...
@@ -581,7 +581,10 @@ HRESULT WINAPI IDirectDrawSurface4Impl_GetAttachedSurface(
...
@@ -581,7 +581,10 @@ HRESULT WINAPI IDirectDrawSurface4Impl_GetAttachedSurface(
if
(
!
found
)
if
(
!
found
)
return
DDERR_NOTFOUND
;
return
DDERR_NOTFOUND
;
*
lpdsf
=
(
LPDIRECTDRAWSURFACE4
)
chain
->
surfaces
[
found
-
1
-
xstart
];
*
lpdsf
=
(
LPDIRECTDRAWSURFACE4
)
chain
->
surfaces
[
found
-
1
-
xstart
];
/* FIXME: AddRef? */
/* For EverQuest testing */
IDirectDrawSurface4_AddRef
(
*
lpdsf
);
TRACE
(
"found %p
\n
"
,
*
lpdsf
);
TRACE
(
"found %p
\n
"
,
*
lpdsf
);
return
DD_OK
;
return
DD_OK
;
}
}
...
@@ -950,7 +953,8 @@ HRESULT WINAPI IDirectDrawSurface4Impl_DeleteAttachedSurface(
...
@@ -950,7 +953,8 @@ HRESULT WINAPI IDirectDrawSurface4Impl_DeleteAttachedSurface(
chain
=
This
->
s
.
chain
;
chain
=
This
->
s
.
chain
;
for
(
i
=
0
;
i
<
chain
->
nrofsurfaces
;
i
++
)
{
for
(
i
=
0
;
i
<
chain
->
nrofsurfaces
;
i
++
)
{
if
((
IDirectDrawSurface4Impl
*
)
lpDDSAttachedSurface
==
chain
->
surfaces
[
i
]){
if
((
IDirectDrawSurface4Impl
*
)
lpDDSAttachedSurface
==
chain
->
surfaces
[
i
]){
IDirectDrawSurface4_Release
(
lpDDSAttachedSurface
);
/* There is no AddRef in AddAttachedSurface, so why a release here :-)
IDirectDrawSurface4_Release(lpDDSAttachedSurface); */
chain
->
surfaces
[
i
]
->
s
.
chain
=
NULL
;
chain
->
surfaces
[
i
]
->
s
.
chain
=
NULL
;
memcpy
(
chain
->
surfaces
+
i
,
memcpy
(
chain
->
surfaces
+
i
,
...
...
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