# HG changeset patch # User Matti Hamalainen # Date 1322299546 -7200 # Node ID 0ec311706d3cd42a7fbb0c225a7b58b814751520 # Parent 351f20e09d486a6d1bfebf3999136cd4791095df Clean up debug messages. diff -r 351f20e09d48 -r 0ec311706d3c game/Engine.java --- a/game/Engine.java Fri Nov 25 16:16:30 2011 +0200 +++ b/game/Engine.java Sat Nov 26 11:25:46 2011 +0200 @@ -597,6 +597,11 @@ IDMContainer widgets; AboutBox aboutBox; + public void dbg(String msg) + { + System.out.print("Engine: " + msg); + } + public Engine() { // Initialize globals @@ -622,7 +627,7 @@ } catch (FontFormatException e) { - System.out.print("Could not initialize fonts.\n"); + dbg("Could not initialize fonts.\n"); } res = new ResourceLoader("sounds/gamemusic.wav"); @@ -635,7 +640,7 @@ "Initialization error", JOptionPane.ERROR_MESSAGE); - System.out.print(e.getMessage()); + dbg(e.getMessage()); } // Create IDM GUI widgets @@ -664,7 +669,7 @@ // Get initial focus if (!hasFocus()) { - System.out.print("Engine(): requesting focus\n"); + dbg("Requesting focus.\n"); requestFocus(); } @@ -701,14 +706,14 @@ G.fonts[2] = G.fonts[0].deriveFont(64f * dw); G.fonts[3] = G.fonts[0].deriveFont(32f * dw); - System.out.print("scale changed\n"); + dbg("Scale changed.\n"); scaleChanged = true; updateBoard = true; } if (updateBoard) { -// System.out.print("updateBoard()\n"); +// dbg("updateBoard()\n"); G.lautaBGScaled = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_RGB); Graphics2D gimg = G.lautaBGScaled.createGraphics(); gimg.setRenderingHint(RenderingHints.KEY_INTERPOLATION, @@ -756,7 +761,7 @@ public void startThreads() { - System.out.print("startThreads()\n"); + dbg("startThreads()\n"); if (animThread == null) { animThread = new Thread(this); @@ -767,7 +772,7 @@ public void stopThreads() { - System.out.print("stopThreads()\n"); + dbg("stopThreads()\n"); // Stop animations if (animThread != null) @@ -810,7 +815,7 @@ { if (!hasFocus()) { - System.out.print("Requesting focus\n"); + dbg("Requesting focus.\n"); requestFocus(); } }