made a graphing calculator

idk why
This commit is contained in:
FantasyPvP
2023-10-03 00:43:20 +01:00
parent 410278b6e3
commit e92e01c5b8
13 changed files with 367 additions and 29 deletions
+15
View File
@@ -8,6 +8,7 @@ use alloc::{
string::{String, ToString},
vec::Vec,
};
use vga::writers::{GraphicsWriter, PrimitiveDrawing};
use crate::{
print, println,
@@ -16,6 +17,7 @@ use crate::{
};
use crate::std::io::{Color, write, Screen};
use crate::user::bin::gigachad_detector::GigachadDetector;
use crate::user::bin::grapher::Grapher;
lazy_static! {
pub static ref CMD: Mutex<CommandHandler> = Mutex::new(CommandHandler::new());
@@ -97,6 +99,19 @@ async fn exec() -> Result<(), Error> {
let mut gameloop = crystal_rpg::init::GameLoop::new();
gameloop.run(args).await?;
}
"VGA" => {
use vga::colors::Color16;
use vga::writers::{GraphicsWriter, Graphics640x480x16};
let mode = Graphics640x480x16::new();
mode.set_mode();
mode.clear_screen(Color16::Black);
mode.draw_line((80, 60), (80, 420), Color16::Cyan);
}
"graph" => {
let mut grapher = Grapher::new();
grapher.run(args).await?;
}
// direct OS functions (not applications)
"echo" => {