Browse Source

Initial commit

Chris Cromer 3 years ago
parent
commit
f3b9b474a2
100 changed files with 332 additions and 153 deletions
  1. 28
    0
      Makefile
  2. 6
    0
      dq.c
  3. 45
    28
      pom.xml
  4. 9
    9
      src/com/droidquest/DQ.java
  5. 2
    2
      src/com/droidquest/RoomDisplay.java
  6. 13
    9
      src/com/droidquest/SoundClip.java
  7. 2
    1
      src/com/droidquest/avatars/Player.java
  8. 2
    2
      src/com/droidquest/decorations/Graphix.java
  9. 123
    1
      src/com/droidquest/devices/SmallChip.java
  10. 3
    4
      src/com/droidquest/items/AutoWire.java
  11. 1
    1
      src/com/droidquest/items/SkyGuard.java
  12. 1
    1
      src/com/droidquest/items/SkywayFlyer.java
  13. 2
    2
      src/com/droidquest/items/TrashCollector.java
  14. 4
    2
      src/com/droidquest/levels/Level.java
  15. 2
    2
      src/com/droidquest/levels/MainMenu.java
  16. 43
    43
      src/com/droidquest/levels/RO1.java
  17. 45
    45
      src/com/droidquest/levels/ROTut3.java
  18. 1
    1
      src/com/droidquest/materials/PlayerBlocker.java
  19. 0
    0
      src/main/resources/chips/4NodeL2R.chip
  20. 0
    0
      src/main/resources/chips/4NodeR2L.chip
  21. 0
    0
      src/main/resources/chips/4ORL2R.chip
  22. 0
    0
      src/main/resources/chips/4ORR2L.chip
  23. 0
    0
      src/main/resources/chips/6BitCounter.chip
  24. 0
    0
      src/main/resources/chips/Bus.chip
  25. 0
    0
      src/main/resources/chips/Clock.chip
  26. 0
    0
      src/main/resources/chips/CountToN.chip
  27. 0
    0
      src/main/resources/chips/Delay.chip
  28. 0
    0
      src/main/resources/chips/FullAdder.chip
  29. 0
    0
      src/main/resources/chips/Monomer.chip
  30. 0
    0
      src/main/resources/chips/OneShot.chip
  31. 0
    0
      src/main/resources/chips/RSflipflop.chip
  32. 0
    0
      src/main/resources/chips/Token.chip
  33. 0
    0
      src/main/resources/chips/WallHugger.chip
  34. 0
    0
      src/main/resources/chips/gates.chip
  35. 0
    0
      src/main/resources/chips/old_WallHugger.chip
  36. 0
    0
      src/main/resources/chips/oscillator.chip
  37. 0
    0
      src/main/resources/chips/quarter.chip
  38. 0
    0
      src/main/resources/images/0064.jpg
  39. 0
    0
      src/main/resources/images/0065.jpg
  40. 0
    0
      src/main/resources/images/0066.jpg
  41. 0
    0
      src/main/resources/images/0067.jpg
  42. 0
    0
      src/main/resources/images/0068.jpg
  43. 0
    0
      src/main/resources/images/0069.jpg
  44. 0
    0
      src/main/resources/images/0073.jpg
  45. 0
    0
      src/main/resources/images/0074.jpg
  46. 0
    0
      src/main/resources/images/0075.jpg
  47. 0
    0
      src/main/resources/images/0076.jpg
  48. 0
    0
      src/main/resources/images/0077.jpg
  49. 0
    0
      src/main/resources/images/0078.jpg
  50. 0
    0
      src/main/resources/images/0079.jpg
  51. 0
    0
      src/main/resources/images/0080.jpg
  52. 0
    0
      src/main/resources/images/0081.jpg
  53. 0
    0
      src/main/resources/images/0082.jpg
  54. 0
    0
      src/main/resources/images/0083.jpg
  55. 0
    0
      src/main/resources/images/0084.jpg
  56. 0
    0
      src/main/resources/images/0085.jpg
  57. 0
    0
      src/main/resources/images/0086.jpg
  58. 0
    0
      src/main/resources/images/0087.jpg
  59. 0
    0
      src/main/resources/images/DQlogo.gif
  60. 0
    0
      src/main/resources/images/FFdown.gif
  61. 0
    0
      src/main/resources/images/FFleft.gif
  62. 0
    0
      src/main/resources/images/FFright.gif
  63. 0
    0
      src/main/resources/images/FFup.gif
  64. 0
    0
      src/main/resources/images/blueHorizontal.gif
  65. 0
    0
      src/main/resources/images/blueVertical.gif
  66. 0
    0
      src/main/resources/images/cam0.gif
  67. 0
    0
      src/main/resources/images/cam1.gif
  68. 0
    0
      src/main/resources/images/cam2.gif
  69. 0
    0
      src/main/resources/images/disco0.gif
  70. 0
    0
      src/main/resources/images/disco1.gif
  71. 0
    0
      src/main/resources/images/disco2.gif
  72. 0
    0
      src/main/resources/images/disco3.gif
  73. 0
    0
      src/main/resources/images/disco4.gif
  74. 0
    0
      src/main/resources/images/disco5.gif
  75. 0
    0
      src/main/resources/images/fan0.gif
  76. 0
    0
      src/main/resources/images/fan1.gif
  77. 0
    0
      src/main/resources/images/fan2.gif
  78. 0
    0
      src/main/resources/images/fan3.gif
  79. 0
    0
      src/main/resources/images/field0.jpg
  80. 0
    0
      src/main/resources/images/field1.jpg
  81. 0
    0
      src/main/resources/images/grab0.jpg
  82. 0
    0
      src/main/resources/images/grab1.jpg
  83. 0
    0
      src/main/resources/images/helper0.gif
  84. 0
    0
      src/main/resources/images/helper1.gif
  85. 0
    0
      src/main/resources/images/helper2.gif
  86. 0
    0
      src/main/resources/images/helper3.gif
  87. 0
    0
      src/main/resources/images/helper4.gif
  88. 0
    0
      src/main/resources/images/helper5.gif
  89. 0
    0
      src/main/resources/images/helper6.gif
  90. 0
    0
      src/main/resources/images/helper7.gif
  91. 0
    0
      src/main/resources/images/hold.gif
  92. 0
    0
      src/main/resources/images/junk0.jpg
  93. 0
    0
      src/main/resources/images/junk1.jpg
  94. 0
    0
      src/main/resources/images/junk10.jpg
  95. 0
    0
      src/main/resources/images/junk11.jpg
  96. 0
    0
      src/main/resources/images/junk12.jpg
  97. 0
    0
      src/main/resources/images/junk13.jpg
  98. 0
    0
      src/main/resources/images/junk2.jpg
  99. 0
    0
      src/main/resources/images/junk3.jpg
  100. 0
    0
      src/main/resources/images/junk4.jpg

+ 28
- 0
Makefile View File

@@ -0,0 +1,28 @@
1
+CC = gcc
2
+MV = mvn
3
+
4
+CFLAGS=-Wall -Werror -ggdb
5
+
6
+BIN=DroidQuest
7
+JAR=dq-2.7.jar
8
+
9
+all:
10
+	$(CC) $(CFLAGS) dq.c -o dq.o
11
+	$(CC) $(CFLAGS) dq.c -o $(BIN)
12
+	$(MV) install
13
+
14
+install:
15
+	mkdir -vp /usr/share/DroidQuest/chips
16
+	cp -v src/main/resources/chips/* /usr/share/DroidQuest/chips/
17
+	cp -v target/$(JAR) /usr/share/DroidQuest/$(JAR)
18
+	cp -v $(BIN) /usr/bin/$(BIN)
19
+
20
+uninstall:
21
+	rm -v /usr/share/DroidQuest/chips/*
22
+	rm -v /usr/share/DroidQuest/$(JAR)
23
+	rmdir -v /usr/share/DroidQuest/chips
24
+	rmdir -v /usr/share/DroidQuest
25
+	rm -v /usr/bin/$(BIN)
26
+
27
+clean:
28
+	rm -vR -f *.o *.~ target/classes/ target/maven-archiver target/maven-status

+ 6
- 0
dq.c View File

@@ -0,0 +1,6 @@
1
+#include <stdlib.h>
2
+
3
+int main() {
4
+	system("java -jar /usr/share/DroidQuest/dq-2.7.jar");
5
+	return 0;
6
+}

+ 45
- 28
pom.xml View File

@@ -1,35 +1,52 @@
1 1
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
-    <modelVersion>4.0.0</modelVersion>
2
+		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
+	<modelVersion>4.0.0</modelVersion>
4 4
 
5
-    <groupId>com.droidquest</groupId>
6
-    <artifactId>dq</artifactId>
7
-    <version>1.1-SNAPSHOT</version>
8
-    <packaging>jar</packaging>
5
+	<groupId>com.droidquest</groupId>
6
+	<artifactId>dq</artifactId>
7
+	<version>2.7</version>
8
+	<packaging>jar</packaging>
9 9
 
10
-    <name>DroidQuest</name>
11
-    <url>https://github.com/ThomasFooteDQ/DroidQuest</url>
10
+	<name>DroidQuest</name>
11
+	<url>https://github.com/ThomasFooteDQ/DroidQuest</url>
12 12
 
13
-    <properties>
14
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15
-    </properties>
13
+	<properties>
14
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15
+	</properties>
16 16
 
17
-    <build>
18
-        <sourceDirectory>src</sourceDirectory>
19
-    </build>
17
+	<build>
18
+		<sourceDirectory>src</sourceDirectory>
19
+		<plugins>
20
+			<plugin>
21
+				<!-- Build an executable JAR -->
22
+				<groupId>org.apache.maven.plugins</groupId>
23
+				<artifactId>maven-jar-plugin</artifactId>
24
+				<version>2.4</version>
25
+				<configuration>
26
+					<archive>
27
+						<manifest>
28
+							<addClasspath>true</addClasspath>
29
+							<classpathPrefix>lib/</classpathPrefix>
30
+							<mainClass>com.droidquest.DQ</mainClass>
31
+						</manifest>
32
+					</archive>
33
+				</configuration>
34
+			</plugin>
35
+		</plugins>
36
+	</build>
20 37
 
21
-    <dependencies>
22
-        <!--
23
-        <dependency>
24
-            <groupId>ch.qos.logback</groupId>
25
-            <artifactId>logback-classic</artifactId>
26
-            <version>1.0.13</version>
27
-        </dependency>
28
-        <dependency>
29
-            <groupId>com.google.guava</groupId>
30
-            <artifactId>guava</artifactId>
31
-            <version>16.0</version>
32
-        </dependency>
33
-    -->
34
-    </dependencies>
38
+	<dependencies>
39
+		<!--
40
+		<dependency>
41
+			<groupId>ch.qos.logback</groupId>
42
+			<artifactId>logback-classic</artifactId>
43
+			<version>1.0.13</version>
44
+		</dependency>
45
+		<dependency>
46
+			<groupId>com.google.guava</groupId>
47
+			<artifactId>guava</artifactId>
48
+			<version>16.0</version>
49
+		</dependency>
50
+	-->
51
+	</dependencies>
35 52
 </project>

+ 9
- 9
src/com/droidquest/DQ.java View File

@@ -39,7 +39,7 @@ public class DQ extends JFrame implements ActionListener {
39 39
             }
40 40
         });
41 41
 
42
-        setIconImage(new ImageIcon("images/helper0.gif").getImage());
42
+        setIconImage(new ImageIcon(getClass().getResource("/images/helper0.gif")).getImage());
43 43
 
44 44
         Container contentPane = getContentPane();
45 45
         myRoom = new RoomDisplay(this);
@@ -280,7 +280,7 @@ public class DQ extends JFrame implements ActionListener {
280 280
     public void actionPerformed(ActionEvent e) {
281 281
         if (e.getActionCommand().equals("Save Level")) {
282 282
             FileDialog fd = new FileDialog(this, "Save Level", FileDialog.SAVE);
283
-            fd.setDirectory("ROlevels");
283
+            fd.setDirectory(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels");
284 284
             fd.show();
285 285
             System.out.println("Dialog returned with "
286 286
                     + fd.getDirectory()
@@ -485,16 +485,16 @@ public class DQ extends JFrame implements ActionListener {
485 485
 //            dev.level.items.removeElement(dev);
486 486
 //            break;
487 487
 //    case 2: // Re-summon Device
488
-//            
488
+//
489 489
 //            break;
490 490
 //    case 3: // Move Device
491
-//            
491
+//
492 492
 //            break;
493 493
 //    case 4: // Delete Wire
494
-//            
494
+//
495 495
 //            break;
496 496
 //    case 5: // Remake Wire
497
-//            
497
+//
498 498
 //            break;
499 499
 //  }
500 500
 //  type=TYPE_BLANK;
@@ -513,7 +513,7 @@ public class DQ extends JFrame implements ActionListener {
513 513
 //
514 514
 //Hot cursor makes input port true, but it doesn't show graphically.
515 515
 //Add some way to show how much of a charge a Crystal has.
516
-//Add {CENTER}, {LEFT}, & {RIGHT} to TextBoxes 
516
+//Add {CENTER}, {LEFT}, & {RIGHT} to TextBoxes
517 517
 //Give Rooms an array of Materials that's used instead of the RoomArray matrix.
518 518
 //Make burners & tester put chips on even pixels
519 519
 //
@@ -524,7 +524,7 @@ public class DQ extends JFrame implements ActionListener {
524 524
 //Bus
525 525
 //Clock Chip
526 526
 //Delay
527
-//One Shot Chip 
527
+//One Shot Chip
528 528
 //RS
529 529
 //6 bit Counter
530 530
 //Full Adder
@@ -542,7 +542,7 @@ public class DQ extends JFrame implements ActionListener {
542 542
 //
543 543
 //
544 544
 //JAR file created with this command:
545
-//% jar cmf0 manifest.txt DQ.jar *.class 
545
+//% jar cmf0 manifest.txt DQ.jar *.class
546 546
 //
547 547
 //ZIP file created with these files:
548 548
 //DQ.jar

+ 2
- 2
src/com/droidquest/RoomDisplay.java View File

@@ -445,7 +445,7 @@ public class RoomDisplay extends JPanel {
445 445
     public void SaveLevel(String filename) {
446 446
         System.out.println("Saving level " + filename);
447 447
         try {
448
-            FileOutputStream out = new FileOutputStream(filename);
448
+            FileOutputStream out = new FileOutputStream(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels/" + filename);
449 449
             ObjectOutputStream s = new ObjectOutputStream(out);
450 450
             level.writeObject(s);
451 451
             s.flush();
@@ -471,7 +471,7 @@ public class RoomDisplay extends JPanel {
471 471
 
472 472
         // Add flags for loading Object inventories or running Init()
473 473
         try {
474
-            FileInputStream in = new FileInputStream(filename);
474
+            FileInputStream in = new FileInputStream(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels/" + filename);
475 475
             ObjectInputStream s = new ObjectInputStream(in);
476 476
             level.readObject(s);
477 477
             s.close();

+ 13
- 9
src/com/droidquest/SoundClip.java View File

@@ -5,20 +5,24 @@ import java.applet.AudioClip;
5 5
 import java.net.MalformedURLException;
6 6
 import java.net.URL;
7 7
 
8
+import java.net.URLDecoder;
9
+
8 10
 public class SoundClip {
9 11
     public AudioClip audioClip;
10 12
     private String filename;
11 13
 
12 14
     public SoundClip(String f) {
13 15
         filename = f;
14
-        try {
15
-            URL baseURL = new URL("file:" + System.getProperty("user.dir") + "/sounds/");
16
-            URL soundURL;
17
-            soundURL = new URL(baseURL, filename);
18
-            audioClip = Applet.newAudioClip(soundURL);
19
-        }
20
-        catch (MalformedURLException e) {
21
-            System.err.println(e.getMessage());
22
-        }
16
+		URL url = this.getClass().getProtectionDomain().getCodeSource().getLocation();
17
+		try {
18
+			String jarPath = URLDecoder.decode(url.getFile(), "UTF-8");
19
+			URL baseURL = new URL("jar:file:" + jarPath + "!/sounds/");
20
+			URL soundURL;
21
+			soundURL = new URL(baseURL, filename);
22
+			audioClip = Applet.newAudioClip(soundURL);
23
+		}
24
+		catch(Exception e) {
25
+			System.err.println(e.getMessage());
26
+		}
23 27
     }
24 28
 }

+ 2
- 1
src/com/droidquest/avatars/Player.java View File

@@ -136,7 +136,8 @@ public class Player extends Item implements Avatar {
136 136
                         + fd.getFile());
137 137
                 if (fd.getFile() != null) {
138 138
                     ((SmallChip) carrying).Empty();
139
-                    ((SmallChip) carrying).LoadChip(fd.getDirectory() + fd.getFile());
139
+                    //((SmallChip) carrying).LoadChip(fd.getDirectory() + fd.getFile());
140
+                    ((SmallChip) carrying).LoadChip(fd.getFile(), false);
140 141
                 }
141 142
                 return true;
142 143
             }

+ 2
- 2
src/com/droidquest/decorations/Graphix.java View File

@@ -77,7 +77,7 @@ public class Graphix implements Serializable {
77 77
         int numfiles = filenames.length;
78 78
         icons = new ImageIcon[numfiles];
79 79
         for (int a = 0; a < numfiles; a++) {
80
-            icons[a] = new ImageIcon("images/" + filenames[a]);
80
+            icons[a] = new ImageIcon(getClass().getResource("/images/" + filenames[a]));
81 81
         }
82 82
         icon = icons[0];
83 83
     }
@@ -131,4 +131,4 @@ public class Graphix implements Serializable {
131 131
         }
132 132
     }
133 133
 
134
-}
134
+}

+ 123
- 1
src/com/droidquest/devices/SmallChip.java View File

@@ -12,9 +12,12 @@ import com.droidquest.materials.SmallChipBurner;
12 12
 import javax.swing.*;
13 13
 import java.awt.*;
14 14
 import java.awt.image.BufferedImage;
15
+import java.awt.event.*;
15 16
 import java.io.*;
16 17
 import java.util.Vector;
17 18
 
19
+import java.nio.file.Files;
20
+
18 21
 public class SmallChip extends GenericChip {
19 22
     public int speed;
20 23
 
@@ -231,8 +234,119 @@ public class SmallChip extends GenericChip {
231 234
         }
232 235
     }
233 236
 
234
-    public void LoadChip(String filename) {
237
+    public void LoadChip(String filename, boolean gameChip) {
235 238
         try {
239
+			File file;
240
+			InputStream link;
241
+
242
+			if (!gameChip) {
243
+				filename = System.getProperty("user.home") + "/.DroidQuest/chips/" + filename;
244
+
245
+				/* Create default chips for user */
246
+				file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/");
247
+				if (!file.exists()) {
248
+					file.mkdirs();
249
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/CountToN.chip");
250
+					if (!file.exists()) {
251
+						link = getClass().getResourceAsStream("/chips/CountToN.chip");
252
+						Files.copy(link, file.getAbsoluteFile().toPath());
253
+					}
254
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/gates.chip");
255
+					if (!file.exists()) {
256
+						link = getClass().getResourceAsStream("/chips/gates.chip");
257
+						Files.copy(link, file.getAbsoluteFile().toPath());
258
+					}
259
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/oscillator.chip");
260
+					if (!file.exists()) {
261
+						link = getClass().getResourceAsStream("/chips/oscillator.chip");
262
+						Files.copy(link, file.getAbsoluteFile().toPath());
263
+					}
264
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/WallHugger.chip");
265
+					if (!file.exists()) {
266
+						link = getClass().getResourceAsStream("/chips/WallHugger.chip");
267
+						Files.copy(link, file.getAbsoluteFile().toPath());
268
+					}
269
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/4NodeL2R.chip");
270
+					if (!file.exists()) {
271
+						link = getClass().getResourceAsStream("/chips/4NodeL2R.chip");
272
+						Files.copy(link, file.getAbsoluteFile().toPath());
273
+					}
274
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/4NodeR2L.chip");
275
+					if (!file.exists()) {
276
+						link = getClass().getResourceAsStream("/chips/4NodeR2L.chip");
277
+						Files.copy(link, file.getAbsoluteFile().toPath());
278
+					}
279
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/4ORL2R.chip");
280
+					if (!file.exists()) {
281
+						link = getClass().getResourceAsStream("/chips/4ORL2R.chip");
282
+						Files.copy(link, file.getAbsoluteFile().toPath());
283
+					}
284
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/4ORR2L.chip");
285
+					if (!file.exists()) {
286
+						link = getClass().getResourceAsStream("/chips/4ORR2L.chip");
287
+						Files.copy(link, file.getAbsoluteFile().toPath());
288
+					}
289
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/6BitCounter.chip");
290
+					if (!file.exists()) {
291
+						link = getClass().getResourceAsStream("/chips/6BitCounter.chip");
292
+						Files.copy(link, file.getAbsoluteFile().toPath());
293
+					}
294
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Bus.chip");
295
+					if (!file.exists()) {
296
+						link = getClass().getResourceAsStream("/chips/Bus.chip");
297
+						Files.copy(link, file.getAbsoluteFile().toPath());
298
+					}
299
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Clock.chip");
300
+					if (!file.exists()) {
301
+						link = getClass().getResourceAsStream("/chips/Clock.chip");
302
+						Files.copy(link, file.getAbsoluteFile().toPath());
303
+					}
304
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Delay.chip");
305
+					if (!file.exists()) {
306
+						link = getClass().getResourceAsStream("/chips/Delay.chip");
307
+						Files.copy(link, file.getAbsoluteFile().toPath());
308
+					}
309
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/FullAdder.chip");
310
+					if (!file.exists()) {
311
+						link = getClass().getResourceAsStream("/chips/FullAdder.chip");
312
+						Files.copy(link, file.getAbsoluteFile().toPath());
313
+					}
314
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Monomer.chip");
315
+					if (!file.exists()) {
316
+						link = getClass().getResourceAsStream("/chips/Monomer.chip");
317
+						Files.copy(link, file.getAbsoluteFile().toPath());
318
+					}
319
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/old_WallHugger.chip");
320
+					if (!file.exists()) {
321
+						link = getClass().getResourceAsStream("/chips/old_WallHugger.chip");
322
+						Files.copy(link, file.getAbsoluteFile().toPath());
323
+					}
324
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/OneShot.chip");
325
+					if (!file.exists()) {
326
+						link = getClass().getResourceAsStream("/chips/OneShot.chip");
327
+						Files.copy(link, file.getAbsoluteFile().toPath());
328
+					}
329
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/quarter.chip");
330
+					if (!file.exists()) {
331
+						link = getClass().getResourceAsStream("/chips/quarter.chip");
332
+						Files.copy(link, file.getAbsoluteFile().toPath());
333
+					}
334
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/RSflipflop.chip");
335
+					if (!file.exists()) {
336
+						link = getClass().getResourceAsStream("/chips/RSflipflop.chip");
337
+						Files.copy(link, file.getAbsoluteFile().toPath());
338
+					}
339
+					file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Token.chip");
340
+					if (!file.exists()) {
341
+						link = getClass().getResourceAsStream("/chips/Token.chip");
342
+						Files.copy(link, file.getAbsoluteFile().toPath());
343
+					}
344
+				}
345
+			}
346
+			else {
347
+				filename = "/usr/share/DroidQuest/chips/" + filename;
348
+			}
349
+
236 350
             FileInputStream in = new FileInputStream(filename);
237 351
             ObjectInputStream s = new ObjectInputStream(in);
238 352
 
@@ -367,4 +481,12 @@ public class SmallChip extends GenericChip {
367 481
 
368 482
     }
369 483
 
484
+	public void copyFile(InputStream in, OutputStream out) throws IOException {
485
+		byte[] buffer = new byte[1024];
486
+		int read;
487
+		while((read = in.read(buffer)) != -1){
488
+		  out.write(buffer, 0, read);
489
+		}
490
+	}
491
+
370 492
 }

+ 3
- 4
src/com/droidquest/items/AutoWire.java View File

@@ -1,6 +1,7 @@
1 1
 package com.droidquest.items;
2 2
 
3 3
 import com.droidquest.Room;
4
+import com.droidquest.Wire;
4 5
 import com.droidquest.chipstuff.Port;
5 6
 import com.droidquest.devices.Device;
6 7
 import com.droidquest.devices.PortDevice;
@@ -112,8 +113,7 @@ public class AutoWire extends Item {
112 113
 
113 114
         if (animation == 1) {
114 115
             if (portdevices[0].ports[0].myWire == null) { // Wiring
115
-                portdevices[0].ports[0].type = Port.TYPE_UNDEFINED;
116
-                portdevices[0].ports[0].value = false;
116
+				portdevices[0].ports[0].myWire = new Wire(chip.ports[0], portdevices[0].ports[0]);
117 117
             }
118 118
             else { // Unwiring
119 119
                 portdevices[0].ports[0].myWire.Remove();
@@ -128,8 +128,7 @@ public class AutoWire extends Item {
128 128
         if (animation >= 2 && animation <= 8) {
129 129
             if (portdevices[0].ports[0].myWire != null) { // Wiring
130 130
                 if (portdevices[animation - 1].ports[0].myWire == null) {
131
-                    portdevices[animation - 1].ports[0].type = Port.TYPE_UNDEFINED;
132
-                    portdevices[animation - 1].ports[0].value = false;
131
+                    portdevices[animation - 1].ports[0].myWire = new Wire(chip.ports[animation - 1], portdevices[animation - 1].ports[0]);
133 132
                 }
134 133
             }
135 134
             else { // Unwiring

+ 1
- 1
src/com/droidquest/items/SkyGuard.java View File

@@ -22,7 +22,7 @@ public class SkyGuard extends Item {
22 22
     public void GenerateIcons() {
23 23
         icons = new ImageIcon[5];
24 24
         for (int a = 0; a < 5; a++) {
25
-            icons[a] = new ImageIcon("images/skyguard" + a + ".gif");
25
+            icons[a] = new ImageIcon(getClass().getResource("/images/skyguard" + a + ".gif"));
26 26
         }
27 27
         currentIcon = icons[0].getImage();
28 28
     }

+ 1
- 1
src/com/droidquest/items/SkywayFlyer.java View File

@@ -25,7 +25,7 @@ public class SkywayFlyer extends Item {
25 25
     public void GenerateIcons() {
26 26
         icons = new ImageIcon[filenames.length];
27 27
         for (int a = 0; a < filenames.length; a++) {
28
-            icons[a] = new ImageIcon("images/" + filenames[a]);
28
+            icons[a] = new ImageIcon(getClass().getResource("/images/" + filenames[a]));
29 29
         }
30 30
         currentIcon = icons[0].getImage();
31 31
     }

+ 2
- 2
src/com/droidquest/items/TrashCollector.java View File

@@ -33,8 +33,8 @@ public class TrashCollector extends Item {
33 33
 
34 34
     public void GenerateIcons() {
35 35
         icons = new ImageIcon[2];
36
-        icons[0] = new ImageIcon("images/trashcollector0.gif");
37
-        icons[1] = new ImageIcon("images/trashcollector1.gif");
36
+        icons[0] = new ImageIcon(getClass().getResource("/images/trashcollector0.gif"));
37
+        icons[1] = new ImageIcon(getClass().getResource("/images/trashcollector1.gif"));
38 38
         currentIcon = icons[0].getImage();
39 39
     }
40 40
 

+ 4
- 2
src/com/droidquest/levels/Level.java View File

@@ -68,7 +68,9 @@ public class Level implements ImageObserver, Serializable {
68 68
             BURNSOUND, ENDMUSICSOUND, STARTMUSICSOUND,
69 69
             TELEPORTSOUND, TRANSPORTSOUND
70 70
     };
71
-    public transient boolean cheatmode = true;
71
+    /* Cromer: Disable cheatmode */
72
+    public transient boolean cheatmode = false;
73
+    /* Cromer */
72 74
 
73 75
     Level() {
74 76
         Item.level = this;
@@ -892,7 +894,7 @@ public class Level implements ImageObserver, Serializable {
892 894
             if (item.getClass().toString().endsWith("SmallChip")) {
893 895
                 SmallChip sc = (SmallChip) item;
894 896
                 String chipfilename = "tmp" + (a - orgNumItems) + ".chip";
895
-                sc.LoadChip(chipfilename);
897
+                sc.LoadChip(chipfilename, false);
896 898
                 File f = new File(chipfilename);
897 899
                 f.delete();
898 900
             }

+ 2
- 2
src/com/droidquest/levels/MainMenu.java View File

@@ -267,7 +267,7 @@ public class MainMenu extends Level {
267 267
         player = gameCursor;
268 268
         currentViewer = player;
269 269
 
270
-        File f = new File("ROlevels/");
270
+        File f = new File(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels/");
271 271
         if (!f.exists()) {
272 272
             f.mkdir();
273 273
         }
@@ -301,7 +301,7 @@ public class MainMenu extends Level {
301 301
                 LinkRoomsUpDown(pageIndex, newPageIndex);
302 302
                 pageIndex = newPageIndex;
303 303
             }
304
-            materials.addElement(new Portal("ROlevels/" + files[a], false, false));
304
+            materials.addElement(new Portal(files[a], false, false));
305 305
             int matIndex = materials.size() - 1;
306 306
             int y = 1 + (a % 5) * 2;
307 307
             Room room = rooms.elementAt(pageIndex);

+ 43
- 43
src/com/droidquest/levels/RO1.java View File

@@ -71,7 +71,7 @@ class RO1 extends Level {
71 71
             rooms.addElement(new Room());
72 72
         }
73 73
 
74
-        { // Room  0, Entry point 
74
+        { // Room  0, Entry point
75 75
             Room room = rooms.elementAt(0);
76 76
             room.SetMaterialOutline(0, 0, 19, 11, 1);
77 77
             room.SetMaterialFill(19, 8, 19, 10, 0);
@@ -83,7 +83,7 @@ class RO1 extends Level {
83 83
             room.AddTextBox("This way to Robotropolis", 360, 290, 200);
84 84
             room.AddArrow(559, 11 * 28 + 16, Arrow.DIR_RIGHT, 100, Color.white);
85 85
         }
86
-        { // Room  1, Robots Here 
86
+        { // Room  1, Robots Here
87 87
             Room room = rooms.elementAt(1);
88 88
             room.RoomArray = new int[][]{
89 89
                     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -181,7 +181,7 @@ class RO1 extends Level {
181 181
                 items.addElement(ng);
182 182
                 SmallChip sc = new SmallChip(10 * 28, 6 * 32, orobot.InternalRoom, "2");
183 183
                 items.addElement(sc);
184
-                sc.LoadChip("chips/WallHugger.chip");
184
+                sc.LoadChip("WallHugger.chip", true);
185 185
                 Wire dummy;
186 186
                 dummy = new Wire(rSensor.ports[0], ng.ports[0]);
187 187
                 dummy = new Wire(ng.ports[1], orobot.devices[9].ports[0]); // Antenna
@@ -196,7 +196,7 @@ class RO1 extends Level {
196 196
             }
197 197
             items.addElement(new Key(8 * 28, 8 * 32, room, Color.blue));
198 198
         }
199
-        { // Room  2, Sewer Door 
199
+        { // Room  2, Sewer Door
200 200
             Room room = rooms.elementAt(2);
201 201
             room.RoomArray = new int[][]{
202 202
                     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -215,7 +215,7 @@ class RO1 extends Level {
215 215
             room.AddTextBox("{BIG} The City Sewer", 40, 80, 500);
216 216
             items.addElement(new Sweeper(476, 224, room));
217 217
         }
218
-        { // Room  3, Maze 1 "PR" 
218
+        { // Room  3, Maze 1 "PR"
219 219
             Room room = rooms.elementAt(3);
220 220
             room.RoomArray = new int[][]{
221 221
                     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1},
@@ -234,7 +234,7 @@ class RO1 extends Level {
234 234
             String[] i1 = {"0073.jpg", "0074.jpg"};
235 235
             room.graphix.addElement(new Graphix(i1, 4 * 28 + 14, 5 * 32));
236 236
         }
237
-        { // Room  4, Maze 2 "CG" 
237
+        { // Room  4, Maze 2 "CG"
238 238
             Room room = rooms.elementAt(4);
239 239
             room.RoomArray = new int[][]{
240 240
                     {1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1},
@@ -254,7 +254,7 @@ class RO1 extends Level {
254 254
             room.graphix.addElement(new Graphix(i6, 13 * 28, 4 * 32,
255 255
                     Graphix.BOUNCE, 0, 2, 3 * 16));
256 256
         }
257
-        { // Room  5, Maze 3 "PC" 
257
+        { // Room  5, Maze 3 "PC"
258 258
             Room room = rooms.elementAt(5);
259 259
             room.RoomArray = new int[][]{
260 260
                     {1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -271,7 +271,7 @@ class RO1 extends Level {
271 271
                     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1}
272 272
             };
273 273
         }
274
-        { // Room  6, Maze 4 "RC" 
274
+        { // Room  6, Maze 4 "RC"
275 275
             Room room = rooms.elementAt(6);
276 276
             room.RoomArray = new int[][]{
277 277
                     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1},
@@ -291,7 +291,7 @@ class RO1 extends Level {
291 291
             room.graphix.addElement(new Graphix(i7, 12 * 28, 4 * 32,
292 292
                     Graphix.BOUNCE, 0, 2, 3 * 16));
293 293
         }
294
-        { // Room  7, Maze 5 "MW" 
294
+        { // Room  7, Maze 5 "MW"
295 295
             Room room = rooms.elementAt(7);
296 296
             room.RoomArray = new int[][]{
297 297
                     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1},
@@ -310,7 +310,7 @@ class RO1 extends Level {
310 310
             String[] i2 = {"0086.jpg", "0087.jpg"};
311 311
             room.graphix.addElement(new Graphix(i2, 5 * 28, 2 * 32));
312 312
         }
313
-        { // Room  8, Maze 6 "CIG" 
313
+        { // Room  8, Maze 6 "CIG"
314 314
             Room room = rooms.elementAt(8);
315 315
             room.RoomArray = new int[][]{
316 316
                     {1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -327,7 +327,7 @@ class RO1 extends Level {
327 327
                     {1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1}
328 328
             };
329 329
         }
330
-        { // Room  9, Maze 7 "NH" 
330
+        { // Room  9, Maze 7 "NH"
331 331
             Room room = rooms.elementAt(9);
332 332
             room.RoomArray = new int[][]{
333 333
                     {1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1},
@@ -344,7 +344,7 @@ class RO1 extends Level {
344 344
                     {1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}
345 345
             };
346 346
         }
347
-        { // Room 10, Maze 8 "SG" 
347
+        { // Room 10, Maze 8 "SG"
348 348
             Room room = rooms.elementAt(10);
349 349
             room.RoomArray = new int[][]{
350 350
                     {1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -364,7 +364,7 @@ class RO1 extends Level {
364 364
             room.graphix.addElement(new Graphix(i8, 13 * 28, 10 * 32,
365 365
                     Graphix.BOUNCE, 2, 0, 5 * 14));
366 366
         }
367
-        { // Room 11, Maze Bottom 
367
+        { // Room 11, Maze Bottom
368 368
             Room room = rooms.elementAt(11);
369 369
             room.RoomArray = new int[][]{
370 370
                     {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -382,7 +382,7 @@ class RO1 extends Level {
382 382
             };
383 383
             items.addElement(new ContactSensor(9 * 28, 2 * 32, room, new Token(0, 0, null)));
384 384
         }
385
-        { // Room 12, Top Corridor 1 
385
+        { // Room 12, Top Corridor 1
386 386
             Room room = rooms.elementAt(12);
387 387
             room.RoomArray = new int[][]{
388 388
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -399,7 +399,7 @@ class RO1 extends Level {
399 399
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
400 400
             };
401 401
         }
402
-        { // Room 13, Top Corridor 2 
402
+        { // Room 13, Top Corridor 2
403 403
             Room room = rooms.elementAt(13);
404 404
             room.RoomArray = new int[][]{
405 405
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -416,7 +416,7 @@ class RO1 extends Level {
416 416
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
417 417
             };
418 418
         }
419
-        { // Room 14, Top Corridor Branch 
419
+        { // Room 14, Top Corridor Branch
420 420
             Room room = rooms.elementAt(14);
421 421
             room.RoomArray = new int[][]{
422 422
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -433,7 +433,7 @@ class RO1 extends Level {
433 433
                     {3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}
434 434
             };
435 435
         }
436
-        { // Room 15, Hallway Top Right 
436
+        { // Room 15, Hallway Top Right
437 437
             Room room = rooms.elementAt(15);
438 438
             room.RoomArray = new int[][]{
439 439
                     {3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3},
@@ -450,7 +450,7 @@ class RO1 extends Level {
450 450
                     {3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}
451 451
             };
452 452
         }
453
-        { // Room 16, Hallway Bottom Right 
453
+        { // Room 16, Hallway Bottom Right
454 454
             Room room = rooms.elementAt(16);
455 455
             room.RoomArray = new int[][]{
456 456
                     {3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3},
@@ -467,7 +467,7 @@ class RO1 extends Level {
467 467
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
468 468
             };
469 469
         }
470
-        { // Room 17, Hallway Bottom 
470
+        { // Room 17, Hallway Bottom
471 471
             Room room = rooms.elementAt(17);
472 472
             room.RoomArray = new int[][]{
473 473
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -485,7 +485,7 @@ class RO1 extends Level {
485 485
             };
486 486
             items.addElement(new AmpireBot(10 * 28, 3 * 32, room));
487 487
         }
488
-        { // Room 18, Hallway Bottom Left 
488
+        { // Room 18, Hallway Bottom Left
489 489
             Room room = rooms.elementAt(18);
490 490
             room.RoomArray = new int[][]{
491 491
                     {3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3},
@@ -502,7 +502,7 @@ class RO1 extends Level {
502 502
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
503 503
             };
504 504
         }
505
-        { // Room 19, Hallway Top Left 
505
+        { // Room 19, Hallway Top Left
506 506
             Room room = rooms.elementAt(19);
507 507
             room.RoomArray = new int[][]{
508 508
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -519,7 +519,7 @@ class RO1 extends Level {
519 519
                     {3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}
520 520
             };
521 521
         }
522
-        { // Room 20, Hallway Top 
522
+        { // Room 20, Hallway Top
523 523
             Room room = rooms.elementAt(20);
524 524
             room.RoomArray = new int[][]{
525 525
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -536,7 +536,7 @@ class RO1 extends Level {
536 536
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
537 537
             };
538 538
         }
539
-        { // Room 21, WallHugger Puzzle 
539
+        { // Room 21, WallHugger Puzzle
540 540
             Room room = rooms.elementAt(21);
541 541
             room.RoomArray = new int[][]{
542 542
                     {3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3},
@@ -557,7 +557,7 @@ class RO1 extends Level {
557 557
             int[] protect = {0, 3 * 32, 19 * 28, 11 * 32, 10 * 28, 0};
558 558
             items.addElement(new Sentry(3 * 28, 120, room, pace, protect, false));
559 559
         }
560
-        { // Room 22, Bouncer Puzzle 
560
+        { // Room 22, Bouncer Puzzle
561 561
             Room room = rooms.elementAt(22);
562 562
             room.RoomArray = new int[][]{
563 563
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -578,7 +578,7 @@ class RO1 extends Level {
578 578
             int[] protect = {4 * 28, 0, 19 * 28, 11 * 32, 0, 5 * 32};
579 579
             items.addElement(new Sentry(3 * 28, 94, room, pace, protect, false));
580 580
         }
581
-        { // Room 23, AnteChamber 
581
+        { // Room 23, AnteChamber
582 582
             Room room = rooms.elementAt(23);
583 583
             room.RoomArray = new int[][]{
584 584
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -597,7 +597,7 @@ class RO1 extends Level {
597 597
             room.AddTextBox("Do you have EVERYTHING?",
598 598
                     98, 278, 168);
599 599
         }
600
-        { // Room 24, Directional Token Sensor here 
600
+        { // Room 24, Directional Token Sensor here
601 601
             Room room = rooms.elementAt(24);
602 602
             room.RoomArray = new int[][]{
603 603
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 3, 3},
@@ -617,7 +617,7 @@ class RO1 extends Level {
617 617
                     170, 320, 500);
618 618
             items.addElement(new DirectionalSensor(3 * 28 + 14, 4 * 32, room, new Token(0, 0, null)));
619 619
         }
620
-        { // Room 25, Sewer Grate Top 
620
+        { // Room 25, Sewer Grate Top
621 621
             Room room = rooms.elementAt(25);
622 622
             room.RoomArray = new int[][]{
623 623
                     {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
@@ -637,7 +637,7 @@ class RO1 extends Level {
637 637
                     182, 48, 90);
638 638
             items.addElement(new Sentry3(2 * 28, 64, room));
639 639
         }
640
-        { // Room 26, Sewer Grate Bottom 
640
+        { // Room 26, Sewer Grate Bottom
641 641
             Room room = rooms.elementAt(26);
642 642
             room.RoomArray = new int[][]{
643 643
                     {4, 0, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0, 4},
@@ -662,7 +662,7 @@ class RO1 extends Level {
662 662
             room.AddTextBox("These poor creatures never made it out...Will you???",
663 663
                     84, 224, 500);
664 664
         }
665
-        { // Room 27, 2nd Lock 
665
+        { // Room 27, 2nd Lock
666 666
             Room room = rooms.elementAt(27);
667 667
             room.RoomArray = new int[][]{
668 668
                     {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
@@ -683,7 +683,7 @@ class RO1 extends Level {
683 683
             room.AddTextBox("That was a great job!",
684 684
                     2 * 28, 320, 500);
685 685
         }
686
-        { // Room 28, Portal Chamber 
686
+        { // Room 28, Portal Chamber
687 687
             Room room = rooms.elementAt(28);
688 688
             room.RoomArray = new int[][]{
689 689
                     {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
@@ -704,7 +704,7 @@ class RO1 extends Level {
704 704
             room.AddTextBox("You CAN take it with you (If you hold on tight)....",
705 705
                     336, 256, 224);
706 706
         }
707
-        { // Room 29, Help Screen 
707
+        { // Room 29, Help Screen
708 708
             Room room = rooms.elementAt(29);
709 709
             room.RoomArray = new int[][]{
710 710
                     {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6},
@@ -738,7 +738,7 @@ class RO1 extends Level {
738 738
                     3 * 28, 11 * 32, 500);
739 739
         }
740 740
 
741
-        { // Room 30, Secret Trash-flow 
741
+        { // Room 30, Secret Trash-flow
742 742
             Room room = rooms.elementAt(30);
743 743
             room.RoomArray = new int[][]{
744 744
                     {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -755,7 +755,7 @@ class RO1 extends Level {
755 755
                     {3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3}
756 756
             };
757 757
         }
758
-        { // Room 31, Secret room 
758
+        { // Room 31, Secret room
759 759
             Room room = rooms.elementAt(31);
760 760
             room.RoomArray = new int[][]{
761 761
                     {3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -846,7 +846,7 @@ class RO1 extends Level {
846 846
         items.addElement(gameCursor);
847 847
 
848 848
         SmallChip sc = new SmallChip(0, 0, null, "1");
849
-        sc.LoadChip("chips/CountToN.chip");
849
+        sc.LoadChip("CountToN.chip", true);
850 850
         items.addElement(sc);
851 851
         items.addElement(new RO1Init());
852 852
 
@@ -903,14 +903,14 @@ class RO1Init extends Initializer {
903 903
         }
904 904
 
905 905
         // The Black Crystal and Chip 1 go somewhere in the Maze
906
-        // Room=3, 2,7  
907
-        // Room=4  4,1  
908
-        // Room=5  1,18 
909
-        // Room=6  6,6  
910
-        // Room=7  4,4  
911
-        // Room=8  16,5 
912
-        // Room=9  4,3  
913
-        // Room=10 6,8  
906
+        // Room=3, 2,7
907
+        // Room=4  4,1
908
+        // Room=5  1,18
909
+        // Room=6  6,6
910
+        // Room=7  4,4
911
+        // Room=8  16,5
912
+        // Room=9  4,3
913
+        // Room=10 6,8
914 914
 
915 915
         Item bcrystal = level.FindItem("BlackCrystal");
916 916
         switch (level.random.nextInt(8)) {
@@ -1020,4 +1020,4 @@ class RO1Init extends Initializer {
1020 1020
         }
1021 1021
     }
1022 1022
 
1023
-}
1023
+}

+ 45
- 45
src/com/droidquest/levels/ROTut3.java View File

@@ -19,15 +19,15 @@ class ROTut3 extends Level {
19 19
 
20 20
         // Material 0, Blank
21 21
         materials.addElement(new Material(true, false));
22
-        // Material 1, Green Wall 
22
+        // Material 1, Green Wall
23 23
         materials.addElement(new Material(new Color(0, 255, 0), false, true));
24 24
         // Material 2, Light Blue Wall
25 25
         materials.addElement(new Material(new Color(190, 190, 255), false, true));
26
-        // Material 3, Blue Wall 
26
+        // Material 3, Blue Wall
27 27
         materials.addElement(new Material(new Color(0, 0, 255), false, true));
28
-        // Material 4, LightOrange Wall 
28
+        // Material 4, LightOrange Wall
29 29
         materials.addElement(new Material(new Color(255, 224, 192), false, true));
30
-        // Material 5, Red Wall 
30
+        // Material 5, Red Wall
31 31
         materials.addElement(new Material(new Color(255, 0, 0), false, true));
32 32
         // Material 6, Recharger
33 33
         materials.addElement(new CrystalRecharger());
@@ -54,7 +54,7 @@ class ROTut3 extends Level {
54 54
             rooms.addElement(new Room());
55 55
         }
56 56
 
57
-        { // Room 0, Help Screen 
57
+        { // Room 0, Help Screen
58 58
             Room room = rooms.elementAt(0);
59 59
             room.RoomArray = new int[][]{
60 60
                     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -89,7 +89,7 @@ class ROTut3 extends Level {
89 89
                     6 * 28, 8 * 32, 500);
90 90
             room.AddTextBox("To continue, press RETURN.", 4 * 28, 11 * 32, 500);
91 91
         }
92
-        { // Room 1, Title Screen 
92
+        { // Room 1, Title Screen
93 93
             Room room = rooms.elementAt(1);
94 94
             room.RoomArray = new int[][]{
95 95
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -116,7 +116,7 @@ class ROTut3 extends Level {
116 116
                     2 * 28, 9 * 32, 500);
117 117
             room.AddArrow(559, 7 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
118 118
         }
119
-        { // Room 2, Crossroads 
119
+        { // Room 2, Crossroads
120 120
             Room room = rooms.elementAt(2);
121 121
             room.RoomArray = new int[][]{
122 122
                     {2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 2},
@@ -147,7 +147,7 @@ class ROTut3 extends Level {
147 147
             toolbox = new ToolBox(28, 10 * 32, room);
148 148
             items.addElement(toolbox);
149 149
         }
150
-        { // Room 3, Paths to Paintbrush & Shape Editor 
150
+        { // Room 3, Paths to Paintbrush & Shape Editor
151 151
             Room room = rooms.elementAt(3);
152 152
             room.RoomArray = new int[][]{
153 153
                     {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -167,7 +167,7 @@ class ROTut3 extends Level {
167 167
             room.AddArrow(10 * 28, 0, Arrow.DIR_UP, 28, Color.white);
168 168
             room.AddArrow(559, 6 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
169 169
         }
170
-        { // Room 4, Paintbrush intro 
170
+        { // Room 4, Paintbrush intro
171 171
             Room room = rooms.elementAt(4);
172 172
             room.RoomArray = new int[][]{
173 173
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -293,7 +293,7 @@ class ROTut3 extends Level {
293 293
             };
294 294
             room.editable = true;
295 295
         }
296
-        { // Room 10, Shape Editor intro 
296
+        { // Room 10, Shape Editor intro
297 297
             Room room = rooms.elementAt(10);
298 298
             room.RoomArray = new int[][]{
299 299
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -319,7 +319,7 @@ class ROTut3 extends Level {
319 319
             items.addElement(new Crystal(5 * 28, 8 * 32, room, 100000));
320 320
             items.addElement(new DirectionalSensor(11 * 28, 6 * 32, room, new Crystal(0, 0, null, 0)));
321 321
         }
322
-        { // Room 11, Shape Editor room 
322
+        { // Room 11, Shape Editor room
323 323
             Room room = rooms.elementAt(11);
324 324
             room.RoomArray = new int[][]{
325 325
                     {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
@@ -341,7 +341,7 @@ class ROTut3 extends Level {
341 341
                     2 * 28, 3 * 32, 500);
342 342
             room.AddArrow(559, 6 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
343 343
         }
344
-        { // Room 12, Shape Editor workshop 
344
+        { // Room 12, Shape Editor workshop
345 345
             Room room = rooms.elementAt(12);
346 346
             room.RoomArray = new int[][]{
347 347
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -373,7 +373,7 @@ class ROTut3 extends Level {
373 373
             items.addElement(new Triangle(15 * 28, 4 * 32, room, new Color(255, 128, 0)));
374 374
             items.addElement(new Crystal(17 * 28, 4 * 32, room, 100000));
375 375
         }
376
-        { // Room 13, Prototype Intro 
376
+        { // Room 13, Prototype Intro
377 377
             Room room = rooms.elementAt(13);
378 378
             room.RoomArray = new int[][]{
379 379
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -405,7 +405,7 @@ class ROTut3 extends Level {
405 405
             room.AddArrow(559, 9 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
406 406
             items.addElement(new PrototypeChip(14 * 28, 2 * 32 - 8, room));
407 407
         }
408
-        { // Room 14, Prototype Intro 2 
408
+        { // Room 14, Prototype Intro 2
409 409
             Room room = rooms.elementAt(14);
410 410
             room.RoomArray = new int[][]{
411 411
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -429,7 +429,7 @@ class ROTut3 extends Level {
429 429
                     2 * 28, 8 * 32, 480);
430 430
             room.AddArrow(559, 9 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
431 431
         }
432
-        { // Room 15, Prototype Chip 
432
+        { // Room 15, Prototype Chip
433 433
             Room room = rooms.elementAt(15);
434 434
             room.RoomArray = new int[][]{
435 435
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -464,7 +464,7 @@ class ROTut3 extends Level {
464 464
             wire = new Wire(ng.ports[0], node.ports[2]);
465 465
             wire = new Wire(pc.portdevices[0].ports[0], node.ports[1]);
466 466
         }
467
-        { // Room 16, Antenna 
467
+        { // Room 16, Antenna
468 468
             Room room = rooms.elementAt(16);
469 469
             room.RoomArray = new int[][]{
470 470
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -487,7 +487,7 @@ class ROTut3 extends Level {
487 487
             room.AddArrow(559, 6 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
488 488
             items.addElement(new Antenna(2 * 28, 2 * 32, room, Color.white));
489 489
         }
490
-        { // Room 17, Antenna & SmallChip 
490
+        { // Room 17, Antenna & SmallChip
491 491
             Room room = rooms.elementAt(17);
492 492
             room.RoomArray = new int[][]{
493 493
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -513,9 +513,9 @@ class ROTut3 extends Level {
513 513
             items.addElement(new Antenna(2 * 28, 2 * 32, room, Color.white));
514 514
             SmallChip sc = new SmallChip(4 * 28, 4 * 32, room, "1");
515 515
             items.addElement(sc);
516
-            sc.LoadChip("chips/oscillator.chip");
516
+            sc.LoadChip("oscillator.chip", true);
517 517
         }
518
-        { // Room 18, Burner Intro 
518
+        { // Room 18, Burner Intro
519 519
             Room room = rooms.elementAt(18);
520 520
             room.RoomArray = new int[][]{
521 521
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2},
@@ -542,7 +542,7 @@ class ROTut3 extends Level {
542 542
             room.AddArrow(0, 7 * 32, Arrow.DIR_LEFT, 28, Color.white);
543 543
             room.AddArrow(2 * 28 + 14, 383, Arrow.DIR_DOWN, 28, Color.white);
544 544
         }
545
-        { // Room 19, Burner Room 
545
+        { // Room 19, Burner Room
546 546
             Room room = rooms.elementAt(19);
547 547
             room.RoomArray = new int[][]{
548 548
                     {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
@@ -577,7 +577,7 @@ class ROTut3 extends Level {
577 577
             sc.inBurner = true;
578 578
             items.addElement(new Burner(18 * 28, 10 * 32 + 2, room));
579 579
         }
580
-        { // Room 20, Nesting 
580
+        { // Room 20, Nesting
581 581
             Room room = rooms.elementAt(20);
582 582
             room.RoomArray = new int[][]{
583 583
                     {2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -597,7 +597,7 @@ class ROTut3 extends Level {
597 597
                     4 * 28, 2 * 32, 400);
598 598
             room.AddArrow(0, 6 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
599 599
         }
600
-        { // Room 21, Nesting II 
600
+        { // Room 21, Nesting II
601 601
             Room room = rooms.elementAt(21);
602 602
             room.RoomArray = new int[][]{
603 603
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2},
@@ -624,7 +624,7 @@ class ROTut3 extends Level {
624 624
             room.AddArrow(18 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
625 625
             room.AddArrow(0, 6 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
626 626
         }
627
-        { // Room 22, Nesting III 
627
+        { // Room 22, Nesting III
628 628
             Room room = rooms.elementAt(22);
629 629
             room.RoomArray = new int[][]{
630 630
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -648,7 +648,7 @@ class ROTut3 extends Level {
648 648
                     2 * 28, 9 * 32, 500);
649 649
             room.AddArrow(0, 6 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
650 650
         }
651
-        { // Room 23, Nesting workshop 
651
+        { // Room 23, Nesting workshop
652 652
             Room room = rooms.elementAt(23);
653 653
             room.RoomArray = new int[][]{
654 654
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -680,7 +680,7 @@ class ROTut3 extends Level {
680 680
             items.addElement(new ContactSensor(10 * 28, 5 * 32, robot.InternalRoom,
681 681
                     new Hexagon(0, 0, null, Color.white)));
682 682
         }
683
-        { // Room 24, Wallhugger intro 
683
+        { // Room 24, Wallhugger intro
684 684
             Room room = rooms.elementAt(24);
685 685
             room.RoomArray = new int[][]{
686 686
                     {2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -705,9 +705,9 @@ class ROTut3 extends Level {
705 705
             room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
706 706
             SmallChip sc = new SmallChip(4 * 28, 5 * 32, room, "3");
707 707
             items.addElement(sc);
708
-            sc.LoadChip("chips/WallHugger.chip");
708
+            sc.LoadChip("WallHugger.chip", true);
709 709
         }
710
-        { // Room 25, Wallhugger wiring 
710
+        { // Room 25, Wallhugger wiring
711 711
             Room room = rooms.elementAt(25);
712 712
             room.RoomArray = new int[][]{
713 713
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -768,7 +768,7 @@ class ROTut3 extends Level {
768 768
             room.AddArrow(17 * 28, 383, Arrow.DIR_DOWN, 28, Color.white);
769 769
             room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
770 770
         }
771
-        { // Room 27, Wallhugger maze 
771
+        { // Room 27, Wallhugger maze
772 772
             Room room = rooms.elementAt(27);
773 773
             room.RoomArray = new int[][]{
774 774
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2},
@@ -785,7 +785,7 @@ class ROTut3 extends Level {
785 785
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}
786 786
             };
787 787
         }
788
-        { // Room 28, Chip speed 
788
+        { // Room 28, Chip speed
789 789
             Room room = rooms.elementAt(28);
790 790
             room.RoomArray = new int[][]{
791 791
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -809,7 +809,7 @@ class ROTut3 extends Level {
809 809
                     2 * 28, 8 * 32, 500);
810 810
             room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
811 811
         }
812
-        { // Room 29, Chip talk 
812
+        { // Room 29, Chip talk
813 813
             Room room = rooms.elementAt(29);
814 814
             room.RoomArray = new int[][]{
815 815
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -837,7 +837,7 @@ class ROTut3 extends Level {
837 837
                     3 * 28, 9 * 32, 450);
838 838
             room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
839 839
         }
840
-        { // Room 30, Chip Record 
840
+        { // Room 30, Chip Record
841 841
             Room room = rooms.elementAt(30);
842 842
             room.RoomArray = new int[][]{
843 843
                     {3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -862,9 +862,9 @@ class ROTut3 extends Level {
862 862
             room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
863 863
             SmallChip sc = new SmallChip(2 * 28, 5 * 32, room, "5");
864 864
             items.addElement(sc);
865
-            sc.LoadChip("chips/gates.chip");
865
+            sc.LoadChip("gates.chip", true);
866 866
         }
867
-        { // Room 31, Chip Save 
867
+        { // Room 31, Chip Save
868 868
             Room room = rooms.elementAt(31);
869 869
             room.RoomArray = new int[][]{
870 870
                     {3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -888,7 +888,7 @@ class ROTut3 extends Level {
888 888
                     4 * 28, 8 * 32, 400);
889 889
             room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
890 890
         }
891
-        { // Room 32, Chip Load 
891
+        { // Room 32, Chip Load
892 892
             Room room = rooms.elementAt(32);
893 893
             room.RoomArray = new int[][]{
894 894
                     {3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -912,7 +912,7 @@ class ROTut3 extends Level {
912 912
                     4 * 28, 8 * 32, 400);
913 913
             room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
914 914
         }
915
-        { // Room 33, Exit 
915
+        { // Room 33, Exit
916 916
             Room room = rooms.elementAt(33);
917 917
             room.RoomArray = new int[][]{
918 918
                     {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -937,7 +937,7 @@ class ROTut3 extends Level {
937 937
             room.AddTextBox("Press ? for help or hints.",
938 938
                     2 * 28, 11 * 32, 500);
939 939
         }
940
-        { // Room 34, Paintbrush colors 
940
+        { // Room 34, Paintbrush colors
941 941
             Room room = rooms.elementAt(34);
942 942
             room.RoomArray = new int[][]{
943 943
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -963,7 +963,7 @@ class ROTut3 extends Level {
963 963
                     3 * 28, 9 * 32, 500);
964 964
         }
965 965
 
966
-        { // Room 35, Factory Intro 
966
+        { // Room 35, Factory Intro
967 967
             Room room = rooms.elementAt(35);
968 968
             room.RoomArray = new int[][]{
969 969
                     {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -987,7 +987,7 @@ class ROTut3 extends Level {
987 987
                     2 * 28, 8 * 32, 500);
988 988
             room.AddArrow(11 * 28, 0, Arrow.DIR_UP, 28, Color.white);
989 989
         }
990
-        { // Room 36, Factory 
990
+        { // Room 36, Factory
991 991
             Room room = rooms.elementAt(36);
992 992
             room.RoomArray = new int[][]{
993 993
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -1017,7 +1017,7 @@ class ROTut3 extends Level {
1017 1017
             room.AddTextBox("Return to the Crossroads.",
1018 1018
                     12 * 28, 10 * 32, 200);
1019 1019
         }
1020
-        { // Room 37, Unburning 
1020
+        { // Room 37, Unburning
1021 1021
             Room room = rooms.elementAt(37);
1022 1022
             room.RoomArray = new int[][]{
1023 1023
                     {2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -1041,7 +1041,7 @@ class ROTut3 extends Level {
1041 1041
                     2 * 28, 8 * 32, 500);
1042 1042
             room.AddArrow(2 * 28 + 14, 559, Arrow.DIR_DOWN, 28, Color.white);
1043 1043
         }
1044
-        { // Room 38, ChipTest intro 
1044
+        { // Room 38, ChipTest intro
1045 1045
             Room room = rooms.elementAt(38);
1046 1046
             room.RoomArray = new int[][]{
1047 1047
                     {3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
@@ -1067,7 +1067,7 @@ class ROTut3 extends Level {
1067 1067
                     4 * 28, 10 * 32, 450);
1068 1068
             room.AddArrow(28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
1069 1069
         }
1070
-        { // Room 39, Chip Testing 
1070
+        { // Room 39, Chip Testing
1071 1071
             Room room = rooms.elementAt(39);
1072 1072
             room.RoomArray = new int[][]{
1073 1073
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -1116,7 +1116,7 @@ class ROTut3 extends Level {
1116 1116
             room.AddArrow(3 * 28, 10 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
1117 1117
             room.AddTextBox("Autowirer", 4 * 28, 11 * 32 - 8, 200);
1118 1118
         }
1119
-        { // Room 40, Maze Control 
1119
+        { // Room 40, Maze Control
1120 1120
             Room room = rooms.elementAt(40);
1121 1121
             room.RoomArray = new int[][]{
1122 1122
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -1141,7 +1141,7 @@ class ROTut3 extends Level {
1141 1141
             room.AddTextBox("Try it in the next room.",
1142 1142
                     2 * 28, 11 * 32, 500);
1143 1143
         }
1144
-        { // Room 41, Maze Control 
1144
+        { // Room 41, Maze Control
1145 1145
             Room room = rooms.elementAt(41);
1146 1146
             room.RoomArray = new int[][]{
1147 1147
                     {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
@@ -1207,7 +1207,7 @@ class ROTut3 extends Level {
1207 1207
         LinkRoomsUpDown(5, 6);
1208 1208
 
1209 1209
 
1210
-        { // Paintbrush code comes after Robots are constructed 
1210
+        { // Paintbrush code comes after Robots are constructed
1211 1211
             Room room = rooms.elementAt(4);
1212 1212
             PaintBrush pb = new PaintBrush();
1213 1213
             pb.x = 17 * 28 + 10;
@@ -1232,4 +1232,4 @@ class ROTut3 extends Level {
1232 1232
 
1233 1233
     }
1234 1234
 
1235
-}
1235
+}

+ 1
- 1
src/com/droidquest/materials/PlayerBlocker.java View File

@@ -27,7 +27,7 @@ public class PlayerBlocker extends Material {
27 27
             int numfiles = filenames.length;
28 28
             images = new ImageIcon[numfiles];
29 29
             for (int a = 0; a < filenames.length; a++) {
30
-                images[a] = new ImageIcon("images/" + filenames[a]);
30
+                images[a] = new ImageIcon(getClass().getResource("/images/" + filenames[a]));
31 31
             }
32 32
             icon = images[0];
33 33
         }

chips/4NodeL2R.chip → src/main/resources/chips/4NodeL2R.chip View File


chips/4NodeR2L.chip → src/main/resources/chips/4NodeR2L.chip View File


chips/4ORL2R.chip → src/main/resources/chips/4ORL2R.chip View File


chips/4ORR2L.chip → src/main/resources/chips/4ORR2L.chip View File


chips/6BitCounter.chip → src/main/resources/chips/6BitCounter.chip View File


chips/Bus.chip → src/main/resources/chips/Bus.chip View File


chips/Clock.chip → src/main/resources/chips/Clock.chip View File


chips/CountToN.chip → src/main/resources/chips/CountToN.chip View File


chips/Delay.chip → src/main/resources/chips/Delay.chip View File


chips/FullAdder.chip → src/main/resources/chips/FullAdder.chip View File


chips/Monomer.chip → src/main/resources/chips/Monomer.chip View File


chips/OneShot.chip → src/main/resources/chips/OneShot.chip View File


chips/RSflipflop.chip → src/main/resources/chips/RSflipflop.chip View File


chips/Token.chip → src/main/resources/chips/Token.chip View File


chips/WallHugger.chip → src/main/resources/chips/WallHugger.chip View File


chips/gates.chip → src/main/resources/chips/gates.chip View File


chips/old_WallHugger.chip → src/main/resources/chips/old_WallHugger.chip View File


chips/oscillator.chip → src/main/resources/chips/oscillator.chip View File


chips/quarter.chip → src/main/resources/chips/quarter.chip View File


images/0064.jpg → src/main/resources/images/0064.jpg View File


images/0065.jpg → src/main/resources/images/0065.jpg View File


images/0066.jpg → src/main/resources/images/0066.jpg View File


images/0067.jpg → src/main/resources/images/0067.jpg View File


images/0068.jpg → src/main/resources/images/0068.jpg View File


images/0069.jpg → src/main/resources/images/0069.jpg View File


images/0073.jpg → src/main/resources/images/0073.jpg View File


images/0074.jpg → src/main/resources/images/0074.jpg View File


images/0075.jpg → src/main/resources/images/0075.jpg View File


images/0076.jpg → src/main/resources/images/0076.jpg View File


images/0077.jpg → src/main/resources/images/0077.jpg View File


images/0078.jpg → src/main/resources/images/0078.jpg View File


images/0079.jpg → src/main/resources/images/0079.jpg View File


images/0080.jpg → src/main/resources/images/0080.jpg View File


images/0081.jpg → src/main/resources/images/0081.jpg View File


images/0082.jpg → src/main/resources/images/0082.jpg View File


images/0083.jpg → src/main/resources/images/0083.jpg View File


images/0084.jpg → src/main/resources/images/0084.jpg View File


images/0085.jpg → src/main/resources/images/0085.jpg View File


images/0086.jpg → src/main/resources/images/0086.jpg View File


images/0087.jpg → src/main/resources/images/0087.jpg View File


images/DQlogo.gif → src/main/resources/images/DQlogo.gif View File


images/FFdown.gif → src/main/resources/images/FFdown.gif View File


images/FFleft.gif → src/main/resources/images/FFleft.gif View File


images/FFright.gif → src/main/resources/images/FFright.gif View File


images/FFup.gif → src/main/resources/images/FFup.gif View File


images/blueHorizontal.gif → src/main/resources/images/blueHorizontal.gif View File


images/blueVertical.gif → src/main/resources/images/blueVertical.gif View File


images/cam0.gif → src/main/resources/images/cam0.gif View File


images/cam1.gif → src/main/resources/images/cam1.gif View File


images/cam2.gif → src/main/resources/images/cam2.gif View File


images/disco0.gif → src/main/resources/images/disco0.gif View File


images/disco1.gif → src/main/resources/images/disco1.gif View File


images/disco2.gif → src/main/resources/images/disco2.gif View File


images/disco3.gif → src/main/resources/images/disco3.gif View File


images/disco4.gif → src/main/resources/images/disco4.gif View File


images/disco5.gif → src/main/resources/images/disco5.gif View File


images/fan0.gif → src/main/resources/images/fan0.gif View File


images/fan1.gif → src/main/resources/images/fan1.gif View File


images/fan2.gif → src/main/resources/images/fan2.gif View File


images/fan3.gif → src/main/resources/images/fan3.gif View File


images/field0.jpg → src/main/resources/images/field0.jpg View File


images/field1.jpg → src/main/resources/images/field1.jpg View File


images/grab0.jpg → src/main/resources/images/grab0.jpg View File


images/grab1.jpg → src/main/resources/images/grab1.jpg View File


images/helper0.gif → src/main/resources/images/helper0.gif View File


images/helper1.gif → src/main/resources/images/helper1.gif View File


images/helper2.gif → src/main/resources/images/helper2.gif View File


images/helper3.gif → src/main/resources/images/helper3.gif View File


images/helper4.gif → src/main/resources/images/helper4.gif View File


images/helper5.gif → src/main/resources/images/helper5.gif View File


images/helper6.gif → src/main/resources/images/helper6.gif View File


images/helper7.gif → src/main/resources/images/helper7.gif View File


images/hold.gif → src/main/resources/images/hold.gif View File


images/junk0.jpg → src/main/resources/images/junk0.jpg View File


images/junk1.jpg → src/main/resources/images/junk1.jpg View File


images/junk10.jpg → src/main/resources/images/junk10.jpg View File


images/junk11.jpg → src/main/resources/images/junk11.jpg View File


images/junk12.jpg → src/main/resources/images/junk12.jpg View File


images/junk13.jpg → src/main/resources/images/junk13.jpg View File


images/junk2.jpg → src/main/resources/images/junk2.jpg View File


images/junk3.jpg → src/main/resources/images/junk3.jpg View File


images/junk4.jpg → src/main/resources/images/junk4.jpg View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save