equal
deleted
inserted
replaced
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; |