Initial Commit
This commit adds most of the logic for the processor Things that are missing: + Most sdl2 interactions + Cartridge loading + Main loop for the game
This commit is contained in:
27
src/main.rs
Normal file
27
src/main.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
extern crate rand;
|
||||
extern crate sdl2;
|
||||
|
||||
use std::env;
|
||||
|
||||
mod processor;
|
||||
mod fontset;
|
||||
|
||||
use crate::processor::Processor;
|
||||
|
||||
fn main() {
|
||||
let cartridge = env::args().nth(1);
|
||||
match cartridge {
|
||||
Some(_) => println!("Found a cartridge file! Trying to load..."),
|
||||
None => {
|
||||
println!("No cartridge file found! Exiting!");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
let mut processor = Processor::new();
|
||||
|
||||
// load cartridge file
|
||||
|
||||
processor.start();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user