Initial commit

This commit is contained in:
Chris Cromer 2015-11-24 14:59:27 -03:00
parent 70c43df686
commit f3b9b474a2
157 changed files with 332 additions and 153 deletions

28
Makefile Normal file
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
dq.c Normal file
View File

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

73
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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<groupId>com.droidquest</groupId> <groupId>com.droidquest</groupId>
<artifactId>dq</artifactId> <artifactId>dq</artifactId>
<version>1.1-SNAPSHOT</version> <version>2.7</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>DroidQuest</name> <name>DroidQuest</name>
<url>https://github.com/ThomasFooteDQ/DroidQuest</url> <url>https://github.com/ThomasFooteDQ/DroidQuest</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<build> <build>
<sourceDirectory>src</sourceDirectory> <sourceDirectory>src</sourceDirectory>
</build> <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> <dependencies>
<!-- <!--
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>1.0.13</version> <version>1.0.13</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>16.0</version> <version>16.0</version>
</dependency> </dependency>
--> -->
</dependencies> </dependencies>
</project> </project>

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(); Container contentPane = getContentPane();
myRoom = new RoomDisplay(this); myRoom = new RoomDisplay(this);
@ -280,7 +280,7 @@ public class DQ extends JFrame implements ActionListener {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals("Save Level")) { if (e.getActionCommand().equals("Save Level")) {
FileDialog fd = new FileDialog(this, "Save Level", FileDialog.SAVE); FileDialog fd = new FileDialog(this, "Save Level", FileDialog.SAVE);
fd.setDirectory("ROlevels"); fd.setDirectory(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels");
fd.show(); fd.show();
System.out.println("Dialog returned with " System.out.println("Dialog returned with "
+ fd.getDirectory() + fd.getDirectory()
@ -485,16 +485,16 @@ public class DQ extends JFrame implements ActionListener {
// dev.level.items.removeElement(dev); // dev.level.items.removeElement(dev);
// break; // break;
// case 2: // Re-summon Device // case 2: // Re-summon Device
// //
// break; // break;
// case 3: // Move Device // case 3: // Move Device
// //
// break; // break;
// case 4: // Delete Wire // case 4: // Delete Wire
// //
// break; // break;
// case 5: // Remake Wire // case 5: // Remake Wire
// //
// break; // break;
// } // }
// type=TYPE_BLANK; // 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. //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 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. //Give Rooms an array of Materials that's used instead of the RoomArray matrix.
//Make burners & tester put chips on even pixels //Make burners & tester put chips on even pixels
// //
@ -524,7 +524,7 @@ public class DQ extends JFrame implements ActionListener {
//Bus //Bus
//Clock Chip //Clock Chip
//Delay //Delay
//One Shot Chip //One Shot Chip
//RS //RS
//6 bit Counter //6 bit Counter
//Full Adder //Full Adder
@ -542,7 +542,7 @@ public class DQ extends JFrame implements ActionListener {
// //
// //
//JAR file created with this command: //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: //ZIP file created with these files:
//DQ.jar //DQ.jar

View File

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

View File

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

View File

@ -136,7 +136,8 @@ public class Player extends Item implements Avatar {
+ fd.getFile()); + fd.getFile());
if (fd.getFile() != null) { if (fd.getFile() != null) {
((SmallChip) carrying).Empty(); ((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; return true;
} }

View File

@ -77,7 +77,7 @@ public class Graphix implements Serializable {
int numfiles = filenames.length; int numfiles = filenames.length;
icons = new ImageIcon[numfiles]; icons = new ImageIcon[numfiles];
for (int a = 0; a < numfiles; a++) { 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]; icon = icons[0];
} }
@ -131,4 +131,4 @@ public class Graphix implements Serializable {
} }
} }
} }

View File

@ -12,9 +12,12 @@ import com.droidquest.materials.SmallChipBurner;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.awt.event.*;
import java.io.*; import java.io.*;
import java.util.Vector; import java.util.Vector;
import java.nio.file.Files;
public class SmallChip extends GenericChip { public class SmallChip extends GenericChip {
public int speed; 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 { 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); FileInputStream in = new FileInputStream(filename);
ObjectInputStream s = new ObjectInputStream(in); 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);
}
}
} }

View File

