| [AD] load_bmp_packfile, save_bmp_packfile, etc. |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Hi,
In order to support various things, such as loading from/saving to
custom file formats (eg. Quake .pak files, etc.), it would be useful to
have functions such as:
BITMAP* load_bmp_packfile(PACKFILE* pack, PALETTE pal);
int save_bmp_packfile(PACKFILE* pack, BITMAP* bmp, PALETTE pal);
We could then set load_bmp, etc., to be a wrapper:
BITMAP* load_bmp(const char* filename, PALETTE pal)
{
PACKFILE* pack = 0;
BITMAP* bmp = 0;
pack = pack_fopen(filename, F_READ);
if(!pack) return 0;
bmp = load_bmp_packfile(pack, pal);
pack_fclose(pack);
return bmp;
}
Is this a good change, or is it bad? If everyone is in favour, I will go
ahead and code it.
Bye for now,
--
Laurence Withers, lwithers@xxxxxxxxxx
http://www.lwithers.demon.co.uk/
Attachment:
signature.asc
Description: PGP signature
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |