summaryrefslogtreecommitdiff
path: root/hercules/code/servertoclient/sprites.py
diff options
context:
space:
mode:
Diffstat (limited to 'hercules/code/servertoclient/sprites.py')
-rw-r--r--hercules/code/servertoclient/sprites.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/hercules/code/servertoclient/sprites.py b/hercules/code/servertoclient/sprites.py
index 5dad9d1..4b683bc 100644
--- a/hercules/code/servertoclient/sprites.py
+++ b/hercules/code/servertoclient/sprites.py
@@ -55,7 +55,7 @@ def readIndexedRLEImage(f, spr):
while readCnt < compressSize:
c = readInt8(f)
readCnt = readCnt + 1
- data[idx] = c;
+ data[idx] = c
#print "{0:4}: {1}".format(idx, c)
idx = idx + 1
if c == 0:
@@ -132,7 +132,7 @@ def decodeSprite(spr):
# png.save("test{0}.png".format(imageN))
if alpha:
- print "detected alpha"
+ print("detected alpha")
for imageN in range(0, spr.rgbaSpritesCount):
image = spr.images[imageN + spr.indexedSpritesCount]
@@ -206,7 +206,7 @@ def saveSpriteImage(act, spr, spriteDir, spriteName):
continue
if frame.frameIndex not in spr.images:
- print "wrong frame index: {0}".format(frame.frameIndex)
+ print("wrong frame index: {0}".format(frame.frameIndex))
continue
image = spr.images[frame.frameIndex]
png = Image.new('RGBA', (image.width, image.height))
@@ -326,7 +326,7 @@ def readAct(actFile):
act.minorVersion = readInt8(f)
act.majorVersion = readInt8(f)
act.nanimations = readInt16(f)
- print "{0}, {1}.{2}, {3}".format(actFile, act.majorVersion, act.minorVersion, act.nanimations)
+ print("{0}, {1}.{2}, {3}".format(actFile, act.majorVersion, act.minorVersion, act.nanimations))
#print " animations: " + str(act.nanimations)
act.animations = dict()
skipData(f, 10)
@@ -391,7 +391,7 @@ def readAct(actFile):
act.events = dict()
for eventN in range(0, act.nevents):
event = ActEventClass()
- act.events[eventN] = event;
+ act.events[eventN] = event
event.name = readData(f, 40)
if act.majorVersion > 2 or (act.majorVersion == 2 and act.minorVersion >= 2):
for animN in range(0, act.nanimations):
@@ -413,7 +413,7 @@ def readSpr(sprFile):
spr.rgbaSpritesCount = readInt16(f)
else:
spr.rgbaSpritesCount = 0
- print "{0}, {1}.{2}, {3}, {4}".format(sprFile, spr.majorVersion, spr.minorVersion, spr.indexedSpritesCount, spr.rgbaSpritesCount)
+ print("{0}, {1}.{2}, {3}, {4}".format(sprFile, spr.majorVersion, spr.minorVersion, spr.indexedSpritesCount, spr.rgbaSpritesCount))
spr.frames = spr.indexedSpritesCount + spr.rgbaSpritesCount
if spr.majorVersion > 2 or (spr.majorVersion == 2 and spr.minorVersion >= 1):
@@ -455,13 +455,13 @@ def convertSpritesNonFree(idtofile):
for spriteid in idtofile:
spriteName = idtofile[spriteid]
if spriteName in processed:
- print "skipping " + spriteName
+ print("skipping " + spriteName)
continue
path = findSpritePath(spriteName)
if path is None:
- print "not found " + spriteName
+ print("not found " + spriteName)
continue
- print spriteName
+ print(spriteName)
convertSprite(path, spriteName)
processed.append(spriteName)