Examples of ZeroTerminatedString


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

   
    // 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
   * @param text
   * @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

Examples of starlight.taliis.core.ZeroTerminatedString

 
  public m2(){
    created=true;
   
    header=new Header();
    modelname=new ZeroTerminatedString("Test");
    anims=new AnimSequ[1];
    anims[0]=new AnimSequ();
    bone=new Bones[1];
    bone[0]=new Bones();
    bonelookup=new short[1];
    bonelookup[0]=0;
   
    keybonelookup=new short[1];
    keybonelookup[0]=-1;
   
    vertex=new Vertex[1];
    vertex[0]=new Vertex();

    transparency=new AnimationBlock[1];
    transparency[0]=new AnimationBlock();
   
    texdefs=new TexDef[1];
    texdefs[0]=new TexDef();
    texdefs[0].setType(0x0);
   
    textures=new ZeroTerminatedString[1];
    textures[0]=new ZeroTerminatedString("World\\Scale\\1_Null.blp");
   
    texturelookup=new short[1];
    texturelookup[0]=0;
   
    texunits=new short[1];
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

   
   
   
    // read in stuff ..
    buff.position(header.getofsName());
    modelname=new ZeroTerminatedString(buff);
   
    /*
    # 3 Skeleton and animation

        * 3.1 Standard animation block
        * 3.2 Global sequences
        * 3.3 Animation sequences
        * 3.4 Bones
   
    # 4 Geometry and rendering
   
        * 4.1 Vertices
        * 4.2 Views (LOD)
              o 4.2.1 Indices
              o 4.2.2 Triangles
              o 4.2.3 Vertex properties
              o 4.2.4 Submeshes
              o 4.2.5 Texture units
        * 4.3 Render flags
        * 4.4 Texture unit lookup table
        * 4.5 Colors and transparency
              o 4.5.1 Colors
              o 4.5.2 Transparency lookup table
              o 4.5.3 Transparency
        * 4.6 Textures
              o 4.6.1 Texture lookup table
              o 4.6.2 Texture definitions
              o 4.6.3 Texture animation lookup table
              o 4.6.4 Texture animations
    */
   
   
    anims=new AnimSequ[header.getNAnim()];
    buff.position(header.getAnimoffs());
    for(int i=0;i<header.getNAnim();i++){
      anims[i]=new AnimSequ(buff);
    }
    System.out.println("Loaded AnimSequences\n");
   
    nVertices= header.getnVertices();
    ofsVertices= header.getofsVertices();
    buff.position(ofsVertices);
    vertex=new Vertex[nVertices];
    for(int i=0;i<nVertices;i++){
      vertex[i]=new Vertex(buff);
    }
    System.out.println("Loaded Vertices\n");
   
    nBones= header.getnBones();
    ofsBones= header.getofsBones();
    buff.position(ofsBones);
    bone=new Bones[nBones];
    for(int i=0;i<nBones;i++){
      bone[i]=new Bones(buff);
    }
    System.out.println("Loaded Bones\n");
    buff.position(header.getofsBonelookup());
    bonelookup=new short[header.getnBonelookup()];
    for(int i=0;i<header.getnBonelookup();i++)
      bonelookup[i]=buff.getShort();
   
    keybonelookup=new short[header.getnKeyBoneLookup()];
    buff.position(header.getofsKeyBoneLookup());
    for(int i=0;i<header.getnKeyBoneLookup();i++){
      keybonelookup[i]=buff.getShort();
    }
   
    texturelookup=new short[header.getnTexLookup()];
    buff.position(header.getofsTexLookup());
    for(int i=0;i<header.getnTexLookup();i++){
      texturelookup[i]=buff.getShort();
    }
    texanimlookup=new short[header.getnTexAnimLookup()];
    buff.position(header.getofsTexAnimLookup());
    for(int i=0;i<header.getnTexAnimLookup();i++){
      texanimlookup[i]=buff.getShort();
    }
   
    nTextures= header.getnTextures();
    ofsTextures= header.getofsTextures();
    buff.position(ofsTextures);
    texdefs=new TexDef[nTextures];
    texlength=new int[nTextures];
    texoffs= new int[nTextures];
    for(int i=0;i<nTextures;i++){
      texdefs[i]=new TexDef(buff);
      texlength[i]=texdefs[i].getlenFilename();
      texoffs[i]=texdefs[i].getofsFilename();

    }
   
    textures= new ZeroTerminatedString[nTextures];
    for(int i=0;i<nTextures;i++){
        buff.position(0);
        buff.position(texoffs[i]);
        textures[i]=new ZeroTerminatedString(buff);
      }
    System.out.println("Loaded Textures\n");
   
   
    texunits=new short[header.getnTexUnits()];
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

    buff.position(temp[n].getofsValues());
    for(int i=0;i<temp[n].getnValues();i++) buff.putShort(val);
  }
 
  public void setModelName(String name){
    modelname=new ZeroTerminatedString(name);
  }
View Full Code Here

Examples of starlight.taliis.core.ZeroTerminatedString

    ZeroTerminatedString[] temp=textures;
    textures=new ZeroTerminatedString[textures.length+1];
    for(int i=0;i<temp.length;i++){
      textures[i]=temp[i];
    }
    textures[temp.length]=new ZeroTerminatedString(texname);
    texturelookup=new short[texturelookup.length+1];
    for(int k=0;k<texturelookup.length;k++){
      texturelookup[k]=(short)k;
    }
  }
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.