LEGO Island .wdb files

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
luna rom
Posts: 18
Joined: Wed Nov 11, 2015 2:01 am

LEGO Island .wdb files

Post by luna rom »

Forgive me if I did wrong but i'm looking a extrracting a .wdb file i've reasearch it enough to know photoshop .gif files are contian in there (i know through this link http://videogameflashback.com/legoisland/interview.php) anyways seeming can't get the files out.
world.wdb.zip
Xiron
Posts: 104
Joined: Sat Sep 12, 2015 7:09 am

Re: LEGO Island .wdb files

Post by Xiron »

I see that the file has ".gif" extensions in it. This makes me wonder if they are actually in there or just referenced, as I don't see any other extensions, strange.

There also seems to be a lot of "LegoEntityPresenter" also present in the file as well as a lot references/labels (other files?).
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Island .wdb files

Post by aluigi »

It's possible that those gif there are just raw 8bit images.
Try this script to dump them:

Code: Select all

for
    findloc OFFSET string ".GIF"
    do
        math OFFSET - 1
        goto OFFSET
        get TMP byte
    while TMP != 0
    goto -4 0 SEEK_CUR

    get NAMESZ long
    getdstring NAME NAMESZ
    get X long
    get Y long
    get Z long
    if Y u< 0x1000
        getdstring DUMMY 0x33
        savepos OFFSET
        xmath SIZE "X * Y"
        set BASE basename NAME
        set EXT  extension NAME
        string NAME p "%s_%dx%d.%s" BASE X Y EXT
        log NAME OFFSET SIZE
        math OFFSET + SIZE
        goto OFFSET
    endif
next
luna rom
Posts: 18
Joined: Wed Nov 11, 2015 2:01 am

Re: LEGO Island .wdb files

Post by luna rom »

I'll try that though from my trys to rip gifs with a hex editor from what i've seen that there header i belive (though i'm not much of a hacker) by the refrece to the name or they are compressed
Xiron
Posts: 104
Joined: Sat Sep 12, 2015 7:09 am

Re: LEGO Island .wdb files

Post by Xiron »

Well, we certainly got SOMETHING from that. No idea what, they doesn't look very image-y (or gif-y) to me when comparing it to a standard .gif image. Then again comparison is all I've really got because I'm not an image expert. :P
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Island .wdb files

Post by aluigi »

Xiron
Posts: 104
Joined: Sat Sep 12, 2015 7:09 am

Re: LEGO Island .wdb files

Post by Xiron »

Awesome, thanks!
It's too bad, I can view the images in my explorer.exe with SageThumbs, but I can't open them with windows photo gallery or Paint.NET.
Thankfully, I can mass-covert them with SageThumbs so I can use them. :P
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Island .wdb files

Post by aluigi »

I guess that problem is caused by the negative X and Y that some programs may not handle correctly.
If you want to know the tech stuff behind my choice search the following on google: bitmap upside down

It's possible to make them compatible but it requires some work.