Users browsing this thread: 2 Guest(s)
Puzzle & Dragons (Mobile)
#14
They seem to work fine for me. However I did fix it up a bit to handle the different possible file extensions in any of the files. E.g. it handles .wav files in DATA001.BIN now, in the other version WAVs were only present in DATA003.BIN and it assumed that. It also handles .btex or whatever else in DATA003.BIN, even though they're not there they might be in future versions.

Code:
goto 0x20
getdstring FILE1 0x10
getdstring FILE2 0x10
getdstring FILE3 0x10

open FDSE FILE1 1
#open FDSE FILE2 2
open FDSE FILE3 3
open FDSE "DATA000.NAM" 4
savepos POS
set NMPOS POS
math NMPOS -= 0x50
get FSIZE asize 4

for NMPOS = NMPOS < FSIZE
    get v1 short
    get NUM short
    math NUM += 1
    get SIZE long
    get OFFSET long
    get DUMMY long
    
    goto NMPOS 4
    getct NM string 0x2E 4
    
    if v1 == 0x8000
        if NUM == 1
            set NAME FILE1
            string NAME -= 4
            string NAME += "/"
            string NAME += NM
            
            goto OFFSET 1
            getdstring EXT 4 1
            
            if EXT == "TEX1"
                string NAME += ".btex"
            elif EXT == "BFNT"
                string NAME += ".bfnt"
            elif EXT == "DMSG"
                string NAME += ".bin"
            elif EXT == "RIFF"
                string NAME += ".wav"
            else
                string NAME += ".unk"
            endif
            
            log NAME OFFSET SIZE 1
        /*elif NUM == 2
            set NAME FILE2
            string NAME -= 4
            string NAME += "/"
            string NAME += NM
            
            goto OFFSET 2
            getdstring EXT 4 2
            
            if EXT == "TEX1"
                string NAME += ".btex"
            elif EXT == "BFNT"
                string NAME += ".bfnt"
            elif EXT == "DMSG"
                string NAME += ".bin"
            elif EXT == "RIFF"
                string NAME += ".wav"
            else
                string NAME += ".unk"
            endif
            
            log NAME OFFSET SIZE 2*/
        elif NUM == 3
            set NAME FILE3
            string NAME -= 4
            string NAME += "/"
            string NAME += NM
            
            goto OFFSET 3
            getdstring EXT 4 3
            
            if EXT == "TEX1"
                string NAME += ".btex"
            elif EXT == "BFNT"
                string NAME += ".bfnt"
            elif EXT == "DMSG"
                string NAME += ".bin"
            elif EXT == "RIFF"
                string NAME += ".wav"
            else
                string NAME += ".unk"
            endif
            
            log NAME OFFSET SIZE 3
        endif
    endif
    
    savepos POS
    math NMPOS = POS
    math NMPOS -= 0x50
next

It's mostly the same though. Make sure you're running it on DATA000.BIN specifically, not the whole folder all the files are in.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: jkid101094


Messages In This Thread
Puzzle & Dragons (Mobile) - by jkid101094 - 08-08-2015, 07:42 PM
RE: Puzzle & Dragons (Mobile) - by puggsoy - 08-09-2015, 05:07 AM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 08-09-2015, 01:07 PM
RE: Puzzle & Dragons (Mobile) - by Daxar - 08-09-2015, 03:56 PM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 08-09-2015, 04:54 PM
RE: Puzzle & Dragons (Mobile) - by puggsoy - 08-09-2015, 06:20 PM
RE: Puzzle & Dragons (Mobile) - by Daxar - 08-09-2015, 09:51 PM
RE: Puzzle & Dragons (Mobile) - by puggsoy - 08-09-2015, 11:35 PM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 08-10-2015, 12:54 PM
RE: Puzzle & Dragons (Mobile) - by Daxar - 08-10-2015, 06:31 PM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 08-10-2015, 08:02 PM
RE: Puzzle & Dragons (Mobile) - by puggsoy - 08-11-2015, 12:26 AM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 08-11-2015, 12:46 AM
RE: Puzzle & Dragons (Mobile) - by puggsoy - 08-11-2015, 01:49 AM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 08-11-2015, 04:32 PM
RE: Puzzle & Dragons (Mobile) - by puggsoy - 08-11-2015, 08:21 PM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 08-11-2015, 08:25 PM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 08-12-2015, 10:39 PM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 08-14-2015, 05:05 PM
RE: Puzzle & Dragons (Mobile) - by Solarkilelr13 - 10-08-2015, 10:02 AM
RE: Puzzle &amp; Dragons (Mobile) - by jkid101094 - 10-09-2015, 01:38 AM
RE: Puzzle &amp; Dragons (Mobile) - by puggsoy - 10-09-2015, 02:06 AM
RE: Puzzle & Dragons (Mobile) - by codywatts - 01-12-2016, 01:23 AM
RE: Puzzle &amp; Dragons (Mobile) - by jkid101094 - 01-12-2016, 11:24 AM
RE: Puzzle & Dragons (Mobile) - by codywatts - 01-13-2016, 04:23 AM
RE: Puzzle & Dragons (Mobile) - by einstein95 - 01-14-2016, 08:36 AM
RE: Puzzle & Dragons (Mobile) - by codywatts - 01-24-2016, 07:22 PM
RE: Puzzle & Dragons (Mobile) - by Dazz - 01-25-2016, 03:13 AM
RE: Puzzle &amp; Dragons (Mobile) - by jkid101094 - 01-28-2016, 07:18 PM
RE: Puzzle & Dragons (Mobile) - by codywatts - 02-03-2016, 11:34 PM
RE: Puzzle & Dragons (Mobile) - by Dazz - 02-04-2016, 05:43 AM
RE: Puzzle & Dragons (Mobile) - by einstein95 - 02-04-2016, 11:40 PM
RE: Puzzle & Dragons (Mobile) - by codywatts - 02-06-2016, 03:41 PM
RE: Puzzle & Dragons (Mobile) - by einstein95 - 02-06-2016, 11:13 PM
RE: Puzzle & Dragons (Mobile) - by codywatts - 02-09-2016, 01:48 AM
RE: Puzzle & Dragons (Mobile) - by einstein95 - 02-20-2016, 01:42 PM
RE: Puzzle & Dragons (Mobile) - by codywatts - 02-23-2016, 09:58 PM
RE: Puzzle & Dragons (Mobile) - by moo_we_all_do - 12-05-2016, 07:44 PM
RE: Puzzle & Dragons (Mobile) - by jkid101094 - 02-03-2017, 04:16 AM

Forum Jump: