From 7597ae93f38aaa32b099b19a3b65b96196f735e3 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sat, 2 Jun 2012 18:46:15 -0400 Subject: Fixed wonky characters Instead of rendering a font, characters are now taken from a character map. Also, tick() was removed from GameState because it is only ever called after processInput() and so there's no real point in having separate methods. --- src/com/fourisland/frigidearth/GameState.java | 2 +- src/com/fourisland/frigidearth/Main.java | 3 -- .../fourisland/frigidearth/MapViewGameState.java | 35 +++++++------- src/com/fourisland/frigidearth/SystemFont.java | 52 +++++++++++++++++++++ .../frigidearth/TransparentPixelFilter.java | 35 ++++++++++++++ .../fourisland/frigidearth/resources/RMG2000.ttf | Bin 70260 -> 0 bytes src/com/fourisland/frigidearth/resources/font2.png | Bin 0 -> 5254 bytes 7 files changed, 104 insertions(+), 23 deletions(-) create mode 100644 src/com/fourisland/frigidearth/SystemFont.java create mode 100644 src/com/fourisland/frigidearth/TransparentPixelFilter.java delete mode 100644 src/com/fourisland/frigidearth/resources/RMG2000.ttf create mode 100644 src/com/fourisland/frigidearth/resources/font2.png (limited to 'src/com') diff --git a/src/com/fourisland/frigidearth/GameState.java b/src/com/fourisland/frigidearth/GameState.java index 08aa173..860411e 100644 --- a/src/com/fourisland/frigidearth/GameState.java +++ b/src/com/fourisland/frigidearth/GameState.java @@ -10,5 +10,5 @@ package com.fourisland.frigidearth; */ public interface GameState extends Renderable, Inputable { - public void tick(); + } diff --git a/src/com/fourisland/frigidearth/Main.java b/src/com/fourisland/frigidearth/Main.java index fe936b0..ed35f9c 100644 --- a/src/com/fourisland/frigidearth/Main.java +++ b/src/com/fourisland/frigidearth/Main.java @@ -61,7 +61,6 @@ public class Main public void keyPressed(KeyEvent ke) { inputables.peek().processInput(ke); - gameState.tick(); } @Override @@ -77,8 +76,6 @@ public class Main setGameState(new MapViewGameState()); - gameState.tick(); - long waitTime = System.nanoTime() + (1000000*FPS); for (;;) { diff --git a/src/com/fourisland/frigidearth/MapViewGameState.java b/src/com/fourisland/frigidearth/MapViewGameState.java index 543ce0b..2ecaeb1 100644 --- a/src/com/fourisland/frigidearth/MapViewGameState.java +++ b/src/com/fourisland/frigidearth/MapViewGameState.java @@ -37,22 +37,6 @@ public class MapViewGameState implements GameState } } } - - public void tick() - { - Random r = new Random(); - - if (r.nextBoolean()) - { - for (int x=0; x