Kawa-oneechan / SCICompanion

SCI Companion - an editor for Sierra SCI games, altered.
18 stars 7 forks source link

add JASC-PAL support when importing palettes #24

Closed clarkjoe closed 8 months ago

clarkjoe commented 8 months ago

Overview

Add JASC-PAL support when importing palettes.

Currently, only RIFF-PAL palettes are supported. These are binary files and difficult for human reading. JASC-PAL are palette files that are human readable.

They have the following format according to this source:

This file works like this: The PAL file is a text file, so NO binary data. The first line of data contains the text JASC-PAL. The second line contains the text 0100--can skip over. The third line contains a number. This is the number of colors in the palette, most likely 256 colors. After that, there are lines of text, containing 3 numbers per line, with spaces between them. These numbers are respectively the Red, Green and Blue values (the so-called RGB palette). For example, the color white would be '255 255 255' and black '0 0 0' (255 is the most bright, 0 the less bright)

clarkjoe commented 8 months ago

What is the PSP8 file extension? .psp8 or .psp? I think .psp file extension would suffice.

clarkjoe commented 8 months ago

Added .psp to the list. Should be good to merge now.

Kawa-oneechan commented 8 months ago

The extension for PSP palettes is PspPalette, sorry if that wasn't clear.

Besides, PSP gas lot of bespoke file formats and having just Psp for an extension would make it hard to tell an image from a palette.

clarkjoe commented 8 months ago

Sounds good. Just updated with PspPalette as the file extension.