Fix image conversion and CLUT placement

This commit is contained in:
2023-05-01 22:37:41 +02:00
parent 904509a65e
commit 513275fba8
6 changed files with 50 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "tool_helper"
version = "0.8.0"
version = "0.8.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@@ -57,7 +57,7 @@ macro_rules! create_bit_functions {
}
pub const fn [< get_value_ $type_val >](src: $type_val, range: &BitRange) -> $type_val {
(src & [< get_mask_ $type_val >](range)) >> range.start
(src & ([< get_mask_ $type_val >](range) << (range.start as $type_val))) >> range.start
}
pub const fn [< bit_set_ $type_val >](src: $type_val, bit: usize) -> bool {