diff options
author | yenatch <yenatch@gmail.com> | 2014-06-15 16:26:10 -0700 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2014-06-15 16:27:46 -0700 |
commit | 007151b05a7c0e0e6f70f6f008aa1b6536992f78 (patch) | |
tree | 40021ed571645eab6803cef960916e0efafaa3d1 /pokemontools/gfx.py | |
parent | 10fb7465e407111d9b191a00518f064a04f93a6f (diff) |
gfx: Let .wxh filename arguments exceed 9.
Nothing needs this yet, but chances are it'll happen.
Diffstat (limited to 'pokemontools/gfx.py')
-rw-r--r-- | pokemontools/gfx.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pokemontools/gfx.py b/pokemontools/gfx.py index 2098d59..bfd6745 100644 --- a/pokemontools/gfx.py +++ b/pokemontools/gfx.py @@ -1103,10 +1103,6 @@ def read_filename_arguments(filename): arg = int_args.get(arg, False) if arg: parsed_arguments[arg] = int(param) - elif len(argument) == 3: - w, x, h = argument[:3] - if w.isdigit() and h.isdigit() and x == 'x': - parsed_arguments['pic_dimensions'] = (int(w), int(h)) elif argument == 'interleave': parsed_arguments['interleave'] = True elif argument == 'norepeat': @@ -1114,6 +1110,11 @@ def read_filename_arguments(filename): elif argument == 'arrange': parsed_arguments['norepeat'] = True parsed_arguments['tilemap'] = True + elif 'x' in argument: + w, h = argument.split('x') + if w.isdigit() and h.isdigit(): + parsed_arguments['pic_dimensions'] = (int(w), int(h)) + return parsed_arguments |