Added some new Textures
This commit is contained in:
+18
-2
@@ -83,7 +83,7 @@ pub struct Map{
|
|||||||
}
|
}
|
||||||
impl Map{
|
impl Map{
|
||||||
fn new() -> Self{
|
fn new() -> Self{
|
||||||
let (DEFAULT_MAP,height) = (50,40);
|
//let (width,height) = (DEFAULT_MAP_WIDTH,DEFAULT_MAP_HEIGHT);
|
||||||
Map{
|
Map{
|
||||||
size:Point::new(DEFAULT_MAP_WIDTH,DEFAULT_MAP_HEIGHT),
|
size:Point::new(DEFAULT_MAP_WIDTH,DEFAULT_MAP_HEIGHT),
|
||||||
//grid:vec![0;width as usize * height as usize],
|
//grid:vec![0;width as usize * height as usize],
|
||||||
@@ -95,7 +95,7 @@ impl Map{
|
|||||||
for x in 0..self.size.x{
|
for x in 0..self.size.x{
|
||||||
for y in 0..self.size.y{
|
for y in 0..self.size.y{
|
||||||
let index = (x * self.size.y) + 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -121,6 +121,22 @@ impl Map{
|
|||||||
//Wall
|
//Wall
|
||||||
tile_bg = Color::RGB(0x17, 0x2A, 0x33);
|
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
|
//uuuuuuh... whatever I guess lets make it black
|
||||||
tile_bg = Color::RGB(0x00, 0x00, 0x00);
|
tile_bg = Color::RGB(0x00, 0x00, 0x00);
|
||||||
|
|||||||
Reference in New Issue
Block a user