Commit d73c7109 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

wined3d: Reduce usage of long integral types in surface.c.

parent 894e4636
...@@ -41,7 +41,7 @@ static void get_color_masks(const struct wined3d_format *format, uint32_t *masks ...@@ -41,7 +41,7 @@ static void get_color_masks(const struct wined3d_format *format, uint32_t *masks
} }
static void convert_r32_float_r16_float(const BYTE *src, BYTE *dst, static void convert_r32_float_r16_float(const BYTE *src, BYTE *dst,
DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) unsigned int pitch_in, unsigned int pitch_out, unsigned int w, unsigned int h)
{ {
unsigned short *dst_s; unsigned short *dst_s;
const float *src_f; const float *src_f;
...@@ -61,7 +61,7 @@ static void convert_r32_float_r16_float(const BYTE *src, BYTE *dst, ...@@ -61,7 +61,7 @@ static void convert_r32_float_r16_float(const BYTE *src, BYTE *dst,
} }
static void convert_r5g6b5_x8r8g8b8(const BYTE *src, BYTE *dst, static void convert_r5g6b5_x8r8g8b8(const BYTE *src, BYTE *dst,
DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) unsigned int pitch_in, unsigned int pitch_out, unsigned int w, unsigned int h)
{ {
static const unsigned char convert_5to8[] = static const unsigned char convert_5to8[] =
{ {
...@@ -103,7 +103,7 @@ static void convert_r5g6b5_x8r8g8b8(const BYTE *src, BYTE *dst, ...@@ -103,7 +103,7 @@ static void convert_r5g6b5_x8r8g8b8(const BYTE *src, BYTE *dst,
/* We use this for both B8G8R8A8 -> B8G8R8X8 and B8G8R8X8 -> B8G8R8A8, since /* We use this for both B8G8R8A8 -> B8G8R8X8 and B8G8R8X8 -> B8G8R8A8, since
* in both cases we're just setting the X / Alpha channel to 0xff. */ * in both cases we're just setting the X / Alpha channel to 0xff. */
static void convert_a8r8g8b8_x8r8g8b8(const BYTE *src, BYTE *dst, static void convert_a8r8g8b8_x8r8g8b8(const BYTE *src, BYTE *dst,
DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) unsigned int pitch_in, unsigned int pitch_out, unsigned int w, unsigned int h)
{ {
unsigned int x, y; unsigned int x, y;
...@@ -127,7 +127,7 @@ static inline BYTE cliptobyte(int x) ...@@ -127,7 +127,7 @@ static inline BYTE cliptobyte(int x)
} }
static void convert_yuy2_x8r8g8b8(const BYTE *src, BYTE *dst, static void convert_yuy2_x8r8g8b8(const BYTE *src, BYTE *dst,
DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) unsigned int pitch_in, unsigned int pitch_out, unsigned int w, unsigned int h)
{ {
int c2, d, e, r2 = 0, g2 = 0, b2 = 0; int c2, d, e, r2 = 0, g2 = 0, b2 = 0;
unsigned int x, y; unsigned int x, y;
...@@ -169,7 +169,7 @@ static void convert_yuy2_x8r8g8b8(const BYTE *src, BYTE *dst, ...@@ -169,7 +169,7 @@ static void convert_yuy2_x8r8g8b8(const BYTE *src, BYTE *dst,
} }
static void convert_yuy2_r5g6b5(const BYTE *src, BYTE *dst, static void convert_yuy2_r5g6b5(const BYTE *src, BYTE *dst,
DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) unsigned int pitch_in, unsigned int pitch_out, unsigned int w, unsigned int h)
{ {
unsigned int x, y; unsigned int x, y;
int c2, d, e, r2 = 0, g2 = 0, b2 = 0; int c2, d, e, r2 = 0, g2 = 0, b2 = 0;
...@@ -212,7 +212,9 @@ static void convert_yuy2_r5g6b5(const BYTE *src, BYTE *dst, ...@@ -212,7 +212,9 @@ static void convert_yuy2_r5g6b5(const BYTE *src, BYTE *dst,
struct d3dfmt_converter_desc struct d3dfmt_converter_desc
{ {
enum wined3d_format_id from, to; enum wined3d_format_id from, to;
void (*convert)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h); void (*convert)(const BYTE *src, BYTE *dst,
unsigned int pitch_in, unsigned int pitch_out,
unsigned int w, unsigned int h);
}; };
static const struct d3dfmt_converter_desc converters[] = static const struct d3dfmt_converter_desc converters[] =
...@@ -968,7 +970,7 @@ do { \ ...@@ -968,7 +970,7 @@ do { \
} }
else else
{ {
DWORD masks[3]; uint32_t masks[3];
get_color_masks(src_format, masks); get_color_masks(src_format, masks);
keymask = masks[0] | masks[1] | masks[2]; keymask = masks[0] | masks[1] | masks[2];
} }
......
...@@ -1994,15 +1994,15 @@ struct wined3d_caps ...@@ -1994,15 +1994,15 @@ struct wined3d_caps
struct wined3d_color_key struct wined3d_color_key
{ {
DWORD color_space_low_value; /* low boundary of color space that is to unsigned int color_space_low_value; /* low boundary of color space that is to
* be treated as Color Key, inclusive */ * be treated as Color Key, inclusive */
DWORD color_space_high_value; /* high boundary of color space that is unsigned int color_space_high_value; /* high boundary of color space that is
* to be treated as Color Key, inclusive */ * to be treated as Color Key, inclusive */
}; };
struct wined3d_blt_fx struct wined3d_blt_fx
{ {
DWORD fx; uint32_t fx;
struct wined3d_color_key dst_color_key; struct wined3d_color_key dst_color_key;
struct wined3d_color_key src_color_key; struct wined3d_color_key src_color_key;
enum wined3d_format_id resolve_format_id; enum wined3d_format_id resolve_format_id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment