I seem to have a streak of bad luck, as lasyan's Tool Hack7 has been giving me errors and BSoDs. I was able to extract the graphics from "WINDOW.BIN" with it though, but I can't put it back in since it gives me errors and blue screens. So I reinserted it using luksy's program and CDMage.
Anyway, I think I solved this shifting problem!
Tile Molester is primarily used for ROM hacking, not general graphics editing. When Tile Molester loads a file, it makes ALL THE RAW DATA
viewable and EDITABLE.
You see that "TV static" at the top of the image? I believe that is the header and CLUT data. So when I used the flood fill tool, I must of unwittingly altered this data.
What I did to fix this was create an “.ips” file that is supposed to restore headers back to their normal state.
I researched the header info and came across the following resources:http://rveach.romhack.org/PSXInfo/tim.htmlhttp://www.romhacking.net/documents/timgfx.txt
The headers and CLUTs are organized like this:
1.) 1st Header Block
2.) CLUT data
3.) 2nd Image Header Block
The CLUT data is "sandwiched" in-between 2 blocks of header data.
I intend to edit the CLUT at some point, so my ".ips" file should only revert the 1st and 2nd Header Blocks.
I extracted the ".TIM" file from "WINDOW.BIN" using Hack7. Then, I zeroed out portions of the header data in this file. I specifically zeroed out data as such:
The 1st Header Block is 20 bytes, so I zeroed out the first 20 bytes of the file.
Then I had to account for the CLUT. This ".TIM" file has 16 CLUTS, each with 16 colors each, so the CLUT data here is 512 bytes. I identify the 512 bytes after the first 20 bytes, as this is the CLUT data I wish to retain.
Right after the CLUT data is the 2nd Header Image Block, which is 12 bytes. I zero out those 12 bytes, and save this zeroed out file.
Then, I use Lunar IPS to make an ".ips" patch as such:
“ORIGINAL UNMODIFIED” (target): 0ed “.TIM” file.
“NEW MODIFIED” (containing desired changes): Original “.TIM” file.
Here it is: https://www.mediafire.com/?31svwkz7z1ppzbe
I applied it to that corrupted ".TIM" from my initial post. Here is the result: