servicepoint-binding-c/src/lib.rs

30 lines
907 B
Rust
Raw Normal View History

2024-05-11 23:28:08 +02:00
pub use crate::bit_vec::BitVec;
pub use crate::byte_grid::ByteGrid;
pub use crate::command::{Command, Origin, Size};
pub use crate::command_codes::{CommandCode, CompressionCode};
pub use crate::connection::Connection;
pub use crate::packet::{Header, Packet, Payload};
pub use crate::pixel_grid::PixelGrid;
2024-05-09 23:30:18 +02:00
mod bit_vec;
2024-05-11 23:28:08 +02:00
mod byte_grid;
2024-05-10 00:53:12 +02:00
mod command;
2024-05-10 18:33:51 +02:00
mod command_codes;
2024-05-11 23:16:41 +02:00
mod compression;
2024-05-11 23:28:08 +02:00
mod connection;
mod packet;
mod pixel_grid;
2024-05-09 23:30:18 +02:00
2024-05-12 01:30:55 +02:00
/// size of a single tile in one dimension
2024-05-09 23:30:18 +02:00
pub const TILE_SIZE: u16 = 8;
2024-05-12 01:30:55 +02:00
/// tile count in the x-direction
2024-05-09 23:30:18 +02:00
pub const TILE_WIDTH: u16 = 56;
2024-05-12 01:30:55 +02:00
/// tile count in the y-direction
2024-05-09 23:30:18 +02:00
pub const TILE_HEIGHT: u16 = 20;
2024-05-12 01:30:55 +02:00
/// screen width in pixels
2024-05-09 23:30:18 +02:00
pub const PIXEL_WIDTH: u16 = TILE_WIDTH * TILE_SIZE;
2024-05-12 01:30:55 +02:00
/// screen height in pixels
2024-05-09 23:30:18 +02:00
pub const PIXEL_HEIGHT: u16 = TILE_HEIGHT * TILE_SIZE;
2024-05-12 01:30:55 +02:00
/// pixel count on whole screen
2024-05-09 23:30:18 +02:00
pub const PIXEL_COUNT: usize = PIXEL_WIDTH as usize * PIXEL_HEIGHT as usize;