//Detonator.INSTANCE.currentGenericGame.getTiledMapState().removeMapTiles(Maps.currentMap);
}
StringAnalyst reader = new StringAnalyst();
Log.info("Start loading map: " + fromFile);
//if (reader.mapLineCount == -1) {reader.countMapSize(fromFile, null);}
reader.countMapSize(fromFile, null);
reader.openGlobalFile(fromFile);
currentMap = new BasicMap(fromFile);
if (Detonator.INSTANCE != null) {
Detonator.INSTANCE.currentMap = currentMap;
}
loadStage = 0;
//loadYCounter = 1;
loadYCounter = 0;
//define length
reader.readRow();
//if (reader.mapLineCount == -1) {reader.countMapSize(fromFile, null);}
currentMap.sizeX = reader.longestLength;
// currentMap.sizeY = currentMap.sizeX;
currentMap.sizeY = reader.mapLineCount + 1;
//Log.info("X: "+currentMap.sizeX+" Y: "+currentMap.sizeY);
currentMap.eye.eyeSizeX = currentMap.sizeX + 1;
currentMap.eye.eyeSizeY = currentMap.sizeY;
currentMap.initArrays(currentMap.sizeX + 1, currentMap.sizeY + 1);
currentMap.initTiles();
// .tile = new Tile[currentMap.sizeX + 1][currentMap.sizeY + 1];
//currentMap.pathFinderMap = new boolean [currentMap.sizeX + 1][currentMap.sizeY + 1];
analyzeStringForMap(reader);
while (!reader.eof) {
if (loadStage == 0) {
loadYCounter++;
}
reader.readRow();
analyzeStringForMap(reader);
}
currentMap.sizeY = loadYCounter;
reader.closeFile();
if (Detonator.INSTANCE.currentGenericGame.getTiledMapState() != null) {
Log.notImplemented();
//Detonator.INSTANCE.currentGenericGame.getTiledMapState().passMarkerNoHoverLowPriority(Maps.currentMap);