Skip to content

Commit 8c057b2

Browse files
committed
fix map compilation under linux
1 parent eafbf54 commit 8c057b2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pymapconv.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,15 +493,15 @@ def ReadTile(xpos, ypos, sourcebuf): # xpos and ypos aremultiples of 32
493493
sourceoffset += 524288 / (1 << (i * 2))
494494
return outtile
495495

496-
minimapfilename = os.path.join('temp', 'mini.tiff')
496+
minimapfilename = os.path.join('temp', 'mini.png')
497497
print 'Creating minimap', minimapfilename,'using the command:',
498498
if myargs.minimap:
499499
minimapfilename = myargs.minimap
500500
else:
501501
mini = intex.resize((1024, 1024), Image.ANTIALIAS)
502502
mini.save(minimapfilename)
503503
if myargs.linux:
504-
cmd = 'convert -format dds -define dds:mipmaps=9 -define dds:compression=dxt1 %s temp/mini.dds' % (
504+
cmd = 'convert -format dds -define dds:mipmaps=8 -define dds:compression=dxt1 %s temp/mini.dds' % (
505505
minimapfilename)
506506
print cmd
507507
os.system(cmd)
@@ -791,7 +791,8 @@ def __init__(self, filename):
791791
tilefilename = unpack_null_terminated_string(self.smffile, tileoffset)
792792
tileoffset += len(tilefilename) + 1 # cause of null terminator
793793
self.tilefiles.append(
794-
[tilefilename, numtilesinfile, open(filename.rpartition('\\')[0] + '\\' + tilefilename, 'rb').read()])
794+
#[tilefilename, numtilesinfile, open(filename.rpartition('\\')[0] + '\\' + tilefilename, 'rb').read()])
795+
[tilefilename, numtilesinfile, open(tilefilename, 'rb').read()])
795796
print tilefilename, 'has', numtilesinfile, 'tiles'
796797
self.tileindices = struct.unpack_from('< %ii' % ((self.mapx / 4) * (self.mapy / 4)), self.smffile, tileoffset)
797798

0 commit comments

Comments
 (0)