Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
924f55ee
Commit
924f55ee
authored
Mar 07, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compiler warnings
parent
253835bd
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
132 deletions
+87
-132
SDL_blit.h
src/video/SDL_blit.h
+9
-40
SDL_blit_auto.c
src/video/SDL_blit_auto.c
+72
-90
SDL_blit_slow.c
src/video/SDL_blit_slow.c
+1
-1
sdlgenblit.pl
src/video/sdlgenblit.pl
+5
-1
No files found.
src/video/SDL_blit.h
View file @
924f55ee
...
...
@@ -172,7 +172,7 @@ do { \
break; \
\
default: \
Pixel;
/* stop gcc complaints */
\
Pixel
= 0
;
/* stop gcc complaints */
\
break; \
} \
} while (0)
...
...
@@ -186,6 +186,7 @@ do { \
break; \
\
case 3: { \
Pixel = 0; \
if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \
r = *((buf)+fmt->Rshift/8); \
g = *((buf)+fmt->Gshift/8); \
...
...
@@ -204,7 +205,9 @@ do { \
break; \
\
default: \
Pixel;
/* stop gcc complaints */
\
/* stop gcc complaints */
\
Pixel = 0; \
r = g = b = 0; \
break; \
} \
} while (0)
...
...
@@ -277,43 +280,6 @@ do { \
break; \
} \
}
#define ASSEMBLE_RGB_AMASK(buf, bpp, fmt, r, g, b, Amask) \
{ \
switch (bpp) { \
case 2: { \
Uint16 *bufp; \
Uint16 Pixel; \
\
bufp = (Uint16 *)buf; \
PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \
*bufp = Pixel | (*bufp & Amask); \
} \
break; \
\
case 3: { \
if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \
*((buf)+fmt->Rshift/8) = r; \
*((buf)+fmt->Gshift/8) = g; \
*((buf)+fmt->Bshift/8) = b; \
} else { \
*((buf)+2-fmt->Rshift/8) = r; \
*((buf)+2-fmt->Gshift/8) = g; \
*((buf)+2-fmt->Bshift/8) = b; \
} \
} \
break; \
\
case 4: { \
Uint32 *bufp; \
Uint32 Pixel; \
\
bufp = (Uint32 *)buf; \
PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \
*bufp = Pixel | (*bufp & Amask); \
} \
break; \
} \
}
/* FIXME: Should we rescale alpha into 0..255 here? */
#define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a) \
...
...
@@ -367,6 +333,7 @@ do { \
break; \
\
case 3: { \
Pixel = 0; \
if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \
r = *((buf)+fmt->Rshift/8); \
g = *((buf)+fmt->Gshift/8); \
...
...
@@ -386,7 +353,9 @@ do { \
break; \
\
default: \
Pixel;
/* stop gcc complaints */
\
/* stop gcc complaints */
\
Pixel = 0; \
r = g = b = a = 0; \
break; \
} \
} while (0)
...
...
src/video/SDL_blit_auto.c
View file @
924f55ee
This diff is collapsed.
Click to expand it.
src/video/SDL_blit_slow.c
View file @
924f55ee
...
...
@@ -54,7 +54,7 @@ SDL_Blit_Slow(SDL_BlitInfo * info)
incx
=
(
info
->
src_w
<<
16
)
/
info
->
dst_w
;
while
(
info
->
dst_h
--
)
{
Uint8
*
src
;
Uint8
*
src
=
0
;
Uint8
*
dst
=
(
Uint8
*
)
info
->
dst
;
int
n
=
info
->
dst_w
;
srcx
=
-
1
;
...
...
src/video/sdlgenblit.pl
View file @
924f55ee
...
...
@@ -274,8 +274,12 @@ sub output_copyfunc
output_copyfuncname
(
"static void"
,
$src
,
$dst
,
$modulate
,
$blend
,
$scale
,
1
,
"\n"
);
print
FILE
<<__EOF__;
{
__EOF__
if
(
$modulate
||
$blend
)
{
print
FILE
<<__EOF__;
const int flags = info->flags;
__EOF__
}
if
(
$modulate
)
{
print
FILE
<<__EOF__;
const Uint32 modulateR = info->r;
...
...
@@ -309,7 +313,7 @@ __EOF__
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
$format_type{$src} *src;
$format_type{$src} *src
= 0
;
$format_type{$dst} *dst = ($format_type{$dst} *)info->dst;
int n = info->dst_w;
srcx = -1;
...
...
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