Browse Subversion Repository
Diff of /trunk/src/js/jgame.js
Parent Directory
| Revision Log
| Patch
| 2068 |
function AutoTileChipSet() { |
function AutoTileChipSet() { |
| 2069 |
_super.apply(this, arguments); |
_super.apply(this, arguments); |
| 2070 |
} |
} |
| 2071 |
AutoTileChipSet.prototype.map = function (tile, x, y) { |
AutoTileChipSet.prototype.map = function (tile, x, y, out_value) { |
| 2072 |
if (x < 0 || y < 0 || x >= tile.size.width || y >= tile.size.height) |
if (x < 0 || y < 0 || x >= tile.size.width || y >= tile.size.height) |
| 2073 |
return -1; |
return out_value !== undefined ? out_value : -1; |
| 2074 |
return tile.data[x][y]; |
return tile.data[x][y]; |
| 2075 |
}; |
}; |
| 2076 |
|
|
| 2090 |
for (var j = 0; j < 2; j++) { |
for (var j = 0; j < 2; j++) { |
| 2091 |
var tx = x + (i == 0 ? -1 : 1); |
var tx = x + (i == 0 ? -1 : 1); |
| 2092 |
var ty = y + (j == 0 ? -1 : 1); |
var ty = y + (j == 0 ? -1 : 1); |
| 2093 |
var v = this.map(tile, tx, y); |
var v = this.map(tile, tx, y, chip); |
| 2094 |
var h = this.map(tile, x, ty); |
var h = this.map(tile, x, ty, chip); |
| 2095 |
var vh = this.map(tile, tx, ty); |
var vh = this.map(tile, tx, ty, chip); |
| 2096 |
var sel = 0; |
var sel = 0; |
| 2097 |
if (h == chip) |
if (h == chip) |
| 2098 |
sel++; |
sel++; |
|
|
Legend:
| Removed from v.147 |
|
| changed lines |
| |
Added in v.148 |
|
|
| |