com.vwp.sound.mod.modplay.loader
Class ModLoader
java.lang.Object
com.vwp.sound.mod.modplay.loader.ModuleLoader
com.vwp.sound.mod.modplay.loader.ModLoader
public class ModLoader
- extends ModuleLoader
Makes it possible to load a module from a .MOD file
Fields inherited from class com.vwp.sound.mod.modplay.loader.ModuleLoader |
EXT_IT, EXT_MOD, EXT_S3M, EXT_STM, EXT_XM, EXT_ZIP, IT, MOD, S3M, STM, UNKNOWN, XM, ZIP |
Constructor Summary |
ModLoader(java.lang.String name,
byte[] data)
loads a module from a .MOD file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModLoader
public ModLoader(java.lang.String name,
byte[] data)
throws InvalidFormatException,
java.io.IOException
- loads a module from a .MOD file
- Parameters:
name
- the name of the moduledata
- the module data
- Throws:
InvalidFormatException
java.io.IOException
getModule
public Module getModule()
- Specified by:
getModule
in class ModuleLoader
- Returns:
- the module loaded by this loader
translateEffectNum
public static int translateEffectNum(int effectNum,
int arg1)
throws InvalidFormatException
- translates effect numbers used by the the .MOD format to effect numbers
used by JMOD.
- Parameters:
effectNum
- arg1
- is needed for extended effects
- Returns:
- effect number used by JMOD
- Throws:
InvalidFormatException
getIdInfo
public static ModLoader.IDInfo getIdInfo(java.lang.String id)
readID
public static java.lang.String readID(RandomAccess raf)
throws java.io.IOException
- Throws:
java.io.IOException
readName
public static java.lang.String readName(RandomAccess raf)
throws java.io.IOException
- Throws:
java.io.IOException
loadPositions
public static int[] loadPositions(int numPos,
RandomAccess raf)
throws java.io.IOException
- Throws:
java.io.IOException
getPatternCount
public static int getPatternCount(int[] positions)