From 9f445ed361dbec1e8c4c916d0e1e62dcd4f6b9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Pel=C3=A1ez?= Date: Sat, 11 Apr 2026 13:46:30 -0400 Subject: [PATCH 1/2] Small changes --- Backends/HTML5/kha/js/graphics4/Graphics.hx | 4 ++-- Backends/Kore-HL/kha/arrays/ByteArray.hx | 2 +- Backends/Krom/Krom.hx | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Backends/HTML5/kha/js/graphics4/Graphics.hx b/Backends/HTML5/kha/js/graphics4/Graphics.hx index 6b041d965..0f5e7eafc 100644 --- a/Backends/HTML5/kha/js/graphics4/Graphics.hx +++ b/Backends/HTML5/kha/js/graphics4/Graphics.hx @@ -624,8 +624,8 @@ class Graphics implements kha.graphics4.Graphics { SystemImpl.gl.uniform4f((cast location : ConstantLocation).value, value.x, value.y, value.z, value.w); } + static var matrixCache = new js.lib.Float32Array(16); public inline function setMatrix(location: kha.graphics4.ConstantLocation, matrix: FastMatrix4): Void { - static var matrixCache = new js.lib.Float32Array(16); matrixCache[0] = matrix._00; matrixCache[1] = matrix._01; matrixCache[2] = matrix._02; @@ -645,8 +645,8 @@ class Graphics implements kha.graphics4.Graphics { SystemImpl.gl.uniformMatrix4fv((cast location : ConstantLocation).value, false, matrixCache); } + static var matrix3Cache = new js.lib.Float32Array(9); public inline function setMatrix3(location: kha.graphics4.ConstantLocation, matrix: FastMatrix3): Void { - static var matrix3Cache = new js.lib.Float32Array(9); matrix3Cache[0] = matrix._00; matrix3Cache[1] = matrix._01; matrix3Cache[2] = matrix._02; diff --git a/Backends/Kore-HL/kha/arrays/ByteArray.hx b/Backends/Kore-HL/kha/arrays/ByteArray.hx index cf55c946e..10fc4de3b 100644 --- a/Backends/Kore-HL/kha/arrays/ByteArray.hx +++ b/Backends/Kore-HL/kha/arrays/ByteArray.hx @@ -71,7 +71,7 @@ abstract ByteArray(ByteArrayPrivate) { } public inline function getUint32(byteOffset: Int): Int { - return kinc_bytearray_getuint32(this.self, this.byteArrayOffset + byteOffset); + return kinc_bytearray_getuint32(this.self, this.byteArrayOffset + byteOffset).toInt(); } public inline function getFloat32(byteOffset: Int): FastFloat { diff --git a/Backends/Krom/Krom.hx b/Backends/Krom/Krom.hx index 3e56d86e2..d122f8f34 100644 --- a/Backends/Krom/Krom.hx +++ b/Backends/Krom/Krom.hx @@ -93,6 +93,7 @@ extern class Krom { static function setKeyboardDownCallback(callback: Int->Void): Void; static function setKeyboardUpCallback(callback: Int->Void): Void; static function setKeyboardPressCallback(callback: Int->Void): Void; + static function setMouseCursor(cursor: Int): Void; static function setMouseDownCallback(callback: Int->Int->Int->Void): Void; static function setMouseUpCallback(callback: Int->Int->Int->Void): Void; static function setMouseMoveCallback(callback: Int->Int->Int->Int->Void): Void; From 8a2ec2ebbcb7c316e826620470dda41b1701f728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Pel=C3=A1ez?= Date: Sat, 11 Apr 2026 16:31:02 -0400 Subject: [PATCH 2/2] Revert HTML5 Graphics `matrixCache` variables' scope to local functions --- Backends/HTML5/kha/js/graphics4/Graphics.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Backends/HTML5/kha/js/graphics4/Graphics.hx b/Backends/HTML5/kha/js/graphics4/Graphics.hx index 0f5e7eafc..6b041d965 100644 --- a/Backends/HTML5/kha/js/graphics4/Graphics.hx +++ b/Backends/HTML5/kha/js/graphics4/Graphics.hx @@ -624,8 +624,8 @@ class Graphics implements kha.graphics4.Graphics { SystemImpl.gl.uniform4f((cast location : ConstantLocation).value, value.x, value.y, value.z, value.w); } - static var matrixCache = new js.lib.Float32Array(16); public inline function setMatrix(location: kha.graphics4.ConstantLocation, matrix: FastMatrix4): Void { + static var matrixCache = new js.lib.Float32Array(16); matrixCache[0] = matrix._00; matrixCache[1] = matrix._01; matrixCache[2] = matrix._02; @@ -645,8 +645,8 @@ class Graphics implements kha.graphics4.Graphics { SystemImpl.gl.uniformMatrix4fv((cast location : ConstantLocation).value, false, matrixCache); } - static var matrix3Cache = new js.lib.Float32Array(9); public inline function setMatrix3(location: kha.graphics4.ConstantLocation, matrix: FastMatrix3): Void { + static var matrix3Cache = new js.lib.Float32Array(9); matrix3Cache[0] = matrix._00; matrix3Cache[1] = matrix._01; matrix3Cache[2] = matrix._02;