[game] Starting to work on IntGrid and other layers

This commit is contained in:
John Doty 2023-08-25 19:23:27 -07:00
parent 020bb8f124
commit db0f22b1db
2 changed files with 747 additions and 22 deletions

View file

@ -266,7 +266,7 @@ export function has_collision(level: Level, cx: number, cy: number): boolean {
if (!level) return true;
if (cx < 0 || cx >= level.cw) return false;
if (cy < 0 || cy >= level.ch) return false;
return level.values[cy * level.cw + cx] == 1; // TODO: MAGIC NUMBER?
return level.values[cy * level.cw + cx] != 0; // TODO: MAGIC NUMBER?
}
export function draw_level(