summary refs log tree commit diff stats
path: root/src/com/fourisland
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-02-07 12:47:15 -0500
committerStarla Insigna <hatkirby@fourisland.com>2009-02-07 12:47:15 -0500
commitb5ff6fcc1e572d1a6150ee2af159be68ee2c2a94 (patch)
tree80e1a4e62181cb6bda1a2c78d4cfb1f86c1722bf /src/com/fourisland
parentcffc83b19b5de0566daa7c228ec6c107de5f4779 (diff)
downloadfourpuzzle-b5ff6fcc1e572d1a6150ee2af159be68ee2c2a94.tar.gz
fourpuzzle-b5ff6fcc1e572d1a6150ee2af159be68ee2c2a94.tar.bz2
fourpuzzle-b5ff6fcc1e572d1a6150ee2af159be68ee2c2a94.zip
Fixed Event layer rendering glitch
Diffstat (limited to 'src/com/fourisland')
-rw-r--r--src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java index 9c8e9d7..7c4de27 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java
@@ -208,12 +208,24 @@ public class MapViewGameState implements GameState {
208 208
209 BufferedImage eventLayer = new BufferedImage(currentMap.getSize().width*16, currentMap.getSize().height*16, BufferedImage.TYPE_INT_ARGB); 209 BufferedImage eventLayer = new BufferedImage(currentMap.getSize().width*16, currentMap.getSize().height*16, BufferedImage.TYPE_INT_ARGB);
210 Graphics2D g2 = eventLayer.createGraphics(); 210 Graphics2D g2 = eventLayer.createGraphics();
211 EventList events = currentMap.getEvents();
212
213 for (LayerEvent event : events)
214 {
215 if (event.getLayer() != Layer.Above)
216 {
217 event.render(g2);
218 }
219 }
220
211 Game.getHeroEvent().render(g2); 221 Game.getHeroEvent().render(g2);
212 222
213 EventList events = currentMap.getEvents();
214 for (LayerEvent event : events) 223 for (LayerEvent event : events)
215 { 224 {
216 event.render(g2); 225 if (event.getLayer() == Layer.Above)
226 {
227 event.render(g2);
228 }
217 } 229 }
218 230
219 g.drawImage(eventLayer, 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null); 231 g.drawImage(eventLayer, 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null);