Changeset 1835
- Timestamp:
- 10/30/08 00:06:12 (2 months ago)
- Files:
-
- drizzle/DrizzlePrp/src/automation/myst5Fixes.java (modified) (1 diff)
- drizzle/DrizzlePrp/src/checker (added)
- drizzle/DrizzlePrp/src/checker/nettimer.java (added)
- drizzle/DrizzlePrp/src/gui/Gui.form (modified) (3 diffs)
- drizzle/DrizzlePrp/src/gui/Gui.java (modified) (8 diffs)
- drizzle/DrizzlePrp/src/realmyst/Flagsen.java (added)
- drizzle/DrizzlePrp/src/realmyst/Sdb.java (modified) (10 diffs)
- drizzle/DrizzlePrp/src/realmyst/TaggedObj.java (added)
- drizzle/DrizzlePrp/src/realmyst/Typeid.java (modified) (3 diffs)
- drizzle/DrizzlePrp/src/realmyst/U1.java (modified) (2 diffs)
- drizzle/DrizzlePrp/src/realmyst/X5c3e0f00.java (added)
- drizzle/DrizzlePrp/src/realmyst/info.txt (modified) (1 diff)
- drizzle/DrizzlePrp/src/shared/GuiUtils.java (modified) (2 diffs)
- drizzle/DrizzlePrp/src/uru/moulprp/PlRandomSoundMod.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
drizzle/DrizzlePrp/src/automation/myst5Fixes.java
r1822 r1835 221 221 { 222 222 prp.removeObject(Typeid.plSceneObject, "PlanetariumDoorBlocker"); 223 224 PlRandomSoundMod rsm = prp.findObject("cSfxRndThunder", Typeid.plRandomSoundMod).castTo(); 225 rsm.parent.state = 0; //turn it on 226 rsm.parent.mode = 3; //must disable the kOneCmd 227 rsm.parent.minDelay = Flt.createFromJavaFloat(4); //just picked a number. 228 rsm.parent.maxDelay = Flt.createFromJavaFloat(30); //just picked a number. 229 230 //PlRandomSoundMod rs2 = prp.findObject("cSfxRandomCreaks", Typeid.plRandomSoundMod).castTo(); 231 //rs2.parent.state = 0; 223 232 } 224 233 drizzle/DrizzlePrp/src/gui/Gui.form
r1833 r1835 2483 2483 </Group> 2484 2484 </Group> 2485 <EmptySpace pref="360" max="32767" attributes="0"/> 2485 <EmptySpace max="-2" attributes="0"/> 2486 <Component id="jPanel36" min="-2" max="-2" attributes="0"/> 2487 <EmptySpace pref="55" max="32767" attributes="0"/> 2486 2488 </Group> 2487 2489 </Group> … … 2490 2492 <Group type="103" groupAlignment="0" attributes="0"> 2491 2493 <Group type="102" alignment="0" attributes="0"> 2492 <EmptySpace max="-2" attributes="0"/> 2493 <Component id="jPanel11" min="-2" max="-2" attributes="0"/> 2494 <Group type="103" groupAlignment="0" attributes="0"> 2495 <Group type="102" attributes="0"> 2496 <EmptySpace max="-2" attributes="0"/> 2497 <Component id="jPanel9" min="-2" max="-2" attributes="0"/> 2494 <Group type="103" groupAlignment="1" max="-2" attributes="0"> 2495 <Group type="102" alignment="0" attributes="1"> 2496 <EmptySpace min="-2" pref="132" max="-2" attributes="0"/> 2497 <Component id="jPanel36" max="32767" attributes="0"/> 2498 2498 </Group> 2499 2499 <Group type="102" alignment="0" attributes="0"> 2500 <EmptySpace min="-2" pref="47" max="-2" attributes="0"/> 2501 <Component id="jButton43" min="-2" max="-2" attributes="0"/> 2500 <EmptySpace max="-2" attributes="0"/> 2501 <Component id="jPanel11" min="-2" max="-2" attributes="0"/> 2502 <Group type="103" groupAlignment="0" attributes="0"> 2503 <Group type="102" attributes="0"> 2504 <EmptySpace max="-2" attributes="0"/> 2505 <Component id="jPanel9" min="-2" max="-2" attributes="0"/> 2506 </Group> 2507 <Group type="102" alignment="0" attributes="0"> 2508 <EmptySpace min="-2" pref="47" max="-2" attributes="0"/> 2509 <Component id="jButton43" min="-2" max="-2" attributes="0"/> 2510 </Group> 2511 </Group> 2502 2512 </Group> 2503 2513 </Group> 2504 <EmptySpace pref=" 51" max="32767" attributes="0"/>2514 <EmptySpace pref="47" max="32767" attributes="0"/> 2505 2515 </Group> 2506 2516 </Group> … … 2641 2651 </Events> 2642 2652 </Component> 2653 <Container class="javax.swing.JPanel" name="jPanel36"> 2654 <Properties> 2655 <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 2656 <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> 2657 <EtchetBorder/> 2658 </Border> 2659 </Property> 2660 </Properties> 2661 2662 <Layout> 2663 <DimensionLayout dim="0"> 2664 <Group type="103" groupAlignment="0" attributes="0"> 2665 <Group type="102" attributes="0"> 2666 <Group type="103" groupAlignment="0" attributes="0"> 2667 <Group type="102" alignment="0" attributes="0"> 2668 <EmptySpace min="-2" pref="38" max="-2" attributes="0"/> 2669 <Component id="jButton105" min="-2" max="-2" attributes="0"/> 2670 </Group> 2671 <Group type="102" alignment="0" attributes="0"> 2672 <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> 2673 <Group type="103" groupAlignment="0" attributes="0"> 2674 <Component id="textfieldState28" alignment="0" min="-2" pref="104" max="-2" attributes="0"/> 2675 <Component id="textfieldState27" alignment="0" min="-2" pref="111" max="-2" attributes="0"/> 2676 <Component id="textfieldState26" alignment="0" min="-2" pref="145" max="-2" attributes="0"/> 2677 </Group> 2678 </Group> 2679 </Group> 2680 <EmptySpace pref="129" max="32767" attributes="0"/> 2681 </Group> 2682 </Group> 2683 </DimensionLayout> 2684 <DimensionLayout dim="1"> 2685 <Group type="103" groupAlignment="0" attributes="0"> 2686 <Group type="102" alignment="1" attributes="0"> 2687 <EmptySpace min="-2" pref="31" max="-2" attributes="0"/> 2688 <Component id="textfieldState26" min="-2" max="-2" attributes="0"/> 2689 <EmptySpace type="separate" max="-2" attributes="0"/> 2690 <Component id="textfieldState27" min="-2" max="-2" attributes="0"/> 2691 <EmptySpace type="unrelated" max="-2" attributes="0"/> 2692 <Component id="textfieldState28" min="-2" max="-2" attributes="0"/> 2693 <EmptySpace pref="15" max="32767" attributes="0"/> 2694 <Component id="jButton105" min="-2" max="-2" attributes="0"/> 2695 <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> 2696 </Group> 2697 </Group> 2698 </DimensionLayout> 2699 </Layout> 2700 <SubComponents> 2701 <Component class="javax.swing.JButton" name="jButton105"> 2702 <Properties> 2703 <Property name="text" type="java.lang.String" value="jButton105"/> 2704 </Properties> 2705 <Events> 2706 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton105ActionPerformed"/> 2707 </Events> 2708 </Component> 2709 <Component class="shared.State.TextfieldState" name="textfieldState26"> 2710 <Properties> 2711 <Property name="text" type="java.lang.String" value="textfieldState26"/> 2712 <Property name="name" type="java.lang.String" value="address" noResource="true"/> 2713 </Properties> 2714 </Component> 2715 <Component class="shared.State.TextfieldState" name="textfieldState27"> 2716 <Properties> 2717 <Property name="text" type="java.lang.String" value="30"/> 2718 <Property name="name" type="java.lang.String" value="updateTime" noResource="true"/> 2719 </Properties> 2720 </Component> 2721 <Component class="shared.State.TextfieldState" name="textfieldState28"> 2722 <Properties> 2723 <Property name="text" type="java.lang.String" value="textfieldState28"/> 2724 <Property name="name" type="java.lang.String" value="searchnet" noResource="true"/> 2725 </Properties> 2726 </Component> 2727 </SubComponents> 2728 </Container> 2643 2729 </SubComponents> 2644 2730 </Container> drizzle/DrizzlePrp/src/gui/Gui.java
r1834 r1835 557 557 jTextArea3 = new javax.swing.JTextArea(); 558 558 jButton43 = new javax.swing.JButton(); 559 jPanel36 = new javax.swing.JPanel(); 560 jButton105 = new javax.swing.JButton(); 561 textfieldState26 = new shared.State.TextfieldState(); 562 textfieldState27 = new shared.State.TextfieldState(); 563 textfieldState28 = new shared.State.TextfieldState(); 559 564 jPanel10 = new javax.swing.JPanel(); 560 565 jButton45 = new javax.swing.JButton(); … … 2260 2265 }); 2261 2266 2267 jPanel36.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 2268 2269 jButton105.setText("jButton105"); 2270 jButton105.addActionListener(new java.awt.event.ActionListener() { 2271 public void actionPerformed(java.awt.event.ActionEvent evt) { 2272 jButton105ActionPerformed(evt); 2273 } 2274 }); 2275 2276 textfieldState26.setText("textfieldState26"); 2277 textfieldState26.setName("address"); // NOI18N 2278 2279 textfieldState27.setText("30"); 2280 textfieldState27.setName("updateTime"); // NOI18N 2281 2282 textfieldState28.setText("textfieldState28"); 2283 textfieldState28.setName("searchnet"); // NOI18N 2284 2285 javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36); 2286 jPanel36.setLayout(jPanel36Layout); 2287 jPanel36Layout.setHorizontalGroup( 2288 jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 2289 .addGroup(jPanel36Layout.createSequentialGroup() 2290 .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 2291 .addGroup(jPanel36Layout.createSequentialGroup() 2292 .addGap(38, 38, 38) 2293 .addComponent(jButton105)) 2294 .addGroup(jPanel36Layout.createSequentialGroup() 2295 .addGap(21, 21, 21) 2296 .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 2297 .addComponent(textfieldState28, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE) 2298 .addComponent(textfieldState27, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE) 2299 .addComponent(textfieldState26, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)))) 2300 .addContainerGap(129, Short.MAX_VALUE)) 2301 ); 2302 jPanel36Layout.setVerticalGroup( 2303 jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 2304 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel36Layout.createSequentialGroup() 2305 .addGap(31, 31, 31) 2306 .addComponent(textfieldState26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 2307 .addGap(18, 18, 18) 2308 .addComponent(textfieldState27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 2309 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 2310 .addComponent(textfieldState28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 2311 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE) 2312 .addComponent(jButton105) 2313 .addGap(57, 57, 57)) 2314 ); 2315 2262 2316 javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); 2263 2317 jPanel7.setLayout(jPanel7Layout); … … 2272 2326 .addGap(142, 142, 142) 2273 2327 .addComponent(jButton43))) 2274 .addContainerGap(360, Short.MAX_VALUE)) 2328 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 2329 .addComponent(jPanel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 2330 .addContainerGap(55, Short.MAX_VALUE)) 2275 2331 ); 2276 2332 jPanel7Layout.setVerticalGroup( 2277 2333 jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 2278 2334 .addGroup(jPanel7Layout.createSequentialGroup() 2279 .addContainerGap() 2280 .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 2281 .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 2282 .addGroup(jPanel7Layout.createSequentialGroup() 2283 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 2284 .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 2285 .addGroup(jPanel7Layout.createSequentialGroup() 2286 .addGap(47, 47, 47) 2287 .addComponent(jButton43))) 2288 .addContainerGap(51, Short.MAX_VALUE)) 2335 .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) 2336 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup() 2337 .addGap(132, 132, 132) 2338 .addComponent(jPanel36, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 2339 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup() 2340 .addContainerGap() 2341 .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 2342 .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 2343 .addGroup(jPanel7Layout.createSequentialGroup() 2344 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 2345 .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 2346 .addGroup(jPanel7Layout.createSequentialGroup() 2347 .addGap(47, 47, 47) 2348 .addComponent(jButton43))))) 2349 .addContainerGap(47, Short.MAX_VALUE)) 2289 2350 ); 2290 2351 … … 3901 3962 if(child.getName().toLowerCase().endsWith(".vdb")) 3902 3963 { 3903 int fs = (int)child.length(); 3904 shared.IBytestream bs = shared.SerialBytestream.createFromFile(child); 3905 realmyst.Sdb mdb = new realmyst.Sdb(bs); 3906 int offset = bs.getAbsoluteOffset(); 3907 int bytesleft = bs.getBytesRemaining(); 3908 3909 if (mdb.filesizeMinusHeader!=fs-offset) 3964 try 3910 3965 { 3966 int fs = (int)child.length(); 3967 shared.IBytestream bs = shared.SerialBytestream.createFromFile(child); 3968 realmyst.Sdb mdb = new realmyst.Sdb(bs); 3969 int offset = bs.getAbsoluteOffset(); 3970 int bytesleft = bs.getBytesRemaining(); 3971 3972 if (mdb.filesizeMinusHeader!=fs-offset) 3973 { 3974 int dummy=0; 3975 } 3976 if(bytesleft!=0) 3977 { 3978 int dummy=0; 3979 } 3911 3980 int dummy=0; 3912 3981 } 3913 if(bytesleft!=0)3982 catch(Exception e) 3914 3983 { 3915 int dummy=0;3984 m.warn("Error so skipping file."); 3916 3985 } 3917 int dummy=0;3918 3986 } 3919 3987 } … … 3943 4011 3944 4012 }//GEN-LAST:event_jButton104ActionPerformed 4013 4014 private void jButton105ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton105ActionPerformed 4015 GuiUtils.showTrayIcon("/gui/Pterosaur2b4-16.png"); 4016 String address = this.textfieldState26.getText(); 4017 String timer = this.textfieldState27.getText(); 4018 double timer2 = Double.parseDouble(timer); 4019 String search = this.textfieldState28.getText(); 4020 checker.nettimer.timer(address, timer2, search); 4021 }//GEN-LAST:event_jButton105ActionPerformed 3945 4022 3946 4023 /*class c2 extends javax.swing.DefaultListSelectionModel … … 4011 4088 private javax.swing.JButton jButton103; 4012 4089 private javax.swing.JButton jButton104; 4090 private javax.swing.JButton jButton105; 4013 4091 private javax.swing.JButton jButton11; 4014 4092 private javax.swing.JButton jButton12; … … 4167 4245 private javax.swing.JPanel jPanel34; 4168 4246 private javax.swing.JPanel jPanel35; 4247 private javax.swing.JPanel jPanel36; 4169 4248 private javax.swing.JPanel jPanel4; 4170 4249 private javax.swing.JPanel jPanel5; … … 4222 4301 private shared.State.TextfieldState textfieldState24; 4223 4302 private shared.State.TextfieldState textfieldState25; 4303 private shared.State.TextfieldState textfieldState26; 4304 private shared.State.TextfieldState textfieldState27; 4305 private shared.State.TextfieldState textfieldState28; 4224 4306 private shared.State.TextfieldState textfieldState3; 4225 4307 private shared.State.TextfieldState textfieldState4; drizzle/DrizzlePrp/src/realmyst/Sdb.java
r1834 r1835 58 58 if(u8!=0) 59 59 { 60 m.err("unhandled.");60 throw new uncaughtexception("Unhandled."); 61 61 } 62 62 int count = c.readInt(); //v65 … … 65 65 if(count2!=0) 66 66 { 67 m.err("unhandled.");67 throw new uncaughtexception("Unhandled."); 68 68 } 69 69 int count3 = c.readInt(); //v72 70 70 if(count3!=0) 71 71 { 72 m.err("unhandled.");72 throw new uncaughtexception("Unhandled."); 73 73 } 74 74 else … … 77 77 if(hasThing!=0) 78 78 { 79 m.err("unhandled.");79 throw new uncaughtexception("Unhandled."); 80 80 } 81 81 int count4 = c.readInt(); //v78 82 82 if(count4!=0) 83 83 { 84 m.err("unhandled.");84 throw new uncaughtexception("Unhandled."); 85 85 } 86 86 else … … 90 90 if(u11!=0) 91 91 { 92 m.err("unhandled.");92 throw new uncaughtexception("Unhandled."); 93 93 } 94 94 int count5 = c.readInt(); //v84 95 95 if(count5!=0) 96 96 { 97 m.err("unhandled.");97 throw new uncaughtexception("Unhandled."); 98 98 } 99 99 else … … 102 102 if(count6!=0) 103 103 { 104 m.err("unhandled.");104 throw new uncaughtexception("Unhandled."); 105 105 } 106 106 else … … 109 109 if(count7!=0) 110 110 { 111 m.err("unhandled.");111 throw new uncaughtexception("Unhandled."); 112 112 } 113 113 else … … 116 116 if(count8!=0) 117 117 { 118 m.err("unhandled.");118 throw new uncaughtexception("unhandled."); 119 119 } 120 120 else … … 123 123 if(count9!=0) 124 124 { 125 m.err("unhandled.");125 throw new uncaughtexception("unhandled."); 126 126 } 127 127 else … … 131 131 { 132 132 //m.err("unhandled."); 133 if(true) throw new uncaughtexception("unhandled."); 133 134 U1[] u1s = c.readArray(U1.class, count10); 134 135 } … … 138 139 if(count11!=0) 139 140 { 140 m.err("unhandled.");141 throw new uncaughtexception("unhandled."); 141 142 } 142 143 } drizzle/DrizzlePrp/src/realmyst/Typeid.java
r1834 r1835 6 6 package realmyst; 7 7 8 /** 9 * 10 * @author user 11 */ 8 import shared.*; 9 12 10 public enum Typeid 13 11 { … … 15 13 unknown, 16 14 sdbstart, 17 u1, 15 xbe1f5733, 16 x5c3e0f00, 18 17 ; 19 18 public static pair[] pairs = { 20 19 p(0x9469DF4E, sdbstart), 21 p(0x33571FBE, u1), 20 p(0x33571FBE, xbe1f5733), 21 p(0x000f3e5c, x5c3e0f00), 22 22 }; 23 23 24 24 25 25 public static Typeid read(IBytestream c) 26 { 27 int data = c.readInt(); 28 Typeid result = getType(data); 29 return result; 30 } 26 31 public static boolean has(int i) 27 32 { … … 72 77 } 73 78 } 79 m.warn("Unhandled type in Typeid."); 74 80 return unknown; 75 81 } drizzle/DrizzlePrp/src/realmyst/U1.java
r1834 r1835 26 26 int blockSizeMaybe; 27 27 int sub1; 28 Bstr xsubs; 28 //Bstr xsubs; 29 Flagsen xsubs; 29 30 int sub2; 31 //Flagsen[] subs2; 32 TaggedObj[] subs2; 30 33 31 34 public U1(IBytestream c) … … 38 41 { 39 42 //45a950 block 40 xsubs = new Bstr(c); 43 //xsubs = new Bstr(c); 44 //byte type = c.readByte(); 45 xsubs = new Flagsen(c); 41 46 int dummy=0; 42 47 } 43 48 sub2 = c.readInt(); 49 subs2 = new TaggedObj[sub2]; 44 50 for(int j=0;j<sub2;j++) 45 51 { 46 52 //45a950 block 47 53 //m.err("unhandled"); 48 Bstr subs2 = new Bstr(c); 54 //Bstr subs2 = new Bstr(c); 55 subs2[j] = new TaggedObj(c); 49 56 } 50 57 drizzle/DrizzlePrp/src/realmyst/info.txt
r1833 r1835 1 notes: 2 Perhaps the sdb file structure just needs U1, and the object after it to read up to the number 8. Then we read 5 vectors of a preknown type. 3 1 4 5442a0: 2 5 drizzle/DrizzlePrp/src/shared/GuiUtils.java
r1827 r1835 20 20 import javax.swing.ActionMap; 21 21 import java.io.File; 22 import java.awt.TrayIcon; 23 import java.awt.SystemTray; 22 24 23 25 public class GuiUtils … … 25 27 public static boolean onlyUseASingleJFileChooser = true; 26 28 private static JFileChooser _fc; 29 private static TrayIcon _trayicon; 30 31 public static void DisplayTrayMessage(String caption, String message) 32 { 33 if(_trayicon==null) 34 { 35 m.err("You must have shown the tray icon first."); 36 } 37 else 38 { 39 _trayicon.displayMessage(caption, message, java.awt.TrayIcon.MessageType.NONE); 40 } 41 } 42 43 public static void showTrayIcon(String imgpath) 44 { 45 try{ 46 if(_trayicon!=null) 47 { 48 //m.err("A tray icon has already been shown; doing nothing."); 49 return; 50 } 51 java.awt.SystemTray tray = java.awt.SystemTray.getSystemTray(); 52 //java.awt.Image img = shared.GetResource.getResourceAsImage("/gui/Pterosaur2b4-16.png"); 53 java.awt.Image img = shared.GetResource.getResourceAsImage(imgpath); 54 //java.awt.PopupMenu menu = new java.awt.PopupMenu(); 55 //menu.add(new java.awt.MenuItem("test")); 56 //java.awt.TrayIcon ti = new java.awt.TrayIcon(img,"Drizzle",menu); 57 java.awt.TrayIcon ti = new java.awt.TrayIcon(img); 58 _trayicon = ti; 59 ti.setImageAutoSize(true); 60 tray.add(ti); 61 //ti.displayMessage("caption", "message", java.awt.TrayIcon.MessageType.NONE); 62 }catch(Exception e){ 63 e.printStackTrace(); 64 } 65 } 27 66 28 67 private static JFileChooser getJFileChooser() drizzle/DrizzlePrp/src/uru/moulprp/PlRandomSoundMod.java
r1834 r1835 41 41 Flt u5; 42 42 short u6;*/ 43 PlRandomCommandMod parent;43 public PlRandomCommandMod parent; 44 44 short count; 45 45 subRandomSoundMod[] subs; … … 104 104 { 105 105 PlSingleModifier parent; 106 byte u1;107 byte u2;108 Flt u3;109 Flt u4;106 public byte mode; 107 public byte state; 108 public Flt minDelay; 109 public Flt maxDelay; 110 110 111 111 public PlRandomCommandMod(context c) 112 112 { 113 113 parent = new PlSingleModifier(c); 114 u1= c.readByte();115 u2= c.readByte();116 u3= new Flt(c);117 u4= new Flt(c);114 mode = c.readByte(); 115 state = c.readByte(); 116 minDelay = new Flt(c); 117 maxDelay = new Flt(c); 118 118 } 119 119 … … 121 121 { 122 122 parent.compile(c); 123 c.writeByte( u1);124 c.writeByte( u2);125 u3.compile(c);126 u4.compile(c);123 c.writeByte(mode); 124 c.writeByte(state); 125 minDelay.compile(c); 126 maxDelay.compile(c); 127 127 } 128 128 }
