Changeset 1889

Show
Ignore:
Timestamp:
11/19/08 09:03:42 (2 months ago)
Author:
ddb174
Message:

Beginnings of Hexisle support.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • drizzle/DrizzlePrp/src/files/authored/authors&licenses.txt

    r1885 r1889  
    66MystMystV_District_Addition.prp: Race 
    77DescentMystV_District_FootRgns.prp: Race 
     8(OldDelmeNoMusic)MystMystV_District_Additions.prp: Race 
     9Tahgira_District_FootRgns.prp: Race 
     10Todelmer_DIstrict_FootRgns.prp: Race 
    811 
    912readme: 
     
    1215  in mystAutomation.java, add an entry to the "authored" object:  authored.put("Descent","FootRgns",97);  will add the page FootRgns with pagenum 97(as given in the .age file). 
    1316  test 
     17To modify the .ogg file reference since pyprp breaks them sometimes: 
     18  read the file with deepview 
     19  open the PlSoundBuffer object 
     20  change the .ogg filename to the correct one 
     21  click the change button, then the save button. 
  • drizzle/DrizzlePrp/src/gui/Gui.form

    r1887 r1889  
    424424                  <Group type="102" alignment="0" attributes="0"> 
    425425                      <EmptySpace max="-2" attributes="0"/> 
    426                       <Component id="tabsState2" pref="400" max="32767" attributes="0"/> 
     426                      <Component id="tabsState2" max="32767" attributes="0"/> 
    427427                      <EmptySpace max="-2" attributes="0"/> 
    428428                  </Group> 
     
    695695                              <EmptySpace max="-2" attributes="0"/> 
    696696                              <Component id="jButton53" min="-2" max="-2" attributes="0"/> 
    697                               <EmptySpace pref="242" max="32767" attributes="0"/> 
     697                              <EmptySpace pref="266" max="32767" attributes="0"/> 
    698698                          </Group> 
    699699                      </Group> 
     
    13481348                              <EmptySpace max="-2" attributes="0"/> 
    13491349                              <Component id="checkboxState22" min="-2" max="-2" attributes="0"/> 
    1350                               <EmptySpace pref="48" max="32767" attributes="0"/> 
     1350                              <EmptySpace pref="72" max="32767" attributes="0"/> 
    13511351                          </Group> 
    13521352                      </Group> 
     
    15351535                                  </Group> 
    15361536                              </Group> 
    1537                               <EmptySpace pref="47" max="32767" attributes="0"/> 
     1537                              <EmptySpace pref="71" max="32767" attributes="0"/> 
    15381538                          </Group> 
    15391539                      </Group> 
     
    16401640                        <Property name="text" type="java.lang.String" value="Translation:"/> 
    16411641                      </Properties> 
     1642                    </Component> 
     1643                  </SubComponents> 
     1644                </Container> 
     1645                <Container class="javax.swing.JPanel" name="jPanel37"> 
     1646                  <Constraints> 
     1647                    <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> 
     1648                      <JTabbedPaneConstraints tabName="HexIsle"> 
     1649                        <Property name="tabTitle" type="java.lang.String" value="HexIsle"/> 
     1650                      </JTabbedPaneConstraints> 
     1651                    </Constraint> 
     1652                  </Constraints> 
     1653 
     1654                  <Layout> 
     1655                    <DimensionLayout dim="0"> 
     1656                      <Group type="103" groupAlignment="0" attributes="0"> 
     1657                          <Group type="102" attributes="0"> 
     1658                              <Group type="103" groupAlignment="0" attributes="0"> 
     1659                                  <Group type="102" alignment="0" attributes="0"> 
     1660                                      <EmptySpace min="-2" pref="34" max="-2" attributes="0"/> 
     1661                                      <Group type="103" groupAlignment="0" attributes="0"> 
     1662                                          <Component id="jLabel28" alignment="0" min="-2" max="-2" attributes="0"/> 
     1663                                          <Component id="jLabel29" alignment="0" min="-2" max="-2" attributes="0"/> 
     1664                                      </Group> 
     1665                                      <EmptySpace type="separate" max="-2" attributes="0"/> 
     1666                                      <Group type="103" groupAlignment="0" max="-2" attributes="0"> 
     1667                                          <Component id="textfieldState32" max="32767" attributes="1"/> 
     1668                                          <Component id="textfieldState31" alignment="0" pref="271" max="32767" attributes="1"/> 
     1669                                      </Group> 
     1670                                      <EmptySpace max="-2" attributes="0"/> 
     1671                                      <Group type="103" groupAlignment="0" attributes="0"> 
     1672                                          <Component id="jButton113" min="-2" max="-2" attributes="0"/> 
     1673                                          <Component id="jButton112" alignment="0" min="-2" max="-2" attributes="0"/> 
     1674                                      </Group> 
     1675                                  </Group> 
     1676                                  <Group type="102" alignment="0" attributes="0"> 
     1677                                      <EmptySpace min="-2" pref="75" max="-2" attributes="0"/> 
     1678                                      <Component id="jButton111" min="-2" max="-2" attributes="0"/> 
     1679                                  </Group> 
     1680                              </Group> 
     1681                              <EmptySpace pref="353" max="32767" attributes="0"/> 
     1682                          </Group> 
     1683                      </Group> 
     1684                    </DimensionLayout> 
     1685                    <DimensionLayout dim="1"> 
     1686                      <Group type="103" groupAlignment="0" attributes="0"> 
     1687                          <Group type="102" alignment="0" attributes="0"> 
     1688                              <EmptySpace min="-2" pref="47" max="-2" attributes="0"/> 
     1689                              <Group type="103" groupAlignment="3" attributes="0"> 
     1690                                  <Component id="jLabel28" alignment="3" min="-2" max="-2" attributes="0"/> 
     1691                                  <Component id="textfieldState31" alignment="3" min="-2" max="-2" attributes="0"/> 
     1692                                  <Component id="jButton112" alignment="3" min="-2" max="-2" attributes="0"/> 
     1693                              </Group> 
     1694                              <EmptySpace type="separate" max="-2" attributes="0"/> 
     1695                              <Group type="103" groupAlignment="3" attributes="0"> 
     1696                                  <Component id="jLabel29" alignment="3" min="-2" max="-2" attributes="0"/> 
     1697                                  <Component id="textfieldState32" alignment="3" min="-2" max="-2" attributes="0"/> 
     1698                                  <Component id="jButton113" alignment="3" min="-2" max="-2" attributes="0"/> 
     1699                              </Group> 
     1700                              <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> 
     1701                              <Component id="jButton111" min="-2" max="-2" attributes="0"/> 
     1702                              <EmptySpace pref="187" max="32767" attributes="0"/> 
     1703                          </Group> 
     1704                      </Group> 
     1705                    </DimensionLayout> 
     1706                  </Layout> 
     1707                  <SubComponents> 
     1708                    <Component class="javax.swing.JLabel" name="jLabel28"> 
     1709                      <Properties> 
     1710                        <Property name="text" type="java.lang.String" value="HexIsle folder:"/> 
     1711                      </Properties> 
     1712                    </Component> 
     1713                    <Component class="javax.swing.JLabel" name="jLabel29"> 
     1714                      <Properties> 
     1715                        <Property name="text" type="java.lang.String" value="Output folder:"/> 
     1716                      </Properties> 
     1717                    </Component> 
     1718                    <Component class="shared.State.TextfieldState" name="textfieldState31"> 
     1719                      <Properties> 
     1720                        <Property name="text" type="java.lang.String" value="textfieldState31"/> 
     1721                        <Property name="name" type="java.lang.String" value="hexisleInfolder" noResource="true"/> 
     1722                      </Properties> 
     1723                    </Component> 
     1724                    <Component class="shared.State.TextfieldState" name="textfieldState32"> 
     1725                      <Properties> 
     1726                        <Property name="text" type="java.lang.String" value="textfieldState32"/> 
     1727                        <Property name="name" type="java.lang.String" value="hexisleOutfolder" noResource="true"/> 
     1728                      </Properties> 
     1729                    </Component> 
     1730                    <Component class="javax.swing.JButton" name="jButton111"> 
     1731                      <Properties> 
     1732                        <Property name="text" type="java.lang.String" value="Start..."/> 
     1733                      </Properties> 
     1734                      <Events> 
     1735                        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton111ActionPerformed"/> 
     1736                      </Events> 
     1737                    </Component> 
     1738                    <Component class="javax.swing.JButton" name="jButton112"> 
     1739                      <Properties> 
     1740                        <Property name="text" type="java.lang.String" value="select..."/> 
     1741                      </Properties> 
     1742                      <Events> 
     1743                        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton112ActionPerformed"/> 
     1744                      </Events> 
     1745                    </Component> 
     1746                    <Component class="javax.swing.JButton" name="jButton113"> 
     1747                      <Properties> 
     1748                        <Property name="text" type="java.lang.String" value="select..."/> 
     1749                      </Properties> 
     1750                      <Events> 
     1751                        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton113ActionPerformed"/> 
     1752                      </Events> 
    16421753                    </Component> 
    16431754                  </SubComponents> 
  • drizzle/DrizzlePrp/src/gui/Gui.java

    r1887 r1889  
    494494        jLabel23 = new javax.swing.JLabel(); 
    495495        jLabel24 = new javax.swing.JLabel(); 
     496        jPanel37 = new javax.swing.JPanel(); 
     497        jLabel28 = new javax.swing.JLabel(); 
     498        jLabel29 = new javax.swing.JLabel(); 
     499        textfieldState31 = new shared.State.TextfieldState(); 
     500        textfieldState32 = new shared.State.TextfieldState(); 
     501        jButton111 = new javax.swing.JButton(); 
     502        jButton112 = new javax.swing.JButton(); 
     503        jButton113 = new javax.swing.JButton(); 
    496504        jPanel1 = new javax.swing.JPanel(); 
    497505        jButton15 = new javax.swing.JButton(); 
     
    10451053                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    10461054                .addComponent(jButton53) 
    1047                 .addContainerGap(242, Short.MAX_VALUE)) 
     1055                .addContainerGap(266, Short.MAX_VALUE)) 
    10481056        ); 
    10491057 
     
    14071415                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    14081416                    .addComponent(checkboxState22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1409                     .addContainerGap(48, Short.MAX_VALUE)) 
     1417                    .addContainerGap(72, Short.MAX_VALUE)) 
    14101418            ); 
    14111419 
     
    15691577                                .addGap(116, 116, 116) 
    15701578                                .addComponent(jButton99))) 
    1571                         .addContainerGap(47, Short.MAX_VALUE)) 
     1579                        .addContainerGap(71, Short.MAX_VALUE)) 
    15721580                ); 
    15731581 
    15741582                tabsState2.addTab("tab8", jPanel23); 
     1583 
     1584                jLabel28.setText("HexIsle folder:"); 
     1585 
     1586                jLabel29.setText("Output folder:"); 
     1587 
     1588                textfieldState31.setText("textfieldState31"); 
     1589                textfieldState31.setName("hexisleInfolder"); // NOI18N 
     1590 
     1591                textfieldState32.setText("textfieldState32"); 
     1592                textfieldState32.setName("hexisleOutfolder"); // NOI18N 
     1593 
     1594                jButton111.setText("Start..."); 
     1595                jButton111.addActionListener(new java.awt.event.ActionListener() { 
     1596                    public void actionPerformed(java.awt.event.ActionEvent evt) { 
     1597                        jButton111ActionPerformed(evt); 
     1598                    } 
     1599                }); 
     1600 
     1601                jButton112.setText("select..."); 
     1602                jButton112.addActionListener(new java.awt.event.ActionListener() { 
     1603                    public void actionPerformed(java.awt.event.ActionEvent evt) { 
     1604                        jButton112ActionPerformed(evt); 
     1605                    } 
     1606                }); 
     1607 
     1608                jButton113.setText("select..."); 
     1609                jButton113.addActionListener(new java.awt.event.ActionListener() { 
     1610                    public void actionPerformed(java.awt.event.ActionEvent evt) { 
     1611                        jButton113ActionPerformed(evt); 
     1612                    } 
     1613                }); 
     1614 
     1615                javax.swing.GroupLayout jPanel37Layout = new javax.swing.GroupLayout(jPanel37); 
     1616                jPanel37.setLayout(jPanel37Layout); 
     1617                jPanel37Layout.setHorizontalGroup( 
     1618                    jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1619                    .addGroup(jPanel37Layout.createSequentialGroup() 
     1620                        .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1621                            .addGroup(jPanel37Layout.createSequentialGroup() 
     1622                                .addGap(34, 34, 34) 
     1623                                .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1624                                    .addComponent(jLabel28) 
     1625                                    .addComponent(jLabel29)) 
     1626                                .addGap(18, 18, 18) 
     1627                                .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1628                                    .addComponent(textfieldState32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1629                                    .addComponent(textfieldState31, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)) 
     1630                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1631                                .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1632                                    .addComponent(jButton113) 
     1633                                    .addComponent(jButton112))) 
     1634                            .addGroup(jPanel37Layout.createSequentialGroup() 
     1635                                .addGap(75, 75, 75) 
     1636                                .addComponent(jButton111))) 
     1637                        .addContainerGap(353, Short.MAX_VALUE)) 
     1638                ); 
     1639                jPanel37Layout.setVerticalGroup( 
     1640                    jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1641                    .addGroup(jPanel37Layout.createSequentialGroup() 
     1642                        .addGap(47, 47, 47) 
     1643                        .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1644                            .addComponent(jLabel28) 
     1645                            .addComponent(textfieldState31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1646                            .addComponent(jButton112)) 
     1647                        .addGap(18, 18, 18) 
     1648                        .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1649                            .addComponent(jLabel29) 
     1650                            .addComponent(textfieldState32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1651                            .addComponent(jButton113)) 
     1652                        .addGap(32, 32, 32) 
     1653                        .addComponent(jButton111) 
     1654                        .addContainerGap(187, Short.MAX_VALUE)) 
     1655                ); 
     1656 
     1657                tabsState2.addTab("HexIsle", jPanel37); 
    15751658 
    15761659                javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13); 
     
    15871670                    .addGroup(jPanel13Layout.createSequentialGroup() 
    15881671                        .addContainerGap() 
    1589                         .addComponent(tabsState2, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) 
     1672                        .addComponent(tabsState2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    15901673                        .addContainerGap()) 
    15911674                ); 
     
    42174300     
    42184301}//GEN-LAST:event_jButton110ActionPerformed 
     4302 
     4303private void jButton112ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton112ActionPerformed 
     4304    GuiUtils.getUserSelectedFolder(this.textfieldState31); 
     4305}//GEN-LAST:event_jButton112ActionPerformed 
     4306 
     4307private void jButton113ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton113ActionPerformed 
     4308    GuiUtils.getUserSelectedFolder(this.textfieldState32); 
     4309}//GEN-LAST:event_jButton113ActionPerformed 
     4310 
     4311private void jButton111ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton111ActionPerformed 
     4312    String in = this.textfieldState31.getText(); 
     4313    String out = this.textfieldState32.getText(); 
     4314    automation.hexisle.convert(in,out); 
     4315}//GEN-LAST:event_jButton111ActionPerformed 
    42194316     
    42204317/*class c2 extends javax.swing.DefaultListSelectionModel 
     
    42944391    private javax.swing.JButton jButton11; 
    42954392    private javax.swing.JButton jButton110; 
     4393    private javax.swing.JButton jButton111; 
     4394    private javax.swing.JButton jButton112; 
     4395    private javax.swing.JButton jButton113; 
    42964396    private javax.swing.JButton jButton12; 
    42974397    private javax.swing.JButton jButton13; 
     
    44134513    private javax.swing.JLabel jLabel26; 
    44144514    private javax.swing.JLabel jLabel27; 
     4515    private javax.swing.JLabel jLabel28; 
     4516    private javax.swing.JLabel jLabel29; 
    44154517    private javax.swing.JLabel jLabel3; 
    44164518    private javax.swing.JLabel jLabel4; 
     
    44504552    private javax.swing.JPanel jPanel35; 
    44514553    private javax.swing.JPanel jPanel36; 
     4554    private javax.swing.JPanel jPanel37; 
    44524555    private javax.swing.JPanel jPanel4; 
    44534556    private javax.swing.JPanel jPanel5; 
     
    45114614    private shared.State.TextfieldState textfieldState3; 
    45124615    private shared.State.TextfieldState textfieldState30; 
     4616    private shared.State.TextfieldState textfieldState31; 
     4617    private shared.State.TextfieldState textfieldState32; 
    45134618    private shared.State.TextfieldState textfieldState4; 
    45144619    private shared.State.TextfieldState textfieldState5; 
  • drizzle/DrizzlePrp/src/uru/Bytestream.java

    r1834 r1889  
    308308        int readahead = 128; //you can change this. 
    309309 
    310         String result = "(pos=0x"+Integer.toHexString(pos)+")\nData:\n"; 
     310        String result = "(pos=0x"+Integer.toHexString(pos)+")\n"; 
     311        result += "(bytes left: "+Integer.toString(maxpos-pos)+")"; 
     312        result += "Data:\n"; 
    311313        if(!( pos + readahead <= maxpos+1 )) 
    312314        { 
  • drizzle/DrizzlePrp/src/uru/moulprp/Objheader.java

    r1834 r1889  
    4444            u1 = c.in.readByte(); 
    4545        } 
    46         else if(c.readversion==3||c.readversion==4
     46        else if(c.readversion==3||c.readversion==4||c.readversion==7
    4747        { 
    4848            //do nothing. 
  • drizzle/DrizzlePrp/src/uru/moulprp/Pageid.java

    r1834 r1889  
    7373            else prefix = (fixme & 0xFFFFFF00)>>>8; 
    7474        } 
    75         else if(c.readversion==4) // Crowthwistle 
     75        else if(c.readversion==4||c.readversion==7) // Crowthwistle 
    7676        { 
    7777            //int fixme = Bytes.Int16ToInt32(c.readShort()); 
  • drizzle/DrizzlePrp/src/uru/moulprp/Pagetype.java

    r1834 r1889  
    3535            pagetype = c.readShort(); 
    3636        } 
    37         else if(c.readversion==4
     37        else if(c.readversion==4||c.readversion==7
    3838        { 
    3939            pagetype = Bytes.ByteToInt16(c.readByte()); 
  • drizzle/DrizzlePrp/src/uru/moulprp/PlDrawableSpans.java

    r1842 r1889  
    103103            } 
    104104        } 
    105         unused = data.readInt(); e.ensure(unused==0); 
     105        if(c.readversion==7) 
     106        { 
     107            //I don't think hex isle has the next field. 
     108            unused = 0; 
     109        } 
     110        else 
     111        { 
     112            unused = data.readInt(); e.ensure(unused==0); 
     113        } 
    106114        listcount = data.readInt(); e.ensure(listcount==subsetcount);//so far so good. 
    107115        unused2 = data.readInts(listcount); 
     
    113121        } 
    114122         
     123        if(c.readversion==7) 
     124        { 
     125            //2 uruobjectref vectors here, but apparently they don't get called. 
     126            //c.readInt(); 
     127            //c.readInt(); 
     128        } 
     129         
    115130        if(subsetcount>0) 
    116131        { 
     
    137152        localToBones = c.readArray(Transmatrix.class,matrixsetcount); 
    138153        boneToLocals = c.readArray(Transmatrix.class,matrixsetcount); 
    139         subsetgroupcount = data.readInt(); 
    140         subsetgroups = c.readArray(SubsetGroup.class,subsetgroupcount); 
     154        subsetgroupcount = data.readInt(); //hexisle line 346 
     155        subsetgroups = c.readArray(SubsetGroup.class,subsetgroupcount); //fDIIndices, hexisle starts at line 386 
    141156        meshcount = data.readInt(); //so far so good. 
    142         meshes = c.readArray(Mesh.class,meshcount); 
     157        meshes = c.readArray(Mesh.class,meshcount); //plGBufferGroups 
    143158        embeddedtype = Typeid.Read(c); 
    144159        switch(embeddedtype) 
     
    238253        { 
    239254            Bytestream data = c.in; 
    240             visible = data.readInt(); e.ensureflags(visible,1); 
     255            visible = data.readInt(); e.ensureflags(visible,1,0); //is sometimes 0 in hex isle. 
    241256            materialindex = data.readInt(); 
    242257            if(materialindex==0 || materialindex==3) 
     
    249264            localToWorld = c.readObj(Transmatrix.class); 
    250265            worldToLocal = c.readObj(Transmatrix.class); 
    251             lightingflags = data.readInt(); 
     266            lightingflags = data.readInt(); //props 
    252267            localBounds = c.readObj(BoundingBox.class); 
    253268            worldBounds = c.readObj(BoundingBox.class); 
     
    263278                xu6 = c.readObj(Flt.class); 
    264279            } 
    265             meshindex = data.readInt(); 
    266             unused1 = data.readInt(); 
    267             unused2 = data.readInt(); 
    268             vertexstart1 = data.readInt(); 
    269             vertexstart2 = data.readInt(); 
    270             vertexcount = data.readInt(); 
    271             surfaceindex = data.readInt(); 
    272             indexstart = data.readInt(); 
    273             indexcount = data.readInt(); 
     280            meshindex = data.readInt(); //groupIdx 
     281            unused1 = data.readInt(); //vBufferIdx 
     282            unused2 = data.readInt(); //cellIdx 
     283            vertexstart1 = data.readInt(); //cellOffset 
     284            vertexstart2 = data.readInt(); //vStartIdx 
     285            vertexcount = data.readInt(); //vLength 
     286            if(c.readversion==7) 
     287            { 
     288                //hex isle doesn't have the next two fields. 
     289            } 
     290            else 
     291            { 
     292                surfaceindex = data.readInt(); //bufferIdx 
     293                indexstart = data.readInt(); //startIdx 
     294            } 
     295            indexcount = data.readInt(); //iLength 
     296            if((lightingflags&0x4)!=0) 
     297            { 
     298                int dummy=0; 
     299            } 
    274300        } 
    275301         
     
    429455        { 
    430456            Bytestream data = c.in; 
    431             fformat = data.readByte(); 
    432             size = data.readInt(); 
    433             //restofmesh = data.readBytes(size); //should this be size*4 ? 
    434             vertexstoragecount = data.readInt(); 
    435             submeshes = new SubMesh[vertexstoragecount]; 
    436             for(int i=0;i<vertexstoragecount;i++) 
    437             { 
    438                 submeshes[i] = new SubMesh(c,fformat); 
    439             } 
    440             //TODO rest of this, but it seems to work perfectly up to this point. 
    441             surfacecount = data.readInt(); 
    442             surfaces = new Shortvector[surfacecount]; 
    443             for(int i=0;i<surfacecount;i++) 
    444             { 
    445                 surfaces[i] = new Shortvector(data); 
    446             } 
    447             u1 = data.readInt(); 
    448             u2 = data.readInt(); 
    449             u3 = data.readInt(); 
    450             lastindex = data.readInt(); 
    451         } 
    452          
     457            if(c.readversion==7) 
     458            { 
     459                //sub_5059A0 
     460                int hi1 = c.readInt(); //76 
     461                byte hi2 = c.readByte(); //0 //this+4+6 
     462                byte hi3 = c.readByte(); e.ensure(hi3==1);//1 //v3+11, used in an if statement. 
     463                byte hi4 = c.readByte(); //0 
     464                byte hi5 = c.readByte(); //0 
     465                int hi6 = c.readInt(); //864 //v4+4 
     466                byte hi7 = c.readByte(); //0 
     467                byte hi6a = (byte)(hi6&0xFF); 
     468                byte hi6b = (byte)((hi6>>>8)&0xFF); 
     469                int v7 = b.ByteToInt32(((hi3&0x2)!=0)?hi6b:hi6a); 
     470                //hex isle doesn't look like it has the size field.  It's ignored by pots, so we'll just stick 0 in it. 
     471                size = 0; 
     472                vertexstoragecount = data.readInt(); 
     473                SubMeshAlt[] submeshalt = new SubMeshAlt[vertexstoragecount]; 
     474                for(int i=0;i<vertexstoragecount;i++) 
     475                { 
     476                    submeshalt[i] = new SubMeshAlt(c,fformat,v7,hi6,hi2,hi1); 
     477                } 
     478                //TODO rest of this, but it seems to work perfectly up to this point. 
     479                surfacecount = data.readInt(); 
     480                surfaces = new Shortvector[surfacecount]; 
     481                for(int i=0;i<surfacecount;i++) 
     482                { 
     483                    //surfaces[i] = new Shortvector(data); 
     484                    int surf1 = c.readInt(); 
     485                    byte surf2 = c.readByte(); 
     486                    byte[] surf3 = c.readBytes(surf1); 
     487                    int dummy=0; 
     488                } 
     489                int dummy=0; 
     490            } 
     491            else 
     492            { 
     493                fformat = data.readByte(); 
     494                size = data.readInt(); 
     495                 
     496                //restofmesh = data.readBytes(size); //should this be size*4 ? 
     497                vertexstoragecount = data.readInt(); 
     498                submeshes = new SubMesh[vertexstoragecount]; 
     499                for(int i=0;i<vertexstoragecount;i++) 
     500                { 
     501                    submeshes[i] = new SubMesh(c,fformat); 
     502                } 
     503                //TODO rest of this, but it seems to work perfectly up to this point. 
     504                surfacecount = data.readInt(); 
     505                surfaces = new Shortvector[surfacecount]; 
     506                for(int i=0;i<surfacecount;i++) 
     507                { 
     508                    surfaces[i] = new Shortvector(data); 
     509                } 
     510                u1 = data.readInt(); 
     511                u2 = data.readInt(); 
     512                u3 = data.readInt(); 
     513                lastindex = data.readInt(); 
     514            } 
     515        } 
     516        public static class SubMeshAlt 
     517        { 
     518            public SubMeshAlt(context c, byte fformat, int v7, int v17, byte hi2orig, int hi1orig) 
     519            { 
     520                int hi1 = c.readInt(); //768, size in bytes? 
     521                byte hi2 = c.readByte(); //0 
     522                m.warn("TODO: make this check if the short is in range."); 
     523                 
     524                int v16 = hi1 / v7; e.ensure(hi1 % v7 == 0); 
     525                int count = HexislePlDrawableSpans.getvertexcount(hi1orig, hi2orig); 
     526                //int count = v16; 
     527                 
     528                //hi1 is the size in bytes? 
     529                //v16 is the count of GetVertexDataSize calls. 
     530                //v7 is the stride? 
     531                 
     532                context c2 = c.Fork(); 
     533                //int dataSize = SubMesh.GetVertexDataSize(count, fformat, c2); 
     534                int dataSize = HexislePlDrawableSpans.GetVertexDataSize(count, fformat, c2, v17, hi2orig, hi1orig); 
     535                byte[] rawdata = c.in.readBytes(dataSize); 
     536                int rawdataversion = c.readversion; 
     537            } 
     538        } 
    453539        public void compile(Bytedeque data) 
    454540        { 
     
    486572                if((fformat&0x80)!=0) 
    487573                { 
    488                     count = c.in.readShort(); //number of vertexes. 
     574                    if(c.readversion==7) 
     575                    { 
     576                        int hi1 = c.readInt(); 
     577                        byte hi2 = c.readByte(); 
     578                        m.warn("TODO: make this check if the short is in range."); 
     579                        count = (short)hi1; 
     580                    } 
     581                    else 
     582                    { 
     583                        count = c.in.readShort(); //number of vertexes. 
     584                    } 
    489585                     
    490586                    //vertices = new SubMeshVertex[count]; 
     
    560656                                if(c.compile && c.writeversion==6) c.out.writeByte(b1); 
    561657                            } 
    562                             else if(c.readversion==3||c.readversion==4
     658                            else if(c.readversion==3||c.readversion==4||c.readversion==7
    563659                            { 
    564660                                //do nothing 
     
    596692                                } 
    597693                            } 
    598                             else if(c.readversion==3||c.readversion==4
     694                            else if(c.readversion==3||c.readversion==4||c.readversion==7
    599695                            { 
    600696                                count--; 
     
    727823                        } 
    728824                    } 
    729                     else if(c.readversion==3||c.readversion==4
     825                    else if(c.readversion==3||c.readversion==4||c.readversion==7
    730826                    { 
    731827                        short out2 = c.in.readShort(); 
  • drizzle/DrizzlePrp/src/uru/moulprp/PlHKPhysical.java

    r1851 r1889  
    342342            physx = new PXPhysical(c); 
    343343        } 
    344         else if(c.readversion==4
     344        else if(c.readversion==4||c.readversion==7
    345345        { 
    346346            _version = 4; 
  • drizzle/DrizzlePrp/src/uru/moulprp/PlLogicModifier.java

    r1842 r1889  
    4444        conditionals = c.readArray(Uruobjectref.class, conditionalcount); 
    4545        u1 = c.readInt(); 
    46         if(c.readversion==4
     46        if(c.readversion==4||c.readversion==7
    4747        { 
    4848            xref = new Uruobjectref(c); //e.g. KeepClickLinkLaki(plPickingDetector) 
  • drizzle/DrizzlePrp/src/uru/moulprp/PlODEPhysical.java

    r1851 r1889  
    123123        u10 = c.readInt(); 
    124124        u11 = c.readInt(); 
    125         u12 = c.readInt(); //flags 
     125        if(c.readversion==4) 
     126        { 
     127            u12 = c.readInt(); //flags 
     128        } 
    126129        u13 = c.readShort(); //LOSDB 
     130         
     131        if(c.readversion==7) 
     132        { 
     133            //int xu14 = c.readInt(); 
     134            //int xu15 = c.readInt(); 
     135        } 
    127136         
    128137        sceneobject = new Uruobjectref(c); //plSceneObject 
  • drizzle/DrizzlePrp/src/uru/moulprp/PlSynchedObject.java

    r1834 r1889  
    9090            } 
    9191        } 
    92         else if(c.readversion==4
     92        else if(c.readversion==4||c.readversion==7
    9393        { 
    9494            //if neither of bits 2 nor 3 are set... 
  • drizzle/DrizzlePrp/src/uru/moulprp/PrpHeader.java

    r1834 r1889  
    6363        //else if (version==6) c.readversion = 6; 
    6464         
    65         if(version==6) //moul, myst5, crowthistle 
     65        if(version==6||version==9) //moul, myst5, crowthistle; version9=hexisle 
    6666        { 
    6767            //version = data.readInt(); e.ensure(version,6); //version 6 for MOUL and possibly MystV. 
     
    8787            else 
    8888            { 
    89                 c.readversion = 4; //crowthistle (this may be indistinguishable from Myst5) 
     89                if(version==6) 
     90                { 
     91                    c.readversion = 4; //crowthistle (this may be indistinguishable from Myst5) 
     92                } 
     93                else 
     94                { 
     95                    c.readversion = 7; //hexisle 
     96                } 
    9097                 
    9198                //let's just ignore this stuff; I think it is replaced by the object index anyway, so it isn't even used. 
  • drizzle/DrizzlePrp/src/uru/moulprp/PrpMessage.java

    r1842 r1889  
    623623                id = c.readInt(); 
    624624            } 
    625             else if(c.readversion==4
     625            else if(c.readversion==4||c.readversion==7
    626626            { 
    627627                byte idb = c.readByte(); 
     
    907907                flags = c.readInt(); 
    908908            } 
    909             else if(c.readversion==4
     909            else if(c.readversion==4||c.readversion==7
    910910            { 
    911911                //if(refcount!=0) 
  • drizzle/DrizzlePrp/src/uru/moulprp/PrpObjectIndex.java