Examples of ZeroTerminatedString


Examples of starlight.taliis.core.ZeroTerminatedString

    // count and find all strings
    vStrings = new Vector<ZeroTerminatedString>();
    strTable.buff.position(0);
    while(strTable.buff.hasRemaining()) {
      ZeroTerminatedString tmp = new ZeroTerminatedString(strTable.buff);
      vStrings.add(tmp);
    }
  }
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

  /**
   * Adds a new String to the End of the String Table
   * @param str new String Entry
   */
  public void addString(String str) {
    ZeroTerminatedString tmp = new ZeroTerminatedString(str);
   
    tmp.initialOffset = vStrings.lastElement().getEndOffset();
    vStrings.add(tmp);
  }
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

    // init strings
    entrys = new ZeroTerminatedString[length];
    buff.position(data);
    for (int i = 0; i < length; i++)
      entrys[i] = new ZeroTerminatedString(buff);

    // push pointer
    pointer.position(pointer.position() + buff.limit());
  }
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

   *
   * @param text The filename to add.
   * @return The file-index of the new string.
   */
  public int addString(String text) {
    ZeroTerminatedString tmp[] = new ZeroTerminatedString[length + 1];
    for (int c = 0; c < length; c++)
      tmp[c] = entrys[c];
    tmp[length] = new ZeroTerminatedString(text);

    entrys = tmp;
    length++;
    Change();
    return length - 1;
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

   *
   * @param index Which String to remove.
   */
  public void removeString(int index) {
    // make new array of objects
    ZeroTerminatedString tmp[] = new ZeroTerminatedString[length - 1];

    // copy data in front of killed item
    for (int c = 0; c < index; c++)
      tmp[c] = entrys[c];

View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

    public Object getValueAt(int row, int col) {
      Object t = data.dbcFile.getData(col, row);
      int tv = ((Number)t).intValue();
     
      if(types[col]==dbc.COL_TYPE_STRING) {
        ZeroTerminatedString tmp = data.dbcFile.getStringByOffset(tv);
        if(tmp==null) {
          System.err.println("ERROR! String " + tv + " not found! " + col);
          return "";
        }
        return tmp;
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

    public Component getTableCellEditorComponent(
            JTable table, Object value,
            boolean isSelected, int rowIndex, int colIndex )
    {
      if(value instanceof ZeroTerminatedString) {
        ZeroTerminatedString tmp = (ZeroTerminatedString)value;
        component.setText("" + tmp.getInitOffset());
      }
      return component;
    }
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

   
    // init strings
    entrys = new ZeroTerminatedString[lenght];
    buff.position(data);
    for(int i=0; i<lenght; i++) {
      entrys[i] = new ZeroTerminatedString(buff);
    }
   
    // push pointer
    pointer.position( pointer.position() + buff.limit() );
  }
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

  /**
   * Adds new string to our filenames list
   * @return file index of the new string
   */
  public int addString(String text) {
    ZeroTerminatedString tmp[] new ZeroTerminatedString[lenght+1];
    for(int c=0; c<lenght; c++)
      tmp[c] = entrys[c];
    tmp[lenght] = new ZeroTerminatedString(text);
   
    entrys = tmp;
    lenght++;
    Change();
    return lenght-1;
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

   * re-ordered indexies !!
   * @param index
   */
  public void removeString(int index) {
    // make new array of objects
    ZeroTerminatedString tmp[] new ZeroTerminatedString[lenght-1];
   
    // copy data in front of killed item
    for(int c=0; c<index; c++) {
      tmp[c]=entrys[c];
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.