diff --git a/src/MoF/NetherMapObject.java b/src/MoF/NetherMapObject.java deleted file mode 100644 index 2eb09ca3..00000000 --- a/src/MoF/NetherMapObject.java +++ /dev/null @@ -1,11 +0,0 @@ -package MoF; - -import amidst.Options; -import amidst.map.MapMarkers; - -public class NetherMapObject extends MapObject { - public NetherMapObject(int eX, int eY) { - super(MapMarkers.NETHER_FORTRESS, eX, eY); - model = Options.instance.showNetherFortresses; - } -} diff --git a/src/MoF/Player.java b/src/MoF/Player.java deleted file mode 100644 index 0cba8785..00000000 --- a/src/MoF/Player.java +++ /dev/null @@ -1,49 +0,0 @@ -package MoF; - -import amidst.map.MapMarkers; - -import java.awt.image.BufferedImage; - -public class Player extends MapObject { - private String name; - public boolean needSave; - private BufferedImage marker; - - public Player(String name, int x, int y) { - super(MapMarkers.PLAYER, x , y); - marker = type.image; - needSave = false; - this.setName(name); - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public int getWidth() { - return (int)(marker.getWidth()*localScale*3); - } - public int getHeight() { - return (int)(marker.getHeight()*localScale*3); - } - public void setPosition(int x, int y) { - this.x = x; - this.y = y; - needSave = true; - } - - @Override - public BufferedImage getImage() { - return marker; - } - - public void setMarker(BufferedImage img) { - this.marker = img; - } - - @Override - public String toString() { - return "Player \"" + name + "\" at (" + x + ", " + y + ")"; - } -} diff --git a/src/amidst/gui/AmidstMenu.java b/src/amidst/gui/AmidstMenu.java index da78d798..d828dac3 100644 --- a/src/amidst/gui/AmidstMenu.java +++ b/src/amidst/gui/AmidstMenu.java @@ -29,16 +29,16 @@ public class AmidstMenu extends JMenuBar { public AmidstMenu(FinderWindow win) { this.window = win; - add(fileMenu = new FileMenu()); -// scriptMenu = new JMenu("Script") {{ + fileMenu = add(new FileMenu()); +// scriptMenu = add(new JMenu("Script") {{ // setEnabled(false); // add(new JMenuItem("New")); // add(new JMenuItem("Open")); // add(new JMenuItem("Save")); // add(new JMenuItem("Run")); -// }}; - add(mapMenu = new MapMenu()); - add(helpMenu = new HelpMenu()); +// }}); + mapMenu = add(new MapMenu()); + helpMenu = add(new HelpMenu()); } private class FileMenu extends JMenu { @@ -162,16 +162,11 @@ public class AmidstMenu extends JMenuBar { String s = JOptionPane.showInputDialog(null, "Enter coordinates: (Ex. 123,456)", "Go To", JOptionPane.QUESTION_MESSAGE); if (s != null) { String[] c = s.split(","); - long x = 0, y = 0; - boolean w = true; try { - x = Long.parseLong(c[0]) >> 2; - y = Long.parseLong(c[1]) >> 2; - } catch (Exception e) { - w = false; - } - if (w) + long x = Long.parseLong(c[0]) >> 2; + long y = Long.parseLong(c[1]) >> 2; window.curProject.moveMapTo((int)x, (int)y); + } catch (NumberFormatException ignored) {} } } }); diff --git a/src/amidst/map/MapObject.java b/src/amidst/map/MapObject.java index c50830ac..9728b736 100644 --- a/src/amidst/map/MapObject.java +++ b/src/amidst/map/MapObject.java @@ -10,6 +10,7 @@ public class MapObject extends Point { public MapMarkers type; public int rx, ry; public double localScale = 1.0; + @Deprecated public double tempDist = 0; protected JToggleButton.ToggleButtonModel model;