diff --git a/agb-image-converter/src/lib.rs b/agb-image-converter/src/lib.rs index 94bb4eef..f93a091e 100644 --- a/agb-image-converter/src/lib.rs +++ b/agb-image-converter/src/lib.rs @@ -57,6 +57,7 @@ pub fn convert_image(settings: ImageConverterConfig) { rust_generator::generate_code( &mut writer, + "test", &optimisation_results, &image, settings.tile_size, diff --git a/agb-image-converter/src/rust_generator.rs b/agb-image-converter/src/rust_generator.rs index ae288631..1fe9e5bd 100644 --- a/agb-image-converter/src/rust_generator.rs +++ b/agb-image-converter/src/rust_generator.rs @@ -7,13 +7,14 @@ use crate::TileSize; pub(crate) fn generate_code( output: &mut dyn Write, + output_variable_name: &str, results: &Palette16OptimisationResults, image: &Image, tile_size: TileSize, crate_prefix: String, ) -> io::Result<()> { writeln!(output, "#[allow(non_upper_case_globals)]")?; - writeln!(output, "pub const {}: {}::display::tile_data::TileData = {{", "test", crate_prefix)?; + writeln!(output, "pub const {}: {}::display::tile_data::TileData = {{", output_variable_name, crate_prefix)?; writeln!( output,