diff --git a/src/main/java/Game.java b/src/main/java/Game.java index 63e2c93..b0f38af 100644 --- a/src/main/java/Game.java +++ b/src/main/java/Game.java @@ -8,8 +8,8 @@ import java.awt.event.KeyListener; import java.awt.event.WindowEvent; public class Game extends JFrame { - private static final int WINDOW_WIDTH = 11; - private static final int WINDOW_HEIGHT = 11; + private static final int WINDOW_WIDTH = 13; + private static final int WINDOW_HEIGHT = 13; public static final int CELL_SIZE = 50; private static final int KEY_FULLSCREEN = 115; diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/Block.java b/src/main/java/ruscz/game/gameOfProd/Cells/Block.java index f159a30..0cdf7b9 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/Block.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/Block.java @@ -7,14 +7,16 @@ import java.awt.*; public class Block extends Cell { private ImageCell imageCell; + private boolean paint; public Block() { super(-1, -1, WindowOfFreeMove.CELL_SIZE, Color.BLUE); } - public Block(int x, int y, ImageCell imageCell) { + public Block(int x, int y, ImageCell imageCell, boolean paint) { super(x, y, WindowOfFreeMove.CELL_SIZE, Color.BLUE); this.imageCell = imageCell; + this.paint = paint; } public boolean isInBlock(int x, int y) { @@ -25,8 +27,8 @@ public class Block extends Cell { @Override public void paint(Graphics2D g) { super.paint(g); - g.fillOval(getX() * WindowOfFreeMove.CELL_SIZE, getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE); - g.drawImage(imageCell.getImagesOfTiles().get(120), getX() * WindowOfFreeMove.CELL_SIZE, + if (paint) + g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * WindowOfFreeMove.CELL_SIZE, getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); } } \ No newline at end of file diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/EventMoveToCell.java b/src/main/java/ruscz/game/gameOfProd/Cells/EventMoveToCell.java index 87bfb85..875a852 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/EventMoveToCell.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/EventMoveToCell.java @@ -10,6 +10,7 @@ public class EventMoveToCell extends Cell { private WindowOfFreeMove window; private int id; private int directionOut; + private boolean paint; public int getId(){ return id; @@ -22,12 +23,13 @@ public class EventMoveToCell extends Cell { this.map = new Map(WindowOfFreeMove.CANVAS_HEIGHT, WindowOfFreeMove.CANVAS_WIDTH,false); } - public EventMoveToCell(int id, int directionOut, int x, int y, Map map, WindowOfFreeMove window){ + public EventMoveToCell(int id, int directionOut, int x, int y, Map map, WindowOfFreeMove window, boolean paint){ super(x,y, WindowOfFreeMove.CELL_SIZE, Color.green); this.id = id; this.directionOut = directionOut; this.map = map; this.window = window; + this.paint = paint; } public int getDirectionOut() { return directionOut; } @@ -44,8 +46,9 @@ public class EventMoveToCell extends Cell { @Override public void paint(Graphics2D g) { super.paint(g); - g.drawImage(window.getMapManager().getActualMap().getImageCell().getImagesOfTiles().get(277), getX() * WindowOfFreeMove.CELL_SIZE, + if (paint) + g.drawImage(window.getMapManager().getActualMap().getImageCell().getImagesOfTiles().get(window.getMapManager().getActualMap().getImageCell().getImageFromCellMap("MOVETO")), getX() * WindowOfFreeMove.CELL_SIZE, getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); - g.drawString(Integer.toString(getId()), getX()* WindowOfFreeMove.CELL_SIZE, getY()* WindowOfFreeMove.CELL_SIZE); +// g.drawString(Integer.toString(getId()), getX()* WindowOfFreeMove.CELL_SIZE, getY()* WindowOfFreeMove.CELL_SIZE); } } diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java b/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java index 03189fc..68582cd 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java @@ -16,13 +16,15 @@ public class InteractionCell extends Cell { private Scanner scanner; private ImageCell imageCell; private WindowOfFreeMove window; + private boolean paint; - public InteractionCell(int x, int y, String message, Dialog dialog, ImageCell imageCell, WindowOfFreeMove window) { + public InteractionCell(int x, int y, String message, Dialog dialog, ImageCell imageCell, WindowOfFreeMove window, boolean paint) { super(x, y, WindowOfFreeMove.CELL_SIZE, Color.ORANGE); this.message = message; this.dialog = dialog; this.imageCell = imageCell; this.window = window; + this.paint = paint; } public void startEvent() { @@ -114,7 +116,8 @@ public class InteractionCell extends Cell { @Override public void paint(Graphics2D g) { super.paint(g); - g.drawImage(imageCell.getImagesOfTiles().get(334), getX() * WindowOfFreeMove.CELL_SIZE, + if (paint) + g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("EVENT")), getX() * WindowOfFreeMove.CELL_SIZE, getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); } diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/Person.java b/src/main/java/ruscz/game/gameOfProd/Cells/Person.java index d549fbc..2f7c79a 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/Person.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/Person.java @@ -113,7 +113,7 @@ public class Person extends Cell { map.findEventByXY(x, y).moveToMap(); } } else { - if (!map.isInteractionCell(x, y)) //TODO isBusyCell + if (!map.isInteractionCell(x, y) && !map.isBusyCell(x, y)) { set(x, y); } diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/TriggerCell.java b/src/main/java/ruscz/game/gameOfProd/Cells/TriggerCell.java index bcf54d9..cdf0d0d 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/TriggerCell.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/TriggerCell.java @@ -10,7 +10,7 @@ public class TriggerCell extends InteractionCell { private boolean isActive; public TriggerCell(int x, int y, String message, Dialog dialog, ImageCell imageCell, WindowOfFreeMove window) { - super(x, y, message, dialog, imageCell, window); + super(x, y, message, dialog, imageCell, window, false); this.isActive = true; } @@ -23,7 +23,7 @@ public class TriggerCell extends InteractionCell { @Override public void paint(Graphics2D g) { super.paint(g); - g.drawImage(super.getImageCell().getImagesOfTiles().get(147), getX() * WindowOfFreeMove.CELL_SIZE, + g.drawImage(super.getImageCell().getImagesOfTiles().get(super.getImageCell().getImageFromCellMap("TRIGGER")), getX() * WindowOfFreeMove.CELL_SIZE, getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); } diff --git a/src/main/java/ruscz/game/gameOfProd/Dialog/Dialog.java b/src/main/java/ruscz/game/gameOfProd/Dialog/Dialog.java index d15a2d2..9a42cbf 100644 --- a/src/main/java/ruscz/game/gameOfProd/Dialog/Dialog.java +++ b/src/main/java/ruscz/game/gameOfProd/Dialog/Dialog.java @@ -53,7 +53,7 @@ public class Dialog { text.setBounds(cellSize * 3, cellSize / 2, size.width, size.height); dialogBar.setImageDialog(imageDialog); } else { - text.setBounds(cellSize / 2, cellSize / 2, size.width, size.height); + text.setBounds(cellSize, cellSize / 2, size.width, size.height); dialogBar.unsetImageDialog(); } diff --git a/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java b/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java index 5db3334..9710fde 100644 --- a/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java +++ b/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java @@ -1,5 +1,6 @@ package ruscz.game.gameOfProd.Image; +import ruscz.game.gameOfProd.Cells.Cell; import ruscz.game.gameOfProd.Windows.WindowOfFreeMove; import javax.imageio.ImageIO; @@ -8,26 +9,31 @@ import java.awt.image.BufferedImage; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; +import java.util.HashMap; import java.util.LinkedList; import java.util.Scanner; public class ImageCell { private static BufferedImage image; - private static LinkedList imagesOfTiles; + private LinkedList imagesOfTiles; + private HashMap cellMap; private int[][] mapBackground; + private int[][] mapForeground; public void readMapFile(String name) { try { mapBackground = new int[WindowOfFreeMove.CANVAS_WIDTH][WindowOfFreeMove.CANVAS_HEIGHT]; - File mapFile = new File("src/main/resources/maps/" + name + ".txt"); + mapForeground = new int[WindowOfFreeMove.CANVAS_WIDTH][WindowOfFreeMove.CANVAS_HEIGHT]; + File mapFile = new File("src/main/resources/maps/" + name + "-tileset.txt"); Scanner scanner = new Scanner(mapFile); int j = 0; while (scanner.hasNextLine()) { String data = scanner.nextLine(); if (data.contains("")) { String[] mapInfo = data.split(" "); - ImageTileset(mapInfo); - } else { + imageTileset(mapInfo); + } + else { String[] mapColumn = data.split(" "); for (int i = 0; i < mapColumn.length; i++) { mapBackground[i][j] = Integer.parseInt(mapColumn[i]); @@ -35,13 +41,15 @@ public class ImageCell { j++; } } + loadCellMap(name); + imageObjectset(name); } catch (FileNotFoundException e) { System.out.println("An error occurred."); e.printStackTrace(); } } - private void ImageTileset(String[] mapInfo) { + private void imageTileset(String[] mapInfo) { try { image = ImageIO.read(new File("src/main/resources/" + mapInfo[1])); } catch (IOException e) { @@ -73,6 +81,42 @@ public class ImageCell { } } + public void imageObjectset(String file) { + try { + File objectFile = new File("src/main/resources/maps/" + file + "-objectset.txt"); + Scanner scanner = new Scanner(objectFile); + int j = 0; + while (scanner.hasNextLine()) { + String[] objects = scanner.nextLine().split(" "); + for (int i = 0; i < objects.length; i++) { + mapForeground[i][j] = Integer.parseInt(objects[i]); + } + j++; + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + } + + public void loadCellMap(String file) { + try { + File mapFile = new File("src/main/resources/maps/" + file + "-cellmap.txt"); + Scanner scanner = new Scanner(mapFile); + cellMap = new HashMap(); + while (scanner.hasNextLine()) { + String data = scanner.nextLine(); + String[] cellInfo = data.split(" "); + cellMap.put(cellInfo[0], Integer.parseInt(cellInfo[1])); + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + } + + public int getImageFromCellMap(String cell) { + return cellMap.get(cell); + } + public LinkedList getImagesOfTiles() { return imagesOfTiles; } @@ -81,4 +125,11 @@ public class ImageCell { g.drawImage(imagesOfTiles.get(mapBackground[x][y]), x * WindowOfFreeMove.CELL_SIZE, y * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); } + + public void paintForeground(Graphics g, int x, int y) { + int imageNum = mapForeground[x][y]; + if (imageNum > 0) + g.drawImage(imagesOfTiles.get(imageNum), x * WindowOfFreeMove.CELL_SIZE, + y * 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 c7c41a8..f55182a 100644 --- a/src/main/java/ruscz/game/gameOfProd/Map/Map.java +++ b/src/main/java/ruscz/game/gameOfProd/Map/Map.java @@ -113,7 +113,7 @@ public class Map { Map map = new Map(mapArray); map.setName(name); map.npcs = new LinkedList<>(); - map.getImageCell().readMapFile(name + "-tileset"); + map.getImageCell().readMapFile(name); LinkedList listOfMoveToCells = new LinkedList<>(); map.canvasSize[0] = Integer.parseInt(size[0]); map.canvasSize[1] = Integer.parseInt(size[1]); @@ -134,17 +134,23 @@ public class Map { String[] line = data.split(" "); for (int x = 0; x < Integer.parseInt(size[0]); x++) { TypeOfCell cellType = null; - if (line[x].equals("BLOCK")) { + if (line[x].equals("BLOCK") || line[x].equals("block")) { cellType = TypeOfCell.BLOCK; map.getMapArray()[x][y] = cellType; - map.getBlocks().add(new Block(x, y, map.getImageCell())); + if (line[x].equals("BLOCK")) + map.getBlocks().add(new Block(x, y, map.getImageCell(), true)); + else + map.getBlocks().add(new Block(x, y, map.getImageCell(), false)); } else if (line[x].equals("EMPTY")) { cellType = TypeOfCell.EMPTY; map.getMapArray()[x][y] = cellType; - } else if (line[x].contains("INTER")) { + } else if (line[x].contains("INTER") || line[x].contains("inter")) { ImageCell imageCell = new ImageCell(); String[] event = line[x].split(","); - map.addInteractionEvent(new InteractionCell(x, y, event[1], new Dialog(window.getDialogBar()), map.getImageCell(), window)); + if (line[x].contains("INTER")) + map.addInteractionEvent(new InteractionCell(x, y, event[1], new Dialog(window.getDialogBar()), map.getImageCell(), window, true)); + else + map.addInteractionEvent(new InteractionCell(x, y, event[1], new Dialog(window.getDialogBar()), map.getImageCell(), window, false)); } else if (line[x].contains("TRIGGER")) { ImageCell imageCell = new ImageCell(); String[] trigger = line[x].split(","); @@ -167,9 +173,12 @@ public class Map { String data = scanner.nextLine(); String[] line = data.split(" "); for (int x = 0; x < Integer.parseInt(size[0]); x++) { - if (line[x].contains("MOVETO")) { + if (line[x].contains("MOVETO") || line[x].contains("moveto")) { String[] moveTo = line[x].split(","); - map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(moveTo[1]), Integer.parseInt(moveTo[2]), x, y, findMapByName(moveTo[3], window), window)); + if (line[x].contains("MOVETO")) + map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(moveTo[1]), Integer.parseInt(moveTo[2]), x, y, findMapByName(moveTo[3], window), window, true)); + else + map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(moveTo[1]), Integer.parseInt(moveTo[2]), x, y, findMapByName(moveTo[3], window), window, false)); } } y++; diff --git a/src/main/java/ruscz/game/gameOfProd/Map/MapManager.java b/src/main/java/ruscz/game/gameOfProd/Map/MapManager.java index 455a1c9..dddc6f2 100644 --- a/src/main/java/ruscz/game/gameOfProd/Map/MapManager.java +++ b/src/main/java/ruscz/game/gameOfProd/Map/MapManager.java @@ -55,7 +55,7 @@ public class MapManager { for (int i = 0; i < actualMap.getMapArray().length; i++) { for (int j = 0; j < actualMap.getMapArray().length; j++) { if (actualMap.getMapArray()[i][j] == TypeOfCell.BLOCK && !actualMap.isBusyCell(i, j)) { - actualMap.getBlocks().add(new Block(i, j, actualMap.getImageCell())); + actualMap.getBlocks().add(new Block(i, j, actualMap.getImageCell(), true)); } if (actualMap.getMapArray()[i][j] == TypeOfCell.SPAWNPOINT && actualMap.getIdExit() == 0) { diff --git a/src/main/java/ruscz/game/gameOfProd/Save/LoadManager.java b/src/main/java/ruscz/game/gameOfProd/Save/LoadManager.java index f29ce07..9010374 100644 --- a/src/main/java/ruscz/game/gameOfProd/Save/LoadManager.java +++ b/src/main/java/ruscz/game/gameOfProd/Save/LoadManager.java @@ -111,12 +111,10 @@ public class LoadManager { while (scanner.hasNextLine()) { if (scanner.nextLine().equals("")) { map = Map.findMapByName(getValue(scanner.nextLine()), window); - System.out.println(map.getName()); } else if (scanner.nextLine().contains("")) { TriggerCell triggerCell = map.findTriggerByXY(Integer.parseInt(getValue(scanner.nextLine())), Integer.parseInt(getValue(scanner.nextLine()))); triggerCell.setActive(Boolean.parseBoolean(getValue(scanner.nextLine()))); - System.out.println(triggerCell.getX()); } else { scanner.nextLine(); diff --git a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java index 7ada2b3..cf1fa1d 100644 --- a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java +++ b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java @@ -20,8 +20,8 @@ public class WindowOfFreeMove extends JLayeredPane { public static final int CELL_SIZE = 50; public static int CANVAS_WIDTH = 50; public static int CANVAS_HEIGHT = 50; - public static final int WINDOW_WIDTH = 11; - public static final int WINDOW_HEIGHT = 11; + public static final int WINDOW_WIDTH = 13; + public static final int WINDOW_HEIGHT = 13; private static boolean canPersonMove; private static int nextMove; @@ -149,7 +149,7 @@ public class WindowOfFreeMove extends JLayeredPane { m6.setNpcs(npc2); musicManager = new MusicManager("Town1.wav"); - musicManager.playMusic(); +// musicManager.playMusic(); Timer timer = new Timer(10, actionEvent -> { mapManager.getActualMap().getPerson().move(); camera.moveCamera(); @@ -202,6 +202,11 @@ public class WindowOfFreeMove extends JLayeredPane { for (Person person : mapManager.getActualMap().getNpcs()) { person.paint(g2D); } + for (int i = 0; i < mapManager.getActualMap().getCanvasSize()[0]; i++) { + for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[1]; j++) { + mapManager.getActualMap().getImageCell().paintForeground(g2D, i, j); + } + } } } } diff --git a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfMenu.java b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfMenu.java index ed932f3..9acf783 100644 --- a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfMenu.java +++ b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfMenu.java @@ -7,8 +7,8 @@ import java.awt.event.ActionListener; import java.awt.event.WindowEvent; public class WindowOfMenu extends JLayeredPane { - public static final int WINDOW_WIDTH = 11; - public static final int WINDOW_HEIGHT = 11; + public static final int WINDOW_WIDTH = 13; + public static final int WINDOW_HEIGHT = 13; public static final int CELL_SIZE = 50; private JFrame game; diff --git a/src/main/resources/A5_Tiles.png b/src/main/resources/A5_Tiles.png new file mode 100644 index 0000000..d65bf6f Binary files /dev/null and b/src/main/resources/A5_Tiles.png differ diff --git a/src/main/resources/D_Inside_House.png b/src/main/resources/D_Inside_House.png new file mode 100644 index 0000000..f3f38d6 Binary files /dev/null and b/src/main/resources/D_Inside_House.png differ diff --git a/src/main/resources/Openspace1.png b/src/main/resources/Openspace1.png new file mode 100644 index 0000000..a4d198d Binary files /dev/null and b/src/main/resources/Openspace1.png differ diff --git a/src/main/resources/Openspace2.png b/src/main/resources/Openspace2.png new file mode 100644 index 0000000..81cfe81 Binary files /dev/null and b/src/main/resources/Openspace2.png differ diff --git a/src/main/resources/dialogs/boobs.txt b/src/main/resources/dialogs/boobs.txt index 78f5aea..c1e8118 100644 --- a/src/main/resources/dialogs/boobs.txt +++ b/src/main/resources/dialogs/boobs.txt @@ -1,4 +1,6 @@ What did one boob say to the other? You are my breastfriend *badumm tits* +ěščřžzýáíé +Главное чтобы я шарила в том, что вы творите \ No newline at end of file diff --git a/src/main/resources/dialogs/laugh.txt b/src/main/resources/dialogs/laugh.txt new file mode 100644 index 0000000..f6440b2 --- /dev/null +++ b/src/main/resources/dialogs/laugh.txt @@ -0,0 +1,2 @@ +*smack*
LAUGH + \ No newline at end of file diff --git a/src/main/resources/dialogs/minecraft.txt b/src/main/resources/dialogs/minecraft.txt new file mode 100644 index 0000000..b2d0933 --- /dev/null +++ b/src/main/resources/dialogs/minecraft.txt @@ -0,0 +1,2 @@ +this bad boy can fit so many minecraft servers + \ No newline at end of file diff --git a/src/main/resources/maps/m1-cellmap.txt b/src/main/resources/maps/m1-cellmap.txt new file mode 100644 index 0000000..562ec79 --- /dev/null +++ b/src/main/resources/maps/m1-cellmap.txt @@ -0,0 +1,4 @@ +BLOCK 120 +MOVETO 277 +EVENT 334 +TRIGGER 147 \ No newline at end of file diff --git a/src/main/resources/maps/m1-objectset.txt b/src/main/resources/maps/m1-objectset.txt new file mode 100644 index 0000000..ca48cd3 --- /dev/null +++ b/src/main/resources/maps/m1-objectset.txt @@ -0,0 +1,10 @@ +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/m1.txt b/src/main/resources/maps/m1.txt index b444630..fc7d34f 100644 --- a/src/main/resources/maps/m1.txt +++ b/src/main/resources/maps/m1.txt @@ -3,7 +3,7 @@ BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,4,3,m4 BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK -BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,0,4,openspace BLOCK EMPTY EMPTY INTER,first-dialog EMPTY INTER,dialog-test EMPTY EMPTY EMPTY BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK diff --git a/src/main/resources/maps/m2-cellmap.txt b/src/main/resources/maps/m2-cellmap.txt new file mode 100644 index 0000000..562ec79 --- /dev/null +++ b/src/main/resources/maps/m2-cellmap.txt @@ -0,0 +1,4 @@ +BLOCK 120 +MOVETO 277 +EVENT 334 +TRIGGER 147 \ No newline at end of file diff --git a/src/main/resources/maps/m2-objectset.txt b/src/main/resources/maps/m2-objectset.txt new file mode 100644 index 0000000..ca48cd3 --- /dev/null +++ b/src/main/resources/maps/m2-objectset.txt @@ -0,0 +1,10 @@ +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/m3-cellmap.txt b/src/main/resources/maps/m3-cellmap.txt new file mode 100644 index 0000000..562ec79 --- /dev/null +++ b/src/main/resources/maps/m3-cellmap.txt @@ -0,0 +1,4 @@ +BLOCK 120 +MOVETO 277 +EVENT 334 +TRIGGER 147 \ No newline at end of file diff --git a/src/main/resources/maps/m3-objectset.txt b/src/main/resources/maps/m3-objectset.txt new file mode 100644 index 0000000..ca48cd3 --- /dev/null +++ b/src/main/resources/maps/m3-objectset.txt @@ -0,0 +1,10 @@ +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/m4-cellmap.txt b/src/main/resources/maps/m4-cellmap.txt new file mode 100644 index 0000000..562ec79 --- /dev/null +++ b/src/main/resources/maps/m4-cellmap.txt @@ -0,0 +1,4 @@ +BLOCK 120 +MOVETO 277 +EVENT 334 +TRIGGER 147 \ No newline at end of file diff --git a/src/main/resources/maps/m4-objectset.txt b/src/main/resources/maps/m4-objectset.txt new file mode 100644 index 0000000..ca48cd3 --- /dev/null +++ b/src/main/resources/maps/m4-objectset.txt @@ -0,0 +1,10 @@ +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/m5-cellmap.txt b/src/main/resources/maps/m5-cellmap.txt new file mode 100644 index 0000000..562ec79 --- /dev/null +++ b/src/main/resources/maps/m5-cellmap.txt @@ -0,0 +1,4 @@ +BLOCK 120 +MOVETO 277 +EVENT 334 +TRIGGER 147 \ No newline at end of file diff --git a/src/main/resources/maps/m5-objectset.txt b/src/main/resources/maps/m5-objectset.txt new file mode 100644 index 0000000..ca48cd3 --- /dev/null +++ b/src/main/resources/maps/m5-objectset.txt @@ -0,0 +1,10 @@ +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/m6-cellmap.txt b/src/main/resources/maps/m6-cellmap.txt new file mode 100644 index 0000000..562ec79 --- /dev/null +++ b/src/main/resources/maps/m6-cellmap.txt @@ -0,0 +1,4 @@ +BLOCK 120 +MOVETO 277 +EVENT 334 +TRIGGER 147 \ No newline at end of file diff --git a/src/main/resources/maps/m6-objectset.txt b/src/main/resources/maps/m6-objectset.txt new file mode 100644 index 0000000..ca48cd3 --- /dev/null +++ b/src/main/resources/maps/m6-objectset.txt @@ -0,0 +1,10 @@ +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/openspace-cellmap.txt b/src/main/resources/maps/openspace-cellmap.txt new file mode 100644 index 0000000..bafbaf0 --- /dev/null +++ b/src/main/resources/maps/openspace-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/openspace-objectset.txt b/src/main/resources/maps/openspace-objectset.txt new file mode 100644 index 0000000..4137613 --- /dev/null +++ b/src/main/resources/maps/openspace-objectset.txt @@ -0,0 +1,27 @@ +0 0 198 214 0 0 0 0 0 0 0 0 0 0 0 410 426 0 0 0 +0 753 199 215 0 0 0 244 0 0 0 0 0 0 0 411 427 0 0 0 +0 753 0 0 0 0 0 245 0 0 0 0 0 0 0 0 0 0 0 0 +0 754 0 0 0 0 0 246 0 0 0 0 0 0 0 720 752 0 0 8 +0 373 0 0 0 0 0 0 0 0 0 0 0 0 423 721 753 439 0 8 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 423 721 753 439 0 8 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 423 721 753 439 0 8 +0 525 0 524 0 525 0 524 0 0 0 0 0 0 423 722 754 439 0 8 +0 525 0 524 0 525 0 524 0 0 0 0 0 0 0 0 0 0 0 0 +0 525 0 524 0 525 0 524 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 397 397 0 413 429 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 398 398 0 414 430 0 0 0 0 0 0 0 391 638 0 636 439 8 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 722 639 0 637 754 8 +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 636 439 0 391 638 0 +0 476 0 0 0 0 0 0 0 0 0 0 0 0 637 754 0 722 639 8 +0 477 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 8 +0 423 638 0 636 391 0 636 439 0 0 423 638 0 636 391 0 636 439 0 +0 722 639 0 637 754 0 637 754 0 0 722 639 0 637 754 0 637 754 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 8 +0 636 439 0 391 638 0 636 439 0 0 636 439 0 391 638 0 636 439 8 +0 637 754 0 722 639 0 637 754 0 0 637 754 0 722 639 0 637 754 0 +0 0 7 7 7 0 7 7 7 0 0 7 7 7 0 7 7 7 0 0 \ No newline at end of file diff --git a/src/main/resources/maps/openspace-tileset.txt b/src/main/resources/maps/openspace-tileset.txt new file mode 100644 index 0000000..83604df --- /dev/null +++ b/src/main/resources/maps/openspace-tileset.txt @@ -0,0 +1,31 @@ + 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 117 117 117 117 117 117 117 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 117 117 117 117 117 117 117 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 117 117 117 117 117 117 117 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 117 117 117 117 117 117 117 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 117 117 117 117 117 117 117 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 33 33 33 33 33 33 33 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 33 33 33 33 33 33 33 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 33 33 33 33 33 33 33 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 33 33 33 33 33 33 33 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 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 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +6 6 6 6 6 6 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/openspace.txt b/src/main/resources/maps/openspace.txt new file mode 100644 index 0000000..5d36b85 --- /dev/null +++ b/src/main/resources/maps/openspace.txt @@ -0,0 +1,28 @@ +20 27 +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK +BLOCK block block block EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY inter,laugh inter,laugh EMPTY EMPTY BLOCK +BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block +BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block +BLOCK BLOCK EMPTY BLOCK BLOCK BLOCK EMPTY BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block +BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block +BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block +BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK EMPTY BLOCK BLOCK BLOCK +BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK 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 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,0,2,m1 EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY 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 block EMPTY EMPTY EMPTY block EMPTY EMPTY block EMPTY EMPTY block EMPTY EMPTY EMPTY block EMPTY EMPTY block BLOCK +BLOCK block block EMPTY block block EMPTY block block EMPTY EMPTY block block EMPTY block block EMPTY 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 block EMPTY block EMPTY EMPTY EMPTY block EMPTY EMPTY EMPTY block EMPTY block EMPTY EMPTY EMPTY block block +BLOCK block block EMPTY block block EMPTY block block EMPTY EMPTY block block EMPTY block block EMPTY block block 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/save/newGame/maps.txt b/src/main/resources/save/newGame/maps.txt index 68cfd6b..486efff 100644 --- a/src/main/resources/save/newGame/maps.txt +++ b/src/main/resources/save/newGame/maps.txt @@ -3,4 +3,5 @@ m2 m3 m4 m5 -m6 \ No newline at end of file +m6 +openspace \ 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 5807f8a..4f1f566 100644 --- a/src/main/resources/save/savedGame/events.txt +++ b/src/main/resources/save/savedGame/events.txt @@ -48,3 +48,8 @@
+ + openspace + + + diff --git a/src/main/resources/save/savedGame/person-DESKTOP-TL25DTN-2.txt b/src/main/resources/save/savedGame/person-DESKTOP-TL25DTN-2.txt new file mode 100644 index 0000000..ee5b150 --- /dev/null +++ b/src/main/resources/save/savedGame/person-DESKTOP-TL25DTN-2.txt @@ -0,0 +1,5 @@ + + m1 + 1 + 7 + \ No newline at end of file diff --git a/src/main/resources/save/savedGame/person-DESKTOP-TL25DTN.txt b/src/main/resources/save/savedGame/person-DESKTOP-TL25DTN.txt new file mode 100644 index 0000000..ee5b150 --- /dev/null +++ b/src/main/resources/save/savedGame/person-DESKTOP-TL25DTN.txt @@ -0,0 +1,5 @@ + + m1 + 1 + 7 + \ No newline at end of file diff --git a/src/main/resources/save/savedGame/person.txt b/src/main/resources/save/savedGame/person.txt index fd8d8e6..3e8a7a4 100644 --- a/src/main/resources/save/savedGame/person.txt +++ b/src/main/resources/save/savedGame/person.txt @@ -1,5 +1,5 @@ - m6 - 11 - 1 + openspace + 8 + 16 \ No newline at end of file