Search in sources :

Example 1 with RasterImage

use of com.b3dgs.lionengine.core.RasterImage in project lionengine by b3dgs.

the class MapTileRasteredModel method loadSheets.

/*
     * MapTileRastered
     */
@Override
public void loadSheets(Media rasterConfig, boolean smooth) {
    final Collection<Integer> sheets = map.getSheets();
    final Iterator<Integer> itr = sheets.iterator();
    final int th = map.getTileHeight();
    while (itr.hasNext()) {
        final Integer sheet = itr.next();
        final RasterImage raster = new RasterImage(map.getSheet(sheet).getSurface(), rasterConfig, th, smooth);
        raster.loadRasters(map.getTileHeight(), false, sheet.toString());
        final List<SpriteTiled> rastersSheet = getRasters(sheet);
        for (final ImageBuffer bufferRaster : raster.getRasters()) {
            final SpriteTiled sheetRaster = Drawable.loadSpriteTiled(bufferRaster, map.getTileWidth(), th);
            rastersSheet.add(sheetRaster);
        }
    }
}
Also used : ImageBuffer(com.b3dgs.lionengine.graphic.ImageBuffer) SpriteTiled(com.b3dgs.lionengine.graphic.SpriteTiled) RasterImage(com.b3dgs.lionengine.core.RasterImage)

Aggregations

RasterImage (com.b3dgs.lionengine.core.RasterImage)1 ImageBuffer (com.b3dgs.lionengine.graphic.ImageBuffer)1 SpriteTiled (com.b3dgs.lionengine.graphic.SpriteTiled)1