Crash Nitro Kart .png Files

Textures, recreate headers, conversions, algorithms and parsing of image files
fileGates71
Posts: 18
Joined: Sun Feb 24, 2019 11:45 pm

Crash Nitro Kart .png Files

Post by fileGates71 »

I am trying to extract the .png files that are used during the game's loading screens. However, it keeps coming out partially done, noisy, black, or any combination of the three.

So far, I've used quickBMS with the over_the_hedge.bms script, since it seemed to be the closest solution, but that may be exactly the problem.
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Crash Nitro Kart .png Files

Post by rabatini »

fileGates71 wrote:I am trying to extract the .png files that are used during the game's loading screens. However, it keeps coming out partially done, noisy, black, or any combination of the three.

So far, I've used quickBMS with the over_the_hedge.bms script, since it seemed to be the closest solution, but that may be exactly the problem.


is this the original file? or file extracted after the script?
fileGates71
Posts: 18
Joined: Sun Feb 24, 2019 11:45 pm

Re: Crash Nitro Kart .png Files

Post by fileGates71 »

I used the .bms script on the ASSETS.GOB file and this is the file that came out - nothing else was done. I don't know if maybe since the script wasn't made for CNK, that is why the .pngs are noisy?
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: Crash Nitro Kart .png Files

Post by rabatini »

fileGates71 wrote:I used the .bms script on the ASSETS.GOB file and this is the file that came out - nothing else was done. I don't know if maybe since the script wasn't made for CNK, that is why the .pngs are noisy?


maybe the script, is dumping with a wrong size.
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: Crash Nitro Kart .png Files

Post by BloodRaynare »

After investigating your problem, turns out there's a bit of a problem with the over_the_hedge.bms script:

1. Somehow the script keep putting the "ENBL" mark at the end of the files block (Only for the files that has two or more blocks), corrupting some files (in your case PNG files)
2. With "0" type compression (aka no compression), last 16 bytes of the file is missing. At least with the png files.
3. Small problems with the name length, for this game it should be 72 instead of 104.

EDIT: I made a fix. In the line that says "if TMP == "STBL"", below the "math ZSIZE - 5" line, add this in the over_the_hedge.bms script:

Code: Select all

            if ZIP == '0'
               math ZSIZE - 4
            endif


Also, to made the script extract the files with correct filenames, change the "math NAMESZ = 104" to "math NAMESZ = 72". Then just re-extract all the contents of ASSETS.GFC/.GOB.
fileGates71
Posts: 18
Joined: Sun Feb 24, 2019 11:45 pm

Re: Crash Nitro Kart .png Files

Post by fileGates71 »

Sorry for the extremely late reply, BloodRaynare. It worked like a charm! Thank you so much!