INNER CODE UNIT · Python
last_x
McDevon/taxman-engine · Scripts/generate_sprite_sheet.py:78
last_x = x + 1
if y + 1 > last_y:
last_y = y + 1
if 0 < value < 255 and not full_transparent:
out_has_shades = True
size_width = last_x - offset_x
size_height = last_y - offset_y
return (width, height, offset_x, offset_y, size_width, size_height, out_has_alpha, out_has_shades)
def generate_sprite_sheet(directory, output_path):
print('generate ' + directory)
output_name = os.path.basename(directory)
files = sorted(list_png_files(directory))