mirror of
https://github.com/CorsixTH/CorsixTH.git
synced 2025-07-24 04:40:34 +02:00
scripts: add empty lines around class/function definitions
This commit is contained in:
@@ -28,6 +28,7 @@ SOFTWARE.
|
||||
|
||||
from PIL import Image
|
||||
|
||||
|
||||
class Infile:
|
||||
def __init__(self, fname):
|
||||
self.fname = fname
|
||||
@@ -56,6 +57,7 @@ class Infile:
|
||||
data.append(self.getByte())
|
||||
return data
|
||||
|
||||
|
||||
def decode_xy(pix_idx, w, h):
|
||||
y = pix_idx // w
|
||||
x = pix_idx - w * y
|
||||
@@ -63,6 +65,7 @@ def decode_xy(pix_idx, w, h):
|
||||
assert y >= 0 and y < h
|
||||
return x, y
|
||||
|
||||
|
||||
def get_colour(table, idx):
|
||||
if table == 0:
|
||||
return (0, 0, 0, 255)
|
||||
@@ -78,6 +81,7 @@ def get_colour(table, idx):
|
||||
return (idx, 0, idx, 255)
|
||||
assert False
|
||||
|
||||
|
||||
class Sprite:
|
||||
def __init__(self, infile):
|
||||
size = infile.getLong() - 2 - 2 - 2
|
||||
|
Reference in New Issue
Block a user