Ignore:
Timestamp:
Apr 17, 2019, 12:58:41 AM (5 years ago)
Author:
chronos
Message:
  • Modified: Propagate project build mode options to used packages.
  • Added: Check memory leaks using heaptrc.
  • Modified: Update BGRABitmap package.
Location:
GraphicTest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest

    • Property svn:ignore
      •  

        old new  
        88GraphicTest.lps
        99GraphicTest.dbg
         10heaptrclog.trc
  • GraphicTest/Packages/bgrabitmap/perspectivescan.inc

    r494 r521  
    5151    procedure NextLight; inline;
    5252    begin
    53       inc(light,lightStep);
     53      light := (light+lightStep) and 65535;
    5454      inc(lightAcc,lightDiff);
    5555      if lightAcc >= lightMod then
    5656      begin
    5757        dec(lightAcc,lightMod);
    58         inc(light);
     58        light := (light + 1) and 65535;
    5959      end;
    6060    end;
     
    101101      light := info1.lightness;
    102102      lightLen := info2.lightness-info1.lightness;
    103       lightStep := lightLen div (ix2-ix1);
    104       lightMod := ix2-ix1;
    105       lightDiff := lightLen - lightStep*(ix2-ix1);
     103      if lightLen >= 0 then
     104      begin
     105        lightStep := lightLen div (ix2-ix1);
     106        lightMod := ix2-ix1;
     107        lightDiff := lightLen - lightStep*(ix2-ix1);
     108      end else
     109      begin
     110        lightStep := (-lightLen+(ix2-ix1-1)) div (ix2-ix1);
     111        lightMod := ix2-ix1;
     112        lightDiff := lightLen + lightStep*(ix2-ix1);
     113        lightStep := 65536 - lightStep;
     114      end;
    106115    end;
    107116    lightAcc := lightDiff div 2;
Note: See TracChangeset for help on using the changeset viewer.