Seite 1 von 1

Static objets from c2m

Verfasst: Sa 5. Apr 2014, 16:21
von Remik
Hi
I have a question for the old timers ... How does the map C2M open the file staticobjets.inc?

Remik

Re: Static objets from c2m

Verfasst: Di 8. Apr 2014, 10:49
von Molt
c2m is an archive format (similar to "tar") in which the actual map files are taped together. All *.inc files get included in map.ini, which is the only file that is actually loaded by the game. In the c2m format, *.ini files are compressed and encoded into cif format, so that's where your data lies.

Kind regards
Molt

Re: Static objets from c2m

Verfasst: Di 8. Apr 2014, 19:51
von Remik
Similar to .tar? However, popular programs (winrar, winzip) can not unpack...

And what is .CIF? I found online that are binary data. Can convert them to .inc? I think not :(

Re: Static objets from c2m

Verfasst: Do 10. Apr 2014, 14:08
von Molt
Yes, similar to tar, but not exactly. The c2m is a format itself and since it's not very popular, programs like WinRAR or WinZip don't support it.
CIF is a binary version of .ini (or .inc) which has also been encoded (using a custom algorithm). It is possible to convert .cif to .ini/.inc and back, I once wrote myself a program to do that.
Here's the cif part of it:
Cif.zip
Kind regards
Molt

Re: Static objets from c2m

Verfasst: Do 10. Apr 2014, 17:38
von Remik
I can not use this ... I'm weak with java :( There is no main function ... How to use it?

Re: Static objets from c2m

Verfasst: Fr 11. Apr 2014, 12:35
von Molt
Read file into byte array, pass array to Cif.decodeFile(), write return value to new file.
I'm not doing a main function for this now as I'm gonna write a full c2m converter anyway.

Kind regards
Molt