Browse Source

Initial commit

tags/2.7
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 @@
CC = gcc
MV = mvn

CFLAGS=-Wall -Werror -ggdb

BIN=DroidQuest
JAR=dq-2.7.jar

all:
$(CC) $(CFLAGS) dq.c -o dq.o
$(CC) $(CFLAGS) dq.c -o $(BIN)
$(MV) install

install:
mkdir -vp /usr/share/DroidQuest/chips
cp -v src/main/resources/chips/* /usr/share/DroidQuest/chips/
cp -v target/$(JAR) /usr/share/DroidQuest/$(JAR)
cp -v $(BIN) /usr/bin/$(BIN)

uninstall:
rm -v /usr/share/DroidQuest/chips/*
rm -v /usr/share/DroidQuest/$(JAR)
rmdir -v /usr/share/DroidQuest/chips
rmdir -v /usr/share/DroidQuest
rm -v /usr/bin/$(BIN)

clean:
rm -vR -f *.o *.~ target/classes/ target/maven-archiver target/maven-status

+ 6
- 0
dq.c View File

@@ -0,0 +1,6 @@
#include <stdlib.h>

int main() {
system("java -jar /usr/share/DroidQuest/dq-2.7.jar");
return 0;
}

+ 45
- 28
pom.xml View File

@@ -1,35 +1,52 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.droidquest</groupId>
<artifactId>dq</artifactId>
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<groupId>com.droidquest</groupId>
<artifactId>dq</artifactId>
<version>2.7</version>
<packaging>jar</packaging>

<name>DroidQuest</name>
<url>https://github.com/ThomasFooteDQ/DroidQuest</url>
<name>DroidQuest</name>
<url>https://github.com/ThomasFooteDQ/DroidQuest</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<sourceDirectory>src</sourceDirectory>
</build>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.droidquest.DQ</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<!--
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>16.0</version>
</dependency>
-->
</dependencies>
<dependencies>
<!--
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>16.0</version>
</dependency>
-->
</dependencies>
</project>

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

@@ -39,7 +39,7 @@ public class DQ extends JFrame implements ActionListener {
}
});

setIconImage(new ImageIcon("images/helper0.gif").getImage());
setIconImage(new ImageIcon(getClass().getResource("/images/helper0.gif")).getImage());

Container contentPane = getContentPane();
myRoom = new RoomDisplay(this);
@@ -280,7 +280,7 @@ public class DQ extends JFrame implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals("Save Level")) {
FileDialog fd = new FileDialog(this, "Save Level", FileDialog.SAVE);
fd.setDirectory("ROlevels");
fd.setDirectory(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels");
fd.show();
System.out.println("Dialog returned with "
+ fd.getDirectory()
@@ -485,16 +485,16 @@ public class DQ extends JFrame implements ActionListener {
// dev.level.items.removeElement(dev);
// break;
// case 2: // Re-summon Device
//
//
// break;
// case 3: // Move Device
//
//
// break;
// case 4: // Delete Wire
//
//
// break;
// case 5: // Remake Wire
//
//
// break;
// }
// type=TYPE_BLANK;
@@ -513,7 +513,7 @@ public class DQ extends JFrame implements ActionListener {
//
//Hot cursor makes input port true, but it doesn't show graphically.
//Add some way to show how much of a charge a Crystal has.
//Add {CENTER}, {LEFT}, & {RIGHT} to TextBoxes
//Add {CENTER}, {LEFT}, & {RIGHT} to TextBoxes
//Give Rooms an array of Materials that's used instead of the RoomArray matrix.
//Make burners & tester put chips on even pixels
//
@@ -524,7 +524,7 @@ public class DQ extends JFrame implements ActionListener {
//Bus
//Clock Chip
//Delay
//One Shot Chip
//One Shot Chip
//RS
//6 bit Counter
//Full Adder
@@ -542,7 +542,7 @@ public class DQ extends JFrame implements ActionListener {
//
//
//JAR file created with this command:
//% jar cmf0 manifest.txt DQ.jar *.class
//% jar cmf0 manifest.txt DQ.jar *.class
//
//ZIP file created with these files:
//DQ.jar

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

@@ -445,7 +445,7 @@ public class RoomDisplay extends JPanel {
public void SaveLevel(String filename) {
System.out.println("Saving level " + filename);
try {
FileOutputStream out = new FileOutputStream(filename);
FileOutputStream out = new FileOutputStream(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels/" + filename);
ObjectOutputStream s = new ObjectOutputStream(out);
level.writeObject(s);
s.flush();
@@ -471,7 +471,7 @@ public class RoomDisplay extends JPanel {

// Add flags for loading Object inventories or running Init()
try {
FileInputStream in = new FileInputStream(filename);
FileInputStream in = new FileInputStream(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels/" + filename);
ObjectInputStream s = new ObjectInputStream(in);
level.readObject(s);
s.close();

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

@@ -5,20 +5,24 @@ import java.applet.AudioClip;
import java.net.MalformedURLException;
import java.net.URL;

import java.net.URLDecoder;

public class SoundClip {
public AudioClip audioClip;
private String filename;

public SoundClip(String f) {
filename = f;
try {
URL baseURL = new URL("file:" + System.getProperty("user.dir") + "/sounds/");
URL soundURL;
soundURL = new URL(baseURL, filename);
audioClip = Applet.newAudioClip(soundURL);
}
catch (MalformedURLException e) {
System.err.println(e.getMessage());
}
URL url = this.getClass().getProtectionDomain().getCodeSource().getLocation();
try {
String jarPath = URLDecoder.decode(url.getFile(), "UTF-8");
URL baseURL = new URL("jar:file:" + jarPath + "!/sounds/");
URL soundURL;
soundURL = new URL(baseURL, filename);
audioClip = Applet.newAudioClip(soundURL);
}
catch(Exception e) {
System.err.println(e.getMessage());
}
}
}

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

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

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

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

}
}

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

@@ -12,9 +12,12 @@ import com.droidquest.materials.SmallChipBurner;
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.awt.event.*;
import java.io.*;
import java.util.Vector;

import java.nio.file.Files;

public class SmallChip extends GenericChip {
public int speed;

@@ -231,8 +234,119 @@ public class SmallChip extends GenericChip {
}
}

public void LoadChip(String filename) {
public void LoadChip(String filename, boolean gameChip) {
try {
File file;
InputStream link;

if (!gameChip) {
filename = System.getProperty("user.home") + "/.DroidQuest/chips/" + filename;

/* Create default chips for user */
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/");
if (!file.exists()) {
file.mkdirs();
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/CountToN.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/CountToN.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/gates.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/gates.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/oscillator.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/oscillator.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/WallHugger.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/WallHugger.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/4NodeL2R.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/4NodeL2R.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/4NodeR2L.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/4NodeR2L.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/4ORL2R.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/4ORL2R.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/4ORR2L.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/4ORR2L.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/6BitCounter.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/6BitCounter.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Bus.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/Bus.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Clock.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/Clock.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Delay.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/Delay.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/FullAdder.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/FullAdder.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Monomer.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/Monomer.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/old_WallHugger.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/old_WallHugger.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/OneShot.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/OneShot.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/quarter.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/quarter.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/RSflipflop.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/RSflipflop.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
file = new File(System.getProperty("user.home") + "/.DroidQuest/chips/Token.chip");
if (!file.exists()) {
link = getClass().getResourceAsStream("/chips/Token.chip");
Files.copy(link, file.getAbsoluteFile().toPath());
}
}
}
else {
filename = "/usr/share/DroidQuest/chips/" + filename;
}

