diff --git a/agb-image-converter/src/rust_generator.rs b/agb-image-converter/src/rust_generator.rs index e15cae6d..374e6832 100644 --- a/agb-image-converter/src/rust_generator.rs +++ b/agb-image-converter/src/rust_generator.rs @@ -79,7 +79,19 @@ pub(crate) fn generate_code( pub const #output_variable_name: #crate_prefix::display::tile_data::TileData = { const _: &[u8] = include_bytes!(#image_filename); - const TILE_DATA: &[u8] = #data; + const TILE_DATA: &[u8] = { + pub struct AlignedAs { + pub _align: [Align; 0], + pub bytes: Bytes, + } + + const ALIGNED: &AlignedAs = &AlignedAs { + _align: [], + bytes: *#data, + }; + + &ALIGNED.bytes + }; const PALETTE_ASSIGNMENT: &[u8] = &[ #(#assignments),*