projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20131202-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
sdl.c
diff --git
a/src/libgame/sdl.c
b/src/libgame/sdl.c
index 4c484243934102774e2670d626f967495d87ef53..b9309408a4d1966ea687f6fa0db5b7d04fb64aa4 100644
(file)
--- a/
src/libgame/sdl.c
+++ b/
src/libgame/sdl.c
@@
-85,7
+85,7
@@
static void SDLSetWindowIcon(char *basename)
}
/* set transparent color */
}
/* set transparent color */
- SDL_SetColorKey(surface, S
DL_SRCCOLORKEY
,
+ SDL_SetColorKey(surface, S
ET_TRANSPARENT_PIXEL
,
SDL_MapRGB(surface->format, 0x00, 0x00, 0x00));
SDL_WM_SetIcon(surface, NULL);
SDL_MapRGB(surface->format, 0x00, 0x00, 0x00));
SDL_WM_SetIcon(surface, NULL);
@@
-1334,12
+1334,17
@@
int zoomSurfaceRGBA_scaleDownBy2(SDL_Surface *src, SDL_Surface *dst)
{
int x, y;
tColorRGBA *sp, *csp, *dp;
{
int x, y;
tColorRGBA *sp, *csp, *dp;
- int sgap, dgap;
+#if 0
+ int sgap;
+#endif
+ int dgap;
/* pointer setup */
sp = csp = (tColorRGBA *) src->pixels;
dp = (tColorRGBA *) dst->pixels;
/* pointer setup */
sp = csp = (tColorRGBA *) src->pixels;
dp = (tColorRGBA *) dst->pixels;
+#if 0
sgap = src->pitch - src->w * 4;
sgap = src->pitch - src->w * 4;
+#endif
dgap = dst->pitch - dst->w * 4;
for (y = 0; y < dst->h; y++)
dgap = dst->pitch - dst->w * 4;
for (y = 0; y < dst->h; y++)
@@
-1386,7
+1391,10
@@
int zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst)
{
int x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy;
tColorRGBA *sp, *csp, *dp;
{
int x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy;
tColorRGBA *sp, *csp, *dp;
- int sgap, dgap;
+#if 0
+ int sgap;
+#endif
+ int dgap;
/* use specialized zoom function when scaling down to exactly half size */
if (src->w == 2 * dst->w &&
/* use specialized zoom function when scaling down to exactly half size */
if (src->w == 2 * dst->w &&
@@
-1425,7
+1433,9
@@
int zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst)
/* pointer setup */
sp = csp = (tColorRGBA *) src->pixels;
dp = (tColorRGBA *) dst->pixels;
/* pointer setup */
sp = csp = (tColorRGBA *) src->pixels;
dp = (tColorRGBA *) dst->pixels;
+#if 0
sgap = src->pitch - src->w * 4;
sgap = src->pitch - src->w * 4;
+#endif
dgap = dst->pitch - dst->w * 4;
csay = say;
dgap = dst->pitch - dst->w * 4;
csay = say;
@@
-1696,7
+1706,7
@@
Bitmap *SDLLoadImage(char *filename)
UPDATE_BUSY_STATE();
/* create native transparent surface for current image */
UPDATE_BUSY_STATE();
/* create native transparent surface for current image */
- SDL_SetColorKey(sdl_image_tmp, S
DL_SRCCOLORKEY
,
+ SDL_SetColorKey(sdl_image_tmp, S
ET_TRANSPARENT_PIXEL
,
SDL_MapRGB(sdl_image_tmp->format, 0x00, 0x00, 0x00));
if ((new_bitmap->surface_masked = SDL_DisplayFormat(sdl_image_tmp)) == NULL)
{
SDL_MapRGB(sdl_image_tmp->format, 0x00, 0x00, 0x00));
if ((new_bitmap->surface_masked = SDL_DisplayFormat(sdl_image_tmp)) == NULL)
{