Added some new Textures
This commit is contained in:
22
src/main.rs
22
src/main.rs
@@ -83,7 +83,7 @@ pub struct Map{
|
||||
}
|
||||
impl Map{
|
||||
fn new() -> Self{
|
||||
let (DEFAULT_MAP,height) = (50,40);
|
||||
//let (width,height) = (DEFAULT_MAP_WIDTH,DEFAULT_MAP_HEIGHT);
|
||||
Map{
|
||||
size:Point::new(DEFAULT_MAP_WIDTH,DEFAULT_MAP_HEIGHT),
|
||||
//grid:vec![0;width as usize * height as usize],
|
||||
@@ -95,7 +95,7 @@ impl Map{
|
||||
for x in 0..self.size.x{
|
||||
for y in 0..self.size.y{
|
||||
let index = (x * self.size.y) + y;
|
||||
self.grid[index as usize] = rng.gen_range(0..3);
|
||||
self.grid[index as usize] = rng.gen_range(0..6);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,9 +118,25 @@ impl Map{
|
||||
tile_bg = Color::RGB(0x59, 0xA5, 0xD8);
|
||||
}
|
||||
2 =>{
|
||||
//Wall
|
||||
//Wall
|
||||
tile_bg = Color::RGB(0x17, 0x2A, 0x33);
|
||||
}
|
||||
3 =>{
|
||||
//Sand
|
||||
tile_bg = Color::RGB(0xCA, 0x89, 0x5F);
|
||||
}
|
||||
4 =>{
|
||||
//Wet Sand
|
||||
tile_bg = Color::RGB(0xA1, 0x5E, 0x49);
|
||||
}
|
||||
5 =>{
|
||||
//Forest 3a5a40
|
||||
tile_bg = Color::RGB(0x3A, 0x5A, 0x40);
|
||||
}
|
||||
6 =>{
|
||||
//Hole
|
||||
tile_bg = Color::RGB(0xDA, 0x66, 0x7B);
|
||||
}
|
||||
_ => {
|
||||
//uuuuuuh... whatever I guess lets make it black
|
||||
tile_bg = Color::RGB(0x00, 0x00, 0x00);
|
||||
|
||||
Reference in New Issue
Block a user