summaryrefslogtreecommitdiff
path: root/bubbob/binboards.py
diff options
context:
space:
mode:
authorDiego Roversi <diegor@tiscali.it>2019-09-08 22:05:57 +0200
committerDiego Roversi <diegor@tiscali.it>2019-09-08 22:05:57 +0200
commitc23b138ed72d794521b19ff7d8076b32b0b7bf46 (patch)
treec8e82a4ca4da05ba1ad28d4ff64a157bc1eb7952 /bubbob/binboards.py
parent1d9925c287b318ec21343e2682b51ab6a36ae8db (diff)
2to3
Diffstat (limited to 'bubbob/binboards.py')
-rw-r--r--bubbob/binboards.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/bubbob/binboards.py b/bubbob/binboards.py
index af878ff..110d8ed 100644
--- a/bubbob/binboards.py
+++ b/bubbob/binboards.py
@@ -20,7 +20,8 @@ def meancolor(img):
b1 += b
return r1/count, g1/count, b1/count
-def addshadow(img, (r1, g1, b1), depth=8):
+def addshadow(img, xxx_todo_changeme, depth=8):
+ (r1, g1, b1) = xxx_todo_changeme
w = len(img[0])
h = len(img)
pad = depth * [keycol]
@@ -35,7 +36,8 @@ def addshadow(img, (r1, g1, b1), depth=8):
result[1+d+i][w+d] = color
return result
-def addrshadow(img, (r1, g1, b1), depth=8):
+def addrshadow(img, xxx_todo_changeme1, depth=8):
+ (r1, g1, b1) = xxx_todo_changeme1
w = len(img[0])
h = len(img)
pad = depth * [keycol]
@@ -49,17 +51,17 @@ def addrshadow(img, (r1, g1, b1), depth=8):
def load(filename):
- print "Loading %s..." % filename
+ print("Loading %s..." % filename)
Bin = macbinary.MacBinary(filename)
levels = {}
mnstrlist = [Nasty, Monky, Ghosty, Flappy,
Springy, Orcy, Gramy, Blitzy]
- for key, lvl in Bin['LEVL'].items():
+ for key, lvl in list(Bin['LEVL'].items()):
d = lvl.getlevel(mnstrlist)
class BinBoard(boards.Board):
pass
- for key1, value1 in d.items():
+ for key1, value1 in list(d.items()):
setattr(BinBoard, key1, value1)
levels[key] = BinBoard