upstream updates
This commit is contained in:
commit
3bf267f3fc
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@
|
|||||||
target/
|
target/
|
||||||
*.o
|
*.o
|
||||||
DroidQuest
|
DroidQuest
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ MV = mvn
|
|||||||
CFLAGS=-Wall -Werror -ggdb
|
CFLAGS=-Wall -Werror -ggdb
|
||||||
|
|
||||||
BIN=DroidQuest
|
BIN=DroidQuest
|
||||||
JAR=dq-2.7.jar
|
JAR=dq-2.8.jar
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(CC) $(CFLAGS) dq.c -o dq.o
|
$(CC) $(CFLAGS) dq.c -o dq.o
|
||||||
|
41
README
41
README
@ -3,11 +3,50 @@ Droid Quest
|
|||||||
|
|
||||||
A Java recreation of the classic game Robot Odyssey I
|
A Java recreation of the classic game Robot Odyssey I
|
||||||
|
|
||||||
|
=======
|
||||||
|
Build with:
|
||||||
|
|
||||||
|
mvn install
|
||||||
|
|
||||||
|
Run the game:
|
||||||
|
|
||||||
|
MacOSX / Linux: ./start.sh
|
||||||
|
Windows: start.bat (IN PROGRESS)
|
||||||
|
OR
|
||||||
|
java -jar target/dq-2.8.jar
|
||||||
|
|
||||||
|
Controls:
|
||||||
|
|
||||||
|
/ - contextual help
|
||||||
|
arrows - normal movement
|
||||||
|
control + arrows - fine-grained movement [OS X: command + arrows]
|
||||||
|
space - pickup/drop
|
||||||
|
C - game cursor
|
||||||
|
H - hot cursor
|
||||||
|
S - solder pen
|
||||||
|
R - toggle radio
|
||||||
|
P - paintbrush
|
||||||
|
T - toolbox
|
||||||
|
[, ] - rotate device
|
||||||
|
F - flip
|
||||||
|
L - load small chip
|
||||||
|
E - enter robot
|
||||||
|
X - exit robot
|
||||||
|
|
||||||
|
Cheat/debug:
|
||||||
|
|
||||||
|
shift + arrows - move rooms
|
||||||
|
M - dump memory usage
|
||||||
|
|
||||||
|
Note: On OS X, control + arrow-keys are bound to Apple's "Mission Control". I switched to the 'shortcut' modifier which is control on windows and command on OS X. Alternatively, you can disable
|
||||||
|
built in OS X shortcuts via System Preferences -> Keyboard -> Shorcuts.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2000 Thomas Foote
|
Copyright (c) 2000 Thomas Foote
|
||||||
|
|
||||||
Optimization to compile, install, and run under linux:
|
Optimization to compile, install, and run under linux:
|
||||||
|
|
||||||
Copyright (c) 2015 Chris Cromer
|
Copyright (c) 2015-2016 Chris Cromer
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
2
dq.c
2
dq.c
@ -1,6 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
system("java -jar /usr/share/DroidQuest/dq-2.7.jar");
|
system("java -jar /usr/share/DroidQuest/dq-2.8.jar");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
65
pom.xml
65
pom.xml
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<groupId>com.droidquest</groupId>
|
<groupId>com.droidquest</groupId>
|
||||||
<artifactId>dq</artifactId>
|
<artifactId>dq</artifactId>
|
||||||
<version>2.7</version>
|
<version>2.8</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>DroidQuest</name>
|
<name>DroidQuest</name>
|
||||||
@ -14,39 +14,34 @@
|
|||||||
<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>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<!-- Build an executable JAR -->
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<version>3.3</version>
|
||||||
<version>2.4</version>
|
<configuration>
|
||||||
<configuration>
|
<source>1.6</source>
|
||||||
<archive>
|
<target>1.6</target>
|
||||||
<manifest>
|
</configuration>
|
||||||
<addClasspath>true</addClasspath>
|
</plugin>
|
||||||
<classpathPrefix>lib/</classpathPrefix>
|
<plugin>
|
||||||
<mainClass>com.droidquest.DQ</mainClass>
|
<!-- Build an executable JAR -->
|
||||||
</manifest>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
</archive>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
</configuration>
|
<version>2.4</version>
|
||||||
</plugin>
|
<configuration>
|
||||||
</plugins>
|
<archive>
|
||||||
</build>
|
<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>
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -15,7 +15,7 @@ import java.awt.event.KeyEvent;
|
|||||||
public class Player extends Item implements Avatar {
|
public class Player extends Item implements Avatar {
|
||||||
|
|
||||||
private int keyRepeatRate = 5;
|
private int keyRepeatRate = 5;
|
||||||
|
private int shortcut_modifier = Toolkit.getDefaultToolkit ().getMenuShortcutKeyMask();
|
||||||
|
|
||||||
protected boolean handleSaveSmallChip() {
|
protected boolean handleSaveSmallChip() {
|
||||||
return false;
|
return false;
|
||||||
@ -363,16 +363,16 @@ public class Player extends Item implements Avatar {
|
|||||||
else if (e.getKeyCode() == KeyEvent.VK_SLASH && handleHelp()) {
|
else if (e.getKeyCode() == KeyEvent.VK_SLASH && handleHelp()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_RIGHT && handleMoveRight(e.isShiftDown(), e.isControlDown())) {
|
else if (e.getKeyCode() == KeyEvent.VK_RIGHT && handleMoveRight(e.isShiftDown(), (e.getModifiers() & shortcut_modifier) > 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_LEFT && handleMoveLeft(e.isShiftDown(), e.isControlDown())) {
|
else if (e.getKeyCode() == KeyEvent.VK_LEFT && handleMoveLeft(e.isShiftDown(), (e.getModifiers() & shortcut_modifier) > 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_UP && handleMoveUp(e.isShiftDown(), e.isControlDown())) {
|
else if (e.getKeyCode() == KeyEvent.VK_UP && handleMoveUp(e.isShiftDown(), (e.getModifiers() & shortcut_modifier) > 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_DOWN && handleMoveDown(e.isShiftDown(), e.isControlDown())) {
|
else if (e.getKeyCode() == KeyEvent.VK_DOWN && handleMoveDown(e.isShiftDown(), (e.getModifiers() & shortcut_modifier) > 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_SPACE && handlePickupDrop()) {
|
else if (e.getKeyCode() == KeyEvent.VK_SPACE && handlePickupDrop()) {
|
||||||
@ -456,22 +456,22 @@ public class Player extends Item implements Avatar {
|
|||||||
|
|
||||||
public boolean KeyDown(KeyEvent e) {
|
public boolean KeyDown(KeyEvent e) {
|
||||||
if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
||||||
if (handleRepeatRight(e.isControlDown())) {
|
if (handleRepeatRight((e.getModifiers() & shortcut_modifier) > 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
||||||
if (handleRepeatLeft(e.isControlDown())) {
|
if (handleRepeatLeft((e.getModifiers() & shortcut_modifier) > 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
||||||
if (handleRepeatUp(e.isControlDown())) {
|
if (handleRepeatUp((e.getModifiers() & shortcut_modifier) > 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
||||||
if (handleRepeatDown(e.isControlDown())) {
|
if (handleRepeatDown((e.getModifiers() & shortcut_modifier) > 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,8 @@ import java.awt.event.KeyEvent;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
|
||||||
public class Remote extends Item implements Avatar {
|
public class Remote extends Item implements Avatar {
|
||||||
|
private int shortcut_modifier = Toolkit.getDefaultToolkit ().getMenuShortcutKeyMask();
|
||||||
|
|
||||||
public Remote() {
|
public Remote() {
|
||||||
width = 4;
|
width = 4;
|
||||||
height = 20;
|
height = 20;
|
||||||
@ -98,28 +100,28 @@ public class Remote extends Item implements Avatar {
|
|||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
||||||
if (carriedBy == null) {
|
if (carriedBy == null) {
|
||||||
moveRight(e.isControlDown());
|
moveRight((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
}
|
}
|
||||||
repeating = 0;
|
repeating = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
||||||
if (carriedBy == null) {
|
if (carriedBy == null) {
|
||||||
moveLeft(e.isControlDown());
|
moveLeft((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
}
|
}
|
||||||
repeating = 0;
|
repeating = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
||||||
if (carriedBy == null) {
|
if (carriedBy == null) {
|
||||||
moveUp(e.isControlDown());
|
moveUp((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
}
|
}
|
||||||
repeating = 0;
|
repeating = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
||||||
if (carriedBy == null) {
|
if (carriedBy == null) {
|
||||||
moveDown(e.isControlDown());
|
moveDown((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
}
|
}
|
||||||
repeating = 0;
|
repeating = 0;
|
||||||
return true;
|
return true;
|
||||||
@ -134,7 +136,7 @@ public class Remote extends Item implements Avatar {
|
|||||||
if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
||||||
repeating++;
|
repeating++;
|
||||||
if (repeating > 10) {
|
if (repeating > 10) {
|
||||||
moveRight(e.isControlDown());
|
moveRight((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -142,7 +144,7 @@ public class Remote extends Item implements Avatar {
|
|||||||
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
||||||
repeating++;
|
repeating++;
|
||||||
if (repeating > 10) {
|
if (repeating > 10) {
|
||||||
moveLeft(e.isControlDown());
|
moveLeft((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -150,7 +152,7 @@ public class Remote extends Item implements Avatar {
|
|||||||
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
||||||
repeating++;
|
repeating++;
|
||||||
if (repeating > 10) {
|
if (repeating > 10) {
|
||||||
moveUp(e.isControlDown());
|
moveUp((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -158,7 +160,7 @@ public class Remote extends Item implements Avatar {
|
|||||||
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
||||||
repeating++;
|
repeating++;
|
||||||
if (repeating > 10) {
|
if (repeating > 10) {
|
||||||
moveDown(e.isControlDown());
|
moveDown((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -18,6 +18,7 @@ import java.util.ArrayList;
|
|||||||
public class SolderingPen extends Device implements Avatar {
|
public class SolderingPen extends Device implements Avatar {
|
||||||
private boolean hot;
|
private boolean hot;
|
||||||
private Port currentPort = null; // Port that Soldering pen is currently over
|
private Port currentPort = null; // Port that Soldering pen is currently over
|
||||||
|
private int shortcut_modifier = Toolkit.getDefaultToolkit ().getMenuShortcutKeyMask();
|
||||||
|
|
||||||
public SolderingPen() {
|
public SolderingPen() {
|
||||||
width = 22;
|
width = 22;
|
||||||
@ -313,28 +314,28 @@ public class SolderingPen extends Device implements Avatar {
|
|||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
||||||
if (carriedBy == null) {
|
if (carriedBy == null) {
|
||||||
moveRight(e.isControlDown());
|
moveRight((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
}
|
}
|
||||||
repeating = 0;
|
repeating = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
||||||
if (carriedBy == null) {
|
if (carriedBy == null) {
|
||||||
moveLeft(e.isControlDown());
|
moveLeft((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
}
|
}
|
||||||
repeating = 0;
|
repeating = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
||||||
if (carriedBy == null) {
|
if (carriedBy == null) {
|
||||||
moveUp(e.isControlDown());
|
moveUp((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
}
|
}
|
||||||
repeating = 0;
|
repeating = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
||||||
if (carriedBy == null) {
|
if (carriedBy == null) {
|
||||||
moveDown(e.isControlDown());
|
moveDown((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
}
|
}
|
||||||
repeating = 0;
|
repeating = 0;
|
||||||
return true;
|
return true;
|
||||||
@ -358,7 +359,7 @@ public class SolderingPen extends Device implements Avatar {
|
|||||||
if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
|
||||||
repeating++;
|
repeating++;
|
||||||
if (repeating > 10) {
|
if (repeating > 10) {
|
||||||
moveRight(e.isControlDown());
|
moveRight((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -366,7 +367,7 @@ public class SolderingPen extends Device implements Avatar {
|
|||||||
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
|
||||||
repeating++;
|
repeating++;
|
||||||
if (repeating > 10) {
|
if (repeating > 10) {
|
||||||
moveLeft(e.isControlDown());
|
moveLeft((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -374,7 +375,7 @@ public class SolderingPen extends Device implements Avatar {
|
|||||||
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
else if (e.getKeyCode() == KeyEvent.VK_UP) {
|
||||||
repeating++;
|
repeating++;
|
||||||
if (repeating > 10) {
|
if (repeating > 10) {
|
||||||
moveUp(e.isControlDown());
|
moveUp((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -382,7 +383,7 @@ public class SolderingPen extends Device implements Avatar {
|
|||||||
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
|
||||||
repeating++;
|
repeating++;
|
||||||
if (repeating > 10) {
|
if (repeating > 10) {
|
||||||
moveDown(e.isControlDown());
|
moveDown((e.getModifiers() & shortcut_modifier) > 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -428,6 +429,8 @@ public class SolderingPen extends Device implements Avatar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CheckPort();
|
||||||
|
|
||||||
level.roomdisplay.dq.selectCursor();
|
level.roomdisplay.dq.selectCursor();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -505,6 +508,8 @@ public class SolderingPen extends Device implements Avatar {
|
|||||||
|
|
||||||
handleRemote();
|
handleRemote();
|
||||||
|
|
||||||
|
CheckPort();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +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].myWire = new Wire(chip.ports[0], portdevices[0].ports[0]);
|
portdevices[0].ports[0].myWire = new Wire(chip.ports[0], portdevices[0].ports[0]);
|
||||||
}
|
}
|
||||||
else { // Unwiring
|
else { // Unwiring
|
||||||
portdevices[0].ports[0].myWire.Remove();
|
portdevices[0].ports[0].myWire.Remove();
|
||||||
|
@ -64,7 +64,7 @@ public class GateKeeper extends Item {
|
|||||||
|
|
||||||
public void Animate() {
|
public void Animate() {
|
||||||
if (behavior == 1) {
|
if (behavior == 1) {
|
||||||
if (x != goToX && y != goToY) {
|
if (x != goToX || y != goToY) {
|
||||||
if (x != goToX) {
|
if (x != goToX) {
|
||||||
int diff = Math.abs(goToX - x);
|
int diff = Math.abs(goToX - x);
|
||||||
int dir = diff / (goToX - x);
|
int dir = diff / (goToX - x);
|
||||||
|
@ -240,9 +240,11 @@ public class Sentry extends Item {
|
|||||||
|
|
||||||
if (behavior == -1) {
|
if (behavior == -1) {
|
||||||
if (carrying == null) {
|
if (carrying == null) {
|
||||||
x = robot.x + robot.width / 2 - width / 2;
|
if(robot != null) {
|
||||||
y = robot.y + robot.height / 2 - height / 2;
|
x = robot.x + robot.width / 2 - width / 2;
|
||||||
PicksUp(robot);
|
y = robot.y + robot.height / 2 - height / 2;
|
||||||
|
PicksUp(robot);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ public class MainMenu extends Level {
|
|||||||
room.AddTextBox("Saved Games", 9 * 28, 10 * 32, 80);
|
room.AddTextBox("Saved Games", 9 * 28, 10 * 32, 80);
|
||||||
room.AddTextBox("Games", 450, 6 * 32 + 8, 500);
|
room.AddTextBox("Games", 450, 6 * 32 + 8, 500);
|
||||||
room.AddArrow(559, 6 * 32, Arrow.DIR_RIGHT, 28, Color.white);
|
room.AddArrow(559, 6 * 32, Arrow.DIR_RIGHT, 28, Color.white);
|
||||||
room.AddTextBox("{000,000,000} Version 2.7", 0, 16, 500);
|
room.AddTextBox("{000,000,000} Version 2.8", 0, 16, 500);
|
||||||
if (cheatmode) {
|
if (cheatmode) {
|
||||||
room.AddTextBox("{BIG} CHEAT ENABLED!", 91, 8 * 32, 500);
|
room.AddTextBox("{BIG} CHEAT ENABLED!", 91, 8 * 32, 500);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ import com.droidquest.levels.Level;
|
|||||||
public class BatteryIn extends Material {
|
public class BatteryIn extends Material {
|
||||||
// Charges the Battery when an Energy Crystal is passed over it.
|
// Charges the Battery when an Energy Crystal is passed over it.
|
||||||
|
|
||||||
public void BatteryIn() {
|
public BatteryIn() {
|
||||||
passable = true;
|
passable = true;
|
||||||
GenerateIcons();
|
GenerateIcons();
|
||||||
}
|
}
|
||||||
|
45
start.sh
Executable file
45
start.sh
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#/bin/sh
|
||||||
|
|
||||||
|
RUNPRG="java"
|
||||||
|
if ! type -p "${RUNPRG}" > /dev/null;
|
||||||
|
then
|
||||||
|
if [ -n "${JAVA_HOME}" ];
|
||||||
|
then
|
||||||
|
RUNPRG="${JAVA_HOME}/bin/java"
|
||||||
|
if [ ! -x "${RUNPRG}" ];
|
||||||
|
then
|
||||||
|
echo "JAVA_HOME set, but unable to find java. Please check your java installation."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Java 1.6 or newer needed for DQ. Must be in PATH or JAVA_HOME set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ -f "target/dq-2.8.jar" ];
|
||||||
|
then
|
||||||
|
echo "Starting DQ."
|
||||||
|
${RUNPRG} -jar "target/dq-2.8.jar"
|
||||||
|
else
|
||||||
|
echo "No jar found, building DQ before running."
|
||||||
|
MVNPRG="mvn"
|
||||||
|
if ! type -p "${MVNPRG}" > /dev/null;
|
||||||
|
then
|
||||||
|
if [ -n "${MAVEN_HOME}" ];
|
||||||
|
then
|
||||||
|
MVNPRG="${MAVEN_HOME}/bin/mvn"
|
||||||
|
if [ ! -x "${MVNPRG}" ];
|
||||||
|
then
|
||||||
|
echo "MAVEN_HOME set, but unable to find mvn executable. Please check your maven installation."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Maven required to build DQ. See maven.apache.org to download."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
${MVNPRG} package
|
||||||
|
${MVNPRG} exec:java -Dexec.mainClass=com.droidquest.DQ
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user