anchor.diff:  
       LoadRX7(i); //Something fancy to Load RX7 data (custom bitmaps and overrides)
   
  -    if i=4 then MakeCursors(4); //Make GUI items before they are flushed in MakeGFX
  -    MakeGFX(nil,i);
  -
  +    if i=4 then MakeCursors(4);
  +    MakeGFX(i);
  +    ClearUnusedGFX(i);
  +    
       StepRefresh();
     end;
   
  
positive.code: begin
    CreateDir(ExeDir+'Export\');
    CreateDir(ExeDir+'Export\'+RXData[RXid].Title+'.rx\');
    MyBitMap:=TBitMap.Create;
    MyBitMap.PixelFormat:=pf24bit;
  
    fResource.LoadRX(ExeDir+'data\gfx\res\'+RXData[RXid].Title+'.rx',RXid);
  
    for id:=1 to RXData[RXid].Qty do begin
  
      sx:=RXData[RXid].Size[id].X;
      sy:=RXData[RXid].Size[id].Y;
      MyBitMap.Width:=sx;
      MyBitMap.Height:=sy;
  
      UsePal:=DEF_PAL;
      if RXid=5 then UsePal:=RX5Pal[id];
      if RXid=6 then UsePal:=RX6Pal[id];
  
      for y:=0 to sy-1 do for x:=0 to sx-1 do begin
        t:=RXData[RXid].Data[id,y*sx+x];
        MyBitMap.Canvas.Pixels[x,y]:=fResource.GetColor32(t,UsePal);
      end;
      if sy>0 then MyBitMap.SaveToFile(ExeDir+'Export\'+RXData[RXid].Title+'.rx\'+RXData[RXid].Title+'_'+int2fix(id,4)+'.bmp');
  
  
negative.code:     begin
        StepCaption('Reading '+RXData[i].Title+' GFX ...');
        fLog.AppendLog('Reading '+RXData[i].Title+'.rx',LoadRX(ExeDir+'data\gfx\res\'+RXData[i].Title+'.rx',i));
        LoadRX7(i); //Updated sprites
        MakeGFX(i);
        //Alpha_tested sprites for houses. They come after MakeGFX cos they will
        //replace above data. 
        if i=2 then MakeGFX_AlphaTest(i);
        ClearUnusedGFX(i);
        StepRefresh();
      end;
  
  