changed drawing of elements

This commit is contained in:
musilto9 2020-04-12 17:11:30 +02:00
parent 4a18642f0c
commit 5d2555b91b
19 changed files with 169 additions and 195 deletions

View File

@ -27,7 +27,6 @@ public class Game extends JFrame {
//tohle spustí na začátku menu //tohle spustí na začátku menu
add(menu); add(menu);
menu.start();
//tohle spustí na začátku hru //tohle spustí na začátku hru
// add(freeMove); // add(freeMove);
@ -41,6 +40,8 @@ public class Game extends JFrame {
setVisible(true); setVisible(true);
getContentPane().setBackground(Color.BLACK); getContentPane().setBackground(Color.BLACK);
setExtendedState(MAXIMIZED_BOTH); setExtendedState(MAXIMIZED_BOTH);
getContentPane().getComponent(0).setLocation((Toolkit.getDefaultToolkit().getScreenSize().width - (WINDOW_WIDTH * CELL_SIZE)) / 2, (Toolkit.getDefaultToolkit().getScreenSize().height - (WINDOW_HEIGHT * CELL_SIZE)) / 2);
getContentPane().getComponent(0).setSize(WINDOW_WIDTH * CELL_SIZE, WINDOW_HEIGHT * CELL_SIZE);
} }
public Game game() {return this;} public Game game() {return this;}

View File

@ -9,10 +9,6 @@ public class Block extends Cell {
private ImageCell imageCell; private ImageCell imageCell;
private boolean paint; private boolean paint;
public Block() {
super(-1, -1, WindowOfFreeMove.CELL_SIZE, Color.BLUE);
}
public Block(int x, int y, ImageCell imageCell, boolean paint) { public Block(int x, int y, ImageCell imageCell, boolean paint) {
super(x, y, WindowOfFreeMove.CELL_SIZE, Color.BLUE); super(x, y, WindowOfFreeMove.CELL_SIZE, Color.BLUE);
this.imageCell = imageCell; this.imageCell = imageCell;
@ -20,15 +16,14 @@ public class Block extends Cell {
} }
public boolean isInBlock(int x, int y) { public boolean isInBlock(int x, int y) {
return (this. return (this.getX() == x) && (this.getY() == y);
getX() == x) && (this.getY() == y);
} }
@Override @Override
public void paint(Graphics2D g) { public void paint(Graphics2D g) {
super.paint(g); super.paint(g);
if (paint) if (paint)
g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * WindowOfFreeMove.CELL_SIZE, g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * getSize(),
getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); getY() * getSize(), getSize(), getSize(), null);
} }
} }

View File

@ -30,6 +30,8 @@ public class Cell {
return y; return y;
} }
public int getSize() { return size; }
public void paint(Graphics2D g) { public void paint(Graphics2D g) {
g.setColor(color); g.setColor(color);
} }

View File

@ -27,8 +27,8 @@ public class DoorCell extends InteractionCell {
@Override @Override
public void paint(Graphics2D g) { public void paint(Graphics2D g) {
int open = isOpen ? 1 : 0; int open = isOpen ? 1 : 0;
g.drawImage(super.getImageCell().getImagesOfTiles().get(super.getImageCell().getImageFromCellMap("DOOR") + open), getX() * WindowOfFreeMove.CELL_SIZE, g.drawImage(super.getImageCell().getImagesOfTiles().get(super.getImageCell().getImageFromCellMap("DOOR") + open), getX() * getSize(),
getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); getY() * getSize(), getSize(), getSize(), null);
} }
public boolean isOpen() { public boolean isOpen() {

View File

@ -16,13 +16,6 @@ public class EventMoveToCell extends Cell {
return id; return id;
} }
public EventMoveToCell(int id, int directionOut, int x, int y) {
super(x, y, WindowOfFreeMove.CELL_SIZE, Color.green);
this.id = id;
this.directionOut = directionOut;
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, boolean paint){ public EventMoveToCell(int id, int directionOut, int x, int y, Map map, WindowOfFreeMove window, boolean paint){
super(x,y, WindowOfFreeMove.CELL_SIZE, Color.green); super(x,y, WindowOfFreeMove.CELL_SIZE, Color.green);
this.id = id; this.id = id;
@ -47,8 +40,8 @@ public class EventMoveToCell extends Cell {
public void paint(Graphics2D g) { public void paint(Graphics2D g) {
super.paint(g); super.paint(g);
if (paint) if (paint)
g.drawImage(window.getMapManager().getActualMap().getImageCell().getImagesOfTiles().get(window.getMapManager().getActualMap().getImageCell().getImageFromCellMap("MOVETO")), getX() * WindowOfFreeMove.CELL_SIZE, g.drawImage(window.getMapManager().getActualMap().getImageCell().getImagesOfTiles().get(window.getMapManager().getActualMap().getImageCell().getImageFromCellMap("MOVETO")), getX() * getSize(),
getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); getY() * getSize(), getSize(), getSize(), 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);
} }
} }

View File

@ -120,8 +120,8 @@ public class InteractionCell extends Cell {
public void paint(Graphics2D g) { public void paint(Graphics2D g) {
super.paint(g); super.paint(g);
if (paint) if (paint)
g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("EVENT")), getX() * WindowOfFreeMove.CELL_SIZE, g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("EVENT")), getX() * getSize(),
getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); getY() * getSize(), getSize(), getSize(), null);
} }
public ImageCell getImageCell() { public ImageCell getImageCell() {

View File

@ -71,7 +71,7 @@ public class Npc extends Person {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
g.drawImage(image, getX() * WindowOfFreeMove.CELL_SIZE, g.drawImage(image, getX() * getSize(),
getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); getY() * getSize(), getSize(), getSize(), null);
} }
} }

