[PC] Freedom Fighters - Textures .TEX

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Joao13_BR
Posts: 38
Joined: Sat Jan 13, 2018 7:58 pm

[PC] Freedom Fighters - Textures .TEX

Post by Joao13_BR »

Would it be possible to script the extraction of the textures in this file .tex?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [PC] Freedom Fighters - Textures .TEX

Post by aluigi »

I can help with the extraction of the raw data but someone else has to work on the fields for building a valid image (it's probably very trivial):

Code: Select all

get DATA_SIZE long
get DATA_SIZE2 long
get DUMMY long  # 3
get DUMMY long  # 4
for
    savepos OFFSET
    if OFFSET u>= DATA_SIZE
        break
    endif
    get SIZE long
    getdstring INFO 8
    get DUMMY long
    get DUMMY long
    get DUMMY long
    get DUMMY long
    get DUMMY long
    get DUMMY long
    get NAME string
    get DUMMY long
    savepos TMP
    xmath SIZE "SIZE - (TMP - OFFSET)"
    savepos OFFSET
    log NAME OFFSET SIZE
    goto SIZE 0 SEEK_CUR
next
Joao13_BR
Posts: 38
Joined: Sat Jan 13, 2018 7:58 pm

Re: [PC] Freedom Fighters - Textures .TEX

Post by Joao13_BR »

aluigi wrote:I can help with the extraction of the raw data but someone else has to work on the fields for building a valid image (it's probably very trivial):

Code: Select all

get DATA_SIZE long
get DATA_SIZE2 long
get DUMMY long  # 3
get DUMMY long  # 4
for
    savepos OFFSET
    if OFFSET u>= DATA_SIZE
        break
    endif
    get SIZE long
    getdstring INFO 8
    get DUMMY long
    get DUMMY long
    get DUMMY long
    get DUMMY long
    get DUMMY long
    get DUMMY long
    get NAME string
    get DUMMY long
    savepos TMP
    xmath SIZE "SIZE - (TMP - OFFSET)"
    savepos OFFSET
    log NAME OFFSET SIZE
    goto SIZE 0 SEEK_CUR
next


Thanks aluigi!!