aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar /dev/urandom <johnfkennedymaili2p>2025-02-15 01:46:19 +0100
committerLibravatarLarge Libravatar /dev/urandom <johnfkennedymaili2p>2025-02-15 01:46:19 +0100
commitf12e249c73f021d57d69d5f93d27e03259982edf (patch)
treed78de03146356df5c965433cc4f7f53b9f62579e /build.rs
parenta903bb7268fb95ea525a24bc8dd251e00312e149 (diff)
downloadcosin25-invite-mountainbytes-f12e249c73f021d57d69d5f93d27e03259982edf.tar.gz
cosin25-invite-mountainbytes-f12e249c73f021d57d69d5f93d27e03259982edf.tar.bz2
cosin25-invite-mountainbytes-f12e249c73f021d57d69d5f93d27e03259982edf.tar.lz
cosin25-invite-mountainbytes-f12e249c73f021d57d69d5f93d27e03259982edf.zip

feat: Marquee, Lower dither opacity at top, DVD Logo should be separate function, Release Builds should work, advance_width should be f64 to save bytes, Vendor Micromod-RS, Add Timing Steps

Diffstat (limited to 'build.rs')
-rw-r--r--build.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/build.rs b/build.rs
index 9292e1e..438cde8 100644
--- a/build.rs
+++ b/build.rs
@@ -51,7 +51,7 @@ impl FontMetadata {
);
image[0] = (width & 0b0000_0000_1111_1111) as u8;
- image[1] = (width & 0b1111_1111_0000_0000 << 8) as u8;
+ image[1] = (width & (0b1111_1111_0000_0000 << 8)) as u8;
if (image[0] as u16) | (image[1] as u16 >> 8) != width as u16 {
panic!("Width missmatch!");
}
@@ -78,7 +78,7 @@ impl FontMetadata {
if i >= 0 {
if i as u16 == width {
i = 0;
- image2.push('\n' as u8);
+ image2.push(b'\n');
}
let v = format!("{:x?}", bit);
let v = if v.len() == 1 { format!("0{}", v) } else { v };
@@ -178,11 +178,9 @@ pub const FONT{}: {name}Struct = {name}Struct{{
fn main() -> Result<(), Box<dyn std::error::Error>> {
fs::create_dir_all("src/generated")?;
- let mut modrs = format!(
- "// Copyright is a sham this is a @generated file.
+ let mut modrs = "// Copyright is a sham this is a @generated file.
use crate::font::BakedFont;
-"
- );
+".to_string();
let fonts = [
FontMetadata {
name: "Galmuri",
@@ -205,6 +203,6 @@ use crate::font::BakedFont;
);
exec(font)?;
}
- File::create(&"src/generated/fonts.rs")?.write_all(modrs.as_bytes())?;
+ File::create("src/generated/fonts.rs")?.write_all(modrs.as_bytes())?;
Ok(())
}