|
[Help] How to incorporate the sprites inside the .exe. |
Igorrr
Member #14,885
January 2013
|
How can I put all the sprites inside the .exe file so that the game is only the .exe insted of the .exe and the folder with all the sprites and sfx? |
beoran
Member #12,636
March 2011
|
http://code.google.com/p/bin2h/ Basically you convert the data to an array in C. You'll need to provide your own custom loading routines, but that's not too hard to do. |
SiegeLord
Member #7,827
October 2006
|
beoran said: You'll need to provide your own custom loading routines, but that's not too hard to do. You use the memfile addon for this (al_open_memfile). "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Igorrr
Member #14,885
January 2013
|
Sorry but I don't really get, what am I supose to do with the array I get from bin2h? |
SiegeLord
Member #7,827
October 2006
|
Pass it as the first argument of al_open_memfile. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Igorrr
Member #14,885
January 2013
|
I'm currently using Allegro 4 and that function doesn't exist. Is there any other function for this? |
torhu
Member #2,727
September 2002
|
Allegro 4 has its own data file format that you can use. And there'a a tool called exedat that adds the data file to the executable. EDIT: Look at the examples, etc. |
Audric
Member #907
January 2001
|
With Allegro 4, the simplest is to store all the resources in a datafile, and then for release you use the exedat utility to append the datafile at the end of the executable. See example "exexedat.c" |
|