#![no_main] #![no_std] #![feature(abi_efiapi)] mod gfx; use crate::gfx::*; use uefi::prelude::*; use core::fmt::Write; #[entry] fn main(_handle: Handle, mut system_table: SystemTable) -> Status { uefi_services::init(&mut system_table).unwrap(); system_table.stdout().clear().unwrap(); writeln!(system_table.stdout(), "Clearing the screen!").unwrap(); let mut gop = GOP::new(&system_table).unwrap(); gop.set_highest_resolution().unwrap(); writeln!(system_table.stdout(), "Set max resolution!").unwrap(); let gop = GOP::new(&system_table).unwrap(); let (dx, dy) = gop.get_resolution(); writeln!(system_table.stdout(), "Resolution: {}x{}", dx, dy).unwrap(); let mut gop = GOP::new(&system_table).unwrap(); gop.fill_box(0, 0, 16, 16, 128, 0, 0).unwrap(); #[cfg(not(debug_assertions))] loop {} #[allow(unreachable_code)] Status::SUCCESS }