# HG changeset patch # User unC0Rr # Date 1724858183 -7200 # Node ID 0fd23fc57947cf1b3584b2ee63d2bfd573375ad7 # Parent 2003b466b27953843d10df51cc349685073f7dfd Make pascal engine link to hwengine-future and use WFC generator diff -r 2003b466b279 -r 0fd23fc57947 CMakeLists.txt --- a/CMakeLists.txt Wed Aug 28 15:34:49 2024 +0200 +++ b/CMakeLists.txt Wed Aug 28 17:16:23 2024 +0200 @@ -268,7 +268,7 @@ #rust libraries add_subdirectory(tools/corrosion) -corrosion_import_crate(MANIFEST_PATH rust/lib-hedgewars-engine/Cargo.toml) +corrosion_import_crate(MANIFEST_PATH rust/lib-hwengine-future/Cargo.toml) #maybe this could be merged inside hedgewars/CMakeLists.txt diff -r 2003b466b279 -r 0fd23fc57947 hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Wed Aug 28 15:34:49 2024 +0200 +++ b/hedgewars/CMakeLists.txt Wed Aug 28 17:16:23 2024 +0200 @@ -189,7 +189,6 @@ list(APPEND HW_LINK_LIBS physlayer) - #opengl 2 IF(GL2) add_definitions(-dGL2) @@ -246,6 +245,6 @@ endif() #even though not actually used, this will trigger relink if any lib changes -target_link_libraries(hwengine ${HW_LINK_LIBS}) +target_link_libraries(hwengine ${HW_LINK_LIBS} hwengine_future) install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" DESTINATION ${destination_dir}) diff -r 2003b466b279 -r 0fd23fc57947 hedgewars/uLandUtils.pas --- a/hedgewars/uLandUtils.pas Wed Aug 28 15:34:49 2024 +0200 +++ b/hedgewars/uLandUtils.pas Wed Aug 28 17:16:23 2024 +0200 @@ -20,6 +20,8 @@ implementation uses uUtils, uConsts, uVariables, uTypes; +{$linklib hwengine_future} + function create_empty_game_field(width, height: Longword): pointer; cdecl; external; procedure get_game_field_parameters(game_field: pointer; var width: LongInt; var height: LongInt; var play_width: LongInt; var play_height: LongInt); cdecl; external; procedure dispose_game_field(game_field: pointer); cdecl; external; diff -r 2003b466b279 -r 0fd23fc57947 rust/landgen/src/wavefront_collapse/generator.rs --- a/rust/landgen/src/wavefront_collapse/generator.rs Wed Aug 28 15:34:49 2024 +0200 +++ b/rust/landgen/src/wavefront_collapse/generator.rs Wed Aug 28 17:16:23 2024 +0200 @@ -162,6 +162,8 @@ for tile_description in self.template.tiles.iter() { if let Ok(mut tiles) = Self::load_image_tiles(parameters, tile_description) { result.append(&mut tiles); + } else { + eprintln!("Failed to load a tile!"); } } diff -r 2003b466b279 -r 0fd23fc57947 rust/lib-hwengine-future/Cargo.toml --- a/rust/lib-hwengine-future/Cargo.toml Wed Aug 28 15:34:49 2024 +0200 +++ b/rust/lib-hwengine-future/Cargo.toml Wed Aug 28 17:16:23 2024 +0200 @@ -15,4 +15,4 @@ [lib] name = "hwengine_future" -crate-type = ["staticlib"] +crate-type = ["cdylib"]