CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

iLoader Struct Reference
[Loading & Saving support]

This interface represents the map loader. More...

#include <loader.h>

Inheritance diagram for iLoader:

iBase List of all members.

Public Methods

virtual void SetMode (int iFlags)=0
 Set loader mode. More...

virtual csPtr< iImageLoadImage (const char *Filename, int Format=CS_IMGFMT_INVALID)=0
 Load an image file. More...

virtual csPtr< iTextureHandleLoadTexture (const char *Filename, int Flags=CS_TEXTURE_3D, iTextureManager *tm=NULL, iImage **image=NULL)=0
 Load an image as with LoadImage() and create a texture handle from it. More...

virtual iTextureWrapperLoadTexture (const char *Name, const char *FileName, int Flags=CS_TEXTURE_3D, iTextureManager *tm=NULL, bool reg=false, bool create_material=true)=0
 Load a texture as with LoadTexture() above and register it with the engine. More...

virtual csPtr< iSoundDataLoadSoundData (const char *fname)=0
 Load a sound file and return an iSoundData object. More...

virtual csPtr< iSoundHandleLoadSound (const char *fname)=0
 Load a sound file and register the sound. More...

virtual csPtr< iSoundWrapperLoadSound (const char *name, const char *fname)=0
 Load a sound file, register the sound and create a wrapper object for it. More...

virtual bool LoadMapFile (const char *filename, bool clearEngine=true, bool resolveOnlyRegion=true, bool checkDupes=false)=0
 Load a map file. More...

virtual bool LoadLibraryFile (const char *filename)=0
 Load library from a VFS file. More...

virtual csPtr< iMeshFactoryWrapperLoadMeshObjectFactory (const char *fname)=0
 Load a Mesh Object Factory from the map file. More...

virtual csPtr< iMeshWrapperLoadMeshObject (const char *fname)=0
 Load a mesh object from a file. More...

virtual bool LoadEffectFile (const char *filename)=0
 Load and parse a effect from file. More...


Detailed Description

This interface represents the map loader.

Definition at line 59 of file imap/loader.h.


Member Function Documentation

virtual bool iLoader::LoadEffectFile const char *    filename [pure virtual]
 

Load and parse a effect from file.

virtual csPtr<iImage> iLoader::LoadImage const char *    Filename,
int    Format = CS_IMGFMT_INVALID
[pure virtual]
 

Load an image file.

The image will be loaded in the format requested by the engine. If no engine exists, the format is taken from the video renderer. If no video renderer exists, this function fails. You may also request an alternate format to override the above sequence.

virtual bool iLoader::LoadLibraryFile const char *    filename [pure virtual]
 

Load library from a VFS file.

virtual bool iLoader::LoadMapFile const char *    filename,
bool    clearEngine = true,
bool    resolveOnlyRegion = true,
bool    checkDupes = false
[pure virtual]
 

Load a map file.

If 'clearEngine' is true then the current contents of the engine will be deleted before loading. If 'resolveOnlyRegion' is true then portals will only connect to the sectors in the current region, things will only use thing templates defined in the current region and meshes will only use mesh factories defined in the current region.

If you use 'checkDupes' == true then materials, textures, and mesh factories will only be loaded if they don't already exist in the entire engine (ignoring regions). By default this is false because it is very legel for different world files to have different objects with the same name. Only use checkDupes == true if you know that your objects have unique names accross all world files.

virtual csPtr<iMeshWrapper> iLoader::LoadMeshObject const char *    fname [pure virtual]
 

Load a mesh object from a file.

The mesh object is not automatically added to the engine and sector.

virtual csPtr<iMeshFactoryWrapper> iLoader::LoadMeshObjectFactory const char *    fname [pure virtual]
 

Load a Mesh Object Factory from the map file.

virtual csPtr<iSoundWrapper> iLoader::LoadSound const char *    name,
const char *    fname
[pure virtual]
 

Load a sound file, register the sound and create a wrapper object for it.

virtual csPtr<iSoundHandle> iLoader::LoadSound const char *    fname [pure virtual]
 

Load a sound file and register the sound.

virtual csPtr<iSoundData> iLoader::LoadSoundData const char *    fname [pure virtual]
 

Load a sound file and return an iSoundData object.

virtual iTextureWrapper* iLoader::LoadTexture const char *    Name,
const char *    FileName,
int    Flags = CS_TEXTURE_3D,
iTextureManager   tm = NULL,
bool    reg = false,
bool    create_material = true
[pure virtual]
 

Load a texture as with LoadTexture() above and register it with the engine.

'Name' is the name that the engine will use for the wrapper. If 'create_material' is true then this function also creates a material for the texture.
If 'register' is true then the texture and material will be registered to the texture manager. Set 'register' to false if you plan on calling 'engine->Prepare()' later as that function will take care of registering too.

virtual csPtr<iTextureHandle> iLoader::LoadTexture const char *    Filename,
int    Flags = CS_TEXTURE_3D,
iTextureManager   tm = NULL,
iImage **    image = NULL
[pure virtual]
 

Load an image as with LoadImage() and create a texture handle from it.

The 'Flags' parameter accepts the flags described in ivideo/txtmgr.h. The texture manager determines the format, so choosing an alternate format doesn't make sense here. Instead you may choose an alternate texture manager.

virtual void iLoader::SetMode int    iFlags [pure virtual]
 

Set loader mode.

See also:
CS_LOADER_NOBSP


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14