Scripts currently have two ways to give text to the player: log() (status messages appended to the log panel) and say() (a short speech bubble above the object, auto-expires after 3 s). Neither is suitable for longer messages or interactive menus. The new scroll(lines[]) action opens a full-screen overlay with scrollable text and optional menu choices. Choosing an option sends a named message back to the object that opened the scroll (via the existing Action::Send / run_send pipeline), letting scripts branch on player decisions.
Scripts currently have two ways to give text to the player: log() (status messages appended to the log panel) and say() (a short speech bubble above the object, auto-expires after 3 s). Neither is suitable for longer messages or interactive menus. The new scroll(lines[]) action opens a full-screen overlay with scrollable text and optional menu choices. Choosing an option sends a named message back to the object that opened the scroll (via the existing Action::Send / run_send pipeline), letting scripts branch on player decisions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::collections::VecDeque; | |
| #[derive(Copy, Clone, Debug, PartialEq)] | |
| #[rustfmt::skip] | |
| enum Alphabet { | |
| L, U, P, | |
| } | |
| enum ZChar { | |
| Literal(char), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![no_std] | |
| #![no_main] | |
| use defmt::info; | |
| use embassy_executor::Spawner; | |
| use embassy_stm32::gpio::{AfType, Flex, OutputType, Speed}; | |
| use embassy_stm32::ltdc::{B7Pin, ClkPin, DePin, G7Pin, HsyncPin, Ltdc, LtdcConfiguration, LtdcLayer, LtdcLayerConfig, PixelFormat, PolarityActive, PolarityEdge, R7Pin, VsyncPin}; | |
| use embassy_stm32::pac::LTDC; | |
| use embassy_stm32::peripherals::LTDC; | |
| use embassy_stm32::rcc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![no_std] | |
| #![no_main] | |
| use defmt::info; | |
| use embassy_executor::Spawner; | |
| use embassy_stm32::gpio::{AfType, Flex, OutputType, Speed}; | |
| use embassy_stm32::ltdc::{B7Pin, ClkPin, DePin, G7Pin, HsyncPin, Ltdc, LtdcConfiguration, LtdcLayer, LtdcLayerConfig, PixelFormat, PolarityActive, PolarityEdge, R7Pin, VsyncPin}; | |
| use embassy_stm32::peripherals::LTDC; | |
| use embassy_stm32::rcc; | |
| use embassy_stm32::rcc::Pll; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn main() { | |
| let input = image::load_from_memory(include_bytes!("atkinson.png")).unwrap().into_luma16(); | |
| let (width, height) = (input.width(), input.height()); | |
| let mut output = image::RgbImage::new(width, height); | |
| let mut error_rows = vec![vec![0.0; width as usize]; 3]; | |
| let palette: Vec<image::Rgb<u8>> = vec![ | |
| [0xe4, 0x2b, 0x19].into(), | |
| [0, 0x40, 0x62].into(), | |
| [0x82, 0xa7, 0xaf].into(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [package] | |
| name = "dither" | |
| version = "0.1.0" | |
| edition = "2024" | |
| [dependencies] | |
| image = "0.25.6" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [package] | |
| name = "carillon" | |
| version = "0.1.0" | |
| edition = "2024" | |
| [dependencies] | |
| midi_file = "0.0.6" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::collections::VecDeque; | |
| use std::env; | |
| use std::fmt::{Display, Formatter}; | |
| use std::ops::{Index, IndexMut}; | |
| use rand::RngCore; | |
| use crate::Dir::*; | |
| fn main() { | |
| let args: Vec<_> = env::args().collect(); | |
| let dimension = if args.len() < 2 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::env; | |
| use std::fmt::{Display, Formatter}; | |
| use std::ops::{Index, IndexMut}; | |
| use rand::RngCore; // cargo add rand | |
| use crate::Dir::*; | |
| fn main() { | |
| let args: Vec<_> = env::args().collect(); | |
| let dimension = if args.len() < 2 { | |
| println!("No dimension, defaulting to 20"); |
NewerOlder