Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/jgame.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 147 by tsugehara, Wed Aug 7 15:59:56 2013 UTC revision 148 by tsugehara, Thu Aug 8 07:41:25 2013 UTC
# Line 2068  var jg; Line 2068  var jg;
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    
# Line 2090  var jg; Line 2090  var jg;
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

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26