ZenHAX

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

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Mar 30, 2021 10:54 pm 
User avatar

Joined: Fri Apr 20, 2018 12:41 am
Posts: 800
The textures are zlib-compressed, the format is super easy but ripping textures is going to be a little tedious as they use XML files to locate textures on the atlas. I tried to create a Noesis script on my own, it gets the textures, but doesn't properly adjust the texture formats to ARGB, making textures look improperly colored. Any advice on fixing my script?

Code:
//------------------------------------------------
//--- 010 Editor v10.0.2 Binary Template
//
//      File: PopCap (SexyApp/Sexy App) Framework *.TEX (SEXY Texture)
//      Authors: LolHacksRule
//      Version: 1
//      Purpose: Gets data out of the binary.
//      Category: Metadata
//      File Mask: SEXYTEX
//      ID Bytes:
//      History:
//------------------------------------------------

LittleEndian();

struct Header {
    char    sexyTexHeader[7]<bgcolor=cGreen>; //Should be SEXYTEX
    char    padding[5]<bgcolor=cRed>; //should be 00
} header;


struct TexMetaData {
    uint    texWidth<bgcolor=cBlue>; //Width
    uint    texHeight<bgcolor=cLtBlue>;
    uint    texFmt<bgcolor=cPurple>; //03 = ARGB4444, 02 = ARGB8888
    uint    unknown2<bgcolor=cRed>;
    uint    unknown3<bgcolor=cRed>;
    uint    zLibCompressedTexSize<bgcolor=cRed>;
    char    morePadding[12]<bgcolor=cRed>;
} texMetaDataTable;


Code:
    #RGBA8888 texture
    if texFmt == 0x2:
        print("RGBA8888: format detected")
        texData = rapi.imageDecodeRaw(decompTex, texWidth, texHeight, "r8 g8 b8 a8")
        texFmt = noesis.NOESISTEX_RGBA32
    #RGBA4444 texture
    elif texFmt == 0x3:
        print("RGBA4444: format detected")
        texData = rapi.imageDecodeRaw(decompTex, texWidth, texHeight, "r4 g4 b4 a4")
        texFmt = noesis.NOESISTEX_RGBA32
    else:
        print("UNKNOWN TEXTURE FORMAT DETECTED!")
        return None
    texList.append(NoeTexture(rapi.getInputName(), texWidth, texHeight, texData, texFmt))
    return 1


Attachments:
PVZAndroidTVTexFiles.zip [220.51 KiB]
Downloaded 41 times

_________________
Hacking Angry Birds since 2016
Top
   
PostPosted: Wed May 26, 2021 9:27 pm 

Joined: Sun Jan 10, 2021 2:23 pm
Posts: 71
next time please also provide full script (attach as file)
Attachment:
tex_PvZ_tex.py.txt [1.47 KiB]
Downloaded 20 times

_________________
How to search (and find!) scripts @ My Notes
Use Filecutter so more people can look in your files.
Please, don't quote if message context is clear.


Top
   
PostPosted: Fri May 28, 2021 10:15 pm 
User avatar

Joined: Fri Apr 20, 2018 12:41 am
Posts: 800
Sorry, but thanks anyway.

_________________
Hacking Angry Birds since 2016


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

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