diff --git a/src/main/java/Game.java b/src/main/java/Game.java index da23528..aea8036 100644 --- a/src/main/java/Game.java +++ b/src/main/java/Game.java @@ -12,9 +12,6 @@ public class Game extends JFrame { private static final int WINDOW_HEIGHT = 13; public static final int CELL_SIZE = 50; - private static final int KEY_FULLSCREEN = 115; - private static final int KEY_ESCAPE = 27; - private WindowOfMenu menu; private WindowOfFreeMove freeMove; @@ -40,42 +37,6 @@ public class Game extends JFrame { setResizable(false); setVisible(true); - addKeyListener(new KeyAdapter() { - @Override - public void keyPressed(KeyEvent e) { - if (e.getKeyCode() == KEY_ESCAPE){ - dispatchEvent(new WindowEvent(game(), WindowEvent.WINDOW_CLOSING)); - return; - } - - if (e.getKeyCode() == KEY_FULLSCREEN){ - - if (getExtendedState() == MAXIMIZED_BOTH) - setExtendedState(NORMAL); - else - setExtendedState(MAXIMIZED_BOTH); - } - - else { - freeMove.keyPressed(e); - } - } - }); - - addKeyListener(new KeyAdapter() { - @Override - public void keyTyped(KeyEvent e) { - freeMove.keyTyped(e); - } - }); - - addKeyListener(new KeyAdapter() { - @Override - public void keyReleased(KeyEvent e) { - freeMove.keyReleased(e); - } - }); - } public Game game() {return this;} diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java b/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java index 68582cd..36fcf5f 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java @@ -65,6 +65,9 @@ public class InteractionCell extends Cell { window.getCamera().setCameraStopped(false); readNextLine(); } + else if (data.contains("")) { + return; + } else if (data.contains("")) { String[] dialogInfo = data.split(" "); switch (dialogInfo[1]) { diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/Npc.java b/src/main/java/ruscz/game/gameOfProd/Cells/Npc.java index 7455e41..bb89fea 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/Npc.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/Npc.java @@ -6,7 +6,11 @@ import ruscz.game.gameOfProd.Scripts.Direction; import ruscz.game.gameOfProd.Scripts.PathFinder; import ruscz.game.gameOfProd.Windows.WindowOfFreeMove; +import javax.imageio.ImageIO; import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; public class Npc extends Person { private MapManager mapManager; @@ -61,6 +65,13 @@ public class Npc extends Person { @Override public void paint(Graphics2D g) { - g.fillOval(getX() * WindowOfFreeMove.CELL_SIZE, getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE); + BufferedImage image = null; + try { + image = ImageIO.read(new File("src/main/resources/characters/Fox/foxi.gif")); + } catch (IOException e) { + e.printStackTrace(); + } + g.drawImage(image, getX() * WindowOfFreeMove.CELL_SIZE, + getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); } } diff --git a/src/main/java/ruscz/game/gameOfProd/Map/Map.java b/src/main/java/ruscz/game/gameOfProd/Map/Map.java index f55182a..b3c7c28 100644 --- a/src/main/java/ruscz/game/gameOfProd/Map/Map.java +++ b/src/main/java/ruscz/game/gameOfProd/Map/Map.java @@ -41,7 +41,7 @@ public class Map { type = TypeOfCell.EMPTY; for (int i = 0; i < mapArray.length; i++) { - for (int j = 0; j < mapArray.length; j++) { + for (int j = 0; j < mapArray[0].length; j++) { mapArray[0][j] = type; mapArray[mapArray.length - 1][j] = type; } diff --git a/src/main/java/ruscz/game/gameOfProd/Map/MapManager.java b/src/main/java/ruscz/game/gameOfProd/Map/MapManager.java index dddc6f2..c34406c 100644 --- a/src/main/java/ruscz/game/gameOfProd/Map/MapManager.java +++ b/src/main/java/ruscz/game/gameOfProd/Map/MapManager.java @@ -53,7 +53,7 @@ public class MapManager { public void createMap() { for (int i = 0; i < actualMap.getMapArray().length; i++) { - for (int j = 0; j < actualMap.getMapArray().length; j++) { + for (int j = 0; j < actualMap.getMapArray()[0].length; j++) { if (actualMap.getMapArray()[i][j] == TypeOfCell.BLOCK && !actualMap.isBusyCell(i, j)) { actualMap.getBlocks().add(new Block(i, j, actualMap.getImageCell(), true)); } diff --git a/src/main/java/ruscz/game/gameOfProd/Windows/Camera.java b/src/main/java/ruscz/game/gameOfProd/Windows/Camera.java index 487331a..b497866 100644 --- a/src/main/java/ruscz/game/gameOfProd/Windows/Camera.java +++ b/src/main/java/ruscz/game/gameOfProd/Windows/Camera.java @@ -12,8 +12,8 @@ public class Camera { private int startX; private int startY; private boolean isReturning; - private static int count = 0; private boolean isStopped; + private int count; public Camera(WindowOfFreeMove window, WindowOfFreeMove.Canvas canvas) { this.window = window; @@ -86,58 +86,73 @@ public class Camera { public void moveFreeCamera() { int coordX = (int) (canvas.getLocation().getX()); int coordY = (int) (canvas.getLocation().getY()); - if (coordX > 0) { - endX = 0; - if (isReturning) boundCamera(); - } - else if (CELL_SIZE * WINDOW_WIDTH - coordX + 8 >= CELL_SIZE * CANVAS_WIDTH) { - if (isReturning) boundCamera(); - else isStopped = true; - } - if (coordY > 0) { - if (isReturning) boundCamera(); - else isStopped = true; - } - else if (CELL_SIZE * WINDOW_WIDTH - coordY >= CELL_SIZE * CANVAS_WIDTH) { - if (isReturning) boundCamera(); - else isStopped = true; - } - if (coordX != endX || coordY != endY) { - int distanceX = endX - startX; - int distanceY = endY - startY; - if (Math.abs(distanceX) < CELL_SIZE && Math.abs(distanceY) < CELL_SIZE) { - isBound = true; - isReturning = false; - return; + int stepX = 0; + int stepY = 0; + if (WINDOW_WIDTH < CANVAS_WIDTH) { + if (coordX > 0) { + endX = 0; + if (isReturning) boundCamera(); + } else if (CELL_SIZE * WINDOW_WIDTH - coordX >= CELL_SIZE * CANVAS_WIDTH) { + endX = CELL_SIZE * (CANVAS_WIDTH - WINDOW_WIDTH); + if (isReturning) boundCamera(); } - if (count >= time / 2) { - int stepX = (int) (distanceX / CELL_SIZE / (time / 2)); - int stepY = (int) (distanceY / CELL_SIZE / (time / 2)); - canvas.setLocation(coordX + stepX, coordY + stepY); - count = 0; + } + if (WINDOW_HEIGHT < CANVAS_HEIGHT) { + if (coordY > 0) { + endY = 0; + if (isReturning) boundCamera(); + } else if (CELL_SIZE * WINDOW_HEIGHT - coordY >= CELL_SIZE * CANVAS_HEIGHT) { + endY = CELL_SIZE * (CANVAS_HEIGHT - WINDOW_HEIGHT); + if (isReturning) boundCamera(); } + } + if (Math.abs(coordX - endX) >= 5 || Math.abs(coordY - endY) >= 5) { + int distanceX = endX - coordX; + int distanceY = endY - coordY; + double distance = Math.sqrt(Math.pow(distanceX, 2) + Math.pow(distanceY, 2)); + double angleX = 0; + double angleY = 0; + if (distanceX != 0 && distanceY != 0) { + angleX = distance / distanceX; + angleY = distance / distanceY; + if (count >= time / 2) { + stepX = (int) (-angleY); + stepY = (int) (-angleX); + System.out.println(angleX + " " + angleY); + count = 0; + } + } + else if (distanceX == 0) { + stepY = (int) (CELL_SIZE / time); + if (distanceY < 0) stepY *= -1; + } + else if (distanceY == 0) { + stepX = (int) (CELL_SIZE / time); + if (distanceX < 0) stepX *= -1; + } + canvas.setLocation(coordX + stepX, coordY + stepY); count++; } - if (coordX == endX && coordY == endY && isReturning) boundCamera(); + if (Math.abs(coordX - endX) <= stepX && Math.abs(coordY - endY) <= stepY && isReturning) boundCamera(); } public void returnFreeCamera() { setCameraStart(); - endX = (-1) * CELL_SIZE * (window.getMapManager().getActualMap().getPerson().getX() - WINDOW_WIDTH / 2); - endY = (-1) * CELL_SIZE * (window.getMapManager().getActualMap().getPerson().getY() - WINDOW_HEIGHT / 2); - if (endX > 0) { - endX = 0; - } - else if (CELL_SIZE * WINDOW_WIDTH - endX > CELL_SIZE * CANVAS_WIDTH) { - endX = (-1) * (CELL_SIZE * CANVAS_WIDTH - CELL_SIZE * WINDOW_WIDTH); - } - if (endY > 0) { - endY = 0; - } - else if (CELL_SIZE * WINDOW_WIDTH - endY > CELL_SIZE * CANVAS_WIDTH) { - endY = (-1) * (CELL_SIZE * CANVAS_HEIGHT - CELL_SIZE * WINDOW_HEIGHT); - } - time = 1; + endX = (-1) * CELL_SIZE * (window.getMapManager().getActualMap().getPerson().getX() - (WINDOW_WIDTH / 2)); + endY = (-1) * CELL_SIZE * (window.getMapManager().getActualMap().getPerson().getY() - (WINDOW_HEIGHT / 2)); +// if (endX > 0) { +// endX = 0; +// } +// else if (CELL_SIZE * WINDOW_WIDTH - endX > CELL_SIZE * CANVAS_WIDTH) { +// endX = (-1) * (CELL_SIZE * CANVAS_WIDTH - CELL_SIZE * WINDOW_WIDTH); +// } +// if (endY > 0) { +// endY = 0; +// } +// else if (CELL_SIZE * WINDOW_WIDTH - endY > CELL_SIZE * CANVAS_WIDTH) { +// endY = (-1) * (CELL_SIZE * CANVAS_HEIGHT - CELL_SIZE * WINDOW_HEIGHT); +// } + time = 2; isReturning = true; } diff --git a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java index cf1fa1d..8cdf40f 100644 --- a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java +++ b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java @@ -54,10 +54,6 @@ public class WindowOfFreeMove extends JLayeredPane { canvas.repaint(); } - private WindowOfFreeMove windowOfFreeMove(){ - return this; - } - public static void setCanPersonMove(boolean canPersonMove) { WindowOfFreeMove.canPersonMove = canPersonMove; } @@ -117,6 +113,45 @@ public class WindowOfFreeMove extends JLayeredPane { add(canvas, JLayeredPane.PALETTE_LAYER); add(background, JLayeredPane.DEFAULT_LAYER); + addKeyListener(new KeyAdapter() { + @Override + public void keyPressed(KeyEvent e) { + if (e.getKeyCode() == KEY_ESCAPE){ + System.out.println("escape"); + game.dispatchEvent(new WindowEvent(game, WindowEvent.WINDOW_CLOSING)); + return; + } + if (e.getKeyCode() == KEY_FULLSCREEN){ + if (game.getExtendedState() == game.MAXIMIZED_BOTH) + game.setExtendedState(game.NORMAL); + else + game.setExtendedState(game.MAXIMIZED_BOTH); + } + else { + if (canPersonMove) { + nextMove = e.getKeyCode(); + inputTimer.start(); + } + } + } + }); + + addKeyListener(new KeyAdapter() { + @Override + public void keyTyped(KeyEvent e) { + if (!mapManager.getActualMap().getPerson().getIsMoving() && canPersonMove || nextMove == KEY_EVENT) { + mapManager.getActualMap().getPerson().setDirectionMove(nextMove); + } + } + }); + + addKeyListener(new KeyAdapter() { + @Override + public void keyReleased(KeyEvent e) { + inputTimer.stop(); + } + }); + } public void start(boolean newGame) { @@ -133,20 +168,18 @@ public class WindowOfFreeMove extends JLayeredPane { mapManager.getLoadManager().loadSavedGame(); } - Map m6 = Map.findMapByName("m6", this); + Map boss = Map.findMapByName("boss", this); - int startX = 1; - int startY = 1; - int endX = 8; - int endY = 8; + int startX = 4; + int startY = 2; camera.moveCamera(); mapManager.createMap(); isReadyToPaint = true; canvas.repaint(); - Npc npc2 = new Npc(startX, startY, m6, mapManager); - m6.setNpcs(npc2); + Npc npc2 = new Npc(startX, startY, boss, mapManager); + boss.setNpcs(npc2); musicManager = new MusicManager("Town1.wav"); // musicManager.playMusic(); @@ -159,23 +192,6 @@ public class WindowOfFreeMove extends JLayeredPane { timer.start(); } - public void keyTyped(KeyEvent e) { - if (!mapManager.getActualMap().getPerson().getIsMoving() && canPersonMove || nextMove == KEY_EVENT) { - mapManager.getActualMap().getPerson().setDirectionMove(nextMove); - } - } - - public void keyPressed(KeyEvent e) { - if (canPersonMove) { - nextMove = e.getKeyCode(); - inputTimer.start(); - } - } - - public void keyReleased(KeyEvent e) { - inputTimer.stop(); - } - public class Canvas extends JPanel { @Override public void paint(Graphics g) { diff --git a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfMenu.java b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfMenu.java index b7bfe30..ac9b6ce 100644 --- a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfMenu.java +++ b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfMenu.java @@ -2,15 +2,16 @@ package ruscz.game.gameOfProd.Windows; import javax.swing.*; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.WindowEvent; +import java.awt.event.*; public class WindowOfMenu extends JLayeredPane { public static final int WINDOW_WIDTH = 13; public static final int WINDOW_HEIGHT = 13; public static final int CELL_SIZE = 50; + private static final int KEY_FULLSCREEN = 115; + private static final int KEY_ESCAPE = 27; + private JFrame game; private WindowOfFreeMove freeMove; private JButton startNewGame; @@ -32,7 +33,7 @@ public class WindowOfMenu extends JLayeredPane { startNewGame.addActionListener(actionEvent -> { cleanUp(); game.add(freeMove); - game.requestFocus(); + freeMove.requestFocus(); freeMove.start(true); }); @@ -43,7 +44,7 @@ public class WindowOfMenu extends JLayeredPane { loadSavedGame.addActionListener(actionEvent -> { cleanUp(); game.add(freeMove); - game.requestFocus(); + freeMove.requestFocus(); freeMove.start(false); }); @@ -57,6 +58,23 @@ public class WindowOfMenu extends JLayeredPane { add(loadSavedGame); add(exitGame); add(background); + + addKeyListener(new KeyAdapter() { + @Override + public void keyPressed(KeyEvent e) { + if (e.getKeyCode() == KEY_ESCAPE){ + game.dispatchEvent(new WindowEvent(game, WindowEvent.WINDOW_CLOSING)); + return; + } + if (e.getKeyCode() == KEY_FULLSCREEN){ + + if (game.getExtendedState() == game.MAXIMIZED_BOTH) + game.setExtendedState(game.NORMAL); + else + game.setExtendedState(game.MAXIMIZED_BOTH); + } + } + }); } private void cleanUp() { @@ -64,6 +82,7 @@ public class WindowOfMenu extends JLayeredPane { startNewGame.removeActionListener(startNewGame.getActionListeners()[0]); loadSavedGame.removeActionListener(loadSavedGame.getActionListeners()[0]); exitGame.removeActionListener(exitGame.getActionListeners()[0]); + menu().removeAll(); game.remove(this); menu().revalidate(); menu().repaint(); diff --git a/src/main/resources/A5_Tiles.png b/src/main/resources/A5_Tiles.png index d65bf6f..116bb26 100644 Binary files a/src/main/resources/A5_Tiles.png and b/src/main/resources/A5_Tiles.png differ diff --git a/src/main/resources/Openspace1.png b/src/main/resources/Openspace1.png index a4d198d..1b21ecf 100644 Binary files a/src/main/resources/Openspace1.png and b/src/main/resources/Openspace1.png differ diff --git a/src/main/resources/Openspace2.png b/src/main/resources/Openspace2.png index 81cfe81..d858a2a 100644 Binary files a/src/main/resources/Openspace2.png and b/src/main/resources/Openspace2.png differ diff --git a/src/main/resources/characters/Fox/foxi.gif b/src/main/resources/characters/Fox/foxi.gif new file mode 100644 index 0000000..250b01d Binary files /dev/null and b/src/main/resources/characters/Fox/foxi.gif differ diff --git a/src/main/resources/characters/Fox/foxi.png b/src/main/resources/characters/Fox/foxi.png new file mode 100644 index 0000000..0b27efb Binary files /dev/null and b/src/main/resources/characters/Fox/foxi.png differ diff --git a/src/main/resources/characters/Fox/foxr.gif b/src/main/resources/characters/Fox/foxr.gif new file mode 100644 index 0000000..88c7ccf Binary files /dev/null and b/src/main/resources/characters/Fox/foxr.gif differ diff --git a/src/main/resources/characters/Fox/foxr.png b/src/main/resources/characters/Fox/foxr.png new file mode 100644 index 0000000..f680960 Binary files /dev/null and b/src/main/resources/characters/Fox/foxr.png differ diff --git a/src/main/resources/characters/Fox/idle/foxidle1.png b/src/main/resources/characters/Fox/idle/foxidle1.png new file mode 100644 index 0000000..e5e6ca6 Binary files /dev/null and b/src/main/resources/characters/Fox/idle/foxidle1.png differ diff --git a/src/main/resources/characters/Fox/idle/foxidle2.png b/src/main/resources/characters/Fox/idle/foxidle2.png new file mode 100644 index 0000000..bed97a7 Binary files /dev/null and b/src/main/resources/characters/Fox/idle/foxidle2.png differ diff --git a/src/main/resources/characters/Fox/idle/foxidle3.png b/src/main/resources/characters/Fox/idle/foxidle3.png new file mode 100644 index 0000000..728eccc Binary files /dev/null and b/src/main/resources/characters/Fox/idle/foxidle3.png differ diff --git a/src/main/resources/characters/Fox/idle/foxidle4.png b/src/main/resources/characters/Fox/idle/foxidle4.png new file mode 100644 index 0000000..9667231 Binary files /dev/null and b/src/main/resources/characters/Fox/idle/foxidle4.png differ diff --git a/src/main/resources/characters/Fox/idle/foxidle5.png b/src/main/resources/characters/Fox/idle/foxidle5.png new file mode 100644 index 0000000..d6fb345 Binary files /dev/null and b/src/main/resources/characters/Fox/idle/foxidle5.png differ diff --git a/src/main/resources/characters/Fox/idle/foxidle6.png b/src/main/resources/characters/Fox/idle/foxidle6.png new file mode 100644 index 0000000..1ea17ee Binary files /dev/null and b/src/main/resources/characters/Fox/idle/foxidle6.png differ diff --git a/src/main/resources/characters/Fox/idle/foxidle7.png b/src/main/resources/characters/Fox/idle/foxidle7.png new file mode 100644 index 0000000..09a11d8 Binary files /dev/null and b/src/main/resources/characters/Fox/idle/foxidle7.png differ diff --git a/src/main/resources/characters/Fox/idle/foxidle8.png b/src/main/resources/characters/Fox/idle/foxidle8.png new file mode 100644 index 0000000..226148b Binary files /dev/null and b/src/main/resources/characters/Fox/idle/foxidle8.png differ diff --git a/src/main/resources/characters/Fox/idle/foxidle9.png b/src/main/resources/characters/Fox/idle/foxidle9.png new file mode 100644 index 0000000..4625a15 Binary files /dev/null and b/src/main/resources/characters/Fox/idle/foxidle9.png differ diff --git a/src/main/resources/characters/Fox/run/foxrun1.png b/src/main/resources/characters/Fox/run/foxrun1.png new file mode 100644 index 0000000..a8042c9 Binary files /dev/null and b/src/main/resources/characters/Fox/run/foxrun1.png differ diff --git a/src/main/resources/characters/Fox/run/foxrun2.png b/src/main/resources/characters/Fox/run/foxrun2.png new file mode 100644 index 0000000..165bd69 Binary files /dev/null and b/src/main/resources/characters/Fox/run/foxrun2.png differ diff --git a/src/main/resources/characters/Fox/run/foxrun3.png b/src/main/resources/characters/Fox/run/foxrun3.png new file mode 100644 index 0000000..b68f489 Binary files /dev/null and b/src/main/resources/characters/Fox/run/foxrun3.png differ diff --git a/src/main/resources/characters/Fox/run/foxrun4.png b/src/main/resources/characters/Fox/run/foxrun4.png new file mode 100644 index 0000000..97b0084 Binary files /dev/null and b/src/main/resources/characters/Fox/run/foxrun4.png differ diff --git a/src/main/resources/characters/Fox/run/foxrun5.png b/src/main/resources/characters/Fox/run/foxrun5.png new file mode 100644 index 0000000..d72a9ca Binary files /dev/null and b/src/main/resources/characters/Fox/run/foxrun5.png differ diff --git a/src/main/resources/characters/Fox/run/foxrun6.png b/src/main/resources/characters/Fox/run/foxrun6.png new file mode 100644 index 0000000..38bf1f2 Binary files /dev/null and b/src/main/resources/characters/Fox/run/foxrun6.png differ diff --git a/src/main/resources/characters/Fox/run/foxrun7.png b/src/main/resources/characters/Fox/run/foxrun7.png new file mode 100644 index 0000000..4a14d51 Binary files /dev/null and b/src/main/resources/characters/Fox/run/foxrun7.png differ diff --git a/src/main/resources/characters/Fox/run/foxrun8.png b/src/main/resources/characters/Fox/run/foxrun8.png new file mode 100644 index 0000000..dcf810b Binary files /dev/null and b/src/main/resources/characters/Fox/run/foxrun8.png differ diff --git a/src/main/resources/dialogs/ohhimark.txt b/src/main/resources/dialogs/ohhimark.txt new file mode 100644 index 0000000..50a4c41 --- /dev/null +++ b/src/main/resources/dialogs/ohhimark.txt @@ -0,0 +1,4 @@ + 100 0 35 + +Oh, hi Mark. + \ No newline at end of file diff --git a/src/main/resources/dialogs/roses-are-red.txt b/src/main/resources/dialogs/roses-are-red.txt index 8aea683..6d1abd2 100644 --- a/src/main/resources/dialogs/roses-are-red.txt +++ b/src/main/resources/dialogs/roses-are-red.txt @@ -1,4 +1,4 @@ Roses are red
violets are blue - -1200 -240 4 + -1050 -250 8 unexpected "{"
on line 32 \ No newline at end of file diff --git a/src/main/resources/maps/boss-cellmap.txt b/src/main/resources/maps/boss-cellmap.txt new file mode 100644 index 0000000..bafbaf0 --- /dev/null +++ b/src/main/resources/maps/boss-cellmap.txt @@ -0,0 +1,4 @@ +BLOCK 2 +MOVETO 1 +EVENT 3 +TRIGGER 4 \ No newline at end of file diff --git a/src/main/resources/maps/boss-objectset.txt b/src/main/resources/maps/boss-objectset.txt new file mode 100644 index 0000000..483b4d4 --- /dev/null +++ b/src/main/resources/maps/boss-objectset.txt @@ -0,0 +1,20 @@ +0 0 7 7 7 7 7 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 636 0 638 0 0 0 +0 0 0 637 738 639 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 \ No newline at end of file diff --git a/src/main/resources/maps/boss-tileset.txt b/src/main/resources/maps/boss-tileset.txt new file mode 100644 index 0000000..1f6f6a2 --- /dev/null +++ b/src/main/resources/maps/boss-tileset.txt @@ -0,0 +1,24 @@ + A5_Tiles.png 256 512 32 + Openspace1.png 512 512 32 + Openspace2.png 512 512 32 + D_Inside_House.png 512 512 32 +6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 +6 6 6 22 38 54 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 23 39 55 6 6 6 +6 6 6 24 40 56 6 6 6 +6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 \ No newline at end of file diff --git a/src/main/resources/maps/boss.txt b/src/main/resources/maps/boss.txt new file mode 100644 index 0000000..43cd705 --- /dev/null +++ b/src/main/resources/maps/boss.txt @@ -0,0 +1,21 @@ +9 20 +BLOCK BLOCK block block block block block BLOCK BLOCK +BLOCK EMPTY EMPTY block block block EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY block EMPTY block EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY block block block EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY TRIGGER,ohhimark EMPTY EMPTY EMPTY BLOCK +BLOCK BLOCK BLOCK BLOCK moveto,0,1,office BLOCK BLOCK BLOCK BLOCK \ No newline at end of file diff --git a/src/main/resources/maps/office-cellmap.txt b/src/main/resources/maps/office-cellmap.txt new file mode 100644 index 0000000..bafbaf0 --- /dev/null +++ b/src/main/resources/maps/office-cellmap.txt @@ -0,0 +1,4 @@ +BLOCK 2 +MOVETO 1 +EVENT 3 +TRIGGER 4 \ No newline at end of file diff --git a/src/main/resources/maps/office-objectset.txt b/src/main/resources/maps/office-objectset.txt new file mode 100644 index 0000000..b3389d1 --- /dev/null +++ b/src/main/resources/maps/office-objectset.txt @@ -0,0 +1,12 @@ +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 373 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 390 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \ No newline at end of file diff --git a/src/main/resources/maps/office-tileset.txt b/src/main/resources/maps/office-tileset.txt new file mode 100644 index 0000000..79fd172 --- /dev/null +++ b/src/main/resources/maps/office-tileset.txt @@ -0,0 +1,16 @@ + A5_Tiles.png 256 512 32 + Openspace1.png 512 512 32 + Openspace2.png 512 512 32 + D_Inside_House.png 512 512 32 +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 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 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 +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 86 86 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 86 86 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 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 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 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 6 6 6 6 6 6 6 6 6 6 6 6 \ No newline at end of file diff --git a/src/main/resources/maps/office.txt b/src/main/resources/maps/office.txt new file mode 100644 index 0000000..dbc3db1 --- /dev/null +++ b/src/main/resources/maps/office.txt @@ -0,0 +1,13 @@ +20 12 +BLOCK BLOCK BLOCK BLOCK moveto,0,3,boss BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK block BLOCK BLOCK BLOCK BLOCK block BLOCK BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,openspace EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,openspace EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK +BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK BLOCK block BLOCK BLOCK BLOCK BLOCK block BLOCK BLOCK BLOCK BLOCK block BLOCK BLOCK BLOCK BLOCK block BLOCK BLOCK \ No newline at end of file diff --git a/src/main/resources/maps/openspace.txt b/src/main/resources/maps/openspace.txt index af09e4f..4c00670 100644 --- a/src/main/resources/maps/openspace.txt +++ b/src/main/resources/maps/openspace.txt @@ -14,7 +14,7 @@ BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK EMPTY BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY block EMPTY EMPTY EMPTY block block BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block block EMPTY block block block BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block -BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,0,2,m1 EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,office EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,0,2,m1 EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block EMPTY block EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY block block EMPTY block block block BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block diff --git a/src/main/resources/save/newGame/maps.txt b/src/main/resources/save/newGame/maps.txt index 486efff..b4a3eb2 100644 --- a/src/main/resources/save/newGame/maps.txt +++ b/src/main/resources/save/newGame/maps.txt @@ -4,4 +4,6 @@ m3 m4 m5 m6 -openspace \ No newline at end of file +openspace +office +boss \ No newline at end of file diff --git a/src/main/resources/save/savedGame/events.txt b/src/main/resources/save/savedGame/events.txt index 4f1f566..245388a 100644 --- a/src/main/resources/save/savedGame/events.txt +++ b/src/main/resources/save/savedGame/events.txt @@ -53,3 +53,18 @@ + + office + + + + + boss + + + 4 + 18 + true + + + diff --git a/src/main/resources/save/savedGame/person.txt b/src/main/resources/save/savedGame/person.txt index 3e8a7a4..5249531 100644 --- a/src/main/resources/save/savedGame/person.txt +++ b/src/main/resources/save/savedGame/person.txt @@ -1,5 +1,5 @@ - openspace - 8 - 16 + m5 + 4 + 3 \ No newline at end of file