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/lineartexscan.inc

    r494 r521  
    2121    procedure NextLight; inline;
    2222    begin
    23       inc(light,lightStep);
     23      light := (light+lightStep) and 65535;
    2424      inc(lightAcc,lightDiff);
    2525      if lightAcc >= lightMod then
    2626      begin
    2727        dec(lightAcc,lightMod);
    28         inc(light);
     28        light := (light + 1) and 65535;
    2929      end;
    3030    end;
     
    5353      light := info1.lightness;
    5454      lightLen := info2.lightness-info1.lightness;
    55       lightStep := lightLen div (ix2-ix1);
    56       lightMod := ix2-ix1;
    57       lightDiff := lightLen - lightStep*(ix2-ix1);
     55      if lightLen >= 0 then
     56      begin
     57        lightStep := lightLen div (ix2-ix1);
     58        lightMod := ix2-ix1;
     59        lightDiff := lightLen - lightStep*(ix2-ix1);
     60      end else
     61      begin
     62        lightStep := (-lightLen+(ix2-ix1-1)) div (ix2-ix1);
     63        lightMod := ix2-ix1;
     64        lightDiff := lightLen + lightStep*(ix2-ix1);
     65        lightStep := 65536 - lightStep;
     66      end;
    5867    end;
    5968    lightAcc := lightDiff div 2;
Note: See TracChangeset for help on using the changeset viewer.