anchor.diff:    texFilter: TFilterType;
   begin
     for SAT := Low(TSpriteAtlasType) to High(TSpriteAtlasType) do
  -    for I := Low(gGFXPrepData[SAT]) to High(gGFXPrepData[SAT]) do
  -    begin
  -      with gGFXPrepData[SAT,I] do
  +    for I := Low(fGFXPrepData[SAT]) to High(fGFXPrepData[SAT]) do
  +    begin
  +      with fGFXPrepData[SAT,I] do
         begin
           texFilter := ftNearest;
           if LINEAR_FILTER_SPRITES and (fRT in [rxTrees, rxHouses, rxUnits]) then
  
positive.code:   SetLength(spriteInfo, 0);
    BinPack(spriteSizes, atlasSize, fPad, spriteInfo);
    if StopExec then Exit;
    SetLength(gGFXPrepData[saMask], Length(spriteInfo));
    PrepareAtlases(spriteInfo, saMask, tfAlpha8);
  end;
  
  
negative.code:         //Now that we know texture IDs we can fill GFXData structure
          SetGFXData(Tx, SpriteInfo[I], aMode, fRT);
        end else begin
          Assert(InRange(I, Low(fGFXPrepData[aMode]), High(fGFXPrepData[aMode])),
                 Format('Preloading sprite index out of range: %d, range [%d;%d]', [I, Low(fGFXPrepData[aMode]), High(fGFXPrepData[aMode])]));
          // Save prepared data for generating later (in main thread)
          fGFXPrepData[aMode, I].SpriteInfo := SpriteInfo[I];
          fGFXPrepData[aMode, I].TexType := aTexType;
          fGFXPrepData[aMode, I].Data := TD;
        end;
  
        if aMode = saBase then
  