how to convert triple layered sprites ?

By norakomi

Paragon (1141)

norakomi's picture

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 or register to post comments

By Mafcase

Champion (258)

Mafcase's picture

25-03-2023, 11:42

By aoineko

Paladin (1004)

aoineko's picture

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.