FileInputStream in = new FileInputStream(filename);
ObjectInputStream s = new ObjectInputStream(in);

@@ -367,4 +481,12 @@ public class SmallChip extends GenericChip {

}

public void copyFile(InputStream in, OutputStream out) throws IOException {
byte[] buffer = new byte[1024];
int read;
while((read = in.read(buffer)) != -1){
out.write(buffer, 0, read);
}
}

}

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

@@ -1,6 +1,7 @@
package com.droidquest.items;

import com.droidquest.Room;
import com.droidquest.Wire;
import com.droidquest.chipstuff.Port;
import com.droidquest.devices.Device;
import com.droidquest.devices.PortDevice;
@@ -112,8 +113,7 @@ public class AutoWire extends Item {

if (animation == 1) {
if (portdevices[0].ports[0].myWire == null) { // Wiring
portdevices[0].ports[0].type = Port.TYPE_UNDEFINED;
portdevices[0].ports[0].value = false;
portdevices[0].ports[0].myWire = new Wire(chip.ports[0], portdevices[0].ports[0]);
}
else { // Unwiring
portdevices[0].ports[0].myWire.Remove();
@@ -128,8 +128,7 @@ public class AutoWire extends Item {
if (animation >= 2 && animation <= 8) {
if (portdevices[0].ports[0].myWire != null) { // Wiring
if (portdevices[animation - 1].ports[0].myWire == null) {
portdevices[animation - 1].ports[0].type = Port.TYPE_UNDEFINED;
portdevices[animation - 1].ports[0].value = false;
portdevices[animation - 1].ports[0].myWire = new Wire(chip.ports[animation - 1], portdevices[animation - 1].ports[0]);
}
}
else { // Unwiring

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

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

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

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

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

@@ -33,8 +33,8 @@ public class TrashCollector extends Item {

public void GenerateIcons() {
icons = new ImageIcon[2];
icons[0] = new ImageIcon("images/trashcollector0.gif");
icons[1] = new ImageIcon("images/trashcollector1.gif");
icons[0] = new ImageIcon(getClass().getResource("/images/trashcollector0.gif"));
icons[1] = new ImageIcon(getClass().getResource("/images/trashcollector1.gif"));
currentIcon = icons[0].getImage();
}


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

@@ -68,7 +68,9 @@ public class Level implements ImageObserver, Serializable {
BURNSOUND, ENDMUSICSOUND, STARTMUSICSOUND,
TELEPORTSOUND, TRANSPORTSOUND
};
public transient boolean cheatmode = true;
/* Cromer: Disable cheatmode */
public transient boolean cheatmode = false;
/* Cromer */

Level() {
Item.level = this;
@@ -892,7 +894,7 @@ public class Level implements ImageObserver, Serializable {
if (item.getClass().toString().endsWith("SmallChip")) {
SmallChip sc = (SmallChip) item;
String chipfilename = "tmp" + (a - orgNumItems) + ".chip";
sc.LoadChip(chipfilename);
sc.LoadChip(chipfilename, false);
File f = new File(chipfilename);
f.delete();
}

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

@@ -267,7 +267,7 @@ public class MainMenu extends Level {
player = gameCursor;
currentViewer = player;

File f = new File("ROlevels/");
File f = new File(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels/");
if (!f.exists()) {
f.mkdir();
}
@@ -301,7 +301,7 @@ public class MainMenu extends Level {
LinkRoomsUpDown(pageIndex, newPageIndex);
pageIndex = newPageIndex;
}
materials.addElement(new Portal("ROlevels/" + files[a], false, false));
materials.addElement(new Portal(files[a], false, false));
int matIndex = materials.size() - 1;
int y = 1 + (a % 5) * 2;
Room room = rooms.elementAt(pageIndex);

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

@@ -71,7 +71,7 @@ class RO1 extends Level {
rooms.addElement(new Room());
}

{ // Room 0, Entry point
{ // Room 0, Entry point
Room room = rooms.elementAt(0);
room.SetMaterialOutline(0, 0, 19, 11, 1);
room.SetMaterialFill(19, 8, 19, 10, 0);
@@ -83,7 +83,7 @@ class RO1 extends Level {
room.AddTextBox("This way to Robotropolis", 360, 290, 200);
room.AddArrow(559, 11 * 28 + 16, Arrow.DIR_RIGHT, 100, Color.white);
}
{ // Room 1, Robots Here
{ // Room 1, Robots Here
Room room = rooms.elementAt(1);
room.RoomArray = new int[][]{
{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 {
items.addElement(ng);
SmallChip sc = new SmallChip(10 * 28, 6 * 32, orobot.InternalRoom, "2");
items.addElement(sc);
sc.LoadChip("chips/WallHugger.chip");
sc.LoadChip("WallHugger.chip", true);
Wire dummy;
dummy = new Wire(rSensor.ports[0], ng.ports[0]);
dummy = new Wire(ng.ports[1], orobot.devices[9].ports[0]); // Antenna
@@ -196,7 +196,7 @@ class RO1 extends Level {
}
items.addElement(new Key(8 * 28, 8 * 32, room, Color.blue));
}
{ // Room 2, Sewer Door
{ // Room 2, Sewer Door
Room room = rooms.elementAt(2);
room.RoomArray = new int[][]{
{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 {
room.AddTextBox("{BIG} The City Sewer", 40, 80, 500);
items.addElement(new Sweeper(476, 224, room));
}
{ // Room 3, Maze 1 "PR"
{ // Room 3, Maze 1 "PR"
Room room = rooms.elementAt(3);
room.RoomArray = new int[][]{
{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 {
String[] i1 = {"0073.jpg", "0074.jpg"};
room.graphix.addElement(new Graphix(i1, 4 * 28 + 14, 5 * 32));
}
{ // Room 4, Maze 2 "CG"
{ // Room 4, Maze 2 "CG"
Room room = rooms.elementAt(4);
room.RoomArray = new int[][]{
{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 {
room.graphix.addElement(new Graphix(i6, 13 * 28, 4 * 32,
Graphix.BOUNCE, 0, 2, 3 * 16));
}
{ // Room 5, Maze 3 "PC"
{ // Room 5, Maze 3 "PC"
Room room = rooms.elementAt(5);
room.RoomArray = new int[][]{
{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 {
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1}
};
}
{ // Room 6, Maze 4 "RC"
{ // Room 6, Maze 4 "RC"
Room room = rooms.elementAt(6);
room.RoomArray = new int[][]{
{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 {
room.graphix.addElement(new Graphix(i7, 12 * 28, 4 * 32,
Graphix.BOUNCE, 0, 2, 3 * 16));
}
{ // Room 7, Maze 5 "MW"
{ // Room 7, Maze 5 "MW"
Room room = rooms.elementAt(7);
room.RoomArray = new int[][]{
{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 {
String[] i2 = {"0086.jpg", "0087.jpg"};
room.graphix.addElement(new Graphix(i2, 5 * 28, 2 * 32));
}
{ // Room 8, Maze 6 "CIG"
{ // Room 8, Maze 6 "CIG"
Room room = rooms.elementAt(8);
room.RoomArray = new int[][]{
{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 {
{1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1}
};
}
{ // Room 9, Maze 7 "NH"
{ // Room 9, Maze 7 "NH"
Room room = rooms.elementAt(9);
room.RoomArray = new int[][]{
{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 {
{1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}
};
}
{ // Room 10, Maze 8 "SG"
{ // Room 10, Maze 8 "SG"
Room room = rooms.elementAt(10);
room.RoomArray = new int[][]{
{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 {
room.graphix.addElement(new Graphix(i8, 13 * 28, 10 * 32,
Graphix.BOUNCE, 2, 0, 5 * 14));
}
{ // Room 11, Maze Bottom
{ // Room 11, Maze Bottom
Room room = rooms.elementAt(11);
room.RoomArray = new int[][]{
{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 {
};
items.addElement(new ContactSensor(9 * 28, 2 * 32, room, new Token(0, 0, null)));
}
{ // Room 12, Top Corridor 1
{ // Room 12, Top Corridor 1
Room room = rooms.elementAt(12);
room.RoomArray = new int[][]{
{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 {
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
};
}
{ // Room 13, Top Corridor 2
{ // Room 13, Top Corridor 2
Room room = rooms.elementAt(13);
room.RoomArray = new int[][]{
{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 {
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
};
}
{ // Room 14, Top Corridor Branch
{ // Room 14, Top Corridor Branch
Room room = rooms.elementAt(14);
room.RoomArray = new int[][]{
{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 {
{3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}
};
}
{ // Room 15, Hallway Top Right
{ // Room 15, Hallway Top Right
Room room = rooms.elementAt(15);
room.RoomArray = new int[][]{
{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 {
{3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}
};
}
{ // Room 16, Hallway Bottom Right
{ // Room 16, Hallway Bottom Right
Room room = rooms.elementAt(16);
room.RoomArray = new int[][]{
{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 {
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
};
}
{ // Room 17, Hallway Bottom
{ // Room 17, Hallway Bottom
Room room = rooms.elementAt(17);
room.RoomArray = new int[][]{
{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 {
};
items.addElement(new AmpireBot(10 * 28, 3 * 32, room));
}
{ // Room 18, Hallway Bottom Left
{ // Room 18, Hallway Bottom Left
Room room = rooms.elementAt(18);
room.RoomArray = new int[][]{
{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 {
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
};
}
{ // Room 19, Hallway Top Left
{ // Room 19, Hallway Top Left
Room room = rooms.elementAt(19);
room.RoomArray = new int[][]{
{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 {
{3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}
};
}
{ // Room 20, Hallway Top
{ // Room 20, Hallway Top
Room room = rooms.elementAt(20);
room.RoomArray = new int[][]{
{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 {
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}
};
}
{ // Room 21, WallHugger Puzzle
{ // Room 21, WallHugger Puzzle
Room room = rooms.elementAt(21);
room.RoomArray = new int[][]{
{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 {
int[] protect = {0, 3 * 32, 19 * 28, 11 * 32, 10 * 28, 0};
items.addElement(new Sentry(3 * 28, 120, room, pace, protect, false));
}
{ // Room 22, Bouncer Puzzle
{ // Room 22, Bouncer Puzzle
Room room = rooms.elementAt(22);
room.RoomArray = new int[][]{
{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 {
int[] protect = {4 * 28, 0, 19 * 28, 11 * 32, 0, 5 * 32};
items.addElement(new Sentry(3 * 28, 94, room, pace, protect, false));
}
{ // Room 23, AnteChamber
{ // Room 23, AnteChamber
Room room = rooms.elementAt(23);
room.RoomArray = new int[][]{
{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 {
room.AddTextBox("Do you have EVERYTHING?",
98, 278, 168);
}
{ // Room 24, Directional Token Sensor here
{ // Room 24, Directional Token Sensor here
Room room = rooms.elementAt(24);
room.RoomArray = new int[][]{
{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 {
170, 320, 500);
items.addElement(new DirectionalSensor(3 * 28 + 14, 4 * 32, room, new Token(0, 0, null)));
}
{ // Room 25, Sewer Grate Top
{ // Room 25, Sewer Grate Top
Room room = rooms.elementAt(25);
room.RoomArray = new int[][]{
{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 {
182, 48, 90);
items.addElement(new Sentry3(2 * 28, 64, room));
}
{ // Room 26, Sewer Grate Bottom
{ // Room 26, Sewer Grate Bottom
Room room = rooms.elementAt(26);
room.RoomArray = new int[][]{
{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 {
room.AddTextBox("These poor creatures never made it out...Will you???",
84, 224, 500);
}
{ // Room 27, 2nd Lock
{ // Room 27, 2nd Lock
Room room = rooms.elementAt(27);
room.RoomArray = new int[][]{
{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 {
room.AddTextBox("That was a great job!",
2 * 28, 320, 500);
}
{ // Room 28, Portal Chamber
{ // Room 28, Portal Chamber
Room room = rooms.elementAt(28);
room.RoomArray = new int[][]{
{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 {
room.AddTextBox("You CAN take it with you (If you hold on tight)....",
336, 256, 224);
}
{ // Room 29, Help Screen
{ // Room 29, Help Screen
Room room = rooms.elementAt(29);
room.RoomArray = new int[][]{
{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 {
3 * 28, 11 * 32, 500);
}

{ // Room 30, Secret Trash-flow
{ // Room 30, Secret Trash-flow
Room room = rooms.elementAt(30);
room.RoomArray = new int[][]{
{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 {
{3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3}
};
}
{ // Room 31, Secret room
{ // Room 31, Secret room
Room room = rooms.elementAt(31);
room.RoomArray = new int[][]{
{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 {
items.addElement(gameCursor);

SmallChip sc = new SmallChip(0, 0, null, "1");
sc.LoadChip("chips/CountToN.chip");
sc.LoadChip("CountToN.chip", true);
items.addElement(sc);
items.addElement(new RO1Init());

@@ -903,14 +903,14 @@ class RO1Init extends Initializer {
}

// The Black Crystal and Chip 1 go somewhere in the Maze
// Room=3, 2,7
// Room=4 4,1
// Room=5 1,18
// Room=6 6,6
// Room=7 4,4
// Room=8 16,5
// Room=9 4,3
// Room=10 6,8
// Room=3, 2,7
// Room=4 4,1
// Room=5 1,18
// Room=6 6,6
// Room=7 4,4
// Room=8 16,5
// Room=9 4,3
// Room=10 6,8

Item bcrystal = level.FindItem("BlackCrystal");
switch (level.random.nextInt(8)) {
@@ -1020,4 +1020,4 @@ class RO1Init extends Initializer {
}
}

}
}

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

@@ -19,15 +19,15 @@ class ROTut3 extends Level {

// Material 0, Blank
materials.addElement(new Material(true, false));
// Material 1, Green Wall
// Material 1, Green Wall
materials.addElement(new Material(new Color(0, 255, 0), false, true));
// Material 2, Light Blue Wall
materials.addElement(new Material(new Color(190, 190, 255), false, true));
// Material 3, Blue Wall
// Material 3, Blue Wall
materials.addElement(new Material(new Color(0, 0, 255), false, true));
// Material 4, LightOrange Wall
// Material 4, LightOrange Wall
materials.addElement(new Material(new Color(255, 224, 192), false, true));
// Material 5, Red Wall
// Material 5, Red Wall
materials.addElement(new Material(new Color(255, 0, 0), false, true));
// Material 6, Recharger
materials.addElement(new CrystalRecharger());
@@ -54,7 +54,7 @@ class ROTut3 extends Level {
rooms.addElement(new Room());
}

{ // Room 0, Help Screen
{ // Room 0, Help Screen
Room room = rooms.elementAt(0);
room.RoomArray = new int[][]{
{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 {
6 * 28, 8 * 32, 500);
room.AddTextBox("To continue, press RETURN.", 4 * 28, 11 * 32, 500);
}
{ // Room 1, Title Screen
{ // Room 1, Title Screen
Room room = rooms.elementAt(1);
room.RoomArray = new int[][]{
{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 {
2 * 28, 9 * 32, 500);
room.AddArrow(559, 7 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
}
{ // Room 2, Crossroads
{ // Room 2, Crossroads
Room room = rooms.elementAt(2);
room.RoomArray = new int[][]{
{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 {
toolbox = new ToolBox(28, 10 * 32, room);
items.addElement(toolbox);
}
{ // Room 3, Paths to Paintbrush & Shape Editor
{ // Room 3, Paths to Paintbrush & Shape Editor
Room room = rooms.elementAt(3);
room.RoomArray = new int[][]{
{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 {
room.AddArrow(10 * 28, 0, Arrow.DIR_UP, 28, Color.white);
room.AddArrow(559, 6 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
}
{ // Room 4, Paintbrush intro
{ // Room 4, Paintbrush intro
Room room = rooms.elementAt(4);
room.RoomArray = new int[][]{
{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 {
};
room.editable = true;
}
{ // Room 10, Shape Editor intro
{ // Room 10, Shape Editor intro
Room room = rooms.elementAt(10);
room.RoomArray = new int[][]{
{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 {
items.addElement(new Crystal(5 * 28, 8 * 32, room, 100000));
items.addElement(new DirectionalSensor(11 * 28, 6 * 32, room, new Crystal(0, 0, null, 0)));
}
{ // Room 11, Shape Editor room
{ // Room 11, Shape Editor room
Room room = rooms.elementAt(11);
room.RoomArray = new int[][]{
{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 {
2 * 28, 3 * 32, 500);
room.AddArrow(559, 6 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
}
{ // Room 12, Shape Editor workshop
{ // Room 12, Shape Editor workshop
Room room = rooms.elementAt(12);
room.RoomArray = new int[][]{
{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 {
items.addElement(new Triangle(15 * 28, 4 * 32, room, new Color(255, 128, 0)));
items.addElement(new Crystal(17 * 28, 4 * 32, room, 100000));
}
{ // Room 13, Prototype Intro
{ // Room 13, Prototype Intro
Room room = rooms.elementAt(13);
room.RoomArray = new int[][]{
{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 {
room.AddArrow(559, 9 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
items.addElement(new PrototypeChip(14 * 28, 2 * 32 - 8, room));
}
{ // Room 14, Prototype Intro 2
{ // Room 14, Prototype Intro 2
Room room = rooms.elementAt(14);
room.RoomArray = new int[][]{
{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 {
2 * 28, 8 * 32, 480);
room.AddArrow(559, 9 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
}
{ // Room 15, Prototype Chip
{ // Room 15, Prototype Chip
Room room = rooms.elementAt(15);
room.RoomArray = new int[][]{
{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 {
wire = new Wire(ng.ports[0], node.ports[2]);
wire = new Wire(pc.portdevices[0].ports[0], node.ports[1]);
}
{ // Room 16, Antenna
{ // Room 16, Antenna
Room room = rooms.elementAt(16);
room.RoomArray = new int[][]{
{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 {
room.AddArrow(559, 6 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
items.addElement(new Antenna(2 * 28, 2 * 32, room, Color.white));
}
{ // Room 17, Antenna & SmallChip
{ // Room 17, Antenna & SmallChip
Room room = rooms.elementAt(17);
room.RoomArray = new int[][]{
{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 {
items.addElement(new Antenna(2 * 28, 2 * 32, room, Color.white));
SmallChip sc = new SmallChip(4 * 28, 4 * 32, room, "1");
items.addElement(sc);
sc.LoadChip("chips/oscillator.chip");
sc.LoadChip("oscillator.chip", true);
}
{ // Room 18, Burner Intro
{ // Room 18, Burner Intro
Room room = rooms.elementAt(18);
room.RoomArray = new int[][]{
{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 {
room.AddArrow(0, 7 * 32, Arrow.DIR_LEFT, 28, Color.white);
room.AddArrow(2 * 28 + 14, 383, Arrow.DIR_DOWN, 28, Color.white);
}
{ // Room 19, Burner Room
{ // Room 19, Burner Room
Room room = rooms.elementAt(19);
room.RoomArray = new int[][]{
{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 {
sc.inBurner = true;
items.addElement(new Burner(18 * 28, 10 * 32 + 2, room));
}
{ // Room 20, Nesting
{ // Room 20, Nesting
Room room = rooms.elementAt(20);
room.RoomArray = new int[][]{
{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 {
4 * 28, 2 * 32, 400);
room.AddArrow(0, 6 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
}
{ // Room 21, Nesting II
{ // Room 21, Nesting II
Room room = rooms.elementAt(21);
room.RoomArray = new int[][]{
{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 {
room.AddArrow(18 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
room.AddArrow(0, 6 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
}
{ // Room 22, Nesting III
{ // Room 22, Nesting III
Room room = rooms.elementAt(22);
room.RoomArray = new int[][]{
{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 {
2 * 28, 9 * 32, 500);
room.AddArrow(0, 6 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
}
{ // Room 23, Nesting workshop
{ // Room 23, Nesting workshop
Room room = rooms.elementAt(23);
room.RoomArray = new int[][]{
{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 {
items.addElement(new ContactSensor(10 * 28, 5 * 32, robot.InternalRoom,
new Hexagon(0, 0, null, Color.white)));
}
{ // Room 24, Wallhugger intro
{ // Room 24, Wallhugger intro
Room room = rooms.elementAt(24);
room.RoomArray = new int[][]{
{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 {
room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
SmallChip sc = new SmallChip(4 * 28, 5 * 32, room, "3");
items.addElement(sc);
sc.LoadChip("chips/WallHugger.chip");
sc.LoadChip("WallHugger.chip", true);
}
{ // Room 25, Wallhugger wiring
{ // Room 25, Wallhugger wiring
Room room = rooms.elementAt(25);
room.RoomArray = new int[][]{
{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 {
room.AddArrow(17 * 28, 383, Arrow.DIR_DOWN, 28, Color.white);
room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
}
{ // Room 27, Wallhugger maze
{ // Room 27, Wallhugger maze
Room room = rooms.elementAt(27);
room.RoomArray = new int[][]{
{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 {
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}
};
}
{ // Room 28, Chip speed
{ // Room 28, Chip speed
Room room = rooms.elementAt(28);
room.RoomArray = new int[][]{
{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 {
2 * 28, 8 * 32, 500);
room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
}
{ // Room 29, Chip talk
{ // Room 29, Chip talk
Room room = rooms.elementAt(29);
room.RoomArray = new int[][]{
{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 {
3 * 28, 9 * 32, 450);
room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
}
{ // Room 30, Chip Record
{ // Room 30, Chip Record
Room room = rooms.elementAt(30);
room.RoomArray = new int[][]{
{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 {
room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
SmallChip sc = new SmallChip(2 * 28, 5 * 32, room, "5");
items.addElement(sc);
sc.LoadChip("chips/gates.chip");
sc.LoadChip("gates.chip", true);
}
{ // Room 31, Chip Save
{ // Room 31, Chip Save
Room room = rooms.elementAt(31);
room.RoomArray = new int[][]{
{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 {
4 * 28, 8 * 32, 400);
room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
}
{ // Room 32, Chip Load
{ // Room 32, Chip Load
Room room = rooms.elementAt(32);
room.RoomArray = new int[][]{
{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 {
4 * 28, 8 * 32, 400);
room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
}
{ // Room 33, Exit
{ // Room 33, Exit
Room room = rooms.elementAt(33);
room.RoomArray = new int[][]{
{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 {
room.AddTextBox("Press ? for help or hints.",
2 * 28, 11 * 32, 500);
}
{ // Room 34, Paintbrush colors
{ // Room 34, Paintbrush colors
Room room = rooms.elementAt(34);
room.RoomArray = new int[][]{
{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 {
3 * 28, 9 * 32, 500);
}

{ // Room 35, Factory Intro
{ // Room 35, Factory Intro
Room room = rooms.elementAt(35);
room.RoomArray = new int[][]{
{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 {
2 * 28, 8 * 32, 500);
room.AddArrow(11 * 28, 0, Arrow.DIR_UP, 28, Color.white);
}
{ // Room 36, Factory
{ // Room 36, Factory
Room room = rooms.elementAt(36);
room.RoomArray = new int[][]{
{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 {
room.AddTextBox("Return to the Crossroads.",
12 * 28, 10 * 32, 200);
}
{ // Room 37, Unburning
{ // Room 37, Unburning
Room room = rooms.elementAt(37);
room.RoomArray = new int[][]{
{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 {
2 * 28, 8 * 32, 500);
room.AddArrow(2 * 28 + 14, 559, Arrow.DIR_DOWN, 28, Color.white);
}
{ // Room 38, ChipTest intro
{ // Room 38, ChipTest intro
Room room = rooms.elementAt(38);
room.RoomArray = new int[][]{
{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 {
4 * 28, 10 * 32, 450);
room.AddArrow(28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
}
{ // Room 39, Chip Testing
{ // Room 39, Chip Testing
Room room = rooms.elementAt(39);
room.RoomArray = new int[][]{
{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 {
room.AddArrow(3 * 28, 10 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
room.AddTextBox("Autowirer", 4 * 28, 11 * 32 - 8, 200);
}
{ // Room 40, Maze Control
{ // Room 40, Maze Control
Room room = rooms.elementAt(40);
room.RoomArray = new int[][]{
{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 {
room.AddTextBox("Try it in the next room.",
2 * 28, 11 * 32, 500);
}
{ // Room 41, Maze Control
{ // Room 41, Maze Control
Room room = rooms.elementAt(41);
room.RoomArray = new int[][]{
{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 {
LinkRoomsUpDown(5, 6);


{ // Paintbrush code comes after Robots are constructed
{ // Paintbrush code comes after Robots are constructed
Room room = rooms.elementAt(4);
PaintBrush pb = new PaintBrush();
pb.x = 17 * 28 + 10;
@@ -1232,4 +1232,4 @@ class ROTut3 extends Level {

}

}
}

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

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

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