# HG changeset patch # User sheepluva # Date 1506715589 -7200 # Node ID 7bae1fab444bb527db991f93a39e615b4a971a20 # Parent b4b5484be65131073388c11792cc57f12226c825 currently irrelevant sdl call adjustment as suggested by https://wiki.libsdl.org/MigrationGuide diff -r b4b5484be651 -r 7bae1fab444b hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Fri Sep 29 19:31:25 2017 +0200 +++ b/hedgewars/SDLh.pas Fri Sep 29 22:06:29 2017 +0200 @@ -77,6 +77,9 @@ ///////////////////// CONSTANT DEFINITIONS ///////////////////// ///////////////////////////////////////////////////////////////// + SDL_FALSE = 0; + SDL_TRUE = 1; + // SDL_Init() flags SDL_INIT_TIMER = $00000001; SDL_INIT_AUDIO = $00000010; diff -r b4b5484be651 -r 7bae1fab444b hedgewars/uRenderUtils.pas --- a/hedgewars/uRenderUtils.pas Fri Sep 29 19:31:25 2017 +0200 +++ b/hedgewars/uRenderUtils.pas Fri Sep 29 22:06:29 2017 +0200 @@ -336,7 +336,7 @@ WriteInRoundRect(finalSurface, 0, 0, Color, font, s, maxLength); - checkFails(SDL_SetColorKey(finalSurface, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, false); + checkFails(SDL_SetColorKey(finalSurface, SDL_TRUE, 0) = 0, errmsgTransparentSet, false); RenderStringTexLim:= Surface2Tex(finalSurface, false); diff -r b4b5484be651 -r 7bae1fab444b hedgewars/uStore.pas --- a/hedgewars/uStore.pas Fri Sep 29 19:31:25 2017 +0200 +++ b/hedgewars/uStore.pas Fri Sep 29 22:06:29 2017 +0200 @@ -152,7 +152,7 @@ texsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, RMask, GMask, BMask, AMask); if not checkFails(texsurf <> nil, errmsgCreateSurface, true) then - checkFails(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); + checkFails(SDL_SetColorKey(texsurf, SDL_TRUE, 0) = 0, errmsgTransparentSet, true); if not allOK then exit(nil); @@ -201,7 +201,7 @@ r.h:= 32; texsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, r.w, r.h, 32, RMask, GMask, BMask, AMask); if not checkFails(texsurf <> nil, errmsgCreateSurface, true) then - checkFails(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); + checkFails(SDL_SetColorKey(texsurf, SDL_TRUE, 0) = 0, errmsgTransparentSet, true); if not allOK then exit; r.w:= 26; @@ -664,7 +664,7 @@ tmpsurf:= doSurfaceConversion(tmpsurf); if (imageFlags and ifTransparent) <> 0 then - if checkFails(SDL_SetColorKey(tmpsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true) then exit; + if checkFails(SDL_SetColorKey(tmpsurf, SDL_TRUE, 0) = 0, errmsgTransparentSet, true) then exit; WriteLnToConsole(msgOK + ' (' + inttostr(tmpsurf^.w) + 'x' + inttostr(tmpsurf^.h) + ')');