imap/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 #include "imap/streamsource.h" 00033 00034 struct iDocumentNode; 00035 struct iImage; 00036 struct iMaterialWrapper; 00037 struct iMeshWrapper; 00038 struct iMeshFactoryWrapper; 00039 struct iRegion; 00040 struct iSector; 00041 struct iSoundData; 00042 struct iSoundHandle; 00043 struct iSoundWrapper; 00044 struct iTextureHandle; 00045 struct iTextureManager; 00046 struct iTextureWrapper; 00047 struct iSndSysData; 00048 struct iSndSysWrapper; 00049 struct iSndSysStream; 00050 00051 SCF_VERSION (iLoaderStatus, 0, 1, 0); 00052 00056 struct iLoaderStatus : public iBase 00057 { 00059 virtual bool IsReady () = 0; 00061 virtual bool IsError () = 0; 00062 }; 00063 00064 SCF_VERSION (iLoader, 0, 0, 8); 00065 00069 struct iLoader : public iBase 00070 { 00077 virtual csPtr<iImage> LoadImage (const char* Filename, 00078 int Format = CS_IMGFMT_INVALID) = 0; 00091 virtual csPtr<iTextureHandle> LoadTexture (const char* Filename, 00092 int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0, 00093 csRef<iImage>* image=0) = 0; 00119 virtual iTextureWrapper* LoadTexture (const char *Name, 00120 const char *FileName, 00121 int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0, 00122 bool reg = true, bool create_material = true, 00123 bool free_image = true, iRegion* region = 0) = 0; 00124 00132 virtual csPtr<iImage> LoadImage (iDataBuffer* buf, 00133 int Format = CS_IMGFMT_INVALID) = 0; 00147 virtual csPtr<iTextureHandle> LoadTexture (iDataBuffer* buf, 00148 int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0, 00149 csRef<iImage>* image=0) = 0; 00173 virtual iTextureWrapper* LoadTexture (const char *Name, 00174 iDataBuffer* buf, 00175 int Flags = CS_TEXTURE_3D, iTextureManager *tm = 0, 00176 bool reg = true, bool create_material = true, 00177 bool free_image = true) = 0; 00178 00180 virtual csPtr<iSoundData> LoadSoundData (const char *fname) = 0; 00182 virtual csPtr<iSoundHandle> LoadSound (const char *fname) = 0; 00187 virtual csPtr<iSoundWrapper> LoadSound (const char *name, 00188 const char *fname) = 0; 00189 00191 virtual csPtr<iSndSysData> LoadSoundSysData (const char *fname) = 0; 00198 virtual csPtr<iSndSysStream> LoadSoundStream (const char *fname, 00199 int mode3d) = 0; 00208 virtual iSndSysWrapper* LoadSoundWrapper (const char *name, 00209 const char *fname, int mode3d) = 0; 00210 00232 virtual csPtr<iLoaderStatus> ThreadedLoadMapFile (const char* filename, 00233 iRegion* region = 0, bool curRegOnly = true, 00234 bool checkDupes = false) = 0; 00235 00262 virtual bool LoadMapFile (const char* filename, bool clearEngine = true, 00263 iRegion* region = 0, bool curRegOnly = true, 00264 bool checkDupes = false, iStreamSource* ssource = 0) = 0; 00265 00292 virtual bool LoadMap (iDocumentNode* world_node, bool clearEngine = true, 00293 iRegion* region = 0, bool curRegOnly = true, 00294 bool checkDupes = false, iStreamSource* ssource = 0) = 0; 00295 00312 virtual bool LoadLibraryFile (const char* filename, iRegion* region = 0, 00313 bool curRegOnly = true, bool checkDupes = false, 00314 iStreamSource* ssource = 0) = 0; 00315 00332 virtual bool LoadLibrary (iDocumentNode* lib_node, iRegion* region = 0, 00333 bool curRegOnly = true, bool checkDupes = false, 00334 iStreamSource* ssource = 0) = 0; 00335 00341 virtual csPtr<iMeshFactoryWrapper> LoadMeshObjectFactory ( 00342 const char* fname, iStreamSource* ssource = 0) = 0; 00349 virtual csPtr<iMeshWrapper> LoadMeshObject (const char* fname, 00350 iStreamSource* ssource = 0) = 0; 00351 00391 virtual bool Load (const char* fname, iBase*& result, iRegion* region = 0, 00392 bool curRegOnly = true, bool checkDupes = false, 00393 iStreamSource* ssource = 0, const char* override_name = 0) = 0; 00394 00434 virtual bool Load (iDataBuffer* buffer, iBase*& result, iRegion* region = 0, 00435 bool curRegOnly = true, bool checkDupes = false, 00436 iStreamSource* ssource = 0, const char* override_name = 0) = 0; 00437 00476 virtual bool Load (iDocumentNode* node, iBase*& result, iRegion* region = 0, 00477 bool curRegOnly = true, bool checkDupes = false, 00478 iStreamSource* ssource = 0, const char* override_name = 0) = 0; 00479 00483 virtual bool LoadShader (const char* filename) = 0; 00484 }; 00485 00488 #endif // __CS_IMAP_PARSER_H__ 00489
Generated for Crystal Space by doxygen 1.4.6