summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJakob L. Kreuze <jakob@memeware.net>2018-06-10 21:41:51 -0400
committerJakob L. Kreuze <jakob@memeware.net>2018-06-10 21:41:51 -0400
commit91abcae9e7ca9b80474d93410fbd87c747f7f658 (patch)
tree089a3d3daea253df58febb0db0482bd75e9d12ac /src/main.rs
parent9bb619edf01a897dd531c4c4df03ff60c7b5c4ad (diff)
Partially working ART and PALETTE parsers.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index f12759c..8880719 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -19,6 +19,7 @@ extern crate simple_error;
use std::process;
+mod bitmap;
mod grp;
mod path;
mod world;
@@ -35,5 +36,23 @@ fn main() {
}
let map = group_manager.get("E1L1.MAP").unwrap();
- let world = world::World::from_map(map);
+ let _world = world::World::from_map(map);
+
+ let bitmap_manager = bitmap::BitmapManager::new(&group_manager).unwrap();
+ let _tile = bitmap_manager.get_tile(277).unwrap();
+
+ // use std::fs::File;
+ // use std::io::Write;
+ // let mut file = File::create("/tmp/test.data").unwrap();
+ // let mut data: Vec<u8> = Vec::new();
+ // for pixel in tile.data.iter() {
+ // let r = pixel / 16;
+ // let g = pixel / 4;
+ // let b = pixel & 0xff;
+ // data.push(r as u8);
+ // data.push(g as u8);
+ // data.push(b as u8);
+ // }
+ // println!("{} x {}", tile.width, tile.height);
+ // file.write_all(&data);
}