INNER CODE UNIT · Python
right_edge
McDevon/taxman-engine · Scripts/generate_sprite_sheet.py:137
right_edge = offset_x + size_width
bottom_edge = offset_y + size_height
for y in range(offset_y, bottom_edge):
for x in range(offset_x, right_edge):
output_index = image_start + image_index
if use_alpha:
alpha_value = alphas[x, y] if alphas is not None else 255
output_pixels[output_index % edge,
int(math.floor(output_index / edge))] = (
values[x, y],
alpha_value
)
else:
output_pixels[output_index % edge,
int(math.floor(output_index / edge))] = values[x, y]
image_index += 1
data[file]['start'] = image_start
image_start += size_width * size_height