Package io

Examples of io.ADXTextFile


    int result = fc.showOpenDialog(null);
    if (result != JFileChooser.APPROVE_OPTION) {
      return;
    }
    fileName = fc.getSelectedFile().getAbsolutePath();
    ADXTextFile file = new ADXTextFile(fileName);
    String line;
    String[] split;
    int layer;
    int index = 0;
    int assetCode = 0;
    Asset asset = null;
    while ((line = file.readLine()) != null) {
      index = 0;
      split = line.split(";");
      layer = Integer.parseInt(split[index++]);
      while (index < split.length) {
        assetCode = Integer.parseInt(split[index++]);
View Full Code Here


      if (result != JFileChooser.APPROVE_OPTION) {
        return;
      }
      fileName = fc.getSelectedFile().getAbsolutePath();
    }
    ADXTextFile file = new ADXTextFile(fileName);
    file.clearLines();
    String[] text = new String[lLayer.size()];
    int i = 0;
    for (Layer l : lLayer) {
      text[i] = "" + l.code;
      i++;
    }
    for (PlacableAsset a : lPAsset) {
      text[a.layer] += ";" + a.asset.code + ";" + a.x + ";" + a.y;
    }
    for (String s : text) {
      file.insertLine(s);
    }
    file.close();
  }
View Full Code Here

public abstract class ADXMapLoader {
 
  public ADXMapLoader(String path) {
   
    ADXTextFile file = new ADXTextFile(path);
    String line;
    String[] split;
    int layer;
    int index = 0;
    int assetCode = 0;
    while ((line = file.readLine()) != null) {
      index = 0;
      split = line.split(";");
      layer = Integer.parseInt(split[index++]);
      while (index < split.length) {
        assetCode = Integer.parseInt(split[index++]);
View Full Code Here

    this.name = name;
   
    if (!mapFonts.containsKey(path + "/" + name)) {
     
      ADXGame.postString("Loading font " + path + "/" + name + "...");
      ADXTextFile file = new ADXTextFile(path + "/" + name + ".fnt");
      if (!file.isExisting()) {
        ADXGame.postWarning("Font " + path + "/" + name + " was not found.");
        return;
      }
 
      String line;
      String[] args;
      while ((line = file.readLine()) != null) {
        // Splits on 1-or-more spaces and = characters
        args = line.split("\\s+|=");
        if (args[0].equals("page")) {
          int page = Integer.parseInt(args[2]);
          String pagePath = args[4].replace("\"", "");
View Full Code Here

      shader = ARBShaderObjects.glCreateShaderObjectARB(shaderType);
      if (shader == 0) {
        return 0;
      }
      ADXTextFile f = new ADXTextFile(fileName);
      ARBShaderObjects.glShaderSourceARB(shader, f.readAll());
      ARBShaderObjects.glCompileShaderARB(shader);

      if (ARBShaderObjects.glGetObjectParameteriARB(shader, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE) {
        ADXGame.postWarning("Error when compiling shader");
        ADXGame.postWarning(getLogInfo(shader));
View Full Code Here

TOP

Related Classes of io.ADXTextFile

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.