equal
deleted
inserted
replaced
415 // these sprites are optional |
415 // these sprites are optional |
416 if critical then |
416 if critical then |
417 imflags := (imflags or ifCritical); |
417 imflags := (imflags or ifCritical); |
418 |
418 |
419 // load the image |
419 // load the image |
420 tmpsurf := LoadDataImageAltPath(Path, AltPath, FileName, imflags) |
420 tmpsurf := LoadDataImageAltPath(Path, AltPath, FileName, imflags); |
|
421 if (tmpsurf <> nil) and checkSum then |
|
422 for y := 0 to tmpsurf^.h-1 do |
|
423 syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PByteArray(tmpsurf^.pixels)^[y*tmpsurf^.pitch], tmpsurf^.w*4) |
421 end; |
424 end; |
422 |
425 |
423 if tmpsurf <> nil then |
426 if tmpsurf <> nil then |
424 begin |
427 begin |
425 if getImageDimensions then |
428 if getImageDimensions then |
469 if not reload then |
472 if not reload then |
470 begin |
473 begin |
471 {$IFDEF USE_CONTEXT_RESTORE} |
474 {$IFDEF USE_CONTEXT_RESTORE} |
472 Surface:= tmpsurf |
475 Surface:= tmpsurf |
473 {$ELSE} |
476 {$ELSE} |
474 if checkSum then |
|
475 for y := 0 to tmpsurf^.h-1 do |
|
476 syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PByteArray(tmpsurf^.pixels)^[y*tmpsurf^.pitch], tmpsurf^.w*4); |
|
477 |
|
478 if saveSurf then |
477 if saveSurf then |
479 Surface:= tmpsurf |
478 Surface:= tmpsurf |
480 else |
479 else |
481 SDL_FreeSurface(tmpsurf) |
480 SDL_FreeSurface(tmpsurf) |
482 {$ENDIF} |
481 {$ENDIF} |