//
// Triple Play - utilities for use in PlayN-based games
// Copyright (c) 2011-2013, Three Rings Design, Inc. - All rights reserved.
// http://github.com/threerings/tripleplay/blob/master/LICENSE

package tripleplay.demo;

import playn.core.PlayN;
import playn.java.JavaPlatform;
import tripleplay.platform.JavaTPPlatform;

public class TripleDemoJava
{
    public static void main (String[] args) {
        JavaPlatform.Config config = new JavaPlatform.Config();
        JavaPlatform platform = JavaPlatform.register(config);
        TripleDemo.mainArgs = args;

        // TODO: upgrade to include other systems
        if (System.getProperty("os.name").contains("Linux")) {
            JavaTPPlatform.register(platform, config);
        }

        PlayN.run(new TripleDemo());
    }
}

@@ -218,16 +218,81 @@
 .demo;%0A%0A
+import java.util.List;%0A%0Aimport com.google.common.collect.Lists;%0A%0A
 import p
@@ -524,24 +524,25 @@
 nfig();%0A
+%0A
         
 JavaPlat
@@ -537,108 +537,151 @@
     
-JavaPlatform platform = JavaPlatform.register(config);%0A        TripleDemo.mainArgs = args;%0A%0A
+List%3CString%3E mainArgs = Lists.newArrayList();%0A        for (int ii = 0; ii %3C args.length; ii++) %7B%0A            String size = %22--size=%22;%0A 
         
 // T
@@ -680,117 +680,447 @@
     
-// TODO: upgrade to include other systems%0A        if (System.getProperty(%22os.name%22).contains(%22Linux%22)) %7B%0A    
+   if (args%5Bii%5D.startsWith(size)) %7B%0A                String%5B%5D wh = args%5Bii%5D.substring(size.length()).split(%22x%22);%0A                config.width = Integer.parseInt(wh%5B0%5D);%0A                config.height = Integer.parseInt(wh%5B1%5D);%0A                continue;%0A            %7D%0A            mainArgs.add(args%5Bii%5D);%0A        %7D%0A%0A        JavaPlatform platform = JavaPlatform.register(config);%0A        TripleDemo.mainArgs = mainArgs.toArray(new String%5B0%5D);%0A%0A
     
@@ -1165,26 +1165,16 @@
 config);
-%0A        %7D
 %0A%0A      

Allow window size override on command line.