| 2067 |
__extends(AutoTileChipSet, _super); |
__extends(AutoTileChipSet, _super); |
| 2068 |
function AutoTileChipSet() { |
function AutoTileChipSet() { |
| 2069 |
_super.apply(this, arguments); |
_super.apply(this, arguments); |
|
this.afterDraw = true; |
|
| 2070 |
} |
} |
| 2071 |
AutoTileChipSet.prototype.map = function (x, y) { |
AutoTileChipSet.prototype.map = function (x, y) { |
| 2072 |
if (x < 0 || y < 0 || x >= this.tile.size.width || y >= this.tile.size.height) |
if (x < 0 || y < 0 || x >= this.tile.size.width || y >= this.tile.size.height) |
| 2175 |
for (var x = 0; x < width; x++) { |
for (var x = 0; x < width; x++) { |
| 2176 |
this.data[x] = []; |
this.data[x] = []; |
| 2177 |
for (var y = 0; y < height; y++) |
for (var y = 0; y < height; y++) |
| 2178 |
this.data[x][y] = 0; |
this.data[x][y] = -1; |
| 2179 |
} |
} |
| 2180 |
this.refresh(); |
this.refresh(); |
| 2181 |
}; |
}; |
| 2208 |
var cm = this.chipMap; |
var cm = this.chipMap; |
| 2209 |
for (var x = 0; x < w; x++) |
for (var x = 0; x < w; x++) |
| 2210 |
for (var y = 0; y < h; y++) |
for (var y = 0; y < h; y++) |
| 2211 |
if (cm[d[x][y]] && !cm[d[x][y]].afterDraw) |
this.drawChip(x, y, false, c); |
|
this.drawChip(x, y, false, c); |
|
|
|
|
|
for (var x = 0; x < w; x++) |
|
|
for (var y = 0; y < h; y++) |
|
|
if (cm[d[x][y]] && cm[d[x][y]].afterDraw) |
|
|
this.drawChip(x, y, false, c); |
|
| 2212 |
|
|
| 2213 |
this.updated(); |
this.updated(); |
| 2214 |
}; |
}; |