public static void main(String[] args) { JavaPlatform.Config config = new JavaPlatform.Config(); for (String arg : args) { if (arg.startsWith("@") && arg.endsWith("x")) { config.scaleFactor = Float.parseFloat(arg.substring(1, arg.length()-1)); } } config.width = 800; config.height = 600; JavaPlatform platform = JavaPlatform.register(config); platform.setTitle("Tests"); // let the caller know that we accept some args platform.log().info("Usage: TestsGameJava [@Nx] [test#]"); platform.log().info(" [@Nx] specifies a scale factor: @2x, @1.5x"); platform.log().info(" [test#] specifies a test to launch directly: test0, test12 "); TestsGame.args = args; PlayN.run(new TestsGame()); } }
public static void main(String[] args) { // configure and create the Java platform LWJGLPlatform.Config config = new LWJGLPlatform.Config(); config.width = 800; config.height = 600; config.appName = "Tests"; // for (String arg : args) { // if (arg.startsWith("@") && arg.endsWith("x")) { // config.scaleFactor = Float.parseFloat(arg.substring(1, arg.length()-1)); // } // } LWJGLPlatform plat = new LWJGLPlatform(config); // let the caller know that we accept some args plat.log().info("Usage: TestsGameJava [@Nx] [test#]"); // plat.log().info("Usage: TestsGameJava [test#]"); // plat.log().info(" [@Nx] specifies a scale factor: @2x, @1.5x"); plat.log().info(" [test#] specifies a test to launch directly: test0, test12 "); // create our the game, initialization happens in ctor TestsGame game = new TestsGame(plat, args); // and start the game loop plat.start(); } }
/** * Registers the Java platform with a default configuration. */ public static JavaPlatform register() { return register(new Config()); }
/** * Registers the Java platform with a default configuration. */ public static JavaPlatform register() { return register(new Config()); }