@ -1,6 +1,7 @@
package com.droidquest.items; package com.droidquest.items;
import com.droidquest.Room; import com.droidquest.Room;
import com.droidquest.Wire;
import com.droidquest.chipstuff.Port; import com.droidquest.chipstuff.Port;
import com.droidquest.devices.Device; import com.droidquest.devices.Device;
import com.droidquest.devices.PortDevice; import com.droidquest.devices.PortDevice;
@ -112,8 +113,7 @@ public class AutoWire extends Item {
if (animation == 1) { if (animation == 1) {
if (portdevices[0].ports[0].myWire == null) { // Wiring if (portdevices[0].ports[0].myWire == null) { // Wiring
portdevices[0].ports[0].type = Port.TYPE_UNDEFINED; portdevices[0].ports[0].myWire = new Wire(chip.ports[0], portdevices[0].ports[0]);
portdevices[0].ports[0].value = false;
} }
else { // Unwiring else { // Unwiring
portdevices[0].ports[0].myWire.Remove(); portdevices[0].ports[0].myWire.Remove();
@ -128,8 +128,7 @@ public class AutoWire extends Item {
if (animation >= 2 && animation <= 8) { if (animation >= 2 && animation <= 8) {
if (portdevices[0].ports[0].myWire != null) { // Wiring if (portdevices[0].ports[0].myWire != null) { // Wiring
if (portdevices[animation - 1].ports[0].myWire == null) { if (portdevices[animation - 1].ports[0].myWire == null) {
portdevices[animation - 1].ports[0].type = Port.TYPE_UNDEFINED; portdevices[animation - 1].ports[0].myWire = new Wire(chip.ports[animation - 1], portdevices[animation - 1].ports[0]);
portdevices[animation - 1].ports[0].value = false;
} }
} }
else { // Unwiring else { // Unwiring

View File

@ -22,7 +22,7 @@ public class SkyGuard extends Item {
public void GenerateIcons() { public void GenerateIcons() {
icons = new ImageIcon[5]; icons = new ImageIcon[5];
for (int a = 0; a < 5; a++) { 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(); currentIcon = icons[0].getImage();
} }

View File

@ -25,7 +25,7 @@ public class SkywayFlyer extends Item {
public void GenerateIcons() { public void GenerateIcons() {
icons = new ImageIcon[filenames.length]; icons = new ImageIcon[filenames.length];
for (int a = 0; a < filenames.length; a++) { 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(); currentIcon = icons[0].getImage();
} }

View File

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

View File

@ -68,7 +68,9 @@ public class Level implements ImageObserver, Serializable {
BURNSOUND, ENDMUSICSOUND, STARTMUSICSOUND, BURNSOUND, ENDMUSICSOUND, STARTMUSICSOUND,
TELEPORTSOUND, TRANSPORTSOUND TELEPORTSOUND, TRANSPORTSOUND
}; };
public transient boolean cheatmode = true; /* Cromer: Disable cheatmode */
public transient boolean cheatmode = false;
/* Cromer */
Level() { Level() {
Item.level = this; Item.level = this;
@ -892,7 +894,7 @@ public class Level implements ImageObserver, Serializable {
if (item.getClass().toString().endsWith("SmallChip")) { if (item.getClass().toString().endsWith("SmallChip")) {
SmallChip sc = (SmallChip) item; SmallChip sc = (SmallChip) item;
String chipfilename = "tmp" + (a - orgNumItems) + ".chip"; String chipfilename = "tmp" + (a - orgNumItems) + ".chip";
sc.LoadChip(chipfilename); sc.LoadChip(chipfilename, false);
File f = new File(chipfilename); File f = new File(chipfilename);
f.delete(); f.delete();
} }

View File

@ -267,7 +267,7 @@ public class MainMenu extends Level {
player = gameCursor; player = gameCursor;
currentViewer = player; currentViewer = player;
File f = new File("ROlevels/"); File f = new File(System.getProperty("user.home") + "/.DroidQuest/" + "ROlevels/");
if (!f.exists()) { if (!f.exists()) {
f.mkdir(); f.mkdir();
} }
@ -301,7 +301,7 @@ public class MainMenu extends Level {
LinkRoomsUpDown(pageIndex, newPageIndex); LinkRoomsUpDown(pageIndex, newPageIndex);
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 matIndex = materials.size() - 1;
int y = 1 + (a % 5) * 2; int y = 1 + (a % 5) * 2;
Room room = rooms.elementAt(pageIndex); Room room = rooms.elementAt(pageIndex);

View File

@ -71,7 +71,7 @@ class RO1 extends Level {
rooms.addElement(new Room()); rooms.addElement(new Room());
} }
{ // Room 0, Entry point { // Room 0, Entry point
Room room = rooms.elementAt(0); Room room = rooms.elementAt(0);
room.SetMaterialOutline(0, 0, 19, 11, 1); room.SetMaterialOutline(0, 0, 19, 11, 1);
room.SetMaterialFill(19, 8, 19, 10, 0); 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.AddTextBox("This way to Robotropolis", 360, 290, 200);
room.AddArrow(559, 11 * 28 + 16, Arrow.DIR_RIGHT, 100, Color.white); 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 room = rooms.elementAt(1);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {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); items.addElement(ng);
SmallChip sc = new SmallChip(10 * 28, 6 * 32, orobot.InternalRoom, "2"); SmallChip sc = new SmallChip(10 * 28, 6 * 32, orobot.InternalRoom, "2");
items.addElement(sc); items.addElement(sc);
sc.LoadChip("chips/WallHugger.chip"); sc.LoadChip("WallHugger.chip", true);
Wire dummy; Wire dummy;
dummy = new Wire(rSensor.ports[0], ng.ports[0]); dummy = new Wire(rSensor.ports[0], ng.ports[0]);
dummy = new Wire(ng.ports[1], orobot.devices[9].ports[0]); // Antenna 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)); 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 room = rooms.elementAt(2);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {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); room.AddTextBox("{BIG} The City Sewer", 40, 80, 500);
items.addElement(new Sweeper(476, 224, room)); items.addElement(new Sweeper(476, 224, room));
} }
{ // Room 3, Maze 1 "PR" { // Room 3, Maze 1 "PR"
Room room = rooms.elementAt(3); Room room = rooms.elementAt(3);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1}, {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"}; String[] i1 = {"0073.jpg", "0074.jpg"};
room.graphix.addElement(new Graphix(i1, 4 * 28 + 14, 5 * 32)); 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 room = rooms.elementAt(4);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1}, {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, room.graphix.addElement(new Graphix(i6, 13 * 28, 4 * 32,
Graphix.BOUNCE, 0, 2, 3 * 16)); Graphix.BOUNCE, 0, 2, 3 * 16));
} }
{ // Room 5, Maze 3 "PC" { // Room 5, Maze 3 "PC"
Room room = rooms.elementAt(5); Room room = rooms.elementAt(5);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {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} {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 room = rooms.elementAt(6);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1}, {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, room.graphix.addElement(new Graphix(i7, 12 * 28, 4 * 32,
Graphix.BOUNCE, 0, 2, 3 * 16)); Graphix.BOUNCE, 0, 2, 3 * 16));
} }
{ // Room 7, Maze 5 "MW" { // Room 7, Maze 5 "MW"
Room room = rooms.elementAt(7); Room room = rooms.elementAt(7);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1}, {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"}; String[] i2 = {"0086.jpg", "0087.jpg"};
room.graphix.addElement(new Graphix(i2, 5 * 28, 2 * 32)); 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 room = rooms.elementAt(8);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, {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} {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 room = rooms.elementAt(9);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1}, {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} {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 room = rooms.elementAt(10);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {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, room.graphix.addElement(new Graphix(i8, 13 * 28, 10 * 32,
Graphix.BOUNCE, 2, 0, 5 * 14)); Graphix.BOUNCE, 2, 0, 5 * 14));
} }
{ // Room 11, Maze Bottom { // Room 11, Maze Bottom
Room room = rooms.elementAt(11); Room room = rooms.elementAt(11);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3}, {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))); 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 room = rooms.elementAt(12);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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} {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 room = rooms.elementAt(13);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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} {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 room = rooms.elementAt(14);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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} {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 room = rooms.elementAt(15);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}, {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} {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 room = rooms.elementAt(16);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}, {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} {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 room = rooms.elementAt(17);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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)); 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 room = rooms.elementAt(18);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}, {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} {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 room = rooms.elementAt(19);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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} {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 room = rooms.elementAt(20);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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} {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 room = rooms.elementAt(21);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3}, {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}; int[] protect = {0, 3 * 32, 19 * 28, 11 * 32, 10 * 28, 0};
items.addElement(new Sentry(3 * 28, 120, room, pace, protect, false)); 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 room = rooms.elementAt(22);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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}; int[] protect = {4 * 28, 0, 19 * 28, 11 * 32, 0, 5 * 32};
items.addElement(new Sentry(3 * 28, 94, room, pace, protect, false)); items.addElement(new Sentry(3 * 28, 94, room, pace, protect, false));
} }
{ // Room 23, AnteChamber { // Room 23, AnteChamber
Room room = rooms.elementAt(23); Room room = rooms.elementAt(23);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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?", room.AddTextBox("Do you have EVERYTHING?",
98, 278, 168); 98, 278, 168);
} }
{ // Room 24, Directional Token Sensor here { // Room 24, Directional Token Sensor here
Room room = rooms.elementAt(24); Room room = rooms.elementAt(24);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 3, 3}, {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); 170, 320, 500);
items.addElement(new DirectionalSensor(3 * 28 + 14, 4 * 32, room, new Token(0, 0, null))); 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 room = rooms.elementAt(25);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, {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); 182, 48, 90);
items.addElement(new Sentry3(2 * 28, 64, room)); items.addElement(new Sentry3(2 * 28, 64, room));
} }
{ // Room 26, Sewer Grate Bottom { // Room 26, Sewer Grate Bottom
Room room = rooms.elementAt(26); Room room = rooms.elementAt(26);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{4, 0, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0, 4}, {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???", room.AddTextBox("These poor creatures never made it out...Will you???",
84, 224, 500); 84, 224, 500);
} }
{ // Room 27, 2nd Lock { // Room 27, 2nd Lock
Room room = rooms.elementAt(27); Room room = rooms.elementAt(27);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, {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!", room.AddTextBox("That was a great job!",
2 * 28, 320, 500); 2 * 28, 320, 500);
} }
{ // Room 28, Portal Chamber { // Room 28, Portal Chamber
Room room = rooms.elementAt(28); Room room = rooms.elementAt(28);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, {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)....", room.AddTextBox("You CAN take it with you (If you hold on tight)....",
336, 256, 224); 336, 256, 224);
} }
{ // Room 29, Help Screen { // Room 29, Help Screen
Room room = rooms.elementAt(29); Room room = rooms.elementAt(29);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6}, {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); 3 * 28, 11 * 32, 500);
} }
{ // Room 30, Secret Trash-flow { // Room 30, Secret Trash-flow
Room room = rooms.elementAt(30); Room room = rooms.elementAt(30);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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} {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 room = rooms.elementAt(31);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3}, {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); items.addElement(gameCursor);
SmallChip sc = new SmallChip(0, 0, null, "1"); SmallChip sc = new SmallChip(0, 0, null, "1");
sc.LoadChip("chips/CountToN.chip"); sc.LoadChip("CountToN.chip", true);
items.addElement(sc); items.addElement(sc);
items.addElement(new RO1Init()); items.addElement(new RO1Init());
@ -903,14 +903,14 @@ class RO1Init extends Initializer {
} }
// The Black Crystal and Chip 1 go somewhere in the Maze // The Black Crystal and Chip 1 go somewhere in the Maze
// Room=3, 2,7 // Room=3, 2,7
// Room=4 4,1 // Room=4 4,1
// Room=5 1,18 // Room=5 1,18
// Room=6 6,6 // Room=6 6,6
// Room=7 4,4 // Room=7 4,4
// Room=8 16,5 // Room=8 16,5
// Room=9 4,3 // Room=9 4,3
// Room=10 6,8 // Room=10 6,8
Item bcrystal = level.FindItem("BlackCrystal"); Item bcrystal = level.FindItem("BlackCrystal");
switch (level.random.nextInt(8)) { switch (level.random.nextInt(8)) {
@ -1020,4 +1020,4 @@ class RO1Init extends Initializer {
} }
} }
} }

