mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 16:07:45 +00:00
a660eea116
SVN r3589 (trunk)
42 lines
1.6 KiB
C
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;
|
|
}
|