package dungeon_crawler.core;

import clojure.lang.RT;
import clojure.lang.Symbol;

import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
import com.badlogic.gdx.Game;

import org.robovm.cocoatouch.foundation.NSAutoreleasePool;
import org.robovm.cocoatouch.uikit.UIApplication;

public class IOSLauncher extends IOSApplication.Delegate {
	protected IOSApplication createApplication() {
		IOSApplicationConfiguration config = new IOSApplicationConfiguration();
          RT.var("clojure.core", "require").invoke(Symbol.intern("dungeon-crawler.core"));
		try {
			Game game = (Game) RT.var("dungeon-crawler.core", "dungeon-crawler").deref();
			return new IOSApplication(game, config);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public static void main(String[] argv) {
		NSAutoreleasePool pool = new NSAutoreleasePool();
		UIApplication.main(argv, null, IOSLauncher.class);
		pool.drain();
	}
}

@@ -124,94 +124,9 @@
 ovm.
-IOSApplication;%0Aimport com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration
+*
 ;%0Aim
@@ -147,20 +147,17 @@
 gic.gdx.
-Game
+*
 ;%0A%0Aimpor
@@ -169,26 +169,21 @@
 .robovm.
-cocoatouch
+apple
 .foundat
@@ -186,33 +186,17 @@
 ndation.
-NSAutoreleasePool
+*
 ;%0Aimport
@@ -211,38 +211,21 @@
 ovm.
-cocoatouch.uikit.UIApplication
+apple.uikit.*
 ;%0A%0Ap
@@ -408,18 +408,10 @@
 ();%0A
-          
+%09%09
 RT.v
@@ -851,13 +851,13 @@
 ool.
-drain
+close
 ();%0A

Update for RoboVM 0.0.11