View File

@ -19,15 +19,15 @@ class ROTut3 extends Level {
// Material 0, Blank // Material 0, Blank
materials.addElement(new Material(true, false)); 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)); materials.addElement(new Material(new Color(0, 255, 0), false, true));
// Material 2, Light Blue Wall // Material 2, Light Blue Wall
materials.addElement(new Material(new Color(190, 190, 255), false, true)); 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)); 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)); 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)); materials.addElement(new Material(new Color(255, 0, 0), false, true));
// Material 6, Recharger // Material 6, Recharger
materials.addElement(new CrystalRecharger()); materials.addElement(new CrystalRecharger());
@ -54,7 +54,7 @@ class ROTut3 extends Level {
rooms.addElement(new Room()); rooms.addElement(new Room());
} }
{ // Room 0, Help Screen { // Room 0, Help Screen
Room room = rooms.elementAt(0); Room room = rooms.elementAt(0);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {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); 6 * 28, 8 * 32, 500);
room.AddTextBox("To continue, press RETURN.", 4 * 28, 11 * 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 room = rooms.elementAt(1);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); 2 * 28, 9 * 32, 500);
room.AddArrow(559, 7 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white); room.AddArrow(559, 7 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
} }
{ // Room 2, Crossroads { // Room 2, Crossroads
Room room = rooms.elementAt(2); Room room = rooms.elementAt(2);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 2}, {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); toolbox = new ToolBox(28, 10 * 32, room);
items.addElement(toolbox); items.addElement(toolbox);
} }
{ // Room 3, Paths to Paintbrush & Shape Editor { // Room 3, Paths to Paintbrush & Shape Editor
Room room = rooms.elementAt(3); Room room = rooms.elementAt(3);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}, {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(10 * 28, 0, Arrow.DIR_UP, 28, Color.white);
room.AddArrow(559, 6 * 32 + 16, Arrow.DIR_RIGHT, 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 room = rooms.elementAt(4);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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.editable = true;
} }
{ // Room 10, Shape Editor intro { // Room 10, Shape Editor intro
Room room = rooms.elementAt(10); Room room = rooms.elementAt(10);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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 Crystal(5 * 28, 8 * 32, room, 100000));
items.addElement(new DirectionalSensor(11 * 28, 6 * 32, room, new Crystal(0, 0, null, 0))); 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 room = rooms.elementAt(11);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, {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); 2 * 28, 3 * 32, 500);
room.AddArrow(559, 6 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white); 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 room = rooms.elementAt(12);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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 Triangle(15 * 28, 4 * 32, room, new Color(255, 128, 0)));
items.addElement(new Crystal(17 * 28, 4 * 32, room, 100000)); items.addElement(new Crystal(17 * 28, 4 * 32, room, 100000));
} }
{ // Room 13, Prototype Intro { // Room 13, Prototype Intro
Room room = rooms.elementAt(13); Room room = rooms.elementAt(13);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); room.AddArrow(559, 9 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
items.addElement(new PrototypeChip(14 * 28, 2 * 32 - 8, room)); 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 room = rooms.elementAt(14);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); 2 * 28, 8 * 32, 480);
room.AddArrow(559, 9 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white); 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 room = rooms.elementAt(15);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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(ng.ports[0], node.ports[2]);
wire = new Wire(pc.portdevices[0].ports[0], node.ports[1]); wire = new Wire(pc.portdevices[0].ports[0], node.ports[1]);
} }
{ // Room 16, Antenna { // Room 16, Antenna
Room room = rooms.elementAt(16); Room room = rooms.elementAt(16);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); room.AddArrow(559, 6 * 32 + 16, Arrow.DIR_RIGHT, 28, Color.white);
items.addElement(new Antenna(2 * 28, 2 * 32, room, 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 room = rooms.elementAt(17);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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)); items.addElement(new Antenna(2 * 28, 2 * 32, room, Color.white));
SmallChip sc = new SmallChip(4 * 28, 4 * 32, room, "1"); SmallChip sc = new SmallChip(4 * 28, 4 * 32, room, "1");
items.addElement(sc); 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 room = rooms.elementAt(18);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2}, {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(0, 7 * 32, Arrow.DIR_LEFT, 28, Color.white);
room.AddArrow(2 * 28 + 14, 383, Arrow.DIR_DOWN, 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 room = rooms.elementAt(19);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, {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; sc.inBurner = true;
items.addElement(new Burner(18 * 28, 10 * 32 + 2, room)); items.addElement(new Burner(18 * 28, 10 * 32 + 2, room));
} }
{ // Room 20, Nesting { // Room 20, Nesting
Room room = rooms.elementAt(20); Room room = rooms.elementAt(20);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); 4 * 28, 2 * 32, 400);
room.AddArrow(0, 6 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white); 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 room = rooms.elementAt(21);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2}, {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(18 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
room.AddArrow(0, 6 * 32 + 16, Arrow.DIR_LEFT, 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 room = rooms.elementAt(22);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); 2 * 28, 9 * 32, 500);
room.AddArrow(0, 6 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white); 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 room = rooms.elementAt(23);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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, items.addElement(new ContactSensor(10 * 28, 5 * 32, robot.InternalRoom,
new Hexagon(0, 0, null, Color.white))); new Hexagon(0, 0, null, Color.white)));
} }
{ // Room 24, Wallhugger intro { // Room 24, Wallhugger intro
Room room = rooms.elementAt(24); Room room = rooms.elementAt(24);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
SmallChip sc = new SmallChip(4 * 28, 5 * 32, room, "3"); SmallChip sc = new SmallChip(4 * 28, 5 * 32, room, "3");
items.addElement(sc); 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 room = rooms.elementAt(25);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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(17 * 28, 383, Arrow.DIR_DOWN, 28, Color.white);
room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 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 room = rooms.elementAt(27);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2}, {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} {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 room = rooms.elementAt(28);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); 2 * 28, 8 * 32, 500);
room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white); 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 room = rooms.elementAt(29);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); 3 * 28, 9 * 32, 450);
room.AddArrow(0, 9 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white); 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 room = rooms.elementAt(30);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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); room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
SmallChip sc = new SmallChip(2 * 28, 5 * 32, room, "5"); SmallChip sc = new SmallChip(2 * 28, 5 * 32, room, "5");
items.addElement(sc); 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 room = rooms.elementAt(31);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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); 4 * 28, 8 * 32, 400);
room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white); 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 room = rooms.elementAt(32);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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); 4 * 28, 8 * 32, 400);
room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white); room.AddArrow(2 * 28 + 14, 0, Arrow.DIR_UP, 28, Color.white);
} }
{ // Room 33, Exit { // Room 33, Exit
Room room = rooms.elementAt(33); Room room = rooms.elementAt(33);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}, {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.", room.AddTextBox("Press ? for help or hints.",
2 * 28, 11 * 32, 500); 2 * 28, 11 * 32, 500);
} }
{ // Room 34, Paintbrush colors { // Room 34, Paintbrush colors
Room room = rooms.elementAt(34); Room room = rooms.elementAt(34);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); 3 * 28, 9 * 32, 500);
} }
{ // Room 35, Factory Intro { // Room 35, Factory Intro
Room room = rooms.elementAt(35); Room room = rooms.elementAt(35);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}, {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); 2 * 28, 8 * 32, 500);
room.AddArrow(11 * 28, 0, Arrow.DIR_UP, 28, Color.white); room.AddArrow(11 * 28, 0, Arrow.DIR_UP, 28, Color.white);
} }
{ // Room 36, Factory { // Room 36, Factory
Room room = rooms.elementAt(36); Room room = rooms.elementAt(36);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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.", room.AddTextBox("Return to the Crossroads.",
12 * 28, 10 * 32, 200); 12 * 28, 10 * 32, 200);
} }
{ // Room 37, Unburning { // Room 37, Unburning
Room room = rooms.elementAt(37); Room room = rooms.elementAt(37);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); 2 * 28, 8 * 32, 500);
room.AddArrow(2 * 28 + 14, 559, Arrow.DIR_DOWN, 28, Color.white); 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 room = rooms.elementAt(38);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {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); 4 * 28, 10 * 32, 450);
room.AddArrow(28 + 14, 0, Arrow.DIR_UP, 28, Color.white); 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 room = rooms.elementAt(39);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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.AddArrow(3 * 28, 10 * 32 + 16, Arrow.DIR_LEFT, 28, Color.white);
room.AddTextBox("Autowirer", 4 * 28, 11 * 32 - 8, 200); room.AddTextBox("Autowirer", 4 * 28, 11 * 32 - 8, 200);
} }
{ // Room 40, Maze Control { // Room 40, Maze Control
Room room = rooms.elementAt(40); Room room = rooms.elementAt(40);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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.", room.AddTextBox("Try it in the next room.",
2 * 28, 11 * 32, 500); 2 * 28, 11 * 32, 500);
} }
{ // Room 41, Maze Control { // Room 41, Maze Control
Room room = rooms.elementAt(41); Room room = rooms.elementAt(41);
room.RoomArray = new int[][]{ room.RoomArray = new int[][]{
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {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); LinkRoomsUpDown(5, 6);
{ // Paintbrush code comes after Robots are constructed { // Paintbrush code comes after Robots are constructed
Room room = rooms.elementAt(4); Room room = rooms.elementAt(4);
PaintBrush pb = new PaintBrush(); PaintBrush pb = new PaintBrush();
pb.x = 17 * 28 + 10; pb.x = 17 * 28 + 10;
@ -1232,4 +1232,4 @@ class ROTut3 extends Level {
} }
} }

View File

@ -27,7 +27,7 @@ public class PlayerBlocker extends Material {
int numfiles = filenames.length; int numfiles = filenames.length;
images = new ImageIcon[numfiles]; images = new ImageIcon[numfiles];
for (int a = 0; a < filenames.length; a++) { 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]; icon = images[0];
} }

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1013 B

