CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

loader.h

Go to the documentation of this file.
00001 /*
00002     The Crystal Space geometry loader interface
00003     Copyright (C) 2000 by Andrew Zabolotny <bit@eltech.ru>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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, bool checkDupes = false) = 0;
00152 
00154   virtual csPtr<iMeshFactoryWrapper> LoadMeshObjectFactory (
00155         const char* fname) = 0;
00160   virtual csPtr<iMeshWrapper> LoadMeshObject (const char* fname) = 0;
00161 
00184   virtual bool Load (const char* fname, iBase*& result, iRegion* region = 0,
00185         bool curRegOnly = true, bool checkDupes = false) = 0;
00186 };
00187 
00190 #endif // __CS_IMAP_PARSER_H__
00191 

Generated for Crystal Space by doxygen 1.3.9.1