Example #1
0
    @Override
    public void readIff(SWGFile iff) {
      IffNode versionForm = iff.enterNextForm();
      if (versionForm == null) {
        System.err.println("Expected version for CELL in IFF " + iff.getFileName());
        return;
      }

      int version = versionForm.getVersionFromTag();
      switch (version) {
        case 3:
          break;
        case 5:
          readVersion5(iff);
          break;
        default:
          System.err.println(
              "Don't know how to handle version " + version + " CELL " + iff.getFileName());
      }

      iff.exitForm();
    }
Example #2
0
  @Override
  public void readIff(SWGFile iff) {
    IffNode versionForm = iff.enterNextForm();
    if (versionForm == null) {
      System.err.println("Expected version for a POB IFF");
      return;
    }

    int version = versionForm.getVersionFromTag();
    switch (version) {
      case 3:
        readVersion3(iff);
        break;
      case 4:
        readVersion3(iff);
        break; // Seems to be identical
      default:
        System.err.println(
            "Do not know how to handle POB version type "
                + version
                + " in file "
                + iff.getFileName());
    }
  }
Example #3
0
 private void readVersion5(SWGFile iff) {
   IffNode dataChunk = iff.enterChunk("DATA");
   dataChunk.readInt(); // cellPortals
   dataChunk.readBoolean(); // canSeeParentCell
   name = dataChunk.readString();
 }