diff --git a/lime/Assets.hx b/lime/Assets.hx index dca6c0388..594a53d3b 100644 --- a/lime/Assets.hx +++ b/lime/Assets.hx @@ -3,9 +3,9 @@ package lime; import haxe.Unserializer; +import lime.audio.AudioBuffer; import lime.graphics.Font; -import lime.media.AudioBuffer; -import lime.media.Image; +import lime.graphics.Image; import lime.utils.ByteArray; diff --git a/lime/app/Application.hx b/lime/app/Application.hx index c35165501..2f232adc6 100644 --- a/lime/app/Application.hx +++ b/lime/app/Application.hx @@ -1,8 +1,8 @@ package lime.app; +import lime.audio.AudioManager; import lime.graphics.*; -import lime.media.AudioManager; import lime.system.*; import lime.ui.*; diff --git a/lime/media/ALAudioContext.hx b/lime/audio/ALAudioContext.hx similarity index 99% rename from lime/media/ALAudioContext.hx rename to lime/audio/ALAudioContext.hx index 31518ed38..b79d927c1 100644 --- a/lime/media/ALAudioContext.hx +++ b/lime/audio/ALAudioContext.hx @@ -1,7 +1,7 @@ -package lime.media; +package lime.audio; -import lime.media.openal.AL; +import lime.audio.openal.AL; import lime.utils.Float32Array; diff --git a/lime/media/ALCAudioContext.hx b/lime/audio/ALCAudioContext.hx similarity index 95% rename from lime/media/ALCAudioContext.hx rename to lime/audio/ALCAudioContext.hx index d6e6b9dd4..4a824dc57 100644 --- a/lime/media/ALCAudioContext.hx +++ b/lime/audio/ALCAudioContext.hx @@ -1,9 +1,9 @@ -package lime.media; +package lime.audio; -import lime.media.openal.ALC; -import lime.media.openal.ALContext; -import lime.media.openal.ALDevice; +import lime.audio.openal.ALC; +import lime.audio.openal.ALContext; +import lime.audio.openal.ALDevice; class ALCAudioContext { diff --git a/lime/media/AudioBuffer.hx b/lime/audio/AudioBuffer.hx similarity index 96% rename from lime/media/AudioBuffer.hx rename to lime/audio/AudioBuffer.hx index bda5be0da..1e2099f6a 100644 --- a/lime/media/AudioBuffer.hx +++ b/lime/audio/AudioBuffer.hx @@ -1,7 +1,7 @@ -package lime.media; +package lime.audio; -import lime.media.openal.AL; +import lime.audio.openal.AL; import lime.system.System; import lime.utils.ByteArray; import lime.utils.Float32Array; diff --git a/lime/media/AudioContext.hx b/lime/audio/AudioContext.hx similarity index 55% rename from lime/media/AudioContext.hx rename to lime/audio/AudioContext.hx index 6a6ad1897..d001538e2 100644 --- a/lime/media/AudioContext.hx +++ b/lime/audio/AudioContext.hx @@ -1,10 +1,10 @@ -package lime.media; +package lime.audio; -import lime.media.ALAudioContext; -import lime.media.FlashAudioContext; -import lime.media.HTML5AudioContext; -import lime.media.WebAudioContext; +import lime.audio.ALAudioContext; +import lime.audio.FlashAudioContext; +import lime.audio.HTML5AudioContext; +import lime.audio.WebAudioContext; enum AudioContext { diff --git a/lime/media/AudioManager.hx b/lime/audio/AudioManager.hx similarity index 92% rename from lime/media/AudioManager.hx rename to lime/audio/AudioManager.hx index dc859f998..e3369f9ef 100644 --- a/lime/media/AudioManager.hx +++ b/lime/audio/AudioManager.hx @@ -1,10 +1,10 @@ -package lime.media; +package lime.audio; -import lime.media.openal.AL; -import lime.media.openal.ALC; -import lime.media.openal.ALContext; -import lime.media.openal.ALDevice; +import lime.audio.openal.AL; +import lime.audio.openal.ALC; +import lime.audio.openal.ALContext; +import lime.audio.openal.ALDevice; #if js import js.Browser; diff --git a/lime/media/AudioSource.hx b/lime/audio/AudioSource.hx similarity index 97% rename from lime/media/AudioSource.hx rename to lime/audio/AudioSource.hx index a16f187b2..9fc749d04 100644 --- a/lime/media/AudioSource.hx +++ b/lime/audio/AudioSource.hx @@ -1,8 +1,8 @@ -package lime.media; +package lime.audio; import lime.app.Event; -import lime.media.openal.AL; +import lime.audio.openal.AL; class AudioSource { diff --git a/lime/media/FlashAudioContext.hx b/lime/audio/FlashAudioContext.hx similarity index 99% rename from lime/media/FlashAudioContext.hx rename to lime/audio/FlashAudioContext.hx index 307696dad..ea88684c7 100644 --- a/lime/media/FlashAudioContext.hx +++ b/lime/audio/FlashAudioContext.hx @@ -1,4 +1,4 @@ -package lime.media; +package lime.audio; #if flash diff --git a/lime/media/HTML5AudioContext.hx b/lime/audio/HTML5AudioContext.hx similarity index 99% rename from lime/media/HTML5AudioContext.hx rename to lime/audio/HTML5AudioContext.hx index 322b358d5..de68df660 100644 --- a/lime/media/HTML5AudioContext.hx +++ b/lime/audio/HTML5AudioContext.hx @@ -1,4 +1,4 @@ -package lime.media; +package lime.audio; #if js diff --git a/lime/media/WebAudioContext.hx b/lime/audio/WebAudioContext.hx similarity index 98% rename from lime/media/WebAudioContext.hx rename to lime/audio/WebAudioContext.hx index fe6a167b9..18a3287e5 100644 --- a/lime/media/WebAudioContext.hx +++ b/lime/audio/WebAudioContext.hx @@ -1,4 +1,4 @@ -package lime.media; #if !js +package lime.audio; #if !js class WebAudioContext { diff --git a/lime/media/openal/AL.hx b/lime/audio/openal/AL.hx similarity index 99% rename from lime/media/openal/AL.hx rename to lime/audio/openal/AL.hx index cd7ac3a70..112a24637 100644 --- a/lime/media/openal/AL.hx +++ b/lime/audio/openal/AL.hx @@ -1,4 +1,4 @@ -package lime.media.openal; +package lime.audio.openal; import lime.system.System; diff --git a/lime/media/openal/ALC.hx b/lime/audio/openal/ALC.hx similarity index 99% rename from lime/media/openal/ALC.hx rename to lime/audio/openal/ALC.hx index ac7e3d3e6..ead7ca8d5 100644 --- a/lime/media/openal/ALC.hx +++ b/lime/audio/openal/ALC.hx @@ -1,4 +1,4 @@ -package lime.media.openal; +package lime.audio.openal; import lime.system.System; diff --git a/lime/media/openal/ALContext.hx b/lime/audio/openal/ALContext.hx similarity index 61% rename from lime/media/openal/ALContext.hx rename to lime/audio/openal/ALContext.hx index 89c70008f..aa49f4162 100644 --- a/lime/media/openal/ALContext.hx +++ b/lime/audio/openal/ALContext.hx @@ -1,8 +1,8 @@ -package lime.media.openal; +package lime.audio.openal; -@:allow(lime.media.openal.AL) -@:allow(lime.media.openal.ALC) +@:allow(lime.audio.openal.AL) +@:allow(lime.audio.openal.ALC) abstract ALContext(Null) from Null to Null { diff --git a/lime/media/openal/ALDevice.hx b/lime/audio/openal/ALDevice.hx similarity index 61% rename from lime/media/openal/ALDevice.hx rename to lime/audio/openal/ALDevice.hx index 12095e464..33001a38e 100644 --- a/lime/media/openal/ALDevice.hx +++ b/lime/audio/openal/ALDevice.hx @@ -1,8 +1,8 @@ -package lime.media.openal; +package lime.audio.openal; -@:allow(lime.media.openal.AL) -@:allow(lime.media.openal.ALC) +@:allow(lime.audio.openal.AL) +@:allow(lime.audio.openal.ALC) abstract ALDevice(Null) from Null to Null { diff --git a/lime/graphics/Font.hx b/lime/graphics/Font.hx index dada8fb4f..13e5dc3d2 100644 --- a/lime/graphics/Font.hx +++ b/lime/graphics/Font.hx @@ -1,8 +1,8 @@ package lime.graphics; import haxe.ds.StringMap; -import lime.media.Image; -import lime.media.ImageBuffer; +import lime.graphics.Image; +import lime.graphics.ImageBuffer; import lime.utils.UInt8Array; import lime.system.System; #if js diff --git a/lime/media/Image.hx b/lime/graphics/Image.hx similarity index 97% rename from lime/media/Image.hx rename to lime/graphics/Image.hx index a7c4fe69a..688d2272b 100644 --- a/lime/media/Image.hx +++ b/lime/graphics/Image.hx @@ -1,9 +1,7 @@ -package lime.media; +package lime.graphics; import lime.app.Application; -import lime.graphics.RenderContext; -import lime.graphics.Renderer; import lime.utils.ByteArray; import lime.utils.UInt8Array; import lime.system.System; @@ -222,7 +220,7 @@ class Image { private function get_data ():UInt8Array { - if (buffer.data == null && buffer.src != null && buffer.width > 0 && buffer.height > 0) { + if (buffer.data == null && buffer.width > 0 && buffer.height > 0) { #if js diff --git a/lime/graphics/ImageBuffer.hx b/lime/graphics/ImageBuffer.hx new file mode 100644 index 000000000..7213b390c --- /dev/null +++ b/lime/graphics/ImageBuffer.hx @@ -0,0 +1,89 @@ +package lime.graphics; + + +import lime.utils.UInt8Array; + +#if js +import js.html.CanvasElement; +import js.html.CanvasRenderingContext2D; +import js.html.Image in HTMLImage; +#elseif flash +import flash.display.BitmapData; +#end + +@:allow(lime.graphics.Image) + + +class ImageBuffer { + + + public var bitsPerPixel:Int; + public var data:UInt8Array; + public var height:Int; + public var premultiplied:Bool; + public var src (get, set):Dynamic; + public var width:Int; + + private var __bitmapData:#if flash BitmapData #else Dynamic #end; + private var __canvas:#if js CanvasElement #else Dynamic #end; + private var __canvasContext:#if js CanvasRenderingContext2D #else Dynamic #end; + private var __custom:Dynamic; + private var __image:#if js HTMLImage #else Dynamic #end; + + + public function new (data:UInt8Array = null, width:Int = 0, height:Int = 0, bitsPerPixel:Int = 4) { + + this.data = data; + this.width = width; + this.height = height; + this.bitsPerPixel = bitsPerPixel; + + } + + + + + // Get & Set Methods + + + + + private function get_src ():Dynamic { + + #if js + if (__image != null) return __image; + return __canvas; + #elseif flash + return __bitmapData; + #else + return __custom; + #end + + } + + + private function set_src (value:Dynamic):Dynamic { + + #if js + if (Std.is (value, HTMLImage)) { + + __image = cast value; + + } else if (Std.is (value, CanvasElement)) { + + __canvas = cast value; + __canvasContext = cast __canvas.getContext ("2d"); + + } + #elseif flash + __bitmapData = cast value; + #else + __custom = value; + #end + + return value; + + } + + +} \ No newline at end of file diff --git a/lime/math/ColorMatrix.hx b/lime/math/ColorMatrix.hx new file mode 100644 index 000000000..d93f43462 --- /dev/null +++ b/lime/math/ColorMatrix.hx @@ -0,0 +1,248 @@ +package lime.math; + + +import lime.utils.Float32Array; + + +abstract ColorMatrix(Float32Array) from Float32Array to Float32Array { + + + private static var __identity = [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ]; + + public var alphaMultiplier (get, set):Float; + public var alphaOffset (get, set):Float; + public var blueMultiplier (get, set):Float; + public var blueOffset (get, set):Float; + public var color (get, set):Int; + public var greenMultiplier (get, set):Float; + public var greenOffset (get, set):Float; + public var redMultiplier (get, set):Float; + public var redOffset (get, set):Float; + + + public function new (data:Float32Array = null) { + + if (data != null && data.length == 16) { + + this = data; + + } else { + + this = new Float32Array (__identity); + + } + + } + + + public function clone ():ColorMatrix { + + return new ColorMatrix (new Float32Array (this)); + + } + + + public function concat (second:ColorMatrix):Void { + + redMultiplier += second.redMultiplier; + greenMultiplier += second.greenMultiplier; + blueMultiplier += second.blueMultiplier; + alphaMultiplier += second.alphaMultiplier; + + } + + + public function copyFrom (other:ColorMatrix):Void { + + this.set (other); + + } + + + public function identity () { + + this[0] = 1; + this[1] = 0; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 1; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 1; + this[13] = 0; + this[14] = 0; + this[15] = 0; + this[16] = 0; + this[17] = 0; + this[18] = 1; + this[19] = 0; + + } + + + + + // Get & Set Methods + + + + + private inline function get_alphaMultiplier ():Float { + + return this[18]; + + } + + + private inline function set_alphaMultiplier (value:Float):Float { + + return this[18] = value; + + } + + + private inline function get_alphaOffset ():Int { + + return Std.int (this[19] * 255); + + } + + + private inline function set_alphaOffset (value:Int):Int { + + this[19] = value / 255; + return value; + + } + + + private inline function get_blueMultiplier ():Float { + + return this[12]; + + } + + + private inline function set_blueMultiplier (value:Float):Float { + + return this[12] = value; + + } + + + private inline function get_blueOffset ():Int { + + return Std.int (this[14] * 255); + + } + + + private inline function set_blueOffset (value:Int):Int { + + this[14] = value / 255; + return value; + + } + + + private function get_color ():Int { + + return ((Std.int (redOffset) << 16) | (Std.int (greenOffset) << 8) | Std.int (blueOffset)); + + } + + + private function set_color (value:Int):Int { + + redOffset = (value >> 16) & 0xFF; + greenOffset = (value >> 8) & 0xFF; + blueOffset = value & 0xFF; + + redMultiplier = 0; + greenMultiplier = 0; + blueMultiplier = 0; + + return color; + + } + + + private inline function get_greenMultiplier ():Float { + + return this[6]; + + } + + + private inline function set_greenMultiplier (value:Float):Float { + + return this[6] = value; + + } + + + private inline function get_greenOffset ():Int { + + return Std.int (this[9] * 255); + + } + + + private inline function set_greenOffset (value:Int):Int { + + this[9] = value / 255; + return value; + + } + + + private inline function get_redMultiplier ():Float { + + return this[0]; + + } + + + private inline function set_redMultiplier (value:Float):Float { + + return this[0] = value; + + } + + + private inline function get_redOffset ():Int { + + return Std.int (this[4] * 255); + + } + + + private inline function set_redOffset (value:Int):Int { + + this[4] = value / 255; + return value; + + } + + + @:arrayAccess public function get (index:Int):Float { + + return this[index]; + + } + + + @:arrayAccess public function set (index:Int, value:Float):Float { + + this[index] = value; + return value; + + } + + +} diff --git a/lime/utils/Matrix3.hx b/lime/math/Matrix3.hx similarity index 99% rename from lime/utils/Matrix3.hx rename to lime/math/Matrix3.hx index ff5d8c1b7..ccdf35a81 100644 --- a/lime/utils/Matrix3.hx +++ b/lime/math/Matrix3.hx @@ -1,7 +1,4 @@ -package lime.utils; - - -import lime.utils.Vector2; +package lime.math; class Matrix3 { diff --git a/lime/utils/Matrix4.hx b/lime/math/Matrix4.hx similarity index 99% rename from lime/utils/Matrix4.hx rename to lime/math/Matrix4.hx index 902cd2a30..499f6c875 100644 --- a/lime/utils/Matrix4.hx +++ b/lime/math/Matrix4.hx @@ -1,4 +1,4 @@ -package lime.utils; +package lime.math; import lime.utils.Float32Array; diff --git a/lime/math/Rectangle.hx b/lime/math/Rectangle.hx new file mode 100644 index 000000000..87164a19d --- /dev/null +++ b/lime/math/Rectangle.hx @@ -0,0 +1,305 @@ +package lime.math; + + +class Rectangle { + + + public var bottom (get, set):Float; + public var bottomRight (get, set):Vector2; + public var height:Float; + public var left (get, set):Float; + public var right (get, set):Float; + public var size (get, set):Vector2; + public var top (get, set):Float; + public var topLeft (get, set):Vector2; + public var width:Float; + public var x:Float; + public var y:Float; + + + public function new (x:Float = 0, y:Float = 0, width:Float = 0, height:Float = 0):Void { + + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + } + + + public function clone ():Rectangle { + + return new Rectangle (x, y, width, height); + + } + + + public function contains (x:Float, y:Float):Bool { + + return x >= this.x && y >= this.y && x < right && y < bottom; + + } + + + public function containsPoint (point:Vector2):Bool { + + return contains (point.x, point.y); + + } + + + public function containsRect (rect:Rectangle):Bool { + + if (rect.width <= 0 || rect.height <= 0) { + + return rect.x > x && rect.y > y && rect.right < right && rect.bottom < bottom; + + } else { + + return rect.x >= x && rect.y >= y && rect.right <= right && rect.bottom <= bottom; + + } + + } + + + public function copyFrom (sourceRect:Rectangle):Void { + + x = sourceRect.x; + y = sourceRect.y; + width = sourceRect.width; + height = sourceRect.height; + + } + + + public function equals (toCompare:Rectangle):Bool { + + return toCompare != null && x == toCompare.x && y == toCompare.y && width == toCompare.width && height == toCompare.height; + + } + + + public function inflate (dx:Float, dy:Float):Void { + + x -= dx; width += dx * 2; + y -= dy; height += dy * 2; + + } + + + public function inflatePoint (point:Vector2):Void { + + inflate (point.x, point.y); + + } + + + public function intersection (toIntersect:Rectangle):Rectangle { + + var x0 = x < toIntersect.x ? toIntersect.x : x; + var x1 = right > toIntersect.right ? toIntersect.right : right; + + if (x1 <= x0) { + + return new Rectangle (); + + } + + var y0 = y < toIntersect.y ? toIntersect.y : y; + var y1 = bottom > toIntersect.bottom ? toIntersect.bottom : bottom; + + if (y1 <= y0) { + + return new Rectangle (); + + } + + return new Rectangle (x0, y0, x1 - x0, y1 - y0); + + } + + + public function intersects (toIntersect:Rectangle):Bool { + + var x0 = x < toIntersect.x ? toIntersect.x : x; + var x1 = right > toIntersect.right ? toIntersect.right : right; + + if (x1 <= x0) { + + return false; + + } + + var y0 = y < toIntersect.y ? toIntersect.y : y; + var y1 = bottom > toIntersect.bottom ? toIntersect.bottom : bottom; + + return y1 > y0; + + } + + + public function isEmpty ():Bool { + + return (width <= 0 || height <= 0); + + } + + + public function offset (dx:Float, dy:Float):Void { + + x += dx; + y += dy; + + } + + + public function offsetPoint (point:Vector2):Void { + + x += point.x; + y += point.y; + + } + + + public function setEmpty ():Void { + + x = y = width = height = 0; + + } + + + public function setTo (xa:Float, ya:Float, widtha:Float, heighta:Float):Void { + + x = xa; + y = ya; + width = widtha; + height = heighta; + + } + + + public function transform (m:Matrix):Rectangle { + + var tx0 = m.a * x + m.c * y; + var tx1 = tx0; + var ty0 = m.b * x + m.d * y; + var ty1 = tx0; + + var tx = m.a * (x + width) + m.c * y; + var ty = m.b * (x + width) + m.d * y; + + if (tx < tx0) tx0 = tx; + if (ty < ty0) ty0 = ty; + if (tx > tx1) tx1 = tx; + if (ty > ty1) ty1 = ty; + + tx = m.a * (x + width) + m.c * (y + height); + ty = m.b * (x + width) + m.d * (y + height); + + if (tx < tx0) tx0 = tx; + if (ty < ty0) ty0 = ty; + if (tx > tx1) tx1 = tx; + if (ty > ty1) ty1 = ty; + + tx = m.a * x + m.c * (y + height); + ty = m.b * x + m.d * (y + height); + + if (tx < tx0) tx0 = tx; + if (ty < ty0) ty0 = ty; + if (tx > tx1) tx1 = tx; + if (ty > ty1) ty1 = ty; + + return new Rectangle (tx0 + m.tx, ty0 + m.ty, tx1 - tx0, ty1 - ty0); + + } + + + public function union (toUnion:Rectangle):Rectangle { + + if (width == 0 || height == 0) { + + return toUnion.clone (); + + } else if (toUnion.width == 0 || toUnion.height == 0) { + + return clone (); + + } + + var x0 = x > toUnion.x ? toUnion.x : x; + var x1 = right < toUnion.right ? toUnion.right : right; + var y0 = y > toUnion.y ? toUnion.y : y; + var y1 = bottom < toUnion.bottom ? toUnion.bottom : bottom; + + return new Rectangle (x0, y0, x1 - x0, y1 - y0); + + } + + + public function __contract (x:Float, y:Float, width:Float, height:Float):Void { + + if (this.width == 0 && this.height == 0) { + + return; + + } + + var cacheRight = right; + var cacheBottom = bottom; + + if (this.x < x) this.x = x; + if (this.y < y) this.y = y; + if (this.right > x + width) this.width = x + width - this.x; + if (this.bottom > y + height) this.height = y + height - this.y; + + } + + + public function __expand (x:Float, y:Float, width:Float, height:Float):Void { + + if (this.width == 0 && this.height == 0) { + + this.x = x; + this.y = y; + this.width = width; + this.height = height; + return; + + } + + var cacheRight = right; + var cacheBottom = bottom; + + if (this.x > x) this.x = x; + if (this.y > y) this.y = y; + if (cacheRight < x + width) this.width = x + width - this.x; + if (cacheBottom < y + height) this.height = y + height - this.y; + + } + + + + + // Getters & Setters + + + + + private function get_bottom ():Float { return y + height; } + private function set_bottom (b:Float):Float { height = b - y; return b; } + private function get_bottomRight ():Vector2 { return new Vector2 (x + width, y + height); } + private function set_bottomRight (p:Vector2):Vector2 { width = p.x - x; height = p.y - y; return p.clone (); } + private function get_left ():Float { return x; } + private function set_left (l:Float):Float { width -= l - x; x = l; return l; } + private function get_right ():Float { return x + width; } + private function set_right (r:Float):Float { width = r - x; return r; } + private function get_size ():Vector2 { return new Vector2 (width, height); } + private function set_size (p:Vector2):Vector2 { width = p.x; height = p.y; return p.clone (); } + private function get_top ():Float { return y; } + private function set_top (t:Float):Float { height -= t - y; y = t; return t; } + private function get_topLeft ():Vector2 { return new Vector2 (x, y); } + private function set_topLeft (p:Vector2):Vector2 { x = p.x; y = p.y; return p.clone (); } + + +} \ No newline at end of file diff --git a/lime/utils/Vector2.hx b/lime/math/Vector2.hx similarity index 98% rename from lime/utils/Vector2.hx rename to lime/math/Vector2.hx index 34598b373..3f5d660cf 100644 --- a/lime/utils/Vector2.hx +++ b/lime/math/Vector2.hx @@ -1,4 +1,4 @@ -package lime.utils; +package lime.math; class Vector2 { diff --git a/lime/utils/Vector4.hx b/lime/math/Vector4.hx similarity index 99% rename from lime/utils/Vector4.hx rename to lime/math/Vector4.hx index 6e9edf47f..73ea3e4ce 100644 --- a/lime/utils/Vector4.hx +++ b/lime/math/Vector4.hx @@ -1,4 +1,4 @@ -package lime.utils; +package lime.math; class Vector4 { diff --git a/lime/media/ImageBuffer.hx b/lime/media/ImageBuffer.hx deleted file mode 100644 index 9d4d91fdc..000000000 --- a/lime/media/ImageBuffer.hx +++ /dev/null @@ -1,28 +0,0 @@ -package lime.media; - - -import lime.utils.UInt8Array; - - -class ImageBuffer { - - - public var bitsPerPixel:Int; - public var data:UInt8Array; - public var height:Int; - public var premultiplied:Bool; - public var src:Dynamic; - public var width:Int; - - - public function new (data:UInt8Array = null, width:Int = 0, height:Int = 0, bitsPerPixel:Int = 4) { - - this.data = data; - this.width = width; - this.height = height; - this.bitsPerPixel = bitsPerPixel; - - } - - -} \ No newline at end of file diff --git a/project/Build.xml b/project/Build.xml index ea318194a..8c63226ef 100644 --- a/project/Build.xml +++ b/project/Build.xml @@ -37,7 +37,7 @@ - + @@ -65,7 +65,7 @@ - + @@ -75,7 +75,7 @@ - + @@ -93,7 +93,7 @@ - + @@ -115,10 +115,10 @@ + + + - - - diff --git a/project/include/media/AudioBuffer.h b/project/include/audio/AudioBuffer.h similarity index 90% rename from project/include/media/AudioBuffer.h rename to project/include/audio/AudioBuffer.h index e332a1933..9cb27524a 100644 --- a/project/include/media/AudioBuffer.h +++ b/project/include/audio/AudioBuffer.h @@ -1,5 +1,5 @@ -#ifndef LIME_MEDIA_AUDIO_BUFFER_H -#define LIME_MEDIA_AUDIO_BUFFER_H +#ifndef LIME_AUDIO_AUDIO_BUFFER_H +#define LIME_AUDIO_AUDIO_BUFFER_H #include diff --git a/project/include/media/format/OGG.h b/project/include/audio/format/OGG.h similarity index 63% rename from project/include/media/format/OGG.h rename to project/include/audio/format/OGG.h index a15757136..7559b3a5e 100644 --- a/project/include/media/format/OGG.h +++ b/project/include/audio/format/OGG.h @@ -1,8 +1,8 @@ -#ifndef LIME_MEDIA_FORMAT_OGG_H -#define LIME_MEDIA_FORMAT_OGG_H +#ifndef LIME_AUDIO_FORMAT_OGG_H +#define LIME_AUDIO_FORMAT_OGG_H -#include +#include