crystalspace.jbind.impl.map
Class csLoader

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.map.csLoader
All Implemented Interfaces:
iBase, iLoader, iPointer

public class csLoader
extends csBase
implements iLoader

Author:
qan To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csLoader(iPointer nPointer)
           
 
Method Summary
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
static void initSCF()
           
protected  boolean isNativePointerValidSafe()
           
 boolean loadEffectFile(java.lang.String filename)
          Load and parse a effect from file.
 iImage loadImage(java.lang.String Filename)
          Load an image file.
 iImage loadImage(java.lang.String Filename, int Format)
          Load an image file.
 boolean loadLibraryFile(java.lang.String filename)
          Load library from a VFS file.
 boolean loadLibraryFile(java.lang.String filename, iRegion region)
          Load library from a VFS file.
 boolean loadLibraryFile(java.lang.String filename, iRegion region, boolean curRegOnly)
          Load library from a VFS file.
 boolean loadMapFile(java.lang.String filename)
          Load a map file.
 boolean loadMapFile(java.lang.String filename, boolean clearEngine)
          Load a map file.
 boolean loadMapFile(java.lang.String filename, boolean clearEngine, iRegion region)
          Load a map file.
 boolean loadMapFile(java.lang.String filename, boolean clearEngine, iRegion region, boolean curRegOnly)
          Load a map file.
 boolean loadMapFile(java.lang.String filename, boolean clearEngine, iRegion region, boolean curRegOnly, boolean checkDupes)
          Load a map file.
 iMeshWrapper loadMeshObject(java.lang.String fname)
          Load a mesh object from a file.
 iMeshFactoryWrapper loadMeshObjectFactory(java.lang.String fname)
          Load a Mesh Object Factory from the map file.
 iSoundHandle loadSound(java.lang.String fname)
          Load a sound file and register the sound.
 iSoundWrapper loadSound(java.lang.String name, java.lang.String fname)
          Load a sound file, register the sound and create a wrapper object for it.
 iSoundData loadSoundData(java.lang.String fname)
          Load a sound file and return an iSoundData object.
 iTextureHandle loadTexture(java.lang.String Filename)
          Load an image as with LoadImage(); and create a texture handle from it.
 iTextureHandle loadTexture(java.lang.String Filename, int Flags)
          Load an image as with LoadImage(); and create a texture handle from it.
 iTextureHandle loadTexture(java.lang.String Filename, int Flags, iTextureManager tm)
          Load an image as with LoadImage(); and create a texture handle from it.
 iTextureHandle loadTexture(java.lang.String Filename, int Flags, iTextureManager tm, iImage[] image)
          Load an image as with LoadImage(); and create a texture handle from it.
 iTextureHandle loadTexture(java.lang.String Filename, int Flags, iTextureManager tm, iPointer image)
           
 iTextureWrapper loadTexture(java.lang.String Name, java.lang.String FileName)
          Load a texture as with LoadTexture(); above and register it with the engine.
 iTextureWrapper loadTexture(java.lang.String Name, java.lang.String FileName, int Flags)
          Load a texture as with LoadTexture(); above and register it with the engine.
 iTextureWrapper loadTexture(java.lang.String Name, java.lang.String FileName, int Flags, iTextureManager tm)
          Load a texture as with LoadTexture(); above and register it with the engine.
 iTextureWrapper loadTexture(java.lang.String Name, java.lang.String FileName, int Flags, iTextureManager tm, boolean reg)
          Load a texture as with LoadTexture(); above and register it with the engine.
 iTextureWrapper loadTexture(java.lang.String Name, java.lang.String FileName, int Flags, iTextureManager tm, boolean reg, boolean create_material)
          Load a texture as with LoadTexture(); above and register it with the engine.
 iLoaderStatus threadedLoadMapFile(java.lang.String filename)
          Load a map file in a thread.
 iLoaderStatus threadedLoadMapFile(java.lang.String filename, iRegion region)
          Load a map file in a thread.
 iLoaderStatus threadedLoadMapFile(java.lang.String filename, iRegion region, boolean curRegOnly)
          Load a map file in a thread.
 iLoaderStatus threadedLoadMapFile(java.lang.String filename, iRegion region, boolean curRegOnly, boolean checkDupes)
          Load a map file in a thread.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, isNativePointerValidSafe, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csLoader

