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
fad4593a
Commit
fad4593a
authored
Oct 12, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 12, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 16 (565) -> 15 (555) bit depth converter.
parent
beca6ada
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
convert.c
dlls/ddraw/convert.c
+23
-1
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-1
No files found.
dlls/ddraw/convert.c
View file @
fad4593a
...
...
@@ -158,6 +158,27 @@ static void palette_convert_24_to_8(
}
/* *************************************
16 bpp to 15 bpp
************************************* */
static
void
pixel_convert_15_to_16
(
void
*
src
,
void
*
dst
,
DWORD
width
,
DWORD
height
,
LONG
pitch
,
IDirectDrawPaletteImpl
*
palette
)
{
unsigned
short
*
c_src
=
(
unsigned
short
*
)
src
;
unsigned
short
*
c_dst
=
(
unsigned
short
*
)
dst
;
int
y
;
for
(
y
=
height
;
y
--
;
)
{
unsigned
short
*
srclineend
=
c_src
+
width
;
while
(
c_src
<
srclineend
)
{
unsigned
short
val
=
*
c_src
++
;
*
c_dst
++=
((
val
&
0xFFC0
)
>>
1
)
|
(
val
&
0x001f
);
}
c_src
+=
((
pitch
/
2
)
-
width
);
}
}
/* *************************************
32 bpp to 16 bpp
************************************* */
static
void
pixel_convert_32_to_16
(
...
...
@@ -203,11 +224,12 @@ static void pixel_convert_32_to_24(
}
}
Convert
ModeEmulations
[
6
]
=
{
Convert
ModeEmulations
[
7
]
=
{
{
{
32
,
24
,
0x00FF0000
,
0x0000FF00
,
0x000000FF
},
{
24
,
24
,
0xFF0000
,
0x0000FF00
,
0x00FF
},
{
pixel_convert_32_to_24
,
NULL
}
},
{
{
32
,
24
,
0x00FF0000
,
0x0000FF00
,
0x000000FF
},
{
8
,
8
,
0x00
,
0x00
,
0x00
},
{
pixel_convert_32_to_8
,
palette_convert_24_to_8
}
},
{
{
32
,
24
,
0x00FF0000
,
0x0000FF00
,
0x000000FF
},
{
16
,
16
,
0xF800
,
0x07E0
,
0x001F
},
{
pixel_convert_32_to_16
,
NULL
}
},
{
{
24
,
24
,
0xFF0000
,
0x00FF00
,
0x0000FF
},
{
8
,
8
,
0x00
,
0x00
,
0x00
},
{
pixel_convert_24_to_8
,
palette_convert_24_to_8
}
},
{
{
16
,
15
,
0x7C00
,
0x03E0
,
0x001F
},
{
16
,
16
,
0xf800
,
0x07e0
,
0x001f
},
{
pixel_convert_15_to_16
,
NULL
}
},
{
{
16
,
16
,
0xF800
,
0x07E0
,
0x001F
},
{
8
,
8
,
0x00
,
0x00
,
0x00
},
{
pixel_convert_16_to_8
,
palette_convert_16_to_8
}
},
{
{
16
,
15
,
0x7C00
,
0x03E0
,
0x001F
},
{
8
,
8
,
0x00
,
0x00
,
0x00
},
{
pixel_convert_16_to_8
,
palette_convert_15_to_8
}
},
};
dlls/ddraw/ddraw_private.h
View file @
fad4593a
...
...
@@ -380,7 +380,7 @@ typedef struct {
ConvertFuncs
funcs
;
}
Convert
;
extern
Convert
ModeEmulations
[
6
];
extern
Convert
ModeEmulations
[
7
];
extern
int
_common_depth_to_pixelformat
(
DWORD
depth
,
LPDIRECTDRAW
ddraw
);
extern
HRESULT
create_direct3d
(
LPVOID
*
obj
,
IDirectDraw2Impl
*
);
...
...
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