AeBankFile.h 1.41 KB
#ifndef __AeBankFile__
#define __AeBankFile__

#include "libaudioNONULL.h"
#include <PR/audiotools.h>
#include "Hash.h"
#include "AeFile.h"


class AeAsset;
class AeBankFileAsset;
class AeBankAsset;
class AeInstAsset;
class AeSoundAsset;
class AeEnvAsset;
class AeKeymapAsset;
class AeWaveAsset;
class AeLoopAsset;
class AeBookAsset;
class AeFxAsset;
class AeN64Config;


enum
{
    FILE_NOT_SUPPORTED	= -2,
    FILE_FAILURE	= -1,
    FILE_OK		= 0,
    NO_FILE		= 1
};



class AeBankFile : public AeAssetFile
{
public:
                        AeBankFile (char *);
    virtual		~AeBankFile (void);

    virtual int		Read (AeAsset *&);

private:

    int     	       	read (AeAsset *&);

    void    	       	readBankFile (AeBankFileAsset *, int);
    void    	       	readBank (AeBankAsset *, int);
    void    	       	readInst (AeInstAsset *, int);
    void    	       	readSound (AeSoundAsset *, int);
    void    	       	readKeymap (AeKeymapAsset *, int);
    void    	       	readEnvlp (AeEnvAsset *, int);
    void   	        readWave (AeWaveAsset *, int);
    void    	       	readLoop (AeLoopAsset *, int);
    void    	       	readADPCMLoop (AeADPCMLoopAsset *, int);
    void    	       	readADPCMBook (AeADPCMBookAsset *, int);

    ALSymFile *		fSymData;
    int         	fSymSize;

    ALBankFile *	fCtlData;    
    int         	fCtlSize;

    u8 *		fTblData;
    int         	fTblSize;

    HashTable *		fHashTbl;
};


#endif