Sorry I don't have more time to explain, but heres a quick breakdown.

This code comes from my competition entry from last year. It basically had an editor and a play engine. The code I pasted earlier was from the play engine and yes, fEngineState.game.tiles is a TDXImageList that is loaded from a file stream linked to a data file containing the games base data (fEngineState is a big object that holds the entire state of the play engine... one of the sub-objects is 'game' which hold all the games base data... one component of that is the tile set 'tiles').

To populate a TDXImageList at runtime, heres some code... this is taken straight out of my game data editor (fTileImportBuffer is a TDXImageList)

[pascal]
function TfrmGameEditor.loadTilesFromFile(filename:string): boolean;
var
dib : TDib;
tile: TDib;
x : integer;
y : integer;
tilesX : integer;
tilesY : integer;
srcRect : TRect;
dstRect : TRect;
item : TPictureCollectionItem;


dim : integer;
begin
result:=false;

fTileImportBuffer:=TDXImageList.create(application );

dib:=TDib.create;

dim:=8+(cboSourceSize.itemIndex*;

try
dib.LoadFromFile(filename);

if (dib.Width mod dim<>0) or (dib.height mod dim<>0) then
begin
showMessage('Cannot load file - Not divisible by '+intToStr(dim));
exit;
end;

dstRect.top:=0;
dstRect.left:=0;
dstRect.bottom:=dib.height;
dstRect.right:=dib.width;

tilesX:=(dib.width div dim);
tilesY:=(dib.height div dim);

dstRect.top:=0;
dstRect.left:=0;
dstRect.right:=dim;
dstRect.bottom:=dim;

tile:=TDib.create;
tile.SetSize(dim,dim,24);

for y:=1 to tilesY do
for x:=1 to tilesX do
begin
srcRect.left:=(x-1)*dim;
srcRect.right:=srcRect.left+dim;
srcRect.top:=(y-1)*dim;
srcRect.bottom:=srcRect.top+dim;

tile.canvas.CopyRect(dstRect,dib.canvas,srcRect);

item:=TPictureCollectionItem(fTileImportBuffer.Ite ms.add);
item.Picture.Graphic:=tile;
item.transparent:=true;
item.transparentColor:=clBlack;
end;

result:=true;
finally
try
dib.free;
except
end;

try
tile.free;
except
end;
end;

reinitializeTilePreviewDX;
end;

{$warnings on}

[/pascal]

What this does is loads a bitmap into a device independent bitmap and then chops it up into tiles of 'dim x dim' size. dim is calculated based on a size specified in a combo box on the editor form. These tiles are then just dumped into a TDXImageList.