random lockscreen message, remove rand dep for audio player, add version to about window, add o/O to malvim, add circles to draw, bug fixes, minor byte savings for font .alpha format
This commit is contained in:
stjet
2025-08-18 17:27:16 +00:00
parent 2c4455f623
commit 08c2358bdc
20 changed files with 135 additions and 70 deletions

View File

@@ -7,7 +7,7 @@ use ming_wm_lib::window_manager_types::{ DrawInstructions, WindowLike, WindowLik
use ming_wm_lib::messages::{ WindowMessage, WindowMessageResponse };
use ming_wm_lib::framebuffer_types::Dimensions;
use ming_wm_lib::themes::ThemeInfo;
use ming_wm_lib::utils::{ u8_to_hex, hex_to_u8, HEX_CHARS };
use ming_wm_lib::utils::{ random_u32, u8_to_hex, hex_to_u8, HEX_CHARS };
use ming_wm_lib::ipc::listen;
//16x16 with 40 mines
@@ -252,11 +252,7 @@ impl Minesweeper {
//https://en.wikipedia.org/wiki/Xorshift
//from 0 to 15
pub fn random(&mut self) -> usize {
let mut x = self.random_seed;
x ^= x << 13;
x ^= x >> 17;
x ^= x << 5;
self.random_seed = x;
self.random_seed = random_u32(self.random_seed);
self.random_seed as usize % 16
}