diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-07-24 22:53:43 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-07-24 22:53:43 +0000 |
| commit | 5bd2c434f63ff4a039e854d647f02ef660c544d1 (patch) | |
| tree | 3fe99b2e4a7cf5e80243bde4583e10c5650ed913 /scripts/dat2c.py | |
| parent | 4b098f7711e7cb96eef6797787e3f2f2b4cbb867 (diff) | |
| download | zcatch-5bd2c434f63ff4a039e854d647f02ef660c544d1.tar.gz zcatch-5bd2c434f63ff4a039e854d647f02ef660c544d1.zip | |
epic commit. removed tga support, removed BGR support. fixed one config for editor, server and client, optimized tilemap rendering (this needs some cleanup), added tools to fix alpha outline quirk and glitches in the tilemap reindering
Diffstat (limited to 'scripts/dat2c.py')
| -rw-r--r-- | scripts/dat2c.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/dat2c.py b/scripts/dat2c.py new file mode 100644 index 00000000..87dfd114 --- /dev/null +++ b/scripts/dat2c.py @@ -0,0 +1,17 @@ +import sys + +data = file(sys.argv[1], "rb").read() + +i = 0 +print "const char", sys.argv[2], "[] = {" +print str(ord(data[0])), +for d in data[1:]: + s = ","+str(ord(d)) + print s, + i += len(s)+1 + + if i >= 70: + print "" + i = 0 +print "" +print "};" |