<commit_before><!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>TagPro Map Editor</title>
		<script src="generatepng.js"></script>
		<script src="webtoolkit.base64.js"></script>
		<script src="jquery-2.1.0.min.js"></script>

<style type="text/css">
div.tileRow {
  height:40px;
}
div.tile {
  width:40px;
  height:40px;
  background-image: url("default-skin.png"); 
  display:inline-block;
}
div.tileBackground {
  width:40px;
  height:40px;
  background-image: url("default-skin.png"); 
  display:inline-block;
  background-position: -80px -80px;
}
div.selectionIndicator {
  width:40px;
  height:40px;
  background-image: url("selected.png"); 
  display:none;
}
a.dropArea {
  width:60px;
  border:1px dotted #555;
  display:inline-block;
  text-align:center;
}
</style>
</head>
<body>
<a class='dropArea' draggable="true" id='pngDrop' download="map.png" href='#'>PNG</a>
<a class='dropArea' draggable="true" id='jsonDrop' download="map.json" href='#'>JSON</a>

<input type='button' value='Import' id='import' />
<input type='button' value='Export!' id='export' />
<input type='button' value='Save!' id='save' />
<canvas width="200" height="200" id='importCanvas' style='display:none'></canvas>
<div id='palette'>
  
</div>
<a href='#' id='toolPencil' class='toolButton'>Pencil</a>
<a href='#' id='toolBrush' class='toolButton'>Brush</a>
<a href='#' id='toolFill' class='toolButton'>Fill</a>
<a href='#' id='toolWire' class='toolButton'>Wire</a>

<div style='height:30em;overflow-x: scroll;white-space: nowrap;' id='map'>



</div>


<input type='text' id='resizeWidth' />
<input type='text' id='resizeHeight' />
<input type='button' value='Resize' id='resize' />

<script>
$(function() {
  var tileSize = 40;
  function positionCss(x, y) {
    return -x*tileSize + 'px ' + -y*tileSize + 'px';
  }
  function TileType(name, sheetX, sheetY, r,g,b, extra) {
    this.name = name;
    this.sheetX = sheetX;
    this.sheetY = sheetY;
    this.color = String.fromCharCode(r)+String.fromCharCode(g)+String.fromCharCode(b)+String.fromCharCode(255);
    this.postPlaceFn = extra&&extra.postPlaceFn;
    this.logicFn = extra&&extra.logicFn;
    this.image = extra&&extra.image;
    this.rgb = r | (g<<8) | (b<<16);
  }
  TileType.prototype.positionCss = function() {
    return positionCss(this.sheetX, this.sheetY)
  }
  TileType.prototype.drawOn = function($elem, tile) {
    var styleBgColor = this.name == 'empty' ? 'black' : '';
    if (styleBgColor != $elem.styleBgColor) {
      $elem.css('background-color', styleBgColor);
      $elem.styleBgColor = styleBgColor;
    }
    var styleUrl = 'url("' + (this.image || 'default-skin') + '.png")';
    if (styleUrl != $elem.styleUrl) {
      $elem.css('background-image', styleUrl)
      $elem.styleUrl = styleUrl;
    }
    if (this == wallType && tile) {
      var x = tile.x, y = tile.y;
      var idx = (isWall(x-1,y)?1:0) | (isWall(x+1,y)?2:0) | (isWall(x,y-1)?4:0) | (isWall(x,y+1)?8:0);
      var coords = [
        [0,0], //
        [9,6], // L
        [8,6], // R
        [2,4], // LR
        [0,6], // U<commit_msg>Fix some little visual bugs<commit_after><!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>TagPro Map Editor</title>
		<script src="generatepng.js"></script>
		<script src="webtoolkit.base64.js"></script>
		<script src="jquery-2.1.0.min.js"></script>

<style type="text/css">
div.tileRow {
  height:40px;
}
div.tile {
  width:40px;
  height:40px;
  display:inline-block;
}
div.tileBackground {
  width:40px;
  height:40px;
  background-image: url("default-skin.png"); 
  display:inline-block;
  background-position: -80px -80px;
}
div.selectionIndicator {
  width:40px;
  height:40px;
  background-image: url("selected.png"); 
  display:none;
}
a.dropArea {
  width:60px;
  border:1px dotted #555;
  display:inline-block;
  text-align:center;
}
</style>
</head>
<body>
<a class='dropArea' draggable="true" id='pngDrop' download="map.png" href='#'>PNG</a>
<a class='dropArea' draggable="true" id='jsonDrop' download="map.json" href='#'>JSON</a>

<input type='button' value='Import' id='import' />
<input type='button' value='Export!' id='export' />
<input type='button' value='Save!' id='save' />
<canvas width="200" height="200" id='importCanvas' style='display:none'></canvas>
<div id='palette'>
  
</div>
<a href='#' id='toolPencil' class='toolButton'>Pencil</a>
<a href='#' id='toolBrush' class='toolButton'>Brush</a>
<a href='#' id='toolFill' class='toolButton'>Fill</a>
<a href='#' id='toolWire' class='toolButton'>Wire</a>

<div style='height:30em;overflow-x: scroll;white-space: nowrap;' id='map'>



</div>


<input type='text' id='resizeWidth' />
<input type='text' id='resizeHeight' />
<input type='button' value='Resize' id='resize' />

<script>
$(function() {
  var tileSize = 40;
  function positionCss(x, y) {
    return -x*tileSize + 'px ' + -y*tileSize + 'px';
  }
  function TileType(name, sheetX, sheetY, r,g,b, extra) {
    this.name = name;
    this.sheetX = sheetX;
    this.sheetY = sheetY;
    this.color = String.fromCharCode(r)+String.fromCharCode(g)+String.fromCharCode(b)+String.fromCharCode(255);
    this.postPlaceFn = extra&&extra.postPlaceFn;
    this.logicFn = extra&&extra.logicFn;
    this.image = extra&&extra.image;
    this.rgb = r | (g<<8) | (b<<16);
  }
  TileType.prototype.positionCss = function() {
    return positionCss(this.sheetX, this.sheetY)
  }
  TileType.prototype.drawOn = function($elem, tile) {
    var styleBgColor = '';
    var styleUrl = 'url("' + (this.image || 'default-skin') + '.png")';
    if (this.name == 'empty') {
      styleBgColor = 'black';
      styleUrl = '';
    }
    if (styleBgColor != $elem.styleBgColor) {
      $elem.css('background-color', styleBgColor);
      $elem.styleBgColor = styleBgColor;
    }
    if (styleUrl != $elem.styleUrl) {
      $elem.css('background-image', styleUrl)
      $elem.styleUrl = styleUrl;
    }
    if (this == wallType && tile) {
      var x = tile.x, y = tile.y;
      var idx = (isWall(x-1,y)?1:0) | (isWall(x+1,y)?2:0) | (isWall(x,y-1)?4:0) | (isWall(x,y+1)?8:0);
      var coords = [
        [0,0], //
        [9,6], // L
        [8,6], // R
        [2,4], // LR
        [0,6], // U
{'fraction_non_alphanumeric': 0.2047940797940798, 'fraction_numerical': 0.021879021879021878, 'mean_word_length': 3.953784860557769, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4753396', 'n_tokens_mistral': 2453, 'n_tokens_neox': 2342, 'n_words': 426}