hedgewars/uLandObjects.pas
branchsdl2transition
changeset 9682 aa2431ed87b2
parent 9295 f8819c3dde54
child 9688 98024c99e58d
equal deleted inserted replaced
9679:dfaa39674e1e 9682:aa2431ed87b2
   101     bpp: LongInt;
   101     bpp: LongInt;
   102 begin
   102 begin
   103 WriteToConsole('Generating collision info... ');
   103 WriteToConsole('Generating collision info... ');
   104 
   104 
   105 if SDL_MustLock(Image) then
   105 if SDL_MustLock(Image) then
   106     SDLTry(SDL_LockSurface(Image) >= 0, true);
   106     SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true);
   107 
   107 
   108 bpp:= Image^.format^.BytesPerPixel;
   108 bpp:= Image^.format^.BytesPerPixel;
   109 TryDo(bpp = 4, 'Land object should be 32bit', true);
   109 TryDo(bpp = 4, 'Land object should be 32bit', true);
   110 
   110 
   111 if Width = 0 then
   111 if Width = 0 then
   147     bpp: LongInt;
   147     bpp: LongInt;
   148 begin
   148 begin
   149 WriteToConsole('Generating collision info... ');
   149 WriteToConsole('Generating collision info... ');
   150 
   150 
   151 if SDL_MustLock(Image) then
   151 if SDL_MustLock(Image) then
   152     SDLTry(SDL_LockSurface(Image) >= 0, true);
   152     SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true);
   153 
   153 
   154 bpp:= Image^.format^.BytesPerPixel;
   154 bpp:= Image^.format^.BytesPerPixel;
   155 TryDo(bpp = 4, 'Land object should be 32bit', true);
   155 TryDo(bpp = 4, 'Land object should be 32bit', true);
   156 
   156 
   157 p:= Image^.pixels;
   157 p:= Image^.pixels;