00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __CS_IMAP_PARSER_H__
00021 #define __CS_IMAP_PARSER_H__
00022
00028 #include "csutil/scf.h"
00029 #include "ivideo/txtmgr.h"
00030 #include "igraphic/image.h"
00031
00032 struct iTextureHandle;
00033 struct iTextureWrapper;
00034 struct iMaterialWrapper;
00035 struct iSector;
00036 struct iRegion;
00037 struct iSoundData;
00038 struct iSoundHandle;
00039 struct iMeshWrapper;
00040 struct iMeshFactoryWrapper;
00041 struct iSoundWrapper;
00042
00043 SCF_VERSION (iLoaderStatus, 0, 1, 0);
00044
00048 struct iLoaderStatus : public iBase
00049 {
00051 virtual bool IsReady () = 0;
00053 virtual bool IsError () = 0;
00054 };
00055
00056 SCF_VERSION (iLoader, 0, 0, 8);
00057
00061 struct iLoader : public iBase
00062 {
00069 virtual csPtr<iImage> LoadImage (const char* Filename,
00070 int Format = CS_IMGFMT_INVALID) = 0;
00078 virtual csPtr<iTextureHandle> LoadTexture (const char* Filename,
00079 int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0,
00080 iImage **image=0) = 0;
00091 virtual iTextureWrapper* LoadTexture (const char *Name,
00092 const char *FileName,
00093 int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0,
00094 bool reg = false, bool create_material = true) = 0;
00095
00097 virtual csPtr<iSoundData> LoadSoundData (const char *fname) = 0;
00099 virtual csPtr<iSoundHandle> LoadSound (const char *fname) = 0;
00101 virtual csPtr<iSoundWrapper> LoadSound (const char *name,
00102 const char *fname) = 0;
00103
00125 virtual csPtr<iLoaderStatus> ThreadedLoadMapFile (const char* filename,
00126 iRegion* region = 0, bool curRegOnly = true,
00127 bool checkDupes = false) = 0;
00128
00146 virtual bool LoadMapFile (const char* filename, bool clearEngine = true,
00147 iRegion* region = 0, bool curRegOnly = true,
00148 bool checkDupes = false) = 0;
00150 virtual bool LoadLibraryFile (const char* filename, iRegion* region = 0,
00151 bool curRegOnly = true) = 0;
00152
00154 virtual csPtr<iMeshFactoryWrapper> LoadMeshObjectFactory (
00155 const char* fname) = 0;
00160 virtual csPtr<iMeshWrapper> LoadMeshObject (const char* fname) = 0;
00161
00163 virtual bool LoadEffectFile (const char* filename) = 0;
00164 };
00165
00168 #endif // __CS_IMAP_PARSER_H__
00169