From 6da66036182ce83a2928a3c254c7fdab9a0ddc54 Mon Sep 17 00:00:00 2001 From: Holger Zickner Date: Sun, 19 Sep 2004 20:53:07 +0000 Subject: move test method --- src/jake2/qcommon/Q2DataDialog.java | 13 +++++++++++++ src/jake2/qcommon/Q2DataTest.java | 28 ---------------------------- src/jake2/qcommon/Qcommon.java | 4 ++-- 3 files changed, 15 insertions(+), 30 deletions(-) delete mode 100644 src/jake2/qcommon/Q2DataTest.java (limited to 'src/jake2/qcommon') diff --git a/src/jake2/qcommon/Q2DataDialog.java b/src/jake2/qcommon/Q2DataDialog.java index 65d1f33..cf1a9fa 100644 --- a/src/jake2/qcommon/Q2DataDialog.java +++ b/src/jake2/qcommon/Q2DataDialog.java @@ -231,6 +231,19 @@ public class Q2DataDialog extends javax.swing.JDialog { status.setText(text); } + void testQ2Data() { + while (FS.LoadFile("pics/colormap.pcx") == null) { + showChooseDialog(); + + try { + synchronized(this) { + wait(); + } + } catch (InterruptedException e) {} + } + showStatus(); + } + static class Jake2Canvas extends Canvas { private Image image; Jake2Canvas() { diff --git a/src/jake2/qcommon/Q2DataTest.java b/src/jake2/qcommon/Q2DataTest.java deleted file mode 100644 index 5606b99..0000000 --- a/src/jake2/qcommon/Q2DataTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Q2DataTest.java - * Copyright Bytonic Software (C) 2004 - * - * $Id: Q2DataTest.java,v 1.2 2004-09-19 19:53:51 hzi Exp $ - */ -package jake2.qcommon; - -import jake2.Jake2; - -/** - * Q2DataTest - */ -public class Q2DataTest { - - static void run() { - while (FS.LoadFile("pics/colormap.pcx") == null) { - Jake2.Q2Dialog.showChooseDialog(); - - try { - synchronized(Jake2.Q2Dialog) { - Jake2.Q2Dialog.wait(); - } - } catch (InterruptedException e) {} - } - Jake2.Q2Dialog.showStatus(); - } -} diff --git a/src/jake2/qcommon/Qcommon.java b/src/jake2/qcommon/Qcommon.java index 369332b..4ce1129 100644 --- a/src/jake2/qcommon/Qcommon.java +++ b/src/jake2/qcommon/Qcommon.java @@ -2,7 +2,7 @@ * Qcommon.java * Copyright 2003 * - * $Id: Qcommon.java,v 1.8 2004-09-19 19:53:51 hzi Exp $ + * $Id: Qcommon.java,v 1.9 2004-09-19 20:53:07 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -86,7 +86,7 @@ public final class Qcommon extends Globals { Cbuf.Execute(); FS.setCDDir(); // use cddir from config.cfg - Q2DataTest.run(); // test for valid baseq2 + Jake2.Q2Dialog.testQ2Data(); // test for valid baseq2 reconfigure(); // reload default.cfg and config.cfg // -- cgit v1.2.3