Start parsing blades scenario files

This commit is contained in:
2022-06-09 19:32:16 +00:00
parent f93ec68029
commit bbb7ca45ee
6 changed files with 103 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
package data.blades;
typedef TileArray<T> = Array<Array<Int>>;
class TileMap {
private var floorCodes:TileArray<Int>;
private var terrainCodes:TileArray<Int>;
private var width = 0;
private var height = 0;
private function tileArray<T>(defaultValue:T) {
return [for (x in 0...width) [for (y in 0...height) defaultValue]];
}
public function new(width, height) {
this.width = width;
this.height = height;
floorCodes = tileArray(255);
terrainCodes = tileArray(0);
}
}