hedgewars/uLandObjects.pas
changeset 11507 bd9a2f1b0080
parent 11362 ed5a6478e710
child 11532 bf86c6cb9341
equal deleted inserted replaced
11506:24bef86e3f3a 11507:bd9a2f1b0080
   107     bpp: LongInt;
   107     bpp: LongInt;
   108 begin
   108 begin
   109 WriteToConsole('Generating collision info... ');
   109 WriteToConsole('Generating collision info... ');
   110 
   110 
   111 if SDL_MustLock(Image) then
   111 if SDL_MustLock(Image) then
   112     SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true);
   112     if SDLCheck(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true) then exit;
   113 
   113 
   114 bpp:= Image^.format^.BytesPerPixel;
   114 bpp:= Image^.format^.BytesPerPixel;
   115 TryDo(bpp = 4, 'Land object should be 32bit', true);
   115 TryDo(bpp = 4, 'Land object should be 32bit', true);
   116 
   116 
   117 if Width = 0 then
   117 if Width = 0 then
   158     bpp: LongInt;
   158     bpp: LongInt;
   159 begin
   159 begin
   160 WriteToConsole('Generating collision info... ');
   160 WriteToConsole('Generating collision info... ');
   161 
   161 
   162 if SDL_MustLock(Image) then
   162 if SDL_MustLock(Image) then
   163     SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true);
   163     if SDLCheck(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true) then exit;
   164 
   164 
   165 bpp:= Image^.format^.BytesPerPixel;
   165 bpp:= Image^.format^.BytesPerPixel;
   166 TryDo(bpp = 4, 'Land object should be 32bit', true);
   166 TryDo(bpp = 4, 'Land object should be 32bit', true);
   167 
   167 
   168 p:= Image^.pixels;
   168 p:= Image^.pixels;