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

Manhattan Chase

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Marvey
n00b
Posts: 18
Joined: Wed Sep 03, 2003 1:12 pm
Has thanked: 6 times
Been thanked: 1 time

Manhattan Chase

Post by Marvey »

Hey ppl
Its possible to make a pluggin to this game Manhattan Chase
I have uploaded one file from textures directory they use this format for almost all files they have in the game if you can plz take a look on it.
Thx
You do not have the required permissions to view the files attached to this post.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post by Mr.Mouse »

Thanks! I'm on it. Let you know what I find. :)
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post by Mr.Mouse »

This is a file that contains increasingly smaller textures for the same item (like MIP maps in DDS). I haven't quite figured out the format of the images yet. They do not look compressed really, as the image data matches the height*width variables in there. So it should be an 8-bit image format.

Do you have more examples? There are still some variables in the 0x24 header that I don't understand.
Marvey
n00b
Posts: 18
Joined: Wed Sep 03, 2003 1:12 pm
Has thanked: 6 times
Been thanked: 1 time

Post by Marvey »

Sure mate i have included other file from the folder textures/ and other file from the folder Menu/ i hope this help you.
Thx
You do not have the required permissions to view the files attached to this post.
Marvey
n00b
Posts: 18
Joined: Wed Sep 03, 2003 1:12 pm
Has thanked: 6 times
Been thanked: 1 time

Post by Marvey »

this one if from the Menu/ folder
You do not have the required permissions to view the files attached to this post.
Marvey
n00b
Posts: 18
Joined: Wed Sep 03, 2003 1:12 pm
Has thanked: 6 times
Been thanked: 1 time

Post by Marvey »

mr. mouse if you can resolve this i wanna ask if is possible to make a convertor for the images inside the paks in case they are not standart.
Thx
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post by Mr.Mouse »

I will take a look at them at get back asap. :)
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post by Mr.Mouse »

Thanks. I will see what I can do, when I have time. ;)
SparedLife
advanced
Posts: 47
Joined: Sun Mar 07, 2004 6:37 am
Location: USA
Contact:

Post by SparedLife »

The DCT texture file format is indeed a DDS file with mips. The DCT header is 48 bytes and contains all the information including the width and height. All that I looked at were DXT3 format which may mean that modders can utilize the alpha channel.


Marvey:
Since I'm on the road and using this old laptop I don't think I have enough resources available to write and test a Perl conversion script but if you want to convert by hand I can tell you how with Photoshop and a HEX editor.
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

Strange but I sat understood with formats of all files this game and have come to conclusion what not what there DXT3 even does not smell as a format... At all files with expansions DCT, DCW, DCM, DCA, CAM , MCS, DCV, DCL, dcShadow, dcScript heading DC2 and further on all file almost one zero... :o What think in this occasion? :oops:

This example CAM file format
DC2...........?....i...k.
.?...=...:...B...?....2?


This example DCT file format
DC2.......................................
.................................................
.................................................
..................................................
...................................................
..................................................
..................................................
....................................................
.....................................................
........................................................
..................................
SparedLife
advanced
Posts: 47
Joined: Sun Mar 07, 2004 6:37 am
Location: USA
Contact:

Post by SparedLife »

If I read your translation correctly, you do not understand how I concluded the DCT files are DXT3.

The DC2 header is 48 bytes long. If you remove this header the remaining data is a raw DXT3 with mips. It is not readable as a DXT3 because there is no DDS header. I looked at some other textures and there are both DXT1 and DXT3

To make it a DDS you will need to add a DDS header. This can be done by creating a DDS DXT3 file in the size needed with mips. Then remove the 128 byte header from your newly created DDS and attach it to the top of the raw DDS. The same for DXT1

To get the correct file size look at the original DC2 header. The 2 byte word at byte 19 is the width and the 2 byte word at byte 23 is the height. I also noticed the file size height and width at byte 36 and 38

For instance this Perl script would work for the DXT3

Code: Select all

while ($name = <*.dct>){
      	print "found a DCT file named $name\n";
        open(INPUT, "< $name") or die "can't open $input file: $!\n";
	binmode(INPUT);
	$FileLength = (-s INPUT);
	print "filelength = $FileLength\n";
	read(INPUT,$c,$FileLength,0) or die "can't read $FileLength bytes.\n";
       	($Width,$Height)= unpack "Sx[S]S", substr $c, 36, 128;
        print "width = $Width\n";
	print "height = $Height\n";
	$Size = ($Width * $Height);
	print "size = $Size\n";
	$DDSL1 = pack "SSSSSSSS", 17476, 8275, 124, 0, 4103, 10, $Height, 0;
	$DDSL2 = pack "SSSSSSSS",$Width,0,0,4,0,0,0,0;
	$DDSL345 = pack "LLLLLLLLLLLL", 0,0,0,0,0,0,0,0,0,0,0,0;
	$DDSL6 = pack "LCCCCLL", 0,68,88,84,51,0,0;
	$DDSL78 = pack "LLLLLLLL", 0,0,0,0,0,0,0,0;
	
	
   	
	seek INPUT, 48, SEEK_SET or die "can't seek Header length. \n";
	read (INPUT,$b,$Size,0) or die "can't read File Size.\n";
	$name =~ s/DCT/dds/;
	print "name = $name\n"; 
    	open(DDSFILE, "> $name") or die "can't open DDSFILE: $!\n";
   	binmode(DDSFILE);
   	print(DDSFILE $DDSL1);
	print(DDSFILE $DDSL2);
	print(DDSFILE $DDSL345);
	print(DDSFILE $DDSL6);
	print(DDSFILE $DDSL78);
	print(DDSFILE $b);
  }
Basically the script reads the 48 byte header , gets the size of the graphic, removes the 48 byte header , puts the DDS header on the file using the size from the original header. Just a time saver since it will read every DCT file in the folder and convert to DXT3. I tried it on a few and the actual DXT3 files came out ok.
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

I wish to know you what version use? Full or the Demo? In the full version files differ from a demo !
Marvey
n00b
Posts: 18
Joined: Wed Sep 03, 2003 1:12 pm
Has thanked: 6 times
Been thanked: 1 time

Post by Marvey »

the files i posted here are from the full game not the demo.
Mate is possible to compile this code ?
thx
SparedLife
advanced
Posts: 47
Joined: Sun Mar 07, 2004 6:37 am
Location: USA
Contact:

Post by SparedLife »

Mate is possible to compile this code ?

I have heard of Perl compilers but the code is smaller and easier to manipulate in script form. For instance to get this to work on DXT1 only requires text editing a couple values.

Perl is a free download, I used ActiveState Perl to test the script. It runs at the command prompt and requires no Perl knowledge to run the script.
Post Reply