|
preloaded resources |
JeriXNet
Member #14,368
June 2012
|
I'm using Allegro 5.1.2 and have all resources embedded in exe through zip.
|
Arthur Kalliokoski
Second in Command
February 2005
|
Do you have the examples? Check out ex_memfile.c. Also in the manual: http://www.allegro.cc/manual/5/memfile.html They all watch too much MSNBC... they get ideas. |
JeriXNet
Member #14,368
June 2012
|
Oh, thank you, that's just what I was needed:)
|
SiegeLord
Member #7,827
October 2006
|
You can also skip the manual unpacking step and mount the archive directly with PhysFS (using PHYSFS_mountMemory) and then use the standard Allegro loading functions via the PhysFS addon. PHYSFS_mountMemory(zip_data_ptr, zip_data_length, NULL, ".zip", NULL, 0); al_set_physfs_file_interface(); al_load_bitmap("blah.bmp") // Will try loading from the zip file first
"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
JeriXNet
Member #14,368
June 2012
|
"You can also skip the manual unpacking step and mount the archive directly with PhysFS (using PHYSFS_mountMemory [icculus.org])" Yep, I saw this function on physfs manual, but it is now only in unstable version of physfs 2.1.0. Now I'm using minizip from zlib distribution and "Justin Fletcher very simple implementation of a memory access method for the ioapi code (ioapi_mem_c.zip)" from here P.S. sorry for my english
|
|