PDA

View Full Version : reload DXG file



DraculaLin
24-12-2003, 03:26 PM
DXImageList.LoadFromFile('List1.dxg');
DXImageList.LoadFromFile('List2.dxg');

but List1.dxg appear
How can i remain List1.dxg (List1.dxg+List2.dxg)

Paulius
24-12-2003, 06:36 PM
I can?_~t imagine why you?_~d wish to do this, why not use a couple of image list components, or move the images to one list?

DraculaLin
25-12-2003, 09:23 AM
There is about 200 of dxg file in my game application.
I want to load them in dynamic,each game level needs different dxg file
and it is impossible to load all file at the same time(file size is over 600M).

or put 200 DXImagelist at form?

Traveler
25-12-2003, 11:52 AM
I kinda amazes me that you have over 200 imagelists in your game. Guessing an avarage of 15 images/list, makes 3000 images :shock: wow!

In any case, it's quite impossible to place 200 imagelists on the form because it will slowdown your game enormously.

But if one level needs one perhaps two or mayby three dxg files then why not load each file to seperate imagelists before the start of each level?

cairnswm
06-01-2004, 08:16 AM
But you would want to reuse those image lists on each level.

For example: For each level I have a list for 1. Player images, 2. Map images, 3. Enemies, 4. Objects.

If I have 100 levels I'd need to repeat 100 times - I'd rather just reuse the exisiting lists.

I must admit I havn't tried reusing image lists - I've just presumed they would work when I get to need them.

czar
17-01-2004, 07:39 PM
have you tried

DXImageList1.Items.Restore;

do this after loading your dxg and I am sure it will work.

DraculaLin
18-01-2004, 09:41 AM
ImageList.LoadFromFile('List1.dxg');
ImageList.Items.Restore;
ImageList.LoadFromFile('List2.dxg');
it's doesn't work :(
it's still only List2.dxg

czar
18-01-2004, 07:29 PM
Sorry, I must have read your first post incorrectly



DXImageList.LoadFromFile('List1.dxg');
DXImageList.LoadFromFile('List2.dxg');

but List1.dxg appear


I thought the problem was that you couldn't get list2 to appear. Merging I have never tried and I think you may be out of luck.

Maybe you could use a second imagelist to load list2, then create new items copy from imagelist2 and add to imagelist1 and then clear imagelist2 again.

Or depending hopw you have organised your images why not use multiple imagelists?