Package transientlibs.tex

Examples of transientlibs.tex.StringAnalyst


        }
    }

    public static void catalogueMap(String fromFile) {

        StringAnalyst reader = new StringAnalyst();

        MapInfo newInfo = new MapInfo();

        mapCatalogue.add(newInfo);
        newInfo.filePath = fromFile;

        reader.openFile(fromFile);

        loadStage = 0;
        //loadYCounter = 1;
        loadYCounter = 0;

        while (!reader.eof) {
            reader.readRow();
            analyzeStringForMapCatalogue(reader, newInfo);
        }


        reader.closeFile();

    }
View Full Code Here


            Log.notImplemented();
            //Detonator.INSTANCE.currentGenericGame.getTiledMapState().removeMarker(Maps.currentMap);           
            //Detonator.INSTANCE.currentGenericGame.getTiledMapState().removeMapTiles(Maps.currentMap);
        }

        StringAnalyst reader = new StringAnalyst();
        //end stealing from Maps.loadMap(String theFile)

        //if (reader.mapLineCount == -1) {reader.countMapSize(fromFile, null);}

        reader.countMapSize(new StringReader(randMap), null); //new method
        reader.openFile(new StringReader(randMap));//new method

        //resume stealing from Maps.loadMap(String theFile)
        currentMap = new BasicMap(randMap);
        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;
View Full Code Here

            //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);
View Full Code Here

        }

        boolean validFile = (new File(checkFileName)).exists();
        if (validFile) {

            StringAnalyst reader = new StringAnalyst();


            reader.openFile(checkFileName);

//        Log.info("add module from dir: "+fromDir);
            modules.add(new Module());
            lastModule = modules.get(modules.size() - 1);
            lastModule.dirName = fromDir;

            if (Detonator.INSTANCE.pathToData != null) {
                lastModule.dirName = Detonator.INSTANCE.pathToData + lastModule.dirName;
            }

            while (!reader.eof) {

                reader.readRow();
                analyzeStringForModules(reader);
            }

            reader.closeFile();
        } else {
            Log.info("File: " + fileName + " not found.");
        }

    }
View Full Code Here

    public static void loadPerks() {

        if (StringAnalyst.isFileExist("perks.dat")) {

        StringAnalyst reader = new StringAnalyst();


        reader.openFile("perks.dat");

        while (!reader.eof) {


            reader.readRow(); //reader.getNextString(); reader.getNextString();
            analyzeStringForPerks(reader);
        }

        reader.closeFile();

        }
    }
View Full Code Here

public static void loadDomains (){

        if (StringAnalyst.isFileExist("domains.dat")) {

        StringAnalyst reader = new StringAnalyst();


        reader.openFile("domains.dat");

        while (!reader.eof) {


        reader.readRow();
        analyzeStringForDomains (reader);
        }

        reader.closeFile();
    }
}
View Full Code Here

public static void loadMotivation (){

if (StringAnalyst.isFileExist("motivations.dat")) {

        StringAnalyst reader = new StringAnalyst();


        reader.openFile("motivations.dat");

        while (!reader.eof) {


        reader.readRow();
        analyzeStringForMotivations (reader);
        }

        reader.closeFile();
    }
}
View Full Code Here

public static void loadActivities (){

     if (StringAnalyst.isFileExist("activities.dat")) {

        StringAnalyst reader = new StringAnalyst();


        reader.openFile("activities.dat");

        while (!reader.eof) {


        reader.readRow();
        analyzeStringForActivities (reader);
        }

        reader.closeFile();
     }
    }
View Full Code Here

public static void loadNpc (){

if (StringAnalyst.isFileExist("npcs.dat")) {

        StringAnalyst reader = new StringAnalyst();


        reader.openFile("npcs.dat");

        while (!reader.eof) {


        reader.readRow();
        analyzeStringForNpcs (reader);
        }

        reader.closeFile();
    }
}
View Full Code Here

    public static void loadStats() {

        if (StringAnalyst.isFileExist("stats.dat")) {

            StringAnalyst reader = new StringAnalyst();


            reader.openFile("stats.dat");

            while (!reader.eof) {

                reader.readRow();
                analyzeStringForStats(reader);
            }

            reader.closeFile();
        }
    }
View Full Code Here

TOP

Related Classes of transientlibs.tex.StringAnalyst

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.