Lime console fixes
This commit is contained in:
10
include.xml
10
include.xml
@@ -1,11 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension>
|
||||
|
||||
<haxedef name="lime_html5" if="html5" />
|
||||
<haxedef name="lime_native" if="native" />
|
||||
<haxedef name="lime-html5" if="html5" />
|
||||
<haxedef name="lime-native" if="native" />
|
||||
|
||||
<haxedef name="no-compilation" />
|
||||
|
||||
<set name="included" value="1" if="windows || mac || linux || ios || android || blackberry || tizen || firefoxos }} html5 || flash" />
|
||||
<set name="included" value="1" if="windows || mac || linux || ios || android || blackberry || tizen || firefoxos || html5 || flash" />
|
||||
|
||||
<section unless="display">
|
||||
|
||||
@@ -43,6 +44,9 @@
|
||||
<target name="console-pc" handler="lime-console-pc" />
|
||||
<haxelib name="lime-console-pc" if="console-pc" />
|
||||
|
||||
<haxedef name="lime-opengl" unless="lime-console" />
|
||||
<haxedef name="lime-openal" unless="lime-console" />
|
||||
|
||||
</section>
|
||||
|
||||
<templatePath name="templates" />
|
||||
|
||||
@@ -9,8 +9,10 @@ class ALAudioContext {
|
||||
|
||||
|
||||
public var NONE:Int = 0;
|
||||
#if !console_pc
|
||||
public var FALSE:Int = 0;
|
||||
public var TRUE:Int = 1;
|
||||
#end
|
||||
public var SOURCE_RELATIVE:Int = 0x202;
|
||||
public var CONE_INNER_ANGLE:Int = 0x1001;
|
||||
public var CONE_OUTER_ANGLE:Int = 0x1002;
|
||||
@@ -50,7 +52,9 @@ class ALAudioContext {
|
||||
public var BITS:Int = 0x2002;
|
||||
public var CHANNELS:Int = 0x2003;
|
||||
public var SIZE:Int = 0x2004;
|
||||
#if !console_pc
|
||||
public var NO_ERROR:Int = 0;
|
||||
#end
|
||||
public var INVALID_NAME:Int = 0xA001;
|
||||
public var INVALID_ENUM:Int = 0xA002;
|
||||
public var INVALID_VALUE:Int = 0xA003;
|
||||
|
||||
@@ -9,14 +9,18 @@ import lime.audio.openal.ALDevice;
|
||||
class ALCAudioContext {
|
||||
|
||||
|
||||
#if !console_pc
|
||||
public var FALSE:Int = 0;
|
||||
public var TRUE:Int = 1;
|
||||
#end
|
||||
public var FREQUENCY:Int = 0x1007;
|
||||
public var REFRESH:Int = 0x1008;
|
||||
public var SYNC:Int = 0x1009;
|
||||
public var MONO_SOURCES:Int = 0x1010;
|
||||
public var STEREO_SOURCES:Int = 0x1011;
|
||||
#if !console_pc
|
||||
public var NO_ERROR:Int = 0;
|
||||
#end
|
||||
public var INVALID_DEVICE:Int = 0xA001;
|
||||
public var INVALID_CONTEXT:Int = 0xA002;
|
||||
public var INVALID_ENUM:Int = 0xA003;
|
||||
|
||||
@@ -9,8 +9,10 @@ class AL {
|
||||
|
||||
|
||||
public static inline var NONE:Int = 0;
|
||||
#if !console_pc
|
||||
public static inline var FALSE:Int = 0;
|
||||
public static inline var TRUE:Int = 1;
|
||||
#end
|
||||
public static inline var SOURCE_RELATIVE:Int = 0x202;
|
||||
public static inline var CONE_INNER_ANGLE:Int = 0x1001;
|
||||
public static inline var CONE_OUTER_ANGLE:Int = 0x1002;
|
||||
@@ -50,7 +52,9 @@ class AL {
|
||||
public static inline var BITS:Int = 0x2002;
|
||||
public static inline var CHANNELS:Int = 0x2003;
|
||||
public static inline var SIZE:Int = 0x2004;
|
||||
#if !console_pc
|
||||
public static inline var NO_ERROR:Int = 0;
|
||||
#end
|
||||
public static inline var INVALID_NAME:Int = 0xA001;
|
||||
public static inline var INVALID_ENUM:Int = 0xA002;
|
||||
public static inline var INVALID_VALUE:Int = 0xA003;
|
||||
@@ -74,7 +78,7 @@ class AL {
|
||||
|
||||
public static function bufferData (buffer:Int, format:Int, data:ByteArray, size:Int, freq:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_buffer_data (buffer, format, data.getByteBuffer (), size, freq);
|
||||
#end
|
||||
|
||||
@@ -83,7 +87,7 @@ class AL {
|
||||
|
||||
public static function buffer3f (buffer:Int, param:Int, value1:Float, value2:Float, value3:Float):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_buffer3f (buffer, param, value1, value2, value3);
|
||||
#end
|
||||
|
||||
@@ -92,7 +96,7 @@ class AL {
|
||||
|
||||
public static function buffer3i (buffer:Int, param:Int, value1:Int, value2:Int, value3:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_buffer3i (buffer, param, value1, value2, value3);
|
||||
#end
|
||||
|
||||
@@ -101,7 +105,7 @@ class AL {
|
||||
|
||||
public static function bufferf (buffer:Int, param:Int, value:Float):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_bufferf (buffer, param, value);
|
||||
#end
|
||||
|
||||
@@ -110,7 +114,7 @@ class AL {
|
||||
|
||||
public static function bufferfv (buffer:Int, param:Int, values:Array<Float>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_bufferfv (buffer, param, values);
|
||||
#end
|
||||
|
||||
@@ -119,7 +123,7 @@ class AL {
|
||||
|
||||
public static function bufferi (buffer:Int, param:Int, value:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_bufferi (buffer, param, value);
|
||||
#end
|
||||
|
||||
@@ -128,7 +132,7 @@ class AL {
|
||||
|
||||
public static function bufferiv (buffer:Int, param:Int, values:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_bufferiv (buffer, param, values);
|
||||
#end
|
||||
|
||||
@@ -137,7 +141,7 @@ class AL {
|
||||
|
||||
public static function deleteBuffer (buffer:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_delete_buffer (buffer);
|
||||
#end
|
||||
|
||||
@@ -146,7 +150,7 @@ class AL {
|
||||
|
||||
public static function deleteBuffers (buffers:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_delete_buffers (buffers.length, buffers);
|
||||
#end
|
||||
|
||||
@@ -155,7 +159,7 @@ class AL {
|
||||
|
||||
public static function deleteSource (source:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_delete_source (source);
|
||||
#end
|
||||
|
||||
@@ -164,7 +168,7 @@ class AL {
|
||||
|
||||
public static function deleteSources (sources:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_delete_sources (sources.length, sources);
|
||||
#end
|
||||
|
||||
@@ -173,7 +177,7 @@ class AL {
|
||||
|
||||
public static function disable (capability:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_disable (capability);
|
||||
#end
|
||||
|
||||
@@ -182,7 +186,7 @@ class AL {
|
||||
|
||||
public static function distanceModel (distanceModel:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_distance_model (distanceModel);
|
||||
#end
|
||||
|
||||
@@ -191,7 +195,7 @@ class AL {
|
||||
|
||||
public static function dopplerFactor (value:Float):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_doppler_factor (value);
|
||||
#end
|
||||
|
||||
@@ -200,7 +204,7 @@ class AL {
|
||||
|
||||
public static function dopplerVelocity (value:Float):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_doppler_velocity (value);
|
||||
#end
|
||||
|
||||
@@ -209,7 +213,7 @@ class AL {
|
||||
|
||||
public static function enable (capability:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_enable (capability);
|
||||
#end
|
||||
|
||||
@@ -218,7 +222,7 @@ class AL {
|
||||
|
||||
public static function genSource ():Int {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_gen_source ();
|
||||
#else
|
||||
return 0;
|
||||
@@ -229,7 +233,7 @@ class AL {
|
||||
|
||||
public static function genSources (n:Int):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_gen_sources (n);
|
||||
#else
|
||||
return null;
|
||||
@@ -240,7 +244,7 @@ class AL {
|
||||
|
||||
public static function genBuffer ():Int {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_gen_buffer ();
|
||||
#else
|
||||
return 0;
|
||||
@@ -251,7 +255,7 @@ class AL {
|
||||
|
||||
public static function genBuffers (n:Int):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_gen_buffers (n);
|
||||
#else
|
||||
return null;
|
||||
@@ -262,7 +266,7 @@ class AL {
|
||||
|
||||
public static function getBoolean (param:Int):Bool {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_boolean (param);
|
||||
#else
|
||||
return false;
|
||||
@@ -273,7 +277,7 @@ class AL {
|
||||
|
||||
public static function getBooleanv (param:Int, count:Int = 1 ):Array<Bool> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_booleanv (param, count);
|
||||
#else
|
||||
return null;
|
||||
@@ -284,7 +288,7 @@ class AL {
|
||||
|
||||
public static function getBuffer3f (buffer:Int, param:Int):Array<Float> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_buffer3f (buffer, param);
|
||||
#else
|
||||
return null;
|
||||
@@ -295,7 +299,7 @@ class AL {
|
||||
|
||||
public static function getBuffer3i (buffer:Int, param:Int):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_buffer3i (buffer, param);
|
||||
#else
|
||||
return null;
|
||||
@@ -306,7 +310,7 @@ class AL {
|
||||
|
||||
public static function getBufferf (buffer:Int, param:Int):Float {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_bufferf (buffer, param);
|
||||
#else
|
||||
return 0;
|
||||
@@ -317,7 +321,7 @@ class AL {
|
||||
|
||||
public static function getBufferfv (buffer:Int, param:Int, count:Int = 1):Array<Float> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_bufferfv (buffer, param, count);
|
||||
#else
|
||||
return null;
|
||||
@@ -328,7 +332,7 @@ class AL {
|
||||
|
||||
public static function getBufferi (buffer:Int, param:Int):Int {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_bufferi (buffer, param);
|
||||
#else
|
||||
return 0;
|
||||
@@ -339,7 +343,7 @@ class AL {
|
||||
|
||||
public static function getBufferiv (buffer:Int, param:Int, count:Int = 1):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_bufferiv (buffer, param, count);
|
||||
#else
|
||||
return null;
|
||||
@@ -350,7 +354,7 @@ class AL {
|
||||
|
||||
public static function getDouble (param:Int):Float {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_double (param);
|
||||
#else
|
||||
return 0;
|
||||
@@ -361,7 +365,7 @@ class AL {
|
||||
|
||||
public static function getDoublev (param:Int, count:Int = 1 ):Array<Float> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_doublev (param, count);
|
||||
#else
|
||||
return null;
|
||||
@@ -372,7 +376,7 @@ class AL {
|
||||
|
||||
public static function getEnumValue (ename:String):Int {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_enum_value (ename);
|
||||
#else
|
||||
return 0;
|
||||
@@ -383,7 +387,7 @@ class AL {
|
||||
|
||||
public static function getError ():Int {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_error ();
|
||||
#else
|
||||
return 0;
|
||||
@@ -410,7 +414,7 @@ class AL {
|
||||
|
||||
public static function getFloat (param:Int):Float {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_float (param);
|
||||
#else
|
||||
return 0;
|
||||
@@ -421,7 +425,7 @@ class AL {
|
||||
|
||||
public static function getFloatv (param:Int, count:Int = 1):Array<Float> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_floatv (param, count);
|
||||
#else
|
||||
return null;
|
||||
@@ -432,7 +436,7 @@ class AL {
|
||||
|
||||
public static function getInteger (param:Int):Int {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_integer (param);
|
||||
#else
|
||||
return 0;
|
||||
@@ -443,7 +447,7 @@ class AL {
|
||||
|
||||
public static function getIntegerv (param:Int, count:Int = 1):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_integerv (param, count);
|
||||
#else
|
||||
return null;
|
||||
@@ -454,7 +458,7 @@ class AL {
|
||||
|
||||
public static function getListener3f (param:Int):Array<Float> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_listener3f (param);
|
||||
#else
|
||||
return null;
|
||||
@@ -465,7 +469,7 @@ class AL {
|
||||
|
||||
public static function getListener3i (param:Int):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_listener3i (param);
|
||||
#else
|
||||
return null;
|
||||
@@ -476,7 +480,7 @@ class AL {
|
||||
|
||||
public static function getListenerf (param:Int):Float {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_listenerf (param);
|
||||
#else
|
||||
return 0;
|
||||
@@ -487,7 +491,7 @@ class AL {
|
||||
|
||||
public static function getListenerfv (param:Int, count:Int = 1):Array<Float> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_listenerfv (param, count);
|
||||
#else
|
||||
return null;
|
||||
@@ -498,7 +502,7 @@ class AL {
|
||||
|
||||
public static function getListeneri (param:Int):Int {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_listeneri (param);
|
||||
#else
|
||||
return 0;
|
||||
@@ -509,7 +513,7 @@ class AL {
|
||||
|
||||
public static function getListeneriv (param:Int, count:Int = 1):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_listeneriv (param, count);
|
||||
#else
|
||||
return null;
|
||||
@@ -527,7 +531,7 @@ class AL {
|
||||
|
||||
public static function getSource3f (source:Int, param:Int):Array<Float> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_source3f (source, param);
|
||||
#else
|
||||
return null;
|
||||
@@ -538,7 +542,7 @@ class AL {
|
||||
|
||||
public static function getSourcef (source:Int, param:Int):Float {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_sourcef (source, param);
|
||||
#else
|
||||
return 0;
|
||||
@@ -549,7 +553,7 @@ class AL {
|
||||
|
||||
public static function getSource3i (source:Int, param:Int):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_source3i (source, param);
|
||||
#else
|
||||
return null;
|
||||
@@ -560,7 +564,7 @@ class AL {
|
||||
|
||||
public static function getSourcefv (source:Int, param:Int):Array<Float> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_sourcefv (source, param);
|
||||
#else
|
||||
return null;
|
||||
@@ -571,7 +575,7 @@ class AL {
|
||||
|
||||
public static function getSourcei (source:Int, param:Int):Int {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_sourcei (source, param);
|
||||
#else
|
||||
return 0;
|
||||
@@ -582,7 +586,7 @@ class AL {
|
||||
|
||||
public static function getSourceiv (source:Int, param:Int, count:Int = 1):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_sourceiv (source, param, count);
|
||||
#else
|
||||
return null;
|
||||
@@ -593,7 +597,7 @@ class AL {
|
||||
|
||||
public static function getString (param:Int):String {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_get_string (param);
|
||||
#else
|
||||
return null;
|
||||
@@ -604,7 +608,7 @@ class AL {
|
||||
|
||||
public static function isBuffer (buffer:Int):Bool {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_is_buffer (buffer);
|
||||
#else
|
||||
return false;
|
||||
@@ -615,7 +619,7 @@ class AL {
|
||||
|
||||
public static function isEnabled (capability:Int):Bool {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_is_enabled (capability);
|
||||
#else
|
||||
return false;
|
||||
@@ -626,7 +630,7 @@ class AL {
|
||||
|
||||
public static function isExtensionPresent (extname:String):Bool {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_is_extension_present (extname);
|
||||
#else
|
||||
return false;
|
||||
@@ -637,7 +641,7 @@ class AL {
|
||||
|
||||
public static function isSource (source:Int):Bool {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_is_source (source);
|
||||
#else
|
||||
return false;
|
||||
@@ -648,7 +652,7 @@ class AL {
|
||||
|
||||
public static function listener3f (param:Int, value1:Float, value2:Float, value3:Float):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_listener3f (param, value1, value2, value3);
|
||||
#end
|
||||
|
||||
@@ -657,7 +661,7 @@ class AL {
|
||||
|
||||
public static function listener3i (param:Int, value1:Int, value2:Int, value3:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_listener3i (param, value1, value2, value3);
|
||||
#end
|
||||
|
||||
@@ -666,7 +670,7 @@ class AL {
|
||||
|
||||
public static function listenerf (param:Int, value:Float):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_listenerf (param, value);
|
||||
#end
|
||||
|
||||
@@ -675,7 +679,7 @@ class AL {
|
||||
|
||||
public static function listenerfv (param:Int, values:Array<Float>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_listenerfv (param, values);
|
||||
#end
|
||||
|
||||
@@ -684,7 +688,7 @@ class AL {
|
||||
|
||||
public static function listeneri (param:Int, value:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_listeneri (param, value);
|
||||
#end
|
||||
|
||||
@@ -693,7 +697,7 @@ class AL {
|
||||
|
||||
public static function listeneriv (param:Int, values:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_listeneriv (param, values);
|
||||
#end
|
||||
|
||||
@@ -702,7 +706,7 @@ class AL {
|
||||
|
||||
public static function source3f (source:Int, param:Int, value1:Float, value2:Float, value3:Float):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source3f (source, param, value1, value2, value3);
|
||||
#end
|
||||
|
||||
@@ -711,7 +715,7 @@ class AL {
|
||||
|
||||
public static function source3i (source:Int, param:Int, value1:Int, value2:Int, value3:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source3i (source, param, value1, value2, value3);
|
||||
#end
|
||||
|
||||
@@ -720,7 +724,7 @@ class AL {
|
||||
|
||||
public static function sourcef (source:Int, param:Int, value:Float):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_sourcef (source, param, value);
|
||||
#end
|
||||
|
||||
@@ -729,7 +733,7 @@ class AL {
|
||||
|
||||
public static function sourcefv (source:Int, param:Int, values:Array<Float>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_sourcefv (source, param, values);
|
||||
#end
|
||||
|
||||
@@ -738,7 +742,7 @@ class AL {
|
||||
|
||||
public static function sourcei (source:Int, param:Int, value:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_sourcei (source, param, value);
|
||||
#end
|
||||
|
||||
@@ -747,7 +751,7 @@ class AL {
|
||||
|
||||
public static function sourceiv (source:Int, param:Int, values:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_sourceiv (source, param, values);
|
||||
#end
|
||||
|
||||
@@ -756,7 +760,7 @@ class AL {
|
||||
|
||||
public static function sourcePlay (source:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_play (source);
|
||||
#end
|
||||
|
||||
@@ -765,7 +769,7 @@ class AL {
|
||||
|
||||
public static function sourcePlayv (sources:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_playv (sources.length, sources);
|
||||
#end
|
||||
|
||||
@@ -774,7 +778,7 @@ class AL {
|
||||
|
||||
public static function sourceStop (source:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_stop (source);
|
||||
#end
|
||||
|
||||
@@ -783,7 +787,7 @@ class AL {
|
||||
|
||||
public static function sourceStopv (sources:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_stopv (sources.length, sources);
|
||||
#end
|
||||
|
||||
@@ -792,7 +796,7 @@ class AL {
|
||||
|
||||
public static function sourceRewind (source:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_rewind (source);
|
||||
#end
|
||||
|
||||
@@ -801,7 +805,7 @@ class AL {
|
||||
|
||||
public static function sourceRewindv (sources:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_rewindv (sources.length, sources);
|
||||
#end
|
||||
|
||||
@@ -810,7 +814,7 @@ class AL {
|
||||
|
||||
public static function sourcePause (source:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_pause (source);
|
||||
#end
|
||||
|
||||
@@ -819,7 +823,7 @@ class AL {
|
||||
|
||||
public static function sourcePausev (sources:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_pausev (sources.length, sources);
|
||||
#end
|
||||
|
||||
@@ -828,7 +832,7 @@ class AL {
|
||||
|
||||
public static function sourceQueueBuffer (source:Int, buffer:Int):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_queue_buffers (source, 1, [ buffer ]);
|
||||
#end
|
||||
|
||||
@@ -837,7 +841,7 @@ class AL {
|
||||
|
||||
public static function sourceQueueBuffers (source:Int, nb:Int, buffers:Array<Int>):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_source_queue_buffers (source, nb, buffers);
|
||||
#end
|
||||
|
||||
@@ -846,7 +850,7 @@ class AL {
|
||||
|
||||
public static function sourceUnqueueBuffer (source:Int):Int {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
var res = lime_al_source_unqueue_buffers (source, 1);
|
||||
return res[0];
|
||||
#else
|
||||
@@ -858,7 +862,7 @@ class AL {
|
||||
|
||||
public static function sourceUnqueueBuffers (source:Int, nb:Int):Array<Int> {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_al_source_unqueue_buffers (source, nb);
|
||||
#else
|
||||
return null;
|
||||
@@ -869,14 +873,14 @@ class AL {
|
||||
|
||||
public static function speedOfSound (value:Float):Void {
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_al_speed_of_sound (value);
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
#if (cpp || neko)
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
private static var lime_al_buffer_data = System.load ("lime", "lime_al_buffer_data", 5);
|
||||
private static var lime_al_bufferf = System.load ("lime", "lime_al_bufferf", 3);
|
||||
private static var lime_al_buffer3f = System.load ("lime", "lime_al_buffer3f", 5);
|
||||
|
||||
@@ -7,14 +7,18 @@ import lime.system.System;
|
||||
class ALC {
|
||||
|
||||
|
||||
#if !console_pc
|
||||
public static inline var FALSE:Int = 0;
|
||||
public static inline var TRUE:Int = 1;
|
||||
#end
|
||||
public static inline var FREQUENCY:Int = 0x1007;
|
||||
public static inline var REFRESH:Int = 0x1008;
|
||||
public static inline var SYNC:Int = 0x1009;
|
||||
public static inline var MONO_SOURCES:Int = 0x1010;
|
||||
public static inline var STEREO_SOURCES:Int = 0x1011;
|
||||
#if !console_pc
|
||||
public static inline var NO_ERROR:Int = 0;
|
||||
#end
|
||||
public static inline var INVALID_DEVICE:Int = 0xA001;
|
||||
public static inline var INVALID_CONTEXT:Int = 0xA002;
|
||||
public static inline var INVALID_ENUM:Int = 0xA003;
|
||||
@@ -32,13 +36,18 @@ class ALC {
|
||||
|
||||
public static function closeDevice (device:ALDevice):Bool {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_alc_close_device (device);
|
||||
#else
|
||||
return false;
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function createContext (device:ALDevice, attrlist:Array<Int> = null):ALContext {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
var handle:Float = lime_alc_create_context (device, attrlist);
|
||||
|
||||
if (handle != 0) {
|
||||
@@ -46,6 +55,7 @@ class ALC {
|
||||
return new ALContext (handle);
|
||||
|
||||
}
|
||||
#end
|
||||
|
||||
return null;
|
||||
|
||||
@@ -54,13 +64,16 @@ class ALC {
|
||||
|
||||
public static function destroyContext (context:ALContext):Void {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_alc_destroy_context (context);
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function getContextsDevice (context:ALContext):ALDevice {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
var handle:Float = lime_alc_get_contexts_device (context);
|
||||
|
||||
if (handle != 0) {
|
||||
@@ -68,6 +81,7 @@ class ALC {
|
||||
return new ALDevice (handle);
|
||||
|
||||
}
|
||||
#end
|
||||
|
||||
return null;
|
||||
|
||||
@@ -76,6 +90,7 @@ class ALC {
|
||||
|
||||
public static function getCurrentContext ():ALContext {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
var handle:Float = lime_alc_get_current_context ();
|
||||
|
||||
if (handle != 0) {
|
||||
@@ -83,6 +98,7 @@ class ALC {
|
||||
return new ALContext (handle);
|
||||
|
||||
}
|
||||
#end
|
||||
|
||||
return null;
|
||||
|
||||
@@ -91,7 +107,11 @@ class ALC {
|
||||
|
||||
public static function getError (device:ALDevice):Int {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_alc_get_error (device);
|
||||
#else
|
||||
return 0;
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
@@ -114,27 +134,40 @@ class ALC {
|
||||
|
||||
public static function getIntegerv (device:ALDevice, param:Int, size:Int):Array<Int> {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_alc_get_integerv (device, param, size);
|
||||
#else
|
||||
return null;
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function getString (device:ALDevice, param:Int):String {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_alc_get_string (device, param);
|
||||
#else
|
||||
return null;
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function makeContextCurrent (context:ALContext):Bool {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
return lime_alc_make_context_current (context);
|
||||
#else
|
||||
return false;
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function openDevice (deviceName:String = null):ALDevice {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
var handle:Float = lime_alc_open_device (deviceName);
|
||||
|
||||
if (handle != 0) {
|
||||
@@ -142,6 +175,7 @@ class ALC {
|
||||
return new ALDevice (handle);
|
||||
|
||||
}
|
||||
#end
|
||||
|
||||
return null;
|
||||
|
||||
@@ -150,18 +184,23 @@ class ALC {
|
||||
|
||||
public static function processContext (context:ALContext):Void {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_alc_process_context (context);
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function suspendContext (context:ALContext):Void {
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
lime_alc_suspend_context (context);
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
#if ((cpp || neko) && lime_openal)
|
||||
private static var lime_alc_close_device = System.load ("lime", "lime_alc_close_device", 1);
|
||||
private static var lime_alc_create_context = System.load ("lime", "lime_alc_create_context", 2);
|
||||
private static var lime_alc_destroy_context = System.load ("lime", "lime_alc_destroy_context", 1);
|
||||
@@ -174,6 +213,7 @@ class ALC {
|
||||
private static var lime_alc_open_device = System.load ("lime", "lime_alc_open_device", 1);
|
||||
private static var lime_alc_process_context = System.load ("lime", "lime_alc_process_context", 1);
|
||||
private static var lime_alc_suspend_context = System.load ("lime", "lime_alc_suspend_context", 1);
|
||||
#end
|
||||
|
||||
|
||||
}
|
||||
@@ -83,7 +83,9 @@ class GLRenderContext {
|
||||
public var SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
|
||||
public var SAMPLE_COVERAGE = 0x80A0;
|
||||
|
||||
#if !console_pc
|
||||
public var NO_ERROR = 0;
|
||||
#end
|
||||
public var INVALID_ENUM = 0x0500;
|
||||
public var INVALID_VALUE = 0x0501;
|
||||
public var INVALID_OPERATION = 0x0502;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -74,7 +74,9 @@ package lime.ui;
|
||||
var X = 0x78;
|
||||
var Y = 0x79;
|
||||
var Z = 0x7A;
|
||||
#if !console_pc
|
||||
var DELETE = 0x7F;
|
||||
#end
|
||||
var CAPS_LOCK = 0x40000039;
|
||||
var F1 = 0x4000003A;
|
||||
var F2 = 0x4000003B;
|
||||
@@ -155,7 +157,9 @@ package lime.ui;
|
||||
var PRIOR = 0x4000009D;
|
||||
var RETURN2 = 0x4000009E;
|
||||
var SEPARATOR = 0x4000009F;
|
||||
#if !console_pc
|
||||
var OUT = 0x400000A0;
|
||||
#end
|
||||
var OPER = 0x400000A1;
|
||||
var CLEAR_AGAIN = 0x400000A2;
|
||||
var CRSEL = 0x400000A3;
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace lime {
|
||||
class Image;
|
||||
|
||||
|
||||
#ifdef LIME_FREETYPE
|
||||
typedef struct {
|
||||
|
||||
unsigned long codepoint;
|
||||
@@ -26,6 +27,16 @@ namespace lime {
|
||||
FT_Pos height;
|
||||
|
||||
} GlyphInfo;
|
||||
#else
|
||||
typedef struct {
|
||||
|
||||
unsigned long codepoint;
|
||||
size_t size;
|
||||
int index;
|
||||
int height;
|
||||
|
||||
} GlyphInfo;
|
||||
#endif
|
||||
|
||||
|
||||
class Font {
|
||||
|
||||
@@ -283,9 +283,11 @@ namespace lime {
|
||||
|
||||
void lime_text_destroy (value textHandle) {
|
||||
|
||||
#ifdef LIME_HARFBUZZ
|
||||
Text *text = (Text*)(intptr_t)val_float (textHandle);
|
||||
delete text;
|
||||
text = 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace lime {
|
||||
|
||||
int ConsoleApplication::Exec () {
|
||||
|
||||
printf ("Hello World\n");
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user