hedgewars/uStore.pas
changeset 37 2b7f2a43b999
parent 35 9367f246fb5f
child 38 c1ec4b15d70e
equal deleted inserted replaced
36:a803a00a3272 37:2b7f2a43b999
   187 if SDL_MustLock(LandSurface) then
   187 if SDL_MustLock(LandSurface) then
   188    SDL_UnlockSurface(LandSurface);
   188    SDL_UnlockSurface(LandSurface);
   189 end;
   189 end;
   190 
   190 
   191 procedure StoreInit;
   191 procedure StoreInit;
   192 var r: TSDL_Rect;
       
   193 begin
   192 begin
   194 StoreSurface  := SDL_CreateRGBSurface(SDL_HWSURFACE, 576, 1024, cBits, PixelFormat.RMask, PixelFormat.GMask, PixelFormat.BMask, 0);
   193 StoreSurface  := SDL_CreateRGBSurface(SDL_HWSURFACE, 576, 1024, cBits, PixelFormat.RMask, PixelFormat.GMask, PixelFormat.BMask, 0);
   195 TryDo( StoreSurface <> nil, errmsgCreateSurface + ': store' , true);
   194 TryDo( StoreSurface <> nil, errmsgCreateSurface + ': store' , true);
   196 r.x:= 0;
   195 SDL_FillRect(StoreSurface, nil, 0);
   197 r.y:= 0;
       
   198 r.w:= 576;
       
   199 r.h:= 1024;
       
   200 SDL_FillRect(StoreSurface, @r, 0);
       
   201 
   196 
   202 TempSurface   := SDL_CreateRGBSurface(SDL_HWSURFACE, 724, 320, cBits, PixelFormat.RMask, PixelFormat.GMask, PixelFormat.BMask, 0);
   197 TempSurface   := SDL_CreateRGBSurface(SDL_HWSURFACE, 724, 320, cBits, PixelFormat.RMask, PixelFormat.GMask, PixelFormat.BMask, 0);
   203 TryDo(  TempSurface <> nil, errmsgCreateSurface + ': temp'  , true);
   198 TryDo(  TempSurface <> nil, errmsgCreateSurface + ': temp'  , true);
   204 
   199 
   205 TryDo(SDL_SetColorKey( StoreSurface, SDL_SRCCOLORKEY or SDL_RLEACCEL, 0) = 0, errmsgTransparentSet, true);
   200 TryDo(SDL_SetColorKey( StoreSurface, SDL_SRCCOLORKEY or SDL_RLEACCEL, 0) = 0, errmsgTransparentSet, true);