You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
858 B
32 lines
858 B
use ggez::event;
|
|
use ggez::{ContextBuilder, GameResult};
|
|
|
|
use std::env;
|
|
use std::path;
|
|
|
|
mod actor;
|
|
mod apr;
|
|
mod behaviour;
|
|
mod board;
|
|
|
|
fn main() -> GameResult<()> {
|
|
let mut cb = ContextBuilder::new("apruebo", "s1m7u, e-dt and silverember");
|
|
|
|
if let Ok(manifest_dir) = env::var("CARGO_MANIFEST_DIR") {
|
|
let mut path = path::PathBuf::from(manifest_dir);
|
|
path.push("resources");
|
|
println!("Adding path {:?}", path);
|
|
cb = cb.add_resource_path(path);
|
|
}
|
|
|
|
// Make a Context.
|
|
let (mut ctx, event_loop) = cb.build().expect("aieee, could not create ggez context!");
|
|
|
|
// Create an instance of your event handler.
|
|
// Usually, you should provide it with the Context object to
|
|
// use when setting your game up.
|
|
let apr = apr::Apr::new(&mut ctx, 8, 8)?;
|
|
|
|
// Run!
|
|
event::run(ctx, event_loop, apr);
|
|
}
|
|
|