Changeset 1843
- Timestamp:
- 11/04/08 07:54:24 (2 months ago)
- Files:
-
- drizzle/DrizzlePrp/Drizzle.output.txt (deleted)
- drizzle/DrizzlePrp/src/automation/realmyst.java (added)
- drizzle/DrizzlePrp/src/gui/Gui.form (modified) (7 diffs)
- drizzle/DrizzlePrp/src/gui/Gui.java (modified) (15 diffs)
- drizzle/DrizzlePrp/src/realmyst/Mdb.java (modified) (7 diffs)
- drizzle/DrizzlePrp/src/realmyst/rmcontext.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
drizzle/DrizzlePrp/src/gui/Gui.form
r1842 r1843 99 99 <Group type="102" alignment="0" attributes="0"> 100 100 <EmptySpace max="-2" attributes="0"/> 101 <Component id="jButton61" min="-2" pref="190" max="-2" attributes="0"/> 101 <Group type="103" groupAlignment="0" attributes="0"> 102 <Group type="102" alignment="0" attributes="0"> 103 <EmptySpace min="6" pref="6" max="6" attributes="0"/> 104 <Component id="jButton107" min="-2" max="-2" attributes="0"/> 105 </Group> 106 <Component id="jButton61" alignment="0" min="-2" pref="190" max="-2" attributes="0"/> 107 </Group> 102 108 <EmptySpace max="32767" attributes="0"/> 103 109 </Group> … … 109 115 <EmptySpace max="-2" attributes="0"/> 110 116 <Component id="jButton61" min="-2" max="-2" attributes="0"/> 111 <EmptySpace pref="112" max="32767" attributes="0"/> 117 <EmptySpace max="-2" attributes="0"/> 118 <Component id="jButton107" min="-2" max="-2" attributes="0"/> 119 <EmptySpace pref="70" max="32767" attributes="0"/> 112 120 </Group> 113 121 </Group> … … 121 129 <Events> 122 130 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton61ActionPerformed"/> 131 </Events> 132 </Component> 133 <Component class="javax.swing.JButton" name="jButton107"> 134 <Properties> 135 <Property name="text" type="java.lang.String" value="Save settings"/> 136 </Properties> 137 <Events> 138 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton107ActionPerformed"/> 123 139 </Events> 124 140 </Component> … … 397 413 <Group type="102" alignment="0" attributes="0"> 398 414 <EmptySpace max="-2" attributes="0"/> 399 <Component id="tabsState2" max="32767" attributes="0"/>415 <Component id="tabsState2" pref="400" max="32767" attributes="0"/> 400 416 <EmptySpace max="-2" attributes="0"/> 401 417 </Group> … … 668 684 <EmptySpace max="-2" attributes="0"/> 669 685 <Component id="jButton53" min="-2" max="-2" attributes="0"/> 670 <EmptySpace pref="2 66" max="32767" attributes="0"/>686 <EmptySpace pref="242" max="32767" attributes="0"/> 671 687 </Group> 672 688 </Group> … … 1318 1334 <EmptySpace max="-2" attributes="0"/> 1319 1335 <Component id="checkboxState20" min="-2" max="-2" attributes="0"/> 1320 <EmptySpace pref=" 106" max="32767" attributes="0"/>1336 <EmptySpace pref="82" max="32767" attributes="0"/> 1321 1337 </Group> 1322 1338 </Group> … … 1499 1515 </Group> 1500 1516 </Group> 1501 <EmptySpace pref=" 71" max="32767" attributes="0"/>1517 <EmptySpace pref="47" max="32767" attributes="0"/> 1502 1518 </Group> 1503 1519 </Group> drizzle/DrizzlePrp/src/gui/Gui.java
r1842 r1843 380 380 jPanel26 = new javax.swing.JPanel(); 381 381 jButton61 = new javax.swing.JButton(); 382 jButton107 = new javax.swing.JButton(); 382 383 jPanel27 = new javax.swing.JPanel(); 383 384 jButton2 = new javax.swing.JButton(); … … 655 656 }); 656 657 658 jButton107.setText("Save settings"); 659 jButton107.addActionListener(new java.awt.event.ActionListener() { 660 public void actionPerformed(java.awt.event.ActionEvent evt) { 661 jButton107ActionPerformed(evt); 662 } 663 }); 664 657 665 javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26); 658 666 jPanel26.setLayout(jPanel26Layout); … … 661 669 .addGroup(jPanel26Layout.createSequentialGroup() 662 670 .addContainerGap() 663 .addComponent(jButton61, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE) 671 .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 672 .addGroup(jPanel26Layout.createSequentialGroup() 673 .addGap(6, 6, 6) 674 .addComponent(jButton107)) 675 .addComponent(jButton61, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)) 664 676 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 665 677 ); … … 669 681 .addContainerGap() 670 682 .addComponent(jButton61) 671 .addContainerGap(112, Short.MAX_VALUE)) 683 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 684 .addComponent(jButton107) 685 .addContainerGap(70, Short.MAX_VALUE)) 672 686 ); 673 687 … … 1016 1030 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1017 1031 .addComponent(jButton53) 1018 .addContainerGap(2 66, Short.MAX_VALUE))1032 .addContainerGap(242, Short.MAX_VALUE)) 1019 1033 ); 1020 1034 … … 1372 1386 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1373 1387 .addComponent(checkboxState20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1374 .addContainerGap( 106, Short.MAX_VALUE))1388 .addContainerGap(82, Short.MAX_VALUE)) 1375 1389 ); 1376 1390 … … 1534 1548 .addGap(116, 116, 116) 1535 1549 .addComponent(jButton99))) 1536 .addContainerGap( 71, Short.MAX_VALUE))1550 .addContainerGap(47, Short.MAX_VALUE)) 1537 1551 ); 1538 1552 … … 1552 1566 .addGroup(jPanel13Layout.createSequentialGroup() 1553 1567 .addContainerGap() 1554 .addComponent(tabsState2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)1568 .addComponent(tabsState2, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) 1555 1569 .addContainerGap()) 1556 1570 ); … … 3945 3959 sdb = new realmyst.Sdb(bs); 3946 3960 else if(f.getParentFile().getName().toLowerCase().equals("mdb")) 3947 mdb = new realmyst.Mdb(bs );3961 mdb = new realmyst.Mdb(bs,"none"); 3948 3962 } 3949 3963 else if(filename.toLowerCase().endsWith(".shp")) … … 4003 4017 } 4004 4018 4005 File f2 = new File(outfol+"/mdb");4019 /*File f2 = new File(outfol+"/mdb"); 4006 4020 for(File child: f2.listFiles()) 4007 4021 { … … 4024 4038 int dummy=0; 4025 4039 } 4026 } 4040 }*/ 4027 4041 4028 4042 }//GEN-LAST:event_jButton104ActionPerformed … … 4042 4056 4043 4057 File f = new File(outfol+"/mdb"); 4058 realmyst.rmcontext.get().curnum=0; 4059 Vector<realmyst.Mdb> mdbs = new Vector<realmyst.Mdb>(); 4060 int count = 0; 4044 4061 for(File child: f.listFiles()) 4045 4062 { 4046 4063 if(child.getName().toLowerCase().endsWith(".vdb")) 4047 4064 { 4065 realmyst.rmcontext.get().curnum++; 4066 count++; 4067 //if(count>400) break; 4048 4068 try 4049 4069 { 4050 4070 int fs = (int)child.length(); 4051 4071 shared.IBytestream bs = shared.SerialBytestream.createFromFile(child); 4052 realmyst.Mdb mdb = new realmyst.Mdb(bs );4072 realmyst.Mdb mdb = new realmyst.Mdb(bs,"102445243.vdb"); 4053 4073 int offset = bs.getAbsoluteOffset(); 4054 4074 int bytesleft = bs.getBytesRemaining(); … … 4062 4082 int dummy=0; 4063 4083 } 4084 4085 String oname = mdb.name.toString().toLowerCase(); 4086 int ind = oname.indexOf(".."); 4087 if(ind==-1) m.msg("objectname has no .."); 4088 else m.msg("objectname: "+oname.substring(0, ind)); 4089 if(mdb.name.toString().toLowerCase().startsWith("myst..")) 4090 { 4091 mdbs.add(mdb); 4092 } 4093 4064 4094 int dummy=0; 4065 4095 } … … 4070 4100 } 4071 4101 } 4072 4102 automation.realmyst.save3dsFile(mdbs); 4073 4103 4074 4104 }//GEN-LAST:event_jButton106ActionPerformed 4105 4106 private void jButton107ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton107ActionPerformed 4107 shared.State.AllStates.pullandsave(settingsfile); 4108 }//GEN-LAST:event_jButton107ActionPerformed 4075 4109 4076 4110 /*class c2 extends javax.swing.DefaultListSelectionModel … … 4143 4177 private javax.swing.JButton jButton105; 4144 4178 private javax.swing.JButton jButton106; 4179 private javax.swing.JButton jButton107; 4145 4180 private javax.swing.JButton jButton11; 4146 4181 private javax.swing.JButton jButton12; drizzle/DrizzlePrp/src/realmyst/Mdb.java
r1842 r1843 12 12 public class Mdb 13 13 { 14 public int tag; 14 //public int tag; 15 public Typeid type; 15 16 public int filesize; 16 17 public int u2; 17 18 public Bstr name; 18 19 //public int u3; 19 public Bstr u3; 20 public int strCount; //number of Bstrs that follow 21 public Bstr[] strs; 20 //public Bstr u3; 21 //public int strCount; //number of Bstrs that follow 22 //public Bstr[] strs; 23 byte b3; 24 int u4; 25 int u5; 26 int u6; 27 int u7; 28 int u8; 29 int u9; 30 int u10; 31 public Sixlet start; 32 public Sixlet[] bunch; 33 public Face[] fs; 34 IntsIndex ii; 35 IntsFullIndex ifi; 36 public wha[] whas; 37 22 38 23 39 static Primary main; 24 40 25 public Mdb(IBytestream c) 26 { 41 public Mdb(IBytestream c, String fntrap) 42 { 43 int curfilenum = realmyst.rmcontext.get().curnum; 44 27 45 //tag = c.readInt(); 28 Typeidtype = Typeid.read(c);46 type = Typeid.read(c); 29 47 if(type!=Typeid.mdb) 30 48 { … … 37 55 String trap = 38 56 //"aurora..sn_TOWER_observe_roof01" 39 "aurora..switchtube" 57 //"aurora..switchtube" 58 "aurora..boltref03" 40 59 ; 41 60 if(name.toString().toLowerCase().startsWith(trap.toLowerCase())) … … 43 62 int dummy=0; 44 63 } 45 46 byte b3 = c.readByte(); e.ensure((int)b3,3); //always 3 47 int u4 = c.readInt(); e.ensure(u4,0); //always 0 48 int u5 = c.readInt(); e.ensure(u5,3); //always 3 49 int u6 = c.readInt(); e.ensure(u6,0,1); //0 or 1 50 int u7 = c.readInt(); e.ensure(u7,257,1); //1,11,2305,257,265,267,283,321,331,9 //0x1,B,901,101,109,10B,11B,141,14B,9 //100101011011 are the bits used. 51 m.msg("u7="+Integer.toString(u7)); 52 int u8 = c.readInt(); e.ensure(u8,257,1); //0,1,11,257,265,267,283,321,331,9 //0x0,1,B,101,109,10B,11B,141,14B,9 53 m.msg("u8="+Integer.toString(u8)); 54 int u9 = c.readInt(); e.ensure(u9,1); //1,2305 //0x1,901 55 m.msg("u9="+Integer.toString(u9)); 56 int u10 = c.readInt(); e.ensure(u10,0); //0 or 1 57 m.msg("u10="+Integer.toString(u10)); 58 m.msg(name.toString()); 64 if(c.sourceName.toLowerCase().endsWith(fntrap.toLowerCase())) 65 { 66 int dummy=0; 67 } 68 if(c.sourceName.toLowerCase().endsWith("104988212.vdb".toLowerCase())) 69 { 70 int dummy=0; 71 } 72 73 b3 = c.readByte(); e.ensure((int)b3,3); //always 3 74 u4 = c.readInt(); e.ensure(u4,0); //always 0 75 u5 = c.readInt(); e.ensure(u5,3); //always 3 76 u6 = c.readInt(); e.ensure(u6,0,1); //0 or 1 77 u7 = c.readInt(); e.ensure(u7,257,1,267,321,331,11,265,9,2305,283); //1,11,2305,257,265,267,283,321,331,9 //0x1,B,901,101,109,10B,11B,141,14B,9 //100101011011 are the bits used. 78 //m.msg("u7="+Integer.toString(u7)); 79 if(u7==2305) 80 { 81 int altu8 = c.readInt(); e.ensure(altu8,0); 82 //int altu9 = c.readInt(); e.ensure(altu9,2305); 83 //int altu10 = c.readInt(); e.ensure(altu10,1); 84 //int altu11 = c.readInt(); e.ensure(altu11,0); 85 //Sixlet start = new Sixlet(c); 86 //int vertcount = c.readInt(); 87 //Vertex[] verts = c.readArray(Vertex.class, vertcount); 88 } 89 u8 = c.readInt(); e.ensure(u8,257,1,267,321,331,11,265,9,2305,283); //0,1,11,257,265,267,283,321,331,9 //0x0,1,B,101,109,10B,11B,141,14B,9 90 //m.msg("u8="+Integer.toString(u8)); 91 u9 = c.readInt(); e.ensure(u9,1); //1,2305 //0x1,901 92 //m.msg("u9="+Integer.toString(u9)); 93 u10 = c.readInt(); e.ensure(u10,0); //0 or 1 94 //m.msg("u10="+Integer.toString(u10)); 95 //m.msg(name.toString()); 59 96 //m.err("Unhandled tag: 0x"+Integer.toHexString(tag)); 60 97 61 Sixlet start = new Sixlet(c); //opposite corners of bounding box? 62 63 int s1 = c.readInt(); e.ensure(s1,3,1,2);//3 (1 seemed the same, 2 ignores quats: this is probably flags.) 64 65 int s2 = c.readInt(); //4 66 Sixlet bunch[] = c.readArray(Sixlet.class, s2); //vertex and vertex normal (vertex normal is average of face normals of adjacent faces.) 67 Quat[] quats = null; //I think this is actually a RGBA colour. 68 if(s1!=2) 69 { 70 quats = c.readArray(Quat.class, s2); 71 } 72 73 int u21 = c.readInt(); //e.ensure(u21,0); 74 Vertex[] trips = c.readArray(Vertex.class, u21); //uvw maybe? 98 start = new Sixlet(c); //opposite corners of bounding box? 99 100 if(u7==2305) 101 { 102 int vertcount = c.readInt(); 103 Vertex[] verts = c.readArray(Vertex.class, vertcount); 104 } 105 else 106 { 107 int s1 = c.readInt(); e.ensure(s1,3,1,2);//3 (1 seemed the same, 2 ignores quats: this is probably flags.) 108 109 int s2 = c.readInt(); //4 110 bunch = c.readArray(Sixlet.class, s2); //vertex and vertex normal (vertex normal is average of face normals of adjacent faces.) 111 Quat[] quats = null; //I think this is actually a RGBA colour. 112 if(s1!=2) 113 { 114 quats = c.readArray(Quat.class, s2); 115 } 116 117 int u21 = c.readInt(); //e.ensure(u21,0); 118 Vertex[] trips = c.readArray(Vertex.class, u21); //uvw maybe? 119 } 75 120 76 121 if(u6==1) //u7 and u8 are also 1 in this case. 77 122 { 78 123 //int xu1 = c.readInt(); e.ensure(xu1,0); 79 int xu2 = c.readInt(); e.ensure(xu2,0); 80 int xu3 = c.readInt(); e.ensure(xu3,3); 81 int xu4 = c.readInt(); e.ensure(xu4,0); 124 int xu2 = c.readInt(); e.ensure(xu2,0,1); //1 seems to be the same. 125 int xu3 = c.readInt(); //e.ensure(xu3,3); 126 127 repeataround[] repeatarounds = c.readArray(repeataround.class, xu3); 128 129 /*int xu4 = c.readInt(); e.ensure(xu4,0); 82 130 int xu5 = c.readInt(); e.ensure(xu5,18433); 83 131 int xu6 = c.readInt(); e.ensure(xu6,1); … … 85 133 Sixlet xu8 = new Sixlet(c); 86 134 int xu9 = c.readInt(); e.ensure(xu9,0); 87 int dummy=0;88 89 135 repeat r1 = new repeat(c); 90 136 int xub3 = c.readInt(); e.ensure(xub3,0); 137 91 138 int xub4 = c.readInt(); e.ensure(xub4,0); 92 139 int xub5 = c.readInt(); e.ensure(xub5,18433); … … 107 154 repeat r3 = new repeat(c); 108 155 109 int x10 = c.readInt(); e.ensure(x10,0); 110 int x11 = c.readInt(); e.ensure(x11,5); 156 int x10 = c.readInt(); e.ensure(x10,0);*/ 157 158 159 int x11 = c.readInt(); //e.ensure(x11,5); 111 160 huh[] huhs = c.readArray(huh.class, x11); 112 161 113 int[] extraints = c.readInts(6); 162 //int[] extraints = c.readInts(6); 163 IntsIndex[] intIndexes = c.readArray(IntsIndex.class, xu3); 164 IntsFullIndex[] ind = new IntsFullIndex[xu3]; 165 for(int i=0;i<xu3;i++) 166 { 167 int curnum = repeatarounds[i].r1.u24; 168 ind[i] = new IntsFullIndex(c, intIndexes[i], curnum); 169 } 114 170 115 171 return; 116 172 } 117 173 118 int u22 = c.readInt(); e.ensure(u22,128 );174 int u22 = c.readInt(); e.ensure(u22,128,131,129,165); //131,129 seems to be the same. 119 175 120 176 int u23 = c.readInt(); //e.ensure(u23,4); 121 Face[]fs = c.readArray(Face.class, u23); //this maps from the longer lists to the shorter lists; or maybe it gives multiple items from the longer lists given an item from the shorter lists //or should this be u23 instead of s2?177 fs = c.readArray(Face.class, u23); //this maps from the longer lists to the shorter lists; or maybe it gives multiple items from the longer lists given an item from the shorter lists //or should this be u23 instead of s2? 122 178 123 179 int u24 = c.readInt(); //e.ensure(u24,2); 124 wha[] whas = c.readArray(wha.class, u24); 125 126 127 128 if(true) 129 { 130 /*Vertex[] verts = new Vertex[bunch.length]; 131 for(int i=0;i<bunch.length;i++) 132 { 133 Flt x = bunch[i].f1; 134 Flt y = bunch[i].f2; 135 Flt z = bunch[i].f3; 136 verts[i] = Vertex.createFromFlts(x, y, z); 137 }*/ 138 Vertex[] verts = new Vertex[fs.length]; 139 for(int i=0;i<fs.length;i++) 140 { 141 int to = fs[i].v2; 142 int from = fs[i].v3; 143 Flt x= bunch[to].f1; 144 Flt y= bunch[to].f2; 145 Flt z= bunch[to].f3; 146 verts[i] = Vertex.createFromFlts(x, y, z); 147 } 148 149 ShortTriplet[] faces = new ShortTriplet[whas.length]; 150 for(int i=0;i<whas.length;i++) 151 { 152 int v1 = whas[i].u6; 153 int v2 = whas[i].u7; 154 int v3 = whas[i].u8; 155 faces[i] = ShortTriplet.createFromShorts((short)v1, (short)v2, (short)v3); 156 } 157 158 String objname = this.name.toString(); 159 160 if(main==null) 161 { 162 main = Primary.createNull(); 163 main.meshdata.mat = Material.create("defaultmat"); 164 } 165 NamedObj newobj = NamedObj.createNull(objname); 166 newobj.namedTriangleObject = NamedTriangleObject.createNull(); 167 newobj.namedTriangleObject.points = PointArray.create(verts); 168 newobj.namedTriangleObject.faces = FaceArray.create(faces, "defaultmat"); 169 main.meshdata.objs.add(newobj); 170 171 IBytedeque out = new Bytedeque2(); 172 main.compile(out); 173 byte[] filedata = out.getAllBytes(); 174 FileUtils.WriteFile("c:/test.3ds", filedata); 175 } 176 if(true)return; 177 178 179 180 181 int u25 = c.readInt(); //??? 182 183 Face[] fs2 = c.readArray(Face.class, u24); 180 whas = c.readArray(wha.class, u24); 181 182 if(whas.length>0) 183 { 184 int abc = whas[0].u1; 185 int dummy=0; 186 } 187 188 189 //if(true)return; 190 191 192 193 194 Face[] fs2=null; 195 //if(u7!=267) 196 if(u7==1||u7==11||u7==9) 197 { 198 int dummy=0; 199 } 200 else 201 { 202 int u25 = c.readInt(); //??? 203 204 fs2 = c.readArray(Face.class, u24); 205 } 184 206 185 207 //int u26 = c.readInt(); //6 6 6 4 3 … … 191 213 //int u32 = c.readInt(); //59 53 53 192 214 //int u33 = c.readInt(); //5 5 5 215 216 //IntsIndex: 193 217 int u26 = c.readInt(); 194 int[] extra = c.readInts(u26-1); //n-1 extra ints. 195 int u32 = c.readInt(); 196 int u33 = c.readInt(); 218 //int[] extra = c.readInts(u26-1); //n-1 extra ints. 219 //int u32 = c.readInt(); 220 int[] extra = c.readInts(u26); 221 222 //if(u7!=267) 223 //{ 224 ii = new IntsIndex(c); 225 ifi = new IntsFullIndex(c, ii, u24); 226 //} 227 228 229 /*int u33 = c.readInt(); 197 230 int[] intsIndex = c.readInts(u33);//u32+u33);//u21); 198 231 if(u33!=1) //if there's only one index, I think it ignores these, since they must all be that value. … … 203 236 { 204 237 int dummy=0; 205 } 238 }*/ 206 239 207 240 int dummy=0; 208 241 } 242 public static class IntsFullIndex 243 { 244 int[] values; 245 246 public IntsFullIndex(IBytestream c, IntsIndex index, int count) 247 { 248 if(index.count==0) 249 { 250 values = new int[0]; //no values to put in. 251 } 252 else if(index.count==1) 253 { 254 //only one possible values, so just fill it in. 255 int value = index.indices[0]; 256 values = new int[count]; 257 for(int i=0;i<count;i++) 258 { 259 values[i] = value; 260 } 261 } 262 else 263 { 264 values = c.readInts(count); 265 } 266 } 267 } 268 public static class IntsIndex 269 { 270 int count; 271 int[] indices; 272 273 public IntsIndex(IBytestream c) 274 { 275 count = c.readInt(); 276 indices = c.readInts(count); 277 } 278 } 209 279 public static class huh 210 280 { 281 short u1; 282 short u2; 283 int u3; 284 short u4; 285 int u5; 286 Flt f6; 287 int u7; 288 Flt f8; 289 int u9; 290 int u10; 291 Sixlet s11; 292 211 293 public huh(IBytestream c) 212 294 { 213 short u1 = c.readShort(); 214 short u2 = c.readShort(); 215 int u3 = c.readInt(); 216 short u4 = c.readShort(); 217 int u5 = c.readInt(); 218 Flt f6 = new Flt(c); 219 int u7 = c.readInt(); 220 Flt f8 = new Flt(c); 221 int u9 = c.readInt(); 222 int u10 = c.readInt(); 223 Sixlet s11 = new Sixlet(c); 295 u1 = c.readShort(); 296 u2 = c.readShort(); 297 u3 = c.readInt(); 298 u4 = c.readShort(); 299 u5 = c.readInt(); 300 f6 = new Flt(c); 301 u7 = c.readInt(); 302 f8 = new Flt(c); 303 u9 = c.readInt(); 304 u10 = c.readInt(); 305 s11 = new Sixlet(c); 306 } 307 } 308 public static class repeataround 309 { 310 int xu4; 311 int xu5; 312 int xu6; 313 int xu7; 314 Sixlet xu8; 315 int xu9; 316 repeat r1; 317 int xub3; 318 319 int xxvertcount; 320 Face[] xxfaces; 321 322 public repeataround(IBytestream c) 323 { 324 xu4 = c.readInt(); e.ensure(xu4,0); 325 xu5 = c.readInt(); e.ensure(xu5,18433,18753); 326 xu6 = c.readInt(); e.ensure(xu6,1); 327 xu7 = c.readInt(); e.ensure(xu7,0); 328 xu8 = new Sixlet(c); 329 xu9 = c.readInt(); //e.ensure(xu9,0,2527); 330 r1 = new repeat(c); 331 if(xu5==18753) 332 { 333 xxvertcount = c.readInt(); 334 xxfaces = c.readArray(Face.class, r1.u24); 335 } 336 xub3 = c.readInt(); e.ensure(xub3,0); 337 338 int dummy=0; 224 339 } 225 340 } 226 341 public static class repeat 227 342 { 343 int u22; 344 int u23; 345 Face[] fs; 346 int u24; 347 wha[] whas; 348 228 349 public repeat(IBytestream c) 229 350 { 230 int u22 = c.readInt(); e.ensure(u22,128);231 232 intu23 = c.readInt(); //e.ensure(u23,4);233 Face[]fs = c.readArray(Face.class, u23); //or should this be u23 instead of s2?234 235 intu24 = c.readInt(); //e.ensure(u24,2);236 wha [] whas = c.readArray(wha.class, u24);351 u22 = c.readInt(); e.ensure(u22,128,129); 352 353 u23 = c.readInt(); //e.ensure(u23,4); 354 fs = c.readArray(Face.class, u23); //or should this be u23 instead of s2? 355 356 u24 = c.readInt(); //e.ensure(u24,2); 357 whas = c.readArray(wha.class, u24); 237 358 } 238 359 } 239 360 public static class wha 240 361 { 241 int u1; //tag?242 Flt f2; //normal x243 Flt f3; //normal y362 public int u1; //tag? 363 public Flt f2; //normal x 364 public Flt f3; //normal y 244 365 //int u4; 245 Flt f4; //normal z246 Flt f5; //dot product of normal and vertex.247 int u6; //face vert1248 int u7; //face vert2249 int u8; //face vert3250 Flt f9; //vertex x251 Flt f10; //vertex y252 Flt f11; //vertex z253 Flt f12;366 public Flt f4; //normal z 367 public Flt f5; //dot product of normal and vertex. 368 public int u6; //face vert1 369 public int u7; //face vert2 370 public int u8; //face vert3 371 public Flt f9; //vertex x 372 public Flt f10; //vertex y 373 public Flt f11; //vertex z 374 public Flt f12; 254 375 255 376 public wha(IBytestream c) 256 377 { 257 378 u1 = c.readInt(); 258 f2 = new Flt(c); 259 f3 = new Flt(c); 260 //u4 = c.readInt(); 261 f4 = new Flt(c); 262 f5 = new Flt(c); 263 u6 = c.readInt(); 264 u7 = c.readInt(); 265 u8 = c.readInt(); 266 f9 = new Flt(c); 267 f10 = new Flt(c); 268 f11 = new Flt(c); 269 f12 = new Flt(c); 379 380 //9f,9b,9d,bf, 381 if(u1==159||u1==155||u1==157||u1==191||u1==189||u1==185||u1==153||u1==187) 382 { 383 f2 = new Flt(c); 384 f3 = new Flt(c); 385 //u4 = c.readInt(); 386 f4 = new Flt(c); 387 f5 = new Flt(c); 388 u6 = c.readInt(); 389 u7 = c.readInt(); 390 u8 = c.readInt(); 391 f9 = new Flt(c); 392 f10 = new Flt(c); 393 f11 = new Flt(c); 394 f12 = new Flt(c); 395 } 396 else if(u1==23||u1==21||u1==17||u1==53||u1==55) 397 { 398 f2 = new Flt(c); 399 f3 = new Flt(c); 400 f4 = new Flt(c); 401 f5 = new Flt(c); 402 u6 = c.readInt(); 403 u7 = c.readInt(); 404 u8 = c.readInt(); 405 } 406 else 407 { 408 int dummy=0; 409 } 270 410 } 271 411 } 272 412 public static class Sixlet 273 413 { 274 Flt f1;275 Flt f2;276 Flt f3;277 Flt f4;278 Flt f5;279 Flt f6;414 public Flt f1; 415 public Flt f2; 416 public Flt f3; 417 public Flt f4; 418 public Flt f5; 419 public Flt f6; 280 420 281 421 public Sixlet(IBytestream c) drizzle/DrizzlePrp/src/realmyst/rmcontext.java
r1833 r1843 27 27 { 28 28 //IBytestream in; 29 29 public int curnum; 30 30 /*public rmcontext(IBytestream in2) 31 31 {
