ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Thu Jun 24, 2021 6:34 pm

All times are UTC




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Apr 19, 2021 9:25 am 

Joined: Sun May 24, 2020 9:16 pm
Posts: 24
So. I finaly figured out in this

PC textures DDS DXT3-DXT5
Header 0x30(hex)
with Widht and Height
some flags about format(DXT3-DXT5)

PS2 textures raw 8bpp some 4bpp without swizzle
Header 0x40(hex)
with Widht and Height
some flags about format(4bpp-8bpp)

XBOX textures need test ii
But i sure there is raw 8bpp some 4bpp with Morton swizzle


aluigi scripts Drakan.bms https://aluigi.altervista.org/bms/drakan.bms perfectly works to extract/reimport all textures in .TDU

but i fix it for suffering game

there is fix

Code:
# Drakan
#
# The archive uses lot of compressed data in each file,
# so the script tries to dump directly the decompressed
# data instead of the file "as-is"

math DUMP_ORIGINAL_FILES = 0

comtype zlib_noerror

idstring "SRSC"
get DUMMY byte
get DUMMY byte
get OFFSET long
get FILES short

goto OFFSET
for i = 0 < FILES
    get TYPE byte
    get TYPE2 byte
    get DUMMY long
    get OFFSET long
    get SIZE long

    if DUMP_ORIGINAL_FILES != 0
        log "" OFFSET SIZE
    else
        math SKIP_BYTES = 0
        if TYPE == 0x40
            math SKIP_BYTES = 0x0 # skip bytes 0 for extract textures with correct headers
        elif TYPE == 2
            if TYPE2 == 3
                callfunction SKIP_BYTES_TYPE_2 1
            endif
        endif

        math OFFSET + SKIP_BYTES
        math SIZE   - SKIP_BYTES
        clog "" OFFSET SIZE SIZE
    endif
next i

startfunction SKIP_BYTES_TYPE_2
    savepos TMP_OFF
    goto OFFSET
    callfunction GET_NAME 1
    get DUMMY long
    get CHANNELS short
    get BITS short
    get FREQUENCY long
    getdstring DUMMY 0xc
    get TMP_SIZE long
    get TMP_ZIP long
    get TMP_ZSIZE long
    savepos SKIP_BYTES
    math SKIP_BYTES - OFFSET
    goto TMP_OFF
endfunction

startfunction GET_NAME
    get NAMESZ short
    getdstring NAME NAMESZ
endfunction


If could someone create a tool for textures to convert them in standart DDS(pc) and TGA(ps2) we can change them in game
(translate, or change some skin, repaint them and other stuff)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited