diff --git a/lime/_backend/html5/HTML5Window.hx b/lime/_backend/html5/HTML5Window.hx
index bc3c799e7..d85fbda2e 100644
--- a/lime/_backend/html5/HTML5Window.hx
+++ b/lime/_backend/html5/HTML5Window.hx
@@ -4,14 +4,10 @@ package lime._backend.html5;
import haxe.Timer;
import js.html.CanvasElement;
import js.html.DivElement;
-#if (haxe_ver >= 3.2)
import js.html.Element;
import js.html.FocusEvent;
import js.html.InputElement;
import js.html.InputEvent;
-#else
-import js.html.HtmlElement;
-#end
import js.html.MouseEvent;
import js.html.TouchEvent;
import js.Browser;
@@ -24,11 +20,6 @@ import lime.ui.Joystick;
import lime.ui.Touch;
import lime.ui.Window;
-#if (haxe_ver < 3.2)
-typedef FocusEvent = js.html.Event;
-typedef InputElement = Dynamic;
-typedef InputEvent = js.html.Event;
-#end
@:access(lime.app.Application)
@:access(lime.ui.Gamepad)
@@ -44,7 +35,7 @@ class HTML5Window {
public var canvas:CanvasElement;
public var div:DivElement;
- public var element:#if (haxe_ver >= 3.2) Element #else HtmlElement #end;
+ public var element:Element;
#if stats
public var stats:Dynamic;
#end
@@ -91,11 +82,7 @@ class HTML5Window {
if (message != null) {
- #if (haxe_ver >= 3.2)
Browser.alert (message);
- #else
- js.Lib.alert (message);
- #end
}
diff --git a/lime/app/Config.hx b/lime/app/Config.hx
index e73859159..b051ed3e5 100644
--- a/lime/app/Config.hx
+++ b/lime/app/Config.hx
@@ -28,7 +28,7 @@ typedef WindowConfig = {
@:optional var depthBuffer:Bool;
@:optional var display:Int;
#if (js && html5)
- @:optional var element:#if (haxe_ver >= 3.2) js.html.Element #else js.html.HtmlElement #end;
+ @:optional var element:js.html.Element;
#end
@:optional var fullscreen:Bool;
@:optional var hardware:Bool;
diff --git a/lime/audio/HTML5AudioContext.hx b/lime/audio/HTML5AudioContext.hx
index 77e261732..89fe42ba5 100644
--- a/lime/audio/HTML5AudioContext.hx
+++ b/lime/audio/HTML5AudioContext.hx
@@ -58,23 +58,6 @@ class HTML5AudioContext {
}
- #if (haxe_ver < 3.2)
- public function getAudioDecodedByteCount (buffer:AudioBuffer):Int {
-
- #if (js && html5)
- if (buffer.__srcAudio != null) {
-
- return buffer.__srcAudio.audioDecodedByteCount;
-
- }
- #end
-
- return 0;
-
- }
- #end
-
-
public function getAutoplay (buffer:AudioBuffer):Bool {
#if (js && html5)
@@ -105,23 +88,6 @@ class HTML5AudioContext {
}
- #if (haxe_ver < 3.2)
- public function getController (buffer:AudioBuffer):Dynamic /*MediaController*/ {
-
- #if (js && html5)
- if (buffer.__srcAudio != null) {
-
- return buffer.__srcAudio.controller;
-
- }
- #end
-
- return null;
-
- }
- #end
-
-
public function getCurrentSrc (buffer:AudioBuffer):String {
#if (js && html5)
@@ -212,23 +178,6 @@ class HTML5AudioContext {
}
- #if (haxe_ver < 3.2)
- public function getInitialTime (buffer:AudioBuffer):Float {
-
- #if (js && html5)
- if (buffer.__srcAudio != null) {
-
- return buffer.__srcAudio.initialTime;
-
- }
- #end
-
- return 0;
-
- }
- #end
-
-
public function getLoop (buffer:AudioBuffer):Bool {
#if (js && html5)
@@ -244,23 +193,6 @@ class HTML5AudioContext {
}
- #if (haxe_ver < 3.2)
- public function getMediaGroup (buffer:AudioBuffer):String {
-
- #if (js && html5)
- if (buffer.__srcAudio != null) {
-
- return buffer.__srcAudio.mediaGroup;
-
- }
- #end
-
- return null;
-
- }
- #end
-
-
public function getMuted (buffer:AudioBuffer):Bool {
#if (js && html5)
@@ -493,21 +425,6 @@ class HTML5AudioContext {
}
- #if (haxe_ver < 3.2)
- public function setController (buffer:AudioBuffer, value:Dynamic /*MediaController*/):Void {
-
- #if (js && html5)
- if (buffer.__srcAudio != null) {
-
- buffer.__srcAudio.controller = value;
-
- }
- #end
-
- }
- #end
-
-
public function setCurrentTime (buffer:AudioBuffer, value:Float):Void {
#if (js && html5)
@@ -547,21 +464,6 @@ class HTML5AudioContext {
}
- #if (haxe_ver < 3.2)
- public function setMediaGroup (buffer:AudioBuffer, value:String):Void {
-
- #if (js && html5)
- if (buffer.__srcAudio != null) {
-
- buffer.__srcAudio.mediaGroup = value;
-
- }
- #end
-
- }
- #end
-
-
public function setMuted (buffer:AudioBuffer, value:Bool):Void {
#if (js && html5)
diff --git a/lime/audio/openal/AL.hx b/lime/audio/openal/AL.hx
index b3ba2608b..e602b407a 100644
--- a/lime/audio/openal/AL.hx
+++ b/lime/audio/openal/AL.hx
@@ -4,7 +4,7 @@ package lime.audio.openal;
import lime.system.CFFIPointer;
import lime.utils.ArrayBufferView;
-#if ((haxe_ver >= 3.2) && cpp)
+#if cpp
import cpp.Float32;
#else
typedef Float32 = Float;
diff --git a/lime/graphics/format/JPEG.hx b/lime/graphics/format/JPEG.hx
index 65bd93a53..8dc16f15e 100644
--- a/lime/graphics/format/JPEG.hx
+++ b/lime/graphics/format/JPEG.hx
@@ -101,11 +101,7 @@ class JPEG {
if (image.buffer.__srcCanvas != null) {
- #if (haxe_ver >= 3.2)
var data = image.buffer.__srcCanvas.toDataURL ("image/jpeg", quality / 100);
- #else
- var data = image.buffer.__srcCanvas.toDataURL ("image/jpeg");
- #end
var buffer = Browser.window.atob (data.split (";base64,")[1]);
var bytes = Bytes.alloc (buffer.length);
diff --git a/lime/graphics/opengl/GL.hx b/lime/graphics/opengl/GL.hx
index b804811c1..a053c6094 100644
--- a/lime/graphics/opengl/GL.hx
+++ b/lime/graphics/opengl/GL.hx
@@ -20,7 +20,7 @@ import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL30;
#end
-#if ((haxe_ver >= 3.2) && cpp)
+#if cpp
import cpp.Float32;
#else
typedef Float32 = Float;
diff --git a/lime/project/WindowData.hx b/lime/project/WindowData.hx
index 614993763..b455ac4f4 100644
--- a/lime/project/WindowData.hx
+++ b/lime/project/WindowData.hx
@@ -25,7 +25,7 @@ typedef WindowData = {
@:optional var stencilBuffer:Bool;
@:optional var title:String;
#if (js && html5)
- @:optional var element:#if (haxe_ver >= 3.2) js.html.Element #else js.html.HtmlElement #end;
+ @:optional var element:js.html.Element;
#end
}
\ No newline at end of file
diff --git a/lime/system/CFFI.hx b/lime/system/CFFI.hx
index 2cfa4d497..0b8539163 100644
--- a/lime/system/CFFI.hx
+++ b/lime/system/CFFI.hx
@@ -181,7 +181,7 @@ class CFFI {
public static macro function loadPrime (library:String, method:String, signature:String, lazy:Bool = false):Dynamic {
- #if ((haxe_ver >= 3.2) && !display)
+ #if !display
return cpp.Prime.load (library, method, signature, lazy);
#else
var args = signature.length - 1;
@@ -532,8 +532,6 @@ class CFFI {
var cffiName = "cffi_" + field.name;
var cffiExpr, cffiType;
- #if (haxe_ver >= 3.2)
-
if (Context.defined ("cpp")) {
cffiExpr = 'new cpp.Callable<$typeString> (cpp.Prime._loadPrime ("$library", "$method", "$typeSignature", $lazy))';
@@ -554,21 +552,6 @@ class CFFI {
cffiType = TPath ( { pack: [ "cpp" ], name: "Callable", params: [ TPType (TFun (type.args, type.result).toComplexType ()) ] } );
- #else
-
- var args = typeSignature.length - 1;
-
- if (args > 5) {
-
- args = -1;
-
- }
-
- cffiExpr = 'lime.system.CFFI.load ("$library", "$method", $args, $lazy)';
- cffiType = TPath ( { pack: [ ], name: "Dynamic" } );
-
- #end
-
newFields.push ( { name: cffiName, access: [ APrivate, AStatic ], kind: FieldType.FVar (cffiType, Context.parse (cffiExpr, field.pos)), pos: field.pos } );
if (type.result.toString () != "Void" && type.result.toString () != "cpp.Void") {
@@ -577,11 +560,7 @@ class CFFI {
}
- #if (haxe_ver >= 3.2)
expr += '$cffiName.call (';
- #else
- expr += '$cffiName (';
- #end
for (i in 0...type.args.length) {
@@ -615,7 +594,7 @@ class CFFI {
private static function __getFunctionType (args:Array<{ name : String, opt : Bool, t : Type }>, result:Type) {
- #if ((haxe_ver >= 3.2) && !disable_cffi && !display)
+ #if (!disable_cffi && !display)
var useCPPTypes = Context.defined ("cpp");
#else
var useCPPTypes = false;
diff --git a/lime/system/System.hx b/lime/system/System.hx
index 188417807..51b86c597 100644
--- a/lime/system/System.hx
+++ b/lime/system/System.hx
@@ -10,11 +10,7 @@ import flash.Lib;
#end
#if (js && html5)
-#if (haxe_ver >= 3.2)
import js.html.Element;
-#else
-import js.html.HtmlElement;
-#end
import js.Browser;
#end
@@ -51,7 +47,7 @@ class System {
@:keep @:expose("lime.embed")
public static function embed (element:Dynamic, width:Null = null, height:Null = null, background:String = null, assetsPrefix:String = null) {
- var htmlElement:#if (haxe_ver >= 3.2) Element #else HtmlElement #end = null;
+ var htmlElement:Element = null;
if (Std.is (element, String)) {
diff --git a/lime/text/Font.hx b/lime/text/Font.hx
index cd56b8d3a..9d5a324b6 100644
--- a/lime/text/Font.hx
+++ b/lime/text/Font.hx
@@ -124,7 +124,7 @@ class Font {
}
- public function getGlyphs (characters:String = #if (display && haxe_ver < 3.2) "" #else "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^`'\"/\\&*()[]{}<>|:;_-+=?,. " #end):Array {
+ public function getGlyphs (characters:String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^`'\"/\\&*()[]{}<>|:;_-+=?,. "):Array {
#if (lime_cffi && !macro)
var glyphs:Dynamic = lime_font_get_glyph_indices (src, characters);
diff --git a/lime/utils/ArrayBufferView.hx b/lime/utils/ArrayBufferView.hx
index d3a8f9d99..2c45292cc 100644
--- a/lime/utils/ArrayBufferView.hx
+++ b/lime/utils/ArrayBufferView.hx
@@ -610,19 +610,7 @@ abstract TypedArrayType(Int) from Int to Int {
#if cpp
untyped return __global__.__hxcpp_memory_get_i32(buffer.getData(), byteOffset);
#else
-
- #if (haxe_ver >= 3.2)
- return buffer.getInt32(byteOffset);
- #else
-
- var ch1 = getInt8(buffer, byteOffset );
- var ch2 = getInt8(buffer, byteOffset+1);
- var ch3 = getInt8(buffer, byteOffset+2);
- var ch4 = getInt8(buffer, byteOffset+3);
-
- return (ch4 << 24) |(ch3 << 16) |(ch2 << 8) | ch1;
-
- #end //3.1.3
+ return buffer.getInt32(byteOffset);
#end
}
@@ -633,19 +621,7 @@ abstract TypedArrayType(Int) from Int to Int {
#if cpp
untyped return __global__.__hxcpp_memory_get_i32(buffer.getData(), byteOffset);
#else
-
- #if (haxe_ver >= 3.2)
- return buffer.getInt32(byteOffset);
- #else
-
- var ch1 = getInt8(buffer, byteOffset );
- var ch2 = getInt8(buffer, byteOffset+1);
- var ch3 = getInt8(buffer, byteOffset+2);
- var ch4 = getInt8(buffer, byteOffset+3);
-
- return (ch1 << 24) |(ch2 << 16) |(ch3 << 8) | ch4;
-
- #end //3.1.3
+ return buffer.getInt32(byteOffset);
#end
}
@@ -659,14 +635,8 @@ abstract TypedArrayType(Int) from Int to Int {
#if neko
if (value == null) value = 0;
#end
- #if (haxe_ver >= 3.2)
- buffer.setInt32(byteOffset,value);
- #else
- setInt8(buffer, byteOffset , value );
- setInt8(buffer, byteOffset+1, value >> 8);
- setInt8(buffer, byteOffset+2, value >> 16);
- setInt8(buffer, byteOffset+3, value >> 24);
- #end //3.1.3.
+
+ buffer.setInt32(byteOffset,value);
#end
}
@@ -680,14 +650,8 @@ abstract TypedArrayType(Int) from Int to Int {
#if neko
if (value == null) value = 0;
#end
- #if (haxe_ver >= 3.2)
- buffer.setInt32(byteOffset,value);
- #else
- setInt8(buffer, byteOffset , value >> 24);
- setInt8(buffer, byteOffset+1, value >> 16);
- setInt8(buffer, byteOffset+2, value >> 8);
- setInt8(buffer, byteOffset+3, value );
- #end //3.1.3.
+
+ buffer.setInt32(byteOffset,value);
#end
}
diff --git a/lime/utils/Float32Array.hx b/lime/utils/Float32Array.hx
index 8a66dca1e..62c5e1529 100644
--- a/lime/utils/Float32Array.hx
+++ b/lime/utils/Float32Array.hx
@@ -48,11 +48,7 @@ package lime.utils;
}
inline public function toBytes() : haxe.io.Bytes {
- #if (haxe_ver < 3.2)
- return @:privateAccess new haxe.io.Bytes( this.byteLength, cast new js.html.Uint8Array(this.buffer) );
- #else
- return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
- #end
+ return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
}
inline function toString() return this != null ? 'Float32Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
diff --git a/lime/utils/Float64Array.hx b/lime/utils/Float64Array.hx
index 12c85f663..b9a1b423b 100644
--- a/lime/utils/Float64Array.hx
+++ b/lime/utils/Float64Array.hx
@@ -47,11 +47,7 @@ package lime.utils;
}
inline public function toBytes() : haxe.io.Bytes {
- #if (haxe_ver < 3.2)
- return @:privateAccess new haxe.io.Bytes( this.byteLength, cast new js.html.Uint8Array(this.buffer) );
- #else
- return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
- #end
+ return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
}
function toString() return this != null ? 'Float64Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
diff --git a/lime/utils/Int16Array.hx b/lime/utils/Int16Array.hx
index cfc8371be..bdb267c2c 100644
--- a/lime/utils/Int16Array.hx
+++ b/lime/utils/Int16Array.hx
@@ -47,11 +47,7 @@ package lime.utils;
}
inline public function toBytes() : haxe.io.Bytes {
- #if (haxe_ver < 3.2)
- return @:privateAccess new haxe.io.Bytes( this.byteLength, cast new js.html.Uint8Array(this.buffer) );
- #else
- return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
- #end
+ return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
}
inline function toString() return this != null ? 'Int16Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
diff --git a/lime/utils/Int32Array.hx b/lime/utils/Int32Array.hx
index ccb7bb6a2..11ad418b4 100644
--- a/lime/utils/Int32Array.hx
+++ b/lime/utils/Int32Array.hx
@@ -47,11 +47,7 @@ package lime.utils;
}
inline public function toBytes() : haxe.io.Bytes {
- #if (haxe_ver < 3.2)
- return @:privateAccess new haxe.io.Bytes( this.byteLength, cast new js.html.Uint8Array(this.buffer) );
- #else
- return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
- #end
+ return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
}
inline function toString() return this != null ? 'Int32Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
diff --git a/lime/utils/Int8Array.hx b/lime/utils/Int8Array.hx
index b77dbfea1..69bd34ef9 100644
--- a/lime/utils/Int8Array.hx
+++ b/lime/utils/Int8Array.hx
@@ -45,11 +45,7 @@ package lime.utils;
}
inline public function toBytes() : haxe.io.Bytes {
- #if (haxe_ver < 3.2)
- return @:privateAccess new haxe.io.Bytes( this.byteLength, cast new js.html.Uint8Array(this.buffer) );
- #else
- return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
- #end
+ return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
}
inline function toString() return this != null ? 'Int8Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
diff --git a/lime/utils/UInt16Array.hx b/lime/utils/UInt16Array.hx
index 015adb69e..93fd2b41b 100644
--- a/lime/utils/UInt16Array.hx
+++ b/lime/utils/UInt16Array.hx
@@ -47,11 +47,7 @@ package lime.utils;
}
inline public function toBytes() : haxe.io.Bytes {
- #if (haxe_ver < 3.2)
- return @:privateAccess new haxe.io.Bytes( this.byteLength, cast new js.html.Uint8Array(this.buffer) );
- #else
- return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
- #end
+ return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
}
inline function toString() return this != null ? 'UInt16Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
diff --git a/lime/utils/UInt32Array.hx b/lime/utils/UInt32Array.hx
index 83ee28e71..7e21a023b 100644
--- a/lime/utils/UInt32Array.hx
+++ b/lime/utils/UInt32Array.hx
@@ -47,11 +47,7 @@ package lime.utils;
}
inline public function toBytes() : haxe.io.Bytes {
- #if (haxe_ver < 3.2)
- return @:privateAccess new haxe.io.Bytes( this.byteLength, cast new js.html.Uint8Array(this.buffer) );
- #else
- return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
- #end
+ return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
}
inline function toString() return this != null ? 'UInt32Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
diff --git a/lime/utils/UInt8Array.hx b/lime/utils/UInt8Array.hx
index a9a16f2f3..fb72e6991 100644
--- a/lime/utils/UInt8Array.hx
+++ b/lime/utils/UInt8Array.hx
@@ -47,11 +47,7 @@ package lime.utils;
}
inline public function toBytes() : haxe.io.Bytes {
- #if (haxe_ver < 3.2)
- return @:privateAccess new haxe.io.Bytes( this.byteLength, cast new js.html.Uint8Array(this.buffer) );
- #else
- return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
- #end
+ return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
}
inline function toString() return this != null ? 'UInt8Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
diff --git a/lime/utils/UInt8ClampedArray.hx b/lime/utils/UInt8ClampedArray.hx
index 61b54d797..71359451f 100644
--- a/lime/utils/UInt8ClampedArray.hx
+++ b/lime/utils/UInt8ClampedArray.hx
@@ -47,11 +47,7 @@ package lime.utils;
}
inline public function toBytes() : haxe.io.Bytes {
- #if (haxe_ver < 3.2)
- return @:privateAccess new haxe.io.Bytes( this.byteLength, cast new js.html.Uint8Array(this.buffer) );
- #else
- return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
- #end
+ return @:privateAccess new haxe.io.Bytes( cast new js.html.Uint8Array(this.buffer) );
}
inline function toString() return this != null ? 'UInt8ClampedArray [byteLength:${this.byteLength}, length:${this.length}]' : null;
diff --git a/tools/utils/PlatformSetup.hx b/tools/utils/PlatformSetup.hx
index c48a891c3..9b9e03fb0 100644
--- a/tools/utils/PlatformSetup.hx
+++ b/tools/utils/PlatformSetup.hx
@@ -2155,11 +2155,7 @@ class PlatformSetup {
}
- #if (haxe_ver > 3.102)
var content = bytes.getString (0, bytes.length);
- #else
- var content = bytes.readString (0, bytes.length);
- #end
var startIndex = content.indexOf ("");
var endIndex = content.indexOf ("", startIndex);