Static objets from c2m

Antworten
Remik
Beiträge: 8
Registriert: Sa 2. Nov 2013, 22:39

Static objets from c2m

Beitrag von Remik » Sa 5. Apr 2014, 16:21

Hi
I have a question for the old timers ... How does the map C2M open the file staticobjets.inc?

Remik

Benutzeravatar
Molt
Beiträge: 326
Registriert: Sa 30. Mär 2013, 16:27
Wohnort: Schweiz
Kontaktdaten:

Re: Static objets from c2m

Beitrag von Molt » Di 8. Apr 2014, 10:49

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

Remik
Beiträge: 8
Registriert: Sa 2. Nov 2013, 22:39

Re: Static objets from c2m

Beitrag von Remik » Di 8. Apr 2014, 19:51

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 :(

Benutzeravatar
Molt
Beiträge: 326
Registriert: Sa 30. Mär 2013, 16:27
Wohnort: Schweiz
Kontaktdaten:

Re: Static objets from c2m

Beitrag von Molt » Do 10. Apr 2014, 14:08

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
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.

Remik
Beiträge: 8
Registriert: Sa 2. Nov 2013, 22:39

Re: Static objets from c2m

Beitrag von Remik » Do 10. Apr 2014, 17:38

I can not use this ... I'm weak with java :( There is no main function ... How to use it?

Benutzeravatar
Molt
Beiträge: 326
Registriert: Sa 30. Mär 2013, 16:27
Wohnort: Schweiz
Kontaktdaten:

Re: Static objets from c2m

Beitrag von Molt » Fr 11. Apr 2014, 12:35

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

Antworten