Users browsing this thread: 1 Guest(s)
TMX File Issue
#35
The ones that aren't working seem to be in 4bpp instead of 8bpp. The only difference other than that is that they have a weird footer at the end. I don't know why either of these would affect the ability of files opening them, maybe 4bpp just isn't a standard .tga format?

I made a GFXtract script that almost works, but there are some weirdo ones like spot.tga that seem to have some other issues. I'll try and figure those out.

EDIT: Turns out it was just 24-bit instead of 32, which also cleared up what one of the values in the header was.

Code:
# Persona 4: Dancing All Night .tga
#
# Written by puggsoy
# GFXtract Script (https://github.com/puggsoy/GFXtract/releases)

goto 0x5
get PALLEN short
get BPC short
getdstring DUMMY 3

get WIDTH short
get HEIGHT short
get BPP short
savepos PAL

if BPC == 32
    math PALLEN *= 4
    setformat BPP BGRA 1 BPC PAL
elif BPC == 24
    math PALLEN *= 3
    setformat BPP BGR 1 BPC PAL
else
    print 'unknown BPC!'
    exit
endif

goto PALLEN cur
read IMG WIDTH HEIGHT
flip IMG 1
savepng IMG

Managed to convert all the .tgas you sent, but somehow it also manages to convert Yukiko correctly as well?? I don't even know how my own program works Blank

EDIT2: Derp, I know why I couldn't figure it out before. I assumed that the value before the palette (which I now know to be the bpp) was a byte, instead of a short, so I thought the palette started one byte earlier than it actually did. I guess that's what I get for trying to figure it out at 3am.

Glad that mystery's solved Smile
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply


Messages In This Thread
TMX File Issue - by Skyla Doragono - 01-27-2016, 10:02 PM
RE: .BIN file extract - by puggsoy - 01-28-2016, 12:05 AM
RE: TMX File Issue - by Skyla Doragono - 01-28-2016, 12:13 AM
RE: TMX File Issue - by puggsoy - 01-28-2016, 12:22 AM
RE: TMX File Issue - by Skyla Doragono - 01-28-2016, 12:26 AM
RE: TMX File Issue - by puggsoy - 01-28-2016, 12:46 AM
RE: TMX File Issue - by Skyla Doragono - 01-28-2016, 12:54 AM
RE: TMX File Issue - by puggsoy - 01-28-2016, 04:34 AM
RE: TMX File Issue - by Skyla Doragono - 01-28-2016, 05:05 AM
RE: TMX File Issue - by puggsoy - 01-28-2016, 05:10 AM
RE: TMX File Issue - by Skyla Doragono - 01-28-2016, 05:34 AM
RE: TMX File Issue - by Struggleton! - 01-28-2016, 06:34 AM
RE: TMX File Issue - by einstein95 - 01-28-2016, 10:05 AM
RE: TMX File Issue - by puggsoy - 01-28-2016, 10:48 AM
RE: TMX File Issue - by Skyla Doragono - 01-28-2016, 01:08 PM
RE: TMX File Issue - by Dazz - 01-28-2016, 11:32 AM
RE: TMX File Issue - by puggsoy - 01-28-2016, 10:17 PM
RE: TMX File Issue - by Skyla Doragono - 01-28-2016, 10:24 PM
RE: TMX File Issue - by ShrineFox - 01-28-2016, 10:31 PM
RE: TMX File Issue - by puggsoy - 01-28-2016, 10:58 PM
RE: TMX File Issue - by Ehm - 01-28-2016, 11:21 PM
RE: TMX File Issue - by puggsoy - 01-29-2016, 01:46 AM
RE: TMX File Issue - by Ehm - 01-29-2016, 01:55 AM
RE: TMX File Issue - by Skyla Doragono - 01-29-2016, 09:15 AM
RE: TMX File Issue - by puggsoy - 01-29-2016, 09:29 AM
RE: TMX File Issue - by Skyla Doragono - 01-29-2016, 09:40 AM
RE: TMX File Issue - by puggsoy - 01-29-2016, 10:19 AM
RE: TMX File Issue - by Skyla Doragono - 01-29-2016, 10:33 AM
RE: TMX File Issue - by Struggleton! - 01-29-2016, 01:00 PM
RE: TMX File Issue - by Skyla Doragono - 01-29-2016, 03:38 PM
RE: TMX File Issue - by puggsoy - 01-29-2016, 06:09 PM
RE: TMX File Issue - by Struggleton! - 01-29-2016, 08:04 PM
RE: TMX File Issue - by puggsoy - 01-30-2016, 10:32 PM
RE: TMX File Issue - by Skyla Doragono - 01-30-2016, 10:52 PM
RE: TMX File Issue - by puggsoy - 01-31-2016, 12:50 AM
RE: TMX File Issue - by Skyla Doragono - 01-31-2016, 01:51 AM

Forum Jump: