Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Showdown Legends of Wrestling Script WIP

Coders and would-be coders alike, this is the place to talk about programming.
Post Reply
skstylez
ultra-n00b
Posts: 8
Joined: Sun Nov 20, 2011 1:15 pm

Showdown Legends of Wrestling Script WIP

Post by skstylez »

Hey there,

I've been working on a script to extract the DDS images from the thousands of .dat and .neo files that are extracted from the WRESTLER.DR and COSTUMES.DR files respectively from Showdown Legends of Wrestling for Xbox.

I have come up with this so far

Code: Select all

get IDSTRING long

goto 0x38
get OFFSET short
if OFFSET == 0

goto 0xBC
get FILES long
get OFFSET long

else
goto 0xA0
get FILES long
endif

goto OFFSET
for i = 0 < FILES
get WIDTH long
get HEIGHT long
get UNK1 long
get NSIZE long
getdstring UNK2 16
getdstring NAME 0x10
string NAME <= "."
string NAME += "dds"
get OFFSET1 long
savepos OFFSET2

goto OFFSET1
get UNK3 byte
get TYPE byte
goto OFFSET2

get UNK4 long
get SIZE long
get NULL1 long

callfunction addDDSheader
math SIZE += 0x80
log NAME 0 SIZE MEMORY_FILE

next i

startfunction addDDSheader
endian little
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x0A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x05\x00\x00\x00\x44\x58\x54\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0xC HEIGHT long

if TYPE == 0x0F
putVarChr MEMORY_FILE 0x57 0x35
else
putVarChr MEMORY_FILE 0x57 0x31
endif

endian little
   append
   log MEMORY_FILE OFFSET1 SIZE
   append

endfunction
I have a couple of problems which I can't seem to solve. The first problem I have is that I want to have the dds header replace the parts that are highlighted, instead of it being added before it.
Image

The second problem is that when using the script on the .neo file, I get this.
Image

I've attached some sample files

Any help would be much appreciated.

Thanks in advance
You do not have the required permissions to view the files attached to this post.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Showdown Legends of Wrestling Script WIP

Post by chrrox »

looks like an image with a pallet.
skstylez
ultra-n00b
Posts: 8
Joined: Sun Nov 20, 2011 1:15 pm

Re: Showdown Legends of Wrestling Script WIP

Post by skstylez »

Is there a way to view the image correctly?

I've managed to solve the first problem that I was having in regards to the dds header.

Code: Select all

get IDSTRING long

goto 0x38
get OFFSET short
if OFFSET == 0

goto 0xBC
get FILES long
get OFFSET long

else
goto 0xA0
get FILES long
endif

goto OFFSET
for i = 0 < FILES
get WIDTH long
get HEIGHT long
get UNK1 long
get NSIZE long
get UNK2 long
get UNK3 long
get UNK4 long
get UNK5 long
getdstring NAME 0x10
string NAME <= "."
string NAME += "dds"
get OFFSET1 long
savepos OFFSET2

goto OFFSET1
get UNK6 byte
get TYPE byte

goto OFFSET2
get UNK7 long
get SIZE long
get NULL1 long

math OFFSET1 += 0x80
math SIZE -= 0x80

callfunction addDDSheader
math SIZE += 0x80
log NAME 0 SIZE MEMORY_FILE

next i

startfunction addDDSheader
endian little
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x0A

\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00

\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00

\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x05\x00\x00\x00\x44\x58\x54\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00

\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00

\x00"
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0xC HEIGHT long

if TYPE == 0x0F
putVarChr MEMORY_FILE 0x57 0x35
else
putVarChr MEMORY_FILE 0x57 0x31
endif

endian little
   append
   log MEMORY_FILE OFFSET1 SIZE
   append

endfunction
Thanks
skstylez
ultra-n00b
Posts: 8
Joined: Sun Nov 20, 2011 1:15 pm

Re: Showdown Legends of Wrestling Script WIP

Post by skstylez »

Having added a tga header instead of a dds header on the .neo file, I've managed to make a bit of progress. Am I right in saying that the image is swizzled?

Image
Last edited by skstylez on Sun Jun 16, 2013 5:40 pm, edited 1 time in total.
skstylez
ultra-n00b
Posts: 8
Joined: Sun Nov 20, 2011 1:15 pm

Re: Showdown Legends of Wrestling Script WIP

Post by skstylez »

Is there any noesis script to unswizzle xbox tga/bmp files? I've searched around for a tool, but all I could find was a dead link for a BMP unswizzle tool for MVP Baseball 2005.

Sorry for the triple post.
Post Reply