After

Width:  |  Height:  |  Size: 1013 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 373 B

View File

Before

Width:  |  Height:  |  Size: 386 B

After

Width:  |  Height:  |  Size: 386 B

View File

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 374 B

View File

Before

Width:  |  Height:  |  Size: 368 B

After

Width:  |  Height:  |  Size: 368 B

View File

Before

Width:  |  Height:  |  Size: 940 B

After

Width:  |  Height:  |  Size: 940 B

View File

Before

Width:  |  Height:  |  Size: 999 B

After

Width:  |  Height:  |  Size: 999 B

View File

Before

Width:  |  Height:  |  Size: 1000 B

After

Width:  |  Height:  |  Size: 1000 B

View File

Before

Width:  |  Height:  |  Size: 940 B

After

Width:  |  Height:  |  Size: 940 B

View File

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 812 B

View File

Before

Width:  |  Height:  |  Size: 963 B

After

Width:  |  Height:  |  Size: 963 B

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 900 B

After

Width:  |  Height:  |  Size: 900 B

View File

Before

Width:  |  Height:  |  Size: 898 B

After

Width:  |  Height:  |  Size: 898 B

View File

Before

Width:  |  Height:  |  Size: 899 B

After

Width:  |  Height:  |  Size: 899 B

View File

Before

