CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | 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 
00030 #include "igraphic/image.h"
00031 #include "ivideo/txtmgr.h"
00032 
00033 struct iDocumentNode;
00034 struct iImage;
00035 struct iMaterialWrapper;
00036 struct iMeshWrapper;
00037 struct iMeshFactoryWrapper;
00038 struct iRegion;
00039 struct iSector;
00040 struct iSoundData;
00041 struct iSoundHandle;
00042 struct iSoundWrapper;
00043 struct iTextureHandle;
00044 struct iTextureManager;
00045 struct iTextureWrapper;
00046 
00047 SCF_VERSION (iLoaderStatus, 0, 1, 0);
00048 
00052 struct iLoaderStatus : public iBase
00053 {
00055   virtual bool IsReady () = 0;
00057   virtual bool IsError () = 0;
00058 };
00059 
00060 SCF_VERSION (iLoader, 0, 0, 8);
00061 
00065 struct iLoader : public iBase
00066 {
00073   virtual csPtr<iImage> LoadImage (const char* Filename,
00074     int Format = CS_IMGFMT_INVALID) = 0;
00082   virtual csPtr<iTextureHandle> LoadTexture (const char* Filename,
00083         int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0,
00084         csRef<iImage>* image=0) = 0;
00095   virtual iTextureWrapper* LoadTexture (const char *Name,
00096         const char *FileName,
00097         int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0,
00098         bool reg = false, bool create_material = true) = 0;
00099 
00107   virtual csPtr<iImage> LoadImage (iDataBuffer* buf,
00108     int Format = CS_IMGFMT_INVALID) = 0;
00117   virtual csPtr<iTextureHandle> LoadTexture (iDataBuffer* buf,
00118         int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0,
00119         csRef<iImage>* image=0) = 0;
00131   virtual iTextureWrapper* LoadTexture (const char *Name,
00132         iDataBuffer* buf,
00133         int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0,
00134         bool reg = false, bool create_material = true) = 0;
00135 
00137   virtual csPtr<iSoundData> LoadSoundData (const char *fname) = 0;
00139   virtual csPtr<iSoundHandle> LoadSound (const char *fname) = 0;
00141   virtual csPtr<iSoundWrapper> LoadSound (const char *name,
00142         const char *fname) = 0;
00143 
00165   virtual csPtr<iLoaderStatus> ThreadedLoadMapFile (const char* filename,
00166         iRegion* region = 0, bool curRegOnly = true,
00167         bool checkDupes = false) = 0;
00168 
00186   virtual bool LoadMapFile (const char* filename, bool clearEngine = true,
00187         iRegion* region = 0, bool curRegOnly = true,
00188         bool checkDupes = false) = 0;
00189 
00207   virtual bool LoadMap (iDocumentNode* world_node, bool clearEngine = true,
00208         iRegion* region = 0, bool curRegOnly = true,
00209         bool checkDupes = false) = 0;
00210 
00212   virtual bool LoadLibraryFile (const char* filename, iRegion* region = 0,
00213         bool curRegOnly = true, bool checkDupes = false) = 0;
00214 
00216   virtual bool LoadLibrary (iDocumentNode* lib_node, iRegion* region = 0,
00217         bool curRegOnly = true, bool checkDupes = false) = 0;
00218 
00220   virtual csPtr<iMeshFactoryWrapper> LoadMeshObjectFactory (
00221         const char* fname) = 0;
00226   virtual csPtr<iMeshWrapper> LoadMeshObject (const char* fname) = 0;
00227 
00250   virtual bool Load (const char* fname, iBase*& result, iRegion* region = 0,
00251         bool curRegOnly = true, bool checkDupes = false) = 0;
00252 
00275   virtual bool Load (iDocumentNode* node, iBase*& result, iRegion* region = 0,
00276         bool curRegOnly = true, bool checkDupes = false) = 0;
00277 };
00278 
00281 #endif // __CS_IMAP_PARSER_H__
00282 

Generated for Crystal Space by doxygen 1.4.4