diff options
-rw-r--r-- | Makefile | 6 | ||||
-rwxr-xr-x | client/minimap-dyecmd.py | 18 | ||||
-rwxr-xr-x | client/minimap-dyecmd.sh | 0 | ||||
-rw-r--r-- | client/minimap-override/001-1.png | bin | 0 -> 38688 bytes | |||
-rw-r--r-- | client/minimap-override/001-6.png | bin | 0 -> 6851 bytes | |||
-rw-r--r-- | client/minimap-override/011-3.png | bin | 0 -> 12659 bytes | |||
-rwxr-xr-x | client/minimap-render.py | 5 |
7 files changed, 24 insertions, 5 deletions
@@ -64,8 +64,10 @@ client: @cd client ; ./dailylogin.py @cd client ; mv weapons.tmp ../../client-data/weapons.xml @cd client ; mv daily.tmp ../../client-data/graphics/images/daily.xml - @cd client ; ./minimap-render.py all - @echo "XML files updated, please commit result on client-data." + @cd client ; ./minimap-render.py all + @cd client ; ./minimap-dyecmd.py ; ./minimap-dyecmd.sh + cp client/minimap-override/* ../client-data/graphics/minimaps/ + @echo "XML files and minimaps updated, please commit result on client-data." .PHONY: full full: diff --git a/client/minimap-dyecmd.py b/client/minimap-dyecmd.py new file mode 100755 index 0000000..9a396eb --- /dev/null +++ b/client/minimap-dyecmd.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +f=open("minimap-dyecmd.sh", "w"); +CLIENT_DATA_ROOT="../../client-data" + +map_names = sorted([os.path.splitext(p)[0] for p in os.listdir(os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps'))]) + +f.write('cd '+os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps')+'\n') +for c in map_names: + if os.path.exists(os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps', c+u'.png')): + i=c+u'.png' + f.write("dyecmd %s tmp ; mv tmp %s\n" % (i, i)) + f.write("echo \"Converted "+i+" successfully.\"\n") + +f.write("git checkout -- minimap-dyecmd.sh") +f.close() diff --git a/client/minimap-dyecmd.sh b/client/minimap-dyecmd.sh new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/client/minimap-dyecmd.sh diff --git a/client/minimap-override/001-1.png b/client/minimap-override/001-1.png Binary files differnew file mode 100644 index 0000000..541dfe0 --- /dev/null +++ b/client/minimap-override/001-1.png diff --git a/client/minimap-override/001-6.png b/client/minimap-override/001-6.png Binary files differnew file mode 100644 index 0000000..dd43df3 --- /dev/null +++ b/client/minimap-override/001-6.png diff --git a/client/minimap-override/011-3.png b/client/minimap-override/011-3.png Binary files differnew file mode 100644 index 0000000..16adf1b --- /dev/null +++ b/client/minimap-override/011-3.png diff --git a/client/minimap-render.py b/client/minimap-render.py index 57e01d3..716e9e3 100755 --- a/client/minimap-render.py +++ b/client/minimap-render.py @@ -5,7 +5,6 @@ import sys import os import subprocess import tempfile -import re CLIENT_DATA_ROOT = os.path.realpath( os.path.join( @@ -66,7 +65,7 @@ class MinimapRenderer(object): mrf, map_raster = tempfile.mkstemp(suffix='.png') tmxrasterizer_cmd = [ platform_programs.get('tmxrasterizer'), - '--tilesize', str(self.tilesize), '--hide-layer', 'Collision', '--ignore-visibility', + '--tilesize', str(self.tilesize), '--hide-layer', 'Collision','--hide-layer', 'Height','--hide-layer', 'Collisions','--hide-layer', 'collision','--hide-layer', 'height','--hide-layer', 'Heights', '--hide-layer', 'height', '--ignore-visibility', ] if self.useAntiAliasing: tmxrasterizer_cmd.append('--anti-aliasing') @@ -160,7 +159,7 @@ def main(): # Render tiles at 1 pixel size map_renderer = MinimapRenderer(map_name, 1, True) status += map_renderer.render() - return status + return 0 if __name__ == '__main__': sys.exit(main()) |