Skip to content

Instantly share code, notes, and snippets.

@alfadur
Created August 16, 2019 20:15
Show Gist options
  • Save alfadur/cf79bd28b17fb134e9e869be6d9aae6f to your computer and use it in GitHub Desktop.
Save alfadur/cf79bd28b17fb134e9e869be6d9aae6f to your computer and use it in GitHub Desktop.
digest log
diff -r f53bfe04065e hedgewars/uLandObjects.pas
--- a/hedgewars/uLandObjects.pas Fri Aug 16 20:46:10 2019 +0300
+++ b/hedgewars/uLandObjects.pas Fri Aug 16 23:13:14 2019 +0300
@@ -362,7 +362,10 @@
end;
for y := 0 to Image^.h-1 do
+ begin
syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PByteArray(Image^.pixels)^[y*Image^.pitch], Image^.w*4);
+ AddFileLog(IntToStr(syncedPixelDigest));
+ end;
if SDL_MustLock(Image) then
SDL_UnlockSurface(Image);
diff -r f53bfe04065e hedgewars/uStore.pas
--- a/hedgewars/uStore.pas Fri Aug 16 20:46:10 2019 +0300
+++ b/hedgewars/uStore.pas Fri Aug 16 23:13:14 2019 +0300
@@ -433,7 +433,10 @@
tmpsurf := LoadDataImageAltPath(Path, AltPath, FileName, imflags);
if (tmpsurf <> nil) and checkSum then
for y := 0 to tmpsurf^.h-1 do
- syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PByteArray(tmpsurf^.pixels)^[y*tmpsurf^.pitch], tmpsurf^.w*4)
+ begin
+ syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PByteArray(tmpsurf^.pixels)^[y*tmpsurf^.pitch], tmpsurf^.w*4);
+ AddFileLog(FileName + ': ' + IntToStr(syncedPixelDigest));
+ end;
end;
if tmpsurf <> nil then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment