Skip to content

Commit 672532a

Browse files
committed
add "filling gap at" warnings
1 parent c06ed13 commit 672532a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

assets/image/level.aseprite

1 Byte
Binary file not shown.

src/page/in_game.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,14 @@ fn update_tile_sprites(
461461
&& chunk.get_tile(x, y + 1).is_wall()
462462
&& !chunk.get_tile(x, y + 2).is_wall()
463463
{
464+
warn!("filling gap at {} {}", x, y);
464465
chunk.set_tile(x, y + 1, Tile::StoneTile);
465466
} else if !chunk.get_tile(x, y + 0).is_wall()
466467
&& chunk.get_tile(x, y + 1).is_wall()
467468
&& chunk.get_tile(x, y + 2).is_wall()
468469
&& !chunk.get_tile(x, y + 3).is_wall()
469470
{
471+
warn!("filling gap at {} {}", x, y);
470472
chunk.set_tile(x, y + 1, Tile::StoneTile);
471473
chunk.set_tile(x, y + 2, Tile::StoneTile);
472474
}
@@ -475,6 +477,8 @@ fn update_tile_sprites(
475477

476478
// 範囲内を更新
477479
if let Some((left, top, right, bottom)) = chunk.dirty {
480+
info!("updating chunk {:?}", chunk.dirty);
481+
478482
let min_x = (left - 1).max(chunk.min_x);
479483
let max_x = (right + 1).min(chunk.max_x);
480484
let min_y = (top - 1).max(chunk.min_y);
@@ -484,6 +488,7 @@ fn update_tile_sprites(
484488
for (entity, TileSprite((tx, ty))) in tiles_query.iter() {
485489
if min_x <= *tx && *tx <= max_x && min_y <= *ty && *ty <= max_y {
486490
commands.entity(entity).despawn_recursive();
491+
// info!("despawn_recursive {} {}", file!(), line!());
487492
}
488493
}
489494

@@ -497,6 +502,7 @@ fn update_tile_sprites(
497502
// コリジョンはすべて再生成
498503
for entity in collider_query.iter() {
499504
commands.entity(entity).despawn_recursive();
505+
// info!("despawn_recursive {} {}", file!(), line!());
500506
}
501507
spawn_wall_collisions(&mut commands, chunk);
502508

0 commit comments

Comments
 (0)