rust/lib-hwengine-future/src/lib.rs
branchtransitional_engine
changeset 15912 6e22f4390b7e
parent 15905 022ec6b916b7
child 15921 5f00829c55ec
--- a/rust/lib-hwengine-future/src/lib.rs	Wed Jan 04 15:26:30 2023 +0100
+++ b/rust/lib-hwengine-future/src/lib.rs	Mon Jan 30 15:50:14 2023 +0100
@@ -110,8 +110,8 @@
 }
 
 #[no_mangle]
-pub extern "C" fn land_get(game_field: &mut GameField, x: i32, y: i32) -> u16 {
-    game_field.collision.map(y, x, |p| *p)
+pub extern "C" fn land_get(game_field: &GameField, x: i32, y: i32) -> u16 {
+    game_field.collision.get(y, x)
 }
 
 #[no_mangle]
@@ -138,8 +138,8 @@
 }
 
 #[no_mangle]
-pub extern "C" fn land_pixel_get(game_field: &mut GameField, x: i32, y: i32) -> u32 {
-    game_field.pixels.map(y, x, |p| *p)
+pub extern "C" fn land_pixel_get(game_field: &GameField, x: i32, y: i32) -> u32 {
+    game_field.pixels.get(y, x)
 }
 
 #[no_mangle]