public csLoader(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase

initSCF

public static void initSCF()

loadTexture

public iTextureHandle loadTexture(java.lang.String Filename,
                                  int Flags,
                                  iTextureManager tm,
                                  iPointer image)

loadTexture

public iTextureHandle loadTexture(java.lang.String Filename,
                                  int Flags,
                                  iTextureManager tm)
Description copied from interface: iLoader
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.

Specified by:
loadTexture in interface iLoader
Parameters:
Filename -
Flags -
tm -
Returns:

loadTexture

public iTextureHandle loadTexture(java.lang.String Filename,
                                  int Flags)
Description copied from interface: iLoader
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.

Specified by:
loadTexture in interface iLoader
Parameters:
Filename -
Flags -
Returns:

loadTexture

public iTextureWrapper loadTexture(java.lang.String Name,
                                   java.lang.String FileName,
                                   int Flags,
                                   iTextureManager tm,
                                   boolean reg,
                                   boolean create_material)
Description copied from interface: iLoader
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.

Specified by:
loadTexture in interface iLoader
Parameters:
Name -
FileName -
Flags -
tm -
reg -
create_material -
Returns:

loadTexture

public iTextureWrapper loadTexture(java.lang.String Name,
                                   java.lang.String FileName,
                                   int Flags,
                                   iTextureManager tm,
                                   boolean reg)
Description copied from interface: iLoader
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.

Specified by:
loadTexture in interface iLoader
Parameters:
Name -
FileName -
Flags -
tm -
reg -
Returns:

loadTexture

public iTextureWrapper loadTexture(java.lang.String Name,
                                   java.lang.String FileName,
                                   int Flags,
                                   iTextureManager tm)
Description copied from interface: iLoader
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.

Specified by:
loadTexture in interface iLoader
Parameters:
Name -
FileName -
Flags -
tm -
Returns:

loadTexture

public iTextureWrapper loadTexture(java.lang.String Name,
                                   java.lang.String FileName,
                                   int Flags)
Description copied from interface: iLoader
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.

Specified by:
loadTexture in interface iLoader
Parameters:
Name -
FileName -
Flags -
Returns:

loadTexture

public iTextureWrapper loadTexture(java.lang.String Name,
                                   java.lang.String FileName)
Description copied from interface: iLoader
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.

Specified by:
loadTexture in interface iLoader
Parameters:
Name -
FileName -
Returns:

loadTexture

public iTextureHandle loadTexture(java.lang.String Filename)
Description copied from interface: iLoader
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.

Specified by:
loadTexture in interface iLoader
Parameters:
Filename -
Returns:

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe()

loadEffectFile

public boolean loadEffectFile(java.lang.String filename)
Description copied from interface: iLoader
Load and parse a effect from file.

Specified by:
loadEffectFile in interface iLoader
Parameters:
filename -
Returns:
See Also:
iLoader.loadEffectFile(java.lang.String)

loadImage

public iImage loadImage(java.lang.String Filename,
                        int Format)
Description copied from interface: iLoader
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.

Specified by:
loadImage in interface iLoader
Parameters:
Filename -
Format -
Returns:
See Also:
iLoader.loadImage(java.lang.String, int)

loadImage

public iImage loadImage(java.lang.String Filename)
Description copied from interface: iLoader
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.

Specified by:
loadImage in interface iLoader
Parameters:
Filename -
Returns:
See Also:
iLoader.loadImage(java.lang.String)

loadLibraryFile

public boolean loadLibraryFile(java.lang.String filename,
                               iRegion region,
                               boolean curRegOnly)
Description copied from interface: iLoader
Load library from a VFS file.

Specified by:
loadLibraryFile in interface iLoader
Parameters:
filename -
region -
curRegOnly -
Returns:
See Also:
iLoader.loadLibraryFile(java.lang.String, crystalspace.jbind.interfaces.iengine.region.iRegion, boolean)

loadLibraryFile

public boolean loadLibraryFile(java.lang.String filename,
                               iRegion region)
Description copied from interface: iLoader
Load library from a VFS file.

Specified by:
loadLibraryFile in interface iLoader
Parameters:
filename -
region -
Returns:
See Also:
iLoader.loadLibraryFile(java.lang.String, crystalspace.jbind.interfaces.iengine.region.iRegion)

loadLibraryFile

public boolean loadLibraryFile(java.lang.String filename)
Description copied from interface: iLoader
Load library from a VFS file.

Specified by:
loadLibraryFile in interface iLoader
Parameters:
filename -
Returns:
See Also:
iLoader.loadLibraryFile(java.lang.String)

loadMapFile

public boolean loadMapFile(java.lang.String filename,
                           boolean clearEngine,
                           iRegion region,
                           boolean curRegOnly,
                           boolean checkDupes)
Description copied from interface: iLoader
Load a map file. If 'clearEngine' is true then the current contents of the engine will be deleted before loading. If 'region' is not 0 then portals will only connect to the sectors in that region, things will only use thing templates defined in that region and meshes will only use mesh factories defined in that region. If the region is not 0 and curRegOnly is true then objects (materials, factories, ...); will only be found in the given 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.

Specified by:
loadMapFile in interface iLoader
Parameters:
filename -
clearEngine -
region -
curRegOnly -
checkDupes -
Returns:
See Also:
iLoader.loadMapFile(java.lang.String, boolean, crystalspace.jbind.interfaces.iengine.region.iRegion, boolean, boolean)

loadMapFile

public boolean loadMapFile(java.lang.String filename,
                           boolean clearEngine,
                           iRegion region,
                           boolean curRegOnly)
Description copied from interface: iLoader
Load a map file. If 'clearEngine' is true then the current contents of the engine will be deleted before loading. If 'region' is not 0 then portals will only connect to the sectors in that region, things will only use thing templates defined in that region and meshes will only use mesh factories defined in that region. If the region is not 0 and curRegOnly is true then objects (materials, factories, ...); will only be found in the given 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.

Specified by:
loadMapFile in interface iLoader
Parameters:
filename -
clearEngine -
region -
curRegOnly -
Returns:
See Also:
iLoader.loadMapFile(java.lang.String, boolean, crystalspace.jbind.interfaces.iengine.region.iRegion, boolean)

loadMapFile

public boolean loadMapFile(java.lang.String filename,
                           boolean clearEngine,
                           iRegion region)
Description copied from interface: iLoader
Load a map file. If 'clearEngine' is true then the current contents of the engine will be deleted before loading. If 'region' is not 0 then portals will only connect to the sectors in that region, things will only use thing templates defined in that region and meshes will only use mesh factories defined in that region. If the region is not 0 and curRegOnly is true then objects (materials, factories, ...); will only be found in the given 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.

Specified by:
loadMapFile in interface iLoader
Parameters:
filename -
clearEngine -
region -
Returns:
See Also:
iLoader.loadMapFile(java.lang.String, boolean, crystalspace.jbind.interfaces.iengine.region.iRegion)

loadMapFile

public boolean loadMapFile(java.lang.String filename,
                           boolean clearEngine)
Description copied from interface: iLoader
Load a map file. If 'clearEngine' is true then the current contents of the engine will be deleted before loading. If 'region' is not 0 then portals will only connect to the sectors in that region, things will only use thing templates defined in that region and meshes will only use mesh factories defined in that region. If the region is not 0 and curRegOnly is true then objects (materials, factories, ...); will only be found in the given 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.

Specified by:
loadMapFile in interface iLoader
Parameters:
filename -
clearEngine -
Returns:
See Also:
iLoader.loadMapFile(java.lang.String, boolean)

loadMapFile

public boolean loadMapFile(java.lang.String filename)
Description copied from interface: iLoader
Load a map file. If 'clearEngine' is true then the current contents of the engine will be deleted before loading. If 'region' is not 0 then portals will only connect to the sectors in that region, things will only use thing templates defined in that region and meshes will only use mesh factories defined in that region. If the region is not 0 and curRegOnly is true then objects (materials, factories, ...); will only be found in the given 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.

Specified by:
loadMapFile in interface iLoader
Parameters:
filename -
Returns:
See Also:
iLoader.loadMapFile(java.lang.String)

loadMeshObject

public iMeshWrapper loadMeshObject(java.lang.String fname)
Description copied from interface: iLoader
Load a mesh object from a file. The mesh object is not automatically added to the engine and sector.

Specified by:
loadMeshObject in interface iLoader
Parameters:
fname -
Returns:
See Also:
iLoader.loadMeshObject(java.lang.String)

loadMeshObjectFactory

public iMeshFactoryWrapper loadMeshObjectFactory(java.lang.String fname)
Description copied from interface: iLoader
Load a Mesh Object Factory from the map file.

Specified by:
loadMeshObjectFactory in interface iLoader
Parameters:
fname -
Returns:
See Also:
iLoader.loadMeshObjectFactory(java.lang.String)

loadSound

public iSoundWrapper loadSound(java.lang.String name,
                               java.lang.String fname)
Description copied from interface: iLoader
Load a sound file, register the sound and create a wrapper object for it.

Specified by:
loadSound in interface iLoader
Parameters:
name -
fname -
Returns:
See Also:
iLoader.loadSound(java.lang.String, java.lang.String)

loadSound

public iSoundHandle loadSound(java.lang.String fname)
Description copied from interface: iLoader
Load a sound file and register the sound.

Specified by:
loadSound in interface iLoader
Parameters:
fname -
Returns:
See Also:
iLoader.loadSound(java.lang.String)

loadSoundData

public iSoundData loadSoundData(java.lang.String fname)
Description copied from interface: iLoader
Load a sound file and return an iSoundData object.

Specified by:
loadSoundData in interface iLoader
Parameters:
fname -
Returns:
See Also:
iLoader.loadSoundData(java.lang.String)

loadTexture

public iTextureHandle loadTexture(java.lang.String Filename,
                                  int Flags,
                                  iTextureManager tm,
                                  iImage[] image)
Description copied from interface: iLoader
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.

Specified by:
loadTexture in interface iLoader
Parameters:
Filename -
Flags -
tm -
image -
Returns:
See Also:
iLoader.loadTexture(java.lang.String, int, crystalspace.jbind.interfaces.ivideo.txtmgr.iTextureManager, crystalspace.jbind.interfaces.igraphic.image.iImage[])

threadedLoadMapFile

public iLoaderStatus threadedLoadMapFile(java.lang.String filename,
                                         iRegion region,
                                         boolean curRegOnly,
                                         boolean checkDupes)
Description copied from interface: iLoader
Load a map file in a thread. If 'region' is not 0 then portals will only connect to the sectors in that region, things will only use thing templates defined in that region and meshes will only use mesh factories defined in that region. If the region is not 0 and curRegOnly is true then objects (materials, factories, ...); will only be found in the given 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. This function returns immediatelly. You can check the iLoaderStatus instance that is returned to see if the map has finished loading or if there was an error. @@ NOT IMPLEMENTED YET @@

Specified by:
threadedLoadMapFile in interface iLoader
Parameters:
filename -
region -
curRegOnly -
checkDupes -
Returns:
See Also:
iLoader.threadedLoadMapFile(java.lang.String, crystalspace.jbind.interfaces.iengine.region.iRegion, boolean, boolean)

threadedLoadMapFile

public iLoaderStatus threadedLoadMapFile(java.lang.String filename,
                                         iRegion region,
                                         boolean curRegOnly)
Description copied from interface: iLoader
Load a map file in a thread. If 'region' is not 0 then portals will only connect to the sectors in that region, things will only use thing templates defined in that region and meshes will only use mesh factories defined in that region. If the region is not 0 and curRegOnly is true then objects (materials, factories, ...); will only be found in the given 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. This function returns immediatelly. You can check the iLoaderStatus instance that is returned to see if the map has finished loading or if there was an error. @@ NOT IMPLEMENTED YET @@

Specified by:
threadedLoadMapFile in interface iLoader
Parameters:
filename -
region -
curRegOnly -
Returns:
See Also:
iLoader.threadedLoadMapFile(java.lang.String, crystalspace.jbind.interfaces.iengine.region.iRegion, boolean)

threadedLoadMapFile

public iLoaderStatus threadedLoadMapFile(java.lang.String filename,
                                         iRegion region)
Description copied from interface: iLoader
Load a map file in a thread. If 'region' is not 0 then portals will only connect to the sectors in that region, things will only use thing templates defined in that region and meshes will only use mesh factories defined in that region. If the region is not 0 and curRegOnly is true then objects (materials, factories, ...); will only be found in the given 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. This function returns immediatelly. You can check the iLoaderStatus instance that is returned to see if the map has finished loading or if there was an error. @@ NOT IMPLEMENTED YET @@

Specified by:
threadedLoadMapFile in interface iLoader
Parameters:
filename -
region -
Returns:
See Also:
iLoader.threadedLoadMapFile(java.lang.String, crystalspace.jbind.interfaces.iengine.region.iRegion)

threadedLoadMapFile

public iLoaderStatus threadedLoadMapFile(java.lang.String filename)
Description copied from interface: iLoader
Load a map file in a thread. If 'region' is not 0 then portals will only connect to the sectors in that region, things will only use thing templates defined in that region and meshes will only use mesh factories defined in that region. If the region is not 0 and curRegOnly is true then objects (materials, factories, ...); will only be found in the given 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. This function returns immediatelly. You can check the iLoaderStatus instance that is returned to see if the map has finished loading or if there was an error. @@ NOT IMPLEMENTED YET @@

Specified by:
threadedLoadMapFile in interface iLoader
Parameters:
filename -
Returns:
See Also:
iLoader.threadedLoadMapFile(java.lang.String)