diff --git a/src/sig/RabiClone.java b/src/sig/RabiClone.java index 394eca8..49242c4 100644 --- a/src/sig/RabiClone.java +++ b/src/sig/RabiClone.java @@ -2,11 +2,8 @@ package sig; import javax.swing.JFrame; -import net.java.games.input.AbstractController; import net.java.games.input.Controller; import net.java.games.input.ControllerEnvironment; -import net.java.games.input.ControllerEvent; -import net.java.games.input.ControllerListener; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/sig/objects/EditorRenderer.java b/src/sig/objects/EditorRenderer.java index fc432cf..42584ed 100644 --- a/src/sig/objects/EditorRenderer.java +++ b/src/sig/objects/EditorRenderer.java @@ -301,7 +301,20 @@ public class EditorRenderer extends LevelRenderer{ dataTileValue.clear(); }break; } - } + } - + @Override + public void drawBackground(byte[] p) { + int screenX = (int)(getX()+RabiClone.BASE_WIDTH/2)/Tile.TILE_WIDTH; + int screenY = (int)(getY()+RabiClone.BASE_HEIGHT/2)/Tile.TILE_HEIGHT; + Background targetBackground = RabiClone.CURRENT_MAP.getBackground(screenX, screenY); + for (int y=0;y