Ultimate Amiga

Network Boards => AMOS Language Discussion => AMOS Factory => AMOS Forum => Topic started by: rednova on December 15, 2007, 07:36:13 PM

Title: icon bank
Post by: rednova on December 15, 2007, 07:36:13 PM
Dear Friends:
I load icons one at a time in my wizard game. Let us say I have 60 icons. Is it possible to pack em all in one icon bank? Then load em one at a time from the bank?
Is it also possible to switch them like a flipbook...to display em so fast to make em look like an animation?
Pls help me...

cheers!!!

rednova
-mobilis in mobile-
Title: Re: icon bank
Post by: SamuraiCrow on December 15, 2007, 11:43:34 PM
Yes, it is possible to use an icon bank as a flip book.  If you want to create a full-screen animation, it would be better to use the AMCAF extension's anim example saved in Anim5 format.  That way you'll get both compression and animation from the same code.  I don't think it's possible to compress icons individually in a bank.
Title: Re: icon bank
Post by: Lonewolf10 on December 18, 2007, 09:34:50 PM

Hmmm... I suppose you could have 65 banks each with one icon, but I don't know if the packing would be efficient. You would then use the swap command to make the relevant one go in bank 2.
Icons are usually in one large bank, which would make the compression more efficient if the whole file was packed. I haven't looked into this, so maybe they are compressed separately.


Hmmm.. just read page 14.E.05 (under "Object banks and Icon banks stored in memory") and if I understand it correctly I don't think it is possible to pack Icon banks. The reason I say this is that (to quote the manual) "These images are stored in their own independant memory locations, and are scattered through the Amiga's Chip RAM". For this reason you are heavily advised (got this from the manual) not to use BLOAD and BSAVE with them, nor try to FILL or COPY data directly to the object or Icon bank.
Having looked closer at the bank details, it stores the number of images and the address of each image, so the icon images are not stored consequtively in memory, as I expected.

Regards,
Lonewolf10