Ignore:
Timestamp:
Jan 9, 2017, 12:56:03 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Black terrain tiles due new bitmap initialized as transparent.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/IsoEngine.pas

    r34 r35  
    140140  LandPatch.PixelFormat := pf24bit;
    141141  LandPatch.Canvas.Brush.Color := 0;
    142   LandPatch.Width := xxt * 18;
    143   LandPatch.Height := yyt * 9;
     142  LandPatch.SetSize(xxt * 18, yyt * 9);
     143  LandPatch.Canvas.FillRect(0, 0, LandPatch.Width, LandPatch.Height);
    144144  if OceanPatch <> nil then
    145145    OceanPatch.Free;
     
    147147  OceanPatch.PixelFormat := pf24bit;
    148148  OceanPatch.Canvas.Brush.Color := 0;
    149   OceanPatch.Width := xxt * 8;
    150   OceanPatch.Height := yyt * 4;
     149  OceanPatch.SetSize(xxt * 8, yyt * 4);
     150  OceanPatch.Canvas.FillRect(0, 0, OceanPatch.Width, OceanPatch.Height);
    151151  LandMore := TBitmap.Create;
    152152  LandMore.PixelFormat := pf24bit;
    153153  LandMore.Canvas.Brush.Color := 0;
    154   LandMore.Width := xxt * 18;
    155   LandMore.Height := yyt * 9;
     154  LandMore.SetSize(xxt * 18, yyt * 9);
     155  LandMore.Canvas.FillRect(0, 0, LandMore.Width, LandMore.Height);
    156156  OceanMore := TBitmap.Create;
    157157  OceanMore.PixelFormat := pf24bit;
    158158  OceanMore.Canvas.Brush.Color := 0;
    159   OceanMore.Width := xxt * 8;
    160   OceanMore.Height := yyt * 4;
     159  OceanMore.SetSize(xxt * 8, yyt * 4);
     160  OceanMore.Canvas.FillRect(0, 0, OceanMore.Width, OceanMore.Height);
    161161  DitherMask := TBitmap.Create;
    162162  DitherMask.PixelFormat := pf24bit;
    163   DitherMask.Width := xxt * 2;
    164   DitherMask.Height := yyt * 2;
     163  DitherMask.SetSize(xxt * 2, yyt * 2);
     164  DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height);
    165165  BitBlt(DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt * 2,
    166166    GrExt[HGrTerrain].Mask.Canvas.Handle, 1 + 7 * (xxt * 2 + 1),
     
    326326    BitBlt(LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), yyt, xxt * 2, yyt,
    327327      DitherMask.Canvas.Handle, 0, 0, SRCAND);
    328 
    329328  BitBlt(DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt, DitherMask.Canvas.Handle,
    330329    0, 0, DSTINVERT);
     
    337336  OceanMore.Free;
    338337  DitherMask.Free;
    339   // LandPatch.Savetofile('landpatch.bmp');
     338  //LandPatch.Savetofile('landpatch.bmp');
    340339
    341340  // reduce size of terrain icons
Note: See TracChangeset for help on using the changeset viewer.