diff --git a/src/sig/objects/EditorRenderer.java b/src/sig/objects/EditorRenderer.java index f0f0f3f..95a8113 100644 --- a/src/sig/objects/EditorRenderer.java +++ b/src/sig/objects/EditorRenderer.java @@ -93,6 +93,17 @@ public class EditorRenderer extends LevelRenderer{ @Override public void draw(byte[] p) { super.draw(p); + for (int y=(int)(this.getY()/Tile.TILE_HEIGHT);y<(int)(RabiClone.BASE_HEIGHT/Tile.TILE_HEIGHT+this.getY()/Tile.TILE_HEIGHT+1);y++) { + if (y<0||y>Map.MAP_HEIGHT) { + continue; + } + for (int x=(int)(0+this.getX()/Tile.TILE_WIDTH);x<(int)(RabiClone.BASE_WIDTH/Tile.TILE_WIDTH+this.getX()/Tile.TILE_WIDTH+1);x++) { + if (x<0||x>Map.MAP_WIDTH) { + continue; + } + drawMapTileForEditorMode(x,y); + } + } Draw_Text(4,0,messageLog,Font.PROFONT_12); } diff --git a/src/sig/objects/LevelRenderer.java b/src/sig/objects/LevelRenderer.java index f4294bf..f88ed9f 100644 --- a/src/sig/objects/LevelRenderer.java +++ b/src/sig/objects/LevelRenderer.java @@ -33,7 +33,6 @@ public class LevelRenderer extends Object{ DrawTile(x*Tile.TILE_WIDTH-this.getX(),y*Tile.TILE_HEIGHT-this.getY(),RabiClone.CURRENT_MAP.getTile(x,y)); //System.out.println((x*Tile.TILE_WIDTH+(this.getX()%Tile.TILE_WIDTH) )+","+(y*Tile.TILE_HEIGHT+(this.getY()%Tile.TILE_HEIGHT))); } - drawMapTileForEditorMode(x,y); } } Draw_Object(RabiClone.player);