Some errors fixed

This commit is contained in:
Anuken 2019-03-11 13:27:15 -04:00
parent 6c8d80777c
commit 6c3ccb259f
2 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,11 @@ public class DrawOperation{
class TileOpStruct{
short x;
short y;
/**
* 0: floor
* 1: block
* 2: rotation
*/
byte type;
byte from;
byte to;

View File

@ -235,6 +235,12 @@ public class MapEditor{
renderer.resize(width, height);
}
public void changeFloor(int x, int y, Block to){
Block from = tiles[x][y].floor();
tiles[x][y].setFloor((Floor)to);
addTileOp(TileOp.get((short)x, (short)y, (byte)0, from.id, to.id));
}
public void undo(){
if(stack.canUndo()){
stack.undo(this);