From 27be5bc72855a0fbbdae230bc144624c9eb85f5e Mon Sep 17 00:00:00 2001 From: Michiel Van Der Kolk Date: Thu, 17 Mar 2005 20:50:03 +0000 Subject: Initial check in dumb 0.9.2 - has a few usages of floating point that should be rewritten to fixed point. seems to compile cleanly for iriver. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6197 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/dumb/src/allegro/dats3m.c | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 apps/codecs/dumb/src/allegro/dats3m.c (limited to 'apps/codecs/dumb/src/allegro/dats3m.c') diff --git a/apps/codecs/dumb/src/allegro/dats3m.c b/apps/codecs/dumb/src/allegro/dats3m.c new file mode 100644 index 0000000000..a0fc74420e --- /dev/null +++ b/apps/codecs/dumb/src/allegro/dats3m.c @@ -0,0 +1,61 @@ +/* _______ ____ __ ___ ___ + * \ _ \ \ / \ / \ \ / / ' ' ' + * | | \ \ | | || | \/ | . . + * | | | | | | || ||\ /| | + * | | | | | | || || \/ | | ' ' ' + * | | | | | | || || | | . . + * | |_/ / \ \__// || | | + * /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque + * / \ + * / . \ + * dats3m.c - Integration of S3M files with / / \ \ + * Allegro's datafiles. | < / \_ + * | \/ /\ / + * By entheh. \_ / > / + * | \ / / + * | ' / + * \__/ + */ + +#include + +#include "aldumb.h" +#include "internal/aldumb.h" + + + +static void *dat_read_s3m(PACKFILE *f, long size) +{ + DUMBFILE *df; + DUH *duh; + + (void)size; + + df = dumbfile_open_packfile(f); + + if (!df) + return NULL; + + duh = dumb_read_s3m(df); + + dumbfile_close(df); + + return duh; +} + + + +/* dumb_register_dat_s3m(): tells Allegro about the S3M datafile object. If + * you intend to load a datafile containing an S3M object, you must call this + * function first. It is recommended you pass DUMB_DAT_S3M, but you may have + * a reason to use a different type (perhaps you already have a datafile with + * S3M files in and they use a different type). + */ +void dumb_register_dat_s3m(long type) +{ + register_datafile_object( + type, + &dat_read_s3m, + &_dat_unload_duh + ); +} -- cgit v1.2.3