refactor view/scene to separate modules

This commit is contained in:
2016-09-21 19:38:27 -07:00
parent b8b5bf8ab7
commit 7a9f65115c
10 changed files with 311 additions and 224 deletions

View File

@@ -8,9 +8,10 @@ use std::path::Path;
use self::gfx::tex;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct Tile {
val: u8,
pub val: u8,
}
pub fn get_tiles<R, F, T>(factory: &mut F) -> (//gfx::handle::Texture<R, T::Surface>,
@@ -31,6 +32,8 @@ pub fn get_tiles<R, F, T>(factory: &mut F) -> (//gfx::handle::Texture<R, T::Surf
tex.1
}
impl Tile {
pub fn as_char(&self) -> char {
match self.val {