├── .gitignore ├── test ├── res │ ├── cavesofgallet_tiles.png │ ├── cavesofgallet_tiles.tsx │ └── map.tmx └── src │ └── Test.hx ├── .vscode ├── settings.json ├── launch.json ├── tasks.json └── commandbar.json ├── test.hxml ├── haxelib.json ├── README.md ├── src └── tiled │ ├── com │ ├── TTileset.hx │ ├── TLayer.hx │ └── TObject.hx │ └── TMap.hx └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | test/bin/*.* -------------------------------------------------------------------------------- /test/res/cavesofgallet_tiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deepnight/heapsTiled/HEAD/test/res/cavesofgallet_tiles.png -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "workbench.colorCustomizations": { 3 | "titleBar.activeBackground": "#5e8b20", 4 | "titleBar.activeForeground": "#ffffff" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test.hxml: -------------------------------------------------------------------------------- 1 | -cp src 2 | -cp test/src 3 | -lib heaps 4 | -lib hlsdl 5 | -lib heapsTiled 6 | -main Test 7 | 8 | -D resourcesPath=test/res 9 | -D windowSize=1200x900 10 | -hl test/bin/test.hl 11 | -------------------------------------------------------------------------------- /test/res/cavesofgallet_tiles.tsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /haxelib.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "heapsTiled", 3 | "url" : "https://github.com/deepnight/heapsTiled", 4 | "license": "Apache", 5 | "tags": ["Heaps","Hashlink","Tiled","import"], 6 | "description": "Import Tiled generated maps to Heaps based projects.", 7 | "version": "0.0.14", 8 | "classPath": "src/", 9 | "releasenote": "Haxelib dependencies", 10 | "contributors": ["sbenard"], 11 | "dependencies": { 12 | "heaps":"", 13 | "deepnightLibs":"" 14 | } 15 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "HL run", 9 | "request": "launch", 10 | "type": "hl", 11 | "hxml": "test.hxml", 12 | "cwd": "${workspaceRoot}", 13 | "preLaunchTask": "HL test" 14 | 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | A simple lib to import Tiled maps to Heaps projects. It only supports basic stuff, and it's not meant to support 100% of all Tiled features. You can extend it quite easily :) 4 | 5 | # Usage 6 | 7 | See Test.hx 8 | 9 | # Folder structure 10 | 11 | ```bash 12 | │ Test.hx 13 | │ 14 | └───tiled 15 | │ TMap.hx 16 | │ 17 | └───com 18 | TLayer.hx 19 | TObject.hx 20 | TTileset.hx 21 | ``` 22 | 23 | # Credit 24 | 25 | "Caves of Gallet" tileset by Adam Saltsman: https://adamatomic.itch.io/caves-of-gallet -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "HL test", 8 | "type": "hxml", 9 | "file": "test.hxml", 10 | "presentation": { 11 | "reveal": "never", 12 | "panel": "dedicated", 13 | "clear": true 14 | }, 15 | "problemMatcher": [ 16 | "$haxe" 17 | ], 18 | "group": { 19 | "kind": "build", 20 | "isDefault": true 21 | } 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /.vscode/commandbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "skipTerminateQuickPick": true, 3 | "skipSwitchToOutput": false, 4 | "skipErrorMessage": true, 5 | "commands": [ 6 | { 7 | "text": "🍊 Build test", 8 | "color": "orange", 9 | "commandType":"palette", 10 | "command": "workbench.action.tasks.runTask|HL test", 11 | "alignment": "right", 12 | "skipTerminateQuickPick": false, 13 | "priority": -10 14 | }, 15 | { 16 | "text": "Run test", 17 | "color": "orange", 18 | "command": "hl test/bin/test.hl", 19 | "alignment": "right", 20 | "skipTerminateQuickPick": false, 21 | "priority": -11 22 | }, 23 | { 24 | "text": "➠ Submit to haxelib", 25 | "color": "yellow", 26 | "command": "start haxelib submit .", 27 | "alignment": "right", 28 | "skipTerminateQuickPick": false, 29 | "priority": -99 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /src/tiled/com/TTileset.hx: -------------------------------------------------------------------------------- 1 | package tiled.com; 2 | 3 | class TTileset { 4 | public var name : String; 5 | public var tile : h2d.Tile; 6 | public var baseId : Int = 0; 7 | public var lastId(get,never) : Int; inline function get_lastId() return baseId + cwid*chei - 1; 8 | public var tileWid : Int; 9 | public var tileHei : Int; 10 | 11 | public var cwid(get,never) : Int; inline function get_cwid() return Std.int( tile.width / tileWid ); 12 | public var chei(get,never) : Int; inline function get_chei() return Std.int( tile.height / tileHei ); 13 | 14 | public function new(n:Null, t:h2d.Tile, tw,th, base) { 15 | tile = t; 16 | name = n==null ? "Unnamed" : n; 17 | baseId = base; 18 | tileWid = tw; 19 | tileHei = th; 20 | } 21 | 22 | public function toString() { 23 | return 'TTileSet($cwid x $chei):$baseId>$lastId'; 24 | } 25 | 26 | public function getTile(id:Int) : h2d.Tile { 27 | id-=baseId; 28 | var cy = Std.int( id/cwid ); 29 | var cx = Std.int( id - cy*cwid ); 30 | return tile.sub( 31 | cx*tileWid, cy*tileHei, 32 | tileWid, tileHei 33 | ); 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /test/src/Test.hx: -------------------------------------------------------------------------------- 1 | import tiled.TMap; 2 | import tiled.com.*; 3 | 4 | class Test extends hxd.App { 5 | // Boot 6 | static function main() { 7 | new Test(); 8 | } 9 | 10 | // Engine ready 11 | override function init() { 12 | hxd.Res.initEmbed(); 13 | var wrapper = new h2d.Object(s2d); 14 | wrapper.setScale(2); 15 | 16 | var map = new tiled.TMap( hxd.Res.map ); 17 | 18 | h3d.Engine.getCurrent().backgroundColor = map.bgColor; 19 | 20 | // Render map 21 | for(l in map.layers) 22 | map.renderLayerBitmap(l, wrapper); 23 | 24 | // Render objects 25 | var g = new h2d.Graphics(wrapper); 26 | var rc = 0x00ffcc; 27 | var ec = 0xff00ff; 28 | var pc = 0xffc200; 29 | for(o in map.getObjects("markers")) { 30 | if( o.isRect() ) { 31 | g.lineStyle(1, rc, 1); 32 | g.beginFill(rc, 0.3); 33 | g.drawRect(o.x, o.y, o.wid, o.hei); 34 | } 35 | else if( o.isEllipse() ) { 36 | g.lineStyle(1, ec, 1); 37 | g.beginFill(ec, 0.3); 38 | g.drawEllipse(o.centerX, o.centerY, o.wid*0.5, o.hei*0.5); 39 | } 40 | else if( o.isTile() ) { 41 | var b = new h2d.Bitmap( o.getTile(), g ); 42 | b.x = o.x; 43 | b.y = o.y; 44 | g.lineStyle(1, rc, 1); 45 | g.beginFill(rc, 0.3); 46 | g.drawRect(o.x, o.y, o.wid, o.hei); 47 | } 48 | else { 49 | g.lineStyle(1, pc, 1); 50 | g.beginFill(pc, 0.3); 51 | g.drawCircle(o.x, o.y, 6); 52 | } 53 | } 54 | } 55 | 56 | override function update(deltaTime:Float) { 57 | super.update(deltaTime); 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/tiled/com/TLayer.hx: -------------------------------------------------------------------------------- 1 | package tiled.com; 2 | 3 | class TLayer { 4 | public var id : Int; 5 | public var name : String = ""; 6 | public var wid : Int; 7 | public var hei : Int; 8 | var props : Map = new Map(); 9 | var tmap : TMap; 10 | 11 | var ids : Array = []; 12 | var xFlip : Map = new Map(); 13 | var yFlip : Map = new Map(); 14 | var content : Map = new Map(); 15 | 16 | public function new(tmap:TMap, name:String, id:Int, w, h) { 17 | this.tmap = tmap; 18 | this.name = name; 19 | this.id = id; 20 | wid = w; 21 | hei = h; 22 | } 23 | 24 | public inline function isXFlipped(cx:Int, cy:Int) return xFlip.get(cx+cy*wid) == true; 25 | public inline function isYFlipped(cx:Int, cy:Int) return yFlip.get(cx+cy*wid) == true; 26 | 27 | inline function checkBit(v:UInt, bit:Int) : Bool { 28 | return v&(1<) { 36 | // Check for flip bits 37 | xFlip = new Map(); 38 | yFlip = new Map(); 39 | for(i in 0...a.length) { 40 | if( checkBit(a[i], 31) ) { 41 | xFlip.set(i, true); 42 | a[i] = clearBit(a[i], 31); 43 | } 44 | if( checkBit(a[i],30) ) { 45 | yFlip.set(i,true); 46 | a[i] = clearBit(a[i], 30); 47 | } 48 | } 49 | 50 | // Store IDs 51 | ids = a; 52 | content = new Map(); 53 | var i = 0; 54 | for(id in ids) { 55 | if( id>0 ) 56 | content.set(i, id); 57 | i++; 58 | } 59 | } 60 | 61 | public inline function getIds() return ids; 62 | 63 | public function hasTile(cx,cy) return content.exists(cx + cy*wid); 64 | public function getGlobalTileId(cx,cy) { 65 | return !hasTile(cx,cy) ? -1 : content.get(cx+cy*wid); 66 | } 67 | public function getLocalTileId(cx,cy) { 68 | if( !hasTile(cx,cy) ) 69 | return -1; 70 | var id = content.get(cx+cy*wid); 71 | id -= tmap.getTileSet(id).baseId; 72 | return id; 73 | } 74 | 75 | public function setProp(name, v) { 76 | props.set(name, v); 77 | } 78 | 79 | public inline function hasProp(name) { 80 | return props.exists(name); 81 | } 82 | 83 | public function getPropStr(name) : Null { 84 | return props.get(name); 85 | } 86 | 87 | public function getPropInt(name) : Int { 88 | var v = getPropStr(name); 89 | return v==null ? 0 : Std.parseInt(v); 90 | } 91 | 92 | public function getPropFloat(name) : Float { 93 | var v = getPropStr(name); 94 | return v==null ? 0 : Std.parseFloat(v); 95 | } 96 | 97 | public function getPropBool(name) : Bool { 98 | var v = getPropStr(name); 99 | return v=="true"; 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/tiled/com/TObject.hx: -------------------------------------------------------------------------------- 1 | package tiled.com; 2 | 3 | class TObject { 4 | var tmap : TMap; 5 | public var name : Null; 6 | public var type : Null; 7 | public var x : Int; 8 | public var y : Int; 9 | public var wid = 0; 10 | public var hei = 0; 11 | public var cwid(get,never) : Int; inline function get_cwid() return Std.int(wid/tmap.tileWid); 12 | public var chei(get,never) : Int; inline function get_chei() return Std.int(hei/tmap.tileHei); 13 | public var ellipse = false; 14 | 15 | public var centerX(get,never) : Int; inline function get_centerX() return Std.int(x+wid*0.5); 16 | public var centerY(get,never) : Int; inline function get_centerY() return Std.int(y+hei*0.5); 17 | 18 | public var cx(get,never) : Int; inline function get_cx() return Std.int(x/tmap.tileWid); 19 | public var cy(get,never) : Int; inline function get_cy() return Std.int(y/tmap.tileHei); 20 | 21 | public var xr(get,never) : Float; inline function get_xr() return (x-cx*tmap.tileWid) / tmap.tileWid; 22 | public var yr(get,never) : Float; inline function get_yr() return (y-cy*tmap.tileHei) / tmap.tileHei; 23 | 24 | public var tileId : Null; 25 | var props : Map = new Map(); 26 | 27 | public function new(m:TMap, x:Int, y:Int, ?w=0, ?h=0) { 28 | tmap = m; 29 | this.x = x; 30 | this.y = y; 31 | wid = w; 32 | hei = h; 33 | } 34 | 35 | public function toString() { 36 | return 'Obj:$name($type)@$cx,$cy' + (wid>0 ? ' / $wid x $hei' : ""); 37 | } 38 | 39 | public inline function isPoint() return !isTile() && wid<=0 && hei<=0; 40 | public inline function isRect() return !isTile() && wid>0 && hei>0 && !ellipse; 41 | public inline function isEllipse() return !isTile() && wid>0 && hei>0 && ellipse; 42 | public inline function isTile() return tileId!=null; 43 | 44 | public inline function rectContains(xx:Float, yy:Float) { 45 | return isRect() && xx>=x && xx=y && yy { 57 | if( !isTile() ) 58 | return null; 59 | var l = tmap.getTileSet(tileId); 60 | if( l==null ) 61 | return null; 62 | return l.getTile(tileId); 63 | } 64 | 65 | 66 | 67 | public function setProp(name, v) { 68 | props.set(name, v); 69 | } 70 | 71 | public inline function hasProp(name) { 72 | return props.exists(name); 73 | } 74 | 75 | public function getPropStr(name) : Null { 76 | return props.get(name); 77 | } 78 | 79 | public function getPropInt(name) : Int { 80 | var v = getPropStr(name); 81 | return v==null ? 0 : Std.parseInt(v); 82 | } 83 | 84 | public function getPropFloat(name) : Float { 85 | var v = getPropStr(name); 86 | return v==null ? 0 : Std.parseFloat(v); 87 | } 88 | 89 | public function getPropBool(name) : Bool { 90 | var v = getPropStr(name); 91 | return v=="true"; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/tiled/TMap.hx: -------------------------------------------------------------------------------- 1 | package tiled; 2 | 3 | import tiled.com.*; 4 | 5 | @:allow(tiled.com.TObject) 6 | @:allow(tiled.com.TLayer) 7 | class TMap { 8 | public var wid : Int; 9 | public var hei : Int; 10 | public var tileWid : Int; 11 | public var tileHei : Int; 12 | 13 | public var tilesets : Array = []; 14 | public var layers : Array = []; 15 | public var objects : Map> = new Map(); 16 | var props : Map = new Map(); 17 | 18 | public var bgColor : Null; 19 | 20 | private function htmlHexToInt(s:String) : Null { 21 | if( s.indexOf("#") == 0 ) 22 | return Std.parseInt("0x" + s.substring(1)); 23 | 24 | return null; 25 | } 26 | 27 | public function new(tmxRes:hxd.res.Resource) { 28 | var folder = tmxRes.entry.directory; 29 | var xml = new haxe.xml.Access( Xml.parse(tmxRes.entry.getText()) ); 30 | xml = xml.node.map; 31 | 32 | wid = Std.parseInt( xml.att.width ); 33 | hei = Std.parseInt( xml.att.height ); 34 | tileWid = Std.parseInt( xml.att.tilewidth ); 35 | tileHei = Std.parseInt( xml.att.tileheight ); 36 | bgColor = xml.has.backgroundcolor ? htmlHexToInt(xml.att.backgroundcolor) : null; 37 | 38 | // Parse tilesets 39 | for(t in xml.nodes.tileset) { 40 | var set = readTileset(folder, t.att.source, Std.parseInt( t.att.firstgid )); 41 | tilesets.push(set); 42 | } 43 | 44 | // Parse layers 45 | for(l in xml.nodes.layer) { 46 | var layer = new TLayer( this, Std.string(l.att.name), Std.parseInt(l.att.id), Std.parseInt(l.att.width), Std.parseInt(l.att.height) ); 47 | layers.push(layer); 48 | 49 | // Properties 50 | if( l.hasNode.properties ) 51 | for(p in l.node.properties.nodes.property) 52 | layer.setProp(p.att.name, p.att.value); 53 | 54 | // Tile IDs 55 | var data = l.node.data; 56 | switch( data.att.encoding ) { 57 | case "csv" : 58 | layer.setIds( data.innerHTML.split(",").map( function(id:String) : UInt { 59 | var f = Std.parseFloat(id); 60 | if( f > 2147483648. ) // dirty fix for Float>UInt casting issue when "bit #32" is set 61 | return ( cast (f-2147483648.) : UInt ) | (1<<31); 62 | else 63 | return ( cast f : UInt ); 64 | }) ); 65 | 66 | case _ : throw "Unsupported layer encoding "+data.att.encoding+" in "+tmxRes.entry.path; 67 | } 68 | } 69 | 70 | // Parse objects 71 | for(ol in xml.nodes.objectgroup) { 72 | objects.set(ol.att.name, []); 73 | for(o in ol.nodes.object) { 74 | var e = new TObject(this, Std.parseInt(o.att.x), Std.parseInt(o.att.y)); 75 | if( o.has.width ) e.wid = Std.parseInt( o.att.width ); 76 | if( o.has.height ) e.hei = Std.parseInt( o.att.height ); 77 | if( o.has.name ) e.name = o.att.name; 78 | if( o.has.type ) e.type = o.att.type; 79 | if( o.has.gid ) { 80 | e.tileId = Std.parseInt( o.att.gid ); 81 | e.y-=e.hei; // fix stupid bottom-left based coordinate 82 | } 83 | else if( o.hasNode.ellipse ) { 84 | e.ellipse = true; 85 | if( e.wid==0 ) { 86 | // Fix 0-sized ellipses 87 | e.x-=tileWid>>1; 88 | e.y-=tileHei>>1; 89 | e.wid = tileWid; 90 | e.hei = tileHei; 91 | } 92 | } 93 | 94 | // Properties 95 | if( o.hasNode.properties ) 96 | for(p in o.node.properties.nodes.property) 97 | e.setProp(p.att.name, p.att.value); 98 | objects.get(ol.att.name).push(e); 99 | } 100 | } 101 | 102 | // Parse map properties 103 | if (xml.hasNode.properties) { 104 | for (p in xml.node.properties.nodes.property) 105 | setProp(p.att.name, p.att.value); 106 | } 107 | } 108 | 109 | public function getLayer(name:String) : Null { 110 | for (l in layers) 111 | if (l.name == name) 112 | return l; 113 | 114 | return null; 115 | } 116 | 117 | public function getObject(layer:String, name:String) : Null { 118 | if( !objects.exists(layer) ) 119 | return null; 120 | 121 | for(o in objects.get(layer)) 122 | if( o.name==name ) 123 | return o; 124 | 125 | return null; 126 | } 127 | 128 | 129 | public function getObjects(layer:String, ?type:String) : Array { 130 | if( !objects.exists(layer) ) 131 | return []; 132 | 133 | return type==null ? objects.get(layer) : objects.get(layer).filter( function(o) return o.type==type ); 134 | } 135 | 136 | public function getPointObjects(layer:String, ?type:String) : Array { 137 | if( !objects.exists(layer) ) 138 | return []; 139 | 140 | return objects.get(layer).filter( function(o) return o.isPoint() && ( type==null || o.type==type ) ); 141 | } 142 | 143 | public function getRectObjects(layer:String, ?type:String) : Array { 144 | if( !objects.exists(layer) ) 145 | return []; 146 | 147 | return objects.get(layer).filter( function(o) return o.isRect() && ( type==null || o.type==type ) ); 148 | } 149 | 150 | 151 | public function renderLayerBitmap(l:TLayer, ?p) : h2d.Object { 152 | var wrapper = new h2d.Object(p); 153 | var cx = 0; 154 | var cy = 0; 155 | for(id in l.getIds()) { 156 | if( id!=0 ) { 157 | var b = new h2d.Bitmap(getTile(id), wrapper); 158 | b.setPosition(cx*tileWid, cy*tileHei); 159 | if( l.isXFlipped(cx,cy) ) { 160 | b.scaleX = -1; 161 | b.x+=tileWid; 162 | } 163 | if( l.isYFlipped(cx,cy) ) { 164 | b.scaleY = -1; 165 | b.y+=tileHei; 166 | } 167 | } 168 | 169 | cx++; 170 | if( cx>=wid ) { 171 | cx = 0; 172 | cy++; 173 | } 174 | } 175 | return wrapper; 176 | } 177 | 178 | 179 | public function getTiles(l:TLayer) : Array<{ t:h2d.Tile, x:Int, y:Int }> { 180 | var out = []; 181 | var cx = 0; 182 | var cy = 0; 183 | for(id in l.getIds()) { 184 | if( id!=0 ) 185 | out.push({ 186 | t : getTile(id), 187 | x : cx*tileWid, 188 | y : cy*tileHei, 189 | }); 190 | 191 | cx++; 192 | if( cx>=wid ) { 193 | cx = 0; 194 | cy++; 195 | } 196 | } 197 | return out; 198 | } 199 | 200 | function getTileSet(tileId:Int) : Null { 201 | for(set in tilesets) 202 | if( tileId>=set.baseId && tileId<=set.lastId ) 203 | return set; 204 | return null; 205 | } 206 | 207 | inline function getTile(tileId:Int) : Null { 208 | var s = getTileSet(tileId); 209 | return s!=null ? s.getTile(tileId) : null; 210 | } 211 | 212 | function readTileset(folder:String, fileName:String, baseIdx:Int) : TTileset { 213 | var folderUnstack = folder.split("/"); 214 | var fileUnstack = fileName.split("/"); 215 | while (fileUnstack[0] == "..") { 216 | fileUnstack.shift(); 217 | folderUnstack.pop(); 218 | } 219 | 220 | folder = folderUnstack.length > 0 ? folderUnstack.join("/") + "/" : ""; 221 | fileName = fileUnstack.join("/"); 222 | 223 | var file = try hxd.Res.load(folder+fileName) 224 | catch(e:Dynamic) throw "File not found "+fileName; 225 | 226 | var xml = new haxe.xml.Access( Xml.parse(file.entry.getText()) ).node.tileset; 227 | var tile = hxd.Res.load(file.entry.directory + "/" +xml.node.image.att.source).toTile(); 228 | 229 | var e = new TTileset(xml.att.name, tile, Std.parseInt(xml.att.tilewidth), Std.parseInt(xml.att.tileheight), baseIdx); 230 | return e; 231 | } 232 | 233 | public function setProp(name, v) { 234 | props.set(name, v); 235 | } 236 | 237 | public inline function hasProp(name) { 238 | return props.exists(name); 239 | } 240 | 241 | public function getPropStr(name) : Null { 242 | return props.get(name); 243 | } 244 | 245 | public function getPropInt(name) : Int { 246 | var v = getPropStr(name); 247 | return v==null ? 0 : Std.parseInt(v); 248 | } 249 | 250 | public function getPropFloat(name) : Float { 251 | var v = getPropStr(name); 252 | return v==null ? 0 : Std.parseFloat(v); 253 | } 254 | 255 | public function getPropBool(name) : Bool { 256 | var v = getPropStr(name); 257 | return v=="true"; 258 | } 259 | } 260 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /test/res/map.tmx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0, 18 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,2147483679,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 19 | 0,0,0,0,0,0,0,0,0,2147483675,0,0,0,0,27,0,40,0,27,0,2147483675,0,31,2147483679,27,27,0,2147483675,49,0,0,0,27,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 20 | 0,0,0,0,0,0,2,1073741850,0,0,0,2147483666,0,2147483659,18,2147483659,10,10,10,10,2147483657,2147483664,16,9,10,10,10,10,10,11,10,18,2147483666,11,0,0,1073741850,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 21 | 0,0,0,0,0,0,0,4,5,7,0,0,0,0,0,6,0,7,0,2,2147483665,0,86,17,0,0,3,0,0,0,0,0,0,4,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 22 | 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,5,3,0,2147483665,2147483734,0,25,0,0,4,0,0,0,7,0,0,0,7,3,0,5,0,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 23 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,6,0,0,2147483673,11,0,88,17,0,5,3,0,0,4,5,6,2,0,0,5,2,0,0,0,0,0,0,2,4,2,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 24 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2147483665,19,0,0,0,25,0,0,0,6,0,0,0,0,3,0,0,7,0,0,0,0,3,0,0,0,0,0,0,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 25 | 0,0,0,0,0,0,0,3,26,26,26,26,26,26,26,26,26,26,26,2147483673,0,0,0,0,87,25,26,26,1073741835,2147483666,26,0,3221225483,26,26,26,26,26,26,2147483666,0,3221225483,26,0,0,3221225483,18,0,0,2147483666,0,26,26,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 26 | 0,0,0,0,0,0,0,2147483665,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 27 | 0,0,0,0,0,7,0,2147483665,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2147483667,72,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 28 | 0,0,0,0,0,0,0,2147483665,0,0,0,0,0,0,0,0,0,0,4,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,0,23,2147483664,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 29 | 0,0,0,0,7,0,0,2147483665,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,2147483734,0,37,37,37,37,37,2147483664,0,0,0,0,31,0,0,0,2,86,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 30 | 0,0,0,0,0,0,0,0,10,10,10,10,10,10,10,10,2147483657,0,0,0,0,0,0,0,0,0,0,0,24,2147483693,0,0,31,31,0,0,0,31,0,0,2147483679,0,0,0,0,0,0,31,0,0,6,70,71,72,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 31 | 0,0,0,0,0,0,0,0,0,0,0,0,26,26,26,26,2147483665,0,0,0,0,0,0,0,0,0,23,37,37,2147483664,0,0,31,31,0,0,0,31,0,86,2147483679,0,0,0,0,0,0,31,0,70,71,78,79,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 32 | 0,0,0,0,0,0,4,0,0,0,0,2147483673,2147483734,87,0,88,2147483659,2147483664,0,0,0,0,0,0,0,0,31,0,31,19,0,0,31,31,19,0,0,31,45,0,2147483679,0,0,0,0,0,0,31,2147483667,78,79,80,4,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 33 | 0,0,0,0,0,0,7,7,0,0,2147483665,88,0,0,0,0,0,0,0,0,0,0,0,45,2147483675,0,31,0,31,27,0,0,31,31,0,0,0,36,2147483657,0,2147483679,0,0,0,0,2147483675,27,31,71,72,7,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 34 | 0,0,0,0,0,0,0,4,0,0,2147483665,0,0,0,0,0,0,0,0,0,0,36,37,37,10,10,10,10,10,10,10,10,2147483657,31,27,0,0,44,2147483665,0,9,10,2147483683,34,2147483682,10,2147483657,78,79,80,53,53,53,53,53,53,53,53,53,53,53,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 35 | 0,0,0,0,0,0,0,2,5,0,2147483665,84,84,84,84,84,81,84,84,81,2147483731,44,0,0,0,3,0,0,0,3,7,7,18,10,37,2147483657,0,88,2147483665,19,0,0,87,2147483667,17,87,0,0,0,0,0,0,2147483736,0,0,87,0,88,0,0,2147483735,86,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 36 | 0,0,0,0,0,0,0,0,0,0,2147483665,91,91,91,91,91,91,91,91,91,91,44,0,0,0,0,0,0,0,5,0,60,5,0,7,2147483665,0,0,17,10,2147483657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 37 | 0,0,0,0,0,0,0,0,0,0,2147483665,91,91,91,91,91,91,91,91,91,89,44,0,0,0,0,0,26,26,53,53,53,26,26,26,2147483673,0,2147483667,28,3,2147483676,10,10,2147483657,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 38 | 0,0,0,0,0,0,0,0,0,0,2147483665,89,2147483737,91,91,91,91,91,89,2147483737,0,44,2,0,0,0,2147483665,0,0,0,0,0,0,0,0,0,0,0,87,86,0,0,88,87,0,2147483683,10,0,7,37,37,37,2147483684,2147483734,0,0,0,0,0,0,0,71,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 39 | 0,0,0,0,0,0,0,0,0,0,2147483665,0,0,0,89,2147483737,89,0,0,0,0,44,0,0,0,0,2147483665,1073741835,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,86,20,0,60,0,0,0,0,2147483692,0,0,0,0,0,0,0,0,79,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 40 | 0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,3221225559,9,0,0,7,0,0,0,38,37,37,37,38,37,37,2147483684,2147483664,15,23,12,34,13,2147483682,2147483664,16,2147483682,5,7,0,5,0,0,0,2147483720,2147483719,0,0,0,0,0,0,71,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 41 | 0,0,0,0,0,0,0,0,5,3,2147483666,0,0,0,0,0,0,2147483675,9,10,0,26,0,3,6,0,0,0,0,0,0,0,0,26,2147483673,87,0,0,28,5,26,2147483673,0,0,44,0,0,0,0,0,0,0,2147483728,2147483726,2147483719,70,27,70,70,71,79,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 42 | 0,0,0,0,0,0,0,0,0,0,0,2147483734,0,0,0,0,0,38,0,0,2147483673,0,18,0,2,2,0,0,0,0,0,0,2147483673,0,88,0,0,0,0,2147483735,0,0,0,23,44,0,0,0,2,0,0,0,0,2147483728,2147483727,79,79,79,79,79,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 43 | 0,0,0,0,0,0,0,0,0,0,2147483665,0,0,0,0,27,36,0,3221225510,2147483673,1073741851,0,0,25,18,6,0,0,0,0,0,2147483665,0,0,0,0,0,0,0,0,0,0,0,31,44,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 44 | 0,0,0,0,0,0,0,5,0,0,0,3221225497,0,3221225559,0,36,38,3221225510,2147483673,0,0,0,0,0,25,0,0,0,0,0,4,2147483665,91,91,84,81,82,84,91,91,91,36,37,37,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 45 | 0,0,0,0,0,0,0,7,0,0,0,0,37,37,37,0,0,2147483700,0,0,0,0,0,0,0,86,0,0,0,0,6,0,91,91,91,91,91,91,91,91,91,0,0,0,0,6,5,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 46 | 0,0,0,0,0,0,0,0,0,3,4,0,0,1073741835,0,0,2147483692,1073741851,0,0,0,0,0,0,0,0,0,0,18,26,26,2147483673,89,89,89,91,91,91,89,91,91,0,3,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 47 | 0,0,0,0,0,0,0,0,0,0,5,0,0,18,2147483657,0,2147483692,2147483734,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,2147483737,89,0,0,2147483737,0,5,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 48 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2147483692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 49 | 0,0,0,0,0,0,0,3,0,0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105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | --------------------------------------------------------------------------------