diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cc26d4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +bin/ +assets/key.der diff --git a/src/IAPHandler.hx b/src/IAPHandler.hx index 0f305ca..13b9d69 100644 --- a/src/IAPHandler.hx +++ b/src/IAPHandler.hx @@ -34,7 +34,7 @@ class IAPHandler // bind methods to JNI trace("=================== JNI linking methods..."); initCall = openfl.utils.JNI.createStaticMethod - ("com.jarnik.iaptest.OUYA_IAP", "init", "(Lorg/haxe/nme/HaxeObject;Ltv/ouya/console/api/OuyaFacade;Ljava/lang/String;)V", true); + ("com.jarnik.iaptest.OUYA_IAP", "init", "(Lorg/haxe/lime/HaxeObject;Ltv/ouya/console/api/OuyaFacade;Ljava/lang/String;)V", true); requestProductListCall = openfl.utils.JNI.createStaticMethod ("com.jarnik.iaptest.OUYA_IAP", "requestProductList", "([Ljava/lang/String;)V", true); getProductListIDsCall = openfl.utils.JNI.createStaticMethod diff --git a/src/Main.hx b/src/Main.hx index 2f071b2..68b511f 100644 --- a/src/Main.hx +++ b/src/Main.hx @@ -3,7 +3,7 @@ import flash.display.Sprite; import flash.utils.ByteArray; import haxe.io.Bytes; import haxe.crypto.BaseCode; - +import flash.Lib; import openfl.Assets; #if android @@ -41,7 +41,7 @@ class Main extends Sprite { icon.visible = false; #if android - var getContext = JNI.createStaticMethod ("org.haxe.nme.GameActivity", "getContext", "()Landroid/content/Context;", true); + var getContext = JNI.createStaticMethod ("org.haxe.lime.GameActivity", "getContext", "()Landroid/content/Context;", true); OuyaController.init ( getContext () ); ouyaFacade = OuyaFacade.getInstance(); ouyaFacade.init( getContext(), OUYA_DEVELOPER_ID ); @@ -53,7 +53,7 @@ class Main extends Sprite { //, enter more product IDs here... ]); - stage.addEventListener (JoystickEvent.BUTTON_DOWN, stage_onJoystickButtonDown); + Lib.current.stage.addEventListener (JoystickEvent.BUTTON_DOWN, stage_onJoystickButtonDown); // 'stage' is still null here, so we use Lib.current.stage #end } diff --git a/src/java/com/jarnik/iaptest/OUYA_IAP.java b/src/java/com/jarnik/iaptest/OUYA_IAP.java index 2a64c36..af65e6b 100644 --- a/src/java/com/jarnik/iaptest/OUYA_IAP.java +++ b/src/java/com/jarnik/iaptest/OUYA_IAP.java @@ -1,6 +1,6 @@ package com.jarnik.iaptest; -import org.haxe.nme.HaxeObject; +import org.haxe.lime.HaxeObject; import java.util.Arrays; import android.util.Log; import java.util.List;