2020-04-12 12:46:55 +00:00
|
|
|
use crate::{Avatar, Image, Item, Position, Sprite};
|
2020-04-12 11:48:07 +00:00
|
|
|
|
|
|
|
pub mod image {
|
|
|
|
use crate::image::Image;
|
|
|
|
|
|
|
|
pub(crate) fn chequers_1() -> Image {
|
|
|
|
Image {
|
|
|
|
pixels: vec![
|
|
|
|
1, 0, 1, 0, 1, 0, 1, 0,
|
|
|
|
0, 1, 0, 1, 0, 1, 0, 1,
|
|
|
|
1, 0, 1, 0, 1, 0, 1, 0,
|
|
|
|
0, 1, 0, 1, 0, 1, 0, 1,
|
|
|
|
1, 0, 1, 0, 1, 0, 1, 0,
|
|
|
|
0, 1, 0, 1, 0, 1, 0, 1,
|
|
|
|
1, 0, 1, 0, 1, 0, 1, 0,
|
|
|
|
0, 1, 0, 1, 0, 1, 0, 1,
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn chequers_2() -> Image {
|
|
|
|
Image {
|
|
|
|
pixels: vec![
|
|
|
|
0,1,0,1,0,1,0,1,
|
|
|
|
1,0,1,0,1,0,1,0,
|
|
|
|
0,1,0,1,0,1,0,1,
|
|
|
|
1,0,1,0,1,0,1,0,
|
|
|
|
0,1,0,1,0,1,0,1,
|
|
|
|
1,0,1,0,1,0,1,0,
|
|
|
|
0,1,0,1,0,1,0,1,
|
|
|
|
1,0,1,0,1,0,1,0,
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn avatar() -> Avatar {
|
|
|
|
Avatar {
|
|
|
|
animation_frames: vec![
|
|
|
|
Image {
|
|
|
|
pixels: vec![
|
|
|
|
0,0,0,0,0,0,0,0,
|
|
|
|
0,0,1,1,1,1,0,0,
|
|
|
|
0,1,1,1,1,1,1,0,
|
|
|
|
1,1,1,0,1,1,1,0,
|
|
|
|
1,0,0,1,1,0,0,1,
|
|
|
|
1,1,1,1,1,1,1,1,
|
|
|
|
1,1,1,1,1,1,1,1,
|
|
|
|
0,1,1,1,1,1,1,0,
|
|
|
|
]
|
|
|
|
},
|
|
|
|
Image {
|
|
|
|
pixels: vec![
|
|
|
|
0,0,0,0,0,0,0,0,
|
|
|
|
0,0,0,0,0,0,0,0,
|
|
|
|
0,0,1,1,1,1,0,0,
|
|
|
|
0,1,1,1,1,1,1,0,
|
|
|
|
1,1,1,0,1,1,1,0,
|
|
|
|
1,0,0,1,1,0,0,1,
|
|
|
|
1,1,1,1,1,1,1,1,
|
|
|
|
0,1,1,1,0,1,1,0,
|
|
|
|
]
|
|
|
|
},
|
|
|
|
],
|
|
|
|
room: "0".to_string(),
|
|
|
|
position: Position { x: 2, y: 5 }
|
|
|
|
}
|
|
|
|
}
|
2020-04-12 12:35:17 +00:00
|
|
|
|
|
|
|
pub(crate) fn sprite() -> Sprite {
|
|
|
|
Sprite {
|
|
|
|
id: "a".to_string(),
|
|
|
|
name: Some("hatch".to_string()),
|
|
|
|
animation_frames: vec![
|
|
|
|
Image {
|
|
|
|
pixels: vec![
|
|
|
|
0,0,0,0,0,0,0,0,
|
|
|
|
0,1,1,1,1,0,0,0,
|
|
|
|
0,1,0,0,1,0,0,0,
|
|
|
|
0,0,1,1,1,1,0,0,
|
|
|
|
0,0,1,1,1,1,0,0,
|
|
|
|
0,1,0,1,1,1,1,0,
|
|
|
|
0,1,0,1,1,1,1,0,
|
|
|
|
0,1,1,0,1,1,1,1,
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
dialogue: Some("SPR_0".to_string()),
|
|
|
|
room: "4".to_string(),
|
|
|
|
position: Position {
|
|
|
|
x: 9,
|
|
|
|
y: 7
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-04-12 12:46:55 +00:00
|
|
|
|
|
|
|
pub fn item() -> Item {
|
|
|
|
Item {
|
|
|
|
id: "6".to_string(),
|
|
|
|
animation_frames: vec![
|
|
|
|
Image {
|
|
|
|
pixels: vec![
|
|
|
|
0,1,0,0,0,0,0,0,
|
|
|
|
0,0,0,0,0,0,0,0,
|
|
|
|
0,0,0,0,0,0,0,0,
|
|
|
|
0,0,0,0,0,1,0,0,
|
|
|
|
0,0,1,0,0,0,0,0,
|
|
|
|
0,0,0,0,0,0,0,0,
|
|
|
|
0,0,0,0,0,0,0,0,
|
|
|
|
0,0,0,0,0,0,1,0,
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
name: Some("door".to_string()),
|
|
|
|
dialogue: Some("ITM_2".to_string())
|
|
|
|
}
|
|
|
|
}
|