Compare commits
5
Commits
f2d3f5ec07
...
v0.4.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcfb75fead | ||
|
|
7654666a17 | ||
|
|
9fc9e4c4d9 | ||
|
|
5a5c5d4d9b | ||
|
|
fb6f09fce5 |
Generated
+1
-1
@@ -1807,7 +1807,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemur"
|
name = "lemur"
|
||||||
version = "0.4.1"
|
version = "0.4.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"atoi",
|
"atoi",
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ description = "An emulator for the Virtual Boy."
|
|||||||
repository = "https://git.virtual-boy.com/PVB/lemur"
|
repository = "https://git.virtual-boy.com/PVB/lemur"
|
||||||
publish = false
|
publish = false
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
version = "0.4.1"
|
version = "0.4.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
+1
-1
Submodule shrooms-vb-core updated: 185362e6cd...b2412d9487
@@ -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 const GENERIC_PALETTE: [u8; 4] = [0, 32, 64, 128];
|
||||||
|
|
||||||
pub fn shade(brt: u8, color: Color32) -> Color32 {
|
pub fn shade(brt: u8, color: Color32) -> Color32 {
|
||||||
let corrected = if brt & 0x80 != 0 {
|
let corrected = if brt > 132 {
|
||||||
255
|
255.0
|
||||||
} else {
|
} 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] {
|
pub fn generic_palette(color: Color32) -> [Color32; 4] {
|
||||||
|
|||||||
Reference in New Issue
Block a user