how to convert triple layered sprites ?

بواسطة norakomi

Paragon (1150)

صورة norakomi

25-03-2023, 11:15

I have about 30 sprites (all 16x16).
They have more than 3 colors per spriteline (7 max).
I want to convert them to triple layered sprites,
but my current sprite converter tool only handles double layered sprites well.

Does anyone have a tool to convert triple layered sprites ?

Login أوregister لوضع تعليقاتك

بواسطة Mafcase

Champion (258)

صورة Mafcase

25-03-2023, 11:42

بواسطة aoineko

Paragon (1133)

صورة aoineko

25-03-2023, 12:42

If you want 3 colors per line and you are aiming at the MSX2 or above, using the OR technique is clearly the best: with only 2 sprites you can have 3 colors per line.

If you are aiming for the MSX1 on the other hand, there is no other choice than to have 3 sprites for 3 colors.

In this case I have a command line tool that could help you: MSXimg.

If your 16x16 sprites are horizontally aligned, here is the command to export the 3 layers:
MSXimg.exe image.png -out dest.h -pos 0 0 -size 16 16 -num 30 1 -mode sprt -l i16 0 0 1 1 0x111111 -l i16 0 0 1 1 0x222222 -l i16 0 0 1 1 0x333333

Where 0x111111, 0x222222 and 0x333333 are your 3 layers color in RGB format.
Input file format can be BMP, JPEG, PCX, PNG, TGA, PSD, GIF, ...
Output format can be C header file, Assembler file, BASIC listing or Binary data.