summaryrefslogtreecommitdiffstats
path: root/src/MapScene.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/MapScene.java')
-rw-r--r--src/MapScene.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/MapScene.java b/src/MapScene.java
index 41ad546..785698f 100644
--- a/src/MapScene.java
+++ b/src/MapScene.java
@@ -4,23 +4,31 @@ import java.awt.BasicStroke;
import java.awt.Dimension;
import java.awt.BorderLayout;
import java.awt.GridLayout;
+
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+
import java.awt.image.BufferStrategy;
+
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.awt.geom.NoninvertibleTransformException;
+
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
+
import java.io.FileReader;
import java.io.BufferedReader;
import java.io.IOException;
+
+// TODO: remove unused import
import com.google.gson.Gson;
+
public class MapScene extends Scene implements ActionListener {
protected Map map;
protected int panX = 0;
@@ -46,6 +54,8 @@ public class MapScene extends Scene implements ActionListener {
} else {
this.maxSize = HEIGHT;
}
+
+ // TODO: negate if condition and return
if (this.map != null) {
Graphics2D g = (Graphics2D) this.buffer.getDrawGraphics();
//clear
@@ -104,7 +114,7 @@ public class MapScene extends Scene implements ActionListener {
tileSize, tileSize);
}
- //TODO set as class variables the storkes
+ //TODO: set as class variables the storkes
if (tile.cursorOnIt()) {
BasicStroke oldStroke = (BasicStroke) g.getStroke();
g.setStroke(new BasicStroke(
@@ -148,7 +158,7 @@ public class MapScene extends Scene implements ActionListener {
(tileSize*4/5)*actor.getHP()/10, tileSize/10);
}
-
+ // Restore absolute coordinates
AffineTransform invertTx = null;
try {
invertTx = this.tx.createInverse();
@@ -162,10 +172,12 @@ public class MapScene extends Scene implements ActionListener {
}
}
+ // TODO: make abstract
protected void absoluteRender(Graphics2D g) {
}
+ // TODO: remove this overridden method and leave abstract
@Override
protected void update(int deltaTime) {
}