org.gamenet.application.mm8leveleditor.lod
Class FileBasedModifiedLodResource
java.lang.Object
org.gamenet.application.mm8leveleditor.lod.FileBasedModifiedLodResource
- All Implemented Interfaces:
- LodResource, TGADataConsumer, TGADataProducer
- public class FileBasedModifiedLodResource
- extends Object
- implements LodResource, TGADataProducer, TGADataConsumer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
file
private File file
converter
private FormatConverter converter
byteWidth
private int byteWidth
byteHeight
private int byteHeight
palette
private int[] palette
FileBasedModifiedLodResource
public FileBasedModifiedLodResource(FormatConverter converter,
File file)
getFile
public File getFile()
readData
private byte[] readData(FormatConverter converter,
File file)
readDataOld
private byte[] readDataOld(FormatConverter converter,
File file)
getData
public byte[] getData()
- Specified by:
getData
in interface LodResource
getByteWidth
public int getByteWidth()
- Specified by:
getByteWidth
in interface TGADataProducer
- Returns:
- image width in bytes
getByteHeight
public int getByteHeight()
- Specified by:
getByteHeight
in interface TGADataProducer
- Returns:
- image height in bytes
getPalette
public int[] getPalette()
throws IOException
- Specified by:
getPalette
in interface TGADataProducer
- Returns:
- int array of palette data
- Throws:
IOException
setImageWidth
public void setImageWidth(int width)
- Specified by:
setImageWidth
in interface TGADataConsumer
setImageHeight
public void setImageHeight(int height)
- Specified by:
setImageHeight
in interface TGADataConsumer
setImagePalette
public void setImagePalette(int[] palette)
- Specified by:
setImagePalette
in interface TGADataConsumer
getTextDescription
public String getTextDescription()
- Specified by:
getTextDescription
in interface LodResource
getResourceType
public String getResourceType()
- Specified by:
getResourceType
in interface LodResource
getName
public String getName()
- Specified by:
getName
in interface LodResource
getDataHeader
public byte[] getDataHeader()
- Specified by:
getDataHeader
in interface LodResource