mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Extract variable for output_variable_name
This commit is contained in:
parent
53952d8e34
commit
47c5c0f86e
|
@ -57,6 +57,7 @@ pub fn convert_image(settings: ImageConverterConfig) {
|
||||||
|
|
||||||
rust_generator::generate_code(
|
rust_generator::generate_code(
|
||||||
&mut writer,
|
&mut writer,
|
||||||
|
"test",
|
||||||
&optimisation_results,
|
&optimisation_results,
|
||||||
&image,
|
&image,
|
||||||
settings.tile_size,
|
settings.tile_size,
|
||||||
|
|
|
@ -7,13 +7,14 @@ use crate::TileSize;
|
||||||
|
|
||||||
pub(crate) fn generate_code(
|
pub(crate) fn generate_code(
|
||||||
output: &mut dyn Write,
|
output: &mut dyn Write,
|
||||||
|
output_variable_name: &str,
|
||||||
results: &Palette16OptimisationResults,
|
results: &Palette16OptimisationResults,
|
||||||
image: &Image,
|
image: &Image,
|
||||||
tile_size: TileSize,
|
tile_size: TileSize,
|
||||||
crate_prefix: String,
|
crate_prefix: String,
|
||||||
) -> io::Result<()> {
|
) -> io::Result<()> {
|
||||||
writeln!(output, "#[allow(non_upper_case_globals)]")?;
|
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!(
|
writeln!(
|
||||||
output,
|
output,
|
||||||
|
|
Loading…
Reference in a new issue