fix: bump ffigen dependency version & regenerate bindings (and revert to ffi.Int rather than ffi.Int32)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -69,7 +69,7 @@ class ThermionViewerFFI extends ThermionViewer {
|
|||||||
this._sharedContext = sharedContext ?? nullptr;
|
this._sharedContext = sharedContext ?? nullptr;
|
||||||
try {
|
try {
|
||||||
_onPickResultCallable =
|
_onPickResultCallable =
|
||||||
NativeCallable<Void Function(Int32 entityId, Int x, Int y)>.listener(
|
NativeCallable<Void Function(Int entityId, Int x, Int y)>.listener(
|
||||||
_onPickResult);
|
_onPickResult);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
_logger.severe(
|
_logger.severe(
|
||||||
@@ -128,7 +128,7 @@ class ThermionViewerFFI extends ThermionViewer {
|
|||||||
|
|
||||||
await setCameraManipulatorOptions(zoomSpeed: 1.0);
|
await setCameraManipulatorOptions(zoomSpeed: 1.0);
|
||||||
|
|
||||||
final out = allocator<Int32>(3);
|
final out = allocator<Int>(3);
|
||||||
get_gizmo(_sceneManager!, out);
|
get_gizmo(_sceneManager!, out);
|
||||||
_gizmo = Gizmo(out[0], out[1], out[2], this);
|
_gizmo = Gizmo(out[0], out[1], out[2], this);
|
||||||
allocator.free(out);
|
allocator.free(out);
|
||||||
@@ -392,7 +392,7 @@ class ThermionViewerFFI extends ThermionViewer {
|
|||||||
@override
|
@override
|
||||||
Future<List<ThermionEntity>> getInstances(ThermionEntity entity) async {
|
Future<List<ThermionEntity>> getInstances(ThermionEntity entity) async {
|
||||||
var count = await getInstanceCount(entity);
|
var count = await getInstanceCount(entity);
|
||||||
var out = allocator<Int32>(count);
|
var out = allocator<Int>(count);
|
||||||
get_instances(_sceneManager!, entity, out);
|
get_instances(_sceneManager!, entity, out);
|
||||||
var instances = <ThermionEntity>[];
|
var instances = <ThermionEntity>[];
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
@@ -1316,7 +1316,7 @@ class ThermionViewerFFI extends ThermionViewer {
|
|||||||
_scene!.registerSelected(entityId);
|
_scene!.registerSelected(entityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
late NativeCallable<Void Function(Int32 entityId, Int x, Int y)>
|
late NativeCallable<Void Function(Int entityId, Int x, Int y)>
|
||||||
_onPickResultCallable;
|
_onPickResultCallable;
|
||||||
|
|
||||||
///
|
///
|
||||||
@@ -1505,7 +1505,7 @@ class ThermionViewerFFI extends ThermionViewer {
|
|||||||
Future<List<ThermionEntity>> getChildEntities(
|
Future<List<ThermionEntity>> getChildEntities(
|
||||||
ThermionEntity parent, bool renderableOnly) async {
|
ThermionEntity parent, bool renderableOnly) async {
|
||||||
var count = get_entity_count(_sceneManager!, parent, renderableOnly);
|
var count = get_entity_count(_sceneManager!, parent, renderableOnly);
|
||||||
var out = allocator<Int32>(count);
|
var out = allocator<Int>(count);
|
||||||
get_entities(_sceneManager!, parent, renderableOnly, out);
|
get_entities(_sceneManager!, parent, renderableOnly, out);
|
||||||
var outList =
|
var outList =
|
||||||
List.generate(count, (index) => out[index]).cast<ThermionEntity>();
|
List.generate(count, (index) => out[index]).cast<ThermionEntity>();
|
||||||
@@ -1565,7 +1565,7 @@ class ThermionViewerFFI extends ThermionViewer {
|
|||||||
|
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
var ptr = NativeCallable<
|
var ptr = NativeCallable<
|
||||||
Void Function(Int32 entityId1, Int32 entityId2)>.listener(callback);
|
Void Function(Int entityId1, Int entityId2)>.listener(callback);
|
||||||
add_collision_component(
|
add_collision_component(
|
||||||
_sceneManager!, entity, ptr.nativeFunction, affectsTransform);
|
_sceneManager!, entity, ptr.nativeFunction, affectsTransform);
|
||||||
_collisions[entity] = ptr;
|
_collisions[entity] = ptr;
|
||||||
|
|||||||
@@ -18,5 +18,5 @@ dependencies:
|
|||||||
logging: ^1.2.0
|
logging: ^1.2.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
ffigen: ^11.0.0
|
ffigen: ^12.0.0
|
||||||
test:
|
test:
|
||||||
|
|||||||
Reference in New Issue
Block a user