Commit Graph

5644 Commits

Author SHA1 Message Date
Joshua Granick
d0678156dd Add initial support for LZMA decompression on HTML5 target 2024-05-31 08:09:28 -07:00
Josh Tynjala
0cf13bf3dd Clipboard: fix text always getting cleared to null in __update() when targeting html5 2024-05-30 16:02:54 -07:00
Joseph Cloutier
084324a7ed Consistently refer to Matrix3 values in column-major order. 2024-05-30 18:42:08 -04:00
Joseph Cloutier
93ad84faeb Remove unused code.
These appear to have been copied from elsewhere and never used.
2024-05-30 18:41:16 -04:00
Joseph Cloutier
9dc809d3e4 Validate array length when converting to Matrix3. 2024-05-30 14:00:19 -04:00
player-03
c0ca857fa6 Merge pull request #1791 from player-03/CairoMatrix3
Create a placeholder object to send `Matrix3`s to C++ code.
2024-05-30 12:20:25 -04:00
tobil4sk
54d6b72390 Fix pixman build for m1 2024-05-30 09:18:09 -07:00
tobil4sk
1a1beff531 Remove no longer used defines
See cf5b033bbc
2024-05-30 09:18:09 -07:00
tobil4sk
f116b57c8e Adding missing RESTRICT define for openal
See e027811906
2024-05-30 09:18:09 -07:00
tobil4sk
53c9b52562 Apply openal build fixes for m1
https://github.com/openfl/libopenal/pull/1
2024-05-30 09:18:09 -07:00
player-03
57da678f67 Limit total time spent on green threads. (#1774)
Every single-threaded `ThreadPool` takes up a certain fraction of the app's time per frame. Without any coordination, they could take up more than 100% of the allotted time, causing the app to slow down. By using static variables, we can make them work together to limit the total time spent per frame.
2024-05-29 21:15:20 -04:00
Joseph Cloutier
224c0a0e93 Delete stale dependencies in addition to stale assets. 2024-05-29 20:55:09 -04:00
Joseph Cloutier
71442d09f4 Create a placeholder object to send Matrix3s to C++ code. 2024-05-29 20:00:23 -04:00
Joseph Cloutier
43b56eb86d Fix potential uninitialized values. 2024-05-29 19:50:52 -04:00
Josh Tynjala
ae941e7442 MacPlatform: running install_name_tool with System.runCommand() works better than new Process()
new Process() was crashing before the process could start for some reason
2024-05-29 15:57:41 -07:00
Joseph Cloutier
12ddca85d9 Implement AssetHelper.deleteStaleAssets(). 2024-05-28 19:33:30 -04:00
Joseph Cloutier
d3d476a1f5 Merge branch 'develop' into 8.2.0-Dev 2024-05-27 16:04:31 -04:00
Joseph Cloutier
1b8d7ac7fa Reduce indentation in ProjectXMLParser.
Whitespace changes interfere with merges, so this change must be applied manually first.
2024-05-27 15:58:20 -04:00
Beshoy Kamel
eabb10efbf Add Matrix4.createPerspective() (#1681)
* add createPerspective

I didn't find a createPerspective function so I tried to make one, but I don't really know if that will work.

* forgot something

* add doc

* I hope that's correct 

added zero to one mode, and -one to one mode variants

* fix missing import

* I keep forgetting shit

* change to exceptions

* Update Matrix4.hx

* remove `new`

* remove period

* final changes

* Follow formatting conventions.

* Avoid using `Math.pow()`.

Haxe is unable to optimize this function away. Also, it seems to be unable to return numbers smaller than 1e-7, so that's what I used in its place. Smaller constants can work, you just can't get them from `Math.pow()`.

* Fill in missing entries.

As per all the other "create" functions.

* Use guard clause for better readability.

* Fix duplicate assignment.

* Make `createPerspective()` public.

---------

Co-authored-by: player-03 <player3.14@gmail.com>
2024-05-27 15:36:44 -04:00
player-03
3078b7c1f6 Merge pull request #1787 from player-03/CFFI_haxelib_libpath
Fix error when locating Lime's bundled NDLLs.
2024-05-27 15:30:19 -04:00
player-03
d0b1f6b0df Merge pull request #1778 from UncertainProd/matrix-3-abstract
Make `Matrix3` an abstract over Float32Array (just like `Matrix4`)
2024-05-27 13:06:42 -04:00
Joseph Cloutier
166ac06e3e Store images as data when in a web worker.
More work may need to be done to transfer an image from a worker to the main thread, but this will at least prevent crashes.
2024-05-27 12:10:00 -04:00
UncertainProd
0f6d143790 Merge branch '8.2.0-Dev' of https://github.com/openfl/lime into matrix-3-abstract 2024-05-27 21:04:52 +05:30
Josh Tynjala
ac4039d849 ProjectXMLParser: handle Std.parseInt() returning null
Previously, null was propagated, which could lead to confusing errors from arithmetic operations. Now, it is ignored, and a warning is displayed that says where the invalid value can be found.
2024-05-22 09:10:04 -07:00
Joshua Granick
2dad602c0d ThreadPool: Crash fixes 2024-05-21 13:46:41 -07:00
player-03
a850b12fa0 Replace __findHaxelib() with a function that finds Lime's NDLL folder.
This is its only use case, so there's no need for an intermediate step of getting the library root. `haxelib path` does return the NDLL folder; the problem with the old implementation of `__findHaxelib()` was it got Lime's source folder instead.
2024-05-17 17:26:35 -04:00
player-03
4ce0a8302d Fix uninitialized variable. 2024-05-16 17:46:20 -04:00
player-03
3b115885f1 Use haxelib libpath when searching for NDLLs.
We could fall back to `haxelib path` for very old versions of Haxelib, but most likely even people stuck on Haxe 3 have updated Haxelib.

Also, `haxelib path` gave incorrect results in the first place, so falling back wouldn't do any good.
2024-05-16 17:40:49 -04:00
player-03
d2ea41570b Print an error message if the HXP project class doesn't match the file name.
This is required but not obvious, so we should spell it out.
2024-05-16 16:49:17 -04:00
Tobi Laskowski
333d093df0 Build.xml: Add /opt/homebrew/lib as rpath on arm64 macos
This is where arm64 homebrew installs `libneko.dylib`. However, it may still be in `/usr/local/lib` if installed via the haxe .pkg installer, so we add both.
2024-05-15 09:18:39 -07:00
Josh Tynjala
c70ec9fbe0 Build.xml: on macOS, add /usr/local/lib to rpath when building lime.ndll
This seems to be required with Xcode 15, but was not required previously
2024-05-09 15:07:12 -07:00
Josh Tynjala
5381f96061 Allow cross-compiling to Linux cpp from other operating systems
Similar to #1661, except targeting Linux instead of Windows

On macOS, need to install https://github.com/messense/homebrew-macos-cross-toolchains

On Windows, I think it may be possible to get Linux compilers with Cygwin, but I haven't tried
2024-04-26 10:03:23 -07:00
Josh Tynjala
c26a73fc3c MacPlatform: when rebuilding the bundled HashLink, bundle all Homebrew dependencies too
Previously, a compiled .app file for HL/C wouldn't launch at all because it couldn't find these libraries. For HL/JIT, it would launch, but it might crash later when it needed to load a missing library.

We need to bundle these dependencies into the .app file so that it can successfully launch on systems that don't have Homebrew installed, or haven't separately installed the exact set of Homebrew libraries that we need. We also don't want to have to make people ask their users to install Homebrew and to install the dependencies manually.

Tested the .app files for both HL/JIT and HL/C on a system without Homebrew. It failed before, but now it launches successfully!
2024-04-25 15:20:47 -07:00
Josh Tynjala
237c8c6357 update pixman to 0.42.2 to fix macOS builds
was running into this issue: https://issuetracker.google.com/issues/249834910
2024-04-19 09:26:10 -07:00
Joshua Granick
b84eafdef6 Update SVG tool 2024-04-18 08:39:51 -07:00
UncertainProd
2138b7210a Merge branch 'develop' of https://github.com/UncertainProd/lime into matrix-3-abstract 2024-04-15 22:22:21 +05:30
Joseph Cloutier
2822bdc124 Remove incorrect !. 2024-04-13 14:01:01 -04:00
Joseph Cloutier
657ad24682 Merge branch 'develop' into 8.2.0-Dev 2024-04-13 03:09:20 -04:00
Joseph Cloutier
fc90d2cd21 Use guard clauses to reduce indentation.
This way, the 8.2.0-Dev version of `PlatformSetup` will have the same indentation as the version on the develop branch. Without matching indentation, Git actively hinders the merging process.
2024-04-13 03:07:27 -04:00
Chris Speciale
bb3b31b08d ObjectPool: Write documentation 2024-04-12 06:35:09 -04:00
UncertainProd
45217685ec Make Matrix3 an abstract over Float32Array 2024-04-11 14:32:36 +05:30
Josh Tynjala
58bedb124e actions: Build SimpleImage for iOS simulator and SimpleAudio for iOS devices (using new -nosign option)
That way, we test both simulator and device builds for iOS.
2024-04-09 09:09:24 -07:00
Josh Tynjala
68169ea2d7 Added -nosign option for iOS to optionally skip codesigning (#1776)
This allows non-simulator builds on CI servers without setting up team-id/provisioning-profile/etc.

It also allows signing using a different method, if desired.

Co-Authored-By: mcagabe19@users.noreply.github.com
2024-04-09 09:01:51 -07:00
Joseph Cloutier
c50c30353a Include stack information for errors caught on another thread. 2024-04-02 03:44:12 -04:00
Josh Tynjala
83db8d8939 NativeWindow: call setTextInputEnabled(false) right away when window is created (closes openfl/openfl#2697)
We seem to have been assuming that it was false by default, but in SDL 2, it is true by default (planned to be false in SDL 3, apparently). It can cause weird behavior like IME popups appearing when holding down keys (something commonly done by users playing games, so we don't want that!). We want setTextInputEnabled(true) to happen only when an OpenFL TextField (or anything else that accepts text input) receives focus, and then cleared again when focus is lost.

This does not disable regular keyboard input. It is specifically related to what SDL considers text input, which is different, even if it uses the keyboard.
2024-04-01 12:20:25 -07:00
Joseph Cloutier
093cd6a592 Update ThreadPool constructor documentation (closes #1772). 2024-03-26 13:11:37 -04:00
Chris Speciale
307d3ed54e Update LICENSE.md 2024-03-24 05:00:49 -04:00
Josh Tynjala
5f63ef1ee3 ObjectPool: null safety because map exists() result with null key is unspecified 2024-03-21 10:10:25 -07:00
win11
f59b669e46 make preserveDrawingBuffer configurable 2024-03-16 03:40:17 +03:00
Josh Tynjala
1c8ecd30ea CHANGELOG 8.1.2 2024-03-13 08:34:09 -07:00