Changeset 1889
- Timestamp:
- 11/19/08 09:03:42 (2 months ago)
- Files:
-
- drizzle/DrizzlePrp/src/automation/hexisle.java (added)
- drizzle/DrizzlePrp/src/files/authored/authors&licenses.txt (modified) (2 diffs)
- drizzle/DrizzlePrp/src/gui/Gui.form (modified) (5 diffs)
- drizzle/DrizzlePrp/src/gui/Gui.java (modified) (10 diffs)
- drizzle/DrizzlePrp/src/uru/Bytestream.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/HexislePlDrawableSpans.java (added)
- drizzle/DrizzlePrp/src/uru/moulprp/Objheader.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/Pageid.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/Pagetype.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/PlDrawableSpans.java (modified) (11 diffs)
- drizzle/DrizzlePrp/src/uru/moulprp/PlHKPhysical.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/PlLogicModifier.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/PlODEPhysical.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/PlSynchedObject.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/PrpHeader.java (modified) (2 diffs)
- drizzle/DrizzlePrp/src/uru/moulprp/PrpMessage.java (modified) (2 diffs)
- drizzle/DrizzlePrp/src/uru/moulprp/PrpObjectIndex.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/Transmatrix.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/Typeid.java (modified) (6 diffs)
- drizzle/DrizzlePrp/src/uru/moulprp/Uruobjectdesc.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/Uruobjectref.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/Urustring.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/moulprp/x001CSimulationInterface.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/uru/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
drizzle/DrizzlePrp/src/files/authored/authors&licenses.txt
r1885 r1889 6 6 MystMystV_District_Addition.prp: Race 7 7 DescentMystV_District_FootRgns.prp: Race 8 (OldDelmeNoMusic)MystMystV_District_Additions.prp: Race 9 Tahgira_District_FootRgns.prp: Race 10 Todelmer_DIstrict_FootRgns.prp: Race 8 11 9 12 readme: … … 12 15 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). 13 16 test 17 To 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 424 424 <Group type="102" alignment="0" attributes="0"> 425 425 <EmptySpace max="-2" attributes="0"/> 426 <Component id="tabsState2" pref="400"max="32767" attributes="0"/>426 <Component id="tabsState2" max="32767" attributes="0"/> 427 427 <EmptySpace max="-2" attributes="0"/> 428 428 </Group> … … 695 695 <EmptySpace max="-2" attributes="0"/> 696 696 <Component id="jButton53" min="-2" max="-2" attributes="0"/> 697 <EmptySpace pref="2 42" max="32767" attributes="0"/>697 <EmptySpace pref="266" max="32767" attributes="0"/> 698 698 </Group> 699 699 </Group> … … 1348 1348 <EmptySpace max="-2" attributes="0"/> 1349 1349 <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"/> 1351 1351 </Group> 1352 1352 </Group> … … 1535 1535 </Group> 1536 1536 </Group> 1537 <EmptySpace pref=" 47" max="32767" attributes="0"/>1537 <EmptySpace pref="71" max="32767" attributes="0"/> 1538 1538 </Group> 1539 1539 </Group> … … 1640 1640 <Property name="text" type="java.lang.String" value="Translation:"/> 1641 1641 </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> 1642 1753 </Component> 1643 1754 </SubComponents> drizzle/DrizzlePrp/src/gui/Gui.java
r1887 r1889 494 494 jLabel23 = new javax.swing.JLabel(); 495 495 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(); 496 504 jPanel1 = new javax.swing.JPanel(); 497 505 jButton15 = new javax.swing.JButton(); … … 1045 1053 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1046 1054 .addComponent(jButton53) 1047 .addContainerGap(2 42, Short.MAX_VALUE))1055 .addContainerGap(266, Short.MAX_VALUE)) 1048 1056 ); 1049 1057 … … 1407 1415 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1408 1416 .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)) 1410 1418 ); 1411 1419 … … 1569 1577 .addGap(116, 116, 116) 1570 1578 .addComponent(jButton99))) 1571 .addContainerGap( 47, Short.MAX_VALUE))1579 .addContainerGap(71, Short.MAX_VALUE)) 1572 1580 ); 1573 1581 1574 1582 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); 1575 1658 1576 1659 javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13); … … 1587 1670 .addGroup(jPanel13Layout.createSequentialGroup() 1588 1671 .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) 1590 1673 .addContainerGap()) 1591 1674 ); … … 4217 4300 4218 4301 }//GEN-LAST:event_jButton110ActionPerformed 4302 4303 private void jButton112ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton112ActionPerformed 4304 GuiUtils.getUserSelectedFolder(this.textfieldState31); 4305 }//GEN-LAST:event_jButton112ActionPerformed 4306 4307 private void jButton113ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton113ActionPerformed 4308 GuiUtils.getUserSelectedFolder(this.textfieldState32); 4309 }//GEN-LAST:event_jButton113ActionPerformed 4310 4311 private 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 4219 4316 4220 4317 /*class c2 extends javax.swing.DefaultListSelectionModel … … 4294 4391 private javax.swing.JButton jButton11; 4295 4392 private javax.swing.JButton jButton110; 4393 private javax.swing.JButton jButton111; 4394 private javax.swing.JButton jButton112; 4395 private javax.swing.JButton jButton113; 4296 4396 private javax.swing.JButton jButton12; 4297 4397 private javax.swing.JButton jButton13; … … 4413 4513 private javax.swing.JLabel jLabel26; 4414 4514 private javax.swing.JLabel jLabel27; 4515 private javax.swing.JLabel jLabel28; 4516 private javax.swing.JLabel jLabel29; 4415 4517 private javax.swing.JLabel jLabel3; 4416 4518 private javax.swing.JLabel jLabel4; … … 4450 4552 private javax.swing.JPanel jPanel35; 4451 4553 private javax.swing.JPanel jPanel36; 4554 private javax.swing.JPanel jPanel37; 4452 4555 private javax.swing.JPanel jPanel4; 4453 4556 private javax.swing.JPanel jPanel5; … … 4511 4614 private shared.State.TextfieldState textfieldState3; 4512 4615 private shared.State.TextfieldState textfieldState30; 4616 private shared.State.TextfieldState textfieldState31; 4617 private shared.State.TextfieldState textfieldState32; 4513 4618 private shared.State.TextfieldState textfieldState4; 4514 4619 private shared.State.TextfieldState textfieldState5; drizzle/DrizzlePrp/src/uru/Bytestream.java
r1834 r1889 308 308 int readahead = 128; //you can change this. 309 309 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"; 311 313 if(!( pos + readahead <= maxpos+1 )) 312 314 { drizzle/DrizzlePrp/src/uru/moulprp/Objheader.java
r1834 r1889 44 44 u1 = c.in.readByte(); 45 45 } 46 else if(c.readversion==3||c.readversion==4 )46 else if(c.readversion==3||c.readversion==4||c.readversion==7) 47 47 { 48 48 //do nothing. drizzle/DrizzlePrp/src/uru/moulprp/Pageid.java
r1834 r1889 73 73 else prefix = (fixme & 0xFFFFFF00)>>>8; 74 74 } 75 else if(c.readversion==4 ) // Crowthwistle75 else if(c.readversion==4||c.readversion==7) // Crowthwistle 76 76 { 77 77 //int fixme = Bytes.Int16ToInt32(c.readShort()); drizzle/DrizzlePrp/src/uru/moulprp/Pagetype.java
r1834 r1889 35 35 pagetype = c.readShort(); 36 36 } 37 else if(c.readversion==4 )37 else if(c.readversion==4||c.readversion==7) 38 38 { 39 39 pagetype = Bytes.ByteToInt16(c.readByte()); drizzle/DrizzlePrp/src/uru/moulprp/PlDrawableSpans.java
r1842 r1889 103 103 } 104 104 } 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 } 106 114 listcount = data.readInt(); e.ensure(listcount==subsetcount);//so far so good. 107 115 unused2 = data.readInts(listcount); … … 113 121 } 114 122 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 115 130 if(subsetcount>0) 116 131 { … … 137 152 localToBones = c.readArray(Transmatrix.class,matrixsetcount); 138 153 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 141 156 meshcount = data.readInt(); //so far so good. 142 meshes = c.readArray(Mesh.class,meshcount); 157 meshes = c.readArray(Mesh.class,meshcount); //plGBufferGroups 143 158 embeddedtype = Typeid.Read(c); 144 159 switch(embeddedtype) … … 238 253 { 239 254 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. 241 256 materialindex = data.readInt(); 242 257 if(materialindex==0 || materialindex==3) … … 249 264 localToWorld = c.readObj(Transmatrix.class); 250 265 worldToLocal = c.readObj(Transmatrix.class); 251 lightingflags = data.readInt(); 266 lightingflags = data.readInt(); //props 252 267 localBounds = c.readObj(BoundingBox.class); 253 268 worldBounds = c.readObj(BoundingBox.class); … … 263 278 xu6 = c.readObj(Flt.class); 264 279 } 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 } 274 300 } 275 301 … … 429 455 { 430 456 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 } 453 539 public void compile(Bytedeque data) 454 540 { … … 486 572 if((fformat&0x80)!=0) 487 573 { 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 } 489 585 490 586 //vertices = new SubMeshVertex[count]; … … 560 656 if(c.compile && c.writeversion==6) c.out.writeByte(b1); 561 657 } 562 else if(c.readversion==3||c.readversion==4 )658 else if(c.readversion==3||c.readversion==4||c.readversion==7) 563 659 { 564 660 //do nothing … … 596 692 } 597 693 } 598 else if(c.readversion==3||c.readversion==4 )694 else if(c.readversion==3||c.readversion==4||c.readversion==7) 599 695 { 600 696 count--; … … 727 823 } 728 824 } 729 else if(c.readversion==3||c.readversion==4 )825 else if(c.readversion==3||c.readversion==4||c.readversion==7) 730 826 { 731 827 short out2 = c.in.readShort(); drizzle/DrizzlePrp/src/uru/moulprp/PlHKPhysical.java
r1851 r1889 342 342 physx = new PXPhysical(c); 343 343 } 344 else if(c.readversion==4 )344 else if(c.readversion==4||c.readversion==7) 345 345 { 346 346 _version = 4; drizzle/DrizzlePrp/src/uru/moulprp/PlLogicModifier.java
r1842 r1889 44 44 conditionals = c.readArray(Uruobjectref.class, conditionalcount); 45 45 u1 = c.readInt(); 46 if(c.readversion==4 )46 if(c.readversion==4||c.readversion==7) 47 47 { 48 48 xref = new Uruobjectref(c); //e.g. KeepClickLinkLaki(plPickingDetector) drizzle/DrizzlePrp/src/uru/moulprp/PlODEPhysical.java
r1851 r1889 123 123 u10 = c.readInt(); 124 124 u11 = c.readInt(); 125 u12 = c.readInt(); //flags 125 if(c.readversion==4) 126 { 127 u12 = c.readInt(); //flags 128 } 126 129 u13 = c.readShort(); //LOSDB 130 131 if(c.readversion==7) 132 { 133 //int xu14 = c.readInt(); 134 //int xu15 = c.readInt(); 135 } 127 136 128 137 sceneobject = new Uruobjectref(c); //plSceneObject drizzle/DrizzlePrp/src/uru/moulprp/PlSynchedObject.java
r1834 r1889 90 90 } 91 91 } 92 else if(c.readversion==4 )92 else if(c.readversion==4||c.readversion==7) 93 93 { 94 94 //if neither of bits 2 nor 3 are set... drizzle/DrizzlePrp/src/uru/moulprp/PrpHeader.java
r1834 r1889 63 63 //else if (version==6) c.readversion = 6; 64 64 65 if(version==6 ) //moul, myst5, crowthistle65 if(version==6||version==9) //moul, myst5, crowthistle; version9=hexisle 66 66 { 67 67 //version = data.readInt(); e.ensure(version,6); //version 6 for MOUL and possibly MystV. … … 87 87 else 88 88 { 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 } 90 97 91 98 //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 623 623 id = c.readInt(); 624 624 } 625 else if(c.readversion==4 )625 else if(c.readversion==4||c.readversion==7) 626 626 { 627 627 byte idb = c.readByte(); … … 907 907 flags = c.readInt(); 908 908 } 909 else if(c.readversion==4 )909 else if(c.readversion==4||c.readversion==7) 910 910 { 911 911 //if(refcount!=0) drizzle/DrizzlePrp/src/uru/moulprp/PrpObjectIndex.java
