summary refs log tree commit diff stats
path: root/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-03-17 09:34:18 -0400
committerStarla Insigna <hatkirby@fourisland.com>2009-03-17 09:34:18 -0400
commit28e41757f11ea216f641b4889bd43be2b6373484 (patch)
tree4d29231ca35702afd9e5bfad17b1c170098fc9aa /src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java
parent0a5ace745f171cad0150dbed11ae8febc0e17f27 (diff)
downloadfourpuzzle-28e41757f11ea216f641b4889bd43be2b6373484.tar.gz
fourpuzzle-28e41757f11ea216f641b4889bd43be2b6373484.tar.bz2
fourpuzzle-28e41757f11ea216f641b4889bd43be2b6373484.zip
Engine: Added ShakeScreen() special action
Also implemented F12 to return to the title screen and added a move frequency variable to events that decides how often they move.
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java')
-rwxr-xr-xsrc/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java index ec35db6..89fac99 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java
@@ -25,6 +25,7 @@ import com.fourisland.fourpuzzle.gamestate.mapview.event.specialmove.MoveEventTh
25import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.AutomaticViewpoint; 25import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.AutomaticViewpoint;
26import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.Viewpoint; 26import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.Viewpoint;
27import com.fourisland.fourpuzzle.gamestate.menu.MenuGameState; 27import com.fourisland.fourpuzzle.gamestate.menu.MenuGameState;
28import java.awt.Color;
28import java.awt.Graphics2D; 29import java.awt.Graphics2D;
29import java.awt.event.KeyEvent; 30import java.awt.event.KeyEvent;
30import java.awt.image.BufferedImage; 31import java.awt.image.BufferedImage;
@@ -260,6 +261,11 @@ public class MapViewGameState implements GameState {
260 int x = currentViewpoint.getX(); 261 int x = currentViewpoint.getX();
261 int y = currentViewpoint.getY(); 262 int y = currentViewpoint.getY();
262 263
264 /* Fill the background with black so specialized viewpoints that go off
265 * the screen such as ShakingViewpoint render properly */
266 g.setColor(Color.BLACK);
267 g.fillRect(0, 0, Game.WIDTH, Game.HEIGHT);
268
263 // Render the lower layer of the map 269 // Render the lower layer of the map
264 g.drawImage(currentMap.renderLower(), 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null); 270 g.drawImage(currentMap.renderLower(), 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null);
265 271