screen2sprite converter [python]

edited February 2019 in Development
written on python3
https://github.com/qboneteam/scr2spr

coordinates and sizes sets in char

usage:

'-x', '--x', default=0, type=int

'-y', '--y', default=0, type=int

'-wide', '--width', type=int

'-high', '--height', type=int

'-c', '--count', default=1, type=int

'-col', '--color', default=False, type=bool

'-i', '--input', type=str

'-o', '--output', default='sprite.bin', type=str
Post edited by 71m05h1k on
https://github.com/qboneteam/scr2spr - python converter from ZX-Spectrum screen to sprite!

Comments

  • Crisis wrote: »
    Hi,
    I am not used to py, can you make a little example line how to use it?
    my first attempt gave crashed/everbussy terminal
    Pushed new version!!! Some bug fixed!
    Example:
    K3vBQy7.png

    If you wanna take B/W sprite from "FEUD":
    scr2spr.py -i "example.scr" -x 6 -y 0 -high 4 -wide 3 -c 23

    If you wanna take colors sprite from "SAVAGE"(crazy colored by me):
    scr2spr.py -i "example.scr" -x 16 -y 10 -high 4 -wide 4 -c 7 -col True
    https://github.com/qboneteam/scr2spr - python converter from ZX-Spectrum screen to sprite!
  • Crisis wrote: »
    Thanks
    i gone give it a try to night!!
    What about tools?
    https://github.com/qboneteam/scr2spr - python converter from ZX-Spectrum screen to sprite!
  • just try:

    python3 scr2spr.py ....some keys.....
    https://github.com/qboneteam/scr2spr - python converter from ZX-Spectrum screen to sprite!
  • maybe complaints are related with the program looking into python2 due to python environment variables.
    your linux may need python2 so a solution could be run this program from within thonny.org ide (and built-in python3) which takes care of path conflicts.
  • Crisis wrote: »
    but i got a serious remark now
    ch@linux-6n36:~/Desktop/some-zx/scr2spr-master> python3 scr2spr.py -i "yathzee_kiers.scr" -x 16 -y 10 -high 4 -wide 4 -c 7 -col True File "scr2spr.py", line 7
    __version__: str = "20190209"
    ^
    SyntaxError: invalid syntax
    Hm.... its not serios remark. Comment line 7 in any text editor.


    ybWnoEQl.png
    https://github.com/qboneteam/scr2spr - python converter from ZX-Spectrum screen to sprite!
  • edited February 2019
    You can put this .bin file into your assebmler program with the incbin directive, it contains only raw sprite bytes line by line and color attribute bytes after the sprite bitmap bytes, it contain no dimensions info. You have to interpet this bytes by your own program, write a sprite printing subroutine, it must use prior information of your sprites dimensions.
    Post edited by 71m05h1k on
    https://github.com/qboneteam/scr2spr - python converter from ZX-Spectrum screen to sprite!
Sign In or Register to comment.