diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-01-18 23:41:48 -0500 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-01-18 23:41:48 -0500 |
commit | 7078cb41929b7babeeea0b912181feb2f544ebf5 (patch) | |
tree | 0f2246748ae3ebd720ddcfb736ec51ddf76b0783 /examples | |
parent | a4279d86918c0ec47300b00df2a3fd06e77aab30 (diff) |
simplified and corrected protectArea diffing
Diffstat (limited to 'examples')
-rw-r--r-- | examples/jarvis.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js index fb3a999..8abd9c9 100644 --- a/examples/jarvis.js +++ b/examples/jarvis.js @@ -89,10 +89,9 @@ function protectArea(send, tiles, locs){ loc = vec.tileToChar(loc); if (ri(ctrl, [loc, vec.add(loc, tilesize)])){ // Write diffs from the tile - let inter = notif.copy(); // Acts as a window for tile (only see relevant data) - inter.comb(tile, comb.unmask); - let diff = notif.copy(); // Actually diffs notify with the errant text - diff.comb(inter, comb.sub); + let diff = notif.copy(); // Acts as a window for tile (only see relevant data) + diff.comb(tile, comb.flip(comb.unmask)); + diff.comb(tile, comb.sub); writes.enqueue(diff.towrite()) // Mask the tile let newtile = notif.copy(); |