Here is an example program for you (I went and installed DelphiX to work it out).

This requires a form with a DXDraw surface and a single DXImageList.

When you press space it will load the image (You need to change it to the image you want it to be).

When you press any other key, it removes the image.

If you press space a few times you will see the image repeated as it gets dynamically loaded into the DXImageList. When they get dynamically removed you will see less images.

This way before each level you can load the images you need and remove all the images you do not need.

(I'm not sure which of the Restores are needed - play around and see what results you can get).

[pascal]
unit Main;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DXDraws, DXClass;

type
TForm1 = class(TForm)
DXDraw1: TDXDraw;
DXImageList1: TDXImageList;
DXTimer1: TDXTimer;
procedure FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure DXTimer1Timer(Sender: TObject; LagCount: Integer);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
Y : Integer;
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
Var
P : TCollectionItem;
begin
If Key = 32 then
Begin
P := DXImageList1.Items.Add;
TPictureCollectionItem(P).Picture.LoadFromFile('Ni njaID.bmp');
TPictureCollectionItem(P).Transparent := True;
DXImageList1.Items.Restore;
DXDraw1.Restore;
End
Else
Begin
DXDraw1.Finalize;
P := DXImageList1.Items[DXImageList1.Items.Count-1];
DXImageList1.Items.Delete(DXImageList1.Items.Count-1);
DXDraw1.Restore;
DXImageList1.Items.Restore;
DXDraw1.Initialize;
Y := Y + 1;
End;
end;

procedure TForm1.DXTimer1Timer(Sender: TObject; LagCount: Integer);
Var
I : Integer;
begin
Caption := IntToStr(DXImageList1.Items.Count);
DXDraw1.Surface.Fill(0);
For I := 0 to DXImageList1.Items.Count-1 do
DXImageList1.Items[I].Draw(DXDraw1.Surface,I*100,100,0);
DXDraw1.Flip;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Y := 1;
end;

end.
[/pascal]