2013-11-17, 01:53 PM
(This post was last modified: 2013-11-17, 05:29 PM by StolenBattenberg.)
Thanks dude, I used the last 16 bytes before the .FSTim/.KFTim image data to work it out, like so...
I used a few loops, quiet a few loops unfortunately, which has made the code a little slow... I could if I wanted use repeat loops, which inside game maker are a lot faster to work with.
(for loop = 150 - 200FPS, repeat loop = 400 - 450 FPS)...
For an example, for me it takes 30 Seconds to rip all the .KF/FSTims from the RTIM.T archive.
It does, how ever rip all BPP and sizes, which means it should work on any KF/FSTim in shadow tower too... I'm gonna have a look at the PS2 games tonight and see what sorta files they have on em.
By the way... Does the USA version of King's Field have any differences from the European version in the way it structures .KF/FSTims?
EDIT: 0.2 Development build now available in the top post, as well as an explanation on the difference on development and release.
Code:
if(checkByte1 = checkByte4) (I read an int for both of these, so it took the entire 4 bytes.) This is that junk data which is on the 4th row...
{
 if(checkByte2 = checkByte5) (These were both shorts ) //Compares the first width value, and tries to compare it with the second...
 {
  if(checkByte3 = checkByte6) (These were both shorts too) //Compares the first height value, and tries to compare it with the second.
  {
   if(checkbyte1 != 0 ... ... ... ) //it checks if all the bytes don't = 0, this stops it seeing the 'padding' bytes as FS/KFTims in the archives... This part isn't needed, but stops junk files...
   {
    //Sets file start: File position - 64
    //sets the file End: fileStart + ((width*4)*height)/2
    //SLOW RIPPING CODE!
   }
  }
 }
}
I used a few loops, quiet a few loops unfortunately, which has made the code a little slow... I could if I wanted use repeat loops, which inside game maker are a lot faster to work with.
(for loop = 150 - 200FPS, repeat loop = 400 - 450 FPS)...
For an example, for me it takes 30 Seconds to rip all the .KF/FSTims from the RTIM.T archive.
It does, how ever rip all BPP and sizes, which means it should work on any KF/FSTim in shadow tower too... I'm gonna have a look at the PS2 games tonight and see what sorta files they have on em.
By the way... Does the USA version of King's Field have any differences from the European version in the way it structures .KF/FSTims?
EDIT: 0.2 Development build now available in the top post, as well as an explanation on the difference on development and release.