Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/src/js/jgame.js

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

revision 149 by tsugehara, Fri Aug 9 07:29:02 2013 UTC revision 150 by tsugehara, Sat Aug 10 03:44:21 2013 UTC
# Line 2167  var jg; Line 2167  var jg;
2167              this.height = this.tileHeight * height;              this.height = this.tileHeight * height;
2168          };          };
2169    
2170          Tile.prototype.clear = function (width, height) {          Tile.prototype.clear = function (width, height, value) {
2171              if (!width)              if (!width)
2172                  width = this.size.width;                  width = this.size.width;
2173              if (!height)              if (!height)
2174                  height = this.size.height;                  height = this.size.height;
2175                if (value === undefined)
2176                    value = -1;
2177              this._clear(width, height);              this._clear(width, height);
2178              this.data = [];              this.data = [];
2179              for (var x = 0; x < width; x++) {              for (var x = 0; x < width; x++) {
2180                  this.data[x] = [];                  this.data[x] = [];
2181                  for (var y = 0; y < height; y++)                  for (var y = 0; y < height; y++)
2182                      this.data[x][y] = -1;                      this.data[x][y] = value;
2183              }              }
2184              this.refresh();              this.refresh();
2185          };          };

Legend:
Removed from v.149  
changed lines
  Added in v.150

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