Adjust surface to generate above... surface level

This commit is contained in:
crumblingstatue 2023-04-05 01:00:13 +02:00
parent 462eede90f
commit c72b16a889
2 changed files with 3 additions and 3 deletions

View file

@ -88,7 +88,7 @@ pub fn for_each_tile_on_screen(camera_offset: WorldPos, mut f: impl FnMut(TilePo
impl Default for GameState {
fn default() -> Self {
let mut spawn_point = WorldPos::SURFACE_CENTER;
spawn_point.y -= 304;
spawn_point.y -= 1104;
Self {
camera_offset: spawn_point,
world: Default::default(),

View file

@ -107,7 +107,7 @@ impl Chunk {
mid: 0,
fg: 0,
}; CHUNK_N_TILES];
if pos.y == 157 {
if pos.y == 156 {
for (i, b) in tiles.iter_mut().enumerate() {
if i / CHUNK_EXTENT as usize == 0 {
b.fg = 8;
@ -116,7 +116,7 @@ impl Chunk {
b.bg = 9;
}
}
if pos.y > 157 {
if pos.y > 156 {
for b in &mut tiles {
b.bg = 7;
b.mid = 1;