diff --git a/.gitignore b/.gitignore index d0731de17..6af68d0ce 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,10 @@ .DS_Store .DS_Store? bin/ +ndll/*/lime* +ndll/*/liblime* ndll/*/nme* -ndll/*/libnme* +nddl/*/libnme* project/all_objs project/obj project/vc*.pdb diff --git a/buildfiles/android/MainActivity.java b/buildfiles/android/MainActivity.java index a04601486..bf46577f8 100644 --- a/buildfiles/android/MainActivity.java +++ b/buildfiles/android/MainActivity.java @@ -2,6 +2,6 @@ package ::APP_PACKAGE::; import android.os.Bundle; -public class MainActivity extends org.haxe.nme.GameActivity { +public class MainActivity extends org.haxe.lime.GameActivity { } diff --git a/buildfiles/android/template/src/org/haxe/nme/GameActivity.java b/buildfiles/android/template/src/org/haxe/lime/GameActivity.java similarity index 97% rename from buildfiles/android/template/src/org/haxe/nme/GameActivity.java rename to buildfiles/android/template/src/org/haxe/lime/GameActivity.java index 08948a11f..b06853e11 100644 --- a/buildfiles/android/template/src/org/haxe/nme/GameActivity.java +++ b/buildfiles/android/template/src/org/haxe/lime/GameActivity.java @@ -1,4 +1,4 @@ -package org.haxe.nme; +package org.haxe.lime; import android.app.Activity; @@ -109,7 +109,7 @@ public class GameActivity extends Activity implements SensorEventListener { //if (mMainView == null) { - Log.d ("NME", "mMainView is NULL"); + Log.d ("lime", "mMainView is NULL"); ::foreach ndlls:: System.loadLibrary ("::name::");::end:: @@ -210,7 +210,7 @@ public class GameActivity extends Activity implements SensorEventListener { _sound.doPause (); - mView.sendActivity (NME.DEACTIVATE); + mView.sendActivity (Lime.DEACTIVATE); mView.onPause (); if (sensorManager != null) { @@ -228,7 +228,7 @@ public class GameActivity extends Activity implements SensorEventListener { _sound.doResume (); - mView.sendActivity (NME.ACTIVATE); + mView.sendActivity (Lime.ACTIVATE); if (sensorManager != null) { @@ -367,7 +367,7 @@ public class GameActivity extends Activity implements SensorEventListener { if (type == Sensor.TYPE_ACCELEROMETER) { accelData = event.values.clone (); - NME.onAccelerate (-accelData[0], -accelData[1], accelData[2]); + Lime.onAccelerate (-accelData[0], -accelData[1], accelData[2]); } @@ -414,7 +414,7 @@ public class GameActivity extends Activity implements SensorEventListener { } // TODO: Wait for result? - mView.sendActivity (NME.DESTROY); + mView.sendActivity (Lime.DESTROY); activity = null; super.onDestroy (); @@ -473,14 +473,14 @@ public class GameActivity extends Activity implements SensorEventListener { if (foundRotationMatrix) { SensorManager.getOrientation (rotationMatrix, orientData); - NME.onOrientationUpdate (orientData[0], orientData[1], orientData[2]); + Lime.onOrientationUpdate (orientData[0], orientData[1], orientData[2]); } } - NME.onDeviceOrientationUpdate (prepareDeviceOrientation ()); - NME.onNormalOrientationFound (bufferedNormalOrientation); + Lime.onDeviceOrientationUpdate (prepareDeviceOrientation ()); + Lime.onNormalOrientationFound (bufferedNormalOrientation); } @@ -532,7 +532,7 @@ public class GameActivity extends Activity implements SensorEventListener { @Override public void run () { - NME.onCallback (inHandle); + Lime.onCallback (inHandle); } diff --git a/buildfiles/android/template/src/org/haxe/nme/MainView.java b/buildfiles/android/template/src/org/haxe/lime/MainView.java similarity index 91% rename from buildfiles/android/template/src/org/haxe/nme/MainView.java rename to buildfiles/android/template/src/org/haxe/lime/MainView.java index 186766bcd..dd84a4a11 100644 --- a/buildfiles/android/template/src/org/haxe/nme/MainView.java +++ b/buildfiles/android/template/src/org/haxe/lime/MainView.java @@ -1,4 +1,4 @@ -package org.haxe.nme; +package org.haxe.lime; import android.app.Activity; @@ -58,13 +58,13 @@ class MainView extends GLSurfaceView { EGLConfig[] v2_configs = new EGLConfig[1]; int[] num_config = new int[1]; - int[] attrs = { EGL10.EGL_RENDERABLE_TYPE, ::if DEFINE_NME_FORCE_GLES1::1::else::4::end:: /*EGL_OPENGL_ES2_BIT*/, EGL10.EGL_NONE }; + int[] attrs = { EGL10.EGL_RENDERABLE_TYPE, ::if DEFINE_LIME_FORCE_GLES1::1::else::4::end:: /*EGL_OPENGL_ES2_BIT*/, EGL10.EGL_NONE }; egl.eglChooseConfig (display, attrs, v2_configs, 1, num_config); if (num_config[0]==1) { - eglVersion = ::if DEFINE_NME_FORCE_GLES1::1::else::2::end::; - setEGLContextClientVersion (::if DEFINE_NME_FORCE_GLES1::1::else::2::end::); + eglVersion = ::if DEFINE_LIME_FORCE_GLES1::1::else::2::end::; + setEGLContextClientVersion (::if DEFINE_LIME_FORCE_GLES1::1::else::2::end::); } @@ -205,7 +205,7 @@ class MainView extends GLSurfaceView { } - double wake = NME.getNextWake (); + double wake = Lime.getNextWake (); final MainView me = this; if (wake <= 0) { @@ -312,7 +312,7 @@ class MainView extends GLSurfaceView { public void run () { - me.HandleResult (NME.onJoyMotion (deviceId, axis, ((value - range.getMin ()) / (range.getRange ())) * 65535 - 32768)); + me.HandleResult (Lime.onJoyMotion (deviceId, axis, ((value - range.getMin ()) / (range.getRange ())) * 65535 - 32768)); } @@ -324,7 +324,7 @@ class MainView extends GLSurfaceView { public void run () { - me.HandleResult (NME.onJoyMotion (deviceId, axis, 0)); + me.HandleResult (Lime.onJoyMotion (deviceId, axis, 0)); } @@ -358,7 +358,7 @@ class MainView extends GLSurfaceView { public void run () { - me.HandleResult (NME.onJoyChange (deviceId, inKeyCode, true)); + me.HandleResult (Lime.onJoyChange (deviceId, inKeyCode, true)); } @@ -378,7 +378,7 @@ class MainView extends GLSurfaceView { public void run () { - me.HandleResult (NME.onKeyChange (keyCode, true)); + me.HandleResult (Lime.onKeyChange (keyCode, true)); } @@ -407,7 +407,7 @@ class MainView extends GLSurfaceView { public void run () { - me.HandleResult (NME.onJoyChange (deviceId, inKeyCode, false)); + me.HandleResult (Lime.onJoyChange (deviceId, inKeyCode, false)); } @@ -427,7 +427,7 @@ class MainView extends GLSurfaceView { public void run () { - me.HandleResult (NME.onKeyChange (keyCode, false)); + me.HandleResult (Lime.onKeyChange (keyCode, false)); } @@ -444,7 +444,7 @@ class MainView extends GLSurfaceView { void onPoll () { - HandleResult (NME.onPoll ()); + HandleResult (Lime.onPoll ()); } @@ -483,7 +483,7 @@ class MainView extends GLSurfaceView { public void run () { - me.HandleResult (NME.onTouch (t, x, y, id, sizeX, sizeY)); + me.HandleResult (Lime.onTouch (t, x, y, id, sizeX, sizeY)); } @@ -509,7 +509,7 @@ class MainView extends GLSurfaceView { float x = ev.getX (); float y = ev.getY (); - me.HandleResult (NME.onTrackball (x, y)); + me.HandleResult (Lime.onTrackball (x, y)); } @@ -551,7 +551,7 @@ class MainView extends GLSurfaceView { public void run () { - NME.onActivity (inActivity); + Lime.onActivity (inActivity); } @@ -601,7 +601,7 @@ class MainView extends GLSurfaceView { public void onDrawFrame (GL10 gl) { - mMainView.HandleResult (NME.onRender ()); + mMainView.HandleResult (Lime.onRender ()); Sound.checkSoundCompletion (); } @@ -609,7 +609,7 @@ class MainView extends GLSurfaceView { public void onSurfaceChanged (GL10 gl, int width, int height) { - mMainView.HandleResult (NME.onResize (width, height)); + mMainView.HandleResult (Lime.onResize (width, height)); } diff --git a/buildfiles/android/template/src/org/haxe/nme/Sound.java b/buildfiles/android/template/src/org/haxe/lime/Sound.java similarity index 99% rename from buildfiles/android/template/src/org/haxe/nme/Sound.java rename to buildfiles/android/template/src/org/haxe/lime/Sound.java index 286daf4b4..8b8135fc1 100644 --- a/buildfiles/android/template/src/org/haxe/nme/Sound.java +++ b/buildfiles/android/template/src/org/haxe/lime/Sound.java @@ -1,4 +1,4 @@ -package org.haxe.nme; +package org.haxe.lime; import java.io.File; import java.io.FileInputStream; diff --git a/buildfiles/emscripten/cpp/Main.cpp b/buildfiles/emscripten/cpp/Main.cpp index f6e262420..c6ab66805 100644 --- a/buildfiles/emscripten/cpp/Main.cpp +++ b/buildfiles/emscripten/cpp/Main.cpp @@ -1,7 +1,7 @@ /* * Main.mm * - * Boot code for NME. + * Boot code for lime. * */ diff --git a/buildfiles/html5/haxe/lime/AssetData.hx b/buildfiles/html5/haxe/lime/AssetData.hx index db89dd29c..3f88c8e81 100644 --- a/buildfiles/html5/haxe/lime/AssetData.hx +++ b/buildfiles/html5/haxe/lime/AssetData.hx @@ -17,7 +17,7 @@ class AssetData { if (!initialized) { - ::if (assets != null)::::foreach assets::::if (type == "font")::className.set ("::id::", nme.NME_::flatName::);::else::path.set ("::id::", "::resourceName::");::end:: + ::if (assets != null)::::foreach assets::::if (type == "font")::className.set ("::id::", nme.lime_::flatName::);::else::path.set ("::id::", "::resourceName::");::end:: type.set ("::id::", Reflect.field (AssetType, "::type::".toUpperCase ())); ::end::::end:: ::if (libraries != null)::::foreach libraries::library.set ("::name::", Reflect.field (LibraryType, "::type::".toUpperCase ())); @@ -32,5 +32,5 @@ class AssetData { } //AssetData -::foreach assets::::if (type == "font")::class NME_::flatName:: extends flash.text.Font { }::end:: +::foreach assets::::if (type == "font")::class lime_::flatName:: extends flash.text.Font { }::end:: ::end:: \ No newline at end of file diff --git a/buildfiles/iphone/PROJ/Classes/Main.mm b/buildfiles/iphone/PROJ/Classes/Main.mm index f6e262420..c6ab66805 100644 --- a/buildfiles/iphone/PROJ/Classes/Main.mm +++ b/buildfiles/iphone/PROJ/Classes/Main.mm @@ -1,7 +1,7 @@ /* * Main.mm * - * Boot code for NME. + * Boot code for lime. * */ diff --git a/dependencies/extension-api/src/org/haxe/nme/HaxeObject.java b/dependencies/extension-api/src/org/haxe/lime/HaxeObject.java similarity index 77% rename from dependencies/extension-api/src/org/haxe/nme/HaxeObject.java rename to dependencies/extension-api/src/org/haxe/lime/HaxeObject.java index eaf4f2f02..e0a299bb6 100644 --- a/dependencies/extension-api/src/org/haxe/nme/HaxeObject.java +++ b/dependencies/extension-api/src/org/haxe/lime/HaxeObject.java @@ -1,4 +1,4 @@ -package org.haxe.nme; +package org.haxe.lime; import android.util.Log; import java.lang.Boolean; @@ -24,7 +24,7 @@ public class HaxeObject protected void finalize() throws Throwable { try { - NME.releaseReference(__haxeHandle); + Lime.releaseReference(__haxeHandle); } finally { super.finalize(); } @@ -32,14 +32,14 @@ public class HaxeObject public Object call0(String function) { //Log.e("HaxeObject","Calling obj0" + function + "()" ); - return NME.callObjectFunction(__haxeHandle,function,new Object[0]); + return Lime.callObjectFunction(__haxeHandle,function,new Object[0]); } public Object call1(String function,Object arg0) { Object[] args = new Object[1]; args[0] = arg0; //Log.e("HaxeObject","Calling obj1 " + function + "(" + arg0 + ")" ); - return NME.callObjectFunction(__haxeHandle,function,args); + return Lime.callObjectFunction(__haxeHandle,function,args); } public Object call2(String function,Object arg0,Object arg1) { @@ -47,7 +47,7 @@ public class HaxeObject args[0] = arg0; args[1] = arg1; //Log.e("HaxeObject","Calling obj2 " + function + "(" + arg0 + "," + arg1 + ")" ); - return NME.callObjectFunction(__haxeHandle,function,args); + return Lime.callObjectFunction(__haxeHandle,function,args); } public Object call3(String function,Object arg0,Object arg1,Object arg2) { @@ -56,7 +56,7 @@ public class HaxeObject args[1] = arg1; args[2] = arg2; //Log.e("HaxeObject","Calling obj3 " + function + "(" + arg0 + "," + arg1 + "," + arg2 + ")" ); - return NME.callObjectFunction(__haxeHandle,function,args); + return Lime.callObjectFunction(__haxeHandle,function,args); } public Object call4(String function,Object arg0,Object arg1,Object arg2,Object arg3) { @@ -66,20 +66,20 @@ public class HaxeObject args[2] = arg2; args[3] = arg3; //Log.e("HaxeObject","Calling obj4 " + function + "(" + arg0 + "," + arg1 + "," + arg2 + "," + arg3 + ")" ); - return NME.callObjectFunction(__haxeHandle,function,args); + return Lime.callObjectFunction(__haxeHandle,function,args); } public double callD0(String function) { //Log.e("HaxeObject","Calling objD0 " + function + "()" ); - return NME.callNumericFunction(__haxeHandle,function,new Object[0]); + return Lime.callNumericFunction(__haxeHandle,function,new Object[0]); } public double callD1(String function,Object arg0) { Object[] args = new Object[1]; args[0] = arg0; //Log.e("HaxeObject","Calling D1 " + function + "(" + arg0 + ")" ); - return NME.callNumericFunction(__haxeHandle,function,args); + return Lime.callNumericFunction(__haxeHandle,function,args); } public double callD2(String function,Object arg0,Object arg1) { @@ -87,7 +87,7 @@ public class HaxeObject args[0] = arg0; args[1] = arg1; //Log.e("HaxeObject","Calling D2 " + function + "(" + arg0 + "," + arg1 + ")" ); - return NME.callNumericFunction(__haxeHandle,function,args); + return Lime.callNumericFunction(__haxeHandle,function,args); } public double callD3(String function,Object arg0,Object arg1,Object arg2) { @@ -96,7 +96,7 @@ public class HaxeObject args[1] = arg1; args[2] = arg2; //Log.e("HaxeObject","Calling D3 " + function + "(" + arg0 + "," + arg1 + "," + arg2 + ")" ); - return NME.callNumericFunction(__haxeHandle,function,args); + return Lime.callNumericFunction(__haxeHandle,function,args); } @@ -105,10 +105,10 @@ public class HaxeObject public Object call(String function, Object[] args) { - return NME.callObjectFunction(__haxeHandle,function,args); + return Lime.callObjectFunction(__haxeHandle,function,args); } public double callD(String function, Object[] args) { - return NME.callNumericFunction(__haxeHandle,function,args); + return Lime.callNumericFunction(__haxeHandle,function,args); } } diff --git a/dependencies/extension-api/src/org/haxe/nme/NME.java b/dependencies/extension-api/src/org/haxe/lime/Lime.java similarity index 94% rename from dependencies/extension-api/src/org/haxe/nme/NME.java rename to dependencies/extension-api/src/org/haxe/lime/Lime.java index 23aa54562..383da87dd 100644 --- a/dependencies/extension-api/src/org/haxe/nme/NME.java +++ b/dependencies/extension-api/src/org/haxe/lime/Lime.java @@ -1,12 +1,12 @@ -package org.haxe.nme; +package org.haxe.lime; // Wrapper for native library -public class NME { +public class Lime { static { System.loadLibrary("openal"); - System.loadLibrary("nme"); + System.loadLibrary("lime"); } public static final int ACTIVATE = 1; diff --git a/dependencies/extension-api/src/org/haxe/nme/Value.java b/dependencies/extension-api/src/org/haxe/lime/Value.java similarity index 93% rename from dependencies/extension-api/src/org/haxe/nme/Value.java rename to dependencies/extension-api/src/org/haxe/lime/Value.java index 9b9aca1cd..00b1c207d 100644 --- a/dependencies/extension-api/src/org/haxe/nme/Value.java +++ b/dependencies/extension-api/src/org/haxe/lime/Value.java @@ -1,4 +1,4 @@ -package org.haxe.nme; +package org.haxe.lime; public class Value { diff --git a/examples/HerokuShaders/src/Main.hx b/examples/HerokuShaders/src/Main.hx index 245f94b05..1fc98e60e 100644 --- a/examples/HerokuShaders/src/Main.hx +++ b/examples/HerokuShaders/src/Main.hx @@ -5,7 +5,7 @@ import lime.utils.Assets; import lime.LiME; - //Import GL stuff from nme + //Import GL stuff from Lime import lime.gl.GL; import lime.gl.GLBuffer; import lime.gl.GLProgram; diff --git a/haxe/Timer.hx b/haxe/Timer.hx index e60880c13..13675c406 100644 --- a/haxe/Timer.hx +++ b/haxe/Timer.hx @@ -44,7 +44,7 @@ package haxe; */ @:noCompletion static public function __nextWake( limit:Float ):Float { - var now = nme_time_stamp () * 1000.0; + var now = lime_time_stamp () * 1000.0; var sleep; for (timer in sRunningTimers) { @@ -103,10 +103,10 @@ package haxe; static public function stamp ():Float { - return nme_time_stamp (); + return lime_time_stamp (); } - static var nme_time_stamp = lime.utils.Libs.load ("nme","nme_time_stamp", 0); + static var lime_time_stamp = lime.utils.Libs.load ("lime","lime_time_stamp", 0); } //Timer diff --git a/include.xml b/include.xml index fd1458be3..9c5cbf557 100644 --- a/include.xml +++ b/include.xml @@ -19,7 +19,7 @@ - + diff --git a/lime/AudioHandler.hx b/lime/AudioHandler.hx index 303e052d1..90d833963 100644 --- a/lime/AudioHandler.hx +++ b/lime/AudioHandler.hx @@ -37,7 +37,7 @@ class Sound { sound = null; #if lime_native - sound = nme_sound_channel_create(handle, _start, _loops, _transform); + sound = lime_sound_channel_create(handle, _start, _loops, _transform); #end //lime_native } @@ -45,7 +45,7 @@ class Sound { if(sound != null) { #if lime_native - nme_sound_channel_stop(sound); + lime_sound_channel_stop(sound); #end //lime_native sound = null; @@ -56,7 +56,7 @@ class Sound { _transform.volume = _v; #if lime_native - nme_sound_channel_set_transform(sound,_transform); + lime_sound_channel_set_transform(sound,_transform); #end //lime_native return volume = _v; @@ -65,16 +65,16 @@ class Sound { _transform.pan = _p; #if lime_native - nme_sound_channel_set_transform(sound,_transform); + lime_sound_channel_set_transform(sound,_transform); #end //lime_native return pan = _p; } #if lime_native - private static var nme_sound_channel_create = Libs.load("nme","nme_sound_channel_create", 4); - private static var nme_sound_channel_stop = Libs.load("nme","nme_sound_channel_stop", 1); - private static var nme_sound_channel_set_transform = Libs.load("nme","nme_sound_channel_set_transform", 2); + private static var lime_sound_channel_create = Libs.load("lime","lime_sound_channel_create", 4); + private static var lime_sound_channel_stop = Libs.load("lime","lime_sound_channel_stop", 1); + private static var lime_sound_channel_set_transform = Libs.load("lime","lime_sound_channel_set_transform", 2); #end //lime_native } @@ -98,15 +98,15 @@ class AudioHandler { } #if lime_native - var _handle = nme_sound_from_file( lime.AssetData.path.get(_file), _music); + var _handle = lime_sound_from_file( lime.AssetData.path.get(_file), _music); var _sound = new Sound(_handle); sounds.set(_name, _sound); #end //lime_native } #if lime_native - private static var nme_sound_from_file = Libs.load("nme","nme_sound_from_file", 2); - private static var nme_sound_from_data = Libs.load("nme","nme_sound_from_data", 3); + private static var lime_sound_from_file = Libs.load("lime","lime_sound_from_file", 2); + private static var lime_sound_from_data = Libs.load("lime","lime_sound_from_data", 3); #end //lime_native } \ No newline at end of file diff --git a/lime/InputHandler.hx b/lime/InputHandler.hx index 0e5776561..969619b9b 100644 --- a/lime/InputHandler.hx +++ b/lime/InputHandler.hx @@ -74,7 +74,7 @@ class InputHandler { meta_down : (_event.flags & efCommandDown > 0) }); } - //nmeOnKey(_event, KeyboardEvent.KEY_DOWN); + //limeOnKey(_event, KeyboardEvent.KEY_DOWN); } public function lime_onkeyup(_event:Dynamic) { @@ -93,7 +93,7 @@ class InputHandler { meta_down : (_event.flags & efCommandDown > 0) }); } - //nmeOnKey(_event, KeyboardEvent.KEY_UP); + //limeOnKey(_event, KeyboardEvent.KEY_UP); } public function lime_gotinputfocus(_event:Dynamic) { @@ -112,7 +112,7 @@ class InputHandler { }); } //var evt = new Event(FocusEvent.FOCUS_IN); - //nmeDispatchEvent(evt); + //limeDispatchEvent(evt); } public function lime_lostinputfocus(_event:Dynamic) { @@ -131,7 +131,7 @@ class InputHandler { }); } //var evt = new Event(FocusEvent.FOCUS_OUT); - //nmeDispatchEvent(evt); + //limeDispatchEvent(evt); } //Mouse @@ -345,7 +345,7 @@ class InputHandler { if(lib.host.ontouchtap != null) { lib.host.ontouchtap(_event); } - //nmeOnTouchTap(_event.TouchEvent.TOUCH_TAP); + //limeOnTouchTap(_event.TouchEvent.TOUCH_TAP); } //Joystick @@ -354,35 +354,35 @@ class InputHandler { if(lib.host.onjoyaxismove != null) { lib.host.onjoyaxismove(_event); } - //nmeOnJoystick(_event, JoystickEvent.AXIS_MOVE); + //limeOnJoystick(_event, JoystickEvent.AXIS_MOVE); } public function lime_joyballmove(_event:Dynamic) { if(lib.host.onjoyballmove != null) { lib.host.onjoyballmove(_event); } - //nmeOnJoystick(_event, JoystickEvent.BALL_MOVE); + //limeOnJoystick(_event, JoystickEvent.BALL_MOVE); } public function lime_joyhatmove(_event:Dynamic) { if(lib.host.onjoyhatmove != null) { lib.host.onjoyhatmove(_event); } - //nmeOnJoystick(_event, JoystickEvent.HAT_MOVE); + //limeOnJoystick(_event, JoystickEvent.HAT_MOVE); } public function lime_joybuttondown(_event:Dynamic) { if(lib.host.onjoybuttondown != null) { lib.host.onjoybuttondown(_event); } - //nmeOnJoystick(_event, JoystickEvent.BUTTON_DOWN); + //limeOnJoystick(_event, JoystickEvent.BUTTON_DOWN); } public function lime_joybuttonup(_event:Dynamic) { if(lib.host.onjoybuttonup != null) { lib.host.onjoybuttonup(_event); } - //nmeOnJoystick(_event, JoystickEvent.BUTTON_UP); + //limeOnJoystick(_event, JoystickEvent.BUTTON_UP); } diff --git a/lime/LiME.hx b/lime/LiME.hx index b4d9bf287..898950384 100644 --- a/lime/LiME.hx +++ b/lime/LiME.hx @@ -17,17 +17,17 @@ class LiME { //the config passed to us on creation public var config : Dynamic; - //The handlers for the messages from NME + //The handlers for the messages from lime public var audio : AudioHandler; public var input : InputHandler; public var render : RenderHandler; public var window : WindowHandler; -//nme specifics +//lime specifics - //the handle to the window from nme + //the handle to the window from lime public var window_handle : Dynamic; - //the handle to the nme stage + //the handle to the lime stage public var view_handle : Dynamic; // timing @@ -75,7 +75,7 @@ class LiME { } #if android - render_request_function = nme_stage_request_render; + render_request_function = lime_stage_request_render; #else render_request_function = null; #end //android @@ -297,7 +297,7 @@ class LiME { } //on_syswm - //Called when updated by the nme/sdl runtime + //Called when updated by the lime/sdl runtime public function on_update(_event) { _debug('on_update ' + Timer.stamp(), true, false); @@ -377,7 +377,7 @@ class LiME { var nextWake = haxe.Timer.__nextWake (315000000.0); nextWake = __nextFrameDue( nextWake ); - nme_stage_set_next_wake( view_handle, nextWake ); + lime_stage_set_next_wake( view_handle, nextWake ); return nextWake; @@ -434,8 +434,8 @@ class LiME { } //_debug #if lime_native - private static var nme_stage_request_render = Libs.load("nme","nme_stage_request_render", 0); - private static var nme_stage_set_next_wake = Libs.load("nme","nme_stage_set_next_wake", 2); + private static var lime_stage_request_render = Libs.load("lime","lime_stage_request_render", 0); + private static var lime_stage_set_next_wake = Libs.load("lime","lime_stage_set_next_wake", 2); #end } diff --git a/lime/RenderHandler.hx b/lime/RenderHandler.hx index 0a8bdb12b..3c5dc203b 100644 --- a/lime/RenderHandler.hx +++ b/lime/RenderHandler.hx @@ -52,13 +52,13 @@ class RenderHandler { #if lime_native //Set up the OpenGL View - direct_renderer_handle = nme_direct_renderer_create(); + direct_renderer_handle = lime_direct_renderer_create(); //Add this to the main stage, so it will render - nme_doc_add_child( lib.view_handle, direct_renderer_handle ); + lime_doc_add_child( lib.view_handle, direct_renderer_handle ); //Set this handle to the real view with a render function - nme_direct_renderer_set( direct_renderer_handle, on_render ); + lime_direct_renderer_set( direct_renderer_handle, on_render ); #end //lime_native @@ -79,7 +79,7 @@ class RenderHandler { throw "WebGL is required to run this"; } - lime.gl.GL.nmeContext = direct_renderer_handle; + lime.gl.GL.limeContext = direct_renderer_handle; requestAnimFrame = js.Browser.window.requestAnimationFrame; @@ -206,7 +206,7 @@ class RenderHandler { public function request_render() { #if lime_native - nme_stage_request_render(); + lime_stage_request_render(); #end } @@ -229,10 +229,10 @@ class RenderHandler { #if lime_native // trace("now doing render"); - // nme_stage_request_render(); + // lime_stage_request_render(); - nme_render_stage( lib.view_handle ); - // nme_stage_request_render(); + lime_render_stage( lib.view_handle ); + // lime_stage_request_render(); #end //lime_native return true; @@ -247,14 +247,14 @@ class RenderHandler { } //on_render -//nme functions +//lime functions #if lime_native - private static var nme_stage_request_render = Libs.load("nme","nme_stage_request_render", 0); - private static var nme_render_stage = Libs.load("nme","nme_render_stage", 1); - private static var nme_doc_add_child = Libs.load("nme","nme_doc_add_child", 2); - private static var nme_direct_renderer_create = Libs.load("nme","nme_direct_renderer_create", 0); - private static var nme_direct_renderer_set = Libs.load("nme","nme_direct_renderer_set", 2); - private static var nme_stage_set_next_wake = Libs.load("nme","nme_stage_set_next_wake", 2); + private static var lime_stage_request_render = Libs.load("lime","lime_stage_request_render", 0); + private static var lime_render_stage = Libs.load("lime","lime_render_stage", 1); + private static var lime_doc_add_child = Libs.load("lime","lime_doc_add_child", 2); + private static var lime_direct_renderer_create = Libs.load("lime","lime_direct_renderer_create", 0); + private static var lime_direct_renderer_set = Libs.load("lime","lime_direct_renderer_set", 2); + private static var lime_stage_set_next_wake = Libs.load("lime","lime_stage_set_next_wake", 2); #end //lime_native } diff --git a/lime/WindowHandler.hx b/lime/WindowHandler.hx index 010158b62..e2757b94a 100644 --- a/lime/WindowHandler.hx +++ b/lime/WindowHandler.hx @@ -25,7 +25,7 @@ class WindowHandler { #if lime_native - nme_create_main_frame( + lime_create_main_frame( lib.on_window_ready, lib.config.width, //width @@ -50,7 +50,7 @@ class WindowHandler { lib.config.title, //title null //icon - ); //nme_create_main_frame + ); //lime_create_main_frame #end @@ -73,7 +73,7 @@ class WindowHandler { public function shutdown() { #if lime_native - nme_close(); + lime_close(); #end lib._debug(':: lime :: \t WindowHandler shut down.'); @@ -83,12 +83,12 @@ class WindowHandler { #if lime_native //Fetch the stage handle - lib.view_handle = nme_get_frame_stage( lib.window_handle ); + lib.view_handle = lime_get_frame_stage( lib.window_handle ); //Make sure that our configs are up to date with the actual screen resolution //not just the specified resolution in the project file - lib.config.width = nme_stage_get_stage_width(lib.view_handle); - lib.config.height = nme_stage_get_stage_height(lib.view_handle); + lib.config.width = lime_stage_get_stage_width(lib.view_handle); + lib.config.height = lime_stage_get_stage_height(lib.view_handle); //move the window based on xml flags if(lib.config.x != null && lib.config.y != null) { @@ -96,10 +96,10 @@ class WindowHandler { } //Update the touch support - lib.config.multitouch_supported = nme_stage_get_multitouch_supported(lib.view_handle); + lib.config.multitouch_supported = lime_stage_get_multitouch_supported(lib.view_handle); lib.config.multitouch = true; //Enable it if needed - nme_stage_set_multitouch_active(lib.view_handle, true); + lime_stage_set_multitouch_active(lib.view_handle, true); #end //lime_native @@ -109,8 +109,8 @@ class WindowHandler { public function post_ready() { #if lime_native - //Set the stage handler for NME to send us events - nme_set_stage_handler(lib.view_handle, lib.on_lime_event, lib.config.width, lib.config.height); + //Set the stage handler for lime to send us events + lime_set_stage_handler(lib.view_handle, lib.on_lime_event, lib.config.width, lib.config.height); #end #if lime_html5 @@ -147,8 +147,8 @@ class WindowHandler { public function set_cursor_visible(val:Bool = true) { #if lime_native - if(nme_stage_show_cursor!=null) { - nme_stage_show_cursor(lib.view_handle, val); + if(lime_stage_show_cursor!=null) { + lime_stage_show_cursor(lib.view_handle, val); } #end //lime_native @@ -158,8 +158,8 @@ class WindowHandler { public function constrain_cursor_to_window_frame( val:Bool = false ) { #if lime_native - if(nme_stage_constrain_cursor_to_window_frame!=null) { - nme_stage_constrain_cursor_to_window_frame(lib.view_handle, val); + if(lime_stage_constrain_cursor_to_window_frame!=null) { + lime_stage_constrain_cursor_to_window_frame(lib.view_handle, val); } #end //lime_native @@ -172,7 +172,7 @@ class WindowHandler { public function set_window_position( x:Int, y:Int ) { #if lime_native - nme_stage_set_window_position(lib.view_handle, x, y); + lime_stage_set_window_position(lib.view_handle, x, y); #end //lime_native } @@ -215,8 +215,8 @@ class WindowHandler { public function set_cursor_position_in_window(_x:Int = 0, _y:Int = 0) { #if lime_native - if(nme_stage_set_cursor_position_in_window!=null) { - nme_stage_set_cursor_position_in_window(lib.view_handle, _x, _y); + if(lime_stage_set_cursor_position_in_window!=null) { + lime_stage_set_cursor_position_in_window(lib.view_handle, _x, _y); } lib.input.last_mouse_x = _x; lib.input.last_mouse_y = _y; @@ -234,9 +234,9 @@ class WindowHandler { //todo: - //nmeOnResize(_event.x, _event.y); + //limeOnResize(_event.x, _event.y); //if (renderRequest == null) - // nmeRender(false); + // limeRender(false); } public function on_should_rotate( _event:Dynamic ) { @@ -252,28 +252,28 @@ class WindowHandler { //Called when the application wants to go to the background and stop public function on_pause() { #if lime_native - nme_pause_animation(); + lime_pause_animation(); #end //lime_native } //on_pause //Called when the application resumes operation from the background public function on_resume() { #if lime_native - nme_resume_animation(); + lime_resume_animation(); #end //lime_native } //on_resume // Terminates the process straight away, bypassing graceful shutdown public function on_force_close() { #if lime_native - nme_terminate(); + lime_terminate(); #end //lime_native } //on_force_close public function openURL( _url:String ) { #if lime_native - nme_get_url( _url ); + lime_get_url( _url ); #end //lime_native #if lime_html5 @@ -289,55 +289,55 @@ class WindowHandler { public function fileDialogOpen(_title:String, _text:String) : String { #if lime_native - return nme_file_dialog_open(_title, _text, []); + return lime_file_dialog_open(_title, _text, []); #else return ""; #end } public function fileDialogSave(_title:String, _text:String) : String { #if lime_native - return nme_file_dialog_save(_title, _text, []); + return lime_file_dialog_save(_title, _text, []); #else return ""; #end } public function fileDialogFolder(_title:String, _text:String) : String { #if lime_native - return nme_file_dialog_folder(_title, _text); + return lime_file_dialog_folder(_title, _text); #else return ""; #end } -//nme functions +//lime functions #if lime_native - private static var nme_stage_get_stage_width = Libs.load("nme","nme_stage_get_stage_width", 1); - private static var nme_stage_get_stage_height = Libs.load("nme","nme_stage_get_stage_height", 1); - private static var nme_set_stage_handler = Libs.load("nme","nme_set_stage_handler", 4); - private static var nme_get_frame_stage = Libs.load("nme","nme_get_frame_stage", 1); - private static var nme_create_main_frame = Libs.load("nme","nme_create_main_frame", -1); - private static var nme_pause_animation = Libs.load("nme","nme_pause_animation", 0); - private static var nme_resume_animation = Libs.load("nme","nme_resume_animation", 0); - private static var nme_terminate = Libs.load("nme","nme_terminate", 0); - private static var nme_close = Libs.load("nme","nme_close", 0); - private static var nme_get_url = Libs.load("nme","nme_get_url", 1); + private static var lime_stage_get_stage_width = Libs.load("lime","lime_stage_get_stage_width", 1); + private static var lime_stage_get_stage_height = Libs.load("lime","lime_stage_get_stage_height", 1); + private static var lime_set_stage_handler = Libs.load("lime","lime_set_stage_handler", 4); + private static var lime_get_frame_stage = Libs.load("lime","lime_get_frame_stage", 1); + private static var lime_create_main_frame = Libs.load("lime","lime_create_main_frame", -1); + private static var lime_pause_animation = Libs.load("lime","lime_pause_animation", 0); + private static var lime_resume_animation = Libs.load("lime","lime_resume_animation", 0); + private static var lime_terminate = Libs.load("lime","lime_terminate", 0); + private static var lime_close = Libs.load("lime","lime_close", 0); + private static var lime_get_url = Libs.load("lime","lime_get_url", 1); //File Dialogs - private static var nme_file_dialog_save = Libs.load("nme", "nme_file_dialog_save", 3); - private static var nme_file_dialog_open = Libs.load("nme", "nme_file_dialog_open", 3); - private static var nme_file_dialog_folder = Libs.load("nme", "nme_file_dialog_folder", 2); + private static var lime_file_dialog_save = Libs.load("lime", "lime_file_dialog_save", 3); + private static var lime_file_dialog_open = Libs.load("lime", "lime_file_dialog_open", 3); + private static var lime_file_dialog_folder = Libs.load("lime", "lime_file_dialog_folder", 2); //Cursor and window control (desktop only obviously) - private static var nme_stage_set_window_position = Libs.load("nme","nme_stage_set_window_position", 3); + private static var lime_stage_set_window_position = Libs.load("lime","lime_stage_set_window_position", 3); - private static var nme_stage_show_cursor = Libs.load("nme","nme_stage_show_cursor", 2); - private static var nme_stage_constrain_cursor_to_window_frame = Libs.load("nme","nme_stage_constrain_cursor_to_window_frame", 2); - private static var nme_stage_set_cursor_position_in_window = Libs.load("nme","nme_stage_set_cursor_position_in_window", 3); + private static var lime_stage_show_cursor = Libs.load("lime","lime_stage_show_cursor", 2); + private static var lime_stage_constrain_cursor_to_window_frame = Libs.load("lime","lime_stage_constrain_cursor_to_window_frame", 2); + private static var lime_stage_set_cursor_position_in_window = Libs.load("lime","lime_stage_set_cursor_position_in_window", 3); //Multitouch - private static var nme_stage_get_multitouch_supported = Libs.load("nme","nme_stage_get_multitouch_supported", 1); - private static var nme_stage_set_multitouch_active = Libs.load("nme","nme_stage_set_multitouch_active", 2); + private static var lime_stage_get_multitouch_supported = Libs.load("lime","lime_stage_get_multitouch_supported", 1); + private static var lime_stage_set_multitouch_active = Libs.load("lime","lime_stage_set_multitouch_active", 2); #end //lime_native diff --git a/lime/gl/html5/GL.hx b/lime/gl/html5/GL.hx index 5327e17bf..64edd3781 100644 --- a/lime/gl/html5/GL.hx +++ b/lime/gl/html5/GL.hx @@ -437,50 +437,50 @@ class GL { public static var drawingBufferWidth(get_drawingBufferWidth, null):Int; public static var version(get_version, null):Int; - public static var nmeContext:RenderingContext; + public static var limeContext:RenderingContext; public static function activeTexture(texture:Int):Void { - nmeContext.activeTexture(texture); + limeContext.activeTexture(texture); } public static function attachShader(program:GLProgram, shader:GLShader):Void { - nmeContext.attachShader(program, shader); + limeContext.attachShader(program, shader); } public static function bindAttribLocation(program:GLProgram, index:Int, name:String):Void { - nmeContext.bindAttribLocation(program, index, name); + limeContext.bindAttribLocation(program, index, name); } /* public static function bindBitmapDataTexture(texture:BitmapData):Void { - if (texture.nmeGLTexture == null) { + if (texture.limeGLTexture == null) { - texture.nmeGLTexture = nmeContext.createTexture(); - nmeContext.bindTexture(TEXTURE_2D, texture.nmeGLTexture); + texture.limeGLTexture = limeContext.createTexture(); + limeContext.bindTexture(TEXTURE_2D, texture.limeGLTexture); - nmeContext.texParameteri(TEXTURE_2D, TEXTURE_WRAP_S, CLAMP_TO_EDGE); - nmeContext.texParameteri(TEXTURE_2D, TEXTURE_WRAP_T, CLAMP_TO_EDGE); - nmeContext.texParameteri(TEXTURE_2D, TEXTURE_MIN_FILTER, NEAREST); - nmeContext.texParameteri(TEXTURE_2D, TEXTURE_MAG_FILTER, NEAREST); + limeContext.texParameteri(TEXTURE_2D, TEXTURE_WRAP_S, CLAMP_TO_EDGE); + limeContext.texParameteri(TEXTURE_2D, TEXTURE_WRAP_T, CLAMP_TO_EDGE); + limeContext.texParameteri(TEXTURE_2D, TEXTURE_MIN_FILTER, NEAREST); + limeContext.texParameteri(TEXTURE_2D, TEXTURE_MAG_FILTER, NEAREST); texture.lock(); - nmeContext.texImage2D(TEXTURE_2D, 0, RGBA, RGBA, UNSIGNED_BYTE, texture.nmeImageData); + limeContext.texImage2D(TEXTURE_2D, 0, RGBA, RGBA, UNSIGNED_BYTE, texture.limeImageData); texture.unlock(); } else { - nmeContext.bindTexture(TEXTURE_2D, texture.nmeGLTexture); + limeContext.bindTexture(TEXTURE_2D, texture.limeGLTexture); } @@ -489,63 +489,63 @@ class GL { public static function bindBuffer(target:Int, buffer:GLBuffer):Void { - nmeContext.bindBuffer(target, buffer); + limeContext.bindBuffer(target, buffer); } public static function bindFramebuffer(target:Int, framebuffer:GLFramebuffer):Void { - nmeContext.bindFramebuffer(target, framebuffer); + limeContext.bindFramebuffer(target, framebuffer); } public static function bindRenderbuffer(target:Int, renderbuffer:GLRenderbuffer):Void { - nmeContext.bindRenderbuffer(target, renderbuffer); + limeContext.bindRenderbuffer(target, renderbuffer); } public static function bindTexture(target:Int, texture:GLTexture):Void { - nmeContext.bindTexture(target, texture); + limeContext.bindTexture(target, texture); } public static function blendColor(red:Float, green:Float, blue:Float, alpha:Float):Void { - nmeContext.blendColor(red, green, blue, alpha); + limeContext.blendColor(red, green, blue, alpha); } public static function blendEquation(mode:Int):Void { - nmeContext.blendEquation(mode); + limeContext.blendEquation(mode); } public static function blendEquationSeparate(modeRGB:Int, modeAlpha:Int):Void { - nmeContext.blendEquationSeparate(modeRGB, modeAlpha); + limeContext.blendEquationSeparate(modeRGB, modeAlpha); } public static function blendFunc(sfactor:Int, dfactor:Int):Void { - nmeContext.blendFunc(sfactor, dfactor); + limeContext.blendFunc(sfactor, dfactor); } public static function blendFuncSeparate(srcRGB:Int, dstRGB:Int, srcAlpha:Int, dstAlpha:Int):Void { - nmeContext.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); + limeContext.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); } @@ -553,399 +553,399 @@ class GL { //public static function bufferData(target:Int, data:IMemoryRange, usage:Int):Void { public static function bufferData(target:Int, data:ArrayBufferView, usage:Int):Void { - nmeContext.bufferData(target, data, usage); + limeContext.bufferData(target, data, usage); } public static function bufferSubData(target:Int, offset:Int, data:ArrayBufferView):Void { - nmeContext.bufferSubData(target, offset, data); + limeContext.bufferSubData(target, offset, data); } public static function checkFramebufferStatus(target:Int):Int { - return nmeContext.checkFramebufferStatus(target); + return limeContext.checkFramebufferStatus(target); } public static function clear(mask:Int):Void { - nmeContext.clear(mask); + limeContext.clear(mask); } public static function clearColor(red:Float, green:Float, blue:Float, alpha:Float):Void { - nmeContext.clearColor(red, green, blue, alpha); + limeContext.clearColor(red, green, blue, alpha); } public static function clearDepth(depth:Float):Void { - nmeContext.clearDepth(depth); + limeContext.clearDepth(depth); } public static function clearStencil(s:Int):Void { - nmeContext.clearStencil(s); + limeContext.clearStencil(s); } public static function colorMask(red:Bool, green:Bool, blue:Bool, alpha:Bool):Void { - nmeContext.colorMask(red, green, blue, alpha); + limeContext.colorMask(red, green, blue, alpha); } public static function compileShader(shader:GLShader):Void { - nmeContext.compileShader(shader); + limeContext.compileShader(shader); } public static function compressedTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, data:ArrayBufferView):Void { - nmeContext.compressedTexImage2D(target, level, internalformat, width, height, border, data); + limeContext.compressedTexImage2D(target, level, internalformat, width, height, border, data); } public static function compressedTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, data:ArrayBufferView):Void { - nmeContext.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data); + limeContext.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data); } public static function copyTexImage2D(target:Int, level:Int, internalformat:Int, x:Int, y:Int, width:Int, height:Int, border:Int):Void { - nmeContext.copyTexImage2D(target, level, internalformat, x, y, width, height, border); + limeContext.copyTexImage2D(target, level, internalformat, x, y, width, height, border); } public static function copyTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, x:Int, y:Int, width:Int, height:Int):Void { - nmeContext.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); + limeContext.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); } public static function createBuffer():GLBuffer { - return nmeContext.createBuffer(); + return limeContext.createBuffer(); } public static function createFramebuffer():GLFramebuffer { - return nmeContext.createFramebuffer(); + return limeContext.createFramebuffer(); } public static function createProgram():GLProgram { - return nmeContext.createProgram(); + return limeContext.createProgram(); } public static function createRenderbuffer():GLRenderbuffer { - return nmeContext.createRenderbuffer(); + return limeContext.createRenderbuffer(); } public static function createShader(type:Int):GLShader { - return nmeContext.createShader(type); + return limeContext.createShader(type); } public static function createTexture():GLTexture { - return nmeContext.createTexture(); + return limeContext.createTexture(); } public static function cullFace(mode:Int):Void { - nmeContext.cullFace(mode); + limeContext.cullFace(mode); } public static function deleteBuffer(buffer:GLBuffer):Void { - nmeContext.deleteBuffer(buffer); + limeContext.deleteBuffer(buffer); } public static function deleteFramebuffer(framebuffer:GLFramebuffer):Void { - nmeContext.deleteFramebuffer(framebuffer); + limeContext.deleteFramebuffer(framebuffer); } public static function deleteProgram(program:GLProgram):Void { - nmeContext.deleteProgram(program); + limeContext.deleteProgram(program); } public static function deleteRenderbuffer(renderbuffer:GLRenderbuffer):Void { - nmeContext.deleteRenderbuffer(renderbuffer); + limeContext.deleteRenderbuffer(renderbuffer); } public static function deleteShader(shader:GLShader):Void { - nmeContext.deleteShader(shader); + limeContext.deleteShader(shader); } public static function deleteTexture(texture:GLTexture):Void { - nmeContext.deleteTexture(texture); + limeContext.deleteTexture(texture); } public static function depthFunc(func:Int):Void { - nmeContext.depthFunc(func); + limeContext.depthFunc(func); } public static function depthMask(flag:Bool):Void { - nmeContext.depthMask(flag); + limeContext.depthMask(flag); } public static function depthRange(zNear:Float, zFar:Float):Void { - nmeContext.depthRange(zNear, zFar); + limeContext.depthRange(zNear, zFar); } public static function detachShader(program:GLProgram, shader:GLShader):Void { - nmeContext.detachShader(program, shader); + limeContext.detachShader(program, shader); } public static function disable(cap:Int):Void { - nmeContext.disable(cap); + limeContext.disable(cap); } public static function disableVertexAttribArray(index:Int):Void { - nmeContext.disableVertexAttribArray(index); + limeContext.disableVertexAttribArray(index); } public static function drawArrays(mode:Int, first:Int, count:Int):Void { - nmeContext.drawArrays(mode, first, count); + limeContext.drawArrays(mode, first, count); } public static function drawElements(mode:Int, count:Int, type:Int, offset:Int):Void { - nmeContext.drawElements(mode, count, type, offset); + limeContext.drawElements(mode, count, type, offset); } public static function enable(cap:Int):Void { - nmeContext.enable(cap); + limeContext.enable(cap); } public static function enableVertexAttribArray(index:Int):Void { - nmeContext.enableVertexAttribArray(index); + limeContext.enableVertexAttribArray(index); } public static function finish():Void { - nmeContext.finish(); + limeContext.finish(); } public static function flush():Void { - nmeContext.flush(); + limeContext.flush(); } public static function framebufferRenderbuffer(target:Int, attachment:Int, renderbuffertarget:Int, renderbuffer:GLRenderbuffer):Void { - nmeContext.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + limeContext.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); } public static function framebufferTexture2D(target:Int, attachment:Int, textarget:Int, texture:GLTexture, level:Int):Void { - nmeContext.framebufferTexture2D(target, attachment, textarget, texture, level); + limeContext.framebufferTexture2D(target, attachment, textarget, texture, level); } public static function frontFace(mode:Int):Void { - nmeContext.frontFace(mode); + limeContext.frontFace(mode); } public static function generateMipmap(target:Int):Void { - nmeContext.generateMipmap(target); + limeContext.generateMipmap(target); } public static function getActiveAttrib(program:GLProgram, index:Int):GLActiveInfo { - return nmeContext.getActiveAttrib(program, index); + return limeContext.getActiveAttrib(program, index); } public static function getActiveUniform(program:GLProgram, index:Int):GLActiveInfo { - return nmeContext.getActiveUniform(program, index); + return limeContext.getActiveUniform(program, index); } public static function getAttachedShaders(program:GLProgram):Array { - return nmeContext.getAttachedShaders(program); + return limeContext.getAttachedShaders(program); } public static function getAttribLocation(program:GLProgram, name:String):Int { - return nmeContext.getAttribLocation(program, name); + return limeContext.getAttribLocation(program, name); } public static function getBufferParameter(target:Int, pname:Int):Dynamic { - return nmeContext.getBufferParameter(target, pname); + return limeContext.getBufferParameter(target, pname); } public static function getContextAttributes():GLContextAttributes { - return nmeContext.getContextAttributes(); + return limeContext.getContextAttributes(); } public static function getError():Int { - return nmeContext.getError(); + return limeContext.getError(); } public static function getExtension(name:String):Dynamic { - return nmeContext.getExtension(name); + return limeContext.getExtension(name); } public static function getFramebufferAttachmentParameter(target:Int, attachment:Int, pname:Int):Dynamic { - return nmeContext.getFramebufferAttachmentParameter(target, attachment, pname); + return limeContext.getFramebufferAttachmentParameter(target, attachment, pname); } public static function getParameter(pname:Int):Dynamic { - return nmeContext.getParameter(pname); + return limeContext.getParameter(pname); } public static function getProgramInfoLog(program:GLProgram):String { - return nmeContext.getProgramInfoLog(program); + return limeContext.getProgramInfoLog(program); } public static function getProgramParameter(program:GLProgram, pname:Int):Int { - return nmeContext.getProgramParameter(program, pname); + return limeContext.getProgramParameter(program, pname); } public static function getRenderbufferParameter(target:Int, pname:Int):Dynamic { - return nmeContext.getRenderbufferParameter(target, pname); + return limeContext.getRenderbufferParameter(target, pname); } public static function getShaderInfoLog(shader:GLShader):String { - return nmeContext.getShaderInfoLog(shader); + return limeContext.getShaderInfoLog(shader); } public static function getShaderParameter(shader:GLShader, pname:Int):Int { - return nmeContext.getShaderParameter(shader, pname); + return limeContext.getShaderParameter(shader, pname); } @@ -955,14 +955,14 @@ class GL { // TODO return null; - //return nmeContext.getShader + //return limeContext.getShader } public static function getShaderSource(shader:GLShader):String { - return nmeContext.getShaderSource(shader); + return limeContext.getShaderSource(shader); } @@ -972,56 +972,56 @@ class GL { // TODO return null; - //return nmeContext.getSuppo + //return limeContext.getSuppo } public static function getTexParameter(target:Int, pname:Int):Dynamic { - return nmeContext.getTexParameter(target, pname); + return limeContext.getTexParameter(target, pname); } public static function getUniform(program:GLProgram, location:GLUniformLocation):Dynamic { - return nmeContext.getUniform(program, location); + return limeContext.getUniform(program, location); } public static function getUniformLocation(program:GLProgram, name:String):GLUniformLocation { - return nmeContext.getUniformLocation(program, name); + return limeContext.getUniformLocation(program, name); } public static function getVertexAttrib(index:Int, pname:Int):Dynamic { - return nmeContext.getVertexAttrib(index, pname); + return limeContext.getVertexAttrib(index, pname); } public static function getVertexAttribOffset(index:Int, pname:Int):Int { - return nmeContext.getVertexAttribOffset(index, pname); + return limeContext.getVertexAttribOffset(index, pname); } public static function hint(target:Int, mode:Int):Void { - nmeContext.hint(target, mode); + limeContext.hint(target, mode); } public static function isBuffer(buffer:GLBuffer):Bool { - return nmeContext.isBuffer(buffer); + return limeContext.isBuffer(buffer); } @@ -1032,70 +1032,70 @@ class GL { public static function isEnabled(cap:Int):Bool { - return nmeContext.isEnabled(cap); + return limeContext.isEnabled(cap); } public static function isFramebuffer(framebuffer:GLFramebuffer):Bool { - return nmeContext.isFramebuffer(framebuffer); + return limeContext.isFramebuffer(framebuffer); } public static function isProgram(program:GLProgram):Bool { - return nmeContext.isProgram(program); + return limeContext.isProgram(program); } public static function isRenderbuffer(renderbuffer:GLRenderbuffer):Bool { - return nmeContext.isRenderbuffer(renderbuffer); + return limeContext.isRenderbuffer(renderbuffer); } public static function isShader(shader:GLShader):Bool { - return nmeContext.isShader(shader); + return limeContext.isShader(shader); } public static function isTexture(texture:GLTexture):Bool { - return nmeContext.isTexture(texture); + return limeContext.isTexture(texture); } public static function lineWidth(width:Float):Void { - nmeContext.lineWidth(width); + limeContext.lineWidth(width); } public static function linkProgram(program:GLProgram):Void { - nmeContext.linkProgram(program); + limeContext.linkProgram(program); } public static function pixelStorei(pname:Int, param:Int):Void { - nmeContext.pixelStorei(pname, param); + limeContext.pixelStorei(pname, param); } public static function polygonOffset(factor:Float, units:Float):Void { - nmeContext.polygonOffset(factor, units); + limeContext.polygonOffset(factor, units); } @@ -1104,329 +1104,329 @@ class GL { // TODO: pixels? May need setting to work (canvas.getContext("experimental-webgl", {preserveDrawingBuffer: true});) - nmeContext.readPixels(x, y, width, height, format, type, pixels); + limeContext.readPixels(x, y, width, height, format, type, pixels); } public static function renderbufferStorage(target:Int, internalformat:Int, width:Int, height:Int):Void { - nmeContext.renderbufferStorage(target, internalformat, width, height); + limeContext.renderbufferStorage(target, internalformat, width, height); } public static function sampleCoverage(value:Float, invert:Bool):Void { - nmeContext.sampleCoverage(value, invert); + limeContext.sampleCoverage(value, invert); } public static function scissor(x:Int, y:Int, width:Int, height:Int):Void { - nmeContext.scissor(x, y, width, height); + limeContext.scissor(x, y, width, height); } public static function shaderSource(shader:GLShader, source:String):Void { - nmeContext.shaderSource(shader, source); + limeContext.shaderSource(shader, source); } public static function stencilFunc(func:Int, ref:Int, mask:Int):Void { - nmeContext.stencilFunc(func, ref, mask); + limeContext.stencilFunc(func, ref, mask); } public static function stencilFuncSeparate(face:Int, func:Int, ref:Int, mask:Int):Void { - nmeContext.stencilFuncSeparate(face, func, ref, mask); + limeContext.stencilFuncSeparate(face, func, ref, mask); } public static function stencilMask(mask:Int):Void { - nmeContext.stencilMask(mask); + limeContext.stencilMask(mask); } public static function stencilMaskSeparate(face:Int, mask:Int):Void { - nmeContext.stencilMaskSeparate(face, mask); + limeContext.stencilMaskSeparate(face, mask); } public static function stencilOp(fail:Int, zfail:Int, zpass:Int):Void { - nmeContext.stencilOp(fail, zfail, zpass); + limeContext.stencilOp(fail, zfail, zpass); } public static function stencilOpSeparate(face:Int, fail:Int, zfail:Int, zpass:Int):Void { - nmeContext.stencilOpSeparate(face, fail, zfail, zpass); + limeContext.stencilOpSeparate(face, fail, zfail, zpass); } public static function texImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, pixels:ArrayBufferView):Void { - nmeContext.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); + limeContext.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); } public static function texParameterf(target:Int, pname:Int, param:Float):Void { - nmeContext.texParameterf(target, pname, param); + limeContext.texParameterf(target, pname, param); } public static function texParameteri(target:Int, pname:Int, param:Int):Void { - nmeContext.texParameteri(target, pname, param); + limeContext.texParameteri(target, pname, param); } public static function texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView):Void { - nmeContext.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + limeContext.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); } public static function uniform1f(location:GLUniformLocation, x:Float):Void { - nmeContext.uniform1f(location, x); + limeContext.uniform1f(location, x); } public static function uniform1fv(location:GLUniformLocation, x:Float32Array):Void { - nmeContext.uniform1fv(location, x); + limeContext.uniform1fv(location, x); } public static function uniform1i(location:GLUniformLocation, x:Int):Void { - nmeContext.uniform1i(location, x); + limeContext.uniform1i(location, x); } public static function uniform1iv(location:GLUniformLocation, v:Int32Array):Void { - nmeContext.uniform1iv(location, v); + limeContext.uniform1iv(location, v); } public static function uniform2f(location:GLUniformLocation, x:Float, y:Float):Void { - nmeContext.uniform2f(location, x, y); + limeContext.uniform2f(location, x, y); } public static function uniform2fv(location:GLUniformLocation, v:Float32Array):Void { - nmeContext.uniform2fv(location, v); + limeContext.uniform2fv(location, v); } public static function uniform2i(location:GLUniformLocation, x:Int, y:Int):Void { - nmeContext.uniform2i(location, x, y); + limeContext.uniform2i(location, x, y); } public static function uniform2iv(location:GLUniformLocation, v:Int32Array):Void { - nmeContext.uniform2iv(location, v); + limeContext.uniform2iv(location, v); } public static function uniform3f(location:GLUniformLocation, x:Float, y:Float, z:Float):Void { - nmeContext.uniform3f(location, x, y, z); + limeContext.uniform3f(location, x, y, z); } public static function uniform3fv(location:GLUniformLocation, v:Float32Array):Void { - nmeContext.uniform3fv(location, v); + limeContext.uniform3fv(location, v); } public static function uniform3i(location:GLUniformLocation, x:Int, y:Int, z:Int):Void { - nmeContext.uniform3i(location, x, y, z); + limeContext.uniform3i(location, x, y, z); } public static function uniform3iv(location:GLUniformLocation, v:Int32Array):Void { - nmeContext.uniform3iv(location, v); + limeContext.uniform3iv(location, v); } public static function uniform4f(location:GLUniformLocation, x:Float, y:Float, z:Float, w:Float):Void { - nmeContext.uniform4f(location, x, y, z, w); + limeContext.uniform4f(location, x, y, z, w); } public static function uniform4fv(location:GLUniformLocation, v:Float32Array):Void { - nmeContext.uniform4fv(location, v); + limeContext.uniform4fv(location, v); } public static function uniform4i(location:GLUniformLocation, x:Int, y:Int, z:Int, w:Int):Void { - nmeContext.uniform4i(location, x, y, z, w); + limeContext.uniform4i(location, x, y, z, w); } public static function uniform4iv(location:GLUniformLocation, v:Int32Array):Void { - nmeContext.uniform4iv(location, v); + limeContext.uniform4iv(location, v); } public static function uniformMatrix2fv(location:GLUniformLocation, transpose:Bool, v:Float32Array):Void { - nmeContext.uniformMatrix2fv(location, transpose, v); + limeContext.uniformMatrix2fv(location, transpose, v); } public static function uniformMatrix3fv(location:GLUniformLocation, transpose:Bool, v:Float32Array):Void { - nmeContext.uniformMatrix3fv(location, transpose, v); + limeContext.uniformMatrix3fv(location, transpose, v); } public static function uniformMatrix4fv(location:GLUniformLocation, transpose:Bool, v:Float32Array):Void { - nmeContext.uniformMatrix4fv(location, transpose, v); + limeContext.uniformMatrix4fv(location, transpose, v); } public static function uniformMatrix3D(location:GLUniformLocation, transpose:Bool, matrix:Matrix3D):Void { - nmeContext.uniformMatrix4fv(location, transpose, new Float32Array(matrix.rawData)); + limeContext.uniformMatrix4fv(location, transpose, new Float32Array(matrix.rawData)); } public static function useProgram(program:GLProgram):Void { - nmeContext.useProgram(program); + limeContext.useProgram(program); } public static function validateProgram(program:GLProgram):Void { - nmeContext.validateProgram(program); + limeContext.validateProgram(program); } public static function vertexAttrib1f(indx:Int, x:Float):Void { - nmeContext.vertexAttrib1f(indx, x); + limeContext.vertexAttrib1f(indx, x); } public static function vertexAttrib1fv(indx:Int, values:Float32Array):Void { - nmeContext.vertexAttrib1fv(indx, values); + limeContext.vertexAttrib1fv(indx, values); } public static function vertexAttrib2f(indx:Int, x:Float, y:Float):Void { - nmeContext.vertexAttrib2f(indx, x, y); + limeContext.vertexAttrib2f(indx, x, y); } public static function vertexAttrib2fv(indx:Int, values:Float32Array):Void { - nmeContext.vertexAttrib2fv(indx, values); + limeContext.vertexAttrib2fv(indx, values); } public static function vertexAttrib3f(indx:Int, x:Float, y:Float, z:Float):Void { - nmeContext.vertexAttrib3f(indx, x, y, z); + limeContext.vertexAttrib3f(indx, x, y, z); } public static function vertexAttrib3fv(indx:Int, values:Float32Array):Void { - nmeContext.vertexAttrib3fv(indx, values); + limeContext.vertexAttrib3fv(indx, values); } public static function vertexAttrib4f(indx:Int, x:Float, y:Float, z:Float, w:Float):Void { - nmeContext.vertexAttrib4f(indx, x, y, z, w); + limeContext.vertexAttrib4f(indx, x, y, z, w); } public static function vertexAttrib4fv(indx:Int, values:Float32Array):Void { - nmeContext.vertexAttrib4fv(indx, values); + limeContext.vertexAttrib4fv(indx, values); } public static function vertexAttribPointer(indx:Int, size:Int, type:Int, normalized:Bool, stride:Int, offset:Int):Void { - nmeContext.vertexAttribPointer(indx, size, type, normalized, stride, offset); + limeContext.vertexAttribPointer(indx, size, type, normalized, stride, offset); } public static function viewport(x:Int, y:Int, width:Int, height:Int):Void { - nmeContext.viewport(x, y, width, height); + limeContext.viewport(x, y, width, height); } diff --git a/lime/gl/native/Ext.hx b/lime/gl/native/Ext.hx index 42d14716a..45f1e7a41 100644 --- a/lime/gl/native/Ext.hx +++ b/lime/gl/native/Ext.hx @@ -6,13 +6,13 @@ class Ext { public static function drawBuffers( n:Int, buffers:Int ){ #if luxe_gl_extensions - return nme_gl_ext_draw_buffers( n, buffers ); + return lime_gl_ext_draw_buffers( n, buffers ); #end } private static function load(inName:String, inArgCount:Int):Dynamic { try { - return Libs.load("nme", inName, inArgCount); + return Libs.load("lime", inName, inArgCount); } catch(e:Dynamic) { trace(e); return null; } @@ -56,7 +56,7 @@ class Ext { public static inline var MAX_DRAW_BUFFERS = 0x8824; #if luxe_gl_extensions - private static var nme_gl_ext_draw_buffers = load("nme_gl_ext_draw_buffers", 2); + private static var lime_gl_ext_draw_buffers = load("lime_gl_ext_draw_buffers", 2); #end } diff --git a/lime/gl/native/GL.hx b/lime/gl/native/GL.hx index add032bef..5aab87588 100644 --- a/lime/gl/native/GL.hx +++ b/lime/gl/native/GL.hx @@ -432,163 +432,163 @@ class GL { public static var drawingBufferWidth(get_drawingBufferWidth, null):Int; public static var version(get_version, null):Int; - public static function activeTexture(texture:Int):Void { nme_gl_active_texture(texture); } + public static function activeTexture(texture:Int):Void { lime_gl_active_texture(texture); } public static function attachShader(program:GLProgram, shader:GLShader):Void { program.attach(shader); - nme_gl_attach_shader(program.id, shader.id); + lime_gl_attach_shader(program.id, shader.id); } public static function bindAttribLocation(program:GLProgram, index:Int, name:String):Void { - nme_gl_bind_attrib_location(program.id, index, name); + lime_gl_bind_attrib_location(program.id, index, name); } //todo sven // public static function bindBitmapDataTexture(texture:BitmapData):Void // { - // nme_gl_bind_bitmap_data_texture(texture.__handle); + // lime_gl_bind_bitmap_data_texture(texture.__handle); // } public static function bindBuffer(target:Int, buffer:GLBuffer):Void { - nme_gl_bind_buffer(target, buffer == null ? 0 : buffer.id); + lime_gl_bind_buffer(target, buffer == null ? 0 : buffer.id); } public static function bindFramebuffer(target:Int, framebuffer:GLFramebuffer):Void { - nme_gl_bind_framebuffer(target, framebuffer == null ? 0 : framebuffer.id); + lime_gl_bind_framebuffer(target, framebuffer == null ? 0 : framebuffer.id); } public static function bindRenderbuffer(target:Int, renderbuffer:GLRenderbuffer):Void { - nme_gl_bind_renderbuffer(target, renderbuffer == null ? 0 : renderbuffer.id); + lime_gl_bind_renderbuffer(target, renderbuffer == null ? 0 : renderbuffer.id); } public static function bindTexture(target:Int, texture:GLTexture):Void { - nme_gl_bind_texture(target, texture == null ? 0 : texture.id); + lime_gl_bind_texture(target, texture == null ? 0 : texture.id); } public static function blendColor(red:Float, green:Float, blue:Float, alpha:Float):Void { - nme_gl_blend_color(red, green, blue, alpha); + lime_gl_blend_color(red, green, blue, alpha); } public static function blendEquation(mode:Int):Void { - nme_gl_blend_equation(mode); + lime_gl_blend_equation(mode); } public static function blendEquationSeparate(modeRGB:Int, modeAlpha:Int):Void { - nme_gl_blend_equation_separate(modeRGB, modeAlpha); + lime_gl_blend_equation_separate(modeRGB, modeAlpha); } public static function blendFunc(sfactor:Int, dfactor:Int):Void { - nme_gl_blend_func(sfactor, dfactor); + lime_gl_blend_func(sfactor, dfactor); } public static function blendFuncSeparate(srcRGB:Int, dstRGB:Int, srcAlpha:Int, dstAlpha:Int):Void { - nme_gl_blend_func_separate(srcRGB, dstRGB, srcAlpha, dstAlpha); + lime_gl_blend_func_separate(srcRGB, dstRGB, srcAlpha, dstAlpha); } public static function bufferData(target:Int, data:IMemoryRange, usage:Int):Void { - nme_gl_buffer_data(target, data.getByteBuffer(), data.getStart(), data.getLength(), usage); + lime_gl_buffer_data(target, data.getByteBuffer(), data.getStart(), data.getLength(), usage); } public static function bufferSubData(target:Int, offset:Int, data:IMemoryRange ):Void { - nme_gl_buffer_sub_data( target, offset, data.getByteBuffer(), data.getStart(), data.getLength() ); + lime_gl_buffer_sub_data( target, offset, data.getByteBuffer(), data.getStart(), data.getLength() ); } public static function checkFramebufferStatus(target:Int):Int { - return nme_gl_check_framebuffer_status(target); + return lime_gl_check_framebuffer_status(target); } public static function clear(mask:Int):Void { - nme_gl_clear(mask); + lime_gl_clear(mask); } public static function clearColor(red:Float, green:Float, blue:Float, alpha:Float):Void { - nme_gl_clear_color(red, green, blue, alpha); + lime_gl_clear_color(red, green, blue, alpha); } public static function clearDepth(depth:Float):Void { - nme_gl_clear_depth(depth); + lime_gl_clear_depth(depth); } public static function clearStencil(s:Int):Void { - nme_gl_clear_stencil(s); + lime_gl_clear_stencil(s); } public static function colorMask(red:Bool, green:Bool, blue:Bool, alpha:Bool):Void { - nme_gl_color_mask(red, green, blue, alpha); + lime_gl_color_mask(red, green, blue, alpha); } public static function compileShader(shader:GLShader):Void { - nme_gl_compile_shader(shader.id); + lime_gl_compile_shader(shader.id); } public static function compressedTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, data:IMemoryRange):Void { - nme_gl_compressed_tex_image_2d(target, level, internalformat, width, height, border, data == null ? null : data.getByteBuffer(), data == null ? null : data.getStart()); + lime_gl_compressed_tex_image_2d(target, level, internalformat, width, height, border, data == null ? null : data.getByteBuffer(), data == null ? null : data.getStart()); } public static function compressedTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, data:IMemoryRange):Void { - nme_gl_compressed_tex_sub_image_2d(target, level, xoffset, yoffset, width, height, format, data == null ? null : data.getByteBuffer(), data == null ? null : data.getStart()); + lime_gl_compressed_tex_sub_image_2d(target, level, xoffset, yoffset, width, height, format, data == null ? null : data.getByteBuffer(), data == null ? null : data.getStart()); } public static function copyTexImage2D(target:Int, level:Int, internalformat:Int, x:Int, y:Int, width:Int, height:Int, border:Int):Void { - nme_gl_copy_tex_image_2d(target, level, internalformat, x, y, width, height, border); + lime_gl_copy_tex_image_2d(target, level, internalformat, x, y, width, height, border); } public static function copyTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, x:Int, y:Int, width:Int, height:Int):Void { - nme_gl_copy_tex_sub_image_2d(target, level, xoffset, yoffset, x, y, width, height); + lime_gl_copy_tex_sub_image_2d(target, level, xoffset, yoffset, x, y, width, height); } public static function createBuffer():GLBuffer { - return new GLBuffer(version, nme_gl_create_buffer()); + return new GLBuffer(version, lime_gl_create_buffer()); } public static function createFramebuffer():GLFramebuffer { - return new GLFramebuffer(version, nme_gl_create_framebuffer()); + return new GLFramebuffer(version, lime_gl_create_framebuffer()); } public static function createProgram():GLProgram { - return new GLProgram(version, nme_gl_create_program()); + return new GLProgram(version, lime_gl_create_program()); } public static function createRenderbuffer():GLRenderbuffer { - return new GLRenderbuffer(version, nme_gl_create_render_buffer()); + return new GLRenderbuffer(version, lime_gl_create_render_buffer()); } public static function createShader(type:Int):GLShader { - return new GLShader(version, nme_gl_create_shader(type)); + return new GLShader(version, lime_gl_create_shader(type)); } public static function createTexture():GLTexture { - return new GLTexture(version, nme_gl_create_texture()); + return new GLTexture(version, lime_gl_create_texture()); } public static function cullFace(mode:Int):Void @@ -597,7 +597,7 @@ class GL { public static function deleteBuffer(buffer:GLBuffer):Void { - nme_gl_delete_buffer(buffer.id); + lime_gl_delete_buffer(buffer.id); buffer.invalidate(); } @@ -607,7 +607,7 @@ class GL { public static function deleteProgram(program:GLProgram):Void { - nme_gl_delete_program(program.id); + lime_gl_delete_program(program.id); program.invalidate(); } @@ -617,104 +617,104 @@ class GL { public static function deleteShader(shader:GLShader):Void { - nme_gl_delete_shader(shader.id); + lime_gl_delete_shader(shader.id); shader.invalidate(); } public static function deleteTexture(texture:GLTexture):Void { - nme_gl_delete_texture(texture.id); + lime_gl_delete_texture(texture.id); texture.invalidate(); } public static function depthFunc(func:Int):Void { - nme_gl_depth_func(func); + lime_gl_depth_func(func); } public static function depthMask(flag:Bool):Void { - nme_gl_depth_mask(flag); + lime_gl_depth_mask(flag); } public static function depthRange(zNear:Float, zFar:Float):Void { - nme_gl_depth_range(zNear, zFar); + lime_gl_depth_range(zNear, zFar); } public static function detachShader(program:GLProgram, shader:GLShader):Void { - nme_gl_detach_shader(program.id, shader.id); + lime_gl_detach_shader(program.id, shader.id); } public static function disable(cap:Int):Void { - nme_gl_disable(cap); + lime_gl_disable(cap); } public static function disableVertexAttribArray(index:Int):Void { - nme_gl_disable_vertex_attrib_array(index); + lime_gl_disable_vertex_attrib_array(index); } public static function drawArrays(mode:Int, first:Int, count:Int):Void { - nme_gl_draw_arrays(mode, first, count); + lime_gl_draw_arrays(mode, first, count); } public static function drawElements(mode:Int, count:Int, type:Int, offset:Int):Void { - nme_gl_draw_elements(mode, count, type, offset); + lime_gl_draw_elements(mode, count, type, offset); } public static function enable(cap:Int):Void { - nme_gl_enable(cap); + lime_gl_enable(cap); } public static function enableVertexAttribArray(index:Int):Void { - nme_gl_enable_vertex_attrib_array(index); + lime_gl_enable_vertex_attrib_array(index); } public static function finish():Void { - nme_gl_finish(); + lime_gl_finish(); } public static function flush():Void { - nme_gl_flush(); + lime_gl_flush(); } public static function framebufferRenderbuffer(target:Int, attachment:Int, renderbuffertarget:Int, renderbuffer:GLRenderbuffer):Void { - nme_gl_framebuffer_renderbuffer(target, attachment, renderbuffertarget, renderbuffer.id); + lime_gl_framebuffer_renderbuffer(target, attachment, renderbuffertarget, renderbuffer.id); } public static function framebufferTexture2D(target:Int, attachment:Int, textarget:Int, texture:GLTexture, level:Int):Void { - nme_gl_framebuffer_texture2D(target, attachment, textarget, texture.id, level); + lime_gl_framebuffer_texture2D(target, attachment, textarget, texture.id, level); } public static function frontFace(mode:Int):Void { - nme_gl_front_face(mode); + lime_gl_front_face(mode); } public static function generateMipmap(target:Int):Void { - nme_gl_generate_mipmap(target); + lime_gl_generate_mipmap(target); } public static function getActiveAttrib(program:GLProgram, index:Int):GLActiveInfo { - return nme_gl_get_active_attrib(program.id, index); + return lime_gl_get_active_attrib(program.id, index); } public static function getActiveUniform(program:GLProgram, index:Int):GLActiveInfo { - return nme_gl_get_active_uniform(program.id, index); + return lime_gl_get_active_uniform(program.id, index); } public static function getAttachedShaders(program:GLProgram):Array @@ -724,17 +724,17 @@ class GL { public static function getAttribLocation(program:GLProgram, name:String):Int { - return nme_gl_get_attrib_location(program.id, name); + return lime_gl_get_attrib_location(program.id, name); } public static function getBufferParameter(target:Int, pname:Int):Dynamic { - return nme_gl_get_buffer_paramerter(target, pname); + return lime_gl_get_buffer_paramerter(target, pname); } public static function getContextAttributes():GLContextAttributes { - var base = nme_gl_get_context_attributes(); + var base = lime_gl_get_context_attributes(); base.premultipliedAlpha = false; base.preserveDrawingBuffer = false; return base; @@ -742,150 +742,150 @@ class GL { public static function getError():Int { - return nme_gl_get_error(); + return lime_gl_get_error(); } public static function getExtension(name:String):Dynamic { //todo?! return null; - // return nme_gl_get_extension(name); + // return lime_gl_get_extension(name); } public static function getFramebufferAttachmentParameter(target:Int, attachment:Int, pname:Int):Dynamic { - return nme_gl_get_framebuffer_attachment_parameter(target, attachment, pname); + return lime_gl_get_framebuffer_attachment_parameter(target, attachment, pname); } public static function getParameter(pname:Int):Dynamic { - return nme_gl_get_parameter(pname); + return lime_gl_get_parameter(pname); } public static function getProgramInfoLog(program:GLProgram):String { - return nme_gl_get_program_info_log(program.id); + return lime_gl_get_program_info_log(program.id); } public static function getProgramParameter(program:GLProgram, pname:Int):Int { - return nme_gl_get_program_parameter(program.id, pname); + return lime_gl_get_program_parameter(program.id, pname); } public static function getRenderbufferParameter(target:Int, pname:Int):Dynamic { - return nme_gl_get_render_buffer_parameter(target, pname); + return lime_gl_get_render_buffer_parameter(target, pname); } public static function getShaderInfoLog(shader:GLShader):String { - return nme_gl_get_shader_info_log(shader.id); + return lime_gl_get_shader_info_log(shader.id); } public static function getShaderParameter(shader:GLShader, pname:Int):Int { - return nme_gl_get_shader_parameter(shader.id, pname); + return lime_gl_get_shader_parameter(shader.id, pname); } public static function getShaderPrecisionFormat(shadertype:Int, precisiontype:Int):ShaderPrecisionFormat { - return nme_gl_get_shader_precision_format(shadertype, precisiontype); + return lime_gl_get_shader_precision_format(shadertype, precisiontype); } public static function getShaderSource(shader:GLShader):String { - return nme_gl_get_shader_source(shader.id); + return lime_gl_get_shader_source(shader.id); } public static function getSupportedExtensions():Array { var result = new Array(); - nme_gl_get_supported_extensions(result); + lime_gl_get_supported_extensions(result); return result; } public static function getTexParameter(target:Int, pname:Int):Dynamic { - return nme_gl_get_tex_parameter(target, pname); + return lime_gl_get_tex_parameter(target, pname); } public static function getUniform(program:GLProgram, location:GLUniformLocation):Dynamic { - return nme_gl_get_uniform(program.id, location); + return lime_gl_get_uniform(program.id, location); } public static function getUniformLocation(program:GLProgram, name:String):Dynamic { - return nme_gl_get_uniform_location(program.id, name); + return lime_gl_get_uniform_location(program.id, name); } public static function getVertexAttrib(index:Int, pname:Int):Dynamic { - return nme_gl_get_vertex_attrib(index, pname); + return lime_gl_get_vertex_attrib(index, pname); } public static function getVertexAttribOffset(index:Int, pname:Int):Int { - return nme_gl_get_vertex_attrib_offset(index, pname); + return lime_gl_get_vertex_attrib_offset(index, pname); } public static function hint(target:Int, mode:Int):Void { - nme_gl_hint(target, mode); + lime_gl_hint(target, mode); } public static function isBuffer(buffer:GLBuffer):Bool { - return buffer != null && buffer.id > 0 && nme_gl_is_buffer(buffer.id); + return buffer != null && buffer.id > 0 && lime_gl_is_buffer(buffer.id); } // This is non-static // public function isContextLost():Bool { return false; } public static function isEnabled(cap:Int):Bool { - return nme_gl_is_enabled(cap); + return lime_gl_is_enabled(cap); } public static function isFramebuffer(framebuffer:GLFramebuffer):Bool { - return framebuffer != null && framebuffer.id > 0 && nme_gl_is_framebuffer(framebuffer.id); + return framebuffer != null && framebuffer.id > 0 && lime_gl_is_framebuffer(framebuffer.id); } public static function isProgram(program:GLProgram):Bool { - return program != null && program.id > 0 && nme_gl_is_program(program.id); + return program != null && program.id > 0 && lime_gl_is_program(program.id); } public static function isRenderbuffer(renderbuffer:GLRenderbuffer):Bool { - return renderbuffer != null && renderbuffer.id > 0 && nme_gl_is_renderbuffer(renderbuffer.id); + return renderbuffer != null && renderbuffer.id > 0 && lime_gl_is_renderbuffer(renderbuffer.id); } public static function isShader(shader:GLShader):Bool { - return shader != null && shader.id > 0 && nme_gl_is_shader(shader.id); + return shader != null && shader.id > 0 && lime_gl_is_shader(shader.id); } public static function isTexture(texture:GLTexture):Bool { - return texture != null && texture.id > 0 && nme_gl_is_texture(texture.id); + return texture != null && texture.id > 0 && lime_gl_is_texture(texture.id); } public static function lineWidth(width:Float):Void { - nme_gl_line_width(width); + lime_gl_line_width(width); } public static function linkProgram(program:GLProgram):Void { - nme_gl_link_program(program.id); + lime_gl_link_program(program.id); } private static function load(inName:String, inArgCount:Int):Dynamic { try { - return Libs.load("nme", inName, inArgCount); + return Libs.load("lime", inName, inArgCount); } catch(e:Dynamic) { @@ -896,12 +896,12 @@ class GL { public static function pixelStorei(pname:Int, param:Int):Void { - nme_gl_pixel_storei(pname, param); + lime_gl_pixel_storei(pname, param); } public static function polygonOffset(factor:Float, units:Float):Void { - nme_gl_polygon_offset(factor, units); + lime_gl_polygon_offset(factor, units); } //todo sven @@ -911,232 +911,232 @@ class GL { public static function renderbufferStorage(target:Int, internalformat:Int, width:Int, height:Int):Void { - nme_gl_renderbuffer_storage(target, internalformat, width, height); + lime_gl_renderbuffer_storage(target, internalformat, width, height); } public static function sampleCoverage(value:Float, invert:Bool):Void { - nme_gl_sample_coverage(value, invert); + lime_gl_sample_coverage(value, invert); } public static function scissor(x:Int, y:Int, width:Int, height:Int):Void { - nme_gl_scissor(x, y, width, height); + lime_gl_scissor(x, y, width, height); } public static function shaderSource(shader:GLShader, source:String):Void { - nme_gl_shader_source(shader.id, source); + lime_gl_shader_source(shader.id, source); } public static function stencilFunc(func:Int, ref:Int, mask:Int):Void { - nme_gl_stencil_func(func, ref, mask); + lime_gl_stencil_func(func, ref, mask); } public static function stencilFuncSeparate(face:Int, func:Int, ref:Int, mask:Int):Void { - nme_gl_stencil_func_separate(face, func, ref, mask); + lime_gl_stencil_func_separate(face, func, ref, mask); } public static function stencilMask(mask:Int):Void { - nme_gl_stencil_mask(mask); + lime_gl_stencil_mask(mask); } public static function stencilMaskSeparate(face:Int, mask:Int):Void { - nme_gl_stencil_mask_separate(face, mask); + lime_gl_stencil_mask_separate(face, mask); } public static function stencilOp(fail:Int, zfail:Int, zpass:Int):Void { - nme_gl_stencil_op(fail, zfail, zpass); + lime_gl_stencil_op(fail, zfail, zpass); } public static function stencilOpSeparate(face:Int, fail:Int, zfail:Int, zpass:Int):Void { - nme_gl_stencil_op_separate(face, fail, zfail, zpass); + lime_gl_stencil_op_separate(face, fail, zfail, zpass); } public static function texImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, pixels:ArrayBufferView):Void { - nme_gl_tex_image_2d(target, level, internalformat, width, height, border, format, type, pixels == null ? null : pixels.getByteBuffer(), pixels == null ? null : pixels.getStart()); + lime_gl_tex_image_2d(target, level, internalformat, width, height, border, format, type, pixels == null ? null : pixels.getByteBuffer(), pixels == null ? null : pixels.getStart()); } public static function texParameterf(target:Int, pname:Int, param:Float):Void { - nme_gl_tex_parameterf(target, pname, param); + lime_gl_tex_parameterf(target, pname, param); } public static function texParameteri(target:Int, pname:Int, param:Int):Void { - nme_gl_tex_parameteri(target, pname, param); + lime_gl_tex_parameteri(target, pname, param); } public static function texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView):Void { - nme_gl_tex_sub_image_2d(target, level, xoffset, yoffset, width, height, format, type, pixels == null ? null : pixels.getByteBuffer(), pixels == null ? null : pixels.getStart()); + lime_gl_tex_sub_image_2d(target, level, xoffset, yoffset, width, height, format, type, pixels == null ? null : pixels.getByteBuffer(), pixels == null ? null : pixels.getStart()); } public static function uniform1f(location:GLUniformLocation, x:Float):Void { - nme_gl_uniform1f(location, x); + lime_gl_uniform1f(location, x); } public static function uniform1fv(location:GLUniformLocation, x:Array):Void { - nme_gl_uniform1fv(location, x); + lime_gl_uniform1fv(location, x); } public static function uniform1i(location:GLUniformLocation, x:Int):Void { - nme_gl_uniform1i(location, x); + lime_gl_uniform1i(location, x); } public static function uniform1iv(location:GLUniformLocation, v:Array):Void { - nme_gl_uniform1iv(location, v); + lime_gl_uniform1iv(location, v); } public static function uniform2f(location:GLUniformLocation, x:Float, y:Float):Void { - nme_gl_uniform2f(location, x, y); + lime_gl_uniform2f(location, x, y); } public static function uniform2fv(location:GLUniformLocation, v:Array):Void { - nme_gl_uniform2fv(location, v); + lime_gl_uniform2fv(location, v); } public static function uniform2i(location:GLUniformLocation, x:Int, y:Int):Void { - nme_gl_uniform2i(location, x, y); + lime_gl_uniform2i(location, x, y); } public static function uniform2iv(location:GLUniformLocation, v:Array):Void { - nme_gl_uniform2iv(location, v); + lime_gl_uniform2iv(location, v); } public static function uniform3f(location:GLUniformLocation, x:Float, y:Float, z:Float):Void { - nme_gl_uniform3f(location, x, y, z); + lime_gl_uniform3f(location, x, y, z); } public static function uniform3fv(location:GLUniformLocation, v:Array):Void { - nme_gl_uniform3fv(location, v); + lime_gl_uniform3fv(location, v); } public static function uniform3i(location:GLUniformLocation, x:Int, y:Int, z:Int):Void { - nme_gl_uniform3i(location, x, y, z); + lime_gl_uniform3i(location, x, y, z); } public static function uniform3iv(location:GLUniformLocation, v:Array):Void { - nme_gl_uniform3iv(location, v); + lime_gl_uniform3iv(location, v); } public static function uniform4f(location:GLUniformLocation, x:Float, y:Float, z:Float, w:Float):Void { - nme_gl_uniform4f(location, x, y, z, w); + lime_gl_uniform4f(location, x, y, z, w); } public static function uniform4fv(location:GLUniformLocation, v:Array):Void { - nme_gl_uniform4fv(location, v); + lime_gl_uniform4fv(location, v); } public static function uniform4i(location:GLUniformLocation, x:Int, y:Int, z:Int, w:Int):Void { - nme_gl_uniform4i(location, x, y, z, w); + lime_gl_uniform4i(location, x, y, z, w); } public static function uniform4iv(location:GLUniformLocation, v:Array):Void { - nme_gl_uniform4iv(location, v); + lime_gl_uniform4iv(location, v); } public static function uniformMatrix2fv(location:GLUniformLocation, transpose:Bool, v:Float32Array):Void { - nme_gl_uniform_matrix(location, transpose, v.getByteBuffer(), 2); + lime_gl_uniform_matrix(location, transpose, v.getByteBuffer(), 2); } public static function uniformMatrix3fv(location:GLUniformLocation, transpose:Bool, v:Float32Array):Void { - nme_gl_uniform_matrix(location, transpose, v.getByteBuffer(), 3); + lime_gl_uniform_matrix(location, transpose, v.getByteBuffer(), 3); } public static function uniformMatrix4fv(location:GLUniformLocation, transpose:Bool, v:Float32Array):Void { - nme_gl_uniform_matrix(location, transpose, v.getByteBuffer(), 4); + lime_gl_uniform_matrix(location, transpose, v.getByteBuffer(), 4); } public static function uniformMatrix3D(location:GLUniformLocation, transpose:Bool, matrix:Matrix3D):Void { - nme_gl_uniform_matrix(location, transpose, Float32Array.fromMatrix(matrix).getByteBuffer() , 4); + lime_gl_uniform_matrix(location, transpose, Float32Array.fromMatrix(matrix).getByteBuffer() , 4); } public static function useProgram(program:GLProgram):Void { - nme_gl_use_program(program == null ? 0 : program.id); + lime_gl_use_program(program == null ? 0 : program.id); } public static function validateProgram(program:GLProgram):Void { - nme_gl_validate_program(program.id); + lime_gl_validate_program(program.id); } public static function vertexAttrib1f(indx:Int, x:Float):Void { - nme_gl_vertex_attrib1f(indx, x); + lime_gl_vertex_attrib1f(indx, x); } public static function vertexAttrib1fv(indx:Int, values:Array):Void { - nme_gl_vertex_attrib1fv(indx, values); + lime_gl_vertex_attrib1fv(indx, values); } public static function vertexAttrib2f(indx:Int, x:Float, y:Float):Void { - nme_gl_vertex_attrib2f(indx, x, y); + lime_gl_vertex_attrib2f(indx, x, y); } public static function vertexAttrib2fv(indx:Int, values:Array):Void { - nme_gl_vertex_attrib2fv(indx, values); + lime_gl_vertex_attrib2fv(indx, values); } public static function vertexAttrib3f(indx:Int, x:Float, y:Float, z:Float):Void { - nme_gl_vertex_attrib3f(indx, x, y, z); + lime_gl_vertex_attrib3f(indx, x, y, z); } public static function vertexAttrib3fv(indx:Int, values:Array):Void { - nme_gl_vertex_attrib3fv(indx, values); + lime_gl_vertex_attrib3fv(indx, values); } public static function vertexAttrib4f(indx:Int, x:Float, y:Float, z:Float, w:Float):Void { - nme_gl_vertex_attrib4f(indx, x, y, z, w); + lime_gl_vertex_attrib4f(indx, x, y, z, w); } public static function vertexAttrib4fv(indx:Int, values:Array):Void { - nme_gl_vertex_attrib4fv(indx, values); + lime_gl_vertex_attrib4fv(indx, values); } public static function vertexAttribPointer(indx:Int, size:Int, type:Int, normalized:Bool, stride:Int, offset:Int):Void { - nme_gl_vertex_attrib_pointer(indx, size, type, normalized, stride, offset); + lime_gl_vertex_attrib_pointer(indx, size, type, normalized, stride, offset); } public static function viewport(x:Int, y:Int, width:Int, height:Int):Void { - nme_gl_viewport(x, y, width, height); + lime_gl_viewport(x, y, width, height); } @@ -1149,7 +1149,7 @@ class GL { private static function get_drawingBufferHeight() { return 640; }//Lib.current.stage.stageHeight; } private static function get_drawingBufferWidth() { return 960; } //Lib.current.stage.stageWidth; } - private static function get_version():Int { return nme_gl_version(); } + private static function get_version():Int { return lime_gl_version(); } @@ -1159,136 +1159,136 @@ class GL { - private static var nme_gl_active_texture = load("nme_gl_active_texture", 1); - private static var nme_gl_attach_shader = load("nme_gl_attach_shader", 2); - private static var nme_gl_bind_attrib_location = load("nme_gl_bind_attrib_location", 3); - private static var nme_gl_bind_bitmap_data_texture = load("nme_gl_bind_bitmap_data_texture", 1); - private static var nme_gl_bind_buffer = load("nme_gl_bind_buffer", 2); - private static var nme_gl_bind_framebuffer = load("nme_gl_bind_framebuffer", 2); - private static var nme_gl_bind_renderbuffer = load("nme_gl_bind_renderbuffer", 2); - private static var nme_gl_bind_texture = load("nme_gl_bind_texture", 2); - private static var nme_gl_blend_color = load("nme_gl_blend_color", 4); - private static var nme_gl_blend_equation = load("nme_gl_blend_equation", 1); - private static var nme_gl_blend_equation_separate = load("nme_gl_blend_equation_separate", 2); - private static var nme_gl_blend_func = load("nme_gl_blend_func", 2); - private static var nme_gl_blend_func_separate = load("nme_gl_blend_func_separate", 4); - private static var nme_gl_buffer_data = load("nme_gl_buffer_data", 5); - private static var nme_gl_buffer_sub_data = load("nme_gl_buffer_sub_data", 5); - private static var nme_gl_check_framebuffer_status = load("nme_gl_check_framebuffer_status", 1); - private static var nme_gl_clear = load("nme_gl_clear", 1); - private static var nme_gl_clear_color = load("nme_gl_clear_color", 4); - private static var nme_gl_clear_depth = load("nme_gl_clear_depth", 1); - private static var nme_gl_clear_stencil = load("nme_gl_clear_stencil", 1); - private static var nme_gl_color_mask = load("nme_gl_color_mask", 4); - private static var nme_gl_compile_shader = load("nme_gl_compile_shader", 1); - private static var nme_gl_compressed_tex_image_2d = load("nme_gl_compressed_tex_image_2d", -1); - private static var nme_gl_compressed_tex_sub_image_2d = load("nme_gl_compressed_tex_sub_image_2d", -1); - private static var nme_gl_copy_tex_image_2d = load("nme_gl_copy_tex_image_2d", -1); - private static var nme_gl_copy_tex_sub_image_2d = load("nme_gl_copy_tex_sub_image_2d", -1); - private static var nme_gl_create_buffer = load("nme_gl_create_buffer", 0); - private static var nme_gl_create_framebuffer = load("nme_gl_create_framebuffer", 0); - private static var nme_gl_create_program = load("nme_gl_create_program", 0); - private static var nme_gl_create_render_buffer = load("nme_gl_create_render_buffer", 0); - private static var nme_gl_create_shader = load("nme_gl_create_shader", 1); - private static var nme_gl_create_texture = load("nme_gl_create_texture", 0); - private static var nme_gl_delete_buffer = load("nme_gl_delete_buffer", 1); - private static var nme_gl_delete_program = load("nme_gl_delete_program", 1); - private static var nme_gl_delete_shader = load("nme_gl_delete_shader", 1); - private static var nme_gl_delete_texture = load("nme_gl_delete_texture", 1); - private static var nme_gl_depth_func = load("nme_gl_depth_func", 1); - private static var nme_gl_depth_mask = load("nme_gl_depth_mask", 1); - private static var nme_gl_depth_range = load("nme_gl_depth_range", 2); - private static var nme_gl_detach_shader = load("nme_gl_detach_shader", 2); - private static var nme_gl_disable = load("nme_gl_disable", 1); - private static var nme_gl_disable_vertex_attrib_array = load("nme_gl_disable_vertex_attrib_array", 1); - private static var nme_gl_draw_arrays = load("nme_gl_draw_arrays", 3); - private static var nme_gl_draw_elements = load("nme_gl_draw_elements", 4); - private static var nme_gl_enable = load("nme_gl_enable", 1); - private static var nme_gl_enable_vertex_attrib_array = load("nme_gl_enable_vertex_attrib_array", 1); - private static var nme_gl_finish = load("nme_gl_finish", 0); - private static var nme_gl_flush = load("nme_gl_flush", 0); - private static var nme_gl_framebuffer_renderbuffer = load("nme_gl_framebuffer_renderbuffer", 4); - private static var nme_gl_framebuffer_texture2D = load("nme_gl_framebuffer_texture2D", 5); - private static var nme_gl_front_face = load("nme_gl_front_face", 1); - private static var nme_gl_generate_mipmap = load("nme_gl_generate_mipmap", 1); - private static var nme_gl_get_active_attrib = load("nme_gl_get_active_attrib", 2); - private static var nme_gl_get_active_uniform = load("nme_gl_get_active_uniform", 2); - private static var nme_gl_get_attrib_location = load("nme_gl_get_attrib_location", 2); - private static var nme_gl_get_buffer_paramerter = load("nme_gl_get_buffer_paramerter", 2); - private static var nme_gl_get_context_attributes = load("nme_gl_get_context_attributes", 0); - private static var nme_gl_get_error = load("nme_gl_get_error", 0); - private static var nme_gl_get_framebuffer_attachment_parameter = load("nme_gl_get_framebuffer_attachment_parameter", 3); - private static var nme_gl_get_parameter = load("nme_gl_get_parameter", 1); - // private static var nme_gl_get_extension = load("nme_gl_get_extension", 1); - private static var nme_gl_get_program_info_log = load("nme_gl_get_program_info_log", 1); - private static var nme_gl_get_program_parameter = load("nme_gl_get_program_parameter", 2); - private static var nme_gl_get_render_buffer_parameter = load("nme_gl_get_render_buffer_parameter", 2); - private static var nme_gl_get_shader_info_log = load("nme_gl_get_shader_info_log", 1); - private static var nme_gl_get_shader_parameter = load("nme_gl_get_shader_parameter", 2); - private static var nme_gl_get_shader_precision_format = load("nme_gl_get_shader_precision_format", 2); - private static var nme_gl_get_shader_source = load("nme_gl_get_shader_source", 1); - private static var nme_gl_get_supported_extensions = load("nme_gl_get_supported_extensions", 1); - private static var nme_gl_get_tex_parameter = load("nme_gl_get_tex_parameter", 2); - private static var nme_gl_get_uniform = load("nme_gl_get_uniform", 2); - private static var nme_gl_get_uniform_location = load("nme_gl_get_uniform_location", 2); - private static var nme_gl_get_vertex_attrib = load("nme_gl_get_vertex_attrib", 2); - private static var nme_gl_get_vertex_attrib_offset = load("nme_gl_get_vertex_attrib_offset", 2); - private static var nme_gl_hint = load("nme_gl_hint", 2); - private static var nme_gl_is_buffer = load("nme_gl_is_buffer", 1); - private static var nme_gl_is_enabled = load("nme_gl_is_enabled", 1); - private static var nme_gl_is_framebuffer = load("nme_gl_is_framebuffer", 1); - private static var nme_gl_is_program = load("nme_gl_is_program", 1); - private static var nme_gl_is_renderbuffer = load("nme_gl_is_renderbuffer", 1); - private static var nme_gl_is_shader = load("nme_gl_is_shader", 1); - private static var nme_gl_is_texture = load("nme_gl_is_texture", 1); - private static var nme_gl_line_width = load("nme_gl_line_width", 1); - private static var nme_gl_link_program = load("nme_gl_link_program", 1); - private static var nme_gl_pixel_storei = load("nme_gl_pixel_storei", 2); - private static var nme_gl_polygon_offset = load("nme_gl_polygon_offset", 2); - private static var nme_gl_renderbuffer_storage = load("nme_gl_renderbuffer_storage", 4); - private static var nme_gl_sample_coverage = load("nme_gl_sample_coverage", 2); - private static var nme_gl_scissor = load("nme_gl_scissor", 4); - private static var nme_gl_shader_source = load("nme_gl_shader_source", 2); - private static var nme_gl_stencil_func = load("nme_gl_stencil_func", 3); - private static var nme_gl_stencil_func_separate = load("nme_gl_stencil_func_separate", 4); - private static var nme_gl_stencil_mask = load("nme_gl_stencil_mask", 1); - private static var nme_gl_stencil_mask_separate = load("nme_gl_stencil_mask_separate", 2); - private static var nme_gl_stencil_op = load("nme_gl_stencil_op", 3); - private static var nme_gl_stencil_op_separate = load("nme_gl_stencil_op_separate", 4); - private static var nme_gl_tex_image_2d = load("nme_gl_tex_image_2d", -1); - private static var nme_gl_tex_parameterf = load("nme_gl_tex_parameterf", 3); - private static var nme_gl_tex_parameteri = load("nme_gl_tex_parameteri", 3); - private static var nme_gl_tex_sub_image_2d = load("nme_gl_tex_sub_image_2d", -1); - private static var nme_gl_uniform1f = load("nme_gl_uniform1f", 2); - private static var nme_gl_uniform1fv = load("nme_gl_uniform1fv", 2); - private static var nme_gl_uniform1i = load("nme_gl_uniform1i", 2); - private static var nme_gl_uniform1iv = load("nme_gl_uniform1iv", 2); - private static var nme_gl_uniform2f = load("nme_gl_uniform2f", 3); - private static var nme_gl_uniform2fv = load("nme_gl_uniform2fv", 2); - private static var nme_gl_uniform2i = load("nme_gl_uniform2i", 3); - private static var nme_gl_uniform2iv = load("nme_gl_uniform2iv", 2); - private static var nme_gl_uniform3f = load("nme_gl_uniform3f", 4); - private static var nme_gl_uniform3fv = load("nme_gl_uniform3fv", 2); - private static var nme_gl_uniform3i = load("nme_gl_uniform3i", 4); - private static var nme_gl_uniform3iv = load("nme_gl_uniform3iv", 2); - private static var nme_gl_uniform4f = load("nme_gl_uniform4f", 5); - private static var nme_gl_uniform4fv = load("nme_gl_uniform4fv", 2); - private static var nme_gl_uniform4i = load("nme_gl_uniform4i", 5); - private static var nme_gl_uniform4iv = load("nme_gl_uniform4iv", 2); - private static var nme_gl_uniform_matrix = load("nme_gl_uniform_matrix", 4); - private static var nme_gl_use_program = load("nme_gl_use_program", 1); - private static var nme_gl_validate_program = load("nme_gl_validate_program", 1); - private static var nme_gl_version = load("nme_gl_version", 0); - private static var nme_gl_vertex_attrib1f = load("nme_gl_vertex_attrib1f", 2); - private static var nme_gl_vertex_attrib1fv = load("nme_gl_vertex_attrib1fv", 2); - private static var nme_gl_vertex_attrib2f = load("nme_gl_vertex_attrib2f", 3); - private static var nme_gl_vertex_attrib2fv = load("nme_gl_vertex_attrib2fv", 2); - private static var nme_gl_vertex_attrib3f = load("nme_gl_vertex_attrib3f", 4); - private static var nme_gl_vertex_attrib3fv = load("nme_gl_vertex_attrib3fv", 2); - private static var nme_gl_vertex_attrib4f = load("nme_gl_vertex_attrib4f", 5); - private static var nme_gl_vertex_attrib4fv = load("nme_gl_vertex_attrib4fv", 2); - private static var nme_gl_vertex_attrib_pointer = load("nme_gl_vertex_attrib_pointer", -1); - private static var nme_gl_viewport = load("nme_gl_viewport", 4); + private static var lime_gl_active_texture = load("lime_gl_active_texture", 1); + private static var lime_gl_attach_shader = load("lime_gl_attach_shader", 2); + private static var lime_gl_bind_attrib_location = load("lime_gl_bind_attrib_location", 3); + private static var lime_gl_bind_bitmap_data_texture = load("lime_gl_bind_bitmap_data_texture", 1); + private static var lime_gl_bind_buffer = load("lime_gl_bind_buffer", 2); + private static var lime_gl_bind_framebuffer = load("lime_gl_bind_framebuffer", 2); + private static var lime_gl_bind_renderbuffer = load("lime_gl_bind_renderbuffer", 2); + private static var lime_gl_bind_texture = load("lime_gl_bind_texture", 2); + private static var lime_gl_blend_color = load("lime_gl_blend_color", 4); + private static var lime_gl_blend_equation = load("lime_gl_blend_equation", 1); + private static var lime_gl_blend_equation_separate = load("lime_gl_blend_equation_separate", 2); + private static var lime_gl_blend_func = load("lime_gl_blend_func", 2); + private static var lime_gl_blend_func_separate = load("lime_gl_blend_func_separate", 4); + private static var lime_gl_buffer_data = load("lime_gl_buffer_data", 5); + private static var lime_gl_buffer_sub_data = load("lime_gl_buffer_sub_data", 5); + private static var lime_gl_check_framebuffer_status = load("lime_gl_check_framebuffer_status", 1); + private static var lime_gl_clear = load("lime_gl_clear", 1); + private static var lime_gl_clear_color = load("lime_gl_clear_color", 4); + private static var lime_gl_clear_depth = load("lime_gl_clear_depth", 1); + private static var lime_gl_clear_stencil = load("lime_gl_clear_stencil", 1); + private static var lime_gl_color_mask = load("lime_gl_color_mask", 4); + private static var lime_gl_compile_shader = load("lime_gl_compile_shader", 1); + private static var lime_gl_compressed_tex_image_2d = load("lime_gl_compressed_tex_image_2d", -1); + private static var lime_gl_compressed_tex_sub_image_2d = load("lime_gl_compressed_tex_sub_image_2d", -1); + private static var lime_gl_copy_tex_image_2d = load("lime_gl_copy_tex_image_2d", -1); + private static var lime_gl_copy_tex_sub_image_2d = load("lime_gl_copy_tex_sub_image_2d", -1); + private static var lime_gl_create_buffer = load("lime_gl_create_buffer", 0); + private static var lime_gl_create_framebuffer = load("lime_gl_create_framebuffer", 0); + private static var lime_gl_create_program = load("lime_gl_create_program", 0); + private static var lime_gl_create_render_buffer = load("lime_gl_create_render_buffer", 0); + private static var lime_gl_create_shader = load("lime_gl_create_shader", 1); + private static var lime_gl_create_texture = load("lime_gl_create_texture", 0); + private static var lime_gl_delete_buffer = load("lime_gl_delete_buffer", 1); + private static var lime_gl_delete_program = load("lime_gl_delete_program", 1); + private static var lime_gl_delete_shader = load("lime_gl_delete_shader", 1); + private static var lime_gl_delete_texture = load("lime_gl_delete_texture", 1); + private static var lime_gl_depth_func = load("lime_gl_depth_func", 1); + private static var lime_gl_depth_mask = load("lime_gl_depth_mask", 1); + private static var lime_gl_depth_range = load("lime_gl_depth_range", 2); + private static var lime_gl_detach_shader = load("lime_gl_detach_shader", 2); + private static var lime_gl_disable = load("lime_gl_disable", 1); + private static var lime_gl_disable_vertex_attrib_array = load("lime_gl_disable_vertex_attrib_array", 1); + private static var lime_gl_draw_arrays = load("lime_gl_draw_arrays", 3); + private static var lime_gl_draw_elements = load("lime_gl_draw_elements", 4); + private static var lime_gl_enable = load("lime_gl_enable", 1); + private static var lime_gl_enable_vertex_attrib_array = load("lime_gl_enable_vertex_attrib_array", 1); + private static var lime_gl_finish = load("lime_gl_finish", 0); + private static var lime_gl_flush = load("lime_gl_flush", 0); + private static var lime_gl_framebuffer_renderbuffer = load("lime_gl_framebuffer_renderbuffer", 4); + private static var lime_gl_framebuffer_texture2D = load("lime_gl_framebuffer_texture2D", 5); + private static var lime_gl_front_face = load("lime_gl_front_face", 1); + private static var lime_gl_generate_mipmap = load("lime_gl_generate_mipmap", 1); + private static var lime_gl_get_active_attrib = load("lime_gl_get_active_attrib", 2); + private static var lime_gl_get_active_uniform = load("lime_gl_get_active_uniform", 2); + private static var lime_gl_get_attrib_location = load("lime_gl_get_attrib_location", 2); + private static var lime_gl_get_buffer_paramerter = load("lime_gl_get_buffer_paramerter", 2); + private static var lime_gl_get_context_attributes = load("lime_gl_get_context_attributes", 0); + private static var lime_gl_get_error = load("lime_gl_get_error", 0); + private static var lime_gl_get_framebuffer_attachment_parameter = load("lime_gl_get_framebuffer_attachment_parameter", 3); + private static var lime_gl_get_parameter = load("lime_gl_get_parameter", 1); + // private static var lime_gl_get_extension = load("lime_gl_get_extension", 1); + private static var lime_gl_get_program_info_log = load("lime_gl_get_program_info_log", 1); + private static var lime_gl_get_program_parameter = load("lime_gl_get_program_parameter", 2); + private static var lime_gl_get_render_buffer_parameter = load("lime_gl_get_render_buffer_parameter", 2); + private static var lime_gl_get_shader_info_log = load("lime_gl_get_shader_info_log", 1); + private static var lime_gl_get_shader_parameter = load("lime_gl_get_shader_parameter", 2); + private static var lime_gl_get_shader_precision_format = load("lime_gl_get_shader_precision_format", 2); + private static var lime_gl_get_shader_source = load("lime_gl_get_shader_source", 1); + private static var lime_gl_get_supported_extensions = load("lime_gl_get_supported_extensions", 1); + private static var lime_gl_get_tex_parameter = load("lime_gl_get_tex_parameter", 2); + private static var lime_gl_get_uniform = load("lime_gl_get_uniform", 2); + private static var lime_gl_get_uniform_location = load("lime_gl_get_uniform_location", 2); + private static var lime_gl_get_vertex_attrib = load("lime_gl_get_vertex_attrib", 2); + private static var lime_gl_get_vertex_attrib_offset = load("lime_gl_get_vertex_attrib_offset", 2); + private static var lime_gl_hint = load("lime_gl_hint", 2); + private static var lime_gl_is_buffer = load("lime_gl_is_buffer", 1); + private static var lime_gl_is_enabled = load("lime_gl_is_enabled", 1); + private static var lime_gl_is_framebuffer = load("lime_gl_is_framebuffer", 1); + private static var lime_gl_is_program = load("lime_gl_is_program", 1); + private static var lime_gl_is_renderbuffer = load("lime_gl_is_renderbuffer", 1); + private static var lime_gl_is_shader = load("lime_gl_is_shader", 1); + private static var lime_gl_is_texture = load("lime_gl_is_texture", 1); + private static var lime_gl_line_width = load("lime_gl_line_width", 1); + private static var lime_gl_link_program = load("lime_gl_link_program", 1); + private static var lime_gl_pixel_storei = load("lime_gl_pixel_storei", 2); + private static var lime_gl_polygon_offset = load("lime_gl_polygon_offset", 2); + private static var lime_gl_renderbuffer_storage = load("lime_gl_renderbuffer_storage", 4); + private static var lime_gl_sample_coverage = load("lime_gl_sample_coverage", 2); + private static var lime_gl_scissor = load("lime_gl_scissor", 4); + private static var lime_gl_shader_source = load("lime_gl_shader_source", 2); + private static var lime_gl_stencil_func = load("lime_gl_stencil_func", 3); + private static var lime_gl_stencil_func_separate = load("lime_gl_stencil_func_separate", 4); + private static var lime_gl_stencil_mask = load("lime_gl_stencil_mask", 1); + private static var lime_gl_stencil_mask_separate = load("lime_gl_stencil_mask_separate", 2); + private static var lime_gl_stencil_op = load("lime_gl_stencil_op", 3); + private static var lime_gl_stencil_op_separate = load("lime_gl_stencil_op_separate", 4); + private static var lime_gl_tex_image_2d = load("lime_gl_tex_image_2d", -1); + private static var lime_gl_tex_parameterf = load("lime_gl_tex_parameterf", 3); + private static var lime_gl_tex_parameteri = load("lime_gl_tex_parameteri", 3); + private static var lime_gl_tex_sub_image_2d = load("lime_gl_tex_sub_image_2d", -1); + private static var lime_gl_uniform1f = load("lime_gl_uniform1f", 2); + private static var lime_gl_uniform1fv = load("lime_gl_uniform1fv", 2); + private static var lime_gl_uniform1i = load("lime_gl_uniform1i", 2); + private static var lime_gl_uniform1iv = load("lime_gl_uniform1iv", 2); + private static var lime_gl_uniform2f = load("lime_gl_uniform2f", 3); + private static var lime_gl_uniform2fv = load("lime_gl_uniform2fv", 2); + private static var lime_gl_uniform2i = load("lime_gl_uniform2i", 3); + private static var lime_gl_uniform2iv = load("lime_gl_uniform2iv", 2); + private static var lime_gl_uniform3f = load("lime_gl_uniform3f", 4); + private static var lime_gl_uniform3fv = load("lime_gl_uniform3fv", 2); + private static var lime_gl_uniform3i = load("lime_gl_uniform3i", 4); + private static var lime_gl_uniform3iv = load("lime_gl_uniform3iv", 2); + private static var lime_gl_uniform4f = load("lime_gl_uniform4f", 5); + private static var lime_gl_uniform4fv = load("lime_gl_uniform4fv", 2); + private static var lime_gl_uniform4i = load("lime_gl_uniform4i", 5); + private static var lime_gl_uniform4iv = load("lime_gl_uniform4iv", 2); + private static var lime_gl_uniform_matrix = load("lime_gl_uniform_matrix", 4); + private static var lime_gl_use_program = load("lime_gl_use_program", 1); + private static var lime_gl_validate_program = load("lime_gl_validate_program", 1); + private static var lime_gl_version = load("lime_gl_version", 0); + private static var lime_gl_vertex_attrib1f = load("lime_gl_vertex_attrib1f", 2); + private static var lime_gl_vertex_attrib1fv = load("lime_gl_vertex_attrib1fv", 2); + private static var lime_gl_vertex_attrib2f = load("lime_gl_vertex_attrib2f", 3); + private static var lime_gl_vertex_attrib2fv = load("lime_gl_vertex_attrib2fv", 2); + private static var lime_gl_vertex_attrib3f = load("lime_gl_vertex_attrib3f", 4); + private static var lime_gl_vertex_attrib3fv = load("lime_gl_vertex_attrib3fv", 2); + private static var lime_gl_vertex_attrib4f = load("lime_gl_vertex_attrib4f", 5); + private static var lime_gl_vertex_attrib4fv = load("lime_gl_vertex_attrib4fv", 2); + private static var lime_gl_vertex_attrib_pointer = load("lime_gl_vertex_attrib_pointer", -1); + private static var lime_gl_viewport = load("lime_gl_viewport", 4); } diff --git a/lime/utils/Assets.hx b/lime/utils/Assets.hx index db0e02ad4..efab4b0a8 100644 --- a/lime/utils/Assets.hx +++ b/lime/utils/Assets.hx @@ -23,7 +23,7 @@ import lime.utils.ByteArray; * embedded images, fonts, sounds and other resource files.

* *

The contents are populated automatically when an application - * is compiled using the NME command-line tools, based on the + * is compiled using the lime command-line tools, based on the * contents of the *.nmml project file.

* *

For most platforms, the assets are included in the same directory diff --git a/lime/utils/JNI.hx b/lime/utils/JNI.hx index 32584c981..13a5c0e88 100644 --- a/lime/utils/JNI.hx +++ b/lime/utils/JNI.hx @@ -19,7 +19,7 @@ class JNI { if (!initialized) { initialized = true; - var method = Lib.load ("nme", "nme_jni_init_callback", 1); + var method = Lib.load ("lime", "lime_jni_init_callback", 1); method (onCallback); } @@ -47,7 +47,7 @@ class JNI { init (); - var method = new JNIMethod (nme_jni_create_method (className, memberName, signature, false)); + var method = new JNIMethod (lime_jni_create_method (className, memberName, signature, false)); return method.getMemberMethod (useArray); } @@ -57,7 +57,7 @@ class JNI { init (); - var method = new JNIMethod (nme_jni_create_method (className, memberName, signature, true)); + var method = new JNIMethod (lime_jni_create_method (className, memberName, signature, true)); return method.getStaticMethod (useArray); } @@ -70,7 +70,7 @@ class JNI { - private static var nme_jni_create_method = Lib.load ("nme", "nme_jni_create_method", 4); + private static var lime_jni_create_method = Lib.load ("lime", "lime_jni_create_method", 4); } @@ -91,14 +91,14 @@ class JNIMethod { public function callMember (args:Array):Dynamic { var jobject = args.shift (); - return nme_jni_call_member (method, jobject, args); + return lime_jni_call_member (method, jobject, args); } public function callStatic (args:Array):Dynamic { - return nme_jni_call_static (method, args); + return lime_jni_call_static (method, args); } @@ -140,8 +140,8 @@ class JNIMethod { - private static var nme_jni_call_member = Libs.load ("nme", "nme_jni_call_member", 3); - private static var nme_jni_call_static = Libs.load ("nme", "nme_jni_call_static", 2); + private static var lime_jni_call_member = Libs.load ("lime", "lime_jni_call_member", 3); + private static var lime_jni_call_static = Libs.load ("lime", "lime_jni_call_static", 2); } diff --git a/lime/utils/Libs.hx b/lime/utils/Libs.hx index 879e1daff..a5ef0e723 100644 --- a/lime/utils/Libs.hx +++ b/lime/utils/Libs.hx @@ -48,11 +48,11 @@ class Libs { #if neko private static function loadNekoAPI ():Void { - var init = load ("nme", "neko_init", 5); + var init = load ("lime", "neko_init", 5); if (init != null) { - loaderTrace ("Found nekoapi @ " + __moduleNames.get ("nme")); + loaderTrace ("Found nekoapi @ " + __moduleNames.get ("lime")); init (function(s) return new String (s), function (len:Int) { var r = []; if (len > 0) r[len - 1] = null; return r; }, null, true, false); } else { @@ -215,7 +215,7 @@ class Libs { loaderTrace ("Result : " + result); #if neko - if (library == "nme") { + if (library == "lime") { loadNekoAPI (); } #end diff --git a/lime/utils/WeakRef.hx b/lime/utils/WeakRef.hx index 131224286..661357e37 100644 --- a/lime/utils/WeakRef.hx +++ b/lime/utils/WeakRef.hx @@ -15,7 +15,7 @@ class WeakRef { if (makeWeak) { - weakRef = nme_weak_ref_create (this, object); + weakRef = lime_weak_ref_create (this, object); hardRef = null; } else { @@ -42,7 +42,7 @@ class WeakRef { } - var result = nme_weak_ref_get (weakRef); + var result = lime_weak_ref_get (weakRef); if (result == null) { weakRef = -1; @@ -71,8 +71,8 @@ class WeakRef { // Native Methods - private static var nme_weak_ref_create:Dynamic = Libs.load ("nme", "nme_weak_ref_create", 2); - private static var nme_weak_ref_get:Dynamic = Libs.load ("nme", "nme_weak_ref_get", 1); + private static var lime_weak_ref_create:Dynamic = Libs.load ("lime", "lime_weak_ref_create", 2); + private static var lime_weak_ref_get:Dynamic = Libs.load ("lime", "lime_weak_ref_get", 1); } \ No newline at end of file diff --git a/lime/utils/html5/ByteArray.hx b/lime/utils/html5/ByteArray.hx index 4079b6933..1f1dc11ce 100644 --- a/lime/utils/html5/ByteArray.hx +++ b/lime/utils/html5/ByteArray.hx @@ -35,7 +35,7 @@ class ByteArray implements ArrayAccess { public function new():Void { - _nmeResizeBuffer(allocated); + _limeResizeBuffer(allocated); //this.byteView = untyped __new__("Uint8Array", allocated); //this.data = untyped __new__("DataView", this.byteView.buffer); @@ -80,7 +80,7 @@ class ByteArray implements ArrayAccess { } - private function _nmeResizeBuffer(len:Int):Void { + private function _limeResizeBuffer(len:Int):Void { var oldByteView:Uint8Array = this.byteView; var newByteView:Uint8Array = untyped __new__("Uint8Array", len); @@ -113,7 +113,7 @@ class ByteArray implements ArrayAccess { static public function fromBytes(inBytes:Bytes) { var result = new ByteArray(); - result.nmeFromBytes(inBytes); + result.limeFromBytes(inBytes); return result; } @@ -121,7 +121,7 @@ class ByteArray implements ArrayAccess { return data.buffer; } - private inline function nmeFromBytes(inBytes:Bytes):Void + private inline function limeFromBytes(inBytes:Bytes):Void { byteView = untyped __new__("Uint8Array", inBytes.getData()); length = byteView.length; @@ -129,7 +129,7 @@ class ByteArray implements ArrayAccess { } - public inline function nmeGet(pos:Int):Int { + public inline function limeGet(pos:Int):Int { var data:Dynamic = data; return data.getUint8(pos); @@ -137,14 +137,14 @@ class ByteArray implements ArrayAccess { } - public inline function nmeGetBuffer() { + public inline function limeGetBuffer() { return data.buffer; } - public static function nmeOfBuffer(buffer:ArrayBuffer):ByteArray { + public static function limeOfBuffer(buffer:ArrayBuffer):ByteArray { var bytes = new ByteArray(); bytes.length = bytes.allocated ;//= buffer.byteLength; todo @@ -155,7 +155,7 @@ class ByteArray implements ArrayAccess { } - public inline function nmeSet(pos:Int, v:Int):Void { + public inline function limeSet(pos:Int, v:Int):Void { var data:Dynamic = data; data.setUint8(pos, v); @@ -502,9 +502,9 @@ class ByteArray implements ArrayAccess { private inline function set_length(value:Int):Int { if (allocated < value) - _nmeResizeBuffer(allocated = Std.int(Math.max(value, allocated * 2))); + _limeResizeBuffer(allocated = Std.int(Math.max(value, allocated * 2))); else if (allocated > value) - _nmeResizeBuffer(allocated = value); + _limeResizeBuffer(allocated = value); length = value; return value; } diff --git a/lime/utils/html5/URLLoader.hx b/lime/utils/html5/URLLoader.hx index bf3b14f6a..804aec8e5 100644 --- a/lime/utils/html5/URLLoader.hx +++ b/lime/utils/html5/URLLoader.hx @@ -154,7 +154,7 @@ class URLLoader { //extends EventDispatcher { switch (dataFormat) { - case BINARY: uri = data.nmeGetBuffer(); + case BINARY: uri = data.limeGetBuffer(); default: uri = data.readUTFBytes(data.length); } @@ -253,7 +253,7 @@ class URLLoader { //extends EventDispatcher { switch (dataFormat) { - case BINARY: this.data = ByteArray.nmeOfBuffer(content); + case BINARY: this.data = ByteArray.limeOfBuffer(content); default: this.data = Std.string(content); } diff --git a/lime/utils/native/ByteArray.hx b/lime/utils/native/ByteArray.hx index 33230779a..ac780db05 100644 --- a/lime/utils/native/ByteArray.hx +++ b/lime/utils/native/ByteArray.hx @@ -6,7 +6,7 @@ import lime.utils.Libs; import haxe.io.Bytes; import haxe.io.BytesData; -// import nme.errors.EOFError; // Ensure that the neko->haxe callbacks are initialized +// import lime.errors.EOFError; // Ensure that the neko->haxe callbacks are initialized import lime.utils.CompressionAlgorithm; import lime.utils.IDataInput; @@ -71,7 +71,7 @@ class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess #if #end } - #if !no_nme_io + #if !no_lime_io /** @private */ static function __init__() { var factory = function(inLen:Int) { return new ByteArray(inLen); }; var resize = function(inArray:ByteArray, inLen:Int) @@ -86,7 +86,7 @@ class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess #if var slen = function(inArray:ByteArray) { return inArray == null ? 0 : inArray.length; } #if !lime_html5 - var init = Libs.load("nme", "nme_byte_array_init", 4); + var init = Libs.load("lime", "lime_byte_array_init", 4); init(factory, slen, resize, bytes); #end //lime_html5 } @@ -135,7 +135,7 @@ class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess #if if (algorithm == CompressionAlgorithm.LZMA) { - result = Bytes.ofData(nme_lzma_encode( cast src.getData()) ); + result = Bytes.ofData(lime_lzma_encode( cast src.getData()) ); } else { @@ -191,7 +191,7 @@ class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess #if static public function fromBytes(inBytes:Bytes) { var result = new ByteArray( -1); - result.nmeFromBytes(inBytes); + result.limeFromBytes(inBytes); return result; } @@ -211,7 +211,7 @@ class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess #if #end //!lime_html5 - private inline function nmeFromBytes(inBytes:Bytes):Void + private inline function limeFromBytes(inBytes:Bytes):Void { b = inBytes.b; length = inBytes.length; @@ -277,10 +277,10 @@ class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess #if return 0.0; } - #if !no_nme_io + #if !no_lime_io static public function readFile(inString:String):ByteArray { - return nme_byte_array_read_file(inString); + return lime_byte_array_read_file(inString); } #end @@ -446,7 +446,7 @@ class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess #if if (algorithm == CompressionAlgorithm.LZMA) { - result = Bytes.ofData(nme_lzma_decode(src.getData())); + result = Bytes.ofData(lime_lzma_decode(src.getData())); } else { @@ -522,10 +522,10 @@ class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess #if #end //!lime_html5 } - #if !no_nme_io + #if !no_lime_io public function writeFile(inString:String):Void { - nme_byte_array_overwrite_file(inString, this); + lime_byte_array_overwrite_file(inString, this); } #end @@ -621,12 +621,12 @@ class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess #if /** @private */ private static var _double_of_bytes = Libs.load("std", "double_of_bytes", 2); /** @private */ private static var _float_bytes = Libs.load("std", "float_bytes", 2); /** @private */ private static var _float_of_bytes = Libs.load("std", "float_of_bytes", 2); - #if !no_nme_io - private static var nme_byte_array_overwrite_file = Libs.load("nme","nme_byte_array_overwrite_file", 2); - private static var nme_byte_array_read_file = Libs.load("nme", "nme_byte_array_read_file", 1); + #if !no_lime_io + private static var lime_byte_array_overwrite_file = Libs.load("lime","lime_byte_array_overwrite_file", 2); + private static var lime_byte_array_read_file = Libs.load("lime", "lime_byte_array_read_file", 1); #end - private static var nme_lzma_encode = Libs.load("nme", "nme_lzma_encode", 1); - private static var nme_lzma_decode = Libs.load("nme", "nme_lzma_decode", 1); + private static var lime_lzma_encode = Libs.load("lime", "lime_lzma_encode", 1); + private static var lime_lzma_decode = Libs.load("lime", "lime_lzma_decode", 1); } #else diff --git a/project/Build.xml b/project/Build.xml index 0d8a5e5dc..362412543 100644 --- a/project/Build.xml +++ b/project/Build.xml @@ -17,14 +17,14 @@ - - - - - - - - + + + + + + + + @@ -49,21 +49,21 @@ - - + + - + - + - + @@ -145,7 +145,7 @@ - + @@ -271,12 +271,12 @@ - + - - + + @@ -344,12 +344,12 @@ - + - - + + @@ -358,8 +358,8 @@ - - + + @@ -427,7 +427,7 @@ - + @@ -440,7 +440,7 @@ - + @@ -462,7 +462,7 @@ - + @@ -494,7 +494,7 @@ - + diff --git a/project/include/Audio.h b/project/include/Audio.h index eee255bb0..918e95fe1 100644 --- a/project/include/Audio.h +++ b/project/include/Audio.h @@ -23,7 +23,7 @@ //#define LOG_SOUND(args...) { } -namespace nme +namespace lime { class AudioSample { diff --git a/project/include/ByteArray.h b/project/include/ByteArray.h index e65cdc72d..16ba2f550 100644 --- a/project/include/ByteArray.h +++ b/project/include/ByteArray.h @@ -1,11 +1,11 @@ -#ifndef NME_BYTE_ARRAY_H -#define NME_BYTE_ARRAY_H +#ifndef LIME_BYTE_ARRAY_H +#define LIME_BYTE_ARRAY_H #include "Object.h" #include "QuickVec.h" #include "Utils.h" -namespace nme +namespace lime { diff --git a/project/include/CachedExtent.h b/project/include/CachedExtent.h index 55ef75dc3..bf876751b 100644 --- a/project/include/CachedExtent.h +++ b/project/include/CachedExtent.h @@ -1,10 +1,10 @@ -#ifndef NME_CACHED_EXTENT_H -#define NME_CACHED_EXTENT_H +#ifndef LIME_CACHED_EXTENT_H +#define LIME_CACHED_EXTENT_H #include #include -namespace nme +namespace lime { extern int gCachedExtentID; @@ -40,6 +40,6 @@ private: CachedExtent mExtentCache[3]; }; -} // end namespace NME +} // end namespace lime #endif diff --git a/project/include/Display.h b/project/include/Display.h index 7f319d826..aefcaf270 100644 --- a/project/include/Display.h +++ b/project/include/Display.h @@ -1,5 +1,5 @@ -#ifndef NME_DISPLAY_H -#define NME_DISPLAY_H +#ifndef LIME_DISPLAY_H +#define LIME_DISPLAY_H #include #include @@ -9,7 +9,7 @@ #include #include -namespace nme +namespace lime { enum @@ -570,6 +570,6 @@ void CreateMainFrame( FrameCreationCallback inOnFrame, int inWidth,int inHeight, unsigned int inFlags, const char *inTitle, Surface *inIcon ); -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/ExternalInterface.h b/project/include/ExternalInterface.h index 9310a9fc4..ff33e59b2 100644 --- a/project/include/ExternalInterface.h +++ b/project/include/ExternalInterface.h @@ -6,7 +6,7 @@ #include -namespace nme +namespace lime { extern vkind gObjectKind; diff --git a/project/include/Filters.h b/project/include/Filters.h index f60d5f21c..916143866 100644 --- a/project/include/Filters.h +++ b/project/include/Filters.h @@ -4,7 +4,7 @@ #include "QuickVec.h" #include "Geom.h" -namespace nme +namespace lime { class Surface; @@ -95,6 +95,6 @@ Surface *FilterBitmap(const FilterList &inList, Surface *inBitmap, Rect GetFilteredObjectRect(const FilterList &inList,const Rect &inRect); -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/Font.h b/project/include/Font.h index 20b0487e2..3c43b1ea1 100644 --- a/project/include/Font.h +++ b/project/include/Font.h @@ -1,5 +1,5 @@ -#ifndef NME_FONT_H -#define NME_FONT_H +#ifndef LIME_FONT_H +#define LIME_FONT_H #include #include @@ -10,7 +10,7 @@ #include #include -namespace nme +namespace lime { struct TextLineMetrics @@ -205,6 +205,6 @@ class FontCache { }; -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/Geom.h b/project/include/Geom.h index cc1086529..728b19ee9 100644 --- a/project/include/Geom.h +++ b/project/include/Geom.h @@ -1,5 +1,5 @@ -#ifndef NME_GEOM_H -#define NME_GEOM_H +#ifndef LIME_GEOM_H +#define LIME_GEOM_H #include #include @@ -8,7 +8,7 @@ #define M_PI 3.14159265358979323846 #endif -namespace nme +namespace lime { enum GlyphRotation { gr0, gr90, gr180, gr270 }; @@ -446,6 +446,6 @@ struct Tri }; -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/Graphics.h b/project/include/Graphics.h index acfd26fae..38aea3bae 100644 --- a/project/include/Graphics.h +++ b/project/include/Graphics.h @@ -1,5 +1,5 @@ -#ifndef NME_GRAPHICS_H -#define NME_GRAPHICS_H +#ifndef LIME_GRAPHICS_H +#define LIME_GRAPHICS_H #include #include @@ -10,7 +10,7 @@ typedef unsigned int uint32; typedef unsigned char uint8; -namespace nme +namespace lime { enum GraphicsAPIType { gatBase, gatInternal, gatQuartz, gatCairo, gatOpenGL, gatOpenGLES }; @@ -580,7 +580,7 @@ public: virtual bool Hits(const RenderState &inState) { return false; } - #ifdef NME_DIRECTFB + #ifdef LIME_DIRECTFB static Renderer *CreateHardware(const class GraphicsJob &inJob,const GraphicsPath &inPath,HardwareContext &inHardware); #endif @@ -601,7 +601,7 @@ struct GraphicsJob GraphicsStroke *mStroke; IGraphicsFill *mFill; GraphicsTrianglePath *mTriangles; - #ifdef NME_DIRECTFB + #ifdef LIME_DIRECTFB class Renderer *mHardwareRenderer; #endif class Renderer *mSoftwareRenderer; @@ -718,6 +718,6 @@ private: -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/Input.h b/project/include/Input.h index ceb677214..aee96d1ea 100644 --- a/project/include/Input.h +++ b/project/include/Input.h @@ -1,7 +1,7 @@ #ifndef INPUT_H #define INPUT_H -namespace nme +namespace lime { bool GetAcceleration(double &outX, double &outY, double &outZ); diff --git a/project/include/KeyCodes.h b/project/include/KeyCodes.h index a38e68acc..72402fc65 100644 --- a/project/include/KeyCodes.h +++ b/project/include/KeyCodes.h @@ -1,7 +1,7 @@ #ifndef KEY_CODES_H #define KEY_CODES_H -namespace nme +namespace lime { enum KeyCode diff --git a/project/include/NMEThread.h b/project/include/LimeThread.h similarity index 84% rename from project/include/NMEThread.h rename to project/include/LimeThread.h index 61f6f5849..63283e872 100644 --- a/project/include/NMEThread.h +++ b/project/include/LimeThread.h @@ -1,5 +1,5 @@ -#ifndef NME_THREAD_H -#define NME_THREAD_H +#ifndef LIME_THREAD_H +#define LIME_THREAD_H #ifndef HX_WINDOWS #ifndef EPPC @@ -11,7 +11,7 @@ #undef max #endif -namespace nme +namespace lime { #ifndef HX_WINDOWS #ifdef EPPC diff --git a/project/include/Lzma.h b/project/include/Lzma.h index 886205d1f..b61368951 100644 --- a/project/include/Lzma.h +++ b/project/include/Lzma.h @@ -1,9 +1,9 @@ -#ifndef NME_LZMA_H -#define NME_LZMA_H +#ifndef LIME_LZMA_H +#define LIME_LZMA_H #include -namespace nme { +namespace lime { class Lzma { public: diff --git a/project/include/Matrix.h b/project/include/Matrix.h index 8a90af3f3..08aab46a4 100644 --- a/project/include/Matrix.h +++ b/project/include/Matrix.h @@ -1,10 +1,10 @@ -#ifndef NME_MATRIX_H -#define NME_MATRIX_H +#ifndef LIME_MATRIX_H +#define LIME_MATRIX_H #include #include -namespace nme { +namespace lime { class Matrix { @@ -86,6 +86,6 @@ public: typedef Matrix Matrix3D; -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/Object.h b/project/include/Object.h index f5f67387a..55f4acf07 100644 --- a/project/include/Object.h +++ b/project/include/Object.h @@ -1,7 +1,7 @@ -#ifndef NME_OBJECT_H -#define NME_OBJECT_H +#ifndef LIME_OBJECT_H +#define LIME_OBJECT_H -namespace nme +namespace lime { class Object @@ -18,7 +18,7 @@ protected: int mRefCount; }; -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/Pixel.h b/project/include/Pixel.h index 9d584f07f..cc8ccddce 100644 --- a/project/include/Pixel.h +++ b/project/include/Pixel.h @@ -1,12 +1,12 @@ -#ifndef NME_PIXEL_H -#define NME_PIXEL_H +#ifndef LIME_PIXEL_H +#define LIME_PIXEL_H // The order or RGB or BGR is determined to the primary surface's // native order - this allows most transfers to be donw without swapping R & B // When rendering from a source to a dest, the source is swapped to match in // the blending code. -namespace nme +namespace lime { extern bool gC0IsRed; @@ -289,6 +289,6 @@ inline void QBlendAlpha(Uint8 &ioDest, Uint8 inSrc) -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/QuickVec.h b/project/include/QuickVec.h index b2f6ee69d..5925233ff 100644 --- a/project/include/QuickVec.h +++ b/project/include/QuickVec.h @@ -1,5 +1,5 @@ -#ifndef NME_QUICK_VEC -#define NME_QUICK_VEC +#ifndef LIME_QUICK_VEC +#define LIME_QUICK_VEC #include #ifdef EPPC @@ -9,7 +9,7 @@ #endif #include -namespace nme +namespace lime { template @@ -448,6 +448,6 @@ public: }; -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/Scale9.h b/project/include/Scale9.h index b57153b36..67fe3bd8a 100644 --- a/project/include/Scale9.h +++ b/project/include/Scale9.h @@ -1,10 +1,10 @@ -#ifndef NME_SCALE9_H -#define NME_SCALE9_H +#ifndef LIME_SCALE9_H +#define LIME_SCALE9_H #include #include -namespace nme +namespace lime { class Scale9 @@ -99,7 +99,7 @@ public: }; -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/Sound.h b/project/include/Sound.h index 18474a9ed..c1264c526 100644 --- a/project/include/Sound.h +++ b/project/include/Sound.h @@ -6,7 +6,7 @@ #include "Object.h" #include "ByteArray.h" -namespace nme +namespace lime { struct SoundTransform @@ -57,7 +57,7 @@ public: virtual SoundChannel *openChannel(double startTime, int loops, const SoundTransform &inTransform) = 0; }; -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/TextField.h b/project/include/TextField.h index 168658b41..63149998e 100644 --- a/project/include/TextField.h +++ b/project/include/TextField.h @@ -1,5 +1,5 @@ -#ifndef NME_TEXT_FIELD_H -#define NME_TEXT_FIELD_H +#ifndef LIME_TEXT_FIELD_H +#define LIME_TEXT_FIELD_H #include "Utils.h" #include "Graphics.h" @@ -9,7 +9,7 @@ class TiXmlNode; -namespace nme +namespace lime { @@ -217,7 +217,7 @@ private: int mSelectKeyDown; }; -} // end namespace nme +} // end namespace lime #endif diff --git a/project/include/Tilesheet.h b/project/include/Tilesheet.h index 1271cf8a0..18893a90b 100644 --- a/project/include/Tilesheet.h +++ b/project/include/Tilesheet.h @@ -1,10 +1,10 @@ -#ifndef NME_TILESHEET_H -#define NME_TILESHEET_H +#ifndef LIME_TILESHEET_H +#define LIME_TILESHEET_H #include #include -namespace nme +namespace lime { struct Tile diff --git a/project/include/URL.h b/project/include/URL.h index a7906739b..d253e6ffa 100644 --- a/project/include/URL.h +++ b/project/include/URL.h @@ -1,5 +1,5 @@ -#ifndef NME_URL_H -#define NME_URL_H +#ifndef LIME_URL_H +#define LIME_URL_H #include "Object.h" #include "ByteArray.h" @@ -8,7 +8,7 @@ #include -namespace nme +namespace lime { enum URLState diff --git a/project/include/Utils.h b/project/include/Utils.h index f3faa382a..992d07168 100644 --- a/project/include/Utils.h +++ b/project/include/Utils.h @@ -1,5 +1,5 @@ -#ifndef NME_UTILS_H -#define NME_UTILS_H +#ifndef LIME_UTILS_H +#define LIME_UTILS_H #include #include @@ -15,12 +15,12 @@ #include #ifdef VERBOSE -#define VLOG(args...) __android_log_print(ANDROID_LOG_INFO, "NME",args) +#define VLOG(args...) __android_log_print(ANDROID_LOG_INFO, "lime",args) #else #define VLOG(args...) #endif -#define ELOG(args...) __android_log_print(ANDROID_LOG_ERROR, "NME",args) +#define ELOG(args...) __android_log_print(ANDROID_LOG_ERROR, "lime",args) #elif defined(TIZEN) @@ -77,7 +77,7 @@ inline void DontLog(const char *inFormat,...) { } -namespace nme +namespace lime { extern std::string gAssetBase; @@ -187,11 +187,11 @@ FILE *OpenOverwrite(const char *inName); // [ddc] extern int gFixedOrientation; #elif defined(HX_MACOS) -} // close namespace nme +} // close namespace lime extern "C" FILE *OpenRead(const char *inName); extern "C" bool GetBundleFilename(const char *inName, char *outBuffer,int inBufSize); extern "C" FILE *OpenOverwrite(const char *inName); -namespace nme { +namespace lime { #else #define OpenRead(x) fopen(x,"rb") #define OpenOverwrite(x) fopen(x,"wb") // [ddc] diff --git a/project/include/Video.h b/project/include/Video.h index a7b137fbd..e608ff38e 100644 --- a/project/include/Video.h +++ b/project/include/Video.h @@ -3,7 +3,7 @@ #include "Display.h" -namespace nme { +namespace lime { class Video : public DisplayObject { public: diff --git a/project/include/platform/tizen/TizenApplication.h b/project/include/platform/tizen/TizenApplication.h index 903def6ec..88afc82d2 100644 --- a/project/include/platform/tizen/TizenApplication.h +++ b/project/include/platform/tizen/TizenApplication.h @@ -13,7 +13,7 @@ #include -namespace nme { +namespace lime { class TizenApplication : public Tizen::App::UiApp, public Tizen::System::IScreenEventListener, public Tizen::Ui::IKeyEventListener, public Tizen::Base::Runtime::ITimerEventListener { diff --git a/project/include/platform/tizen/TizenFrame.h b/project/include/platform/tizen/TizenFrame.h index 9ffd7737c..26d9824e0 100644 --- a/project/include/platform/tizen/TizenFrame.h +++ b/project/include/platform/tizen/TizenFrame.h @@ -6,7 +6,7 @@ #include "platform/tizen/TizenStage.h" -namespace nme { +namespace lime { class TizenFrame : public Frame { diff --git a/project/include/platform/tizen/TizenStage.h b/project/include/platform/tizen/TizenStage.h index 729fcba12..4402929e3 100644 --- a/project/include/platform/tizen/TizenStage.h +++ b/project/include/platform/tizen/TizenStage.h @@ -7,7 +7,7 @@ #include "renderer/common/HardwareContext.h" -namespace nme { +namespace lime { class TizenStage : public Stage { diff --git a/project/include/platform/tizen/TizenUIApp.h b/project/include/platform/tizen/TizenUIApp.h index 3f6391aa1..2f78a0584 100644 --- a/project/include/platform/tizen/TizenUIApp.h +++ b/project/include/platform/tizen/TizenUIApp.h @@ -15,7 +15,7 @@ //#include "GlRendererTemplate.h" -namespace nme { +namespace lime { class TizenUIApp : public Tizen::App::UiApp, public Tizen::System::IScreenEventListener, public Tizen::Ui::IKeyEventListener { diff --git a/project/include/platform/tizen/TizenUIFrame.h b/project/include/platform/tizen/TizenUIFrame.h index 4397a8605..a42ef6410 100644 --- a/project/include/platform/tizen/TizenUIFrame.h +++ b/project/include/platform/tizen/TizenUIFrame.h @@ -11,7 +11,7 @@ #include -namespace nme { +namespace lime { class TizenUIFrame : public Tizen::Ui::Controls::Frame { diff --git a/project/include/renderer/common/AutoSurfaceRender.h b/project/include/renderer/common/AutoSurfaceRender.h index 2e9c86f43..0b55c7989 100644 --- a/project/include/renderer/common/AutoSurfaceRender.h +++ b/project/include/renderer/common/AutoSurfaceRender.h @@ -5,7 +5,7 @@ #include "renderer/common/Surface.h" -namespace nme { +namespace lime { class AutoSurfaceRender { diff --git a/project/include/renderer/common/BitmapCache.h b/project/include/renderer/common/BitmapCache.h index 60b09c49f..53dcdef70 100644 --- a/project/include/renderer/common/BitmapCache.h +++ b/project/include/renderer/common/BitmapCache.h @@ -6,7 +6,7 @@ #include "renderer/common/Surface.h" -namespace nme { +namespace lime { class BitmapCache { diff --git a/project/include/renderer/common/BlendMode.h b/project/include/renderer/common/BlendMode.h index ceb531565..ee074b16d 100644 --- a/project/include/renderer/common/BlendMode.h +++ b/project/include/renderer/common/BlendMode.h @@ -6,7 +6,7 @@ #include "renderer/common/BitmapCache.h" -namespace nme { +namespace lime { struct NullMask diff --git a/project/include/renderer/common/HardwareContext.h b/project/include/renderer/common/HardwareContext.h index 54bf137e7..d4a6e9310 100644 --- a/project/include/renderer/common/HardwareContext.h +++ b/project/include/renderer/common/HardwareContext.h @@ -6,7 +6,7 @@ #include -namespace nme { +namespace lime { class HardwareContext : public Object { diff --git a/project/include/renderer/common/HardwareSurface.h b/project/include/renderer/common/HardwareSurface.h index 2890f980c..df3bc0bdf 100644 --- a/project/include/renderer/common/HardwareSurface.h +++ b/project/include/renderer/common/HardwareSurface.h @@ -6,7 +6,7 @@ #include "renderer/common/HardwareContext.h" -namespace nme { +namespace lime { class HardwareSurface : public Surface { diff --git a/project/include/renderer/common/SimpleSurface.h b/project/include/renderer/common/SimpleSurface.h index 2d39b3cf3..dc4dcb140 100644 --- a/project/include/renderer/common/SimpleSurface.h +++ b/project/include/renderer/common/SimpleSurface.h @@ -5,7 +5,7 @@ #include "renderer/common/Surface.h" -namespace nme { +namespace lime { class SimpleSurface : public Surface { diff --git a/project/include/renderer/common/Surface.h b/project/include/renderer/common/Surface.h index cc53e795a..03673f6ec 100644 --- a/project/include/renderer/common/Surface.h +++ b/project/include/renderer/common/Surface.h @@ -9,7 +9,7 @@ #include "renderer/common/HardwareContext.h" -namespace nme { +namespace lime { void HintColourOrder (bool inRedFirst); @@ -65,7 +65,7 @@ namespace nme { void Bind (HardwareContext &inHardware, int inSlot = 0); int BytesPP () const { return Format () == pfAlpha ? 1 : 4; } - bool Encode (nme::ByteArray *outBytes, bool inPNG, double inQuality); + bool Encode (lime::ByteArray *outBytes, bool inPNG, double inQuality); Texture *GetOrCreateTexture (HardwareContext &inHardware); Texture *GetTexture () { return mTexture; } Surface *IncRef () { mRefCount++; return this; } diff --git a/project/include/renderer/common/Texture.h b/project/include/renderer/common/Texture.h index e41919d34..527140d09 100644 --- a/project/include/renderer/common/Texture.h +++ b/project/include/renderer/common/Texture.h @@ -2,7 +2,7 @@ #define RENDERER_TEXTURE_H -namespace nme { +namespace lime { extern int gTextureContextVersion; diff --git a/project/include/renderer/opengl/Egl.h b/project/include/renderer/opengl/Egl.h index 73d9a511e..a42c7547b 100644 --- a/project/include/renderer/opengl/Egl.h +++ b/project/include/renderer/opengl/Egl.h @@ -1,10 +1,10 @@ -#ifndef NME_OPENGL_EGL -#define NME_OPENGL_EGL +#ifndef LIME_OPENGL_EGL +#define LIME_OPENGL_EGL -void nmeEGLDestroy(); -void nmeEGLSwapBuffers(); -bool nmeEGLResize(void *inX11Window, int &ioWidth, int &ioHeight); -bool nmeEGLCreate(void *inX11Window, int &ioWidth, int &ioHeight, +void limeEGLDestroy(); +void limeEGLSwapBuffers(); +bool limeEGLResize(void *inX11Window, int &ioWidth, int &ioHeight); +bool limeEGLCreate(void *inX11Window, int &ioWidth, int &ioHeight, int inOGLESVersion, int inDepthBits, int inStencilBits, diff --git a/project/include/renderer/opengl/OGL.h b/project/include/renderer/opengl/OGL.h index c54e42eda..8048b4f41 100644 --- a/project/include/renderer/opengl/OGL.h +++ b/project/include/renderer/opengl/OGL.h @@ -3,9 +3,9 @@ #if defined(BLACKBERRY) || defined(ANDROID) || defined(WEBOS) || defined(GPH) || defined(RASPBERRYPI) || defined(EMSCRIPTEN) -#define NME_GLES +#define LIME_GLES -#ifdef NME_FORCE_GLES1 +#ifdef LIME_FORCE_GLES1 #include #include @@ -15,7 +15,7 @@ #include #include #define ALLOW_OGL2 -#define NME_FORCE_GLES2 +#define LIME_FORCE_GLES2 #endif @@ -29,9 +29,9 @@ using namespace Tizen::Graphics::Opengl; //#include //#define ALLOW_OGL2 -//#define NME_FORCE_GLES2 -#define NME_FORCE_GLES1 -#define NME_GLES +//#define LIME_FORCE_GLES2 +#define LIME_FORCE_GLES1 +#define LIME_GLES #elif defined(IPHONE) @@ -43,7 +43,7 @@ using namespace Tizen::Graphics::Opengl; //typedef CAEAGLLayer *WinDC; //typedef EAGLContext *GLCtx; -#define NME_GLES +#define LIME_GLES #elif !defined(HX_WINDOWS) @@ -178,7 +178,7 @@ typedef void *GLCtx; #ifdef GPH -#define NME_DITHER +#define LIME_DITHER #endif #include @@ -195,7 +195,7 @@ typedef void *GLCtx; #undef DECLARE_EXTENSION #endif -namespace nme +namespace lime { Texture *OGLCreateTexture(Surface *inSurface,unsigned int inFlags); @@ -241,7 +241,7 @@ public: void InitOGL2Extensions(); -} // end namespace nme +} // end namespace lime #endif // INCLUDED_OGL_H diff --git a/project/include/renderer/opengl/OpenGL2Context.h b/project/include/renderer/opengl/OpenGL2Context.h index 15585b484..cc0602331 100644 --- a/project/include/renderer/opengl/OpenGL2Context.h +++ b/project/include/renderer/opengl/OpenGL2Context.h @@ -5,7 +5,7 @@ #include "OpenGLContext.h" -namespace nme { +namespace lime { class OpenGL2Context : public OpenGLContext { diff --git a/project/include/renderer/opengl/OpenGLContext.h b/project/include/renderer/opengl/OpenGLContext.h index dbcc4b0a2..55d86f731 100644 --- a/project/include/renderer/opengl/OpenGLContext.h +++ b/project/include/renderer/opengl/OpenGLContext.h @@ -2,12 +2,12 @@ #define RENDERER_OPENGL_CONTEXT_H -#include +#include #include "renderer/opengl/OGL.h" #include "renderer/common/HardwareContext.h" -namespace nme { +namespace lime { class OpenGLContext : public HardwareContext { diff --git a/project/include/renderer/opengl/OpenGLProgram.h b/project/include/renderer/opengl/OpenGLProgram.h index 27aefb975..a51228aec 100644 --- a/project/include/renderer/opengl/OpenGLProgram.h +++ b/project/include/renderer/opengl/OpenGLProgram.h @@ -5,7 +5,7 @@ #include "renderer/opengl/OGL.h" -namespace nme { +namespace lime { class OpenGLProgram : public GPUProg { diff --git a/project/include/renderer/opengl/OpenGLTexture.h b/project/include/renderer/opengl/OpenGLTexture.h index e1dff443f..c09476bfd 100644 --- a/project/include/renderer/opengl/OpenGLTexture.h +++ b/project/include/renderer/opengl/OpenGLTexture.h @@ -6,7 +6,7 @@ #include "renderer/common/Texture.h" -namespace nme { +namespace lime { class OpenGLTexture : public Texture { diff --git a/project/src/backend/directfb/DirectFBHardware.cpp b/project/src/backend/directfb/DirectFBHardware.cpp index fcdb1aed9..889671595 100644 --- a/project/src/backend/directfb/DirectFBHardware.cpp +++ b/project/src/backend/directfb/DirectFBHardware.cpp @@ -4,7 +4,7 @@ #include -namespace nme +namespace lime { @@ -687,4 +687,4 @@ bool HardwareContext::Hits(const RenderState &inState, const HardwareCalls &inCa -} // end namespace nme +} // end namespace lime diff --git a/project/src/backend/directfb/DirectFBKeyInputEventConvert.cpp b/project/src/backend/directfb/DirectFBKeyInputEventConvert.cpp index 7b02d6ca7..04b4dcc19 100644 --- a/project/src/backend/directfb/DirectFBKeyInputEventConvert.cpp +++ b/project/src/backend/directfb/DirectFBKeyInputEventConvert.cpp @@ -7,7 +7,7 @@ bool DirectFBKeyInputEventConvert(const DFBInputEvent &src, Event &dest) // the 'left' version bool left = true; - // First set the NME Event's value to the key id + // First set the lime Event's value to the key id // Handle a - z if ((src.key_id >= DIKI_A) && (src.key_id <= DIKI_Z)) { @@ -57,7 +57,7 @@ bool DirectFBKeyInputEventConvert(const DFBInputEvent &src, Event &dest) break; case DIKI_NUM_LOCK: case DIKI_SCROLL_LOCK: - // Unknown to NME + // Unknown to lime return false; case DIKI_ESCAPE: dest.value = keyESCAPE; @@ -106,7 +106,7 @@ bool DirectFBKeyInputEventConvert(const DFBInputEvent &src, Event &dest) break; case DIKI_PRINT: case DIKI_PAUSE: - // Unknown to NME + // Unknown to lime return false; case DIKI_QUOTE_LEFT: /* TLDE */ dest.value = keyQUOTE; @@ -142,7 +142,7 @@ bool DirectFBKeyInputEventConvert(const DFBInputEvent &src, Event &dest) dest.value = keySLASH; break; case DIKI_LESS_SIGN: /* 103rd */ - // Unknown to NME + // Unknown to lime return false; case DIKI_KP_DIV: dest.value = keyNUMPAD_DIVIDE; @@ -171,7 +171,7 @@ bool DirectFBKeyInputEventConvert(const DFBInputEvent &src, Event &dest) case DIKI_KP_F4: case DIKI_KP_EQUAL: case DIKI_KP_SEPARATOR: - // Unknown to NME + // Unknown to lime return false; case DIKI_KP_DECIMAL: dest.value = keyNUMPAD_DECIMAL; @@ -198,7 +198,7 @@ bool DirectFBKeyInputEventConvert(const DFBInputEvent &src, Event &dest) dest.flags |= efCommandDown; } - // Finally set the NME Event's code to the "symbol" + // Finally set the lime Event's code to the "symbol" dest.code = src.key_symbol; return true; diff --git a/project/src/backend/directfb/DirectFBStage.cpp b/project/src/backend/directfb/DirectFBStage.cpp index e0bbc86ea..39301bd09 100644 --- a/project/src/backend/directfb/DirectFBStage.cpp +++ b/project/src/backend/directfb/DirectFBStage.cpp @@ -6,7 +6,7 @@ #include -namespace nme +namespace lime { diff --git a/project/src/backend/glfw/GLFWStage.cpp b/project/src/backend/glfw/GLFWStage.cpp index cd6a9cd21..65dd6d127 100644 --- a/project/src/backend/glfw/GLFWStage.cpp +++ b/project/src/backend/glfw/GLFWStage.cpp @@ -5,7 +5,7 @@ #include "renderer/common/HardwareContext.h" #include -namespace nme +namespace lime { class GLFWFrame; diff --git a/project/src/backend/sdl/SDLSound.cpp b/project/src/backend/sdl/SDLSound.cpp index 04b41c0e2..c2f0f402e 100644 --- a/project/src/backend/sdl/SDLSound.cpp +++ b/project/src/backend/sdl/SDLSound.cpp @@ -6,7 +6,7 @@ #include -namespace nme +namespace lime { bool gSDLIsInit = false; diff --git a/project/src/backend/sdl/SDLStage.cpp b/project/src/backend/sdl/SDLStage.cpp index b5270e016..add5bd687 100644 --- a/project/src/backend/sdl/SDLStage.cpp +++ b/project/src/backend/sdl/SDLStage.cpp @@ -28,7 +28,7 @@ #include #endif -#ifdef NME_MIXER +#ifdef LIME_MIXER #include #endif @@ -70,7 +70,7 @@ void done_win32() #endif -namespace nme +namespace lime { static int sgDesktopWidth = 0; @@ -371,11 +371,11 @@ public: if(SDL_GetWMInfo(&sysInfo)>0) { void *window = (void *)(size_t)sysInfo.info.x11.window; - nmeEGLResize(window, inWidth, inHeight); + limeEGLResize(window, inWidth, inHeight); } #endif - //nme_resize_id ++; + //lime_resize_id ++; mOpenGLContext->DecRef(); mOpenGLContext = HardwareContext::CreateOpenGL(0, 0, sgIsOGL2); mOpenGLContext->SetWindowSize(inWidth, inHeight); @@ -434,7 +434,7 @@ public: h = mSDLSurface->h; if (mIsOpenGL) { - //nme_resize_id ++; + //lime_resize_id ++; mOpenGLContext->DecRef(); mOpenGLContext = HardwareContext::CreateOpenGL(0, 0, sgIsOGL2); mOpenGLContext->SetWindowSize(w, h); @@ -534,7 +534,7 @@ public: if (mIsOpenGL) { #ifdef RASPBERRYPI - nmeEGLSwapBuffers(); + limeEGLSwapBuffers(); #else SDL_GL_SwapBuffers(); #endif @@ -1056,7 +1056,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame,int inWidth,int inHeight, gSDLIsInit = true; - #ifdef NME_MIXER + #ifdef LIME_MIXER #ifdef WEBOS int chunksize = 256; @@ -1134,12 +1134,12 @@ void CreateMainFrame(FrameCreationCallback inOnFrame,int inWidth,int inHeight, sgIsOGL2 = false; #ifdef RASPBERRYPI - bool nmeEgl = true; + bool limeEgl = true; #else - bool nmeEgl = false; + bool limeEgl = false; #endif - if (opengl && !nmeEgl) + if (opengl && !limeEgl) { int aa_tries = (inFlags & wfHW_AA) ? ( (inFlags & wfHW_AA_HIRES) ? 2 : 1 ) : 0; @@ -1161,7 +1161,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame,int inWidth,int inHeight, int oglLevelPasses = 1; - #if !defined(NME_FORCE_GLES1) && (defined(WEBOS) || defined(BLACKBERRY) || defined(EMSCRIPTEN)) + #if !defined(LIME_FORCE_GLES1) && (defined(WEBOS) || defined(BLACKBERRY) || defined(EMSCRIPTEN)) // Try 2 then 1 ? if ( (inFlags & wfAllowShaders) && !(inFlags & wfRequireShaders) ) oglLevelPasses = 2; @@ -1171,7 +1171,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame,int inWidth,int inHeight, for(int oglPass = 0; oglPass< oglLevelPasses && !is_opengl; oglPass++) { - #ifdef NME_FORCE_GLES1 + #ifdef LIME_FORCE_GLES1 int level = 1; #else int level = (inFlags & wfRequireShaders) ? 2 : (inFlags & wfAllowShaders) ? 2-oglPass : 1; @@ -1240,7 +1240,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame,int inWidth,int inHeight, if (!screen) { - if (!opengl || !nmeEgl) + if (!opengl || !limeEgl) sdl_flags |= SDL_DOUBLEBUF; screen = SDL_SetVideoMode( use_w, use_h, 32, sdl_flags ); @@ -1260,7 +1260,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame,int inWidth,int inHeight, use_w = screen->w; use_h = screen->h; - bool ok = nmeEGLCreate( 0, use_w, use_h, + bool ok = limeEGLCreate( 0, use_w, use_h, sgIsOGL2, (inFlags & wfDepthBuffer) ? 16 : 0, (inFlags & wfStencilBuffer) ? 8 : 0, @@ -1403,7 +1403,7 @@ void ResumeAnimation() {} void StopAnimation() { - #ifdef NME_MIXER + #ifdef LIME_MIXER Mix_CloseAudio(); #endif #ifdef WEBOS @@ -1524,7 +1524,7 @@ Frame *CreateTopLevelWindow(int inWidth,int inHeight,unsigned int inFlags, wchar */ -} // end namespace nme +} // end namespace lime #if 0 @@ -1578,7 +1578,7 @@ Frame *CreateTopLevelWindow(int inWidth,int inHeight,unsigned int inFlags, wchar -value nme_get_mouse_position() +value lime_get_mouse_position() { int x,y; diff --git a/project/src/backend/sdl2/SDL2Stage.cpp b/project/src/backend/sdl2/SDL2Stage.cpp index dd217cbcc..9c3066e1b 100644 --- a/project/src/backend/sdl2/SDL2Stage.cpp +++ b/project/src/backend/sdl2/SDL2Stage.cpp @@ -8,12 +8,12 @@ #include #include -#ifdef NME_MIXER +#ifdef LIME_MIXER #include #endif -namespace nme +namespace lime { @@ -385,7 +385,7 @@ public: if (mIsOpenGL) { #ifdef RASPBERRYPI - nmeEGLSwapBuffers(); + limeEGLSwapBuffers(); #else SDL_RenderPresent(mSDLRenderer); #endif @@ -985,7 +985,7 @@ void ProcessEvent(SDL_Event &inEvent) } case SDL_MOUSEWHEEL: { - //previous behavior in nme was 3 for down, 4 for up + //previous behavior in lime was 3 for down, 4 for up int event_dir = (inEvent.wheel.y > 0) ? 3 : 4; //space to get the current mouse position, to make sure the values are sane int _x = 0; @@ -1095,7 +1095,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame, int inWidth, int inHeight, //SDL_EnableKeyRepeat(500,30); //gSDLIsInit = true; - #ifdef NME_MIXER + #ifdef LIME_MIXER #ifdef HX_WINDOWS int chunksize = 2048; #else @@ -1218,12 +1218,12 @@ void CreateMainFrame(FrameCreationCallback inOnFrame, int inWidth, int inHeight, sgIsOGL2 = false; #ifdef RASPBERRYPI - bool nmeEgl = true; + bool limeEgl = true; #else - bool nmeEgl = false; + bool limeEgl = false; #endif - if (opengl && !nmeEgl) + if (opengl && !limeEgl) { int aa_tries = (inFlags & wfHW_AA) ? ( (inFlags & wfHW_AA_HIRES) ? 2 : 1 ) : 0; @@ -1245,7 +1245,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame, int inWidth, int inHeight, int oglLevelPasses = 1; - #if !defined(NME_FORCE_GLES1) && (defined(WEBOS) || defined(BLACKBERRY) || defined(EMSCRIPTEN)) + #if !defined(LIME_FORCE_GLES1) && (defined(WEBOS) || defined(BLACKBERRY) || defined(EMSCRIPTEN)) // Try 2 then 1 ? if ( (inFlags & wfAllowShaders) && !(inFlags & wfRequireShaders) ) oglLevelPasses = 2; @@ -1255,7 +1255,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame, int inWidth, int inHeight, for(int oglPass = 0; oglPass< oglLevelPasses && !is_opengl; oglPass++) { - #ifdef NME_FORCE_GLES1 + #ifdef LIME_FORCE_GLES1 int level = 1; #else int level = (inFlags & wfRequireShaders) ? 2 : (inFlags & wfAllowShaders) ? 2-oglPass : 1; @@ -1325,7 +1325,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame, int inWidth, int inHeight, if (!screen) { - if (!opengl || !nmeEgl) + if (!opengl || !limeEgl) sdl_flags |= SDL_DOUBLEBUF; //screen = SDL_SetVideoMode( use_w, use_h, 32, sdl_flags ); @@ -1346,7 +1346,7 @@ void CreateMainFrame(FrameCreationCallback inOnFrame, int inWidth, int inHeight, use_w = screen->w; use_h = screen->h; - bool ok = nmeEGLCreate( 0, use_w, use_h, + bool ok = limeEGLCreate( 0, use_w, use_h, sgIsOGL2, (inFlags & wfDepthBuffer) ? 16 : 0, (inFlags & wfStencilBuffer) ? 8 : 0, @@ -1439,7 +1439,7 @@ void ResumeAnimation() {} void StopAnimation() { - #ifdef NME_MIXER + #ifdef LIME_MIXER Mix_CloseAudio(); #endif sgDead = true; diff --git a/project/src/common/Audio.cpp b/project/src/common/Audio.cpp index c5125d48d..4d64619fa 100644 --- a/project/src/common/Audio.cpp +++ b/project/src/common/Audio.cpp @@ -8,7 +8,7 @@ //The audio interface is to embed functions which are to be implemented in //the platform specific layers. -namespace nme +namespace lime { namespace Audio { diff --git a/project/src/common/CURL.cpp b/project/src/common/CURL.cpp index 09ef01377..bdd5274c3 100644 --- a/project/src/common/CURL.cpp +++ b/project/src/common/CURL.cpp @@ -15,7 +15,7 @@ * HTTP redirects */ -namespace nme +namespace lime { @@ -367,7 +367,7 @@ extern "C" extern get_file_callback_func get_file_callback; } -#if (defined(HX_MACOS) || defined(ANDROID) ) && defined(NME_CURL_SSL) +#if (defined(HX_MACOS) || defined(ANDROID) ) && defined(LIME_CURL_SSL) #define TRY_GET_FILE #endif diff --git a/project/src/common/CachedExtent.cpp b/project/src/common/CachedExtent.cpp index 7b8b375c2..842aa356d 100644 --- a/project/src/common/CachedExtent.cpp +++ b/project/src/common/CachedExtent.cpp @@ -1,6 +1,6 @@ #include -namespace nme +namespace lime { int gCachedExtentID = 1; @@ -86,5 +86,5 @@ bool CachedExtentRenderer::GetExtent(const Transform &inTransform,Extent2DF &ioE return true; } -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/ColorTransform.cpp b/project/src/common/ColorTransform.cpp index 39b6a1a7e..e41a80019 100644 --- a/project/src/common/ColorTransform.cpp +++ b/project/src/common/ColorTransform.cpp @@ -1,7 +1,7 @@ #include #include -namespace nme +namespace lime { static void CombineCol(double &outMultiplier, double &outOff, double inPMultiplier, double inPOff, @@ -146,5 +146,5 @@ const uint8 *ColorTransform::GetC2LUT() const } -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/Cursors.cpp b/project/src/common/Cursors.cpp index b8b653146..ca4dbc86d 100644 --- a/project/src/common/Cursors.cpp +++ b/project/src/common/Cursors.cpp @@ -1,5 +1,5 @@ -namespace nme +namespace lime { const char *sTextCursorData[] = { @@ -77,4 +77,4 @@ const char *sHandCursorData[] = { -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/Display.cpp b/project/src/common/Display.cpp index 53bfd6ff9..9b20b258e 100644 --- a/project/src/common/Display.cpp +++ b/project/src/common/Display.cpp @@ -13,7 +13,7 @@ #include #endif -namespace nme +namespace lime { unsigned int gDisplayRefCounting = drDisplayChildRefs; @@ -2013,5 +2013,5 @@ DisplayObject *Stage::HitTest(UserPoint inStage,DisplayObject *inRoot,bool inRec return state.mHitResult; } -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/ExternalInterface.cpp b/project/src/common/ExternalInterface.cpp index 2d7a86bbe..cae25f284 100644 --- a/project/src/common/ExternalInterface.cpp +++ b/project/src/common/ExternalInterface.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include @@ -39,7 +39,7 @@ #endif -namespace nme +namespace lime { static int _id_type; @@ -587,7 +587,7 @@ void FromValue(value obj, URLRequest &request) } #define DO_PROP_READ(Obj,obj_prefix,prop,Prop,to_val) \ -value nme_##obj_prefix##_get_##prop(value inObj) \ +value lime_##obj_prefix##_get_##prop(value inObj) \ { \ Obj *obj; \ if (AbstractToObject(inObj,obj)) \ @@ -595,11 +595,11 @@ value nme_##obj_prefix##_get_##prop(value inObj) \ return alloc_float(0); \ } \ \ -DEFINE_PRIM(nme_##obj_prefix##_get_##prop,1) +DEFINE_PRIM(lime_##obj_prefix##_get_##prop,1) #define DO_PROP(Obj,obj_prefix,prop,Prop,to_val,from_val) \ DO_PROP_READ(Obj,obj_prefix,prop,Prop,to_val) \ -value nme_##obj_prefix##_set_##prop(value inObj,value inVal) \ +value lime_##obj_prefix##_set_##prop(value inObj,value inVal) \ { \ Obj *obj; \ if (AbstractToObject(inObj,obj)) \ @@ -607,7 +607,7 @@ value nme_##obj_prefix##_set_##prop(value inObj,value inVal) \ return alloc_null(); \ } \ \ -DEFINE_PRIM(nme_##obj_prefix##_set_##prop,2) +DEFINE_PRIM(lime_##obj_prefix##_set_##prop,2) #define DO_DISPLAY_PROP(prop,Prop,to_val,from_val) \ @@ -617,22 +617,22 @@ DEFINE_PRIM(nme_##obj_prefix##_set_##prop,2) DO_PROP(Stage,stage,prop,Prop,to_val,from_val) -using namespace nme; +using namespace lime; -value nme_time_stamp() +value lime_time_stamp() { return alloc_float( GetTimeStamp() ); } -DEFINE_PRIM(nme_time_stamp,0); +DEFINE_PRIM(lime_time_stamp,0); -value nme_error_output(value message) +value lime_error_output(value message) { fprintf (stderr, "%s", val_string (message)); return alloc_null(); } -DEFINE_PRIM(nme_error_output,1); +DEFINE_PRIM(lime_error_output,1); @@ -643,7 +643,7 @@ AutoGCRoot *gByteArrayLen = 0; AutoGCRoot *gByteArrayResize = 0; AutoGCRoot *gByteArrayBytes = 0; -value nme_byte_array_init(value inFactory, value inLen, value inResize, value inBytes) +value lime_byte_array_init(value inFactory, value inLen, value inResize, value inBytes) { gByteArrayCreate = new AutoGCRoot(inFactory); gByteArrayLen = new AutoGCRoot(inLen); @@ -651,7 +651,7 @@ value nme_byte_array_init(value inFactory, value inLen, value inResize, value in gByteArrayBytes = new AutoGCRoot(inBytes); return alloc_null(); } -DEFINE_PRIM(nme_byte_array_init,4); +DEFINE_PRIM(lime_byte_array_init,4); ByteArray::ByteArray(int inSize) { @@ -714,7 +714,7 @@ unsigned char *ByteArray::Bytes() // [ddc] -value nme_byte_array_overwrite_file(value inFilename, value inBytes) +value lime_byte_array_overwrite_file(value inFilename, value inBytes) { // file is created if it doesn't exist, // if it exists, it is truncated to zero @@ -738,14 +738,14 @@ value nme_byte_array_overwrite_file(value inFilename, value inBytes) fclose(file); return alloc_null(); } -DEFINE_PRIM(nme_byte_array_overwrite_file,2); +DEFINE_PRIM(lime_byte_array_overwrite_file,2); -value nme_byte_array_read_file(value inFilename) +value lime_byte_array_read_file(value inFilename) { ByteArray result = ByteArray::FromFile(val_os_string(inFilename)); return result.mValue; } -DEFINE_PRIM(nme_byte_array_read_file,1); +DEFINE_PRIM(lime_byte_array_read_file,1); struct ByteData @@ -801,7 +801,7 @@ static void release_weak_ref_holder(value inValue) } } -value nme_weak_ref_create(value inHolder,value inRef) +value lime_weak_ref_create(value inHolder,value inRef) { int id = 0; if (!sFreeRefIDs.empty()) @@ -820,9 +820,9 @@ value nme_weak_ref_create(value inHolder,value inRef) return alloc_int(id); } -DEFINE_PRIM(nme_weak_ref_create,2); +DEFINE_PRIM(lime_weak_ref_create,2); -value nme_weak_ref_get(value inValue) +value lime_weak_ref_get(value inValue) { int id = val_int(inValue); if (sWeakRefs[id].mPtr==0) @@ -833,11 +833,11 @@ value nme_weak_ref_get(value inValue) } return (value)( sWeakRefs[id].mPtr ^ PTR_MANGLE ); } -DEFINE_PRIM(nme_weak_ref_get,1); +DEFINE_PRIM(lime_weak_ref_get,1); -value nme_get_unique_device_identifier() +value lime_get_unique_device_identifier() { #if defined(IPHONE) return alloc_string(GetUniqueDeviceIdentifier().c_str()); @@ -845,11 +845,11 @@ value nme_get_unique_device_identifier() return alloc_null(); #endif } -DEFINE_PRIM(nme_get_unique_device_identifier,0); +DEFINE_PRIM(lime_get_unique_device_identifier,0); -value nme_set_icon( value path ) { +value lime_set_icon( value path ) { //printf( "setting icon\n" ); #if defined( HX_WINDOWS ) || defined( HX_MACOS ) SetIcon( val_string( path ) ); @@ -857,11 +857,11 @@ value nme_set_icon( value path ) { return alloc_null(); } -DEFINE_PRIM(nme_set_icon,1); +DEFINE_PRIM(lime_set_icon,1); -// --- nme.system.Capabilities ----------------------------------------------------- +// --- lime.system.Capabilities ----------------------------------------------------- -value nme_capabilities_get_screen_resolutions () { +value lime_capabilities_get_screen_resolutions () { //Only really makes sense on PC platforms @@ -887,47 +887,47 @@ value nme_capabilities_get_screen_resolutions () { } -DEFINE_PRIM( nme_capabilities_get_screen_resolutions, 0 ); +DEFINE_PRIM( lime_capabilities_get_screen_resolutions, 0 ); -value nme_capabilities_get_pixel_aspect_ratio () { +value lime_capabilities_get_pixel_aspect_ratio () { return alloc_float (CapabilitiesGetPixelAspectRatio ()); } -DEFINE_PRIM (nme_capabilities_get_pixel_aspect_ratio, 0); +DEFINE_PRIM (lime_capabilities_get_pixel_aspect_ratio, 0); -value nme_capabilities_get_screen_dpi () { +value lime_capabilities_get_screen_dpi () { return alloc_float (CapabilitiesGetScreenDPI ()); } -DEFINE_PRIM (nme_capabilities_get_screen_dpi, 0); +DEFINE_PRIM (lime_capabilities_get_screen_dpi, 0); -value nme_capabilities_get_screen_resolution_x () { +value lime_capabilities_get_screen_resolution_x () { return alloc_float (CapabilitiesGetScreenResolutionX ()); } -DEFINE_PRIM (nme_capabilities_get_screen_resolution_x, 0); +DEFINE_PRIM (lime_capabilities_get_screen_resolution_x, 0); -value nme_capabilities_get_screen_resolution_y () { +value lime_capabilities_get_screen_resolution_y () { return alloc_float (CapabilitiesGetScreenResolutionY ()); } -DEFINE_PRIM (nme_capabilities_get_screen_resolution_y, 0); +DEFINE_PRIM (lime_capabilities_get_screen_resolution_y, 0); -value nme_capabilities_get_language() { +value lime_capabilities_get_language() { return alloc_string(CapabilitiesGetLanguage().c_str()); } -DEFINE_PRIM (nme_capabilities_get_language, 0); +DEFINE_PRIM (lime_capabilities_get_language, 0); -// --- nme.filesystem ------------------------------------------------------------- -value nme_get_resource_path() +// --- lime.filesystem ------------------------------------------------------------- +value lime_get_resource_path() { #if defined(IPHONE) return alloc_string(GetResourcePath().c_str()); @@ -935,9 +935,9 @@ value nme_get_resource_path() return alloc_null(); #endif } -DEFINE_PRIM(nme_get_resource_path,0); +DEFINE_PRIM(lime_get_resource_path,0); -value nme_filesystem_get_special_dir(value inWhich) +value lime_filesystem_get_special_dir(value inWhich) { static std::string dirs[DIR_SIZE]; int idx = val_int(inWhich); @@ -947,12 +947,12 @@ value nme_filesystem_get_special_dir(value inWhich) return alloc_string(dirs[idx].c_str()); } -DEFINE_PRIM(nme_filesystem_get_special_dir,1); +DEFINE_PRIM(lime_filesystem_get_special_dir,1); -value nme_filesystem_get_volumes(value outVolumes, value inFactory) +value lime_filesystem_get_volumes(value outVolumes, value inFactory) { std::vector volumes; - nme::GetVolumeInfo(volumes); + lime::GetVolumeInfo(volumes); for(int v=0;vGetStage()); } -DEFINE_PRIM(nme_get_frame_stage,1); +DEFINE_PRIM(lime_get_frame_stage,1); AutoGCRoot *sOnCreateCallback = 0; @@ -1056,7 +1056,7 @@ void OnMainFrameCreated(Frame *inFrame) } -value nme_set_package(value inCompany,value inFile,value inPackage,value inVersion) +value lime_set_package(value inCompany,value inFile,value inPackage,value inVersion) { gCompany = val_string(inCompany); gFile = val_string(inFile); @@ -1064,10 +1064,10 @@ value nme_set_package(value inCompany,value inFile,value inPackage,value inVersi gVersion = val_string(inVersion); return val_null; } -DEFINE_PRIM(nme_set_package,4); +DEFINE_PRIM(lime_set_package,4); -value nme_create_main_frame(value *arg, int nargs) +value lime_create_main_frame(value *arg, int nargs) { if (!sgIDsInit) InitIDs(); @@ -1085,58 +1085,58 @@ value nme_create_main_frame(value *arg, int nargs) return alloc_null(); } -DEFINE_PRIM_MULT(nme_create_main_frame); +DEFINE_PRIM_MULT(lime_create_main_frame); -value nme_set_asset_base(value inBase) +value lime_set_asset_base(value inBase) { gAssetBase = val_string(inBase); return val_null; } -DEFINE_PRIM(nme_set_asset_base,1); +DEFINE_PRIM(lime_set_asset_base,1); -value nme_terminate() +value lime_terminate() { exit(0); return alloc_null(); } -DEFINE_PRIM(nme_terminate,0); +DEFINE_PRIM(lime_terminate,0); -value nme_close( value force ) +value lime_close( value force ) { StopAnimation(); return alloc_null(); } -DEFINE_PRIM(nme_close,0); +DEFINE_PRIM(lime_close,0); -value nme_start_animation() +value lime_start_animation() { StartAnimation(); return alloc_null(); } -DEFINE_PRIM(nme_start_animation,0); +DEFINE_PRIM(lime_start_animation,0); -value nme_pause_animation() +value lime_pause_animation() { PauseAnimation(); return alloc_null(); } -DEFINE_PRIM(nme_pause_animation,0); +DEFINE_PRIM(lime_pause_animation,0); -value nme_resume_animation() +value lime_resume_animation() { ResumeAnimation(); return alloc_null(); } -DEFINE_PRIM(nme_resume_animation,0); +DEFINE_PRIM(lime_resume_animation,0); -value nme_stop_animation() +value lime_stop_animation() { StopAnimation(); return alloc_null(); } -DEFINE_PRIM(nme_stop_animation,0); +DEFINE_PRIM(lime_stop_animation,0); -value nme_stage_set_next_wake(value inStage, value inNextWake) +value lime_stage_set_next_wake(value inStage, value inNextWake) { Stage *stage; @@ -1148,9 +1148,9 @@ value nme_stage_set_next_wake(value inStage, value inNextWake) return alloc_null(); } -DEFINE_PRIM(nme_stage_set_next_wake,2); +DEFINE_PRIM(lime_stage_set_next_wake,2); -void external_handler( nme::Event &ioEvent, void *inUserData ) +void external_handler( lime::Event &ioEvent, void *inUserData ) { AutoGCRoot *handler = (AutoGCRoot *)inUserData; if (ioEvent.type == etDestroyHandler) @@ -1175,7 +1175,7 @@ void external_handler( nme::Event &ioEvent, void *inUserData ) } -value nme_set_stage_handler(value inStage,value inHandler,value inNomWidth, value inNomHeight) +value lime_set_stage_handler(value inStage,value inHandler,value inNomWidth, value inNomHeight) { Stage *stage; if (!AbstractToObject(inStage,stage)) @@ -1189,10 +1189,10 @@ value nme_set_stage_handler(value inStage,value inHandler,value inNomWidth, valu return alloc_null(); } -DEFINE_PRIM(nme_set_stage_handler,4); +DEFINE_PRIM(lime_set_stage_handler,4); -value nme_render_stage(value inStage) +value lime_render_stage(value inStage) { Stage *stage; if (AbstractToObject(inStage,stage)) @@ -1203,10 +1203,10 @@ value nme_render_stage(value inStage) return alloc_null(); } -DEFINE_PRIM(nme_render_stage,1); +DEFINE_PRIM(lime_render_stage,1); -value nme_stage_resize_window(value inStage, value inWidth, value inHeight) +value lime_stage_resize_window(value inStage, value inWidth, value inHeight) { #if (defined(HX_WINDOWS) || defined(HX_MACOS) || defined(HX_LINUX)) Stage *stage; @@ -1217,10 +1217,10 @@ value nme_stage_resize_window(value inStage, value inWidth, value inHeight) #endif return alloc_null(); } -DEFINE_PRIM(nme_stage_resize_window,3); +DEFINE_PRIM(lime_stage_resize_window,3); -value nme_stage_get_focus_id(value inValue) +value lime_stage_get_focus_id(value inValue) { int result = -1; Stage *stage; @@ -1233,9 +1233,9 @@ value nme_stage_get_focus_id(value inValue) return alloc_int(result); } -DEFINE_PRIM(nme_stage_get_focus_id,1); +DEFINE_PRIM(lime_stage_get_focus_id,1); -value nme_stage_set_focus(value inStage,value inObject,value inDirection) +value lime_stage_set_focus(value inStage,value inObject,value inDirection) { Stage *stage; if (AbstractToObject(inStage,stage)) @@ -1246,7 +1246,7 @@ value nme_stage_set_focus(value inStage,value inObject,value inDirection) } return alloc_null(); } -DEFINE_PRIM(nme_stage_set_focus,3); +DEFINE_PRIM(lime_stage_set_focus,3); DO_STAGE_PROP(focus_rect,FocusRect,alloc_bool,val_bool) DO_STAGE_PROP(scale_mode,ScaleMode,alloc_int,val_int) @@ -1260,7 +1260,7 @@ DO_PROP_READ(Stage,stage,dpi_scale,DPIScale,alloc_float); DO_PROP_READ(Stage,stage,multitouch_supported,MultitouchSupported,alloc_bool); -value nme_stage_is_opengl(value inStage) +value lime_stage_is_opengl(value inStage) { Stage *stage; if (AbstractToObject(inStage,stage)) @@ -1269,20 +1269,20 @@ value nme_stage_is_opengl(value inStage) } return alloc_bool(false); } -DEFINE_PRIM(nme_stage_is_opengl,1); +DEFINE_PRIM(lime_stage_is_opengl,1); -namespace nme { void AndroidRequestRender(); } -value nme_stage_request_render() +namespace lime { void AndroidRequestRender(); } +value lime_stage_request_render() { #ifdef ANDROID AndroidRequestRender(); #endif return alloc_null(); } -DEFINE_PRIM(nme_stage_request_render,0); +DEFINE_PRIM(lime_stage_request_render,0); -value nme_stage_show_cursor(value inStage,value inShow) +value lime_stage_show_cursor(value inStage,value inShow) { Stage *stage; if (AbstractToObject(inStage,stage)) @@ -1291,9 +1291,9 @@ value nme_stage_show_cursor(value inStage,value inShow) } return alloc_null(); } -DEFINE_PRIM(nme_stage_show_cursor,2); +DEFINE_PRIM(lime_stage_show_cursor,2); -value nme_stage_constrain_cursor_to_window_frame(value inStage, value inLock) +value lime_stage_constrain_cursor_to_window_frame(value inStage, value inLock) { Stage *stage; if (AbstractToObject(inStage,stage)) { @@ -1302,9 +1302,9 @@ value nme_stage_constrain_cursor_to_window_frame(value inStage, value inLock) } return alloc_null(); } -DEFINE_PRIM(nme_stage_constrain_cursor_to_window_frame,2); +DEFINE_PRIM(lime_stage_constrain_cursor_to_window_frame,2); -value nme_stage_set_cursor_position_in_window( value inStage, value inX, value inY ) +value lime_stage_set_cursor_position_in_window( value inStage, value inX, value inY ) { Stage *stage; if (AbstractToObject(inStage,stage)) @@ -1315,9 +1315,9 @@ value nme_stage_set_cursor_position_in_window( value inStage, value inX, value i } return alloc_null(); } -DEFINE_PRIM(nme_stage_set_cursor_position_in_window,3); +DEFINE_PRIM(lime_stage_set_cursor_position_in_window,3); -value nme_stage_set_window_position( value inStage, value inX, value inY ) { +value lime_stage_set_window_position( value inStage, value inX, value inY ) { Stage *stage; if (AbstractToObject(inStage,stage)) @@ -1328,10 +1328,10 @@ value nme_stage_set_window_position( value inStage, value inX, value inY ) { } return alloc_null(); } -DEFINE_PRIM(nme_stage_set_window_position,3); +DEFINE_PRIM(lime_stage_set_window_position,3); -value nme_stage_get_orientation() { +value lime_stage_get_orientation() { #if defined(IPHONE) || defined(ANDROID) || defined(BLACKBERRY) return alloc_int( GetDeviceOrientation() ); @@ -1344,9 +1344,9 @@ value nme_stage_get_orientation() { } -DEFINE_PRIM (nme_stage_get_orientation, 0); +DEFINE_PRIM (lime_stage_get_orientation, 0); -value nme_stage_get_normal_orientation() { +value lime_stage_get_normal_orientation() { #if defined(ANDROID) return alloc_int( GetNormalOrientation() ); @@ -1357,23 +1357,23 @@ value nme_stage_get_normal_orientation() { #endif } -DEFINE_PRIM (nme_stage_get_normal_orientation, 0); +DEFINE_PRIM (lime_stage_get_normal_orientation, 0); // --- ManagedStage ---------------------------------------------------------------------- #ifndef HX_WINRT -value nme_managed_stage_create(value inW,value inH,value inFlags) +value lime_managed_stage_create(value inW,value inH,value inFlags) { SetMainThread(); ManagedStage *stage = new ManagedStage(val_int(inW),val_int(inH),val_int(inFlags)); return ObjectToAbstract(stage); } -DEFINE_PRIM(nme_managed_stage_create,3); +DEFINE_PRIM(lime_managed_stage_create,3); -value nme_managed_stage_pump_event(value inStage,value inEvent) +value lime_managed_stage_pump_event(value inStage,value inEvent) { ManagedStage *stage; if (AbstractToObject(inStage,stage)) @@ -1384,7 +1384,7 @@ value nme_managed_stage_pump_event(value inStage,value inEvent) } return alloc_null(); } -DEFINE_PRIM(nme_managed_stage_pump_event,2); +DEFINE_PRIM(lime_managed_stage_pump_event,2); #endif @@ -1394,7 +1394,7 @@ DEFINE_PRIM(nme_managed_stage_pump_event,2); // --- Input -------------------------------------------------------------- -value nme_input_get_acceleration() +value lime_input_get_acceleration() { double x,y,z; if (!GetAcceleration(x,y,z)) @@ -1407,19 +1407,19 @@ value nme_input_get_acceleration() return obj; } -DEFINE_PRIM(nme_input_get_acceleration,0); +DEFINE_PRIM(lime_input_get_acceleration,0); // --- DisplayObject -------------------------------------------------------------- -value nme_create_display_object() +value lime_create_display_object() { return ObjectToAbstract( new DisplayObject() ); } -DEFINE_PRIM(nme_create_display_object,0); +DEFINE_PRIM(lime_create_display_object,0); -value nme_display_object_get_graphics(value inObj) +value lime_display_object_get_graphics(value inObj) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1428,9 +1428,9 @@ value nme_display_object_get_graphics(value inObj) return alloc_null(); } -DEFINE_PRIM(nme_display_object_get_graphics,1); +DEFINE_PRIM(lime_display_object_get_graphics,1); -value nme_display_object_draw_to_surface(value *arg,int count) +value lime_display_object_draw_to_surface(value *arg,int count) { enum { aObject, aSurface, aMatrix, aColourTransform, aBlendMode, aClipRect, aSIZE}; @@ -1520,10 +1520,10 @@ value nme_display_object_draw_to_surface(value *arg,int count) return alloc_null(); } -DEFINE_PRIM_MULT(nme_display_object_draw_to_surface) +DEFINE_PRIM_MULT(lime_display_object_draw_to_surface) -value nme_display_object_get_id(value inObj) +value lime_display_object_get_id(value inObj) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1532,9 +1532,9 @@ value nme_display_object_get_id(value inObj) return alloc_null(); } -DEFINE_PRIM(nme_display_object_get_id,1); +DEFINE_PRIM(lime_display_object_get_id,1); -value nme_display_object_global_to_local(value inObj,value ioPoint) +value lime_display_object_global_to_local(value inObj,value ioPoint) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1549,22 +1549,22 @@ value nme_display_object_global_to_local(value inObj,value ioPoint) return alloc_null(); } -DEFINE_PRIM(nme_display_object_global_to_local,2); +DEFINE_PRIM(lime_display_object_global_to_local,2); void print_field(value inObj, int id, void *cookie) { printf("Field : %d (%s)\n",id,val_string(val_field_name(id))); } -value nme_type(value inObj) +value lime_type(value inObj) { val_iter_fields(inObj, print_field, 0); return alloc_null(); } -DEFINE_PRIM(nme_type,1); +DEFINE_PRIM(lime_type,1); -value nme_display_object_local_to_global(value inObj,value ioPoint) +value lime_display_object_local_to_global(value inObj,value ioPoint) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1579,11 +1579,11 @@ value nme_display_object_local_to_global(value inObj,value ioPoint) return alloc_null(); } -DEFINE_PRIM(nme_display_object_local_to_global,2); +DEFINE_PRIM(lime_display_object_local_to_global,2); -value nme_display_object_hit_test_point( +value lime_display_object_hit_test_point( value inObj,value inX, value inY, value inShape, value inRecurse) { DisplayObject *obj; @@ -1614,10 +1614,10 @@ value nme_display_object_hit_test_point( return alloc_null(); } -DEFINE_PRIM(nme_display_object_hit_test_point,5); +DEFINE_PRIM(lime_display_object_hit_test_point,5); -value nme_display_object_set_filters(value inObj,value inFilters) +value lime_display_object_set_filters(value inObj,value inFilters) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1640,9 +1640,9 @@ value nme_display_object_set_filters(value inObj,value inFilters) return alloc_null(); } -DEFINE_PRIM(nme_display_object_set_filters,2); +DEFINE_PRIM(lime_display_object_set_filters,2); -value nme_display_object_set_scale9_grid(value inObj,value inRect) +value lime_display_object_set_scale9_grid(value inObj,value inRect) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1658,9 +1658,9 @@ value nme_display_object_set_scale9_grid(value inObj,value inRect) } return alloc_null(); } -DEFINE_PRIM(nme_display_object_set_scale9_grid,2); +DEFINE_PRIM(lime_display_object_set_scale9_grid,2); -value nme_display_object_set_scroll_rect(value inObj,value inRect) +value lime_display_object_set_scroll_rect(value inObj,value inRect) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1676,9 +1676,9 @@ value nme_display_object_set_scroll_rect(value inObj,value inRect) } return alloc_null(); } -DEFINE_PRIM(nme_display_object_set_scroll_rect,2); +DEFINE_PRIM(lime_display_object_set_scroll_rect,2); -value nme_display_object_set_mask(value inObj,value inMask) +value lime_display_object_set_mask(value inObj,value inMask) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1689,10 +1689,10 @@ value nme_display_object_set_mask(value inObj,value inMask) } return alloc_null(); } -DEFINE_PRIM(nme_display_object_set_mask,2); +DEFINE_PRIM(lime_display_object_set_mask,2); -value nme_display_object_set_matrix(value inObj,value inMatrix) +value lime_display_object_set_matrix(value inObj,value inMatrix) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1704,9 +1704,9 @@ value nme_display_object_set_matrix(value inObj,value inMatrix) } return alloc_null(); } -DEFINE_PRIM(nme_display_object_set_matrix,2); +DEFINE_PRIM(lime_display_object_set_matrix,2); -value nme_display_object_get_matrix(value inObj,value outMatrix, value inFull) +value lime_display_object_get_matrix(value inObj,value outMatrix, value inFull) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1717,9 +1717,9 @@ value nme_display_object_get_matrix(value inObj,value outMatrix, value inFull) return alloc_null(); } -DEFINE_PRIM(nme_display_object_get_matrix,3); +DEFINE_PRIM(lime_display_object_get_matrix,3); -value nme_display_object_set_color_transform(value inObj,value inTrans) +value lime_display_object_set_color_transform(value inObj,value inTrans) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1731,9 +1731,9 @@ value nme_display_object_set_color_transform(value inObj,value inTrans) } return alloc_null(); } -DEFINE_PRIM(nme_display_object_set_color_transform,2); +DEFINE_PRIM(lime_display_object_set_color_transform,2); -value nme_display_object_get_color_transform(value inObj,value outTrans, value inFull) +value lime_display_object_get_color_transform(value inObj,value outTrans, value inFull) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1745,15 +1745,15 @@ value nme_display_object_get_color_transform(value inObj,value outTrans, value i return alloc_null(); } -DEFINE_PRIM(nme_display_object_get_color_transform,3); +DEFINE_PRIM(lime_display_object_get_color_transform,3); -value nme_display_object_get_pixel_bounds(value inObj,value outBounds) +value lime_display_object_get_pixel_bounds(value inObj,value outBounds) { return alloc_null(); } -DEFINE_PRIM(nme_display_object_get_pixel_bounds,2); +DEFINE_PRIM(lime_display_object_get_pixel_bounds,2); -value nme_display_object_get_bounds(value inObj, value inTarget, value outBounds, value inIncludeStroke) +value lime_display_object_get_bounds(value inObj, value inTarget, value outBounds, value inIncludeStroke) { DisplayObject *obj; DisplayObject *target; @@ -1777,10 +1777,10 @@ value nme_display_object_get_bounds(value inObj, value inTarget, value outBounds } return alloc_null(); } -DEFINE_PRIM(nme_display_object_get_bounds,4); +DEFINE_PRIM(lime_display_object_get_bounds,4); -value nme_display_object_request_soft_keyboard(value inObj) +value lime_display_object_request_soft_keyboard(value inObj) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1796,10 +1796,10 @@ value nme_display_object_request_soft_keyboard(value inObj) return alloc_bool(false); } -DEFINE_PRIM(nme_display_object_request_soft_keyboard,1); +DEFINE_PRIM(lime_display_object_request_soft_keyboard,1); -value nme_display_object_dismiss_soft_keyboard(value inObj) +value lime_display_object_dismiss_soft_keyboard(value inObj) { DisplayObject *obj; if (AbstractToObject(inObj,obj)) @@ -1815,7 +1815,7 @@ value nme_display_object_dismiss_soft_keyboard(value inObj) return alloc_bool(false); } -DEFINE_PRIM(nme_display_object_dismiss_soft_keyboard,1); +DEFINE_PRIM(lime_display_object_dismiss_soft_keyboard,1); DO_DISPLAY_PROP(x,X,alloc_float,val_number) @@ -1852,13 +1852,13 @@ void onDirectRender(void *inHandle,const Rect &inRect, const Transform &inTransf } } -value nme_direct_renderer_create() +value lime_direct_renderer_create() { return ObjectToAbstract( new DirectRenderer(onDirectRender) ); } -DEFINE_PRIM(nme_direct_renderer_create,0); +DEFINE_PRIM(lime_direct_renderer_create,0); -value nme_direct_renderer_set(value inRenderer, value inCallback) +value lime_direct_renderer_set(value inRenderer, value inCallback) { DirectRenderer *renderer = 0; @@ -1889,17 +1889,17 @@ value nme_direct_renderer_set(value inRenderer, value inCallback) return alloc_null(); } -DEFINE_PRIM(nme_direct_renderer_set,2); +DEFINE_PRIM(lime_direct_renderer_set,2); // --- SimpleButton ----------------------------------------------------- -value nme_simple_button_create() +value lime_simple_button_create() { return ObjectToAbstract( new SimpleButton() ); } -DEFINE_PRIM(nme_simple_button_create,0); +DEFINE_PRIM(lime_simple_button_create,0); -value nme_simple_button_set_state(value inButton, value inState, value inObject) +value lime_simple_button_set_state(value inButton, value inState, value inObject) { SimpleButton *button = 0; @@ -1912,7 +1912,7 @@ value nme_simple_button_set_state(value inButton, value inState, value inObject) return alloc_null(); } -DEFINE_PRIM(nme_simple_button_set_state,3); +DEFINE_PRIM(lime_simple_button_set_state,3); @@ -1922,14 +1922,14 @@ DO_PROP(SimpleButton,simple_button,hand_cursor,UseHandCursor,alloc_bool,val_bool // --- DisplayObjectContainer ----------------------------------------------------- -value nme_create_display_object_container() +value lime_create_display_object_container() { return ObjectToAbstract( new DisplayObjectContainer() ); } -DEFINE_PRIM(nme_create_display_object_container,0); +DEFINE_PRIM(lime_create_display_object_container,0); -value nme_doc_add_child(value inParent, value inChild) +value lime_doc_add_child(value inParent, value inChild) { DisplayObjectContainer *parent; DisplayObject *child; @@ -1939,10 +1939,10 @@ value nme_doc_add_child(value inParent, value inChild) } return alloc_null(); } -DEFINE_PRIM(nme_doc_add_child,2); +DEFINE_PRIM(lime_doc_add_child,2); -value nme_doc_swap_children(value inParent, value inChild0, value inChild1) +value lime_doc_swap_children(value inParent, value inChild0, value inChild1) { DisplayObjectContainer *parent; if (AbstractToObject(inParent,parent)) @@ -1951,10 +1951,10 @@ value nme_doc_swap_children(value inParent, value inChild0, value inChild1) } return alloc_null(); } -DEFINE_PRIM(nme_doc_swap_children,3); +DEFINE_PRIM(lime_doc_swap_children,3); -value nme_doc_remove_child(value inParent, value inPos) +value lime_doc_remove_child(value inParent, value inPos) { DisplayObjectContainer *parent; if (AbstractToObject(inParent,parent)) @@ -1963,9 +1963,9 @@ value nme_doc_remove_child(value inParent, value inPos) } return alloc_null(); } -DEFINE_PRIM(nme_doc_remove_child,2); +DEFINE_PRIM(lime_doc_remove_child,2); -value nme_doc_set_child_index(value inParent, value inChild, value inPos) +value lime_doc_set_child_index(value inParent, value inChild, value inPos) { DisplayObjectContainer *parent; DisplayObject *child; @@ -1975,7 +1975,7 @@ value nme_doc_set_child_index(value inParent, value inChild, value inPos) } return alloc_null(); } -DEFINE_PRIM(nme_doc_set_child_index,3); +DEFINE_PRIM(lime_doc_set_child_index,3); DO_PROP(DisplayObjectContainer,doc,mouse_children,MouseChildren,alloc_bool,val_bool); @@ -1985,7 +1985,7 @@ DO_PROP(DisplayObjectContainer,doc,mouse_children,MouseChildren,alloc_bool,val_b AutoGCRoot *sExternalInterfaceHandler = 0; -value nme_external_interface_add_callback (value inFunctionName, value inClosure) +value lime_external_interface_add_callback (value inFunctionName, value inClosure) { #ifdef WEBOS if (sExternalInterfaceHandler == 0) { @@ -1995,9 +1995,9 @@ value nme_external_interface_add_callback (value inFunctionName, value inClosure #endif return alloc_null(); } -DEFINE_PRIM(nme_external_interface_add_callback,2); +DEFINE_PRIM(lime_external_interface_add_callback,2); -value nme_external_interface_available () +value lime_external_interface_available () { #ifdef WEBOS return alloc_bool(true); @@ -2005,9 +2005,9 @@ value nme_external_interface_available () return alloc_bool(false); #endif } -DEFINE_PRIM(nme_external_interface_available,0); +DEFINE_PRIM(lime_external_interface_available,0); -value nme_external_interface_call (value inFunctionName, value args) +value lime_external_interface_call (value inFunctionName, value args) { #ifdef WEBOS int n = val_array_size(args); @@ -2019,30 +2019,30 @@ value nme_external_interface_call (value inFunctionName, value args) #endif return alloc_null(); } -DEFINE_PRIM(nme_external_interface_call,2); +DEFINE_PRIM(lime_external_interface_call,2); -value nme_external_interface_register_callbacks () +value lime_external_interface_register_callbacks () { #ifdef WEBOS ExternalInterface_RegisterCallbacks (); #endif return alloc_null(); } -DEFINE_PRIM(nme_external_interface_register_callbacks,0); +DEFINE_PRIM(lime_external_interface_register_callbacks,0); // --- Graphics ----------------------------------------------------- -value nme_gfx_clear(value inGfx) +value lime_gfx_clear(value inGfx) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) gfx->clear(); return alloc_null(); } -DEFINE_PRIM(nme_gfx_clear,1); +DEFINE_PRIM(lime_gfx_clear,1); -value nme_gfx_begin_fill(value inGfx,value inColour, value inAlpha) +value lime_gfx_begin_fill(value inGfx,value inColour, value inAlpha) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2052,10 +2052,10 @@ value nme_gfx_begin_fill(value inGfx,value inColour, value inAlpha) return alloc_null(); } -DEFINE_PRIM(nme_gfx_begin_fill,3); +DEFINE_PRIM(lime_gfx_begin_fill,3); -void nme_gfx_begin_set_bitmap_fill(value inGfx,value inBMP, value inMatrix, +void lime_gfx_begin_set_bitmap_fill(value inGfx,value inBMP, value inMatrix, value inRepeat, value inSmooth, bool inForSolid) { Graphics *gfx; @@ -2073,25 +2073,25 @@ void nme_gfx_begin_set_bitmap_fill(value inGfx,value inBMP, value inMatrix, } } -value nme_gfx_begin_bitmap_fill(value inGfx,value inBMP, value inMatrix, +value lime_gfx_begin_bitmap_fill(value inGfx,value inBMP, value inMatrix, value inRepeat, value inSmooth) { - nme_gfx_begin_set_bitmap_fill(inGfx,inBMP,inMatrix,inRepeat,inSmooth,true); + lime_gfx_begin_set_bitmap_fill(inGfx,inBMP,inMatrix,inRepeat,inSmooth,true); return alloc_null(); } -DEFINE_PRIM(nme_gfx_begin_bitmap_fill,5); +DEFINE_PRIM(lime_gfx_begin_bitmap_fill,5); -value nme_gfx_line_bitmap_fill(value inGfx,value inBMP, value inMatrix, +value lime_gfx_line_bitmap_fill(value inGfx,value inBMP, value inMatrix, value inRepeat, value inSmooth) { - nme_gfx_begin_set_bitmap_fill(inGfx,inBMP,inMatrix,inRepeat,inSmooth,false); + lime_gfx_begin_set_bitmap_fill(inGfx,inBMP,inMatrix,inRepeat,inSmooth,false); return alloc_null(); } -DEFINE_PRIM(nme_gfx_line_bitmap_fill,5); +DEFINE_PRIM(lime_gfx_line_bitmap_fill,5); -void nme_gfx_begin_set_gradient_fill(value *arg, int args, bool inForSolid) +void lime_gfx_begin_set_gradient_fill(value *arg, int args, bool inForSolid) { enum { aGfx, aType, aColors, aAlphas, aRatios, aMatrix, aSpreadMethod, aInterpMethod, aFocal, aSIZE }; @@ -2120,33 +2120,33 @@ void nme_gfx_begin_set_gradient_fill(value *arg, int args, bool inForSolid) } } -value nme_gfx_begin_gradient_fill(value *arg, int args) +value lime_gfx_begin_gradient_fill(value *arg, int args) { - nme_gfx_begin_set_gradient_fill(arg,args, true); + lime_gfx_begin_set_gradient_fill(arg,args, true); return alloc_null(); } -DEFINE_PRIM_MULT(nme_gfx_begin_gradient_fill) +DEFINE_PRIM_MULT(lime_gfx_begin_gradient_fill) -value nme_gfx_line_gradient_fill(value *arg, int args) +value lime_gfx_line_gradient_fill(value *arg, int args) { - nme_gfx_begin_set_gradient_fill(arg,args, false); + lime_gfx_begin_set_gradient_fill(arg,args, false); return alloc_null(); } -DEFINE_PRIM_MULT(nme_gfx_line_gradient_fill) +DEFINE_PRIM_MULT(lime_gfx_line_gradient_fill) -value nme_gfx_end_fill(value inGfx) +value lime_gfx_end_fill(value inGfx) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) gfx->endFill(); return alloc_null(); } -DEFINE_PRIM(nme_gfx_end_fill,1); +DEFINE_PRIM(lime_gfx_end_fill,1); -value nme_gfx_line_style(value* arg, int nargs) +value lime_gfx_line_style(value* arg, int nargs) { enum { argGfx, argThickness, argColour, argAlpha, argPixelHinting, argScaleMode, argCapsStyle, argJointStyle, argMiterLimit, argSIZE }; @@ -2170,13 +2170,13 @@ value nme_gfx_line_style(value* arg, int nargs) } return alloc_null(); } -DEFINE_PRIM_MULT(nme_gfx_line_style) +DEFINE_PRIM_MULT(lime_gfx_line_style) -value nme_gfx_move_to(value inGfx,value inX, value inY) +value lime_gfx_move_to(value inGfx,value inX, value inY) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2185,9 +2185,9 @@ value nme_gfx_move_to(value inGfx,value inX, value inY) } return alloc_null(); } -DEFINE_PRIM(nme_gfx_move_to,3); +DEFINE_PRIM(lime_gfx_move_to,3); -value nme_gfx_line_to(value inGfx,value inX, value inY) +value lime_gfx_line_to(value inGfx,value inX, value inY) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2196,9 +2196,9 @@ value nme_gfx_line_to(value inGfx,value inX, value inY) } return alloc_null(); } -DEFINE_PRIM(nme_gfx_line_to,3); +DEFINE_PRIM(lime_gfx_line_to,3); -value nme_gfx_curve_to(value inGfx,value inCX, value inCY, value inX, value inY) +value lime_gfx_curve_to(value inGfx,value inCX, value inCY, value inX, value inY) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2207,9 +2207,9 @@ value nme_gfx_curve_to(value inGfx,value inCX, value inCY, value inX, value inY) } return alloc_null(); } -DEFINE_PRIM(nme_gfx_curve_to,5); +DEFINE_PRIM(lime_gfx_curve_to,5); -value nme_gfx_arc_to(value inGfx,value inCX, value inCY, value inX, value inY) +value lime_gfx_arc_to(value inGfx,value inCX, value inCY, value inX, value inY) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2218,9 +2218,9 @@ value nme_gfx_arc_to(value inGfx,value inCX, value inCY, value inX, value inY) } return alloc_null(); } -DEFINE_PRIM(nme_gfx_arc_to,5); +DEFINE_PRIM(lime_gfx_arc_to,5); -value nme_gfx_draw_ellipse(value inGfx,value inX, value inY, value inWidth, value inHeight) +value lime_gfx_draw_ellipse(value inGfx,value inX, value inY, value inWidth, value inHeight) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2229,9 +2229,9 @@ value nme_gfx_draw_ellipse(value inGfx,value inX, value inY, value inWidth, valu } return alloc_null(); } -DEFINE_PRIM(nme_gfx_draw_ellipse,5); +DEFINE_PRIM(lime_gfx_draw_ellipse,5); -value nme_gfx_draw_rect(value inGfx,value inX, value inY, value inWidth, value inHeight) +value lime_gfx_draw_rect(value inGfx,value inX, value inY, value inWidth, value inHeight) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2240,9 +2240,9 @@ value nme_gfx_draw_rect(value inGfx,value inX, value inY, value inWidth, value i } return alloc_null(); } -DEFINE_PRIM(nme_gfx_draw_rect,5); +DEFINE_PRIM(lime_gfx_draw_rect,5); -value nme_gfx_draw_path(value inGfx, value inCommands, value inData, value inWinding) +value lime_gfx_draw_path(value inGfx, value inCommands, value inData, value inWinding) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2260,9 +2260,9 @@ value nme_gfx_draw_path(value inGfx, value inCommands, value inData, value inWin } return alloc_null(); } -DEFINE_PRIM(nme_gfx_draw_path, 4); +DEFINE_PRIM(lime_gfx_draw_path, 4); -value nme_gfx_draw_round_rect(value *arg, int args) +value lime_gfx_draw_round_rect(value *arg, int args) { enum { aGfx, aX, aY, aW, aH, aRx, aRy, aSIZE }; Graphics *gfx; @@ -2272,9 +2272,9 @@ value nme_gfx_draw_round_rect(value *arg, int args) } return alloc_null(); } -DEFINE_PRIM_MULT(nme_gfx_draw_round_rect); +DEFINE_PRIM_MULT(lime_gfx_draw_round_rect); -value nme_gfx_draw_triangles(value *arg, int args ) +value lime_gfx_draw_triangles(value *arg, int args ) { enum { aGfx, aVertices, aIndices, aUVData, aCull, aColours, aBlend, aViewport }; @@ -2299,10 +2299,10 @@ value nme_gfx_draw_triangles(value *arg, int args ) return alloc_null(); } -DEFINE_PRIM_MULT(nme_gfx_draw_triangles); +DEFINE_PRIM_MULT(lime_gfx_draw_triangles); -value nme_gfx_draw_data(value inGfx,value inData) +value lime_gfx_draw_data(value inGfx,value inData) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2317,10 +2317,10 @@ value nme_gfx_draw_data(value inGfx,value inData) } return alloc_null(); } -DEFINE_PRIM(nme_gfx_draw_data,2); +DEFINE_PRIM(lime_gfx_draw_data,2); -value nme_gfx_draw_datum(value inGfx,value inDatum) +value lime_gfx_draw_datum(value inGfx,value inDatum) { Graphics *gfx; if (AbstractToObject(inGfx,gfx)) @@ -2331,9 +2331,9 @@ value nme_gfx_draw_datum(value inGfx,value inDatum) } return alloc_null(); } -DEFINE_PRIM(nme_gfx_draw_datum,2); +DEFINE_PRIM(lime_gfx_draw_datum,2); -value nme_gfx_draw_tiles(value inGfx,value inSheet, value inXYIDs,value inFlags) +value lime_gfx_draw_tiles(value inGfx,value inSheet, value inXYIDs,value inFlags) { Graphics *gfx; Tilesheet *sheet; @@ -2513,13 +2513,13 @@ value nme_gfx_draw_tiles(value inGfx,value inSheet, value inXYIDs,value inFlags) } return alloc_null(); } -DEFINE_PRIM(nme_gfx_draw_tiles,4); +DEFINE_PRIM(lime_gfx_draw_tiles,4); static bool sNekoLutInit = false; static int sNekoLut[256]; -value nme_gfx_draw_points(value *arg, int nargs) +value lime_gfx_draw_points(value *arg, int nargs) { enum { aGfx, aXYs, aRGBAs, aDefaultRGBA, aIs31Bits, aPointSize, aSIZE }; @@ -2554,7 +2554,7 @@ value nme_gfx_draw_points(value *arg, int nargs) } return alloc_null(); } -DEFINE_PRIM_MULT(nme_gfx_draw_points); +DEFINE_PRIM_MULT(lime_gfx_draw_points); @@ -2563,7 +2563,7 @@ DEFINE_PRIM_MULT(nme_gfx_draw_points); -value nme_graphics_path_create(value inCommands,value inData,value inWinding) +value lime_graphics_path_create(value inCommands,value inData,value inWinding) { GraphicsPath *result = new GraphicsPath(); @@ -2575,118 +2575,118 @@ value nme_graphics_path_create(value inCommands,value inData,value inWinding) return ObjectToAbstract(result); } -DEFINE_PRIM(nme_graphics_path_create,3) +DEFINE_PRIM(lime_graphics_path_create,3) -value nme_graphics_path_curve_to(value inPath,value inX1, value inY1, value inX2, value inY2) +value lime_graphics_path_curve_to(value inPath,value inX1, value inY1, value inX2, value inY2) { GraphicsPath *path; if (AbstractToObject(inPath,path)) path->curveTo(val_number(inX1), val_number(inY1), val_number(inX2), val_number(inY2) ); return alloc_null(); } -DEFINE_PRIM(nme_graphics_path_curve_to,5) +DEFINE_PRIM(lime_graphics_path_curve_to,5) -value nme_graphics_path_line_to(value inPath,value inX1, value inY1) +value lime_graphics_path_line_to(value inPath,value inX1, value inY1) { GraphicsPath *path; if (AbstractToObject(inPath,path)) path->lineTo(val_number(inX1), val_number(inY1)); return alloc_null(); } -DEFINE_PRIM(nme_graphics_path_line_to,3) +DEFINE_PRIM(lime_graphics_path_line_to,3) -value nme_graphics_path_move_to(value inPath,value inX1, value inY1) +value lime_graphics_path_move_to(value inPath,value inX1, value inY1) { GraphicsPath *path; if (AbstractToObject(inPath,path)) path->moveTo(val_number(inX1), val_number(inY1)); return alloc_null(); } -DEFINE_PRIM(nme_graphics_path_move_to,3) +DEFINE_PRIM(lime_graphics_path_move_to,3) -value nme_graphics_path_wline_to(value inPath,value inX1, value inY1) +value lime_graphics_path_wline_to(value inPath,value inX1, value inY1) { GraphicsPath *path; if (AbstractToObject(inPath,path)) path->wideLineTo(val_number(inX1), val_number(inY1)); return alloc_null(); } -DEFINE_PRIM(nme_graphics_path_wline_to,3) +DEFINE_PRIM(lime_graphics_path_wline_to,3) -value nme_graphics_path_wmove_to(value inPath,value inX1, value inY1) +value lime_graphics_path_wmove_to(value inPath,value inX1, value inY1) { GraphicsPath *path; if (AbstractToObject(inPath,path)) path->wideMoveTo(val_number(inX1), val_number(inY1)); return alloc_null(); } -DEFINE_PRIM(nme_graphics_path_wmove_to,3) +DEFINE_PRIM(lime_graphics_path_wmove_to,3) -value nme_graphics_path_get_commands(value inPath,value outCommands) +value lime_graphics_path_get_commands(value inPath,value outCommands) { GraphicsPath *path; if (AbstractToObject(inPath,path)) FillArrayInt(outCommands,path->commands); return alloc_null(); } -DEFINE_PRIM(nme_graphics_path_get_commands,2) +DEFINE_PRIM(lime_graphics_path_get_commands,2) -value nme_graphics_path_set_commands(value inPath,value inCommands) +value lime_graphics_path_set_commands(value inPath,value inCommands) { GraphicsPath *path; if (AbstractToObject(inPath,path)) FillArrayInt(path->commands,inCommands); return alloc_null(); } -DEFINE_PRIM(nme_graphics_path_set_commands,2) +DEFINE_PRIM(lime_graphics_path_set_commands,2) -value nme_graphics_path_get_data(value inPath,value outData) +value lime_graphics_path_get_data(value inPath,value outData) { GraphicsPath *path; if (AbstractToObject(inPath,path)) FillArrayDouble(outData,path->data); return alloc_null(); } -DEFINE_PRIM(nme_graphics_path_get_data,2) +DEFINE_PRIM(lime_graphics_path_get_data,2) -value nme_graphics_path_set_data(value inPath,value inData) +value lime_graphics_path_set_data(value inPath,value inData) { GraphicsPath *path; if (AbstractToObject(inPath,path)) FillArrayDouble(path->data,inData); return alloc_null(); } -DEFINE_PRIM(nme_graphics_path_set_data,2) +DEFINE_PRIM(lime_graphics_path_set_data,2) // --- IGraphicsData - Fills --------------------------------------------- -value nme_graphics_solid_fill_create(value inColour, value inAlpha) +value lime_graphics_solid_fill_create(value inColour, value inAlpha) { GraphicsSolidFill *solid = new GraphicsSolidFill( val_int(inColour), val_number(inAlpha) ); return ObjectToAbstract(solid); } -DEFINE_PRIM(nme_graphics_solid_fill_create,2) +DEFINE_PRIM(lime_graphics_solid_fill_create,2) -value nme_graphics_end_fill_create() +value lime_graphics_end_fill_create() { GraphicsEndFill *end = new GraphicsEndFill; return ObjectToAbstract(end); } -DEFINE_PRIM(nme_graphics_end_fill_create,0) +DEFINE_PRIM(lime_graphics_end_fill_create,0) // --- IGraphicsData - Stroke --------------------------------------------- -value nme_graphics_stroke_create(value* arg, int nargs) +value lime_graphics_stroke_create(value* arg, int nargs) { enum { argThickness, argPixelHinting, argScaleMode, argCapsStyle, argJointStyle, argMiterLimit, argFill, argSIZE }; @@ -2712,18 +2712,18 @@ value nme_graphics_stroke_create(value* arg, int nargs) return ObjectToAbstract(stroke); } -DEFINE_PRIM_MULT(nme_graphics_stroke_create) +DEFINE_PRIM_MULT(lime_graphics_stroke_create) // --- TextField -------------------------------------------------------------- -value nme_text_field_create() +value lime_text_field_create() { TextField *text = new TextField(); return ObjectToAbstract(text); } -DEFINE_PRIM(nme_text_field_create,0) +DEFINE_PRIM(lime_text_field_create,0) inline value alloc_wstring(const WString &inStr) { @@ -2841,7 +2841,7 @@ void GetTextFormat(const TextFormat &inFormat, value &outValue, bool inIfSet = f } -value nme_text_field_set_def_text_format(value inText,value inFormat) +value lime_text_field_set_def_text_format(value inText,value inFormat) { TextField *text; if (AbstractToObject(inText,text)) @@ -2854,9 +2854,9 @@ value nme_text_field_set_def_text_format(value inText,value inFormat) return alloc_null(); } -DEFINE_PRIM(nme_text_field_set_def_text_format,2) +DEFINE_PRIM(lime_text_field_set_def_text_format,2) -value nme_text_field_get_text_format(value inText,value outFormat,value inStart,value inEnd) +value lime_text_field_get_text_format(value inText,value outFormat,value inStart,value inEnd) { TextField *text; if (AbstractToObject(inText,text)) @@ -2867,10 +2867,10 @@ value nme_text_field_get_text_format(value inText,value outFormat,value inStart, return alloc_null(); } -DEFINE_PRIM(nme_text_field_get_text_format,4) +DEFINE_PRIM(lime_text_field_get_text_format,4) -value nme_text_field_set_text_format(value inText,value inFormat,value inStart,value inEnd) +value lime_text_field_set_text_format(value inText,value inFormat,value inStart,value inEnd) { TextField *text; if (AbstractToObject(inText,text)) @@ -2883,10 +2883,10 @@ value nme_text_field_set_text_format(value inText,value inFormat,value inStart,v return alloc_null(); } -DEFINE_PRIM(nme_text_field_set_text_format,4) +DEFINE_PRIM(lime_text_field_set_text_format,4) -value nme_text_field_get_def_text_format(value inText,value outFormat) +value lime_text_field_get_def_text_format(value inText,value outFormat) { TextField *text; if (AbstractToObject(inText,text)) @@ -2896,7 +2896,7 @@ value nme_text_field_get_def_text_format(value inText,value outFormat) } return alloc_null(); } -DEFINE_PRIM(nme_text_field_get_def_text_format,2); +DEFINE_PRIM(lime_text_field_get_def_text_format,2); void GetTextLineMetrics(const TextLineMetrics &inMetrics, value &outValue) @@ -2909,7 +2909,7 @@ void GetTextLineMetrics(const TextLineMetrics &inMetrics, value &outValue) alloc_field(outValue,_id_leading, alloc_float(inMetrics.leading)); } -value nme_text_field_get_line_metrics(value inText,value inIndex,value outMetrics) +value lime_text_field_get_line_metrics(value inText,value inIndex,value outMetrics) { TextField *text; if (AbstractToObject(inText,text)) @@ -2919,40 +2919,40 @@ value nme_text_field_get_line_metrics(value inText,value inIndex,value outMetric } return alloc_null(); } -DEFINE_PRIM(nme_text_field_get_line_metrics,3); +DEFINE_PRIM(lime_text_field_get_line_metrics,3); #define TEXT_PROP_GET(prop,Prop,to_val) \ -value nme_text_field_get_##prop(value inHandle) \ +value lime_text_field_get_##prop(value inHandle) \ { \ TextField *t; \ if (AbstractToObject(inHandle,t)) \ return to_val(t->get##Prop()); \ return alloc_null(); \ } \ -DEFINE_PRIM(nme_text_field_get_##prop,1); +DEFINE_PRIM(lime_text_field_get_##prop,1); #define TEXT_PROP(prop,Prop,to_val,from_val) \ TEXT_PROP_GET(prop,Prop,to_val) \ -value nme_text_field_set_##prop(value inHandle,value inValue) \ +value lime_text_field_set_##prop(value inHandle,value inValue) \ { \ TextField *t; \ if (AbstractToObject(inHandle,t)) \ t->set##Prop(from_val(inValue)); \ return alloc_null(); \ } \ -DEFINE_PRIM(nme_text_field_set_##prop,2); +DEFINE_PRIM(lime_text_field_set_##prop,2); #define TEXT_PROP_GET_IDX(prop,Prop,to_val) \ -value nme_text_field_get_##prop(value inHandle,value inIndex) \ +value lime_text_field_get_##prop(value inHandle,value inIndex) \ { \ TextField *t; \ if (AbstractToObject(inHandle,t)) \ return to_val(t->get##Prop(val_int(inIndex))); \ return alloc_null(); \ } \ -DEFINE_PRIM(nme_text_field_get_##prop,2); +DEFINE_PRIM(lime_text_field_get_##prop,2); TEXT_PROP(text,Text,alloc_wstring,val2stdwstr); TEXT_PROP(html_text,HTMLText,alloc_wstring,val2stdwstr); @@ -2981,7 +2981,7 @@ TEXT_PROP_GET_IDX(line_text,LineText,alloc_wstring); TEXT_PROP_GET_IDX(line_offset,LineOffset,alloc_int); -value nme_bitmap_data_create(value* arg, int nargs) +value lime_bitmap_data_create(value* arg, int nargs) { enum { aWidth, aHeight, aFlags, aRGB, aA, aGPU }; @@ -3006,36 +3006,36 @@ value nme_bitmap_data_create(value* arg, int nargs) } return ObjectToAbstract(result); } -DEFINE_PRIM_MULT(nme_bitmap_data_create); +DEFINE_PRIM_MULT(lime_bitmap_data_create); -value nme_bitmap_data_width(value inHandle) +value lime_bitmap_data_width(value inHandle) { Surface *surface; if (AbstractToObject(inHandle,surface)) return alloc_int(surface->Width()); return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_width,1); +DEFINE_PRIM(lime_bitmap_data_width,1); -value nme_bitmap_data_height(value inHandle) +value lime_bitmap_data_height(value inHandle) { Surface *surface; if (AbstractToObject(inHandle,surface)) return alloc_int(surface->Height()); return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_height,1); +DEFINE_PRIM(lime_bitmap_data_height,1); -value nme_bitmap_data_clear(value inHandle,value inRGB) +value lime_bitmap_data_clear(value inHandle,value inRGB) { Surface *surface; if (AbstractToObject(inHandle,surface)) surface->Clear( val_int(inRGB) ); return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_clear,2); +DEFINE_PRIM(lime_bitmap_data_clear,2); -value nme_bitmap_data_get_transparent(value inHandle,value inRGB) +value lime_bitmap_data_get_transparent(value inHandle,value inRGB) { Surface *surface; if (AbstractToObject(inHandle,surface)) @@ -3043,20 +3043,20 @@ value nme_bitmap_data_get_transparent(value inHandle,value inRGB) return alloc_bool( surface->GetAllowTrans() ); return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_get_transparent,1); +DEFINE_PRIM(lime_bitmap_data_get_transparent,1); -value nme_bitmap_data_set_flags(value inHandle,value inFlags) +value lime_bitmap_data_set_flags(value inHandle,value inFlags) { Surface *surface; if (AbstractToObject(inHandle,surface)) surface->SetFlags(val_int(inFlags)); return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_set_flags,1); +DEFINE_PRIM(lime_bitmap_data_set_flags,1); -value nme_bitmap_data_fill(value inHandle, value inRect, value inRGB, value inA) +value lime_bitmap_data_fill(value inHandle, value inRect, value inRGB, value inA) { Surface *surface; if (AbstractToObject(inHandle,surface)) @@ -3073,9 +3073,9 @@ value nme_bitmap_data_fill(value inHandle, value inRect, value inRGB, value inA) return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_fill,4); +DEFINE_PRIM(lime_bitmap_data_fill,4); -value nme_bitmap_data_load(value inFilename, value format) +value lime_bitmap_data_load(value inFilename, value format) { Surface *surface = Surface::Load(val_os_string(inFilename)); if (surface) @@ -3092,9 +3092,9 @@ value nme_bitmap_data_load(value inFilename, value format) } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_load,2); +DEFINE_PRIM(lime_bitmap_data_load,2); -value nme_bitmap_data_set_format(value inHandle, value format) +value lime_bitmap_data_set_format(value inHandle, value format) { Surface *surface; if (AbstractToObject(inHandle,surface)) @@ -3106,9 +3106,9 @@ value nme_bitmap_data_set_format(value inHandle, value format) } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_set_format,2); +DEFINE_PRIM(lime_bitmap_data_set_format,2); -value nme_bitmap_data_from_bytes(value inRGBBytes, value inAlphaBytes) +value lime_bitmap_data_from_bytes(value inRGBBytes, value inAlphaBytes) { ByteData bytes; if (!FromValue(bytes,inRGBBytes)) @@ -3147,10 +3147,10 @@ value nme_bitmap_data_from_bytes(value inRGBBytes, value inAlphaBytes) return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_from_bytes,2); +DEFINE_PRIM(lime_bitmap_data_from_bytes,2); -value nme_bitmap_data_encode(value inSurface, value inFormat,value inQuality) +value lime_bitmap_data_encode(value inSurface, value inFormat,value inQuality) { Surface *surf; if (!AbstractToObject(inSurface,surf)) @@ -3165,12 +3165,12 @@ value nme_bitmap_data_encode(value inSurface, value inFormat,value inQuality) return array.mValue; } -DEFINE_PRIM(nme_bitmap_data_encode,3); +DEFINE_PRIM(lime_bitmap_data_encode,3); -value nme_bitmap_data_clone(value inSurface) +value lime_bitmap_data_clone(value inSurface) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3182,10 +3182,10 @@ value nme_bitmap_data_clone(value inSurface) } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_clone,1); +DEFINE_PRIM(lime_bitmap_data_clone,1); -value nme_bitmap_data_color_transform(value inSurface,value inRect, value inColorTransform) +value lime_bitmap_data_color_transform(value inSurface,value inRect, value inColorTransform) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3200,10 +3200,10 @@ value nme_bitmap_data_color_transform(value inSurface,value inRect, value inColo } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_color_transform,3); +DEFINE_PRIM(lime_bitmap_data_color_transform,3); -value nme_bitmap_data_apply_filter(value inDest, value inSrc,value inRect, value inOffset, value inFilter) +value lime_bitmap_data_apply_filter(value inDest, value inSrc,value inRect, value inOffset, value inFilter) { Surface *src; Surface *dest; @@ -3222,11 +3222,11 @@ value nme_bitmap_data_apply_filter(value inDest, value inSrc,value inRect, value } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_apply_filter,5); +DEFINE_PRIM(lime_bitmap_data_apply_filter,5); -value nme_bitmap_data_copy(value inSource, value inSourceRect, value inTarget, value inOffset, value inMergeAlpha) +value lime_bitmap_data_copy(value inSource, value inSourceRect, value inTarget, value inOffset, value inMergeAlpha) { Surface *source; Surface *dest; @@ -3245,9 +3245,9 @@ value nme_bitmap_data_copy(value inSource, value inSourceRect, value inTarget, v return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_copy,5); +DEFINE_PRIM(lime_bitmap_data_copy,5); -value nme_bitmap_data_copy_channel(value* arg, int nargs) +value lime_bitmap_data_copy_channel(value* arg, int nargs) { enum { aSrc, aSrcRect, aDest, aDestPoint, aSrcChannel, aDestChannel, aSIZE }; Surface *source; @@ -3266,10 +3266,10 @@ value nme_bitmap_data_copy_channel(value* arg, int nargs) return alloc_null(); } -DEFINE_PRIM_MULT(nme_bitmap_data_copy_channel); +DEFINE_PRIM_MULT(lime_bitmap_data_copy_channel); -value nme_bitmap_data_get_pixels(value inSurface, value inRect) +value lime_bitmap_data_get_pixels(value inSurface, value inRect) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3289,9 +3289,9 @@ value nme_bitmap_data_get_pixels(value inSurface, value inRect) return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_get_pixels,2); +DEFINE_PRIM(lime_bitmap_data_get_pixels,2); -value nme_bitmap_data_get_array(value inSurface, value inRect, value outArray) +value lime_bitmap_data_get_array(value inSurface, value inRect, value outArray) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3308,12 +3308,12 @@ value nme_bitmap_data_get_array(value inSurface, value inRect, value outArray) return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_get_array,3); +DEFINE_PRIM(lime_bitmap_data_get_array,3); -value nme_bitmap_data_get_color_bounds_rect(value inSurface, value inMask, value inCol, value inFind, value outRect) +value lime_bitmap_data_get_color_bounds_rect(value inSurface, value inMask, value inCol, value inFind, value outRect) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3329,10 +3329,10 @@ value nme_bitmap_data_get_color_bounds_rect(value inSurface, value inMask, value return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_get_color_bounds_rect,5); +DEFINE_PRIM(lime_bitmap_data_get_color_bounds_rect,5); -value nme_bitmap_data_get_pixel(value inSurface, value inX, value inY) +value lime_bitmap_data_get_pixel(value inSurface, value inX, value inY) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3340,9 +3340,9 @@ value nme_bitmap_data_get_pixel(value inSurface, value inX, value inY) return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_get_pixel,3); +DEFINE_PRIM(lime_bitmap_data_get_pixel,3); -value nme_bitmap_data_get_pixel32(value inSurface, value inX, value inY) +value lime_bitmap_data_get_pixel32(value inSurface, value inX, value inY) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3350,10 +3350,10 @@ value nme_bitmap_data_get_pixel32(value inSurface, value inX, value inY) return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_get_pixel32,3); +DEFINE_PRIM(lime_bitmap_data_get_pixel32,3); -value nme_bitmap_data_get_pixel_rgba(value inSurface, value inX,value inY) +value lime_bitmap_data_get_pixel_rgba(value inSurface, value inX,value inY) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3367,9 +3367,9 @@ value nme_bitmap_data_get_pixel_rgba(value inSurface, value inX,value inY) return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_get_pixel_rgba,3); +DEFINE_PRIM(lime_bitmap_data_get_pixel_rgba,3); -value nme_bitmap_data_scroll(value inSurface, value inDX, value inDY) +value lime_bitmap_data_scroll(value inSurface, value inDX, value inDY) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3377,9 +3377,9 @@ value nme_bitmap_data_scroll(value inSurface, value inDX, value inDY) return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_scroll,3); +DEFINE_PRIM(lime_bitmap_data_scroll,3); -value nme_bitmap_data_set_pixel(value inSurface, value inX, value inY, value inRGB) +value lime_bitmap_data_set_pixel(value inSurface, value inX, value inY, value inRGB) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3387,9 +3387,9 @@ value nme_bitmap_data_set_pixel(value inSurface, value inX, value inY, value inR return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_set_pixel,4); +DEFINE_PRIM(lime_bitmap_data_set_pixel,4); -value nme_bitmap_data_set_pixel32(value inSurface, value inX, value inY, value inRGB) +value lime_bitmap_data_set_pixel32(value inSurface, value inX, value inY, value inRGB) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3397,10 +3397,10 @@ value nme_bitmap_data_set_pixel32(value inSurface, value inX, value inY, value i return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_set_pixel32,4); +DEFINE_PRIM(lime_bitmap_data_set_pixel32,4); -value nme_bitmap_data_set_pixel_rgba(value inSurface, value inX, value inY, value inRGBA) +value lime_bitmap_data_set_pixel_rgba(value inSurface, value inX, value inY, value inRGBA) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3412,10 +3412,10 @@ value nme_bitmap_data_set_pixel_rgba(value inSurface, value inX, value inY, valu } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_set_pixel_rgba,4); +DEFINE_PRIM(lime_bitmap_data_set_pixel_rgba,4); -value nme_bitmap_data_set_bytes(value inSurface, value inRect, value inBytes,value inOffset) +value lime_bitmap_data_set_bytes(value inSurface, value inRect, value inBytes,value inOffset) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3431,9 +3431,9 @@ value nme_bitmap_data_set_bytes(value inSurface, value inRect, value inBytes,val return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_set_bytes,4); +DEFINE_PRIM(lime_bitmap_data_set_bytes,4); -value nme_bitmap_data_set_array(value inSurface, value inRect, value inArray) +value lime_bitmap_data_set_array(value inSurface, value inRect, value inArray) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3450,11 +3450,11 @@ value nme_bitmap_data_set_array(value inSurface, value inRect, value inArray) return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_set_array,3); +DEFINE_PRIM(lime_bitmap_data_set_array,3); -value nme_bitmap_data_generate_filter_rect(value inRect, value inFilter, value outRect) +value lime_bitmap_data_generate_filter_rect(value inRect, value inFilter, value outRect) { Rect rect; FromValue(rect,inRect); @@ -3471,11 +3471,11 @@ value nme_bitmap_data_generate_filter_rect(value inRect, value inFilter, value o ToValue(outRect,rect); return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_generate_filter_rect,3); +DEFINE_PRIM(lime_bitmap_data_generate_filter_rect,3); -value nme_bitmap_data_noise(value *args, int nArgs) +value lime_bitmap_data_noise(value *args, int nArgs) { enum { aSurface, aRandomSeed, aLow, aHigh, aChannelOptions, aGrayScale }; @@ -3488,11 +3488,11 @@ value nme_bitmap_data_noise(value *args, int nArgs) return alloc_null(); } -DEFINE_PRIM_MULT(nme_bitmap_data_noise); +DEFINE_PRIM_MULT(lime_bitmap_data_noise); -value nme_bitmap_data_flood_fill(value inSurface, value inX, value inY, value inColor) +value lime_bitmap_data_flood_fill(value inSurface, value inX, value inY, value inColor) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3551,10 +3551,10 @@ value nme_bitmap_data_flood_fill(value inSurface, value inX, value inY, value in } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_flood_fill,4); +DEFINE_PRIM(lime_bitmap_data_flood_fill,4); -value nme_bitmap_data_unmultiply_alpha(value inSurface) +value lime_bitmap_data_unmultiply_alpha(value inSurface) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3563,10 +3563,10 @@ value nme_bitmap_data_unmultiply_alpha(value inSurface) } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_unmultiply_alpha,1); +DEFINE_PRIM(lime_bitmap_data_unmultiply_alpha,1); -value nme_bitmap_data_multiply_alpha(value inSurface) +value lime_bitmap_data_multiply_alpha(value inSurface) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3575,10 +3575,10 @@ value nme_bitmap_data_multiply_alpha(value inSurface) } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_multiply_alpha,1); +DEFINE_PRIM(lime_bitmap_data_multiply_alpha,1); -value nme_bitmap_data_set_alpha_mode(value inHandle, value inAlphaMode) +value lime_bitmap_data_set_alpha_mode(value inHandle, value inAlphaMode) { Surface *surface; if (AbstractToObject(inHandle,surface)) @@ -3594,10 +3594,10 @@ value nme_bitmap_data_set_alpha_mode(value inHandle, value inAlphaMode) } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_set_alpha_mode,2); +DEFINE_PRIM(lime_bitmap_data_set_alpha_mode,2); -value nme_render_surface_to_surface(value* arg, int nargs) +value lime_render_surface_to_surface(value* arg, int nargs) { enum { aTarget, aSurface, aMatrix, aColourTransform, aBlendMode, aClipRect, aSmooth, aSIZE}; @@ -3645,10 +3645,10 @@ value nme_render_surface_to_surface(value* arg, int nargs) return alloc_null(); } -DEFINE_PRIM_MULT(nme_render_surface_to_surface); +DEFINE_PRIM_MULT(lime_render_surface_to_surface); -value nme_bitmap_data_dispose(value inSurface) +value lime_bitmap_data_dispose(value inSurface) { Surface *surf; if (AbstractToObject(inSurface, surf)) @@ -3657,29 +3657,29 @@ value nme_bitmap_data_dispose(value inSurface) } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_dispose,1); +DEFINE_PRIM(lime_bitmap_data_dispose,1); -value nme_bitmap_data_destroy_hardware_surface(value inHandle) +value lime_bitmap_data_destroy_hardware_surface(value inHandle) { Surface *surface; if (AbstractToObject(inHandle,surface)) surface->destroyHardwareSurface(); return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_destroy_hardware_surface,1); +DEFINE_PRIM(lime_bitmap_data_destroy_hardware_surface,1); -value nme_bitmap_data_create_hardware_surface(value inHandle) +value lime_bitmap_data_create_hardware_surface(value inHandle) { Surface *surface; if (AbstractToObject(inHandle,surface)) surface->createHardwareSurface(); return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_create_hardware_surface,1); +DEFINE_PRIM(lime_bitmap_data_create_hardware_surface,1); -value nme_bitmap_data_dump_bits(value inSurface) +value lime_bitmap_data_dump_bits(value inSurface) { Surface *surf; if (AbstractToObject(inSurface,surf)) @@ -3688,13 +3688,13 @@ value nme_bitmap_data_dump_bits(value inSurface) } return alloc_null(); } -DEFINE_PRIM(nme_bitmap_data_dump_bits,1); +DEFINE_PRIM(lime_bitmap_data_dump_bits,1); // --- Video -------------------------------------------------- -value nme_video_create(value inWidth, value inHeight) +value lime_video_create(value inWidth, value inHeight) { Video *video = Video::Create( val_int(inWidth), val_int(inHeight) ); if (video) @@ -3704,49 +3704,49 @@ value nme_video_create(value inWidth, value inHeight) } return alloc_null(); } -DEFINE_PRIM(nme_video_create,2); +DEFINE_PRIM(lime_video_create,2); -value nme_video_load(value inHandle, value inFilename) +value lime_video_load(value inHandle, value inFilename) { Video *video; if (AbstractToObject(inHandle,video)) video->Load(val_string(inFilename)); return alloc_null(); } -DEFINE_PRIM(nme_video_load,2); +DEFINE_PRIM(lime_video_load,2); -value nme_video_play(value inHandle) +value lime_video_play(value inHandle) { Video *video; if (AbstractToObject(inHandle,video)) video->Play(); return alloc_null(); } -DEFINE_PRIM(nme_video_play,1); +DEFINE_PRIM(lime_video_play,1); -value nme_video_clear(value inHandle) +value lime_video_clear(value inHandle) { Video *video; if (AbstractToObject(inHandle,video)) video->Clear(); return alloc_null(); } -DEFINE_PRIM(nme_video_clear,1); +DEFINE_PRIM(lime_video_clear,1); -value nme_video_set_smoothing(value inHandle, value inSmoothing) +value lime_video_set_smoothing(value inHandle, value inSmoothing) { Video *video; if (AbstractToObject(inHandle,video)) video->smoothing = val_bool(inSmoothing); return alloc_null(); } -DEFINE_PRIM(nme_video_set_smoothing,2); +DEFINE_PRIM(lime_video_set_smoothing,2); // --- Sound -------------------------------------------------- -value nme_sound_from_file(value inFilename,value inForceMusic) +value lime_sound_from_file(value inFilename,value inForceMusic) { Sound *sound = val_is_null(inFilename) ? 0 : Sound::Create( val_string(inFilename), val_bool(inForceMusic) ); @@ -3759,9 +3759,9 @@ value nme_sound_from_file(value inFilename,value inForceMusic) } return alloc_null(); } -DEFINE_PRIM(nme_sound_from_file,2); +DEFINE_PRIM(lime_sound_from_file,2); -value nme_sound_from_data(value inData, value inLen, value inForceMusic) +value lime_sound_from_data(value inData, value inLen, value inForceMusic) { int length = val_int(inLen); Sound *sound; @@ -3784,13 +3784,13 @@ value nme_sound_from_data(value inData, value inLen, value inForceMusic) } return alloc_null(); } -DEFINE_PRIM(nme_sound_from_data, 3); +DEFINE_PRIM(lime_sound_from_data, 3); #define GET_ID3(name) \ sound->getID3Value(name,val); \ alloc_field(outVar, val_id(name), alloc_string(val.c_str() ) ); -value nme_sound_get_id3(value inSound, value outVar) +value lime_sound_get_id3(value inSound, value outVar) { Sound *sound; if (AbstractToObject(inSound,sound)) @@ -3806,9 +3806,9 @@ value nme_sound_get_id3(value inSound, value outVar) } return alloc_null(); } -DEFINE_PRIM(nme_sound_get_id3,2); +DEFINE_PRIM(lime_sound_get_id3,2); -value nme_sound_get_length(value inSound) +value lime_sound_get_length(value inSound) { Sound *sound; if (AbstractToObject(inSound, sound)) @@ -3817,9 +3817,9 @@ value nme_sound_get_length(value inSound) } return alloc_null(); } -DEFINE_PRIM(nme_sound_get_length,1); +DEFINE_PRIM(lime_sound_get_length,1); -value nme_sound_close(value inSound) +value lime_sound_close(value inSound) { Sound *sound; if (AbstractToObject(inSound,sound)) @@ -3828,9 +3828,9 @@ value nme_sound_close(value inSound) } return alloc_null(); } -DEFINE_PRIM(nme_sound_close,1); +DEFINE_PRIM(lime_sound_close,1); -value nme_sound_get_status(value inSound) +value lime_sound_get_status(value inSound) { Sound *sound; if (AbstractToObject(inSound,sound)) @@ -3844,11 +3844,11 @@ value nme_sound_get_status(value inSound) } return alloc_null(); } -DEFINE_PRIM(nme_sound_get_status,1); +DEFINE_PRIM(lime_sound_get_status,1); // --- SoundChannel -------------------------------------------------------- -value nme_sound_channel_is_complete(value inChannel) +value lime_sound_channel_is_complete(value inChannel) { SoundChannel *channel; if (AbstractToObject(inChannel,channel)) @@ -3857,9 +3857,9 @@ value nme_sound_channel_is_complete(value inChannel) } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_is_complete,1); +DEFINE_PRIM(lime_sound_channel_is_complete,1); -value nme_sound_channel_get_left(value inChannel) +value lime_sound_channel_get_left(value inChannel) { SoundChannel *channel; if (AbstractToObject(inChannel,channel)) @@ -3868,9 +3868,9 @@ value nme_sound_channel_get_left(value inChannel) } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_get_left,1); +DEFINE_PRIM(lime_sound_channel_get_left,1); -value nme_sound_channel_get_right(value inChannel) +value lime_sound_channel_get_right(value inChannel) { SoundChannel *channel; if (AbstractToObject(inChannel,channel)) @@ -3879,9 +3879,9 @@ value nme_sound_channel_get_right(value inChannel) } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_get_right,1); +DEFINE_PRIM(lime_sound_channel_get_right,1); -value nme_sound_channel_get_position(value inChannel) +value lime_sound_channel_get_position(value inChannel) { SoundChannel *channel; if (AbstractToObject(inChannel,channel)) @@ -3890,9 +3890,9 @@ value nme_sound_channel_get_position(value inChannel) } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_get_position,1); +DEFINE_PRIM(lime_sound_channel_get_position,1); -value nme_sound_channel_set_position(value inChannel, value inFloat) +value lime_sound_channel_set_position(value inChannel, value inFloat) { #ifdef HX_MACOS SoundChannel *channel; @@ -3904,9 +3904,9 @@ value nme_sound_channel_set_position(value inChannel, value inFloat) #endif return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_set_position,2); +DEFINE_PRIM(lime_sound_channel_set_position,2); -value nme_sound_channel_stop(value inChannel) +value lime_sound_channel_stop(value inChannel) { SoundChannel *channel; if (AbstractToObject(inChannel,channel)) @@ -3915,9 +3915,9 @@ value nme_sound_channel_stop(value inChannel) } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_stop,1); +DEFINE_PRIM(lime_sound_channel_stop,1); -value nme_sound_channel_set_transform(value inChannel, value inTransform) +value lime_sound_channel_set_transform(value inChannel, value inTransform) { SoundChannel *channel; if (AbstractToObject(inChannel,channel)) @@ -3928,9 +3928,9 @@ value nme_sound_channel_set_transform(value inChannel, value inTransform) } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_set_transform,2); +DEFINE_PRIM(lime_sound_channel_set_transform,2); -value nme_sound_channel_create(value inSound, value inStart, value inLoops, value inTransform) +value lime_sound_channel_create(value inSound, value inStart, value inLoops, value inTransform) { Sound *sound; if (AbstractToObject(inSound,sound)) @@ -3946,12 +3946,12 @@ value nme_sound_channel_create(value inSound, value inStart, value inLoops, valu } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_create,4); +DEFINE_PRIM(lime_sound_channel_create,4); // --- dynamic sound --- -value nme_sound_channel_needs_data(value inChannel) +value lime_sound_channel_needs_data(value inChannel) { SoundChannel *channel; if (AbstractToObject(inChannel,channel)) @@ -3960,10 +3960,10 @@ value nme_sound_channel_needs_data(value inChannel) } return alloc_bool(false); } -DEFINE_PRIM(nme_sound_channel_needs_data,1); +DEFINE_PRIM(lime_sound_channel_needs_data,1); -value nme_sound_channel_add_data(value inChannel, value inBytes) +value lime_sound_channel_add_data(value inChannel, value inBytes) { SoundChannel *channel; if (AbstractToObject(inChannel,channel)) @@ -3972,10 +3972,10 @@ value nme_sound_channel_add_data(value inChannel, value inBytes) } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_add_data,2); +DEFINE_PRIM(lime_sound_channel_add_data,2); -value nme_sound_channel_get_data_position(value inChannel) +value lime_sound_channel_get_data_position(value inChannel) { SoundChannel *channel; if (AbstractToObject(inChannel,channel)) @@ -3984,11 +3984,11 @@ value nme_sound_channel_get_data_position(value inChannel) } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_get_data_position,1); +DEFINE_PRIM(lime_sound_channel_get_data_position,1); -value nme_sound_channel_create_dynamic(value inBytes, value inTransform) +value lime_sound_channel_create_dynamic(value inBytes, value inTransform) { ByteArray bytes(inBytes); SoundTransform trans; @@ -4001,12 +4001,12 @@ value nme_sound_channel_create_dynamic(value inBytes, value inTransform) } return alloc_null(); } -DEFINE_PRIM(nme_sound_channel_create_dynamic,2); +DEFINE_PRIM(lime_sound_channel_create_dynamic,2); // --- Tilesheet ----------------------------------------------- -value nme_tilesheet_create(value inSurface) +value lime_tilesheet_create(value inSurface) { Surface *surface; if (AbstractToObject(inSurface,surface)) @@ -4018,9 +4018,9 @@ value nme_tilesheet_create(value inSurface) } return alloc_null(); } -DEFINE_PRIM(nme_tilesheet_create,1); +DEFINE_PRIM(lime_tilesheet_create,1); -value nme_tilesheet_add_rect(value inSheet,value inRect, value inHotSpot) +value lime_tilesheet_add_rect(value inSheet,value inRect, value inHotSpot) { Tilesheet *sheet; if (AbstractToObject(inSheet,sheet)) @@ -4035,20 +4035,20 @@ value nme_tilesheet_add_rect(value inSheet,value inRect, value inHotSpot) } return alloc_null(); } -DEFINE_PRIM(nme_tilesheet_add_rect,3); +DEFINE_PRIM(lime_tilesheet_add_rect,3); // --- URL ---------------------------------------------------------- -value nme_curl_initialize(value inCACertFilePath) +value lime_curl_initialize(value inCACertFilePath) { #ifndef EMSCRIPTEN URLLoader::initialize(val_string(inCACertFilePath)); #endif return alloc_null(); } -DEFINE_PRIM(nme_curl_initialize,1); +DEFINE_PRIM(lime_curl_initialize,1); -value nme_curl_create(value inURLRequest) +value lime_curl_create(value inURLRequest) { #ifndef EMSCRIPTEN URLRequest request; @@ -4058,18 +4058,18 @@ value nme_curl_create(value inURLRequest) #endif return alloc_null(); } -DEFINE_PRIM(nme_curl_create,1); +DEFINE_PRIM(lime_curl_create,1); -value nme_curl_process_loaders() +value lime_curl_process_loaders() { #ifndef EMSCRIPTEN return alloc_bool(URLLoader::processAll()); #endif return alloc_bool(true); } -DEFINE_PRIM(nme_curl_process_loaders,0); +DEFINE_PRIM(lime_curl_process_loaders,0); -value nme_curl_update_loader(value inLoader,value outHaxeObj) +value lime_curl_update_loader(value inLoader,value outHaxeObj) { #ifndef EMSCRIPTEN URLLoader *loader; @@ -4082,9 +4082,9 @@ value nme_curl_update_loader(value inLoader,value outHaxeObj) #endif return alloc_null(); } -DEFINE_PRIM(nme_curl_update_loader,2); +DEFINE_PRIM(lime_curl_update_loader,2); -value nme_curl_get_error_message(value inLoader) +value lime_curl_get_error_message(value inLoader) { #ifndef EMSCRIPTEN URLLoader *loader; @@ -4095,9 +4095,9 @@ value nme_curl_get_error_message(value inLoader) #endif return alloc_null(); } -DEFINE_PRIM(nme_curl_get_error_message,1); +DEFINE_PRIM(lime_curl_get_error_message,1); -value nme_curl_get_code(value inLoader) +value lime_curl_get_code(value inLoader) { #ifndef EMSCRIPTEN URLLoader *loader; @@ -4108,10 +4108,10 @@ value nme_curl_get_code(value inLoader) #endif return alloc_null(); } -DEFINE_PRIM(nme_curl_get_code,1); +DEFINE_PRIM(lime_curl_get_code,1); -value nme_curl_get_data(value inLoader) +value lime_curl_get_data(value inLoader) { #ifndef EMSCRIPTEN URLLoader *loader; @@ -4123,9 +4123,9 @@ value nme_curl_get_data(value inLoader) #endif return alloc_null(); } -DEFINE_PRIM(nme_curl_get_data,1); +DEFINE_PRIM(lime_curl_get_data,1); -value nme_curl_get_cookies(value inLoader) +value lime_curl_get_cookies(value inLoader) { #ifndef EMSCRIPTEN URLLoader *loader; @@ -4141,28 +4141,28 @@ value nme_curl_get_cookies(value inLoader) #endif return alloc_array(0); } -DEFINE_PRIM(nme_curl_get_cookies,1); +DEFINE_PRIM(lime_curl_get_cookies,1); -value nme_lzma_encode(value input_value) +value lime_lzma_encode(value input_value) { buffer input_buffer = val_to_buffer(input_value); buffer output_buffer = alloc_buffer_len(0); Lzma::Encode(input_buffer, output_buffer); return buffer_val(output_buffer); } -DEFINE_PRIM(nme_lzma_encode,1); +DEFINE_PRIM(lime_lzma_encode,1); -value nme_lzma_decode(value input_value) +value lime_lzma_decode(value input_value) { buffer input_buffer = val_to_buffer(input_value); buffer output_buffer = alloc_buffer_len(0); Lzma::Decode(input_buffer, output_buffer); return buffer_val(output_buffer); } -DEFINE_PRIM(nme_lzma_decode,1); +DEFINE_PRIM(lime_lzma_decode,1); -value nme_file_dialog_folder(value in_title, value in_text ) +value lime_file_dialog_folder(value in_title, value in_text ) { std::string _title( val_string( in_title ) ); std::string _text( val_string( in_text ) ); @@ -4171,9 +4171,9 @@ value nme_file_dialog_folder(value in_title, value in_text ) return alloc_string( path.c_str() ); } -DEFINE_PRIM(nme_file_dialog_folder,2); +DEFINE_PRIM(lime_file_dialog_folder,2); -value nme_file_dialog_open(value in_title, value in_text, value in_types ) +value lime_file_dialog_open(value in_title, value in_text, value in_types ) { std::string _title( val_string( in_title ) ); std::string _text( val_string( in_text ) ); @@ -4184,9 +4184,9 @@ value nme_file_dialog_open(value in_title, value in_text, value in_types ) return alloc_string( path.c_str() ); } -DEFINE_PRIM(nme_file_dialog_open,3); +DEFINE_PRIM(lime_file_dialog_open,3); -value nme_file_dialog_save(value in_title, value in_text, value in_types ) +value lime_file_dialog_save(value in_title, value in_text, value in_types ) { std::string _title( val_string( in_title ) ); std::string _text( val_string( in_text ) ); @@ -4197,17 +4197,17 @@ value nme_file_dialog_save(value in_title, value in_text, value in_types ) return alloc_string( path.c_str() ); } -DEFINE_PRIM(nme_file_dialog_save,3); +DEFINE_PRIM(lime_file_dialog_save,3); // Reference this to bring in all the symbols for the static library #ifdef STATIC_LINK -extern "C" int nme_oglexport_register_prims(); +extern "C" int lime_oglexport_register_prims(); #endif -extern "C" int nme_register_prims() +extern "C" int lime_register_prims() { #ifdef STATIC_LINK - nme_oglexport_register_prims(); + lime_oglexport_register_prims(); #endif return 0; } diff --git a/project/src/common/Filters.cpp b/project/src/common/Filters.cpp index 3f383da46..541b6eb5a 100644 --- a/project/src/common/Filters.cpp +++ b/project/src/common/Filters.cpp @@ -5,7 +5,7 @@ #include "renderer/common/AutoSurfaceRender.h" #include -namespace nme +namespace lime { @@ -712,6 +712,6 @@ Surface *FilterBitmap( const FilterList &inFilters, Surface *inBitmap, } -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/Font.cpp b/project/src/common/Font.cpp index 71818deb1..37e519598 100644 --- a/project/src/common/Font.cpp +++ b/project/src/common/Font.cpp @@ -12,7 +12,7 @@ #include -namespace nme +namespace lime { @@ -94,7 +94,7 @@ public: AutoGCRoot *sCFFIFontFactory = 0; -value nme_font_set_factory(value inFactory) +value lime_font_set_factory(value inFactory) { if (!sCFFIFontFactory) { @@ -117,7 +117,7 @@ value nme_font_set_factory(value inFactory) return alloc_null(); } -DEFINE_PRIM(nme_font_set_factory,1) +DEFINE_PRIM(lime_font_set_factory,1) FontFace *FontFace::CreateCFFIFont(const TextFormat &inFormat,double inScale) { @@ -444,15 +444,15 @@ Font *Font::Create(TextFormat &inFormat,double inScale,GlyphRotation inRotation, } -value nme_font_register_font(value inFontName, value inBytes) +value lime_font_register_font(value inFontName, value inBytes) { AutoGCRoot *bytes = new AutoGCRoot(inBytes); sgRegisteredFonts[std::string(val_string(inFontName))] = bytes; return alloc_null(); } -DEFINE_PRIM(nme_font_register_font,2) +DEFINE_PRIM(lime_font_register_font,2) -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/FreeType.cpp b/project/src/common/FreeType.cpp index 24580d349..e9d91f9ab 100644 --- a/project/src/common/FreeType.cpp +++ b/project/src/common/FreeType.cpp @@ -35,9 +35,9 @@ #include "ByteArray.h" -#define NME_FREETYPE_FLAGS (FT_LOAD_FORCE_AUTOHINT|FT_LOAD_DEFAULT) +#define LIME_FREETYPE_FLAGS (FT_LOAD_FORCE_AUTOHINT|FT_LOAD_DEFAULT) -namespace nme +namespace lime { FT_Library sgLibrary = 0; @@ -60,7 +60,7 @@ public: bool LoadBitmap(int inChar) { int idx = FT_Get_Char_Index( mFace, inChar ); - int err = FT_Load_Glyph( mFace, idx, NME_FREETYPE_FLAGS ); + int err = FT_Load_Glyph( mFace, idx, LIME_FREETYPE_FLAGS ); if (err) return false; @@ -453,7 +453,7 @@ FontFace *FontFace::CreateFreeType(const TextFormat &inFormat,double inScale,Aut -} // end namespace nme +} // end namespace lime #include @@ -610,10 +610,10 @@ wchar_t *get_familyname_from_sfnt_name(FT_Face face) value freetype_init() { - if (!nme::sgLibrary) - FT_Init_FreeType( &nme::sgLibrary ); + if (!lime::sgLibrary) + FT_Init_FreeType( &lime::sgLibrary ); - return alloc_bool(nme::sgLibrary); + return alloc_bool(lime::sgLibrary); } DEFINE_PRIM(freetype_init, 0); @@ -629,7 +629,7 @@ value freetype_import_font(value font_file, value char_vector, value em_size, va AutoGCRoot *bytes = !val_is_null(inBytes) ? new AutoGCRoot(inBytes) : NULL; - result = nme::MyNewFace(val_string(font_file), 0, &face, bytes); + result = lime::MyNewFace(val_string(font_file), 0, &face, bytes); if (result == FT_Err_Unknown_File_Format) { @@ -677,7 +677,7 @@ value freetype_import_font(value font_file, value char_vector, value em_size, va FT_ULong char_code = (FT_ULong)val_int(val_array_i(char_vector,i)); FT_UInt glyph_index = FT_Get_Char_Index(face, char_code); - if(glyph_index != 0 && FT_Load_Glyph(face, glyph_index, NME_FREETYPE_FLAGS) == 0) + if(glyph_index != 0 && FT_Load_Glyph(face, glyph_index, LIME_FREETYPE_FLAGS) == 0) { glyph *g = new glyph; @@ -704,7 +704,7 @@ value freetype_import_font(value font_file, value char_vector, value em_size, va char_code = FT_Get_First_Char(face, &glyph_index); while(glyph_index != 0) { - if(FT_Load_Glyph(face, glyph_index, NME_FREETYPE_FLAGS) == 0) + if(FT_Load_Glyph(face, glyph_index, LIME_FREETYPE_FLAGS) == 0) { glyph *g = new glyph; @@ -913,7 +913,7 @@ void ItererateFontDir(const std::string &inDir, value inFunc, int inMaxDepth) } #endif -value nme_font_iterate_device_fonts(value inFunc) +value lime_font_iterate_device_fonts(value inFunc) { #ifndef HX_WINRT #ifdef HX_WINDOWS @@ -945,6 +945,6 @@ value nme_font_iterate_device_fonts(value inFunc) return alloc_null(); } -DEFINE_PRIM(nme_font_iterate_device_fonts,1) +DEFINE_PRIM(lime_font_iterate_device_fonts,1) diff --git a/project/src/common/Geom.cpp b/project/src/common/Geom.cpp index 5baf9f3cf..0d0784568 100644 --- a/project/src/common/Geom.cpp +++ b/project/src/common/Geom.cpp @@ -2,7 +2,7 @@ #include -namespace nme +namespace lime { // --- Transform ------------------------------------------------------------------- diff --git a/project/src/common/Graphics.cpp b/project/src/common/Graphics.cpp index d6c4deb60..0c2d3567e 100644 --- a/project/src/common/Graphics.cpp +++ b/project/src/common/Graphics.cpp @@ -2,7 +2,7 @@ #include "renderer/common/Surface.h" #include -namespace nme +namespace lime { void Graphics::OnChanged() @@ -600,7 +600,7 @@ bool Graphics::Render( const RenderTarget &inTarget, const RenderState &inState { Flush(); - #ifdef NME_DIRECTFB + #ifdef LIME_DIRECTFB for(int i=0;i -namespace nme +namespace lime { // --- GraphicsPath ------------------------------------------ @@ -270,5 +270,5 @@ GraphicsTrianglePath::GraphicsTrianglePath( const QuickVec &inXYs, -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/Hardware.cpp b/project/src/common/Hardware.cpp index 06862bcd4..a467e9677 100644 --- a/project/src/common/Hardware.cpp +++ b/project/src/common/Hardware.cpp @@ -8,7 +8,7 @@ #endif -namespace nme +namespace lime { class HardwareBuilder @@ -1428,5 +1428,5 @@ bool HardwareContext::Hits(const RenderState &inState, const HardwareCalls &inCa -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/Input.cpp b/project/src/common/Input.cpp index e46c88bfe..0c0031f28 100644 --- a/project/src/common/Input.cpp +++ b/project/src/common/Input.cpp @@ -1,7 +1,7 @@ #include -namespace nme +namespace lime { #if !defined(IPHONE) && !defined(WEBOS) && !defined(ANDROID) && !defined(BLACKBERRY) diff --git a/project/src/common/Lzma.cpp b/project/src/common/Lzma.cpp index 5b517dac6..3cc975c8d 100644 --- a/project/src/common/Lzma.cpp +++ b/project/src/common/Lzma.cpp @@ -2,7 +2,7 @@ #include "lzma/LzmaEnc.h" #include "lzma/LzmaDec.h" -namespace nme +namespace lime { inline void WRITE_LE8 (unsigned char *ptr, char value) { *ptr = value; } inline void WRITE_LE16(unsigned char *ptr, short value) { WRITE_LE8 ((ptr) + 0, ((value) >> 0)); WRITE_LE8 ((ptr) + 1, ((value) >> 8)); } diff --git a/project/src/common/ManagedStage.cpp b/project/src/common/ManagedStage.cpp index 505e19b55..c7043cd3c 100644 --- a/project/src/common/ManagedStage.cpp +++ b/project/src/common/ManagedStage.cpp @@ -5,7 +5,7 @@ #include -namespace nme +namespace lime { @@ -75,5 +75,5 @@ Surface *ManagedStage::GetPrimarySurface() } -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/Matrix.cpp b/project/src/common/Matrix.cpp index 34bb830ae..6ad93fe88 100644 --- a/project/src/common/Matrix.cpp +++ b/project/src/common/Matrix.cpp @@ -5,7 +5,7 @@ #define M_PI 3.141592653589793238462643 #endif -namespace nme +namespace lime { UserPoint Matrix::Apply(float inX,float inY) const @@ -233,5 +233,5 @@ Matrix &Matrix::createGradientBox(double inWidth, double inHeight, } -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/SurfaceIO.cpp b/project/src/common/SurfaceIO.cpp index bdd6573ea..d8c2a59a4 100644 --- a/project/src/common/SurfaceIO.cpp +++ b/project/src/common/SurfaceIO.cpp @@ -10,7 +10,7 @@ extern "C" { } #include -using namespace nme; +using namespace lime; struct ReadBuf { @@ -532,7 +532,7 @@ static bool EncodePNG(Surface *inSurface, ByteArray *outBytes) return true; } -namespace nme { +namespace lime { Surface *Surface::Load(const OSChar *inFilename) { diff --git a/project/src/common/Tessellate.cpp b/project/src/common/Tessellate.cpp index 50f36091a..c18bdcf24 100644 --- a/project/src/common/Tessellate.cpp +++ b/project/src/common/Tessellate.cpp @@ -1,7 +1,7 @@ #include #include -namespace nme +namespace lime { struct EdgePoint @@ -575,4 +575,4 @@ void ConvertOutlineToTriangles(Vertices &ioOutline,const QuickVec &inSubPol ioOutline.swap(triangles); } -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/TextField.cpp b/project/src/common/TextField.cpp index b2aabaac4..433a32aad 100644 --- a/project/src/common/TextField.cpp +++ b/project/src/common/TextField.cpp @@ -14,7 +14,7 @@ #endif -namespace nme +namespace lime { int gPasswordChar = 42; // * @@ -1990,5 +1990,5 @@ void CharGroup::ApplyFormat(TextFormat *inFormat) inFormat->url.Apply(mFormat->url); } -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/Thread.cpp b/project/src/common/Thread.cpp index b920d8ff7..eefc49461 100644 --- a/project/src/common/Thread.cpp +++ b/project/src/common/Thread.cpp @@ -1,6 +1,6 @@ -#include +#include -namespace nme +namespace lime { ThreadId GetThreadId() @@ -27,4 +27,4 @@ bool IsMainThread() } -} // end namespace nmE +} // end namespace lime diff --git a/project/src/common/Tilesheet.cpp b/project/src/common/Tilesheet.cpp index df8ceb318..3d811d458 100644 --- a/project/src/common/Tilesheet.cpp +++ b/project/src/common/Tilesheet.cpp @@ -3,7 +3,7 @@ #include "renderer/common/SimpleSurface.h" #include -namespace nme +namespace lime { Tilesheet::Tilesheet(int inWidth,int inHeight,PixelFormat inFormat, bool inInitRef) : Object(inInitRef) @@ -77,5 +77,5 @@ int Tilesheet::addTileRect(const Rect &inRect,float inOx, float inOy) -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/Utils.cpp b/project/src/common/Utils.cpp index 19a4f61a0..e8940392f 100644 --- a/project/src/common/Utils.cpp +++ b/project/src/common/Utils.cpp @@ -30,7 +30,7 @@ typedef uint64_t __int64; #include "ByteArray.h" -namespace nme +namespace lime { #if defined(IPHONE) @@ -39,8 +39,8 @@ std::string gAssetBase = "assets/"; std::string gAssetBase = ""; #endif -std::string gCompany = "nme"; -std::string gPackage = "org.haxe.nme"; +std::string gCompany = "lime"; +std::string gPackage = "org.haxe.lime"; std::string gVersion = "1.0.0"; std::string gFile = "Application"; diff --git a/project/src/common/empty/HardwareContext.cpp b/project/src/common/empty/HardwareContext.cpp index fa9d92e98..31dfda09c 100644 --- a/project/src/common/empty/HardwareContext.cpp +++ b/project/src/common/empty/HardwareContext.cpp @@ -5,7 +5,7 @@ #include "renderer/common/Texture.h" -namespace nme +namespace lime { @@ -136,4 +136,4 @@ HardwareContext *HardwareContext::CreateOpenGL(void *inWindow, void *inGLCtx, bo return new EmptyHardwareContext(); } -} // end namespace nme +} // end namespace lime diff --git a/project/src/common/empty/Sound.cpp b/project/src/common/empty/Sound.cpp index 5b92a7a17..4f032503d 100644 --- a/project/src/common/empty/Sound.cpp +++ b/project/src/common/empty/Sound.cpp @@ -3,7 +3,7 @@ #include -namespace nme +namespace lime { class EmptySoundChannel : public SoundChannel diff --git a/project/src/common/empty/Stage.cpp b/project/src/common/empty/Stage.cpp index 1c6643b2f..b81e6269d 100644 --- a/project/src/common/empty/Stage.cpp +++ b/project/src/common/empty/Stage.cpp @@ -2,15 +2,15 @@ #include #include "renderer/common/Surface.h" -//using namespace nme; +//using namespace lime; -namespace nme +namespace lime { -void CreateMainFrame(nme::FrameCreationCallback inOnFrame,int inWidth,int inHeight, - unsigned int inFlags, const char *inTitle, nme::Surface *inIcon ) +void CreateMainFrame(lime::FrameCreationCallback inOnFrame,int inWidth,int inHeight, + unsigned int inFlags, const char *inTitle, lime::Surface *inIcon ) { } diff --git a/project/src/common/empty/URL.cpp b/project/src/common/empty/URL.cpp index 56a92eac7..4fa6d3d72 100644 --- a/project/src/common/empty/URL.cpp +++ b/project/src/common/empty/URL.cpp @@ -1,6 +1,6 @@ #include -namespace nme +namespace lime { diff --git a/project/src/common/empty/Video.cpp b/project/src/common/empty/Video.cpp index c02100b27..d1bc0cfc3 100644 --- a/project/src/common/empty/Video.cpp +++ b/project/src/common/empty/Video.cpp @@ -4,7 +4,7 @@ #include #include -namespace nme +namespace lime { class VideoSurface : public SimpleSurface diff --git a/project/src/common/video/TheoraVideo.cpp b/project/src/common/video/TheoraVideo.cpp index dcbf77643..d214b4451 100644 --- a/project/src/common/video/TheoraVideo.cpp +++ b/project/src/common/video/TheoraVideo.cpp @@ -9,7 +9,7 @@ #define AUDIO_BUFFER_FRAMES 4096 #define AUDIO_OUT_CHANNELS 2 -namespace nme +namespace lime { class VideoSurface : public SimpleSurface @@ -198,7 +198,7 @@ namespace nme return; } - mStartTime = nme::GetTimeStamp() * 1000; + mStartTime = lime::GetTimeStamp() * 1000; mPlaying = true; } @@ -226,7 +226,7 @@ namespace nme HardwareContext *hardware = inTarget.IsHardware() ? inTarget.mHardware : 0; - const int elapsed = nme::GetTimeStamp() * 1000 - mStartTime; + const int elapsed = lime::GetTimeStamp() * 1000 - mStartTime; if (THEORAPLAY_isDecoding(mDecoder) && mPlaying) { diff --git a/project/src/platform/android/AndroidCommon.cpp b/project/src/platform/android/AndroidCommon.cpp index 66408fb43..11d742c45 100644 --- a/project/src/platform/android/AndroidCommon.cpp +++ b/project/src/platform/android/AndroidCommon.cpp @@ -5,7 +5,7 @@ #include #undef LOGE -#define LOGE(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "NME::System", msg, ## args) +#define LOGE(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "lime::System", msg, ## args) JavaVM *_vm; std::map jClassCache; diff --git a/project/src/platform/android/AndroidFont.cpp b/project/src/platform/android/AndroidFont.cpp index 76831a00b..f62047aa7 100644 --- a/project/src/platform/android/AndroidFont.cpp +++ b/project/src/platform/android/AndroidFont.cpp @@ -1,6 +1,6 @@ #include -namespace nme +namespace lime { FontFace *FontFace::CreateNative(const TextFormat &inFormat,double inScale) @@ -8,4 +8,4 @@ FontFace *FontFace::CreateNative(const TextFormat &inFormat,double inScale) return 0; } -} // end namespace nme +} // end namespace lime diff --git a/project/src/platform/android/AndroidFrame.cpp b/project/src/platform/android/AndroidFrame.cpp index 4e31e548b..46583ff1e 100644 --- a/project/src/platform/android/AndroidFrame.cpp +++ b/project/src/platform/android/AndroidFrame.cpp @@ -19,7 +19,7 @@ JavaVM *gJVM=0; -namespace nme +namespace lime { static class AndroidStage *sStage = 0; @@ -27,7 +27,7 @@ static class AndroidFrame *sFrame = 0; static FrameCreationCallback sOnFrame = 0; static bool sCloseActivity = false; -static int sgNMEResult = 0; +static int sgLimeResult = 0; enum { NO_TOUCH = -1 }; @@ -38,8 +38,8 @@ int GetResult() sCloseActivity = false; return -1; } - int r = sgNMEResult; - sgNMEResult = 0; + int r = sgLimeResult; + sgLimeResult = 0; return r; } @@ -88,7 +88,7 @@ public: void onActivityEvent(int inVal) { - __android_log_print(ANDROID_LOG_INFO, "NME", "Activity action %d", inVal); + __android_log_print(ANDROID_LOG_INFO, "lime", "Activity action %d", inVal); if (inVal==1 || inVal==2) { if (inVal == 1) @@ -120,7 +120,7 @@ public: void OnKey(int inCode, bool inDown) { - //__android_log_print(ANDROID_LOG_INFO, "NME", "OnKey %d %d", inCode, inDown); + //__android_log_print(ANDROID_LOG_INFO, "lime", "OnKey %d %d", inCode, inDown); Event key( inDown ? etKeyDown : etKeyUp ); key.code = inCode; key.value = inCode; @@ -129,7 +129,7 @@ public: void OnJoy(int inDeviceId, int inCode, bool inDown) { - //__android_log_print(ANDROID_LOG_INFO, "NME", "OnJoy %d %d %d", inDeviceId, inCode, inDown); + //__android_log_print(ANDROID_LOG_INFO, "lime", "OnJoy %d %d %d", inDeviceId, inCode, inDown); Event joystick( inDown ? etJoyButtonDown : etJoyButtonUp ); joystick.id = inDeviceId; joystick.code = inCode; @@ -147,7 +147,7 @@ public: void OnTrackball(double inX, double inY) { - // __android_log_print(ANDROID_LOG_INFO, "NME", "Trackball %f %f", inX, inY); + // __android_log_print(ANDROID_LOG_INFO, "lime", "Trackball %f %f", inX, inY); } void OnTouch(int inType,double inX, double inY, int inID, float sizeX, float sizeY) @@ -205,13 +205,13 @@ public: void OnDeviceOrientationUpdate(int orientation) { currentDeviceOrientation = orientation; - //__android_log_print(ANDROID_LOG_INFO, "NME", "Device Orientation %d", currentDeviceOrientation); + //__android_log_print(ANDROID_LOG_INFO, "lime", "Device Orientation %d", currentDeviceOrientation); } void OnNormalOrientationFound(int orientation) { normalOrientation = orientation; - //__android_log_print(ANDROID_LOG_INFO, "NME", "Normal Orientation %d", normalOrientation); + //__android_log_print(ANDROID_LOG_INFO, "lime", "Normal Orientation %d", normalOrientation); } void OnOrientationUpdate(double inX, double inY, double inZ) @@ -219,7 +219,7 @@ public: mOrientationX = inX; mOrientationY = inY; mOrientationZ = inZ; - //__android_log_print(ANDROID_LOG_INFO, "NME", "Orientation %f %f %f", inX, inY, inZ); + //__android_log_print(ANDROID_LOG_INFO, "lime", "Orientation %f %f %f", inX, inY, inZ); } void OnAccelerate(double inX, double inY, double inZ) @@ -233,13 +233,13 @@ public: mAccY = -inX / 9.80665; mAccZ = -inZ / 9.80665; } - //__android_log_print(ANDROID_LOG_INFO, "NME", "Accelerometer %f %f %f", inX, inY, inZ); + //__android_log_print(ANDROID_LOG_INFO, "lime", "Accelerometer %f %f %f", inX, inY, inZ); } void EnablePopupKeyboard(bool inEnable) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "showKeyboard", "(Z)V"); if (mid == 0) return; @@ -356,7 +356,7 @@ void StopAnimation() AAsset *AndroidGetAsset(const char *inResource) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "getAssetManager", "()Landroid/content/res/AssetManager;"); if (mid == 0) return 0; @@ -385,7 +385,7 @@ ByteArray AndroidGetAssetBytes(const char *inResource) /*JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "getResource", "(Ljava/lang/String;)[B"); if (mid == 0) return 0; @@ -426,7 +426,7 @@ FileInfo AndroidGetAssetFD(const char *inResource) void AndroidRequestRender() { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/MainView"); + jclass cls = FindClass("org/haxe/lime/MainView"); jmethodID mid = env->GetStaticMethodID(cls, "renderNow", "()V"); if (mid == 0) return; @@ -467,7 +467,7 @@ bool GetAcceleration(double& outX, double& outY, double& outZ) { return false; } -} // end namespace nme +} // end namespace lime @@ -480,142 +480,142 @@ extern "C" #define JAVA_EXPORT JNIEXPORT #endif -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onResize(JNIEnv * env, jobject obj, jint width, jint height) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onResize(JNIEnv * env, jobject obj, jint width, jint height) { env->GetJavaVM(&gJVM); int top = 0; gc_set_top_of_stack(&top,true); - __android_log_print(ANDROID_LOG_INFO, "Resize", "%p %d,%d", nme::sFrame, width, height); - if (nme::sFrame) - nme::sFrame->onResize(width,height); + __android_log_print(ANDROID_LOG_INFO, "Resize", "%p %d,%d", lime::sFrame, width, height); + if (lime::sFrame) + lime::sFrame->onResize(width,height); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onRender(JNIEnv * env, jobject obj) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onRender(JNIEnv * env, jobject obj) { env->GetJavaVM(&gJVM); int top = 0; gc_set_top_of_stack(&top,true); - //double t0 = nme::GetTimeStamp(); - //__android_log_print(ANDROID_LOG_INFO, "NME", "NME onRender: %p", nme::sStage ); - if (nme::sStage) - nme::sStage->OnRender(); - //__android_log_print(ANDROID_LOG_INFO, "NME", "Haxe Time: %f", nme::GetTimeStamp()-t0); + //double t0 = lime::GetTimeStamp(); + //__android_log_print(ANDROID_LOG_INFO, "lime", "lime onRender: %p", lime::sStage ); + if (lime::sStage) + lime::sStage->OnRender(); + //__android_log_print(ANDROID_LOG_INFO, "lime", "Haxe Time: %f", lime::GetTimeStamp()-t0); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onNormalOrientationFound(JNIEnv * env, jobject obj, jint orientation) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onNormalOrientationFound(JNIEnv * env, jobject obj, jint orientation) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnNormalOrientationFound(orientation); + if (lime::sStage) + lime::sStage->OnNormalOrientationFound(orientation); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onDeviceOrientationUpdate(JNIEnv * env, jobject obj, jint orientation) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onDeviceOrientationUpdate(JNIEnv * env, jobject obj, jint orientation) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnDeviceOrientationUpdate(orientation); + if (lime::sStage) + lime::sStage->OnDeviceOrientationUpdate(orientation); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onOrientationUpdate(JNIEnv * env, jobject obj, jfloat x, jfloat y, jfloat z) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onOrientationUpdate(JNIEnv * env, jobject obj, jfloat x, jfloat y, jfloat z) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnOrientationUpdate(x,y,z); + if (lime::sStage) + lime::sStage->OnOrientationUpdate(x,y,z); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onAccelerate(JNIEnv * env, jobject obj, jfloat x, jfloat y, jfloat z) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onAccelerate(JNIEnv * env, jobject obj, jfloat x, jfloat y, jfloat z) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnAccelerate(x,y,z); + if (lime::sStage) + lime::sStage->OnAccelerate(x,y,z); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onTouch(JNIEnv * env, jobject obj, jint type, jfloat x, jfloat y, jint id, jfloat sizeX, jfloat sizeY) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onTouch(JNIEnv * env, jobject obj, jint type, jfloat x, jfloat y, jint id, jfloat sizeX, jfloat sizeY) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnTouch(type,x,y,id,sizeX,sizeY); + if (lime::sStage) + lime::sStage->OnTouch(type,x,y,id,sizeX,sizeY); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onTrackball(JNIEnv * env, jobject obj, jfloat dx, jfloat dy) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onTrackball(JNIEnv * env, jobject obj, jfloat dx, jfloat dy) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnTrackball(dx,dy); + if (lime::sStage) + lime::sStage->OnTrackball(dx,dy); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onKeyChange(JNIEnv * env, jobject obj, int code, bool down) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onKeyChange(JNIEnv * env, jobject obj, int code, bool down) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnKey(code,down); + if (lime::sStage) + lime::sStage->OnKey(code,down); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onJoyChange(JNIEnv * env, jobject obj, int deviceId, int code, bool down) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onJoyChange(JNIEnv * env, jobject obj, int deviceId, int code, bool down) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnJoy(deviceId,code,down); + if (lime::sStage) + lime::sStage->OnJoy(deviceId,code,down); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onJoyMotion(JNIEnv * env, jobject obj, int deviceId, int axis, float value) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onJoyMotion(JNIEnv * env, jobject obj, int deviceId, int axis, float value) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnJoyMotion(deviceId,axis,value); + if (lime::sStage) + lime::sStage->OnJoyMotion(deviceId,axis,value); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onPoll(JNIEnv * env, jobject obj) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onPoll(JNIEnv * env, jobject obj) { env->GetJavaVM(&gJVM); int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->OnPoll(); + if (lime::sStage) + lime::sStage->OnPoll(); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } -JAVA_EXPORT double JNICALL Java_org_haxe_nme_NME_getNextWake(JNIEnv * env, jobject obj) +JAVA_EXPORT double JNICALL Java_org_haxe_lime_Lime_getNextWake(JNIEnv * env, jobject obj) { env->GetJavaVM(&gJVM); int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) + if (lime::sStage) { - double delta = nme::sStage->GetNextWake()-nme::GetTimeStamp(); + double delta = lime::sStage->GetNextWake()-lime::GetTimeStamp(); gc_set_top_of_stack(0,true); return delta; } @@ -624,14 +624,14 @@ JAVA_EXPORT double JNICALL Java_org_haxe_nme_NME_getNextWake(JNIEnv * env, jobje } -JAVA_EXPORT int JNICALL Java_org_haxe_nme_NME_onActivity(JNIEnv * env, jobject obj, int inVal) +JAVA_EXPORT int JNICALL Java_org_haxe_lime_Lime_onActivity(JNIEnv * env, jobject obj, int inVal) { int top = 0; gc_set_top_of_stack(&top,true); - if (nme::sStage) - nme::sStage->onActivityEvent(inVal); + if (lime::sStage) + lime::sStage->onActivityEvent(inVal); gc_set_top_of_stack(0,true); - return nme::GetResult(); + return lime::GetResult(); } diff --git a/project/src/platform/android/AndroidSound.cpp b/project/src/platform/android/AndroidSound.cpp index d0e06bbc6..f6f92e2d7 100644 --- a/project/src/platform/android/AndroidSound.cpp +++ b/project/src/platform/android/AndroidSound.cpp @@ -9,10 +9,10 @@ #undef LOGV #undef LOGE -#define LOGV(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "NME::AndroidSound", msg, ## args) -#define LOGE(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "NME::AndroidSound", msg, ## args) +#define LOGV(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "lime::AndroidSound", msg, ## args) +#define LOGE(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "lime::AndroidSound", msg, ## args) -namespace nme +namespace lime { class AndroidSoundChannel : public SoundChannel { @@ -28,7 +28,7 @@ namespace nme inSound->IncRef(); if (inHandle >= 0) { - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jmethodID mid = env->GetStaticMethodID(cls, "playSound", "(IDDI)I"); if (mid > 0) { mStreamID = env->CallStaticIntMethod(cls, mid, inHandle, inTransform.volume*((1-inTransform.pan)/2), inTransform.volume*((inTransform.pan+1)/2), mLoop ); @@ -44,7 +44,7 @@ namespace nme bool isComplete() { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jmethodID mid = env->GetStaticMethodID(cls, "getSoundComplete", "(III)Z"); if (mid > 0) { return env->CallStaticBooleanMethod(cls, mid, mSoundHandle, mStreamID, mLoop); @@ -64,7 +64,7 @@ namespace nme double getPosition() { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jmethodID mid = env->GetStaticMethodID(cls, "getSoundPosition", "(III)I"); if (mid > 0) { return env->CallStaticIntMethod(cls, mid, mSoundHandle, mStreamID, mLoop); @@ -81,7 +81,7 @@ namespace nme if (mStreamID > -1) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jmethodID mid = env->GetStaticMethodID(cls, "stopSound", "(I)V"); if (mid > 0){ env->CallStaticVoidMethod(cls, mid, mStreamID); @@ -115,7 +115,7 @@ namespace nme mSound = inSound; inSound->IncRef(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(inPath.c_str()); jmethodID mid = env->GetStaticMethodID(cls, "playMusic", "(Ljava/lang/String;DDID)I"); if (mid > 0) { @@ -132,7 +132,7 @@ namespace nme bool isComplete() { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(mSoundPath.c_str()); jmethodID mid = env->GetStaticMethodID(cls, "getComplete", "(Ljava/lang/String;)Z"); if (mid > 0) { @@ -144,7 +144,7 @@ namespace nme double getPosition() { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(mSoundPath.c_str()); jmethodID mid = env->GetStaticMethodID(cls, "getPosition", "(Ljava/lang/String;)I"); if (mid > 0) { @@ -155,7 +155,7 @@ namespace nme double setPosition(const float &inFloat) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(mSoundPath.c_str()); jmethodID mid = env->GetStaticMethodID(cls, "setPosition", "(Ljava/lang/String;)I"); if (mid > 0) { @@ -167,7 +167,7 @@ namespace nme double getLeft() { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(mSoundPath.c_str()); jmethodID mid = env->GetStaticMethodID(cls, "getLeft", "(Ljava/lang/String;)D"); if (mid > 0) { @@ -179,7 +179,7 @@ namespace nme double getRight() { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(mSoundPath.c_str()); jmethodID mid = env->GetStaticMethodID(cls, "getRight", "(Ljava/lang/String;)D"); if (mid > 0) { @@ -192,7 +192,7 @@ namespace nme { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(mSoundPath.c_str()); jmethodID mid = env->GetStaticMethodID(cls, "stopMusic", "(Ljava/lang/String;)V"); if (mid > 0) { @@ -204,7 +204,7 @@ namespace nme { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(mSoundPath.c_str()); jmethodID mid = env->GetStaticMethodID(cls, "setMusicTransform", "(Ljava/lang/String;DD)V"); if (mid > 0 ) { @@ -238,7 +238,7 @@ namespace nme mLength = 0; mSoundPath = inPath; - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(mSoundPath.c_str()); if (!inForceMusic) { @@ -269,7 +269,7 @@ namespace nme jbyteArray data = env->NewByteArray(len); env->SetByteArrayRegion(data, 0, len, (const jbyte *)inData); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jmethodID mid = env->GetStaticMethodID(cls, "getSoundPathByByteArray", "([B)Ljava/lang/String;"); jstring jname = (jstring)env->CallStaticObjectMethod(cls, mid, data); @@ -280,7 +280,7 @@ namespace nme void reloadSound() { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jmethodID mid = env->GetStaticMethodID(cls, "getSoundHandle", "(Ljava/lang/String;)I"); if (mid > 0) { jstring path = env->NewStringUTF(mSoundPath.c_str()); @@ -298,7 +298,7 @@ namespace nme { if (mLength == 0) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/Sound"); + jclass cls = FindClass("org/haxe/lime/Sound"); jstring path = env->NewStringUTF(mSoundPath.c_str()); jmethodID mid = env->GetStaticMethodID(cls, "getDuration", "(Ljava/lang/String;)I"); if (mid > 0) { diff --git a/project/src/platform/android/JNI.cpp b/project/src/platform/android/JNI.cpp index 34e25bf18..5e87afbfe 100644 --- a/project/src/platform/android/JNI.cpp +++ b/project/src/platform/android/JNI.cpp @@ -8,7 +8,7 @@ #include #include "AndroidCommon.h" -using namespace nme; +using namespace lime; enum JNIElement { @@ -89,7 +89,7 @@ struct JNIType switch(element) { case jniObjectString: name += "java/lang/String"; break; - case jniObjectHaxe: name += "org/haxe/nme/HaxeObject"; break; + case jniObjectHaxe: name += "org/haxe/lime/HaxeObject"; break; case jniUnknown: case jniObject: name += "java/lang/Object"; break; @@ -182,13 +182,13 @@ void JNIInit(JNIEnv *env) { if (sInit) return; - GameActivity = FindClass("org/haxe/nme/GameActivity"); + GameActivity = FindClass("org/haxe/lime/GameActivity"); postUICallback = env->GetStaticMethodID(GameActivity, "postUICallback", "(J)V"); ObjectClass = FindClass("java/lang/Object"); HaxeObject = JNIType(jniObjectHaxe,0).getClass(env); - HaxeObject_create = env->GetStaticMethodID(HaxeObject, "create", "(J)Lorg/haxe/nme/HaxeObject;"); + HaxeObject_create = env->GetStaticMethodID(HaxeObject, "create", "(J)Lorg/haxe/lime/HaxeObject;"); __haxeHandle = env->GetFieldID(HaxeObject, "__haxeHandle", "J"); JNIType::init(env); @@ -196,13 +196,13 @@ void JNIInit(JNIEnv *env) sInit = true; } -value nme_jni_init_callback(value inCallback) +value lime_jni_init_callback(value inCallback) { if (!gCallback) gCallback = new AutoGCRoot(inCallback); return alloc_null(); } -DEFINE_PRIM(nme_jni_init_callback,1); +DEFINE_PRIM(lime_jni_init_callback,1); struct JavaHaxeReference @@ -265,7 +265,7 @@ void RemoveJavaHaxeObjectRef(value inValue) } -struct JNIObject : public nme::Object +struct JNIObject : public lime::Object { JNIObject(jobject inObject) { @@ -498,7 +498,7 @@ const char *JNIParseType(const char *inStr, JNIType &outType,int inDepth=0) if (!strncmp(src,"java/lang/String;",17) || !strncmp(src,"java/lang/CharSequence;",23) ) outType = JNIType(jniObjectString,inDepth); - else if (!strncmp(src,"org/haxe/nme/HaxeObject;",24)) + else if (!strncmp(src,"org/haxe/lime/HaxeObject;",24)) outType = JNIType(jniObjectHaxe,inDepth); else outType = JNIType(jniObject,inDepth); @@ -624,7 +624,7 @@ bool HaxeToJNI(JNIEnv *inEnv, value inValue, JNIType inType, jvalue &out) -struct JNIField : public nme::Object +struct JNIField : public lime::Object { JNIField(value inClass, value inField, value inSignature,bool inStatic) { @@ -849,19 +849,19 @@ struct JNIField : public nme::Object }; -value nme_jni_create_field(value inClass, value inField, value inSig,value inStatic) +value lime_jni_create_field(value inClass, value inField, value inSig,value inStatic) { JNIField *field = new JNIField(inClass,inField,inSig,val_bool(inStatic) ); if (field->Ok()) return ObjectToAbstract(field); - ELOG("nme_jni_create_field - failed"); + ELOG("lime_jni_create_field - failed"); delete field; return alloc_null(); } -DEFINE_PRIM(nme_jni_create_field,4); +DEFINE_PRIM(lime_jni_create_field,4); -value nme_jni_get_static(value inField) +value lime_jni_get_static(value inField) { JNIField *field; if (!AbstractToObject(inField,field)) @@ -869,61 +869,61 @@ value nme_jni_get_static(value inField) value result = field->GetStatic(); return result; } -DEFINE_PRIM(nme_jni_get_static,1); +DEFINE_PRIM(lime_jni_get_static,1); -void nme_jni_set_static(value inField, value inValue) +void lime_jni_set_static(value inField, value inValue) { JNIField *field; if (!AbstractToObject(inField,field)) return; field->SetStatic(inValue); } -DEFINE_PRIM(nme_jni_set_static,2); +DEFINE_PRIM(lime_jni_set_static,2); -value nme_jni_get_member(value inField, value inObject) +value lime_jni_get_member(value inField, value inObject) { JNIField *field; jobject object; if (!AbstractToObject(inField,field)) { - ELOG("nme_jni_get_member - not a field"); + ELOG("lime_jni_get_member - not a field"); return alloc_null(); } if (!AbstractToJObject(inObject,object)) { - ELOG("nme_jni_get_member - invalid this"); + ELOG("lime_jni_get_member - invalid this"); return alloc_null(); } return field->GetMember(object); } -DEFINE_PRIM(nme_jni_get_member,2); +DEFINE_PRIM(lime_jni_get_member,2); -void nme_jni_set_member(value inField, value inObject, value inValue) +void lime_jni_set_member(value inField, value inObject, value inValue) { JNIField *field; jobject object; if (!AbstractToObject(inField,field)) { - ELOG("nme_jni_set_member - not a field"); + ELOG("lime_jni_set_member - not a field"); return; } if (!AbstractToJObject(inObject,object)) { - ELOG("nme_jni_set_member - invalid this"); + ELOG("lime_jni_set_member - invalid this"); return; } field->SetMember(object,inValue); } -DEFINE_PRIM(nme_jni_set_member,3); +DEFINE_PRIM(lime_jni_set_member,3); -struct JNIMethod : public nme::Object +struct JNIMethod : public lime::Object { enum { MAX = 20 }; @@ -1139,19 +1139,19 @@ struct JNIMethod : public nme::Object }; -value nme_jni_create_method(value inClass, value inMethod, value inSig,value inStatic) +value lime_jni_create_method(value inClass, value inMethod, value inSig,value inStatic) { JNIMethod *method = new JNIMethod(inClass,inMethod,inSig,val_bool(inStatic) ); if (method->Ok()) return ObjectToAbstract(method); - ELOG("nme_jni_create_method - failed"); + ELOG("lime_jni_create_method - failed"); delete method; return alloc_null(); } -DEFINE_PRIM(nme_jni_create_method,4); +DEFINE_PRIM(lime_jni_create_method,4); -value nme_jni_call_static(value inMethod, value inArgs) +value lime_jni_call_static(value inMethod, value inArgs) { JNIMethod *method; if (!AbstractToObject(inMethod,method)) @@ -1159,40 +1159,40 @@ value nme_jni_call_static(value inMethod, value inArgs) value result = method->CallStatic(inArgs); return result; } -DEFINE_PRIM(nme_jni_call_static,2); +DEFINE_PRIM(lime_jni_call_static,2); -value nme_jni_call_member(value inMethod, value inObject, value inArgs) +value lime_jni_call_member(value inMethod, value inObject, value inArgs) { JNIMethod *method; jobject object; if (!AbstractToObject(inMethod,method)) { - ELOG("nme_jni_call_member - not a method"); + ELOG("lime_jni_call_member - not a method"); return alloc_null(); } if (!AbstractToJObject(inObject,object)) { - ELOG("nme_jni_call_member - invalid this"); + ELOG("lime_jni_call_member - invalid this"); return alloc_null(); } return method->CallMember(object,inArgs); } -DEFINE_PRIM(nme_jni_call_member,3); +DEFINE_PRIM(lime_jni_call_member,3); -value nme_jni_get_env() +value lime_jni_get_env() { JNIEnv *env = GetEnv(); return alloc_int((int)env); } -DEFINE_PRIM(nme_jni_get_env,0); +DEFINE_PRIM(lime_jni_get_env,0); -value nme_jni_get_jobject(value inValue) +value lime_jni_get_jobject(value inValue) { jobject obj = 0; if (AbstractToJObject(inValue,obj)) @@ -1201,19 +1201,19 @@ value nme_jni_get_jobject(value inValue) } return alloc_null(); } -DEFINE_PRIM(nme_jni_get_jobject,1); +DEFINE_PRIM(lime_jni_get_jobject,1); -value nme_post_ui_callback(value inCallback) +value lime_post_ui_callback(value inCallback) { JNIEnv *env = GetEnv(); JNIInit(env); AutoGCRoot *root = new AutoGCRoot(inCallback); - ELOG("NME set onCallback %p",root); + ELOG("lime set onCallback %p",root); env->CallStaticVoidMethod(GameActivity, postUICallback, (jlong) root); jthrowable exc = env->ExceptionOccurred(); if (exc) @@ -1226,7 +1226,7 @@ value nme_post_ui_callback(value inCallback) return alloc_null(); } -DEFINE_PRIM(nme_post_ui_callback,1); +DEFINE_PRIM(lime_post_ui_callback,1); extern "C" @@ -1239,12 +1239,12 @@ extern "C" #endif -JAVA_EXPORT void JNICALL Java_org_haxe_nme_NME_onCallback(JNIEnv * env, jobject obj, jlong handle) +JAVA_EXPORT void JNICALL Java_org_haxe_lime_Lime_onCallback(JNIEnv * env, jobject obj, jlong handle) { int top = 0; gc_set_top_of_stack(&top,true); - ELOG("NME onCallback %p",(void *)handle); + ELOG("lime onCallback %p",(void *)handle); AutoGCRoot *root = (AutoGCRoot *)handle; val_call0( root->get() ); delete root; @@ -1252,7 +1252,7 @@ JAVA_EXPORT void JNICALL Java_org_haxe_nme_NME_onCallback(JNIEnv * env, jobject } -JAVA_EXPORT jobject JNICALL Java_org_haxe_nme_NME_releaseReference(JNIEnv * env, jobject obj, jlong handle) +JAVA_EXPORT jobject JNICALL Java_org_haxe_lime_Lime_releaseReference(JNIEnv * env, jobject obj, jlong handle) { value val = (value)handle; RemoveJavaHaxeObjectRef(val); @@ -1272,14 +1272,14 @@ value CallHaxe(JNIEnv * env, jobject obj, jlong handle, jstring function, jobjec } else { - ELOG("NME CallHaxe - init not called."); + ELOG("lime CallHaxe - init not called."); return alloc_null(); } } -JAVA_EXPORT jobject JNICALL Java_org_haxe_nme_NME_callObjectFunction(JNIEnv * env, jobject obj, jlong handle, jstring function, jobject args) +JAVA_EXPORT jobject JNICALL Java_org_haxe_lime_Lime_callObjectFunction(JNIEnv * env, jobject obj, jlong handle, jstring function, jobject args) { int top = 0; gc_set_top_of_stack(&top,true); @@ -1295,7 +1295,7 @@ JAVA_EXPORT jobject JNICALL Java_org_haxe_nme_NME_callObjectFunction(JNIEnv * en } -JAVA_EXPORT jdouble JNICALL Java_org_haxe_nme_NME_callNumericFunction(JNIEnv * env, jobject obj, jlong handle, jstring function, jobject args) +JAVA_EXPORT jdouble JNICALL Java_org_haxe_lime_Lime_callNumericFunction(JNIEnv * env, jobject obj, jlong handle, jstring function, jobject args) { int top = 0; gc_set_top_of_stack(&top,true); diff --git a/project/src/platform/android/System.cpp b/project/src/platform/android/System.cpp index 160b85fef..d4ccb9857 100644 --- a/project/src/platform/android/System.cpp +++ b/project/src/platform/android/System.cpp @@ -8,18 +8,18 @@ #undef LOGV #undef LOGE -#define LOGV(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "NME::System", msg, ## args) +#define LOGV(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "lime::System", msg, ## args) -#define LOGE(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "NME::System", msg, ## args) +#define LOGE(msg,args...) __android_log_print(ANDROID_LOG_ERROR, "lime::System", msg, ## args) -namespace nme { +namespace lime { double CapabilitiesGetPixelAspectRatio () { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "CapabilitiesGetPixelAspectRatio", "()D"); if (mid == 0) return 1; @@ -32,7 +32,7 @@ namespace nme { double CapabilitiesGetScreenDPI () { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "CapabilitiesGetScreenDPI", "()D"); if (mid == 0) return 1; @@ -45,7 +45,7 @@ namespace nme { double CapabilitiesGetScreenResolutionX () { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "CapabilitiesGetScreenResolutionX", "()D"); if (mid == 0) return 1; @@ -58,7 +58,7 @@ namespace nme { double CapabilitiesGetScreenResolutionY () { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "CapabilitiesGetScreenResolutionY", "()D"); if (mid == 0) return 1; @@ -69,7 +69,7 @@ namespace nme { std::string CapabilitiesGetLanguage() { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "CapabilitiesGetLanguage", "()Ljava/lang/String;"); if(mid == 0) return std::string(""); @@ -83,7 +83,7 @@ namespace nme { void HapticVibrate (int period, int duration) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "vibrate", "(II)V"); if (mid > 0) env->CallStaticVoidMethod(cls, mid, period, duration); @@ -93,7 +93,7 @@ namespace nme { bool LaunchBrowser(const char *inUtf8URL) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "launchBrowser", "(Ljava/lang/String;)V"); if (mid == 0) return false; @@ -109,7 +109,7 @@ namespace nme { std::string GetUserPreference(const char *inId) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "getUserPreference", "(Ljava/lang/String;)Ljava/lang/String;"); if (mid == 0) { @@ -128,7 +128,7 @@ namespace nme { bool SetUserPreference(const char *inId, const char *inPreference) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "setUserPreference", "(Ljava/lang/String;Ljava/lang/String;)V"); if (mid == 0) return false; @@ -145,7 +145,7 @@ namespace nme { bool ClearUserPreference(const char *inId) { JNIEnv *env = GetEnv(); - jclass cls = FindClass("org/haxe/nme/GameActivity"); + jclass cls = FindClass("org/haxe/lime/GameActivity"); jmethodID mid = env->GetStaticMethodID(cls, "clearUserPreference", "(Ljava/lang/String;)V"); if (mid == 0) return false; diff --git a/project/src/platform/blackberry/System.cpp b/project/src/platform/blackberry/System.cpp index 1f7d762ff..757d6bdc0 100644 --- a/project/src/platform/blackberry/System.cpp +++ b/project/src/platform/blackberry/System.cpp @@ -13,7 +13,7 @@ #include #include -namespace nme { +namespace lime { std::string CapabilitiesGetLanguage () { diff --git a/project/src/platform/cocoa/FileManager.mm b/project/src/platform/cocoa/FileManager.mm index 50ee3c6fc..c62fa0e4f 100644 --- a/project/src/platform/cocoa/FileManager.mm +++ b/project/src/platform/cocoa/FileManager.mm @@ -171,7 +171,7 @@ NSString * const DirectoryLocationDomain = @"DirectoryLocationDomain"; @end -namespace nme +namespace lime { std::string GetApplicationSupportDirectory() diff --git a/project/src/platform/emscripten/System.cpp b/project/src/platform/emscripten/System.cpp index c9d356df0..4a420bc41 100644 --- a/project/src/platform/emscripten/System.cpp +++ b/project/src/platform/emscripten/System.cpp @@ -1,7 +1,7 @@ #include #include -namespace nme { +namespace lime { std::string CapabilitiesGetLanguage () { diff --git a/project/src/platform/ios/NativeFont.mm b/project/src/platform/ios/NativeFont.mm index 67b98269a..f5fbd1fdb 100644 --- a/project/src/platform/ios/NativeFont.mm +++ b/project/src/platform/ios/NativeFont.mm @@ -1,7 +1,7 @@ #include #include -namespace nme +namespace lime { FontFace *FontFace::CreateNative(const TextFormat &inFormat,double inScale) diff --git a/project/src/platform/ios/Sound.mm b/project/src/platform/ios/Sound.mm index c14ae90b9..74baaf808 100644 --- a/project/src/platform/ios/Sound.mm +++ b/project/src/platform/ios/Sound.mm @@ -72,7 +72,7 @@ @end -namespace nme +namespace lime { @@ -481,4 +481,4 @@ namespace nme } -} // end namespace nme \ No newline at end of file +} // end namespace lime \ No newline at end of file diff --git a/project/src/platform/ios/SurfaceIO.mm b/project/src/platform/ios/SurfaceIO.mm index f9d06c01a..d1571dd3d 100644 --- a/project/src/platform/ios/SurfaceIO.mm +++ b/project/src/platform/ios/SurfaceIO.mm @@ -3,7 +3,7 @@ #include -namespace nme { +namespace lime { Surface *FromImage(UIImage *image) { diff --git a/project/src/platform/ios/System.mm b/project/src/platform/ios/System.mm index 024c58cbb..09334dcd9 100644 --- a/project/src/platform/ios/System.mm +++ b/project/src/platform/ios/System.mm @@ -2,7 +2,7 @@ #import #include -namespace nme { +namespace lime { bool LaunchBrowser(const char *inUtf8URL) { diff --git a/project/src/platform/ios/UIStageView.mm b/project/src/platform/ios/UIStageView.mm index d984024a9..95a31a219 100644 --- a/project/src/platform/ios/UIStageView.mm +++ b/project/src/platform/ios/UIStageView.mm @@ -25,15 +25,15 @@ #import #import -using namespace nme; +using namespace lime; void EnableKeyboard(bool inEnable); -extern "C" void nme_app_set_active(bool inActive); +extern "C" void lime_app_set_active(bool inActive); -namespace nme { int gFixedOrientation = -1; } +namespace lime { int gFixedOrientation = -1; } -@interface NMEAppDelegate : NSObject +@interface LimeAppDelegate : NSObject { UIWindow *window; UIViewController *controller; @@ -145,9 +145,9 @@ public: AlphaMode GetAlphaMode() const { return amStraight; } const uint8 *GetBase() const { return (const uint8 *)mBuffer; } int GetStride() const { return mWidth*4; } - void Clear(uint32 inColour,const nme::Rect *inRect) + void Clear(uint32 inColour,const lime::Rect *inRect) { - nme::Rect r = inRect ? *inRect : nme::Rect(Width(),Height()); + lime::Rect r = inRect ? *inRect : lime::Rect(Width(),Height()); int y1 = r.y1(); //printf("Clear %d,%d %dx%d %08x\n", r.x, r.y, r.w, r.h, inColour); for(int y=r.y;ymStage; } void StartAnimation() { - NMEAppDelegate *appDelegate = (NMEAppDelegate *)[[UIApplication sharedApplication] delegate]; + LimeAppDelegate *appDelegate = (LimeAppDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate startAnimation]; } void PauseAnimation() { - NMEAppDelegate *appDelegate = (NMEAppDelegate *)[[UIApplication sharedApplication] delegate]; + LimeAppDelegate *appDelegate = (LimeAppDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate pauseAnimation]; } void ResumeAnimation() { - NMEAppDelegate *appDelegate = (NMEAppDelegate *)[[UIApplication sharedApplication] delegate]; + LimeAppDelegate *appDelegate = (LimeAppDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate resumeAnimation]; } void StopAnimation() { - NMEAppDelegate *appDelegate = (NMEAppDelegate *)[[UIApplication sharedApplication] delegate]; + LimeAppDelegate *appDelegate = (LimeAppDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate stopAnimation]; } void SetNextWakeUp(double inWakeUp) { sgWakeUp = inWakeUp; } @@ -1498,7 +1498,7 @@ void CreateMainFrame(FrameCreationCallback inCallback, #ifndef OBJC_ARC NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; #endif - UIApplicationMain(argc, argv, nil, @"NMEAppDelegate"); + UIApplicationMain(argc, argv, nil, @"LimeAppDelegate"); #ifndef OBJC_ARC [pool release]; #endif @@ -1590,7 +1590,7 @@ FILE *OpenOverwrite(const char *inName) extern "C" { -void nme_app_set_active(bool inActive) +void lime_app_set_active(bool inActive) { if (IPhoneGetStage()) { @@ -1599,9 +1599,9 @@ void nme_app_set_active(bool inActive) } if (inActive) - nme::StartAnimation(); + lime::StartAnimation(); else - nme::StopAnimation(); + lime::StopAnimation(); } diff --git a/project/src/platform/linux/NativeFont.cpp b/project/src/platform/linux/NativeFont.cpp index cc8419a74..b08768329 100644 --- a/project/src/platform/linux/NativeFont.cpp +++ b/project/src/platform/linux/NativeFont.cpp @@ -1,6 +1,6 @@ #include -namespace nme +namespace lime { FontFace *FontFace::CreateNative(const TextFormat &inFormat,double inScale) diff --git a/project/src/platform/linux/System.cpp b/project/src/platform/linux/System.cpp index 4e4d060b8..99471d0ef 100644 --- a/project/src/platform/linux/System.cpp +++ b/project/src/platform/linux/System.cpp @@ -8,7 +8,7 @@ using namespace std; -namespace nme { +namespace lime { std::string CapabilitiesGetLanguage () { diff --git a/project/src/platform/mac/NSFont.cpp b/project/src/platform/mac/NSFont.cpp index cc8419a74..b08768329 100644 --- a/project/src/platform/mac/NSFont.cpp +++ b/project/src/platform/mac/NSFont.cpp @@ -1,6 +1,6 @@ #include -namespace nme +namespace lime { FontFace *FontFace::CreateNative(const TextFormat &inFormat,double inScale) diff --git a/project/src/platform/mac/System.mm b/project/src/platform/mac/System.mm index 24d67ad22..d7d55b54e 100644 --- a/project/src/platform/mac/System.mm +++ b/project/src/platform/mac/System.mm @@ -5,7 +5,7 @@ #include #include -namespace nme { +namespace lime { bool LaunchBrowser(const char *inUtf8URL) { diff --git a/project/src/platform/tizen/TizenApplication.cpp b/project/src/platform/tizen/TizenApplication.cpp index 0b9dbf074..86976af4d 100644 --- a/project/src/platform/tizen/TizenApplication.cpp +++ b/project/src/platform/tizen/TizenApplication.cpp @@ -4,7 +4,7 @@ using namespace Tizen::Graphics::Opengl; -namespace nme { +namespace lime { FrameCreationCallback sgCallback; @@ -137,7 +137,7 @@ namespace nme { mForm->AddKeyEventListener (*this); - bool ok = nmeEGLCreate (mForm, sgWidth, sgHeight, 2, (sgFlags & wfDepthBuffer) ? 16 : 0, (sgFlags & wfStencilBuffer) ? 8 : 0, 0); + bool ok = limeEGLCreate (mForm, sgWidth, sgHeight, 2, (sgFlags & wfDepthBuffer) ? 16 : 0, (sgFlags & wfStencilBuffer) ? 8 : 0, 0); //AppLog ("EGL OK? %d\n", ok); mTimer = new (std::nothrow) Tizen::Base::Runtime::Timer; diff --git a/project/src/platform/tizen/TizenFrame.cpp b/project/src/platform/tizen/TizenFrame.cpp index db53ba193..761d07820 100644 --- a/project/src/platform/tizen/TizenFrame.cpp +++ b/project/src/platform/tizen/TizenFrame.cpp @@ -1,7 +1,7 @@ #include "platform/tizen/TizenFrame.h" -namespace nme { +namespace lime { TizenFrame::TizenFrame (int inW, int inH) { diff --git a/project/src/platform/tizen/TizenStage.cpp b/project/src/platform/tizen/TizenStage.cpp index 291261f84..4ee90ea9a 100644 --- a/project/src/platform/tizen/TizenStage.cpp +++ b/project/src/platform/tizen/TizenStage.cpp @@ -5,7 +5,7 @@ #include -namespace nme { +namespace lime { TizenStage::TizenStage (int inWidth, int inHeight) { @@ -56,7 +56,7 @@ namespace nme { //AppLog ("Flip!"); - nmeEGLSwapBuffers (); + limeEGLSwapBuffers (); } diff --git a/project/src/platform/tizen/TizenUIApp.cpp b/project/src/platform/tizen/TizenUIApp.cpp index c54ef46aa..2f004d4f7 100644 --- a/project/src/platform/tizen/TizenUIApp.cpp +++ b/project/src/platform/tizen/TizenUIApp.cpp @@ -10,7 +10,7 @@ //using namespace Tizen::Ui::Controls; -namespace nme { +namespace lime { FrameCreationCallback sgCallback; diff --git a/project/src/platform/tizen/TizenUIFrame.cpp b/project/src/platform/tizen/TizenUIFrame.cpp index 9b6ac83a3..23df15ebb 100644 --- a/project/src/platform/tizen/TizenUIFrame.cpp +++ b/project/src/platform/tizen/TizenUIFrame.cpp @@ -6,7 +6,7 @@ //using namespace Tizen::Ui::Controls; -namespace nme { +namespace lime { TizenUIFrame::TizenUIFrame (void) {} diff --git a/project/src/platform/webos/System.cpp b/project/src/platform/webos/System.cpp index 6b3bcd677..f5ffccf1a 100644 --- a/project/src/platform/webos/System.cpp +++ b/project/src/platform/webos/System.cpp @@ -4,7 +4,7 @@ #include -namespace nme { +namespace lime { AutoGCRoot *sExternalInterfaceHandler = 0; diff --git a/project/src/platform/windows/GDIFont.cpp b/project/src/platform/windows/GDIFont.cpp index 570654fa8..4e72dc394 100644 --- a/project/src/platform/windows/GDIFont.cpp +++ b/project/src/platform/windows/GDIFont.cpp @@ -6,7 +6,7 @@ #undef min #endif -namespace nme +namespace lime { static HDC sgFontDC = 0; @@ -174,4 +174,4 @@ FontFace *FontFace::CreateNative(const TextFormat &inFormat,double inScale) return new GDIFont(hfont,height); } -} // end namespace nme +} // end namespace lime diff --git a/project/src/platform/windows/SimpleFrame.cpp b/project/src/platform/windows/SimpleFrame.cpp index 30f24f0d5..bbec57bc2 100644 --- a/project/src/platform/windows/SimpleFrame.cpp +++ b/project/src/platform/windows/SimpleFrame.cpp @@ -9,7 +9,7 @@ #include -namespace nme +namespace lime { // --- DIB ------------------------------------------------------------------------ @@ -516,7 +516,7 @@ void CreateMainFrame(FrameCreationCallback inOnCreate,int inWidth,int inHeight,u wc.hCursor = LoadCursor(0,IDC_ARROW); wc.hbrBackground = 0; //(HBRUSH)GetStockObject(WHITE_BRUSH); wc.lpfnWndProc = DefWindowProc; - wc.lpszClassName = "NME"; + wc.lpszClassName = "lime"; RegisterClassEx(&wc); @@ -531,7 +531,7 @@ void CreateMainFrame(FrameCreationCallback inOnCreate,int inWidth,int inHeight,u AdjustWindowRect (& r, style, FALSE); - HWND win = CreateWindowEx(ex_style, "NME", inTitle, + HWND win = CreateWindowEx(ex_style, "lime", inTitle, style, r.left, r.top, r.right-r.left, r.bottom-r.top, 0, @@ -578,4 +578,4 @@ void StartAnimation() } } -} // end namespace nme +} // end namespace lime diff --git a/project/src/platform/windows/System.cpp b/project/src/platform/windows/System.cpp index c9ac16058..79fe0a741 100644 --- a/project/src/platform/windows/System.cpp +++ b/project/src/platform/windows/System.cpp @@ -5,7 +5,7 @@ #include #include -namespace nme { +namespace lime { bool LaunchBrowser(const char *inUtf8URL) { diff --git a/project/src/platform/winrt/DX11Context.cpp b/project/src/platform/winrt/DX11Context.cpp index 8f73b5973..3e7dcd0a6 100644 --- a/project/src/platform/winrt/DX11Context.cpp +++ b/project/src/platform/winrt/DX11Context.cpp @@ -26,7 +26,7 @@ using namespace Microsoft::WRL; using namespace concurrency; using namespace DirectX; -namespace nme +namespace lime { @@ -253,4 +253,4 @@ HardwareContext *HardwareContext::CreateDX11(void *inDevice, void *inContext) return new DX11Context(inDevice,inContext); } -} // end namespace nme +} // end namespace lime diff --git a/project/src/platform/winrt/DX11Font.cpp b/project/src/platform/winrt/DX11Font.cpp index 1f9e2e24e..756b5d4f7 100644 --- a/project/src/platform/winrt/DX11Font.cpp +++ b/project/src/platform/winrt/DX11Font.cpp @@ -1,6 +1,6 @@ #include -namespace nme +namespace lime { FontFace *FontFace::CreateNative(const TextFormat &inFormat,double inScale) @@ -9,4 +9,4 @@ FontFace *FontFace::CreateNative(const TextFormat &inFormat,double inScale) } -} // end namespace nme +} // end namespace lime diff --git a/project/src/platform/winrt/MediaFoundation.cpp b/project/src/platform/winrt/MediaFoundation.cpp index 5acb7a218..d92b1fc57 100644 --- a/project/src/platform/winrt/MediaFoundation.cpp +++ b/project/src/platform/winrt/MediaFoundation.cpp @@ -3,7 +3,7 @@ #include -namespace nme +namespace lime { class MFSoundChannel : public SoundChannel diff --git a/project/src/platform/winrt/ShaderData.cpp b/project/src/platform/winrt/ShaderData.cpp index 068d43baf..b036bcb23 100644 --- a/project/src/platform/winrt/ShaderData.cpp +++ b/project/src/platform/winrt/ShaderData.cpp @@ -18,7 +18,7 @@ static const D3D11_INPUT_ELEMENT_DESC posTex[] = }; -ComPtr nmeCreateVertexShader( +ComPtr limeCreateVertexShader( ComPtr inDevice, ComPtr &outLayout, ShaderId inShader) @@ -52,7 +52,7 @@ ComPtr nmeCreateVertexShader( -ComPtr nmeCreatePixelShader(ComPtr inDevice, ShaderId inShader) +ComPtr limeCreatePixelShader(ComPtr inDevice, ShaderId inShader) { const BYTE *data = 0; int len = 0; diff --git a/project/src/platform/winrt/Shaders.h b/project/src/platform/winrt/Shaders.h index 3914021fb..16ff1a088 100644 --- a/project/src/platform/winrt/Shaders.h +++ b/project/src/platform/winrt/Shaders.h @@ -10,12 +10,12 @@ enum ShaderId }; -Microsoft::WRL::ComPtr nmeCreateVertexShader( +Microsoft::WRL::ComPtr limeCreateVertexShader( Microsoft::WRL::ComPtr inDevice, Microsoft::WRL::ComPtr &outLayout, ShaderId inShader); -Microsoft::WRL::ComPtr nmeCreatePixelShader(Microsoft::WRL::ComPtr inDevice, ShaderId inShader); +Microsoft::WRL::ComPtr limeCreatePixelShader(Microsoft::WRL::ComPtr inDevice, ShaderId inShader); diff --git a/project/src/platform/winrt/System.cpp b/project/src/platform/winrt/System.cpp index 6e4d8d247..59184a33a 100644 --- a/project/src/platform/winrt/System.cpp +++ b/project/src/platform/winrt/System.cpp @@ -2,7 +2,7 @@ #include #include -namespace nme +namespace lime { bool LaunchBrowser(const char *inUtf8URL) diff --git a/project/src/platform/winrt/URL.cpp b/project/src/platform/winrt/URL.cpp index 829644520..e1c65dcff 100644 --- a/project/src/platform/winrt/URL.cpp +++ b/project/src/platform/winrt/URL.cpp @@ -1,6 +1,6 @@ #include -namespace nme +namespace lime { diff --git a/project/src/platform/winrt/WinRTStage.cpp b/project/src/platform/winrt/WinRTStage.cpp index d2d130520..252d723dc 100644 --- a/project/src/platform/winrt/WinRTStage.cpp +++ b/project/src/platform/winrt/WinRTStage.cpp @@ -13,7 +13,7 @@ #include "Direct3DBase.h" #include "Shaders.h" -//using namespace nme; +//using namespace lime; using namespace Windows::ApplicationModel; using namespace Windows::ApplicationModel::Core; @@ -27,7 +27,7 @@ using namespace concurrency; using namespace DirectX; -namespace nme +namespace lime { @@ -129,8 +129,8 @@ public: Quad( ComPtr inDevice, ComPtr inContext) : device(inDevice), context(inContext) { - m_vertexShader = nmeCreateVertexShader(inDevice,m_inputLayout,vsSimple); - m_pixelShader = nmeCreatePixelShader(inDevice,psSimple); + m_vertexShader = limeCreateVertexShader(inDevice,m_inputLayout,vsSimple); + m_pixelShader = limeCreatePixelShader(inDevice,psSimple); CD3D11_BUFFER_DESC constantBufferDesc(sizeof(ModelViewProjectionConstantBuffer), D3D11_BIND_CONSTANT_BUFFER); @@ -329,7 +329,7 @@ public: //mDXContext->SetWindowSize(inWidth,inHeight); gTextureContextVersion++; - //nme_resize_id ++; + //lime_resize_id ++; mDXContext->DecRef(); mDXContext = HardwareContext::CreateDX11(m_d3dDevice.Get(), m_d3dContext.Get()); mDXContext->SetWindowSize(inWidth, inHeight); @@ -497,7 +497,7 @@ public: -} // end namespace nme +} // end namespace lime @@ -530,14 +530,14 @@ public: delete mFrame; } - void bootNME() + void bootlime() { - mFrame = new nme::WinRTFrame(flags,width,height); + mFrame = new lime::WinRTFrame(flags,width,height); mStage = mFrame->mStage; - if (nme::sgOnFrame) + if (lime::sgOnFrame) { - nme::sgOnFrame(mFrame); - nme::sgOnFrame = 0; + lime::sgOnFrame(mFrame); + lime::sgOnFrame = 0; } } @@ -553,7 +553,7 @@ public: CoreApplication::Resuming += ref new ::EventHandler(this, &D3DApp::OnResuming); - bootNME(); + bootlime(); } virtual void SetWindow(Windows::UI::Core::CoreWindow^ window) @@ -662,8 +662,8 @@ protected: } private: - nme::WinRTFrame *mFrame; - nme::WinRTStage *mStage; + lime::WinRTFrame *mFrame; + lime::WinRTStage *mStage; bool m_windowClosed; bool m_windowVisible; }; @@ -694,15 +694,15 @@ public: }; -// --- External NME code --------------------------------- +// --- External lime code --------------------------------- -namespace nme +namespace lime { -void CreateMainFrame(nme::FrameCreationCallback inOnFrame,int inWidth,int inHeight, - unsigned int inFlags, const char *inTitle, nme::Surface *inIcon ) +void CreateMainFrame(lime::FrameCreationCallback inOnFrame,int inWidth,int inHeight, + unsigned int inFlags, const char *inTitle, lime::Surface *inIcon ) { sgOnFrame = inOnFrame; auto appSource = ref new D3DAppSource(inWidth,inHeight,inFlags); diff --git a/project/src/renderer/common/BitmapCache.cpp b/project/src/renderer/common/BitmapCache.cpp index b1d96e013..fecf0c9a4 100644 --- a/project/src/renderer/common/BitmapCache.cpp +++ b/project/src/renderer/common/BitmapCache.cpp @@ -1,7 +1,7 @@ #include "renderer/common/BitmapCache.h" -namespace nme { +namespace lime { static int sBitmapVersion = 1; diff --git a/project/src/renderer/common/HardwareSurface.cpp b/project/src/renderer/common/HardwareSurface.cpp index 1b4c51568..cdb9c5476 100644 --- a/project/src/renderer/common/HardwareSurface.cpp +++ b/project/src/renderer/common/HardwareSurface.cpp @@ -1,7 +1,7 @@ #include "renderer/common/HardwareSurface.h" -namespace nme { +namespace lime { HardwareSurface::HardwareSurface (HardwareContext *inContext) { diff --git a/project/src/renderer/common/SimpleSurface.cpp b/project/src/renderer/common/SimpleSurface.cpp index 0fee0ca88..58015172e 100644 --- a/project/src/renderer/common/SimpleSurface.cpp +++ b/project/src/renderer/common/SimpleSurface.cpp @@ -2,7 +2,7 @@ #include "renderer/common/BlendMode.h" -namespace nme { +namespace lime { SimpleSurface::SimpleSurface (int inWidth, int inHeight, PixelFormat inPixelFormat, int inByteAlign, int inGPUFormat) { @@ -426,10 +426,10 @@ namespace nme { void SimpleSurface::createHardwareSurface () { - if (nme::HardwareContext::current == NULL) + if (lime::HardwareContext::current == NULL) printf ("Null Hardware Context"); else - GetOrCreateTexture (*nme::HardwareContext::current); + GetOrCreateTexture (*lime::HardwareContext::current); } diff --git a/project/src/renderer/common/Surface.cpp b/project/src/renderer/common/Surface.cpp index f4d308d11..43c91460d 100644 --- a/project/src/renderer/common/Surface.cpp +++ b/project/src/renderer/common/Surface.cpp @@ -1,7 +1,7 @@ #include "renderer/common/Surface.h" -namespace nme { +namespace lime { int gTextureContextVersion = 1; diff --git a/project/src/renderer/opengl/Egl.cpp b/project/src/renderer/opengl/Egl.cpp index d393addc2..29dbb154c 100644 --- a/project/src/renderer/opengl/Egl.cpp +++ b/project/src/renderer/opengl/Egl.cpp @@ -39,7 +39,7 @@ int g_eglVersion = 1; #endif -void nmeEGLDestroy() +void limeEGLDestroy() { if (g_eglContext) { @@ -53,14 +53,14 @@ void nmeEGLDestroy() } } -void nmeEGLSwapBuffers() +void limeEGLSwapBuffers() { eglSwapBuffers(g_eglDisplay, g_eglSurface); } -bool nmeEGLResize(void *inWindow, int &ioWidth, int &ioHeight) +bool limeEGLResize(void *inWindow, int &ioWidth, int &ioHeight) { - nmeEGLDestroy(); + limeEGLDestroy(); //printf("eglCreateWindowSurface %p %p %p\n", g_eglDisplay, g_eglConfig, inX11Window); @@ -148,7 +148,7 @@ bool nmeEGLResize(void *inWindow, int &ioWidth, int &ioHeight) } -bool nmeEGLCreate(void *inWindow, int &ioWidth, int &ioHeight, +bool limeEGLCreate(void *inWindow, int &ioWidth, int &ioHeight, int inOGLESVersion, int inDepthBits, int inStencilBits, @@ -220,5 +220,5 @@ bool nmeEGLCreate(void *inWindow, int &ioWidth, int &ioHeight, g_eglVersion = inOGLESVersion; - return nmeEGLResize(inWindow, ioWidth, ioHeight); + return limeEGLResize(inWindow, ioWidth, ioHeight); } diff --git a/project/src/renderer/opengl/OGLExport.cpp b/project/src/renderer/opengl/OGLExport.cpp index fdeaad310..85579acab 100644 --- a/project/src/renderer/opengl/OGLExport.cpp +++ b/project/src/renderer/opengl/OGLExport.cpp @@ -15,81 +15,81 @@ #include #include "renderer/opengl/OGL.h" -using namespace nme; +using namespace lime; -#ifndef NME_FORCE_GLES1 +#ifndef LIME_FORCE_GLES1 #define INT(a) val_int(arg[a]) // --- General ------------------------------------------- -value nme_gl_get_error() +value lime_gl_get_error() { return alloc_int( glGetError() ); } -DEFINE_PRIM(nme_gl_get_error,0); +DEFINE_PRIM(lime_gl_get_error,0); -value nme_gl_finish() +value lime_gl_finish() { glFinish(); return alloc_null(); } -DEFINE_PRIM(nme_gl_finish,0); +DEFINE_PRIM(lime_gl_finish,0); -value nme_gl_flush() +value lime_gl_flush() { glFlush(); return alloc_null(); } -DEFINE_PRIM(nme_gl_flush,0); +DEFINE_PRIM(lime_gl_flush,0); -value nme_gl_version() +value lime_gl_version() { return alloc_int( gTextureContextVersion ); } -DEFINE_PRIM(nme_gl_version,0); +DEFINE_PRIM(lime_gl_version,0); -value nme_gl_enable(value inCap) +value lime_gl_enable(value inCap) { glEnable(val_int(inCap)); return alloc_null(); } -DEFINE_PRIM(nme_gl_enable,1); +DEFINE_PRIM(lime_gl_enable,1); -value nme_gl_disable(value inCap) +value lime_gl_disable(value inCap) { glDisable(val_int(inCap)); return alloc_null(); } -DEFINE_PRIM(nme_gl_disable,1); +DEFINE_PRIM(lime_gl_disable,1); -value nme_gl_hint(value inTarget, value inValue) +value lime_gl_hint(value inTarget, value inValue) { glHint(val_int(inTarget),val_int(inValue)); return alloc_null(); } -DEFINE_PRIM(nme_gl_hint,2); +DEFINE_PRIM(lime_gl_hint,2); -value nme_gl_line_width(value inWidth) +value lime_gl_line_width(value inWidth) { glLineWidth(val_number(inWidth)); return alloc_null(); } -DEFINE_PRIM(nme_gl_line_width,1); +DEFINE_PRIM(lime_gl_line_width,1); -value nme_gl_get_context_attributes() +value lime_gl_get_context_attributes() { value result = alloc_empty_object( ); @@ -100,9 +100,9 @@ value nme_gl_get_context_attributes() alloc_field(result,val_id("antialias"),alloc_bool(true)); return result; } -DEFINE_PRIM(nme_gl_get_context_attributes,0); +DEFINE_PRIM(lime_gl_get_context_attributes,0); -value nme_gl_get_supported_extensions(value ioList) +value lime_gl_get_supported_extensions(value ioList) { const char *ext = (const char *)glGetString(GL_EXTENSIONS); if (ext && *ext) @@ -120,18 +120,18 @@ value nme_gl_get_supported_extensions(value ioList) } return alloc_null(); } -DEFINE_PRIM(nme_gl_get_supported_extensions,1); +DEFINE_PRIM(lime_gl_get_supported_extensions,1); -value nme_gl_front_face(value inFace) +value lime_gl_front_face(value inFace) { glFrontFace(val_int(inFace)); return alloc_null(); } -DEFINE_PRIM(nme_gl_front_face,1); +DEFINE_PRIM(lime_gl_front_face,1); -value nme_gl_get_parameter(value pname_val) +value lime_gl_get_parameter(value pname_val) { int floats = 0; int ints = 0; @@ -295,14 +295,14 @@ value nme_gl_get_parameter(value pname_val) return alloc_null(); } -DEFINE_PRIM(nme_gl_get_parameter,1); +DEFINE_PRIM(lime_gl_get_parameter,1); // --- Is ------------------------------------------- #define GL_IS(name,Name) \ - value nme_gl_is_##name(value val) { return alloc_bool(glIs##Name(val_int(val))); } \ - DEFINE_PRIM(nme_gl_is_##name,1); + value lime_gl_is_##name(value val) { return alloc_bool(glIs##Name(val_int(val))); } \ + DEFINE_PRIM(lime_gl_is_##name,1); GL_IS(buffer,Buffer) GL_IS(enabled,Enabled) @@ -310,21 +310,21 @@ GL_IS(program,Program) //GL_IS(framebuffer,Framebuffer) //GL_IS(renderbuffer,Renderbuffer) -value nme_gl_is_framebuffer(value val) { +value lime_gl_is_framebuffer(value val) { #ifndef HX_LINUX if (&glIsFramebuffer) return alloc_bool(glIsFramebuffer(val_int(val))); #endif return alloc_bool(false); } -DEFINE_PRIM(nme_gl_is_framebuffer,1); +DEFINE_PRIM(lime_gl_is_framebuffer,1); -value nme_gl_is_renderbuffer(value val) { +value lime_gl_is_renderbuffer(value val) { #ifndef HX_LINUX if (&glIsRenderbuffer) return alloc_bool(glIsRenderbuffer(val_int(val))); #endif return alloc_bool(false); } -DEFINE_PRIM(nme_gl_is_renderbuffer,1); +DEFINE_PRIM(lime_gl_is_renderbuffer,1); GL_IS(shader,Shader) GL_IS(texture,Texture) @@ -332,182 +332,182 @@ GL_IS(texture,Texture) // --- Stencil ------------------------------------------- -value nme_gl_stencil_func(value func, value ref, value mask) +value lime_gl_stencil_func(value func, value ref, value mask) { glStencilFunc(val_int(func),val_int(ref),val_int(mask)); return alloc_null(); } -DEFINE_PRIM(nme_gl_stencil_func,3); +DEFINE_PRIM(lime_gl_stencil_func,3); -value nme_gl_stencil_func_separate(value face,value func, value ref, value mask) +value lime_gl_stencil_func_separate(value face,value func, value ref, value mask) { glStencilFuncSeparate(val_int(face),val_int(func),val_int(ref),val_int(mask)); return alloc_null(); } -DEFINE_PRIM(nme_gl_stencil_func_separate,4); +DEFINE_PRIM(lime_gl_stencil_func_separate,4); -value nme_gl_stencil_mask(value mask) +value lime_gl_stencil_mask(value mask) { glStencilMask(val_int(mask)); return alloc_null(); } -DEFINE_PRIM(nme_gl_stencil_mask,1); +DEFINE_PRIM(lime_gl_stencil_mask,1); -value nme_gl_stencil_mask_separate(value face,value mask) +value lime_gl_stencil_mask_separate(value face,value mask) { glStencilMaskSeparate(val_int(face),val_int(mask)); return alloc_null(); } -DEFINE_PRIM(nme_gl_stencil_mask_separate,2); +DEFINE_PRIM(lime_gl_stencil_mask_separate,2); -value nme_gl_stencil_op(value fail,value zfail, value zpass) +value lime_gl_stencil_op(value fail,value zfail, value zpass) { glStencilOp(val_int(fail),val_int(zfail),val_int(zpass)); return alloc_null(); } -DEFINE_PRIM(nme_gl_stencil_op,3); +DEFINE_PRIM(lime_gl_stencil_op,3); -value nme_gl_stencil_op_separate(value face,value fail,value zfail, value zpass) +value lime_gl_stencil_op_separate(value face,value fail,value zfail, value zpass) { glStencilOpSeparate(val_int(face),val_int(fail),val_int(zfail),val_int(zpass)); return alloc_null(); } -DEFINE_PRIM(nme_gl_stencil_op_separate,4); +DEFINE_PRIM(lime_gl_stencil_op_separate,4); // --- Blend ------------------------------------------- -value nme_gl_blend_color(value r, value g, value b, value a) +value lime_gl_blend_color(value r, value g, value b, value a) { glBlendColor(val_number(r),val_number(g),val_number(b), val_number(a)); return alloc_null(); } -DEFINE_PRIM(nme_gl_blend_color,4); +DEFINE_PRIM(lime_gl_blend_color,4); -value nme_gl_blend_equation(value mode) +value lime_gl_blend_equation(value mode) { glBlendEquation(val_int(mode)); return alloc_null(); } -DEFINE_PRIM(nme_gl_blend_equation,1); +DEFINE_PRIM(lime_gl_blend_equation,1); -value nme_gl_blend_equation_separate(value rgb, value a) +value lime_gl_blend_equation_separate(value rgb, value a) { #ifndef HX_LINUX glBlendEquationSeparate(val_int(rgb), val_int(a)); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_blend_equation_separate,2); +DEFINE_PRIM(lime_gl_blend_equation_separate,2); -value nme_gl_blend_func(value s, value d) +value lime_gl_blend_func(value s, value d) { glBlendFunc(val_int(s), val_int(d)); return alloc_null(); } -DEFINE_PRIM(nme_gl_blend_func,2); +DEFINE_PRIM(lime_gl_blend_func,2); -value nme_gl_blend_func_separate(value srgb, value drgb, value sa, value da) +value lime_gl_blend_func_separate(value srgb, value drgb, value sa, value da) { #ifndef HX_LINUX glBlendFuncSeparate(val_int(srgb), val_int(drgb), val_int(sa), val_int(da) ); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_blend_func_separate,4); +DEFINE_PRIM(lime_gl_blend_func_separate,4); // --- Program ------------------------------------------- -value nme_gl_create_program() +value lime_gl_create_program() { int result = glCreateProgram(); return alloc_int(result); } -DEFINE_PRIM(nme_gl_create_program,0); +DEFINE_PRIM(lime_gl_create_program,0); -value nme_gl_link_program(value inId) +value lime_gl_link_program(value inId) { int id = val_int(inId); glLinkProgram(id); return alloc_null(); } -DEFINE_PRIM(nme_gl_link_program,1); +DEFINE_PRIM(lime_gl_link_program,1); -value nme_gl_validate_program(value inId) +value lime_gl_validate_program(value inId) { int id = val_int(inId); glValidateProgram(id); return alloc_null(); } -DEFINE_PRIM(nme_gl_validate_program,1); +DEFINE_PRIM(lime_gl_validate_program,1); -value nme_gl_get_program_info_log(value inId) +value lime_gl_get_program_info_log(value inId) { char buf[1024]; int id = val_int(inId); glGetProgramInfoLog(id,1024,0,buf); return alloc_string(buf); } -DEFINE_PRIM(nme_gl_get_program_info_log,1); +DEFINE_PRIM(lime_gl_get_program_info_log,1); -value nme_gl_delete_program(value inId) +value lime_gl_delete_program(value inId) { int id = val_int(inId); glDeleteProgram(id); return alloc_null(); } -DEFINE_PRIM(nme_gl_delete_program,1); +DEFINE_PRIM(lime_gl_delete_program,1); -value nme_gl_bind_attrib_location(value inId,value inSlot,value inName) +value lime_gl_bind_attrib_location(value inId,value inSlot,value inName) { int id = val_int(inId); glBindAttribLocation(id,val_int(inSlot),val_string(inName)); return alloc_null(); } -DEFINE_PRIM(nme_gl_bind_attrib_location,3); +DEFINE_PRIM(lime_gl_bind_attrib_location,3); -value nme_gl_get_attrib_location(value inId,value inName) +value lime_gl_get_attrib_location(value inId,value inName) { int id = val_int(inId); return alloc_int(glGetAttribLocation(id,val_string(inName))); } -DEFINE_PRIM(nme_gl_get_attrib_location,2); +DEFINE_PRIM(lime_gl_get_attrib_location,2); -value nme_gl_get_uniform_location(value inId,value inName) +value lime_gl_get_uniform_location(value inId,value inName) { int id = val_int(inId); return alloc_int(glGetUniformLocation(id,val_string(inName))); } -DEFINE_PRIM(nme_gl_get_uniform_location,2); +DEFINE_PRIM(lime_gl_get_uniform_location,2); -value nme_gl_get_uniform(value inId,value inLocation) +value lime_gl_get_uniform(value inId,value inLocation) { int id = val_int(inId); int loc = val_int(inLocation); @@ -596,30 +596,30 @@ value nme_gl_get_uniform(value inId,value inLocation) return alloc_null(); } -DEFINE_PRIM(nme_gl_get_uniform,2); +DEFINE_PRIM(lime_gl_get_uniform,2); -value nme_gl_get_program_parameter(value inId,value inName) +value lime_gl_get_program_parameter(value inId,value inName) { int id = val_int(inId); int result = 0; glGetProgramiv(id, val_int(inName), &result); return alloc_int(result); } -DEFINE_PRIM(nme_gl_get_program_parameter,2); +DEFINE_PRIM(lime_gl_get_program_parameter,2); -value nme_gl_use_program(value inId) +value lime_gl_use_program(value inId) { int id = val_int(inId); glUseProgram(id); return alloc_null(); } -DEFINE_PRIM(nme_gl_use_program,1); +DEFINE_PRIM(lime_gl_use_program,1); -value nme_gl_get_active_attrib(value inProg, value inIndex) +value lime_gl_get_active_attrib(value inProg, value inIndex) { int id = val_int(inProg); value result = alloc_empty_object( ); @@ -637,10 +637,10 @@ value nme_gl_get_active_attrib(value inProg, value inIndex) return result; } -DEFINE_PRIM(nme_gl_get_active_attrib,2); +DEFINE_PRIM(lime_gl_get_active_attrib,2); -value nme_gl_get_active_uniform(value inProg, value inIndex) +value lime_gl_get_active_uniform(value inProg, value inIndex) { int id = val_int(inProg); @@ -658,13 +658,13 @@ value nme_gl_get_active_uniform(value inProg, value inIndex) return result; } -DEFINE_PRIM(nme_gl_get_active_uniform,2); +DEFINE_PRIM(lime_gl_get_active_uniform,2); -value nme_gl_uniform_matrix(value inLocation, value inTranspose, value inBytes,value inCount) +value lime_gl_uniform_matrix(value inLocation, value inTranspose, value inBytes,value inCount) { int loc = val_int(inLocation); int count = val_int(inCount); @@ -685,40 +685,40 @@ value nme_gl_uniform_matrix(value inLocation, value inTranspose, value inBytes,v } return alloc_null(); } -DEFINE_PRIM(nme_gl_uniform_matrix,4); +DEFINE_PRIM(lime_gl_uniform_matrix,4); #define GL_UNFORM_1(TYPE,GET) \ -value nme_gl_uniform1##TYPE(value inLocation, value inV0) \ +value lime_gl_uniform1##TYPE(value inLocation, value inV0) \ { \ glUniform1##TYPE(val_int(inLocation),GET(inV0)); \ return alloc_null(); \ } \ -DEFINE_PRIM(nme_gl_uniform1##TYPE,2); +DEFINE_PRIM(lime_gl_uniform1##TYPE,2); #define GL_UNFORM_2(TYPE,GET) \ -value nme_gl_uniform2##TYPE(value inLocation, value inV0,value inV1) \ +value lime_gl_uniform2##TYPE(value inLocation, value inV0,value inV1) \ { \ glUniform2##TYPE(val_int(inLocation),GET(inV0),GET(inV1)); \ return alloc_null(); \ } \ -DEFINE_PRIM(nme_gl_uniform2##TYPE,3); +DEFINE_PRIM(lime_gl_uniform2##TYPE,3); #define GL_UNFORM_3(TYPE,GET) \ -value nme_gl_uniform3##TYPE(value inLocation, value inV0,value inV1,value inV2) \ +value lime_gl_uniform3##TYPE(value inLocation, value inV0,value inV1,value inV2) \ { \ glUniform3##TYPE(val_int(inLocation),GET(inV0),GET(inV1),GET(inV2)); \ return alloc_null(); \ } \ -DEFINE_PRIM(nme_gl_uniform3##TYPE,4); +DEFINE_PRIM(lime_gl_uniform3##TYPE,4); #define GL_UNFORM_4(TYPE,GET) \ -value nme_gl_uniform4##TYPE(value inLocation, value inV0,value inV1,value inV2,value inV3) \ +value lime_gl_uniform4##TYPE(value inLocation, value inV0,value inV1,value inV2,value inV3) \ { \ glUniform4##TYPE(val_int(inLocation),GET(inV0),GET(inV1),GET(inV2),GET(inV3)); \ return alloc_null(); \ } \ -DEFINE_PRIM(nme_gl_uniform4##TYPE,5); +DEFINE_PRIM(lime_gl_uniform4##TYPE,5); GL_UNFORM_1(i,val_int) GL_UNFORM_1(f,val_number) @@ -729,54 +729,54 @@ GL_UNFORM_3(f,val_number) GL_UNFORM_4(i,val_int) GL_UNFORM_4(f,val_number) -value nme_gl_uniform1iv(value inLocation,value inArray) +value lime_gl_uniform1iv(value inLocation,value inArray) { int *i = val_array_int(inArray); if (i) glUniform1iv(val_int(inLocation),1,i); else - nme_gl_uniform1i(inLocation,val_array_i(inArray,0)); + lime_gl_uniform1i(inLocation,val_array_i(inArray,0)); return alloc_null(); } -DEFINE_PRIM(nme_gl_uniform1iv,2); +DEFINE_PRIM(lime_gl_uniform1iv,2); -value nme_gl_uniform2iv(value inLocation,value inArray) +value lime_gl_uniform2iv(value inLocation,value inArray) { int *i = val_array_int(inArray); if (i) glUniform2iv(val_int(inLocation),1,i); else - nme_gl_uniform2i(inLocation,val_array_i(inArray,0),val_array_i(inArray,1)); + lime_gl_uniform2i(inLocation,val_array_i(inArray,0),val_array_i(inArray,1)); return alloc_null(); } -DEFINE_PRIM(nme_gl_uniform2iv,2); +DEFINE_PRIM(lime_gl_uniform2iv,2); -value nme_gl_uniform3iv(value inLocation,value inArray) +value lime_gl_uniform3iv(value inLocation,value inArray) { int *i = val_array_int(inArray); if (i) glUniform3iv(val_int(inLocation),1,i); else - nme_gl_uniform3i(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2)); + lime_gl_uniform3i(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2)); return alloc_null(); } -DEFINE_PRIM(nme_gl_uniform3iv,2); +DEFINE_PRIM(lime_gl_uniform3iv,2); -value nme_gl_uniform4iv(value inLocation,value inArray) +value lime_gl_uniform4iv(value inLocation,value inArray) { int *i = val_array_int(inArray); if (i) glUniform4iv(val_int(inLocation),1,i); else - nme_gl_uniform4i(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2),val_array_i(inArray,3)); + lime_gl_uniform4i(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2),val_array_i(inArray,3)); return alloc_null(); } -DEFINE_PRIM(nme_gl_uniform4iv,2); +DEFINE_PRIM(lime_gl_uniform4iv,2); -value nme_gl_uniform1fv(value inLocation,value inArray) +value lime_gl_uniform1fv(value inLocation,value inArray) { float *f = val_array_float(inArray); if (f) @@ -787,15 +787,15 @@ value nme_gl_uniform1fv(value inLocation,value inArray) if (d) glUniform1f(val_int(inLocation),d[0]); else - nme_gl_uniform1f(inLocation,val_array_i(inArray,0)); + lime_gl_uniform1f(inLocation,val_array_i(inArray,0)); } return alloc_null(); } -DEFINE_PRIM(nme_gl_uniform1fv,2); +DEFINE_PRIM(lime_gl_uniform1fv,2); -value nme_gl_uniform2fv(value inLocation,value inArray) +value lime_gl_uniform2fv(value inLocation,value inArray) { float *f = val_array_float(inArray); if (f) @@ -806,15 +806,15 @@ value nme_gl_uniform2fv(value inLocation,value inArray) if (d) glUniform2f(val_int(inLocation),d[0],d[1]); else - nme_gl_uniform2f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1)); + lime_gl_uniform2f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1)); } return alloc_null(); } -DEFINE_PRIM(nme_gl_uniform2fv,2); +DEFINE_PRIM(lime_gl_uniform2fv,2); -value nme_gl_uniform3fv(value inLocation,value inArray) +value lime_gl_uniform3fv(value inLocation,value inArray) { float *f = val_array_float(inArray); if (f) @@ -825,15 +825,15 @@ value nme_gl_uniform3fv(value inLocation,value inArray) if (d) glUniform3f(val_int(inLocation),d[0],d[1],d[2]); else - nme_gl_uniform3f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2)); + lime_gl_uniform3f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2)); } return alloc_null(); } -DEFINE_PRIM(nme_gl_uniform3fv,2); +DEFINE_PRIM(lime_gl_uniform3fv,2); -value nme_gl_uniform4fv(value inLocation,value inArray) +value lime_gl_uniform4fv(value inLocation,value inArray) { float *f = val_array_float(inArray); if (f) @@ -844,57 +844,57 @@ value nme_gl_uniform4fv(value inLocation,value inArray) if (d) glUniform4f(val_int(inLocation),d[0],d[1],d[2],d[3]); else - nme_gl_uniform4f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2),val_array_i(inArray,3)); + lime_gl_uniform4f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2),val_array_i(inArray,3)); } return alloc_null(); } -DEFINE_PRIM(nme_gl_uniform4fv,2); +DEFINE_PRIM(lime_gl_uniform4fv,2); // Attrib -value nme_gl_vertex_attrib1f(value inLocation, value inV0) +value lime_gl_vertex_attrib1f(value inLocation, value inV0) { #ifndef EMSCRIPTEN glVertexAttrib1f(val_int(inLocation),val_number(inV0)); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_vertex_attrib1f,2); +DEFINE_PRIM(lime_gl_vertex_attrib1f,2); -value nme_gl_vertex_attrib2f(value inLocation, value inV0,value inV1) +value lime_gl_vertex_attrib2f(value inLocation, value inV0,value inV1) { #ifndef EMSCRIPTEN glVertexAttrib2f(val_int(inLocation),val_number(inV0),val_number(inV1)); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_vertex_attrib2f,3); +DEFINE_PRIM(lime_gl_vertex_attrib2f,3); -value nme_gl_vertex_attrib3f(value inLocation, value inV0,value inV1,value inV2) +value lime_gl_vertex_attrib3f(value inLocation, value inV0,value inV1,value inV2) { #ifndef EMSCRIPTEN glVertexAttrib3f(val_int(inLocation),val_number(inV0),val_number(inV1),val_number(inV2)); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_vertex_attrib3f,4); +DEFINE_PRIM(lime_gl_vertex_attrib3f,4); -value nme_gl_vertex_attrib4f(value inLocation, value inV0,value inV1,value inV2, value inV3) +value lime_gl_vertex_attrib4f(value inLocation, value inV0,value inV1,value inV2, value inV3) { #ifndef EMSCRIPTEN glVertexAttrib4f(val_int(inLocation),val_number(inV0),val_number(inV1),val_number(inV2),val_number(inV3)); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_vertex_attrib4f,5); +DEFINE_PRIM(lime_gl_vertex_attrib4f,5); -value nme_gl_vertex_attrib1fv(value inLocation,value inArray) +value lime_gl_vertex_attrib1fv(value inLocation,value inArray) { #ifndef EMSCRIPTEN float *f = val_array_float(inArray); @@ -906,16 +906,16 @@ value nme_gl_vertex_attrib1fv(value inLocation,value inArray) if (d) glVertexAttrib1f(val_int(inLocation),d[0]); else - nme_gl_vertex_attrib1f(inLocation,val_array_i(inArray,0)); + lime_gl_vertex_attrib1f(inLocation,val_array_i(inArray,0)); } #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_vertex_attrib1fv,2); +DEFINE_PRIM(lime_gl_vertex_attrib1fv,2); -value nme_gl_vertex_attrib2fv(value inLocation,value inArray) +value lime_gl_vertex_attrib2fv(value inLocation,value inArray) { #ifndef EMSCRIPTEN float *f = val_array_float(inArray); @@ -927,16 +927,16 @@ value nme_gl_vertex_attrib2fv(value inLocation,value inArray) if (d) glVertexAttrib2f(val_int(inLocation),d[0],d[1]); else - nme_gl_vertex_attrib2f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1)); + lime_gl_vertex_attrib2f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1)); } #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_vertex_attrib2fv,2); +DEFINE_PRIM(lime_gl_vertex_attrib2fv,2); -value nme_gl_vertex_attrib3fv(value inLocation,value inArray) +value lime_gl_vertex_attrib3fv(value inLocation,value inArray) { #ifndef EMSCRIPTEN float *f = val_array_float(inArray); @@ -948,16 +948,16 @@ value nme_gl_vertex_attrib3fv(value inLocation,value inArray) if (d) glVertexAttrib3f(val_int(inLocation),d[0],d[1],d[2]); else - nme_gl_vertex_attrib3f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2)); + lime_gl_vertex_attrib3f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2)); } #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_vertex_attrib3fv,2); +DEFINE_PRIM(lime_gl_vertex_attrib3fv,2); -value nme_gl_vertex_attrib4fv(value inLocation,value inArray) +value lime_gl_vertex_attrib4fv(value inLocation,value inArray) { #ifndef EMSCRIPTEN float *f = val_array_float(inArray); @@ -969,12 +969,12 @@ value nme_gl_vertex_attrib4fv(value inLocation,value inArray) if (d) glVertexAttrib4f(val_int(inLocation),d[0],d[1],d[2],d[3]); else - nme_gl_vertex_attrib4f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2),val_array_i(inArray,3)); + lime_gl_vertex_attrib4f(inLocation,val_array_i(inArray,0),val_array_i(inArray,1),val_array_i(inArray,2),val_array_i(inArray,3)); } #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_vertex_attrib4fv,2); +DEFINE_PRIM(lime_gl_vertex_attrib4fv,2); @@ -982,28 +982,28 @@ DEFINE_PRIM(nme_gl_vertex_attrib4fv,2); // --- Shader ------------------------------------------- -value nme_gl_create_shader(value inType) +value lime_gl_create_shader(value inType) { return alloc_int(glCreateShader(val_int(inType))); } -DEFINE_PRIM(nme_gl_create_shader,1); +DEFINE_PRIM(lime_gl_create_shader,1); -value nme_gl_delete_shader(value inId) +value lime_gl_delete_shader(value inId) { int id = val_int(inId); glDeleteShader(id); return alloc_null(); } -DEFINE_PRIM(nme_gl_delete_shader,1); +DEFINE_PRIM(lime_gl_delete_shader,1); -value nme_gl_shader_source(value inId,value inSource) +value lime_gl_shader_source(value inId,value inSource) { int id = val_int(inId); const char *source = val_string(inSource); - #ifdef NME_GLES + #ifdef LIME_GLES // TODO - do something better here std::string buffer; buffer = std::string("precision mediump float;\n") + source; @@ -1014,47 +1014,47 @@ value nme_gl_shader_source(value inId,value inSource) return alloc_null(); } -DEFINE_PRIM(nme_gl_shader_source,2); +DEFINE_PRIM(lime_gl_shader_source,2); -value nme_gl_attach_shader(value inProg,value inShader) +value lime_gl_attach_shader(value inProg,value inShader) { glAttachShader(val_int(inProg),val_int(inShader)); return alloc_null(); } -DEFINE_PRIM(nme_gl_attach_shader,2); +DEFINE_PRIM(lime_gl_attach_shader,2); -value nme_gl_detach_shader(value inProg,value inShader) +value lime_gl_detach_shader(value inProg,value inShader) { glDetachShader(val_int(inProg),val_int(inShader)); return alloc_null(); } -DEFINE_PRIM(nme_gl_detach_shader,2); +DEFINE_PRIM(lime_gl_detach_shader,2); -value nme_gl_compile_shader(value inId) +value lime_gl_compile_shader(value inId) { int id = val_int(inId); glCompileShader(id); return alloc_null(); } -DEFINE_PRIM(nme_gl_compile_shader,1); +DEFINE_PRIM(lime_gl_compile_shader,1); -value nme_gl_get_shader_parameter(value inId,value inName) +value lime_gl_get_shader_parameter(value inId,value inName) { int id = val_int(inId); int result = 0; glGetShaderiv(id,val_int(inName), & result); return alloc_int(result); } -DEFINE_PRIM(nme_gl_get_shader_parameter,2); +DEFINE_PRIM(lime_gl_get_shader_parameter,2); -value nme_gl_get_shader_info_log(value inId) +value lime_gl_get_shader_info_log(value inId) { int id = val_int(inId); char buf[1024] = ""; @@ -1062,10 +1062,10 @@ value nme_gl_get_shader_info_log(value inId) return alloc_string(buf); } -DEFINE_PRIM(nme_gl_get_shader_info_log,1); +DEFINE_PRIM(lime_gl_get_shader_info_log,1); -value nme_gl_get_shader_source(value inId) +value lime_gl_get_shader_source(value inId) { int id = val_int(inId); @@ -1080,14 +1080,14 @@ value nme_gl_get_shader_source(value inId) return result; } -DEFINE_PRIM(nme_gl_get_shader_source,1); +DEFINE_PRIM(lime_gl_get_shader_source,1); -value nme_gl_get_shader_precision_format(value inShader,value inPrec) +value lime_gl_get_shader_precision_format(value inShader,value inPrec) { - #ifdef NME_GLES + #ifdef LIME_GLES int range[2]; int precision; glGetShaderPrecisionFormat(val_int(inShader), val_int(inPrec), range, &precision); @@ -1102,7 +1102,7 @@ value nme_gl_get_shader_precision_format(value inShader,value inPrec) return alloc_null(); #endif } -DEFINE_PRIM(nme_gl_get_shader_precision_format,2); +DEFINE_PRIM(lime_gl_get_shader_precision_format,2); @@ -1110,33 +1110,33 @@ DEFINE_PRIM(nme_gl_get_shader_precision_format,2); // --- Buffer ------------------------------------------- -value nme_gl_create_buffer() +value lime_gl_create_buffer() { GLuint buffers; glGenBuffers(1,&buffers); return alloc_int(buffers); } -DEFINE_PRIM(nme_gl_create_buffer,0); +DEFINE_PRIM(lime_gl_create_buffer,0); -value nme_gl_delete_buffer(value inId) +value lime_gl_delete_buffer(value inId) { GLuint id = val_int(inId); glDeleteBuffers(1,&id); return alloc_null(); } -DEFINE_PRIM(nme_gl_delete_buffer,1); +DEFINE_PRIM(lime_gl_delete_buffer,1); -value nme_gl_bind_buffer(value inTarget, value inId ) +value lime_gl_bind_buffer(value inTarget, value inId ) { glBindBuffer(val_int(inTarget),val_int(inId)); return alloc_null(); } -DEFINE_PRIM(nme_gl_bind_buffer,2); +DEFINE_PRIM(lime_gl_bind_buffer,2); -value nme_gl_buffer_data(value inTarget, value inByteBuffer, value inStart, value inLen, value inUsage) +value lime_gl_buffer_data(value inTarget, value inByteBuffer, value inStart, value inLen, value inUsage) { int len = val_int(inLen); int start = val_int(inStart); @@ -1152,10 +1152,10 @@ value nme_gl_buffer_data(value inTarget, value inByteBuffer, value inStart, valu return alloc_null(); } -DEFINE_PRIM(nme_gl_buffer_data,5); +DEFINE_PRIM(lime_gl_buffer_data,5); -value nme_gl_buffer_sub_data(value inTarget, value inOffset, value inByteBuffer, value inStart, value inLen) +value lime_gl_buffer_sub_data(value inTarget, value inOffset, value inByteBuffer, value inStart, value inLen) { int len = val_int(inLen); int start = val_int(inStart); @@ -1171,30 +1171,30 @@ value nme_gl_buffer_sub_data(value inTarget, value inOffset, value inByteBuffer, return alloc_null(); } -DEFINE_PRIM(nme_gl_buffer_sub_data,5); +DEFINE_PRIM(lime_gl_buffer_sub_data,5); -value nme_gl_get_vertex_attrib_offset(value index, value name) +value lime_gl_get_vertex_attrib_offset(value index, value name) { int result = 0; glGetVertexAttribPointerv(val_int(index), val_int(name), (void **)&result); return alloc_int(result); } -DEFINE_PRIM(nme_gl_get_vertex_attrib_offset,2); +DEFINE_PRIM(lime_gl_get_vertex_attrib_offset,2); -value nme_gl_get_vertex_attrib(value index, value name) +value lime_gl_get_vertex_attrib(value index, value name) { int result = 0; glGetVertexAttribiv(val_int(index), val_int(name), &result); return alloc_int(result); } -DEFINE_PRIM(nme_gl_get_vertex_attrib,2); +DEFINE_PRIM(lime_gl_get_vertex_attrib,2); -value nme_gl_vertex_attrib_pointer(value *arg, int nargs) +value lime_gl_vertex_attrib_pointer(value *arg, int nargs) { enum { aIndex, aSize, aType, aNormalized, aStride, aOffset, aSIZE }; @@ -1208,43 +1208,43 @@ value nme_gl_vertex_attrib_pointer(value *arg, int nargs) return alloc_null(); } -DEFINE_PRIM_MULT(nme_gl_vertex_attrib_pointer); +DEFINE_PRIM_MULT(lime_gl_vertex_attrib_pointer); -value nme_gl_enable_vertex_attrib_array(value inIndex) +value lime_gl_enable_vertex_attrib_array(value inIndex) { glEnableVertexAttribArray(val_int(inIndex)); return alloc_null(); } -DEFINE_PRIM(nme_gl_enable_vertex_attrib_array,1); +DEFINE_PRIM(lime_gl_enable_vertex_attrib_array,1); -value nme_gl_disable_vertex_attrib_array(value inIndex) +value lime_gl_disable_vertex_attrib_array(value inIndex) { glDisableVertexAttribArray(val_int(inIndex)); return alloc_null(); } -DEFINE_PRIM(nme_gl_disable_vertex_attrib_array,1); +DEFINE_PRIM(lime_gl_disable_vertex_attrib_array,1); -value nme_gl_get_buffer_paramerter(value inTarget, value inPname) +value lime_gl_get_buffer_paramerter(value inTarget, value inPname) { int result = 0; glGetBufferParameteriv(val_int(inTarget), val_int(inPname),&result); return alloc_int(result); } -DEFINE_PRIM(nme_gl_get_buffer_paramerter,2); +DEFINE_PRIM(lime_gl_get_buffer_paramerter,2); -value nme_gl_get_buffer_parameter(value inTarget, value inIndex) +value lime_gl_get_buffer_parameter(value inTarget, value inIndex) { GLint data = 0; glGetBufferParameteriv(val_int(inTarget), val_int(inIndex), &data); return alloc_int(data); } -DEFINE_PRIM(nme_gl_get_buffer_parameter,2); +DEFINE_PRIM(lime_gl_get_buffer_parameter,2); @@ -1252,25 +1252,25 @@ DEFINE_PRIM(nme_gl_get_buffer_parameter,2); // --- Framebuffer ------------------------------- -value nme_gl_bind_framebuffer(value target, value framebuffer) +value lime_gl_bind_framebuffer(value target, value framebuffer) { #ifndef HX_LINUX if (&glBindFramebuffer) glBindFramebuffer(val_int(target), val_int(framebuffer) ); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_bind_framebuffer,2); +DEFINE_PRIM(lime_gl_bind_framebuffer,2); -value nme_gl_bind_renderbuffer(value target, value renderbuffer) +value lime_gl_bind_renderbuffer(value target, value renderbuffer) { #ifndef HX_LINUX if (&glBindRenderbuffer) glBindRenderbuffer(val_int(target),val_int(renderbuffer)); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_bind_renderbuffer,2); +DEFINE_PRIM(lime_gl_bind_renderbuffer,2); -value nme_gl_create_framebuffer( ) +value lime_gl_create_framebuffer( ) { GLuint id = 0; #ifndef HX_LINUX @@ -1278,9 +1278,9 @@ value nme_gl_create_framebuffer( ) #endif return alloc_int(id); } -DEFINE_PRIM(nme_gl_create_framebuffer,0); +DEFINE_PRIM(lime_gl_create_framebuffer,0); -value nme_gl_create_render_buffer( ) +value lime_gl_create_render_buffer( ) { GLuint id = 0; #ifndef HX_LINUX @@ -1288,45 +1288,45 @@ value nme_gl_create_render_buffer( ) #endif return alloc_int(id); } -DEFINE_PRIM(nme_gl_create_render_buffer,0); +DEFINE_PRIM(lime_gl_create_render_buffer,0); -value nme_gl_framebuffer_renderbuffer(value target, value attachment, value renderbuffertarget, value renderbuffer) +value lime_gl_framebuffer_renderbuffer(value target, value attachment, value renderbuffertarget, value renderbuffer) { #ifndef HX_LINUX if (&glFramebufferRenderbuffer) glFramebufferRenderbuffer(val_int(target), val_int(attachment), val_int(renderbuffertarget), val_int(renderbuffer) ); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_framebuffer_renderbuffer,4); +DEFINE_PRIM(lime_gl_framebuffer_renderbuffer,4); -value nme_gl_framebuffer_texture2D(value target, value attachment, value textarget, value texture, value level) +value lime_gl_framebuffer_texture2D(value target, value attachment, value textarget, value texture, value level) { #ifndef HX_LINUX if (&glFramebufferTexture2D) glFramebufferTexture2D( val_int(target), val_int(attachment), val_int(textarget), val_int(texture), val_int(level) ); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_framebuffer_texture2D,5); +DEFINE_PRIM(lime_gl_framebuffer_texture2D,5); -value nme_gl_renderbuffer_storage(value target, value internalFormat, value width, value height) +value lime_gl_renderbuffer_storage(value target, value internalFormat, value width, value height) { #ifndef HX_LINUX if (&glRenderbufferStorage) glRenderbufferStorage( val_int(target), val_int(internalFormat), val_int(width), val_int(height) ); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_renderbuffer_storage,4); +DEFINE_PRIM(lime_gl_renderbuffer_storage,4); -value nme_gl_check_framebuffer_status(value inTarget) +value lime_gl_check_framebuffer_status(value inTarget) { #ifndef HX_LINUX if (&glCheckFramebufferStatus) return alloc_int( glCheckFramebufferStatus(val_int(inTarget))); #endif return alloc_int(0); } -DEFINE_PRIM(nme_gl_check_framebuffer_status,1); +DEFINE_PRIM(lime_gl_check_framebuffer_status,1); -value nme_gl_get_framebuffer_attachment_parameter(value target, value attachment, value pname) +value lime_gl_get_framebuffer_attachment_parameter(value target, value attachment, value pname) { GLint result = 0; #ifndef HX_LINUX @@ -1334,9 +1334,9 @@ value nme_gl_get_framebuffer_attachment_parameter(value target, value attachment #endif return alloc_int(result); } -DEFINE_PRIM(nme_gl_get_framebuffer_attachment_parameter,3); +DEFINE_PRIM(lime_gl_get_framebuffer_attachment_parameter,3); -value nme_gl_get_render_buffer_parameter(value target, value pname) +value lime_gl_get_render_buffer_parameter(value target, value pname) { int result = 0; #ifndef HX_LINUX @@ -1344,130 +1344,130 @@ value nme_gl_get_render_buffer_parameter(value target, value pname) #endif return alloc_int(result); } -DEFINE_PRIM(nme_gl_get_render_buffer_parameter,2); +DEFINE_PRIM(lime_gl_get_render_buffer_parameter,2); // --- Drawing ------------------------------- -value nme_gl_draw_arrays(value inMode, value inFirst, value inCount) +value lime_gl_draw_arrays(value inMode, value inFirst, value inCount) { glDrawArrays( val_int(inMode), val_int(inFirst), val_int(inCount) ); return alloc_null(); } -DEFINE_PRIM(nme_gl_draw_arrays,3); +DEFINE_PRIM(lime_gl_draw_arrays,3); -value nme_gl_draw_elements(value inMode, value inCount, value inType, value inOffset) +value lime_gl_draw_elements(value inMode, value inCount, value inType, value inOffset) { glDrawElements( val_int(inMode), val_int(inCount), val_int(inType), (void *)(intptr_t)val_int(inOffset) ); return alloc_null(); } -DEFINE_PRIM(nme_gl_draw_elements,4); +DEFINE_PRIM(lime_gl_draw_elements,4); // --- Windowing ------------------------------- -value nme_gl_viewport(value inX, value inY, value inW,value inH) +value lime_gl_viewport(value inX, value inY, value inW,value inH) { glViewport(val_int(inX),val_int(inY),val_int(inW),val_int(inH)); return alloc_null(); } -DEFINE_PRIM(nme_gl_viewport,4); +DEFINE_PRIM(lime_gl_viewport,4); -value nme_gl_scissor(value inX, value inY, value inW,value inH) +value lime_gl_scissor(value inX, value inY, value inW,value inH) { glScissor(val_int(inX),val_int(inY),val_int(inW),val_int(inH)); return alloc_null(); } -DEFINE_PRIM(nme_gl_scissor,4); +DEFINE_PRIM(lime_gl_scissor,4); -value nme_gl_clear(value inMask) +value lime_gl_clear(value inMask) { glClear(val_int(inMask)); return alloc_null(); } -DEFINE_PRIM(nme_gl_clear,1); +DEFINE_PRIM(lime_gl_clear,1); -value nme_gl_clear_color(value r,value g, value b, value a) +value lime_gl_clear_color(value r,value g, value b, value a) { glClearColor(val_number(r),val_number(g),val_number(b),val_number(a)); return alloc_null(); } -DEFINE_PRIM(nme_gl_clear_color,4); +DEFINE_PRIM(lime_gl_clear_color,4); -value nme_gl_clear_depth(value depth) +value lime_gl_clear_depth(value depth) { - #ifdef NME_GLES + #ifdef LIME_GLES glClearDepthf(val_number(depth)); #else glClearDepth(val_number(depth)); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_clear_depth,1); +DEFINE_PRIM(lime_gl_clear_depth,1); -value nme_gl_clear_stencil(value stencil) +value lime_gl_clear_stencil(value stencil) { glClearStencil(val_int(stencil)); return alloc_null(); } -DEFINE_PRIM(nme_gl_clear_stencil,1); +DEFINE_PRIM(lime_gl_clear_stencil,1); -value nme_gl_color_mask(value r,value g, value b, value a) +value lime_gl_color_mask(value r,value g, value b, value a) { glColorMask(val_bool(r),val_bool(g),val_bool(b),val_bool(a)); return alloc_null(); } -DEFINE_PRIM(nme_gl_color_mask,4); +DEFINE_PRIM(lime_gl_color_mask,4); -value nme_gl_depth_func(value func) +value lime_gl_depth_func(value func) { glDepthFunc(val_int(func)); return alloc_null(); } -DEFINE_PRIM(nme_gl_depth_func,1); +DEFINE_PRIM(lime_gl_depth_func,1); -value nme_gl_depth_mask(value mask) +value lime_gl_depth_mask(value mask) { glDepthMask(val_bool(mask)); return alloc_null(); } -DEFINE_PRIM(nme_gl_depth_mask,1); +DEFINE_PRIM(lime_gl_depth_mask,1); -value nme_gl_depth_range(value inNear, value inFar) +value lime_gl_depth_range(value inNear, value inFar) { - #ifdef NME_GLES + #ifdef LIME_GLES glDepthRangef(val_number(inNear), val_number(inFar)); #else glDepthRange(val_number(inNear), val_number(inFar)); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_depth_range,2); +DEFINE_PRIM(lime_gl_depth_range,2); -value nme_gl_polygon_offset(value factor, value units) +value lime_gl_polygon_offset(value factor, value units) { glPolygonOffset(val_number(factor), val_number(units)); return alloc_null(); } -DEFINE_PRIM(nme_gl_polygon_offset,2); +DEFINE_PRIM(lime_gl_polygon_offset,2); -value nme_gl_read_pixels(value *arg, int argCount) +value lime_gl_read_pixels(value *arg, int argCount) { enum { aX, aY, aWidth, aHeight, aFormat, aType, aBuffer, aOffset }; @@ -1483,23 +1483,23 @@ value nme_gl_read_pixels(value *arg, int argCount) return alloc_null(); } -DEFINE_PRIM_MULT(nme_gl_read_pixels); +DEFINE_PRIM_MULT(lime_gl_read_pixels); -value nme_gl_pixel_storei(value pname, value param) +value lime_gl_pixel_storei(value pname, value param) { glPixelStorei(val_int(pname), val_int(param)); return alloc_null(); } -DEFINE_PRIM(nme_gl_pixel_storei,2); +DEFINE_PRIM(lime_gl_pixel_storei,2); -value nme_gl_sample_coverage(value f, value invert) +value lime_gl_sample_coverage(value f, value invert) { glSampleCoverage(val_number(f), val_bool(invert)); return alloc_null(); } -DEFINE_PRIM(nme_gl_sample_coverage,2); +DEFINE_PRIM(lime_gl_sample_coverage,2); @@ -1508,46 +1508,46 @@ DEFINE_PRIM(nme_gl_sample_coverage,2); // --- Texture ------------------------------------------- -value nme_gl_create_texture() +value lime_gl_create_texture() { unsigned int id = 0; glGenTextures(1,&id); return alloc_int(id); } -DEFINE_PRIM(nme_gl_create_texture,0); +DEFINE_PRIM(lime_gl_create_texture,0); -value nme_gl_active_texture(value inSlot) +value lime_gl_active_texture(value inSlot) { glActiveTexture( val_int(inSlot) ); return alloc_null(); } -DEFINE_PRIM(nme_gl_active_texture,1); +DEFINE_PRIM(lime_gl_active_texture,1); -value nme_gl_delete_texture(value inId) +value lime_gl_delete_texture(value inId) { GLuint id = val_int(inId); glDeleteTextures(1,&id); return alloc_null(); } -DEFINE_PRIM(nme_gl_delete_texture,1); +DEFINE_PRIM(lime_gl_delete_texture,1); -value nme_gl_bind_texture(value inTarget, value inTexture) +value lime_gl_bind_texture(value inTarget, value inTexture) { glBindTexture(val_int(inTarget), val_int(inTexture) ); return alloc_null(); } -DEFINE_PRIM(nme_gl_bind_texture,2); +DEFINE_PRIM(lime_gl_bind_texture,2); -value nme_gl_bind_bitmap_data_texture(value inBitmapData) +value lime_gl_bind_bitmap_data_texture(value inBitmapData) { Surface *surface; if (AbstractToObject(inBitmapData,surface) ) { HardwareContext *ctx = gDirectRenderContext; if (!ctx) - ctx = nme::HardwareContext::current; + ctx = lime::HardwareContext::current; if (ctx) { Texture *texture = surface->GetOrCreateTexture(*gDirectRenderContext); @@ -1558,10 +1558,10 @@ value nme_gl_bind_bitmap_data_texture(value inBitmapData) return alloc_null(); } -DEFINE_PRIM(nme_gl_bind_bitmap_data_texture,1); +DEFINE_PRIM(lime_gl_bind_bitmap_data_texture,1); -value nme_gl_tex_image_2d(value *arg, int argCount) +value lime_gl_tex_image_2d(value *arg, int argCount) { enum { aTarget, aLevel, aInternal, aWidth, aHeight, aBorder, aFormat, aType, aBuffer, aOffset }; @@ -1577,11 +1577,11 @@ value nme_gl_tex_image_2d(value *arg, int argCount) return alloc_null(); } -DEFINE_PRIM_MULT(nme_gl_tex_image_2d); +DEFINE_PRIM_MULT(lime_gl_tex_image_2d); -value nme_gl_tex_sub_image_2d(value *arg, int argCount) +value lime_gl_tex_sub_image_2d(value *arg, int argCount) { enum { aTarget, aLevel, aXOffset, aYOffset, aWidth, aHeight, aFormat, aType, aBuffer, aOffset }; @@ -1598,11 +1598,11 @@ value nme_gl_tex_sub_image_2d(value *arg, int argCount) return alloc_null(); } -DEFINE_PRIM_MULT(nme_gl_tex_sub_image_2d); +DEFINE_PRIM_MULT(lime_gl_tex_sub_image_2d); -value nme_gl_compressed_tex_image_2d(value *arg, int argCount) +value lime_gl_compressed_tex_image_2d(value *arg, int argCount) { enum { aTarget, aLevel, aInternal, aWidth, aHeight, aBorder, aBuffer, aOffset }; @@ -1622,10 +1622,10 @@ value nme_gl_compressed_tex_image_2d(value *arg, int argCount) return alloc_null(); } -DEFINE_PRIM_MULT(nme_gl_compressed_tex_image_2d); +DEFINE_PRIM_MULT(lime_gl_compressed_tex_image_2d); -value nme_gl_compressed_tex_sub_image_2d(value *arg, int argCount) +value lime_gl_compressed_tex_sub_image_2d(value *arg, int argCount) { enum { aTarget, aLevel, aXOffset, aYOffset, aWidth, aHeight, aFormat, aBuffer, aOffset }; @@ -1645,30 +1645,30 @@ value nme_gl_compressed_tex_sub_image_2d(value *arg, int argCount) return alloc_null(); } -DEFINE_PRIM_MULT(nme_gl_compressed_tex_sub_image_2d); +DEFINE_PRIM_MULT(lime_gl_compressed_tex_sub_image_2d); -value nme_gl_tex_parameterf(value inTarget, value inPName, value inVal) +value lime_gl_tex_parameterf(value inTarget, value inPName, value inVal) { glTexParameterf(val_int(inTarget), val_int(inPName), val_number(inVal) ); return alloc_null(); } -DEFINE_PRIM(nme_gl_tex_parameterf,3); +DEFINE_PRIM(lime_gl_tex_parameterf,3); -value nme_gl_tex_parameteri(value inTarget, value inPName, value inVal) +value lime_gl_tex_parameteri(value inTarget, value inPName, value inVal) { glTexParameterf(val_int(inTarget), val_int(inPName), val_int(inVal) ); return alloc_null(); } -DEFINE_PRIM(nme_gl_tex_parameteri,3); +DEFINE_PRIM(lime_gl_tex_parameteri,3); -value nme_gl_copy_tex_image_2d(value *arg, int argCount) +value lime_gl_copy_tex_image_2d(value *arg, int argCount) { enum { aTarget, aLevel, aInternalFormat, aX, aY, aWidth, aHeight, aBorder }; @@ -1676,10 +1676,10 @@ value nme_gl_copy_tex_image_2d(value *arg, int argCount) INT(aX), INT(aY), INT(aWidth), INT(aHeight), INT(aBorder) ); return alloc_null(); } -DEFINE_PRIM_MULT(nme_gl_copy_tex_image_2d); +DEFINE_PRIM_MULT(lime_gl_copy_tex_image_2d); -value nme_gl_copy_tex_sub_image_2d(value *arg, int argCount) +value lime_gl_copy_tex_sub_image_2d(value *arg, int argCount) { enum { aTarget, aLevel, aXOffset, aYOffset, aX, aY, aWidth, aHeight }; @@ -1687,33 +1687,33 @@ value nme_gl_copy_tex_sub_image_2d(value *arg, int argCount) INT(aX), INT(aY), INT(aWidth), INT(aHeight) ); return alloc_null(); } -DEFINE_PRIM_MULT(nme_gl_copy_tex_sub_image_2d); +DEFINE_PRIM_MULT(lime_gl_copy_tex_sub_image_2d); -value nme_gl_generate_mipmap(value inTarget) +value lime_gl_generate_mipmap(value inTarget) { #ifndef HX_LINUX if (&glGenerateMipmap) glGenerateMipmap(val_int(inTarget)); #endif return alloc_null(); } -DEFINE_PRIM(nme_gl_generate_mipmap,1); +DEFINE_PRIM(lime_gl_generate_mipmap,1); -value nme_gl_get_tex_parameter(value inTarget,value inPname) +value lime_gl_get_tex_parameter(value inTarget,value inPname) { int result = 0; glGetTexParameteriv(val_int(inTarget), val_int(inPname), &result); return alloc_int(result); } -DEFINE_PRIM(nme_gl_get_tex_parameter,2); +DEFINE_PRIM(lime_gl_get_tex_parameter,2); #endif -extern "C" int nme_oglexport_register_prims() { return 0; } +extern "C" int lime_oglexport_register_prims() { return 0; } diff --git a/project/src/renderer/opengl/OpenGL2Context.cpp b/project/src/renderer/opengl/OpenGL2Context.cpp index d4a38baad..5eb63e5f1 100644 --- a/project/src/renderer/opengl/OpenGL2Context.cpp +++ b/project/src/renderer/opengl/OpenGL2Context.cpp @@ -1,7 +1,7 @@ #include "renderer/opengl/OpenGL2Context.h" -namespace nme { +namespace lime { OpenGL2Context::OpenGL2Context (WinDC inDC, GLCtx inOGLCtx) : OpenGLContext (inDC, inOGLCtx) { @@ -45,7 +45,7 @@ namespace nme { void OpenGL2Context::FinishBitmapRender () { // TODO: Need replacement call for GLES2 - //#ifndef NME_FORCE_GLES2 + //#ifndef LIME_FORCE_GLES2 //glDisableClientState(GL_TEXTURE_COORD_ARRAY); //#endif @@ -77,7 +77,7 @@ namespace nme { mBitmapSurface->Bind (*this, 0); mCurrentProg->setTransform (mBitmapTrans); // TODO: Need replacement call for GLES2 - //#ifndef NME_FORCE_GLES2 + //#ifndef LIME_FORCE_GLES2 //glEnableClientState(GL_TEXTURE_COORD_ARRAY); //#endif diff --git a/project/src/renderer/opengl/OpenGLContext.cpp b/project/src/renderer/opengl/OpenGLContext.cpp index b16416ffc..fc49bd9c2 100644 --- a/project/src/renderer/opengl/OpenGLContext.cpp +++ b/project/src/renderer/opengl/OpenGLContext.cpp @@ -6,7 +6,7 @@ int sgBufferCount = 0; int sgDrawBitmap = 0; -namespace nme { +namespace lime { OpenGLContext::OpenGLContext (WinDC inDC, GLCtx inOGLCtx) { @@ -34,7 +34,7 @@ namespace nme { if (str && !strncmp (str, "Intel", 5)) mPointSmooth = false; - #if defined(NME_GLES) + #if defined(LIME_GLES) mQuality = sqLow; #else mQuality = sqBest; @@ -73,7 +73,7 @@ namespace nme { if (!inForHitTest) { - #ifndef NME_GLES + #ifndef LIME_GLES #ifndef SDL_OGL #ifndef GLFW_OGL wglMakeCurrent (mDC, mOGLCtx); @@ -103,7 +103,7 @@ namespace nme { glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); #endif - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 if (mQuality >= sqHigh && mPointSmooth) glEnable (GL_POINT_SMOOTH); @@ -137,7 +137,7 @@ namespace nme { } else { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 // TODO: Clear with a rect // TODO: Need replacement call for GLES2 @@ -174,7 +174,7 @@ namespace nme { void OpenGLContext::CombineModelView (const Matrix &inModelView) { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 // Do not combine ModelView and Projection in fixed-function float matrix[] = { @@ -239,7 +239,7 @@ namespace nme { void OpenGLContext::FinishBitmapRender () { glDisable (GL_TEXTURE_2D); - #ifdef NME_DITHER + #ifdef LIME_DITHER glEnable (GL_DITHER); #endif @@ -248,7 +248,7 @@ namespace nme { void OpenGLContext::Flip () { - #ifndef NME_GLES + #ifndef LIME_GLES #ifndef SDL_OGL #ifndef GLFW_OGL SwapBuffers (mDC); @@ -268,7 +268,7 @@ namespace nme { void OpenGLContext::OnBeginRender () { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 glEnableClientState (GL_VERTEX_ARRAY); #endif @@ -277,7 +277,7 @@ namespace nme { void OpenGLContext::PopBitmapMatrix () { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 glPopMatrix (); #endif @@ -286,7 +286,7 @@ namespace nme { void OpenGLContext::PrepareBitmapRender () { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 float a = (float)((mTint >> 24) & 0xFF) * one_on_255; float c0 = (float)((mTint >> 16) & 0xFF) * one_on_255; float c1 = (float)((mTint >> 8) & 0xFF) * one_on_255; @@ -297,7 +297,7 @@ namespace nme { glColor4f (c0, c1, c2, a); glEnable (GL_TEXTURE_2D); glEnableClientState (GL_TEXTURE_COORD_ARRAY); - #ifdef NME_DITHER + #ifdef LIME_DITHER if (!inSmooth) glDisable (GL_DITHER); #endif @@ -315,7 +315,7 @@ namespace nme { void OpenGLContext::PushBitmapMatrix () { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 glPushMatrix (); glLoadIdentity (); #endif @@ -383,7 +383,7 @@ namespace nme { } - #ifdef NME_USE_VBO + #ifdef LIME_USE_VBO if (!arrays.mVertexBO) { glGenBuffers (1, &arrays.mVertexBO); @@ -455,7 +455,7 @@ namespace nme { if (boundTexture) { boundTexture->BindFlags (draw.mBitmapRepeat, draw.mBitmapSmooth); - #ifdef NME_DITHER + #ifdef LIME_DITHER if (!inSmooth) glDisable (GL_DITHER); #endif @@ -523,7 +523,7 @@ namespace nme { sgDrawCount++; glDrawArrays (sgOpenglType[draw.mPrimType], draw.mFirst, draw.mCount); - #ifdef NME_DITHER + #ifdef LIME_DITHER if (boundTexture && !draw.mBitmapSmooth) glEnable (GL_DITHER); #endif @@ -560,7 +560,7 @@ namespace nme { void OpenGLContext::SetBitmapData (const float *inPos, const float *inTex) { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 glVertexPointer (2, GL_FLOAT, 0, inPos); glTexCoordPointer (2, GL_FLOAT, 0, inTex); #endif @@ -570,7 +570,7 @@ namespace nme { void OpenGLContext::SetColourArray (const int *inData) { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 if (inData) { mColourArrayEnabled = true; @@ -593,7 +593,7 @@ namespace nme { if (inWidth != mLineWidth) { double w = inWidth; - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 if (mQuality >= sqBest) { if (w > 1) { @@ -622,7 +622,7 @@ namespace nme { glLineWidth (w); // TODO: Need replacement call for GLES2? - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 if (mPointsToo) glPointSize (inWidth); #endif @@ -634,7 +634,7 @@ namespace nme { void OpenGLContext::SetModulatingTransform (const ColorTransform *inTransform) { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 if (inTransform) { if (mAlphaMode == amPremultiplied) glColor4f (inTransform->redMultiplier * inTransform->alphaMultiplier, inTransform->greenMultiplier * inTransform->alphaMultiplier, inTransform->blueMultiplier * inTransform->alphaMultiplier, inTransform->alphaMultiplier); @@ -648,12 +648,12 @@ namespace nme { void OpenGLContext::setOrtho (float x0,float x1, float y0, float y1) { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 glMatrixMode (GL_PROJECTION); glLoadIdentity (); - #if defined (NME_GLES) + #if defined (LIME_GLES) glOrthof (x0, x1, y0, y1, -1, 1); #else glOrtho (x0, x1, y0, y1, -1, 1); @@ -671,7 +671,7 @@ namespace nme { void OpenGLContext::SetPositionData (const float *inData, bool inPerspective) { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 glVertexPointer (inPerspective ? 4 : 2, GL_FLOAT, 0, inData); #endif @@ -680,7 +680,7 @@ namespace nme { void OpenGLContext::SetQuality (StageQuality inQ) { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 //inQ = sqMedium; if (inQ != mQuality) { @@ -713,7 +713,7 @@ namespace nme { void OpenGLContext::SetSolidColour (unsigned int col) { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 float a = (float)((col >> 24) & 0xFF) * one_on_255; float c0 = (float)((col >> 16) & 0xFF) * one_on_255; float c1 = (float)((col >> 8) & 0xFF) * one_on_255; @@ -729,7 +729,7 @@ namespace nme { void OpenGLContext::SetTexture (Surface *inSurface, const float *inTexCoords) { - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 if (!inSurface) { glDisable (GL_TEXTURE_2D); @@ -767,7 +767,7 @@ namespace nme { mHeight = inHeight; #ifdef ANDROID - //__android_log_print(ANDROID_LOG_ERROR, "NME", "SetWindowSize %d %d", inWidth, inHeight); + //__android_log_print(ANDROID_LOG_ERROR, "lime", "SetWindowSize %d %d", inWidth, inHeight); #endif } diff --git a/project/src/renderer/opengl/OpenGLInit.cpp b/project/src/renderer/opengl/OpenGLInit.cpp index 3fb6947fc..f0dada74c 100644 --- a/project/src/renderer/opengl/OpenGLInit.cpp +++ b/project/src/renderer/opengl/OpenGLInit.cpp @@ -15,10 +15,10 @@ #endif -namespace nme { +namespace lime { - HardwareContext* nme::HardwareContext::current = NULL; + HardwareContext* lime::HardwareContext::current = NULL; bool HasShaderSupport () { @@ -31,7 +31,7 @@ namespace nme { //printf("GL_VERSION: %s\n", version); - #if defined(NME_GLES) && !defined(TIZEN) + #if defined(LIME_GLES) && !defined(TIZEN) glMajor = version[10]; glMinor = version[12]; #else @@ -96,13 +96,13 @@ namespace nme { void ResetHardwareContext () { - //__android_log_print(ANDROID_LOG_ERROR, "NME", "ResetHardwareContext"); + //__android_log_print(ANDROID_LOG_ERROR, "lime", "ResetHardwareContext"); gTextureContextVersion++; } - #ifdef NME_USE_VBO + #ifdef LIME_USE_VBO void ReleaseVertexBufferObject (unsigned int inVBO) { if (glDeleteBuffers) @@ -117,10 +117,10 @@ namespace nme { HardwareContext *ctx; #if defined (ANDROID) || defined (BLACKBERRY) || defined (IPHONE) || defined (WEBOS) || defined (TIZEN) - #ifdef NME_FORCE_GLES2 + #ifdef LIME_FORCE_GLES2 //printf ("Force GLES2\n"); shaders = true; - #elif defined(NME_FORCE_GLES1) + #elif defined(LIME_FORCE_GLES1) //printf ("Force GLES1\n"); shaders = false; #endif diff --git a/project/src/renderer/opengl/OpenGLProgram.cpp b/project/src/renderer/opengl/OpenGLProgram.cpp index c32e85608..f25908eef 100644 --- a/project/src/renderer/opengl/OpenGLProgram.cpp +++ b/project/src/renderer/opengl/OpenGLProgram.cpp @@ -5,7 +5,7 @@ #include "renderer/opengl/OpenGLProgram.h" -namespace nme { +namespace lime { const float one_on_255 = 1.0 / 255.0; @@ -48,7 +48,7 @@ namespace nme { const char *source = inShader; GLuint shader = glCreateShader (inType); - #ifdef NME_GLES + #ifdef LIME_GLES std::string sourceBuf; if (inType == GL_FRAGMENT_SHADER) { diff --git a/project/src/renderer/opengl/OpenGLShaders.cpp b/project/src/renderer/opengl/OpenGLShaders.cpp index bd758bbaa..b6146a85d 100644 --- a/project/src/renderer/opengl/OpenGLShaders.cpp +++ b/project/src/renderer/opengl/OpenGLShaders.cpp @@ -2,7 +2,7 @@ #include "renderer/opengl/OpenGLProgram.h" -namespace nme { +namespace lime { const char *gSolidVert = diff --git a/project/src/renderer/opengl/OpenGLTexture.cpp b/project/src/renderer/opengl/OpenGLTexture.cpp index e831f7f76..522398cab 100644 --- a/project/src/renderer/opengl/OpenGLTexture.cpp +++ b/project/src/renderer/opengl/OpenGLTexture.cpp @@ -1,7 +1,7 @@ #include "renderer/opengl/OpenGLTexture.h" -namespace nme { +namespace lime { bool gFullNPO2Support = false; @@ -82,7 +82,7 @@ namespace nme { int h = non_po2 ? mPixelHeight : UpToPower2 (mPixelHeight); mCanRepeat = IsPower2 (w) && IsPower2 (h); - //__android_log_print(ANDROID_LOG_ERROR, "NME", "NewTexure %d %d", w, h); + //__android_log_print(ANDROID_LOG_ERROR, "lime", "NewTexure %d %d", w, h); mTextureWidth = w; mTextureHeight = h; @@ -153,7 +153,7 @@ namespace nme { } - /*#ifdef NME_PREMULTIPLIED_ALPHA + /*#ifdef LIME_PREMULTIPLIED_ALPHA if (store_format != GL_ALPHA) { for (int i = 0; i < mTextureWidth * mTextureHeight * 4; i += 4) { @@ -169,7 +169,7 @@ namespace nme { #endif*/ glGenTextures (1, &mTextureID); - // __android_log_print(ANDROID_LOG_ERROR, "NME", "CreateTexture %d (%dx%d)", + // __android_log_print(ANDROID_LOG_ERROR, "lime", "CreateTexture %d (%dx%d)", // mTextureID, mPixelWidth, mPixelHeight); glBindTexture (GL_TEXTURE_2D, mTextureID); mRepeat = mCanRepeat; @@ -190,7 +190,7 @@ namespace nme { glTexEnvx (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); #endif - #ifndef NME_FORCE_GLES2 + #ifndef LIME_FORCE_GLES2 glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); #endif @@ -204,7 +204,7 @@ namespace nme { if (mTextureID && mContextVersion == gTextureContextVersion && HardwareContext::current) { - //__android_log_print(ANDROID_LOG_ERROR, "NME", "DeleteTexture %d (%dx%d)", + //__android_log_print(ANDROID_LOG_ERROR, "lime", "DeleteTexture %d (%dx%d)", //mTextureID, mPixelWidth, mPixelHeight); HardwareContext::current->DestroyNativeTexture ((void *)(size_t)mTextureID); @@ -231,7 +231,7 @@ namespace nme { if (inSurface->GetBase () && mDirtyRect.HasPixels ()) { - //__android_log_print(ANDROID_LOG_INFO, "NME", "UpdateDirtyRect! %d %d", + //__android_log_print(ANDROID_LOG_INFO, "lime", "UpdateDirtyRect! %d %d", //mPixelWidth, mPixelHeight); PixelFormat fmt = inSurface->Format (); @@ -239,7 +239,7 @@ namespace nme { glGetError (); const uint8 *p0 = inSurface->Row (mDirtyRect.y) + (mDirtyRect.x * inSurface->BytesPP ()); - #if defined(NME_GLES) + #if defined(LIME_GLES) // TODO: pixel transform & copy rect for (int y = 0; y < mDirtyRect.h; y++) { diff --git a/project/src/renderer/software/AlphaMask.cpp b/project/src/renderer/software/AlphaMask.cpp index 949ad76eb..0cea232b5 100644 --- a/project/src/renderer/software/AlphaMask.cpp +++ b/project/src/renderer/software/AlphaMask.cpp @@ -1,7 +1,7 @@ #include "AlphaMask.h" -#include +#include -namespace nme +namespace lime { //QuickVec sMaskCache; @@ -669,4 +669,4 @@ AlphaMask *SpanRect::CreateMask(const Transform &inTransform, int inAlpha) -} // end namespace nme +} // end namespace lime diff --git a/project/src/renderer/software/AlphaMask.h b/project/src/renderer/software/AlphaMask.h index 6b179872c..4b0787e91 100644 --- a/project/src/renderer/software/AlphaMask.h +++ b/project/src/renderer/software/AlphaMask.h @@ -8,7 +8,7 @@ #include -namespace nme +namespace lime { diff --git a/project/src/renderer/software/BitmapFill.cpp b/project/src/renderer/software/BitmapFill.cpp index 5cd69fdfd..64ad0a254 100644 --- a/project/src/renderer/software/BitmapFill.cpp +++ b/project/src/renderer/software/BitmapFill.cpp @@ -1,7 +1,7 @@ #include "BitmapFill.h" -namespace nme +namespace lime { template diff --git a/project/src/renderer/software/BitmapFill.h b/project/src/renderer/software/BitmapFill.h index 6a3899662..ad10b76a5 100644 --- a/project/src/renderer/software/BitmapFill.h +++ b/project/src/renderer/software/BitmapFill.h @@ -3,7 +3,7 @@ #include "renderer/common/BitmapCache.h" #include "Render.h" -namespace nme +namespace lime { static inline bool IsPOW2(int inX) @@ -378,4 +378,4 @@ public: }; -} // end namespace nme +} // end namespace lime diff --git a/project/src/renderer/software/BitmapFillPerspective.cpp b/project/src/renderer/software/BitmapFillPerspective.cpp index 0b7291adc..8f040d21a 100644 --- a/project/src/renderer/software/BitmapFillPerspective.cpp +++ b/project/src/renderer/software/BitmapFillPerspective.cpp @@ -1,7 +1,7 @@ #include "BitmapFill.h" -namespace nme +namespace lime { template diff --git a/project/src/renderer/software/GradientFill.cpp b/project/src/renderer/software/GradientFill.cpp index 569f7b1d8..ac1651d99 100644 --- a/project/src/renderer/software/GradientFill.cpp +++ b/project/src/renderer/software/GradientFill.cpp @@ -2,7 +2,7 @@ #include "Render.h" -namespace nme +namespace lime { class GradientFillerBase : public Filler diff --git a/project/src/renderer/software/LineRender.cpp b/project/src/renderer/software/LineRender.cpp index 456f7c93b..00f5a562b 100644 --- a/project/src/renderer/software/LineRender.cpp +++ b/project/src/renderer/software/LineRender.cpp @@ -6,7 +6,7 @@ -namespace nme +namespace lime { // --- LineRender --------------------------------------------------- @@ -547,4 +547,4 @@ Renderer *CreateTriangleLineRenderer(const GraphicsJob &inJob, const GraphicsPat -} // end namespace nme +} // end namespace lime diff --git a/project/src/renderer/software/PointRenderer.cpp b/project/src/renderer/software/PointRenderer.cpp index 33db519af..3cfa067f7 100644 --- a/project/src/renderer/software/PointRenderer.cpp +++ b/project/src/renderer/software/PointRenderer.cpp @@ -1,7 +1,7 @@ #include "PolygonRender.h" -namespace nme +namespace lime { class PointRenderer : public CachedExtentRenderer @@ -185,7 +185,7 @@ Renderer *CreatePointRenderer(const GraphicsJob &inJob, const GraphicsPath &inPa return new PointRenderer(inJob,inPath); } -} // end namespace nme +} // end namespace lime diff --git a/project/src/renderer/software/PolygonRender.cpp b/project/src/renderer/software/PolygonRender.cpp index b2e061e5e..bfd146752 100644 --- a/project/src/renderer/software/PolygonRender.cpp +++ b/project/src/renderer/software/PolygonRender.cpp @@ -4,7 +4,7 @@ -namespace nme +namespace lime { @@ -405,7 +405,7 @@ void PolygonRender::SetTransform(const Transform &inTransform) for (int i = 0; i < points; i++) { mTransformed[i] = mTransform.Apply(src[i].x, src[i].y); - //__android_log_print(ANDROID_LOG_ERROR, "nme", "%d/%d %f,%f -> %f,%f", i, points, src[i].x, src[i].y, + //__android_log_print(ANDROID_LOG_ERROR, "lime", "%d/%d %f,%f -> %f,%f", i, points, src[i].x, src[i].y, //mTransformed[i].x, mTransformed[i].y ); } @@ -414,4 +414,4 @@ void PolygonRender::SetTransform(const Transform &inTransform) } -} // end namespace nme +} // end namespace lime diff --git a/project/src/renderer/software/PolygonRender.h b/project/src/renderer/software/PolygonRender.h index 0633fd0b4..ee00b606b 100644 --- a/project/src/renderer/software/PolygonRender.h +++ b/project/src/renderer/software/PolygonRender.h @@ -8,7 +8,7 @@ #include -namespace nme +namespace lime { enum IterateMode { itGetExtent, itCreateRenderer, itHitTest }; @@ -67,7 +67,7 @@ public: }; -} // end namespace nme +} // end namespace lime #endif diff --git a/project/src/renderer/software/Render.h b/project/src/renderer/software/Render.h index 07d4c23b7..75f7b77b0 100644 --- a/project/src/renderer/software/Render.h +++ b/project/src/renderer/software/Render.h @@ -7,7 +7,7 @@ -namespace nme +namespace lime { @@ -258,6 +258,6 @@ void Render(const AlphaMask &inAlpha, SOURCE_ &inSource, const RenderTarget &inD } } -} // end namespace nme +} // end namespace lime #endif diff --git a/project/src/renderer/software/SoftwareRenderer.cpp b/project/src/renderer/software/SoftwareRenderer.cpp index 1abd9e59c..b57dff021 100644 --- a/project/src/renderer/software/SoftwareRenderer.cpp +++ b/project/src/renderer/software/SoftwareRenderer.cpp @@ -1,7 +1,7 @@ #include #include "PolygonRender.h" -namespace nme +namespace lime { Renderer *CreateLineRenderer(const GraphicsJob &inJob, const GraphicsPath &inPath); @@ -32,4 +32,4 @@ Renderer *Renderer::CreateSoftware(const GraphicsJob &inJob, const GraphicsPath } -} // end namespace nme +} // end namespace lime diff --git a/project/src/renderer/software/SolidFill.cpp b/project/src/renderer/software/SolidFill.cpp index f5a674484..46af76c76 100644 --- a/project/src/renderer/software/SolidFill.cpp +++ b/project/src/renderer/software/SolidFill.cpp @@ -1,7 +1,7 @@ #include #include "Render.h" -namespace nme +namespace lime { template @@ -45,4 +45,4 @@ Filler *Filler::Create(GraphicsSolidFill *inFill) } -} // end namespace nme +} // end namespace lime diff --git a/project/src/renderer/software/SolidRender.cpp b/project/src/renderer/software/SolidRender.cpp index b23d9d21c..1127711a7 100644 --- a/project/src/renderer/software/SolidRender.cpp +++ b/project/src/renderer/software/SolidRender.cpp @@ -1,7 +1,7 @@ #include "PolygonRender.h" -namespace nme +namespace lime { class SolidRender : public PolygonRender @@ -122,6 +122,6 @@ Renderer *CreateSolidRenderer(const GraphicsJob &inJob, const GraphicsPath &inPa } -} // end namespace nme +} // end namespace lime diff --git a/project/src/renderer/software/TileRenderer.cpp b/project/src/renderer/software/TileRenderer.cpp index 7c20da1e6..6c6c098bf 100644 --- a/project/src/renderer/software/TileRenderer.cpp +++ b/project/src/renderer/software/TileRenderer.cpp @@ -4,7 +4,7 @@ #include "renderer/common/AutoSurfaceRender.h" -namespace nme +namespace lime { const double one_on_255 = 1.0/255.0; @@ -307,4 +307,4 @@ Renderer *CreateTileRenderer(const GraphicsJob &inJob, const GraphicsPath &inPat } -} // end namespace anme +} // end namespace lime diff --git a/project/src/renderer/software/TriangleLineRender.cpp b/project/src/renderer/software/TriangleLineRender.cpp index d46dfaf95..b696ef153 100644 --- a/project/src/renderer/software/TriangleLineRender.cpp +++ b/project/src/renderer/software/TriangleLineRender.cpp @@ -1,7 +1,7 @@ #include "TriangleLineRender.h" -namespace nme +namespace lime { TriangleLineRender::TriangleLineRender(const GraphicsJob &inJob, const GraphicsPath &inPath, Renderer *inSolid) : LineRender(inJob, inPath) diff --git a/project/src/renderer/software/TriangleRender.cpp b/project/src/renderer/software/TriangleRender.cpp index 9ca563fd9..57a4e76a2 100644 --- a/project/src/renderer/software/TriangleRender.cpp +++ b/project/src/renderer/software/TriangleRender.cpp @@ -2,7 +2,7 @@ #include -namespace nme +namespace lime { struct Edge @@ -223,4 +223,4 @@ Renderer *CreateTriangleRenderer(const GraphicsJob &inJob, const GraphicsPath &i } -} // end namespace nme +} // end namespace lime diff --git a/project/src/sound/openal/OpenALSound.cpp b/project/src/sound/openal/OpenALSound.cpp index 19cb8395a..4c8e4665a 100644 --- a/project/src/sound/openal/OpenALSound.cpp +++ b/project/src/sound/openal/OpenALSound.cpp @@ -1,7 +1,7 @@ #include "OpenALSound.h" -namespace nme +namespace lime { OpenALChannel::OpenALChannel(Object *inSound, ALuint inBufferID, int startTime, int inLoops, const SoundTransform &inTransform) @@ -848,10 +848,10 @@ namespace nme fseek(oggFile, mInfo.offset, 0); ov_callbacks callbacks; - callbacks.read_func = &nme::AudioStream_Ogg::read_func; - callbacks.seek_func = &nme::AudioStream_Ogg::seek_func; - callbacks.close_func = &nme::AudioStream_Ogg::close_func; - callbacks.tell_func = &nme::AudioStream_Ogg::tell_func; + callbacks.read_func = &lime::AudioStream_Ogg::read_func; + callbacks.seek_func = &lime::AudioStream_Ogg::seek_func; + callbacks.close_func = &lime::AudioStream_Ogg::close_func; + callbacks.tell_func = &lime::AudioStream_Ogg::tell_func; #else diff --git a/project/src/sound/openal/OpenALSound.h b/project/src/sound/openal/OpenALSound.h index 122184e77..fddad97a0 100644 --- a/project/src/sound/openal/OpenALSound.h +++ b/project/src/sound/openal/OpenALSound.h @@ -26,7 +26,7 @@ typedef unsigned char uint8; #define STREAM_BUFFER_SIZE (4096 * 4) -namespace nme +namespace lime { diff --git a/script/src/RunScript.hx b/script/src/RunScript.hx index bdb8bce64..b9cb91622 100644 --- a/script/src/RunScript.hx +++ b/script/src/RunScript.hx @@ -565,15 +565,15 @@ class RunScript { if (message != "") { - if (nme_error_output == null) { + if (lime_error_output == null) { try { - nme_error_output = Lib.load ("nme", "nme_error_output", 1); + lime_error_output = Lib.load ("lime", "lime_error_output", 1); } catch (e:Dynamic) { - nme_error_output = Lib.println; + lime_error_output = Lib.println; } @@ -581,7 +581,7 @@ class RunScript { try { - nme_error_output ("Error: " + message + "\n"); + lime_error_output ("Error: " + message + "\n"); } catch (e:Dynamic) {} @@ -1367,13 +1367,13 @@ class RunScript { case "installer": var hxlibcPath = PathHelper.getHaxelib (new Haxelib ("hxlibc")); - var nmePath = PathHelper.getHaxelib (new Haxelib ("nme")); + var nmePath = PathHelper.getHaxelib (new Haxelib ("lime")); var swfPath = PathHelper.getHaxelib (new Haxelib ("swf")); var actuatePath = PathHelper.getHaxelib (new Haxelib ("actuate")); var svgPath = PathHelper.getHaxelib (new Haxelib ("svg")); var hxlibcVersion = getVersion ("hxlibc", true); - var nmeVersion = getVersion ("nme", true); + var nmeVersion = getVersion ("lime", true); var swfVersion = getVersion ("swf", true); var actuateVersion = getVersion ("actuate", true); var svgVersion = getVersion ("svg", true); @@ -1401,7 +1401,7 @@ class RunScript { recursiveCopy (svgPath, nmeDirectory + tempPath + "/resources/svg/usr/lib/haxe/lib/svg/" + svgVersion, [ ".git", ".svn" ]); File.saveContent (nmeDirectory + tempPath + "/resources/hxlibc/usr/lib/haxe/lib/hxlibc/.current", getVersion ("hxlibc")); - File.saveContent (nmeDirectory + tempPath + "/resources/nme/usr/lib/haxe/lib/nme/.current", getVersion ("nme")); + File.saveContent (nmeDirectory + tempPath + "/resources/nme/usr/lib/haxe/lib/nme/.current", getVersion ("lime")); File.saveContent (nmeDirectory + tempPath + "/resources/swf/usr/lib/haxe/lib/swf/.current", getVersion ("swf")); File.saveContent (nmeDirectory + tempPath + "/resources/actuate/usr/lib/haxe/lib/actuate/.current", getVersion ("actuate")); File.saveContent (nmeDirectory + tempPath + "/resources/svg/usr/lib/haxe/lib/svg/.current", getVersion ("svg")); @@ -1431,13 +1431,13 @@ class RunScript { recursiveCopy (svgPath, nmeDirectory + tempPath + "/resources/svg/" + svgVersion, [ ".git", ".svn" ]); File.saveContent (nmeDirectory + tempPath + "/resources/hxlibc/.current", getVersion ("hxlibc")); - File.saveContent (nmeDirectory + tempPath + "/resources/nme/.current", getVersion ("nme")); + File.saveContent (nmeDirectory + tempPath + "/resources/nme/.current", getVersion ("lime")); File.saveContent (nmeDirectory + tempPath + "/resources/swf/.current", getVersion ("swf")); File.saveContent (nmeDirectory + tempPath + "/resources/actuate/.current", getVersion ("actuate")); File.saveContent (nmeDirectory + tempPath + "/resources/svg/.current", getVersion ("svg")); - var args = [ "/DVERSION=" + getVersion ("nme"), "/DVERSION_FOLDER=" + nmeVersion, "/DHAXE_VERSION=2.10", "/DNEKO_VERSION=1.8.2", "/DHXLIBC_VERSION=" + getVersion ("hxlibc"), "/DACTUATE_VERSION=" + getVersion ("actuate"), "/DSWF_VERSION=" + getVersion ("swf"), "/DSVG_VERSION=" + getVersion ("svg") ]; - args.push ("/DOUTPUT_PATH=../NME-" + getVersion ("nme") + "-Windows.exe"); + var args = [ "/DVERSION=" + getVersion ("lime"), "/DVERSION_FOLDER=" + nmeVersion, "/DHAXE_VERSION=2.10", "/DNEKO_VERSION=1.8.2", "/DHXLIBC_VERSION=" + getVersion ("hxlibc"), "/DACTUATE_VERSION=" + getVersion ("actuate"), "/DSWF_VERSION=" + getVersion ("swf"), "/DSVG_VERSION=" + getVersion ("svg") ]; + args.push ("/DOUTPUT_PATH=../NME-" + getVersion ("lime") + "-Windows.exe"); args.push ("Installer.nsi"); Sys.putEnv ("PATH", Sys.getEnv ("PATH") + ";C:\\Program Files (x86)\\NSIS"); @@ -1470,7 +1470,7 @@ class RunScript { } - private static var nme_error_output; + private static var lime_error_output; }