01-29-2016, 06:09 PM
01-29-2016, 08:04 PM
(01-29-2016, 06:09 PM)puggsoy Wrote: [ -> ]Super curious how Noesis did that, but I can't find the source code anywhere Oh well, glad it's possible anyway!
Really hate that Noesis' source isn't released anywhere; would help out with a lot of projects I have. ;/
01-30-2016, 10:32 PM
(01-30-2016, 08:13 AM)Skyla Doragono Wrote: [ -> ]And... that's it for P4DAN? I mean, a lot of the UI is missing, particularly for the dance screen and all, but I think those .TGA files have movement data built into them as well. Every time I try to open them with... anything, I get error messages. This was particularly prevalent in the transitions images.
But I'm done. If anyone wants to figure those out, they're welcome to it.
Could you chuck a couple of these up? Could be that they just have some stuff tacked onto the top of them.
01-30-2016, 10:52 PM
Here's the entire folder of transitions, because it's been a long day and I can't remember the specific files. I left them in their .bins, but the BMS script extracts them no problem.
01-31-2016, 12:50 AM
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.
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
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
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
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
01-31-2016, 01:51 AM
Wow, cool.
I'll be able to update with the missing files then.
...when I wake up lmao.
I'll be able to update with the missing files then.
...when I wake up lmao.