about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/fourisland/frigidearth/MapViewGameState.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/fourisland/frigidearth/MapViewGameState.java b/src/com/fourisland/frigidearth/MapViewGameState.java index dd20eac..0371c6a 100644 --- a/src/com/fourisland/frigidearth/MapViewGameState.java +++ b/src/com/fourisland/frigidearth/MapViewGameState.java
@@ -43,6 +43,7 @@ public class MapViewGameState implements GameState
43 private int playery = 4; 43 private int playery = 4;
44 private int viewportx = 0; 44 private int viewportx = 0;
45 private int viewporty = 0; 45 private int viewporty = 0;
46 private int health = 15;
46 47
47 public MapViewGameState() 48 public MapViewGameState()
48 { 49 {
@@ -550,6 +551,15 @@ public class MapViewGameState implements GameState
550 } 551 }
551 } 552 }
552 } 553 }
554
555 // Render status bar
556 g.drawImage(SystemFont.getCharacter((char) 3, Color.RED), TILE_WIDTH, 0, TILE_WIDTH, TILE_HEIGHT, null);
557 String healthText = Integer.toString(health);
558
559 for (int i=0; i<healthText.length(); i++)
560 {
561 g.drawImage(SystemFont.getCharacter(healthText.charAt(i), Color.WHITE), (i+2)*TILE_WIDTH, 0, TILE_WIDTH, TILE_HEIGHT, null);
562 }
553 } 563 }
554 564
555 public void processInput(KeyEvent e) 565 public void processInput(KeyEvent e)