X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Finit.c;h=08bbb05bdfe968f051c0a73041496c48d4c5bb0b;hp=1c56fc0a3d9b7f6cfc782690452bc007333b5ae0;hb=1465ca1ffdf2104d25b9a46ca9bf8a3f175403fd;hpb=621b6a2c4781c9c3e2f5849f9c184a906e0ce5b6 diff --git a/src/init.c b/src/init.c index 1c56fc0a..08bbb05b 100644 --- a/src/init.c +++ b/src/init.c @@ -328,11 +328,9 @@ void InitDisplay() void InitGfx() { - int i, j; + int i; -#if defined(TARGET_SDL) - SDL_Surface *sdl_image_tmp; -#else +#if defined(TARGET_X11) GC copy_clipmask_gc; XGCValues clip_gc_values; unsigned long clip_gc_valuemask; @@ -368,6 +366,7 @@ void InitGfx() }; #endif +#ifdef TARGET_X11 static struct { int start; @@ -419,6 +418,7 @@ void InitGfx() { GFX2_SHIELD_ACTIVE, 3 }, { -1, 0 } }; +#endif /* initialize playfield properties */ @@ -454,6 +454,7 @@ void InitGfx() #if defined(TARGET_SDL) +#if 0 /* initialize surface array to 'NULL' */ for(i=0; i=0; i++) { + int j; + for(j=0; jsurface = SDL_DisplayFormat(sdl_image_tmp)) == NULL) Error(ERR_EXIT, "SDL_DisplayFormat() failed: %s", SDL_GetError()); /* create native transparent surface for current image */ SDL_SetColorKey(sdl_image_tmp, SDL_SRCCOLORKEY, SDL_MapRGB(sdl_image_tmp->format, 0x00, 0x00, 0x00)); - if ((pix_masked[pos] = SDL_DisplayFormat(sdl_image_tmp)) == NULL) + if ((pix[pos]->surface_masked = SDL_DisplayFormat(sdl_image_tmp)) == NULL) Error(ERR_EXIT, "SDL_DisplayFormat() failed: %s", SDL_GetError()); /* free temporary surface */