How do I fix inverted colors on TGA sprites?

I've been trying to get this one particular image to show up at the start of a game that I'm trying to port over to the Saturn. I just do what I always do for sprites which is lowering their resolution to 240x240 then exporting them as a .tga on GIMP. Normally this works with lower res versions of the image, but not this one that was ripped from the original Playstation disc. When I compile it in Jo Engine and run it, the colors are inverted. Which, admittedly looks pretty cool, but isn't my goal. Can anyone help me and explain what I'm doing wrong? That would be much appreciated. It has also occurred to me that this may have something to do with the formatting of PSX textures or the program that I used to extract them from the game. Which means if someone can help me with this, it may also apply to other ripped textures as well.
KNMoriginal.png
 
Last edited:
jo engine only supports RGB sprites or 256 color indexed RGB sprites (both in a TGA format). It sounds like you might be using one (or the other) and using the wrong image loader, or you are not setting up the palette in the case of 256 color indexed RGB.

Basically, if you use the right loader and have the palette set up, there's no "inversion" happening. Most likely the sprite format you are using doesn't match the sprite format expected by the jo engine loader you are using.
 
Johannes recommends IrfanView: 8bit Demo Questions · Issue #57 · johannes-fetz/joengine

I recall having issues with GIMP converting to TGA but IrfanView worked. Assuming you are using 24-bit images: TGA, no compression, export bottom left. I believe that should work.
From another thread. I believe that should work. Run file on your images to make sure they are sane:

Code:
/joengine/Samples/demo - 3D/cd$ file *.TGA
BOX.TGA: Targa image data - RGB 64 x 64 x 24
FLR.TGA: Targa image data - RGB 128 x 128 x 24
G.TGA:   Targa image data - RGB 64 x 64 x 24

Notably the color depth.
 
Last edited:
Back
Top