changeset 173:8995a0363e0a

Remove secret.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 06 Mar 2017 11:02:46 +0200
parents f664e851bc07
children 92df534806c4
files game/Engine.java graphics/girl.jpg
diffstat 2 files changed, 30 insertions(+), 67 deletions(-) [+]
line wrap: on
line diff
--- a/game/Engine.java	Mon Mar 06 10:19:14 2017 +0200
+++ b/game/Engine.java	Mon Mar 06 11:02:46 2017 +0200
@@ -23,20 +23,9 @@
 class AboutBox extends IDMWidget
 {
     BufferedImage aboutImg;
-    boolean aboutSecret;
 
     public AboutBox()
     {
-        try {
-            ResourceLoader res = new ResourceLoader("graphics/girl.jpg");
-            aboutImg = ImageIO.read(res.getStream());
-        }
-        catch (IOException e)
-        {
-        }
-
-        aboutSecret = false;
-
         setPos(150f, 150f);
         setSize(720f, 420f);
     }
@@ -48,74 +37,48 @@
 
         setTextFont(G.fonts[3], G.metrics[3]);
         setTextPaint(Color.white);
-
-        setCurrPosScaledRel(20, 30);
+        setCurrPosScaledRel(20, 35);
         drawString(g, "RistiPolku (CrossPaths) v"+ G.version +"\n");
 
         setTextFont(G.fonts[1], G.metrics[1]);
-        if (aboutSecret)
-        {
-            g.drawImage(aboutImg, (int) getScaledRelX(20), (int) getScaledRelY(55),
-                aboutImg.getWidth(), aboutImg.getHeight(), null);
-
-            setCurrPosScaledRel(225, 75);
-            drawString(g,
-                "Dedicated to my\n" +
-                "favorite woman\n" +
-                "in the world.");
+        setTextPaint(Color.yellow);
+        drawString(g, "(c) Copyright 2011 Tecnic Software productions (TNSP)\n");
 
-            setCurrPosScaledRel(370, 175);
-            drawString(g, "- Matti");
-        }
-        else
-        {
-            setTextPaint(Color.yellow);
-            drawString(g, "(c) Copyright 2011 Tecnic Software productions (TNSP)\n");
+        setTextPaint(Color.white);
+        drawString(g, "Programming, graphics and design by " +
+                      "Matti 'ccr' Hämäläinen.\n" +
+                      "Audio from archive.org, used non-commercially.\n \n");
 
-            setTextPaint(Color.white);
-            drawString(g, "Programming, graphics and design by " +
-                          "Matti 'ccr' Hämäläinen.\n" +
-                          "Audio from archive.org, used non-commercially.\n \n");
+        setTextPaint(Color.red);
+        drawString(g, "Controls:\n");
+
+        IDMPoint old = textCurrOffs.copy();
 
-            setTextPaint(Color.red);
-            drawString(g, "Controls:\n");
-
-            IDMPoint old = textCurrOffs.copy();
-
-            setTextPaint(Color.white);
-            drawString(g,
-            "Arrow keys / mouse wheel\n"+
-            "Enter / mouse click\n"+
-            "Space bar\n");
+        setTextPaint(Color.white);
+        drawString(g,
+        "Arrow keys / mouse wheel\n"+
+        "Enter / mouse click\n"+
+        "Space bar\n");
 
-            textCurrPos.x += getScaledX(330);
-            textCurrOffs.y = old.y;
-            drawString(g,
-            "- Rotate piece\n" +
-            "- Place/lock piece\n" +
-            "- Swap piece\n");
+        textCurrPos.x += getScaledX(330);
+        textCurrOffs.y = old.y;
+        drawString(g,
+        "- Rotate piece\n" +
+        "- Place/lock piece\n" +
+        "- Swap piece\n");
 
-            textCurrPos.x -= getScaledX(330);
-            setTextPaint(Color.green);
-            drawString(g,
-            "\nObjective: Create a path long as possible by rotating\n"+
-            "and placing pieces. More points will be awarded for\n"+
-            "advancing the path by several segments per turn."
-            );
-        }
+        textCurrPos.x -= getScaledX(330);
+        setTextPaint(Color.green);
+        drawString(g,
+        "\nObjective: Create a path long as possible by rotating\n"+
+        "and placing pieces. More points will be awarded for\n"+
+        "advancing the path by several segments per turn."
+        );
     }
 
     public boolean keyPressed(KeyEvent e)
     {
-        if (e.getKeyCode() == KeyEvent.VK_L)
-        {
-            aboutSecret = true;
-        }
-        else
-        {
-            clicked();
-            aboutSecret = false;
-        }
+        clicked();
         return true;
     }
 
Binary file graphics/girl.jpg has changed