DAT: Difference between revisions

475 bytes added ,  12 February
Added field 9 author info
(make the byte table more compact)
(Added field 9 author info)
 
(7 intermediate revisions by 3 users not shown)
Line 309: Line 309:
|$02
|$02
|?
|?
|Map title.  Must include a trailing NUL byte, and must not exceed 64 characters (including the NUL).  Should generally be ASCII, though Tile World appears to interpret this as Latin-1.  <!-- XXX what does MSCC do with a long title or byte over 128? -->
|Map title.  Must include a trailing NUL byte, and must not exceed 64 characters (including the NUL).  Should generally be ASCII, though some programs interpret this as Latin-1 or Windows-1252.  <!-- XXX what does MSCC do with a long title or byte over 128? -->
|}
|}


Line 403: Line 403:
|$02
|$02
|?
|?
|[[Hint]] text.  Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL).  Should generally be ASCII, though Tile World appears to interpret this as Latin-1.  <!-- XXX what does MSCC do with a long title or byte over 128? -->
|[[Hint]] text.  Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL).  Should generally be ASCII, though some programs interpret this as Latin-1 or Windows-1252.  <!-- XXX what does MSCC do with a long title or byte over 128? -->
|}
|}


Line 412: Line 412:
==== 10: Monster list ====
==== 10: Monster list ====


Contains zero or more of the following structure.  As this structure is 2 bytes in size, the chunk size should be a multiple of 2, and there cannot be more than 128 moving monsters in a level.
Contains zero or more of the following structure.  As this structure is 2 bytes in size, the chunk size should be a multiple of 2, and there cannot be more than 127 moving monsters in a level.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 420: Line 420:
|-
|-
|$00
|$00
|2
|1
|x-coordinate of monster
|x-coordinate of monster
|-
|-
|$02
|$02
|2
|1
|y-coordinate of monster
|y-coordinate of monster
|}
|}
Line 431: Line 431:


Tile World in Lynx mode will ignore this structure and always allow any number of monsters to move as normal.
Tile World in Lynx mode will ignore this structure and always allow any number of monsters to move as normal.
==== 9: Author ====
{| class="wikitable" border="1"
!Offset
!Bytes
!Content
|-
|$02
|?
|Author's name.  Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL).  Typically encoded as Windows-1252 or Latin-1.
|}
This chunk is not present in the original game, and was later created as a community extension to include author info without relying on other files. This chunk is ignored by MSCC and early Tile World versions.


== See also ==
== See also ==


* [[C2M]], the more flexible format used in [[Chip's Challenge 2]]
* [[C2M]], the more flexible format used in [[Chip's Challenge 2]]
== External Links ==
* [http://www.seasip.info/ccfile.html Explanation of the CHIPS.DAT format]
* Implementation in [[Tile World]]: [https://github.com/zrax/tworld/blob/master/series.c <code>series.c</code>] (whole file) and [https://github.com/zrax/tworld/blob/master/encoding.c <code>encoding.c</code>] (individual level)
* Implementation in [[Tile World]]: [https://github.com/zrax/tworld/blob/master/series.c <code>series.c</code>] (whole file) and [https://github.com/zrax/tworld/blob/master/encoding.c <code>encoding.c</code>] (individual level)
* Implementation in [[Lexy's Labyrinth]]: [https://github.com/eevee/lexys-labyrinth/blob/master/js/format-dat.js <code>js/format-dat.js</code>]
* Implementation in [[Lexy's Labyrinth]]: [https://github.com/eevee/lexys-labyrinth/blob/master/js/format-dat.js <code>js/format-dat.js</code>]
== External Links ==
[http://www.seasip.info/ccfile.html Explanation of the CHIPS.DAT format]


[[Category:Terminology]]
[[Category:Terminology]]
[[Category:File formats]]
[[Category:File formats]]
trusted-editors
544

edits