loading resouces from a zip help!
Blitz3D Forums/Blitz3D Programming/loading resouces from a zip help!
| ||
how do I load images,sounds,files,models,textures,files from a zip file in blitz? |
| ||
You don't. |
| ||
In blitzmax you can use Koriolis' zipstream module, in B3D it probably involves voodoo and sacrificing chickens. |
| ||
is there a code to do it? |
| ||
http://www.blitzbasic.com/Community/posts.php?topic=63176 |
| ||
Shweet :3 |
| ||
but how to load images,sounds,textures,music,files from it? |
| ||
By using ZipApi_ExtractFile (), as per the documentation. Your problem is that you have to extract the file to hard drive first, then load the image (or whatever) from there. Really, this process causes more problems than it solves. There is no security benefit, and load times are longer. |
| ||
but how to load images,sounds,textures,music,files from it? You don't... |
| ||
If you want to use compression your probably better off using zlib instead of zip with b3d. Until there is a feature to load files from memory/other IO stream though there is no elegant way to do it really - I was going to see if it was possible to adapt the runtime dll to load sounds, etc. from a bank but not really had time to get my head around the B3D source code yet and it'll be after Christmas now til I do. |