Width:  |  Height:  |  Size: 900 B

After

Width:  |  Height:  |  Size: 900 B

View File

Before

Width:  |  Height:  |  Size: 853 B

After

Width:  |  Height:  |  Size: 853 B

View File

Before

Width:  |  Height:  |  Size: 856 B

After

Width:  |  Height:  |  Size: 856 B

View File

Before

Width:  |  Height:  |  Size: 952 B

After

Width:  |  Height:  |  Size: 952 B

View File

Before

Width:  |  Height:  |  Size: 967 B

After

Width:  |  Height:  |  Size: 967 B

View File

Before

Width:  |  Height:  |  Size: 949 B

After

Width:  |  Height:  |  Size: 949 B

View File

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 936 B

View File

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 937 B

View File

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 936 B

View File

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 937 B

View File

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 936 B

View File

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 937 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 882 B

After

Width:  |  Height:  |  Size: 882 B

View File

Before

Width:  |  Height:  |  Size: 853 B

After

Width:  |  Height:  |  Size: 853 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 915 B

After

Width:  |  Height:  |  Size: 915 B

View File

Before

Width:  |  Height:  |  Size: 1009 B

After

Width:  |  Height:  |  Size: 1009 B

View File

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 344 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 424 B

After

Width:  |  Height:  |  Size: 424 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 965 B

After

Width:  |  Height:  |  Size: 965 B

View File

Before

Width:  |  Height:  |  Size: 859 B

After

Width:  |  Height:  |  Size: 859 B

View File

Before

Width:  |  Height:  |  Size: 954 B

After

Width:  |  Height:  |  Size: 954 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

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