use of com.b3dgs.lionengine.graphic.raster.RasterImage in project lionengine by b3dgs.
the class MapTileRasteredModel method loadSheets.
@Override
public boolean loadSheets() {
if (raster == null || !raster.exists()) {
return false;
}
final int th = map.getTileHeight();
final int sheetsCount = map.getSheetsNumber();
for (int sheetId = 0; sheetId < sheetsCount; sheetId++) {
final Integer sheet = Integer.valueOf(sheetId);
final RasterImage rasterImage = new RasterImage(map.getSheet(sheetId).getSurface(), raster, th);
rasterImage.loadRasters(true, sheet.toString());
count = -1;
final List<SpriteTiled> rastersSheet = getRasters(sheet);
for (final ImageBuffer bufferRaster : rasterImage.getRasters()) {
final SpriteTiled sheetRaster = Drawable.loadSpriteTiled(bufferRaster, map.getTileWidth(), th);
rastersSheet.add(sheetRaster);
count++;
}
}
return true;
}
Aggregations