Compare commits

...
3 Commits
Author SHA1 Message Date
SonicSwordcane 9fc9e4c4d9 chore: Release lemur version 0.4.2 2025-02-25 10:21:36 -05:00
SonicSwordcane 5a5c5d4d9b Update core to fix affine parallax 2025-02-25 10:20:44 -05:00
SonicSwordcane fb6f09fce5 Adjust shades 2025-02-25 10:18:36 -05:00
4 changed files with 7 additions and 7 deletions
Generated
+1 -1
View File
@@ -1807,7 +1807,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "lemur"
version = "0.4.1"
version = "0.4.2"
dependencies = [
"anyhow",
"atoi",
+1 -1
View File
@@ -4,7 +4,7 @@ description = "An emulator for the Virtual Boy."
repository = "https://git.virtual-boy.com/PVB/lemur"
publish = false
license = "MIT"
version = "0.4.1"
version = "0.4.2"
edition = "2021"
[dependencies]
+4 -4
View File
@@ -3,12 +3,12 @@ use egui::{Color32, Image, ImageSource, Response, Sense, TextureOptions, Ui, Wid
pub const GENERIC_PALETTE: [u8; 4] = [0, 32, 64, 128];
pub fn shade(brt: u8, color: Color32) -> Color32 {
let corrected = if brt & 0x80 != 0 {
255
let corrected = if brt > 132 {
255.0
} else {
(brt << 1) | (brt >> 6)
(brt as f32 * 255.0 / 133.0).round()
};
color.gamma_multiply(corrected as f32 / 255.0)
color.gamma_multiply(corrected / 255.0)
}
pub fn generic_palette(color: Color32) -> [Color32; 4] {