(05-06-2020, 06:43 AM)Deathbringer Wrote: Might I ask how you did this and would the technique work on Star Ocean 2?
The idea is just like how you would do it manually.
To reassemble a sprite, using Photoshop:
1) Create a blank canvas.
2) Open the spritesheet with parts.
3) Select "Rectangle Select" tool and hightlight a part. Right click -> Copy.
4) Paste the part onto the blank canvas at the right position.
The script is actually doing the same thing:
1) canvas = new image;
2) source = image.open(filename.png);
3) part = source.copy(sx, sy, w, h);
4) canvas.draw(part, dx, dy)
Right off the bat you'll have six numbers to look for: sx, sy, w, h, dx and dy. So you just look around the data files for the numbers.
Repeat step 3 and 4 until the whole sprite is complete.
To reassemble a sprite, you'll draw the parts _ON TOP_ each other.
To reassemble a map, you'll draw the parts _NEXT TO_ each other.
Beside the six numbers, you'll also encounter other stuff. Like a flag byte for vertical/horizontal flipping, a byte on rotation, palette ID, sheet ID, alpha blending byte, pointers, etc... You can experiment with them later on and figure out what do each byte do.
Then you just write a script to automate the whole thing. I included a copy of the script inside the archive, and uploaded the whole thing here:
https://github.com/rufaswan/Web2D_Games/...s/psxtools
In the end, a game is just a program. You can treat Game.exe as just a DataFileReader.exe, because the assemble instructions are inside DataFile.bin. You just need to find it.
The truth is out there. Somewhere.
Cheers,
- Rufas