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
2e851544
Commit
2e851544
authored
Aug 11, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Aug 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow the palette to be set and retrieved.
parent
5617b716
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
4 deletions
+41
-4
device.c
dlls/wined3d/device.c
+41
-4
No files found.
dlls/wined3d/device.c
View file @
2e851544
...
...
@@ -4463,25 +4463,62 @@ HRESULT WINAPI IWineD3DDeviceImpl_ValidateDevice(IWineD3DDevice *iface, DWORD*
HRESULT
WINAPI
IWineD3DDeviceImpl_SetPaletteEntries
(
IWineD3DDevice
*
iface
,
UINT
PaletteNumber
,
CONST
PALETTEENTRY
*
pEntries
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
int
j
;
TRACE
(
"(%p) : PaletteNumber %u
\n
"
,
This
,
PaletteNumber
);
if
(
PaletteNumber
<
0
||
PaletteNumber
>=
MAX_PALETTES
)
{
WARN
(
"(%p) : (%u) Out of range 0-%u, returning Invalid Call
\n
"
,
This
,
PaletteNumber
,
MAX_PALETTES
);
return
D3DERR_INVALIDCALL
;
}
for
(
j
=
0
;
j
<
256
;
++
j
)
{
This
->
palettes
[
PaletteNumber
][
j
].
peRed
=
pEntries
[
j
].
peRed
;
This
->
palettes
[
PaletteNumber
][
j
].
peGreen
=
pEntries
[
j
].
peGreen
;
This
->
palettes
[
PaletteNumber
][
j
].
peBlue
=
pEntries
[
j
].
peBlue
;
This
->
palettes
[
PaletteNumber
][
j
].
peFlags
=
pEntries
[
j
].
peFlags
;
}
TRACE
(
"(%p) : returning
\n
"
,
This
);
return
D3D_OK
;
}
HRESULT
WINAPI
IWineD3DDeviceImpl_GetPaletteEntries
(
IWineD3DDevice
*
iface
,
UINT
PaletteNumber
,
PALETTEENTRY
*
pEntries
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
int
j
;
TRACE
(
"(%p) : PaletteNumber %u
\n
"
,
This
,
PaletteNumber
);
if
(
PaletteNumber
<
0
||
PaletteNumber
>=
MAX_PALETTES
)
{
WARN
(
"(%p) : (%u) Out of range 0-%u, returning Invalid Call
\n
"
,
This
,
PaletteNumber
,
MAX_PALETTES
);
return
D3DERR_INVALIDCALL
;
}
for
(
j
=
0
;
j
<
256
;
++
j
)
{
pEntries
[
j
].
peRed
=
This
->
palettes
[
PaletteNumber
][
j
].
peRed
;
pEntries
[
j
].
peGreen
=
This
->
palettes
[
PaletteNumber
][
j
].
peGreen
;
pEntries
[
j
].
peBlue
=
This
->
palettes
[
PaletteNumber
][
j
].
peBlue
;
pEntries
[
j
].
peFlags
=
This
->
palettes
[
PaletteNumber
][
j
].
peFlags
;
}
TRACE
(
"(%p) : returning
\n
"
,
This
);
return
D3D_OK
;
}
HRESULT
WINAPI
IWineD3DDeviceImpl_SetCurrentTexturePalette
(
IWineD3DDevice
*
iface
,
UINT
PaletteNumber
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
TRACE
(
"(%p) : PaletteNumber %u
\n
"
,
This
,
PaletteNumber
);
if
(
PaletteNumber
<
0
||
PaletteNumber
>=
MAX_PALETTES
)
{
WARN
(
"(%p) : (%u) Out of range 0-%u, returning Invalid Call
\n
"
,
This
,
PaletteNumber
,
MAX_PALETTES
);
return
D3DERR_INVALIDCALL
;
}
/*TODO: stateblocks */
This
->
currentPalette
=
PaletteNumber
;
TRACE
(
"(%p) : returning
\n
"
,
This
);
return
D3D_OK
;
}
HRESULT
WINAPI
IWineD3DDeviceImpl_GetCurrentTexturePalette
(
IWineD3DDevice
*
iface
,
UINT
*
PaletteNumber
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
if
(
PaletteNumber
==
NULL
)
{
WARN
(
"(%p) : returning Invalid Call
\n
"
,
This
);
return
D3DERR_INVALIDCALL
;
}
/*TODO: stateblocks */
*
PaletteNumber
=
This
->
currentPalette
;
TRACE
(
"(%p) : returning %u
\n
"
,
This
,
*
PaletteNumber
);
return
D3D_OK
;
}
...
...
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