View File

@ -14,7 +14,7 @@ public class Person extends Cell {
private int directionMoveLast; private int directionMoveLast;
private boolean isMoving; private boolean isMoving;
private static boolean isInEvent; private static boolean isInEvent;
private int size; private int distanceOfAnimation;
public Map getMap() { public Map getMap() {
return map; return map;
@ -34,7 +34,7 @@ public class Person extends Cell {
this.map = map; this.map = map;
this.directionSight = 3; this.directionSight = 3;
this.isMoving = false; this.isMoving = false;
this.size = WindowOfFreeMove.CELL_SIZE; this.distanceOfAnimation = WindowOfFreeMove.CELL_SIZE;
} }
public Person(int x, int y, Map map) { public Person(int x, int y, Map map) {
@ -43,7 +43,7 @@ public class Person extends Cell {
this.directionSight = 3; this.directionSight = 3;
this.isMoving = false; this.isMoving = false;
this.map = map; this.map = map;
this.size = WindowOfFreeMove.CELL_SIZE; this.distanceOfAnimation = WindowOfFreeMove.CELL_SIZE;
} }
public void setDirectionMove(int directionMove) { public void setDirectionMove(int directionMove) {
@ -190,7 +190,7 @@ public class Person extends Cell {
public void stopPerson(){ public void stopPerson(){
directionMove = 0; directionMove = 0;
directionMoveLast = 0; directionMoveLast = 0;
size = 0; distanceOfAnimation = 0;
isMoving = false; isMoving = false;
} }
@ -201,7 +201,7 @@ public class Person extends Cell {
@Override @Override
public void paint(Graphics2D g) { public void paint(Graphics2D g) {
super.paint(g); super.paint(g);
if (size == 0) { if (distanceOfAnimation == 0) {
isMoving = false; isMoving = false;
} }
if (isMoving) { if (isMoving) {
@ -219,16 +219,18 @@ public class Person extends Cell {
animateMove(g, 0); animateMove(g, 0);
break; break;
} }
if (size > 0 && isMoving) { if (distanceOfAnimation > 0 && isMoving) {
size -= 2; distanceOfAnimation -= 2;
} }
else { else {
isMoving = false; isMoving = false;
} }
} else { } else {
size = WindowOfFreeMove.CELL_SIZE; distanceOfAnimation = getSize();
g.drawImage(imagePerson.getImagesOfDirection()[directionSight + 4], getX() * WindowOfFreeMove.CELL_SIZE, // g.drawImage(imagePerson.getImagesOfDirection()[directionSight + 4], getX() * getSize(),
getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); // getY() * getSize(), getSize(), getSize(), null);
g.drawImage(imagePerson.getImagesOfDirection()[directionSight + 4], getX() * getSize(),
getY() * getSize() - (getSize() * 3/5), getSize(), getSize() * 3/2, null);
} }
} }
@ -237,30 +239,43 @@ public class Person extends Cell {
int Ysize = 0; int Ysize = 0;
switch (direction) { switch (direction) {
case 0: case 0:
Ysize -= size; Ysize -= distanceOfAnimation;
break; break;
case 1: case 1:
Xsize = size; Xsize = distanceOfAnimation;
break; break;
case 2: case 2:
Ysize = size; Ysize = distanceOfAnimation;
break; break;
case 3: case 3:
Xsize -= size; Xsize -= distanceOfAnimation;
break; break;
} }
if (size > WindowOfFreeMove.CELL_SIZE * 3 / 4) { // if (distanceOfAnimation > getSize() * 3 / 4) {
g.drawImage(imagePerson.getImagesOfDirection()[direction], getX() * WindowOfFreeMove.CELL_SIZE + Xsize, // g.drawImage(imagePerson.getImagesOfDirection()[direction], getX() * getSize() + Xsize,
getY() * WindowOfFreeMove.CELL_SIZE + Ysize, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); // getY() * getSize() + Ysize, getSize(), getSize(), null);
} else if (size > WindowOfFreeMove.CELL_SIZE / 2) { // } else if (distanceOfAnimation > getSize() / 2) {
g.drawImage(imagePerson.getImagesOfDirection()[direction + 4], getX() * WindowOfFreeMove.CELL_SIZE + Xsize, // g.drawImage(imagePerson.getImagesOfDirection()[direction + 4], getX() * getSize() + Xsize,
getY() * WindowOfFreeMove.CELL_SIZE + Ysize, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); // getY() * getSize() + Ysize, getSize(), getSize(), null);
} else if (size > WindowOfFreeMove.CELL_SIZE / 4) { // } else if (distanceOfAnimation > getSize() / 4) {
g.drawImage(imagePerson.getImagesOfDirection()[direction + 8], getX() * WindowOfFreeMove.CELL_SIZE + Xsize, // g.drawImage(imagePerson.getImagesOfDirection()[direction + 8], getX() * getSize() + Xsize,
getY() * WindowOfFreeMove.CELL_SIZE + Ysize, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); // getY() * getSize() + Ysize, getSize(), getSize(), null);
// } else{
// g.drawImage(imagePerson.getImagesOfDirection()[direction + 4], getX() * getSize() + Xsize,
// getY() * getSize() + Ysize, getSize(), getSize(), null);
// }
if (distanceOfAnimation > getSize() * 3 / 4) {
g.drawImage(imagePerson.getImagesOfDirection()[direction], getX() * getSize() + Xsize,
getY() * getSize() + Ysize - (getSize() * 3/5), getSize(), getSize() * 3/2, null);
} else if (distanceOfAnimation > getSize() / 2) {
g.drawImage(imagePerson.getImagesOfDirection()[direction + 4], getX() * getSize() + Xsize,
getY() * getSize() + Ysize - (getSize() * 3/5), getSize(), getSize() * 3/2, null);
} else if (distanceOfAnimation > getSize() / 4) {
g.drawImage(imagePerson.getImagesOfDirection()[direction + 8], getX() * getSize() + Xsize,
getY() * getSize() + Ysize - (getSize() * 3/5), getSize(), getSize() * 3/2, null);
} else{ } else{
g.drawImage(imagePerson.getImagesOfDirection()[direction + 4], getX() * WindowOfFreeMove.CELL_SIZE + Xsize, g.drawImage(imagePerson.getImagesOfDirection()[direction + 4], getX() * getSize() + Xsize,
getY() * WindowOfFreeMove.CELL_SIZE + Ysize, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); getY() * getSize() + Ysize - (getSize() * 3/5), getSize(), getSize() * 3/2, null);
} }
} }
@ -272,11 +287,11 @@ public class Person extends Cell {
this.isMoving = isMoving; this.isMoving = isMoving;
} }
public void setSize(int size) { public void setDistance(int distance) {
this.size = size; this.distanceOfAnimation = distance;
} }
public int getSize() { return size; } public int getDistance() { return distanceOfAnimation; }
public int getDirectionMoveLast() {return directionMoveLast; } public int getDirectionMoveLast() {return directionMoveLast; }

View File

@ -23,8 +23,8 @@ public class TriggerCell extends InteractionCell {
@Override @Override
public void paint(Graphics2D g) { public void paint(Graphics2D g) {
super.paint(g); super.paint(g);
g.drawImage(super.getImageCell().getImagesOfTiles().get(super.getImageCell().getImageFromCellMap("TRIGGER")), getX() * WindowOfFreeMove.CELL_SIZE, g.drawImage(super.getImageCell().getImagesOfTiles().get(super.getImageCell().getImageFromCellMap("TRIGGER")), getX() * getSize(),
getY() * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null); getY() * getSize(), getSize(), getSize(), null);
} }
public boolean getActive() { public boolean getActive() {

View File

@ -25,7 +25,8 @@ public class ImagePerson {
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
for (int j = 0; j < 4; j++) { for (int j = 0; j < 4; j++) {
BufferedImage img = image.getSubimage(subimageWidth * i, subimageHeight * j, subimageWidth, subimageHeight); BufferedImage img = image.getSubimage(subimageWidth * i, subimageHeight * j, subimageWidth, subimageHeight);
imagesOfDirection[count] = resize(img); // imagesOfDirection[count] = resize(img);
imagesOfDirection[count] = img;
count++; count++;
} }
} }
@ -48,24 +49,24 @@ public class ImagePerson {
public BufferedImage resize(BufferedImage img) { public BufferedImage resize(BufferedImage img) {
Image tmp; Image tmp;
if (subimageWidth > WindowOfFreeMove.CELL_SIZE) { if (subimageWidth > WindowOfFreeMove.CELL_SIZE * 2) {
int newHeight = subimageHeight * WindowOfFreeMove.CELL_SIZE / subimageWidth; int newHeight = subimageHeight * WindowOfFreeMove.CELL_SIZE * 2 / subimageWidth;
tmp = img.getScaledInstance(WindowOfFreeMove.CELL_SIZE, newHeight, Image.SCALE_SMOOTH); tmp = img.getScaledInstance(WindowOfFreeMove.CELL_SIZE * 2, newHeight, Image.SCALE_SMOOTH);
} }
else if (subimageHeight > WindowOfFreeMove.CELL_SIZE) { else if (subimageHeight > WindowOfFreeMove.CELL_SIZE * 2) {
int newWidth = subimageWidth * WindowOfFreeMove.CELL_SIZE / subimageHeight; int newWidth = subimageWidth * WindowOfFreeMove.CELL_SIZE * 2 / subimageHeight;
tmp = img.getScaledInstance(newWidth, WindowOfFreeMove.CELL_SIZE, Image.SCALE_SMOOTH); tmp = img.getScaledInstance(newWidth, WindowOfFreeMove.CELL_SIZE * 2, Image.SCALE_SMOOTH);
} }
else if (subimageWidth < WindowOfFreeMove.CELL_SIZE && subimageHeight < WindowOfFreeMove.CELL_SIZE) { else if (subimageWidth < WindowOfFreeMove.CELL_SIZE && subimageHeight < (WindowOfFreeMove.CELL_SIZE * 2)) {
int newWidth = subimageWidth * WindowOfFreeMove.CELL_SIZE / subimageHeight; int newWidth = subimageWidth * WindowOfFreeMove.CELL_SIZE * 2 / subimageHeight;
tmp = img.getScaledInstance(newWidth, WindowOfFreeMove.CELL_SIZE, Image.SCALE_SMOOTH); tmp = img.getScaledInstance(newWidth, (WindowOfFreeMove.CELL_SIZE * 2), Image.SCALE_SMOOTH);
} }
else { else {
tmp = img.getScaledInstance(subimageWidth, subimageHeight, Image.SCALE_SMOOTH); tmp = img.getScaledInstance(subimageWidth, subimageHeight, Image.SCALE_SMOOTH);
} }
BufferedImage dimg = new BufferedImage(WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, BufferedImage.TYPE_INT_ARGB); BufferedImage dimg = new BufferedImage(WindowOfFreeMove.CELL_SIZE * 2, WindowOfFreeMove.CELL_SIZE * 2, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = dimg.createGraphics(); Graphics2D g2d = dimg.createGraphics();
g2d.drawImage(tmp, (WindowOfFreeMove.CELL_SIZE - tmp.getWidth(null)) / 2, (WindowOfFreeMove.CELL_SIZE - tmp.getHeight(null)) / 2, null); g2d.drawImage(tmp, (WindowOfFreeMove.CELL_SIZE * 2 - tmp.getWidth(null)) / 2, (WindowOfFreeMove.CELL_SIZE * 2 - tmp.getHeight(null)) / 2, null);
g2d.dispose(); g2d.dispose();
return dimg; return dimg;

View File

@ -23,67 +23,9 @@ public class Map {
private int idExit; private int idExit;
private ImageCell imageCell; private ImageCell imageCell;
private int[] canvasSize; private int[] canvasSize;
private WindowOfFreeMove window;
private static Scanner scanner; private static Scanner scanner;
public Map(int height, int width) {
name = "Spawn";
idExit = 0;
mapArray = new TypeOfCell[height][width];
moveToCells = new LinkedList<>();
interactionCells = new LinkedList<>();
triggerCells = new LinkedList<>();
doorCells = new LinkedList<>();
npcs = new LinkedList<>();
block = new LinkedList<>();
imageCell = new ImageCell();
TypeOfCell type;
type = TypeOfCell.EMPTY;
for (int i = 0; i < mapArray.length; i++) {
for (int j = 0; j < mapArray[0].length; j++) {
mapArray[0][j] = type;
mapArray[mapArray.length - 1][j] = type;
}
mapArray[i][0] = type;
mapArray[i][mapArray.length - 1] = type;
}
person = new Person(this);
}
public Map(int height, int width, Boolean isBlocked) {
name = "Spawn";
idExit = 0;
moveToCells = new LinkedList<>();
block = new LinkedList<>();
interactionCells = new LinkedList<>();
triggerCells = new LinkedList<>();
doorCells = new LinkedList<>();
mapArray = new TypeOfCell[height][width];
npcs = new LinkedList<>();
imageCell = new ImageCell();
TypeOfCell type;
if (isBlocked)
type = TypeOfCell.BLOCK;
else
type = TypeOfCell.EMPTY;
for (int i = 0; i < mapArray.length / 2; i++) {
for (int j = 0; j < mapArray[0].length / 2; j++) {
mapArray[0][j] = type;
mapArray[mapArray.length - 1][j] = type;
}
mapArray[i][0] = type;
mapArray[i][mapArray[0].length - 1] = type;
}
person = new Person(this);
canvasSize = new int[2];
}
public Map(TypeOfCell[][] mapArray) { public Map(TypeOfCell[][] mapArray) {
idExit = 0; idExit = 0;
moveToCells = new LinkedList<>(); moveToCells = new LinkedList<>();
@ -118,7 +60,6 @@ public class Map {
map.setName(name); map.setName(name);
map.npcs = new LinkedList<>(); map.npcs = new LinkedList<>();
map.getImageCell().readMapFile(name); map.getImageCell().readMapFile(name);
LinkedList<String[]> listOfMoveToCells = new LinkedList<>();
map.canvasSize[0] = Integer.parseInt(size[0]); map.canvasSize[0] = Integer.parseInt(size[0]);
map.canvasSize[1] = Integer.parseInt(size[1]); map.canvasSize[1] = Integer.parseInt(size[1]);
int y = 0; int y = 0;
@ -137,7 +78,7 @@ public class Map {
String data = scanner.nextLine(); String data = scanner.nextLine();
String[] line = data.split(" "); String[] line = data.split(" ");
for (int x = 0; x < Integer.parseInt(size[0]); x++) { for (int x = 0; x < Integer.parseInt(size[0]); x++) {
TypeOfCell cellType = null; TypeOfCell cellType;
if (line[x].equals("BLOCK") || line[x].equals("block")) { if (line[x].equals("BLOCK") || line[x].equals("block")) {
cellType = TypeOfCell.BLOCK; cellType = TypeOfCell.BLOCK;
map.getMapArray()[x][y] = cellType; map.getMapArray()[x][y] = cellType;
@ -149,20 +90,17 @@ public class Map {
cellType = TypeOfCell.EMPTY; cellType = TypeOfCell.EMPTY;
map.getMapArray()[x][y] = cellType; map.getMapArray()[x][y] = cellType;
} else if (line[x].contains("INTER") || line[x].contains("inter")) { } else if (line[x].contains("INTER") || line[x].contains("inter")) {
ImageCell imageCell = new ImageCell();
String[] event = line[x].split(","); String[] event = line[x].split(",");
if (line[x].contains("INTER")) if (line[x].contains("INTER"))
map.addInteractionEvent(new InteractionCell(x, y, event[1], new Dialog(window.getDialogBar()), map.getImageCell(), window, true)); map.addInteractionEvent(new InteractionCell(x, y, event[1], new Dialog(window.getDialogBar()), map.getImageCell(), window, true));
else else
map.addInteractionEvent(new InteractionCell(x, y, event[1], new Dialog(window.getDialogBar()), map.getImageCell(), window, false)); map.addInteractionEvent(new InteractionCell(x, y, event[1], new Dialog(window.getDialogBar()), map.getImageCell(), window, false));
} else if (line[x].contains("TRIGGER")) { } else if (line[x].contains("TRIGGER")) {
ImageCell imageCell = new ImageCell();
String[] trigger = line[x].split(","); String[] trigger = line[x].split(",");
map.addInteractionEvent(new TriggerCell(x, y, trigger[1], new Dialog(window.getDialogBar()), map.getImageCell(), window)); map.addInteractionEvent(new TriggerCell(x, y, trigger[1], new Dialog(window.getDialogBar()), map.getImageCell(), window));
} else if (line[x].equals("SPAWN")) { } else if (line[x].equals("SPAWN")) {
map.setSpawnPoint(x, y); map.setSpawnPoint(x, y);
} else if (line[x].contains("DOOR") && !line[x].contains("DOORTO")) { } else if (line[x].contains("DOOR") && !line[x].contains("DOORTO")) {
ImageCell imageCell = new ImageCell();
String[] door = line[x].split(","); String[] door = line[x].split(",");
if (line[x].equals("DOOR")) if (line[x].equals("DOOR"))
map.addInteractionEvent(new DoorCell(x, y, map.getImageCell(), window)); map.addInteractionEvent(new DoorCell(x, y, map.getImageCell(), window));
@ -338,7 +276,7 @@ public class Map {
for (EventMoveToCell cell : moveToCells) for (EventMoveToCell cell : moveToCells)
if (x == cell.getX() && y == cell.getY()) if (x == cell.getX() && y == cell.getY())
return cell; return cell;
return moveToCells.getFirst(); return null;
} }
public InteractionCell findInteractionByXY(int x, int y, int directionSight) { public InteractionCell findInteractionByXY(int x, int y, int directionSight) {
@ -359,14 +297,21 @@ public class Map {
for (InteractionCell cell : interactionCells) for (InteractionCell cell : interactionCells)
if (x == cell.getX() && y == cell.getY()) if (x == cell.getX() && y == cell.getY())
return cell; return cell;
return interactionCells.getFirst(); return null;
}
public InteractionCell findInteractionByXY(int x, int y) {
for (InteractionCell cell : interactionCells)
if (x == cell.getX() && y == cell.getY())
return cell;
return null;
} }
public TriggerCell findTriggerByXY(int x, int y) { public TriggerCell findTriggerByXY(int x, int y) {
for (TriggerCell cell : triggerCells) for (TriggerCell cell : triggerCells)
if (x == cell.getX() && y == cell.getY()) if (x == cell.getX() && y == cell.getY())
return cell; return cell;
return triggerCells.getFirst(); return null;
} }
public DoorCell findDoorByXY(int x, int y, int directionSight) { public DoorCell findDoorByXY(int x, int y, int directionSight) {
@ -387,13 +332,20 @@ public class Map {
for (DoorCell cell : doorCells) for (DoorCell cell : doorCells)
if (x == cell.getX() && y == cell.getY()) if (x == cell.getX() && y == cell.getY())
return cell; return cell;
return doorCells.getFirst(); return null;
} }
public DoorCell findDoorByXY(int x, int y) { public DoorCell findDoorByXY(int x, int y) {
for (DoorCell cell : doorCells) for (DoorCell cell : doorCells)
if (x == cell.getX() && y == cell.getY()) if (x == cell.getX() && y == cell.getY())
return cell; return cell;
return doorCells.getFirst(); return null;
}
public Block findBlockByXY(int x, int y) {
for (Block cell : block)
if (x == cell.getX() && y == cell.getY())
return cell;
return null;
} }
} }

View File

@ -74,28 +74,28 @@ public class MapManager {
actualMap.getPerson().set(cell.getX(), cell.getY() - 1); actualMap.getPerson().set(cell.getX(), cell.getY() - 1);
actualMap.getPerson().setIsMoving(true); actualMap.getPerson().setIsMoving(true);
actualMap.getPerson().setDirectionMoveLast(WindowOfFreeMove.KEY_UP); actualMap.getPerson().setDirectionMoveLast(WindowOfFreeMove.KEY_UP);
actualMap.getPerson().setSize(CELL_SIZE); actualMap.getPerson().setDistance(CELL_SIZE);
actualMap.getPerson().setDirectionSight(2); actualMap.getPerson().setDirectionSight(2);
break; break;
case 2: case 2:
actualMap.getPerson().set(cell.getX() + 1, cell.getY()); actualMap.getPerson().set(cell.getX() + 1, cell.getY());
actualMap.getPerson().setIsMoving(true); actualMap.getPerson().setIsMoving(true);
actualMap.getPerson().setDirectionMoveLast(WindowOfFreeMove.KEY_RIGHT); actualMap.getPerson().setDirectionMoveLast(WindowOfFreeMove.KEY_RIGHT);
actualMap.getPerson().setSize(CELL_SIZE); actualMap.getPerson().setDistance(CELL_SIZE);
actualMap.getPerson().setDirectionSight(3); actualMap.getPerson().setDirectionSight(3);
break; break;
case 3: case 3:
actualMap.getPerson().set(cell.getX(), cell.getY() + 1); actualMap.getPerson().set(cell.getX(), cell.getY() + 1);
actualMap.getPerson().setIsMoving(true); actualMap.getPerson().setIsMoving(true);
actualMap.getPerson().setDirectionMoveLast(WindowOfFreeMove.KEY_DOWN); actualMap.getPerson().setDirectionMoveLast(WindowOfFreeMove.KEY_DOWN);
actualMap.getPerson().setSize(CELL_SIZE); actualMap.getPerson().setDistance(CELL_SIZE);
actualMap.getPerson().setDirectionSight(0); actualMap.getPerson().setDirectionSight(0);
break; break;
case 4: case 4:
actualMap.getPerson().set(cell.getX() - 1, cell.getY()); actualMap.getPerson().set(cell.getX() - 1, cell.getY());
actualMap.getPerson().setIsMoving(true); actualMap.getPerson().setIsMoving(true);
actualMap.getPerson().setDirectionMoveLast(WindowOfFreeMove.KEY_LEFT); actualMap.getPerson().setDirectionMoveLast(WindowOfFreeMove.KEY_LEFT);
actualMap.getPerson().setSize(CELL_SIZE); actualMap.getPerson().setDistance(CELL_SIZE);
actualMap.getPerson().setDirectionSight(1); actualMap.getPerson().setDirectionSight(1);
break; break;
default: default:

View File

@ -35,7 +35,7 @@ public class Camera {
int cameraOffsetX = (-1) * CELL_SIZE * (window.getMapManager().getActualMap().getPerson().getX() - WINDOW_WIDTH / 2); int cameraOffsetX = (-1) * CELL_SIZE * (window.getMapManager().getActualMap().getPerson().getX() - WINDOW_WIDTH / 2);
int cameraOffsetY = (-1) * CELL_SIZE * (window.getMapManager().getActualMap().getPerson().getY() - WINDOW_HEIGHT / 2); int cameraOffsetY = (-1) * CELL_SIZE * (window.getMapManager().getActualMap().getPerson().getY() - WINDOW_HEIGHT / 2);
int direction = window.getMapManager().getActualMap().getPerson().getDirectionMoveLast(); int direction = window.getMapManager().getActualMap().getPerson().getDirectionMoveLast();
int size = (-1) * window.getMapManager().getActualMap().getPerson().getSize(); int size = (-1) * window.getMapManager().getActualMap().getPerson().getDistance();
int Ysize = 0; int Ysize = 0;
int Xsize = 0; int Xsize = 0;
switch (direction) { switch (direction) {

View File

@ -183,36 +183,70 @@ public class WindowOfFreeMove extends JLayeredPane {
public class Canvas extends JPanel { public class Canvas extends JPanel {
@Override @Override
// public void paint(Graphics g) {
// if (isReadyToPaint) {
// super.paint(g);
// Graphics2D g2D = (Graphics2D) g;
// g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
// RenderingHints.VALUE_ANTIALIAS_ON);
// for (int i = 0; i < mapManager.getActualMap().getCanvasSize()[0]; i++) {
// for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[1]; j++) {
// mapManager.getActualMap().getImageCell().paintBackground(g2D, i, j);
// }
// }
// for (Cell cell : mapManager.getActualMap().getMoveToCells()) {
// cell.paint(g2D);
// }
// for (Cell cell : mapManager.getActualMap().getBlocks()) {
// cell.paint(g2D);
// }
// for (Cell cell : mapManager.getActualMap().getInteractionEventCells()) {
// cell.paint(g2D);
// }
// for (Cell cell : mapManager.getActualMap().getDoorCells()) {
// cell.paint(g2D);
// }
// 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);
// }
// }
// mapManager.getActualMap().getPerson().paint(g2D);
// }
// }
public void paint(Graphics g) { public void paint(Graphics g) {
if (isReadyToPaint) { if (isReadyToPaint) {
super.paint(g); super.paint(g);
Graphics2D g2D = (Graphics2D) g; Graphics2D g2D = (Graphics2D) g;
g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON); RenderingHints.VALUE_ANTIALIAS_ON);
for (int i = 0; i < mapManager.getActualMap().getCanvasSize()[0]; i++) { for (int i = 0; i < mapManager.getActualMap().getCanvasSize()[1]; i++) {
for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[1]; j++) { for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[0]; j++) {
mapManager.getActualMap().getImageCell().paintBackground(g2D, i, j); mapManager.getActualMap().getImageCell().paintBackground(g2D, j, i);
}
} }
for (Cell cell : mapManager.getActualMap().getMoveToCells()) { for (Cell cell : mapManager.getActualMap().getMoveToCells()) {
cell.paint(g2D); if (cell.getY() == i) cell.paint(g2D);
} }
mapManager.getActualMap().getPerson().paint(g2D);
for (Cell cell : mapManager.getActualMap().getBlocks()) { for (Cell cell : mapManager.getActualMap().getBlocks()) {
cell.paint(g2D); if (cell.getY() == i) cell.paint(g2D);
} }
if (mapManager.getActualMap().getPerson().getY() == i && mapManager.getActualMap().getPerson().getDirectionMoveLast() != KEY_UP) mapManager.getActualMap().getPerson().paint(g2D);
for (Cell cell : mapManager.getActualMap().getInteractionEventCells()) { for (Cell cell : mapManager.getActualMap().getInteractionEventCells()) {
cell.paint(g2D); if (cell.getY() == i) cell.paint(g2D);
} }
if (mapManager.getActualMap().getPerson().getY() == (i-1) && mapManager.getActualMap().getPerson().getDirectionMoveLast() == KEY_UP) mapManager.getActualMap().getPerson().paint(g2D);
for (Cell cell : mapManager.getActualMap().getDoorCells()) { for (Cell cell : mapManager.getActualMap().getDoorCells()) {
cell.paint(g2D); if (cell.getY() == i) cell.paint(g2D);
} }
for (Person person : mapManager.getActualMap().getNpcs()) { for (Person person : mapManager.getActualMap().getNpcs()) {
person.paint(g2D); if (person.getY() == i) person.paint(g2D);
} }
for (int i = 0; i < mapManager.getActualMap().getCanvasSize()[0]; i++) {
for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[1]; j++) { for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[1]; j++) {
mapManager.getActualMap().getImageCell().paintForeground(g2D, i, j); mapManager.getActualMap().getImageCell().paintForeground(g2D, j, i);
} }
} }
} }

View File

@ -11,9 +11,6 @@ public class WindowOfMenu extends JLayeredPane {
public static final int WINDOW_HEIGHT = 13; public static final int WINDOW_HEIGHT = 13;
public static final int CELL_SIZE = 50; 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 JFrame game;
private WindowOfFreeMove freeMove; private WindowOfFreeMove freeMove;
private JButton startNewGame; private JButton startNewGame;
@ -27,7 +24,6 @@ public class WindowOfMenu extends JLayeredPane {
startNewGame = new JButton("START NEW GAME"); startNewGame = new JButton("START NEW GAME");
//startNewGame.setFocusable(false); //startNewGame.setFocusable(false);
startNewGame.setBounds((WINDOW_WIDTH*CELL_SIZE - 200) / 2,(WINDOW_HEIGHT*CELL_SIZE - 30) / 2 -70,200,30); startNewGame.setBounds((WINDOW_WIDTH*CELL_SIZE - 200) / 2,(WINDOW_HEIGHT*CELL_SIZE - 30) / 2 -70,200,30);
startNewGame.setActionCommand("startNewGame");
startNewGame.addActionListener(actionEvent -> { startNewGame.addActionListener(actionEvent -> {
cleanUp(); cleanUp();
game.add(freeMove); game.add(freeMove);
@ -38,7 +34,6 @@ public class WindowOfMenu extends JLayeredPane {
loadSavedGame = new JButton("LOAD SAVED GAME"); loadSavedGame = new JButton("LOAD SAVED GAME");
//loadSavedGame.setFocusable(false); //loadSavedGame.setFocusable(false);
loadSavedGame.setBounds((WINDOW_WIDTH*CELL_SIZE - 200) / 2,(WINDOW_HEIGHT*CELL_SIZE - 30) / 2,200,30); loadSavedGame.setBounds((WINDOW_WIDTH*CELL_SIZE - 200) / 2,(WINDOW_HEIGHT*CELL_SIZE - 30) / 2,200,30);
loadSavedGame.setActionCommand("loadSavedGame");
loadSavedGame.addActionListener(actionEvent -> { loadSavedGame.addActionListener(actionEvent -> {
cleanUp(); cleanUp();
game.add(freeMove); game.add(freeMove);
@ -48,26 +43,12 @@ public class WindowOfMenu extends JLayeredPane {
exitGame = new JButton("EXIT GAME"); exitGame = new JButton("EXIT GAME");
exitGame.setBounds((WINDOW_WIDTH*CELL_SIZE - 200) / 2,(WINDOW_HEIGHT*CELL_SIZE - 30) / 2 + 70,200,30); exitGame.setBounds((WINDOW_WIDTH*CELL_SIZE - 200) / 2,(WINDOW_HEIGHT*CELL_SIZE - 30) / 2 + 70,200,30);
exitGame.setActionCommand("exitGame");
exitGame.addActionListener(actionEvent -> game.dispatchEvent(new WindowEvent(game, WindowEvent.WINDOW_CLOSING))); exitGame.addActionListener(actionEvent -> game.dispatchEvent(new WindowEvent(game, WindowEvent.WINDOW_CLOSING)));
add(startNewGame); add(startNewGame);
add(loadSavedGame); add(loadSavedGame);
add(exitGame); add(exitGame);
setVisible(false);
} }
public void start(){
Timer timer = new Timer( 0, actionEvent -> {
setVisible(false);
centerContent();
this.repaint();
setVisible(true);
});
timer.start();
}
private void cleanUp() { private void cleanUp() {
setVisible(false); setVisible(false);
startNewGame.removeActionListener(startNewGame.getActionListeners()[0]); startNewGame.removeActionListener(startNewGame.getActionListeners()[0]);
@ -77,16 +58,8 @@ public class WindowOfMenu extends JLayeredPane {
game.remove(this); game.remove(this);
menu().revalidate(); menu().revalidate();
menu().repaint(); menu().repaint();
freeMove.setCursor(freeMove.getToolkit().createCustomCursor( freeMove.setCursor(freeMove.getToolkit().createCustomCursor(new BufferedImage( 1, 1, BufferedImage.TYPE_INT_ARGB ), new Point(), null ));
new BufferedImage( 1, 1, BufferedImage.TYPE_INT_ARGB ),
new Point(),
null ) );
} }
public WindowOfMenu menu() { return this; } public WindowOfMenu menu() { return this; }
public void centerContent() {
game.getComponents()[0].setLocation((Toolkit.getDefaultToolkit().getScreenSize().width - (WINDOW_WIDTH * CELL_SIZE)) / 2, (Toolkit.getDefaultToolkit().getScreenSize().height - (WINDOW_HEIGHT * CELL_SIZE)) / 2);
game.getComponents()[0].setSize(WINDOW_WIDTH * CELL_SIZE, WINDOW_HEIGHT * CELL_SIZE);
}
} }

View File

@ -7,6 +7,8 @@
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6 6 6 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 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
@ -14,3 +16,5 @@
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6

View File

@ -1,13 +1,17 @@
20 12 20 16
BLOCK BLOCK BLOCK BLOCK DOOR BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK
BLOCK BLOCK BLOCK BLOCK DOORTO,0,3,boss BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOORTO,0,3,boss BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false 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 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 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 BLOCK BLOCK BLOCK 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 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 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 BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK 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 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 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 DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK
BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK

View File

@ -19,10 +19,10 @@ BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,0,2,m1 EMPTY EMPTY EMPTY EMPTY
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK 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 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 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 EMPTY EMPTY EMPTY block EMPTY EMPTY block EMPTY EMPTY block EMPTY EMPTY EMPTY block EMPTY EMPTY block BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY 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 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 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 EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY 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 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 BLOCK BLOCK block block block BLOCK block block block BLOCK BLOCK block block block BLOCK block block block BLOCK BLOCK

View File

@ -1,5 +1,5 @@
<location> <location>
<map>m1</map> <map>openspace</map>
<x>1</x> <x>8</x>
<y>7</y> <y>15</y>
</location> </location>