Skip to content

Commit

Permalink
chore: drop unused func
Browse files Browse the repository at this point in the history
  • Loading branch information
jgabaut committed Feb 1, 2025
1 parent 4c8fb64 commit 22791ac
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions s4c/core/sheet_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import os
from PIL import Image
from .utils import convert_mode_lit
from .utils import print_animation_header
from .utils import print_heading
from .utils import print_impl_ending
from .utils import get_converted_char
Expand Down Expand Up @@ -71,31 +70,6 @@ def usage():
print("\n mode:\n\t s4c-file\n\t C-header\n\t C-impl")
sys.exit(1)

def print_sprites(mode, sprites, target_name):
"""! Prints the wanted mode output for passed sprites array."""
if mode == "s4c" :
print(f"{FILE_VERSION}")
elif mode == "header":
print_animation_header(target_name, FILE_VERSION)
#print(f"extern char {target_name}[{len(sprites)+1}][{sprite_h+1}][{sprite_w+1}];")
print(f"extern char {target_name}[{len(sprites)+1}][MAXROWS][MAXCOLS];")
print("\n#endif")
return
elif mode == "cfile":
print(f"#include \"{target_name}.h\"\n")

#print(f"char {target_name}[{len(sprites)+1}][{sprite_h+1}][{sprite_w+1}] = ", "{\n")
print("char {target_name}[{len(sprites)+1}][MAXROWS][MAXCOLS] = ", "{\n")
for i, sprite in enumerate(sprites):
print(f"\t//Sprite {i+1}, index {i}")
print("\t{")
for row in sprite:
print("\t\t\"" + row + "\",")
print("\t}," + "\n")
print("};")
return


def parse_sprite(sprite, rgb_palette, char_map):
"""! Parse sprite using the palette and charmap, returns char array."""
chars = []
Expand Down Expand Up @@ -167,7 +141,6 @@ def convert_spritesheet(mode, filename, s: SheetArgs, *args):
target_sprites.append([chars, sprite.size[0], sprite.size[1],
rgb_palette, len(rgb_palette)])

#print_sprites(mode, sprites, target_name)
if len(args) == 0:
if print_heading(mode, target_name, FILE_VERSION, (len(target_sprites),
target_sprites[0][4]), ("NONE",)):
Expand Down

0 comments on commit 22791ac

Please sign in to comment.