From d48efa8bfad583843bccecadce2d1b03ccaa2f0f Mon Sep 17 00:00:00 2001 From: Marc Robledo Date: Sun, 19 Feb 2017 08:43:06 +0100 Subject: [PATCH] fixed both grass current+previous preview maps --- acnl_editor.appcache | 4 +- data/acnl_editor.css | 18 +++++++- data/acnl_editor.js | 103 +++++++++++++++++++++---------------------- index.html | 4 +- 4 files changed, 71 insertions(+), 58 deletions(-) diff --git a/acnl_editor.appcache b/acnl_editor.appcache index 9da3278..7ced560 100644 --- a/acnl_editor.appcache +++ b/acnl_editor.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# last update 2017-02-18 +# last update 2017-02-19 # these belong to the CACHE block index.html help.html @@ -18,4 +18,4 @@ data/villagers.jpg # force these files to be loaded in network NETWORK: -* +* \ No newline at end of file diff --git a/data/acnl_editor.css b/data/acnl_editor.css index 88d3937..12c3dd3 100644 --- a/data/acnl_editor.css +++ b/data/acnl_editor.css @@ -1,5 +1,5 @@ /* - Animal Crossing:New Leaf RAM Editor v20170103 + Animal Crossing:New Leaf RAM Editor v20170219 by Marc Robledo 2015-2017 */ @font-face{font-family:'Noto Sans';font-style:normal;font-weight:normal;src:local('Noto Sans'),local('NotoSans'),url('./NotoSans.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000} @@ -338,6 +338,22 @@ span.sprite{display:inline-block;vertical-align:middle} .room-container .grid{margin-right:10px} +canvas.grass{ + width:320px; + border:1px dotted #ccc; + image-rendering:optimizeSpeed; + image-rendering:-moz-crisp-edges; + image-rendering:-webkit-optimize-contrast; + image-rendering:optimize-contrast; + image-rendering:pixelated; + -ms-interpolation-mode:nearest-neighbor; +} +#grass-previous{ + width:384px; +} + + + #move-building-overlay{ position:absolute; background-color:rgba(255,255,255,.25); diff --git a/data/acnl_editor.js b/data/acnl_editor.js index ee596c7..44b44b1 100644 --- a/data/acnl_editor.js +++ b/data/acnl_editor.js @@ -5,6 +5,7 @@ A lot of thanks to: * Thulinma for Pattern structure (check out his editor pattern http://www.thulinma.com/acnl/ ) * NeoKamek for his work on LeafTools and other help + * jexom for documenting grass deterioration * froggestspirit for extracting acre information and item list * sprungit/shokolad-town for compiling hair style and color thumbnails */ @@ -570,25 +571,25 @@ Town.prototype.maxTurnipPrices=function(){ } Town.prototype.setGrass=function(b){ - var MAX_CURRENT=(16*16)*(8*6); + var MAX_CURRENT=(16*16)*(5*4); for(var i=0; i> 4){ //alert(b); } @@ -936,36 +937,28 @@ function GrassMapPrevious(offset,canvasId,width,height){ this.draw(); } -GrassMapPrevious.prototype.draw=function(){ +GrassMapCurrent.prototype.draw=function(){ var tile=0; var ctx=this.canvas.getContext('2d'); - for(var i=0; i