gzdoom/dumb/src/it/loadmod.c
Randy Heit a660eea116 - Patch to allow compilation by clang.
SVN r3589 (trunk)
2012-04-23 02:46:25 +00:00

42 lines
1.6 KiB
C

/* _______ ____ __ ___ ___
* \ _ \ \ / \ / \ \ / / ' ' '
* | | \ \ | | || | \/ | . .
* | | | | | | || ||\ /| |
* | | | | | | || || \/ | | ' ' '
* | | | | | | || || | | . .
* | |_/ / \ \__// || | |
* /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque
* / \
* / . \
* loadmod.c - Code to read a good old-fashioned / / \ \
* Amiga module file, opening and | < / \_
* closing it for you. | \/ /\ /
* \_ / > /
* By entheh. | \ / /
* | ' /
* \__/
*/
#include "dumb.h"
#include "internal/it.h"
/* dumb_load_mod_quick(): loads a MOD file into a DUH struct, returning a
* pointer to the DUH struct. When you have finished with it, you must
* pass the pointer to unload_duh() so that the memory can be freed.
*/
DUH *DUMBEXPORT dumb_load_mod_quick(const char *filename, int rstrict)
{
DUH *duh;
DUMBFILE *f = dumbfile_open(filename);
if (!f)
return NULL;
duh = dumb_read_mod_quick(f, rstrict);
dumbfile_close(f);
return duh;
}