Changeset 348


Ignore:
Timestamp:
Apr 6, 2021, 8:09:37 PM (4 years ago)
Author:
chronos
Message:
  • Added: Dummy scaling functions in IsoEngine.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/IsoEngine.pas

    r337 r348  
    255255  for ySrc := 0 to TerrainIconLines - 1 do begin
    256256    for i := 0 to yyt * 3 - 1 do
    257       MaskLine[i] := PixelPointer(Mask24, 0, 1 + ySrc * (yyt * 3 + 1) + i);
     257      MaskLine[i] := PixelPointer(Mask24, ScaleToNative(0),
     258        ScaleToNative(1 + ySrc * (yyt * 3 + 1) + i));
    258259    for xSrc := 0 to TerrainIconCols - 1 do begin
    259260      i := ySrc * 9 + xSrc;
     
    262263        Border := true;
    263264        for y := 0 to yyt * 3 - 1 do begin
    264           MaskLine[y].SetX(1 + xSrc * (xxt * 2 + 1) + TSpriteSize[i].Left);
     265          MaskLine[y].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + TSpriteSize[i].Left));
    265266          if MaskLine[y].Pixel^.B = 0 then Border := false;
    266267        end;
     
    271272        Border := true;
    272273        for x := 0 to xxt * 2 - 1 do begin
    273           MaskLine[TSpriteSize[i].Top].SetX(1 + xSrc * (xxt * 2 + 1) + x);
     274          MaskLine[TSpriteSize[i].Top].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + x));
    274275          if MaskLine[TSpriteSize[i].Top].Pixel^.B = 0 then Border := false;
    275276        end;
     
    280281        Border := true;
    281282        for y := 0 to yyt * 3 - 1 do begin
    282           MaskLine[y].SetX(xSrc * (xxt * 2 + 1) + TSpriteSize[i].Right);
     283          MaskLine[y].SetX(ScaleToNative(xSrc * (xxt * 2 + 1) + TSpriteSize[i].Right));
    283284          if MaskLine[y].Pixel^.B = 0 then Border := false;
    284285        end;
     
    289290        Border := true;
    290291        for x := 0 to xxt * 2 - 1 do begin
    291           MaskLine[TSpriteSize[i].Bottom - 1].SetX(1 + xSrc * (xxt * 2 + 1) + x);
     292          MaskLine[TSpriteSize[i].Bottom - 1].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + x));
    292293          if MaskLine[TSpriteSize[i].Bottom - 1].Pixel^.B = 0 then Border := false;
    293294        end;
Note: See TracChangeset for help on using the changeset viewer.