Cleanup deprecated APIs
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef ALAudioContext = lime.media.openal.ALAudioContext;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef ALCAudioContext = lime.media.openal.ALCAudioContext;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef AudioBuffer = lime.media.AudioBuffer;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef AudioContext = lime.media.AudioContext;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef AudioManager = lime.media.AudioManager;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef AudioSource = lime.media.AudioSource;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef FlashAudioContext = lime.media.FlashAudioContext;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef HTML5AudioContext = lime.media.HTML5AudioContext;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef WebAudioContext = lime.media.WebAudioContext;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.fmod;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef FMODChannel = lime.media.fmod.FMODChannel;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.fmod;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef FMODMode = lime.media.fmod.FMODMode;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.fmod;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef FMODSound = lime.media.fmod.FMODSound;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.howlerjs;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef Howl = lime.media.howlerjs.Howl;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.howlerjs;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef Howler = lime.media.howlerjs.Howler;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.openal;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef AL = lime.media.openal.AL;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.openal;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef ALBuffer = lime.media.openal.ALBuffer;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.openal;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef ALC = lime.media.openal.ALC;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.openal;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef ALContext = lime.media.openal.ALContext;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.openal;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef ALDevice = lime.media.openal.ALDevice;
|
|
||||||
#end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package lime.audio.openal;
|
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated("The lime.audio package has been moved to lime.media.*") typedef ALSource = lime.media.openal.ALSource;
|
|
||||||
#end
|
|
||||||
@@ -478,11 +478,11 @@ class Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function fromBase64 (base64:String, type:String #if (lime < "4.0.0"), onload:Image->Void #end):Image {
|
public static function fromBase64 (base64:String, type:String):Image {
|
||||||
|
|
||||||
if (base64 == null) return null;
|
if (base64 == null) return null;
|
||||||
var image = new Image ();
|
var image = new Image ();
|
||||||
image.__fromBase64 (base64, type, onload);
|
image.__fromBase64 (base64, type);
|
||||||
return image;
|
return image;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -506,11 +506,11 @@ class Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function fromBytes (bytes:Bytes #if (lime < "4.0.0"), onload:Image->Void = null #end):Image {
|
public static function fromBytes (bytes:Bytes):Image {
|
||||||
|
|
||||||
if (bytes == null) return null;
|
if (bytes == null) return null;
|
||||||
var image = new Image ();
|
var image = new Image ();
|
||||||
image.__fromBytes (bytes, onload);
|
image.__fromBytes (bytes);
|
||||||
return image;
|
return image;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -532,11 +532,11 @@ class Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function fromFile (path:String #if (lime < "4.0.0"), onload:Image -> Void = null, onerror:Void -> Void = null #end):Image {
|
public static function fromFile (path:String):Image {
|
||||||
|
|
||||||
if (path == null) return null;
|
if (path == null) return null;
|
||||||
var image = new Image ();
|
var image = new Image ();
|
||||||
image.__fromFile (path, onload, onerror);
|
image.__fromFile (path);
|
||||||
return image;
|
return image;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1304,7 +1304,7 @@ class Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function __fromBase64 (base64:String, type:String, onload:Image -> Void = null):Void {
|
private function __fromBase64 (base64:String, type:String, onload:Image->Void = null):Void {
|
||||||
|
|
||||||
#if (js && html5)
|
#if (js && html5)
|
||||||
var image = new JSImage ();
|
var image = new JSImage ();
|
||||||
@@ -1334,7 +1334,7 @@ class Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function __fromBytes (bytes:Bytes, onload:Image -> Void):Void {
|
private function __fromBytes (bytes:Bytes, onload:Image->Void = null):Void {
|
||||||
|
|
||||||
#if (js && html5)
|
#if (js && html5)
|
||||||
|
|
||||||
@@ -1398,7 +1398,7 @@ class Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function __fromFile (path:String, onload:Image -> Void, onerror:Void -> Void):Void {
|
private function __fromFile (path:String, onload:Image->Void = null, onerror:Void->Void = null):Void {
|
||||||
|
|
||||||
#if (js && html5)
|
#if (js && html5)
|
||||||
|
|
||||||
|
|||||||
@@ -235,60 +235,6 @@ class AudioBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
public static function fromURL (url:String, handler:AudioBuffer->Void):Void {
|
|
||||||
|
|
||||||
#if (js && html5 && howlerjs)
|
|
||||||
|
|
||||||
var audioBuffer = new AudioBuffer ();
|
|
||||||
audioBuffer.__srcHowl = new Howl ({ src: [ url ] });
|
|
||||||
audioBuffer.__srcHowl.on ("load", function () { handler (audioBuffer); });
|
|
||||||
audioBuffer.__srcHowl.on ("loaderror", function () { handler (null); });
|
|
||||||
audioBuffer.__srcHowl.load ();
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
if (url != null && url.indexOf ("http://") == -1 && url.indexOf ("https://") == -1) {
|
|
||||||
|
|
||||||
handler (AudioBuffer.fromFile (url));
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
// TODO: Support streaming sound
|
|
||||||
|
|
||||||
#if flash
|
|
||||||
|
|
||||||
var loader = new flash.net.URLLoader ();
|
|
||||||
loader.addEventListener (flash.events.Event.COMPLETE, function (_) {
|
|
||||||
handler (AudioBuffer.fromBytes (cast loader.data));
|
|
||||||
});
|
|
||||||
loader.addEventListener (flash.events.IOErrorEvent.IO_ERROR, function (_) {
|
|
||||||
handler (null);
|
|
||||||
});
|
|
||||||
loader.load (new flash.net.URLRequest (url));
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
//var loader = new URLLoader ();
|
|
||||||
//loader.onComplete.add (function (_) {
|
|
||||||
//var bytes = Bytes.ofString (loader.data);
|
|
||||||
//handler (AudioBuffer.fromBytes (bytes));
|
|
||||||
//});
|
|
||||||
//loader.onIOError.add (function (_, msg) {
|
|
||||||
//handler (null);
|
|
||||||
//});
|
|
||||||
//loader.load (new URLRequest (url));
|
|
||||||
|
|
||||||
#end
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#end
|
|
||||||
|
|
||||||
}
|
|
||||||
#end
|
|
||||||
|
|
||||||
|
|
||||||
#if lime_vorbis
|
#if lime_vorbis
|
||||||
|
|
||||||
public static function fromVorbisFile (vorbisFile:VorbisFile):AudioBuffer {
|
public static function fromVorbisFile (vorbisFile:VorbisFile):AudioBuffer {
|
||||||
|
|||||||
@@ -1808,10 +1808,6 @@ class ProjectXMLParser extends HXProject {
|
|||||||
|
|
||||||
var dependency = new Dependency (name, path);
|
var dependency = new Dependency (name, path);
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
dependency.forceLoad = true;
|
|
||||||
#end
|
|
||||||
|
|
||||||
if (element.has.resolve ("force-load")) {
|
if (element.has.resolve ("force-load")) {
|
||||||
|
|
||||||
dependency.forceLoad = (substitute (element.att.resolve ("force-load")) == "true");
|
dependency.forceLoad = (substitute (element.att.resolve ("force-load")) == "true");
|
||||||
|
|||||||
@@ -226,11 +226,4 @@ class AssetManifest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if (lime < "4.0.0")
|
|
||||||
@:deprecated public var basePath (get, set):String;
|
|
||||||
private function get_basePath ():String { return rootPath; }
|
|
||||||
private function set_basePath (value:String):String { return rootPath = value; }
|
|
||||||
#end
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -44,10 +44,10 @@ class Assets {
|
|||||||
|
|
||||||
|
|
||||||
public static var cache:AssetCache = new AssetCache ();
|
public static var cache:AssetCache = new AssetCache ();
|
||||||
#if (lime < "4.0.0") @:noCompletion public #else private #end static var libraries (default, null) = new Map<String, AssetLibrary> ();
|
|
||||||
public static var onChange = new Event<Void->Void> ();
|
public static var onChange = new Event<Void->Void> ();
|
||||||
|
|
||||||
private static var defaultRootPath:String;
|
private static var defaultRootPath:String;
|
||||||
|
private static var libraries (default, null) = new Map<String, AssetLibrary> ();
|
||||||
private static var libraryPaths = new Map<String, String> ();
|
private static var libraryPaths = new Map<String, String> ();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user