[Help] How to incorporate the sprites inside the .exe.
Igorrr

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

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
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).

Igorrr

Sorry but I don't really get, what am I supose to do with the array I get from bin2h?

SiegeLord

Pass it as the first argument of al_open_memfile.

Igorrr

I'm currently using Allegro 4 and that function doesn't exist. Is there any other function for this?

torhu

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

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"

Thread #612055. Printed from Allegro.cc