hedgewars/uLandObjects.pas
changeset 12758 49c31d8cc740
parent 12711 20dbb3a03e61
child 12759 df9d9d19406a
equal deleted inserted replaced
12757:6f4ab0339c16 12758:49c31d8cc740
   260 begin
   260 begin
   261 if girSurf = nil then
   261 if girSurf = nil then
   262     girSurf:= LoadDataImageAltPath(ptCurrTheme, ptGraphics, 'Girder', ifCritical or ifColorKey or ifIgnoreCaps);
   262     girSurf:= LoadDataImageAltPath(ptCurrTheme, ptGraphics, 'Girder', ifCritical or ifColorKey or ifIgnoreCaps);
   263 
   263 
   264 for y := 0 to girsurf^.h-1 do
   264 for y := 0 to girsurf^.h-1 do
   265     syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PLongWordArray(girsurf^.pixels)^[y*girsurf^.w], girsurf^.w);
   265     syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PByteArray(girsurf^.pixels)^[y*girsurf^.pitch], girsurf^.w);
   266 
   266 
   267 girderHeight:= girSurf^.h;
   267 girderHeight:= girSurf^.h;
   268 
   268 
   269 y:= topY+150;
   269 y:= topY+150;
   270 repeat
   270 repeat
   697             Maxcnt:= StrToInt(Trim(Copy(s, 1, Pred(i))));
   697             Maxcnt:= StrToInt(Trim(Copy(s, 1, Pred(i))));
   698             Delete(s, 1, i);
   698             Delete(s, 1, i);
   699             if (Maxcnt < 1) or (Maxcnt > MAXTHEMEOBJECTS) then
   699             if (Maxcnt < 1) or (Maxcnt > MAXTHEMEOBJECTS) then
   700                 OutError('Object''s max count should be between 1 and '+ inttostr(MAXTHEMEOBJECTS) +' (it was '+ inttostr(Maxcnt) +').', true);
   700                 OutError('Object''s max count should be between 1 and '+ inttostr(MAXTHEMEOBJECTS) +' (it was '+ inttostr(Maxcnt) +').', true);
   701             for y := 0 to Surf^.h-1 do
   701             for y := 0 to Surf^.h-1 do
   702                 syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PLongWordArray(Surf^.pixels)^[y*Surf^.w], Surf^.w);
   702                 syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PByteArray(Surf^.pixels)^[y*Surf^.pitch], Surf^.w);
   703 
   703 
   704             inrectcnt := 0;
   704             inrectcnt := 0;
   705 
   705 
   706             for ii := 1 to Length(S) do
   706             for ii := 1 to Length(S) do
   707               if S[ii] = ',' then
   707               if S[ii] = ',' then