Ignore:
Timestamp:
Jan 13, 2017, 7:45:16 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Replaced ScanLine access be linux supported pixel access.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/MessgEx.pas

    r61 r62  
    232232  wScrewed = 43;
    233233  hScrewed = 27;
    234 type
    235   TLine = array [0 .. 9999, 0 .. 2] of Byte;
    236234var
    237235  ix, iy, xDst, yDst, dx, dy, xIcon, yIcon, xb, yb, wb, hb: integer;
    238236  x1, xR, yR, share: single;
    239237  Screwed: array [0 .. wScrewed - 1, 0 .. hScrewed - 1, 0 .. 3] of single;
    240   SrcLine: ^TLine;
    241 
    242 begin
    243   if IconIndex >= 0 then
    244   begin
     238  SrcPtr: TPixelPointer;
     239begin
     240  if IconIndex >= 0 then begin
    245241    xIcon := IconIndex mod 7 * xSizeBig;
    246242    yIcon := (IconIndex + SystemIconLines * 7) div 7 * ySizeBig;
     
    248244    fillchar(Screwed, sizeof(Screwed), 0);
    249245    BigImp.BeginUpdate;
    250     for iy := 0 to 39 do
    251     begin
    252       SrcLine := BigImp.ScanLine[iy + yIcon];
    253       for ix := 0 to 55 do
    254       begin
     246    for iy := 0 to 39 do begin
     247      for ix := 0 to 55 do begin
     248        SrcPtr.Init(BigImp, ix + xIcon, iy + yIcon);
    255249        xR := ix * (37 + iy * 5 / 40) / 56;
    256250        xDst := Trunc(xR);
     
    261255        yR := Frac(yR);
    262256        for dx := 0 to 1 do
    263           for dy := 0 to 1 do
    264           begin
     257          for dy := 0 to 1 do begin
    265258            if dx = 0 then
    266259              share := 1 - xR
     
    272265              share := share * yR;
    273266            Screwed[xDst + dx, yDst + dy, 0] := Screwed[xDst + dx, yDst + dy, 0]
    274               + share * SrcLine[ix + xIcon, 0];
     267              + share * SrcPtr.Pixel^.B;
    275268            Screwed[xDst + dx, yDst + dy, 1] := Screwed[xDst + dx, yDst + dy, 1]
    276               + share * SrcLine[ix + xIcon, 1];
     269              + share * SrcPtr.Pixel^.G;
    277270            Screwed[xDst + dx, yDst + dy, 2] := Screwed[xDst + dx, yDst + dy, 2]
    278               + share * SrcLine[ix + xIcon, 2];
     271              + share * SrcPtr.Pixel^.R;
    279272            Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy,
    280273              3] + share;
Note: See TracChangeset for help on using the changeset viewer.