anchor.diff:      LeToNInPlase(TopMargin);
     end;
   
  +  //todo: optimize other compression types
  +  if h.defType2 = 3 then
  +  begin
  +    IncreaseDefBuffer(h.prSize);
  +    AStream.Read(FDefBuffer[0], h.prSize);
  +  end;
  +
     RightMargin := h.FullWidth - h.SpriteWidth - h.LeftMargin;
     BottomMargin := h.FullHeight - h.SpriteHeight - h.TopMargin;
   
  
positive.code:   AStream.Seek(BaseOffset,soBeginning);
    AStream.Read(h{%H-},SizeOf(h));
  
    BaseOffset := AStream.Position;
    BaseOffsetor := BaseOffset;
  
    with h do
    begin
  
negative.code:   else
      raise Exception.Create('Unknown sprite compression format');
    end;
  
  
    BindUncompressedPaletted(ATextureID,h.FullWidth,h.SpriteHeight, @FBuffer[0]);
  end;
  