Please create an account or Login! Have fun!
Editing C2M
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
A '''C2M '''file (having the extension .c2m) is the file format which [[Chip's Challenge 2]] individual levels are stored in. | === Overview === | ||
A '''C2M '''file (having the extension .c2m) is the file format which [[Chip's Challenge 2]] individual levels are commonly stored in. | |||
The file is a binary file consisting of several sections one after the other, terminated by the END section. Each section begins with a section header, which is followed by the section's data. | The file is a binary file consisting of several sections one after the other, terminated by the END section. Each section begins with a section header, which is followed by the section's data. | ||
Line 5: | Line 6: | ||
All data in the file is little-endian. | All data in the file is little-endian. | ||
=== Section header format === | |||
=== Section header === | {| class="article-table" | ||
{| class=" | |||
!Bytes | !Bytes | ||
!Content | !Content | ||
Line 19: | Line 19: | ||
=== Section types === | === Section types === | ||
{| class=" | {| class="article-table" | ||
!Section ID | !Section ID | ||
!Content Type | !Content Type | ||
Line 30: | Line 30: | ||
|LOCK | |LOCK | ||
|Null-terminated string | |Null-terminated string | ||
|Usually "Custom version for Chuck Sommerville", optional. Seems to be ignored | |Usually "Custom version for Chuck Sommerville", optional. Seems to be ignored by CC2. | ||
|- | |- | ||
|TITL | |TITL | ||
Line 46: | Line 46: | ||
|CLUE | |CLUE | ||
|Null-terminated string | |Null-terminated string | ||
|Level clue (Only one allowed, but see | |Level clue (Only one allowed, but see <ref name=":0">The NOTE section can contain multiple clues separated by "[CLUE]" line. The clues are assigned to the clue tiles in order of appearance of both.</ref>) | ||
|- | |- | ||
|NOTE | |NOTE | ||
Line 62: | Line 62: | ||
|KEY | |KEY | ||
|16 bytes | |16 bytes | ||
|Unknown, seems not required | |Unknown, seems not required, could be a MD5 hash of something | ||
|- | |- | ||
|REPL / PRPL | |REPL / PRPL | ||
|See REPL section table below | |See REPL section table below | ||
|Solution replay, optional. A REPL section is not packed | |Solution replay, optional. A REPL section is not packed, a PRPL section is. | ||
|- | |- | ||
|RDNY | |RDNY | ||
|No content | |No content (length is 0) | ||
|The presence of this section makes the level | |The presence of this section makes the level readonly so it can't be edited in the level editor. | ||
|- | |- | ||
|END | |END | ||
|No content | |No content (length is 0) | ||
|Signifies end of file | |Signifies end of file | ||
|} | |} | ||
Line 79: | Line 79: | ||
=== OPTN section === | === OPTN section === | ||
The size of the section can differ between file versions (and even between files with the same file version). Data beyond the size of the section is not read. (E.g. if the section size is 3, only the time and the view are stored.) | The size of the section can differ between file versions (and even between files with the same file version). Data beyond the size of the section is not read. (E.g. if the section size is 3, only the time and the view are stored.) | ||
{| class=" | {| class="article-table" | ||
!Bytes | !Bytes | ||
!Content | !Content | ||
Line 114: | Line 114: | ||
The PACK and PRPL sections contain compressed versions of the MAP and REPL sections respectively. The compression scheme is as follows: | The PACK and PRPL sections contain compressed versions of the MAP and REPL sections respectively. The compression scheme is as follows: | ||
{| class=" | {| class="article-table" | ||
!Bytes | !Bytes | ||
!Content | !Content | ||
Line 126: | Line 126: | ||
|} | |} | ||
==== Data | ==== A Data Block: ==== | ||
When encountered during decompression, the data block's N bytes of data are added to the list.. | When encountered during decompression, the data block's N bytes of data are added to the list.. | ||
{| class=" | {| class="article-table" | ||
!Bytes | !Bytes | ||
!Content | !Content | ||
Line 139: | Line 139: | ||
|} | |} | ||
==== Back- | ==== A Back-Reference Block: ==== | ||
When encountered during decompression, COUNT bytes are copied from position (CURRENT - OFFSET) in the list to position CURRENT in the list. (Where CURRENT is the current position in the list, while COUNT and OFFSET are defined below) | When encountered during decompression, COUNT bytes are copied from position (CURRENT - OFFSET) in the list to position CURRENT in the list. (Where CURRENT is the current position in the list, while COUNT and OFFSET are defined below) | ||
Note that COUNT can be larger than OFFSET, allowing arbitrary pattern repetition to be efficiently encoded. | Note that COUNT can be larger than OFFSET, allowing arbitrary pattern repetition to be efficiently encoded. | ||
{| class=" | {| class="article-table" | ||
!Bytes | !Bytes | ||
!Content | !Content | ||
Line 156: | Line 156: | ||
=== MAP / PACK section === | === MAP / PACK section === | ||
This section contains the map data. If this is a PACK section, it must be unpacked using the above compression scheme first. The contents of this section is as follows: | This section contains the map data. If this is a PACK section, it must be unpacked using the above compression scheme first. The contents of this section is as follows: | ||
{| class=" | {| class="article-table" | ||
!Bytes | !Bytes | ||
!Content | !Content | ||
Line 170: | Line 170: | ||
|} | |} | ||
==== Tile specification ==== | ==== Tile specification: ==== | ||
The tile specification consists of 1 or more bytes. The first byte is always the tile value, decoded as follows: | The tile specification consists of 1 or more bytes. The first byte is always the tile value, decoded as follows: | ||
{| class=" | {| class="article-table" | ||
!Value | !Value | ||
!Tile | !Tile | ||
!Additional data, if any | !Additional data, if any | ||
|- | |- | ||
|0x1 | |0x1 | ||
| | |Floor | ||
| | | | ||
|- | |- | ||
|0x2 | |0x2 | ||
| | |Wall | ||
| | | | ||
|- | |- | ||
|0x3 | |0x3 | ||
| | |Ice | ||
| | | | ||
|- | |- | ||
|0x4 | |0x4 | ||
| | |Ice, South West Corner | ||
| | | | ||
|- | |- | ||
|0x5 | |0x5 | ||
| | |Ice, North West Corner | ||
| | | | ||
|- | |- | ||
|0x6 | |0x6 | ||
| | |Ice, North East Corner | ||
| | | | ||
|- | |- | ||
|0x7 | |0x7 | ||
| | |Ice, South East Corner | ||
| | | | ||
|- | |- | ||
|0x8 | |0x8 | ||
| | |Water | ||
| | | | ||
|- | |- | ||
|0x9 | |0x9 | ||
| | |Fire | ||
| | | | ||
|- | |- | ||
|0xa | |0xa | ||
| | |Force Floor, North | ||
| | | | ||
|- | |- | ||
|0xb | |0xb | ||
| | |Force Floor, East | ||
| | | | ||
|- | |- | ||
|0xc | |0xc | ||
| | |Force Floor, South | ||
| | | | ||
|- | |- | ||
|0xd | |0xd | ||
| | |Force Floor, West | ||
| | | | ||
|- | |- | ||
|0xe | |0xe | ||
|Green | |Green Toggle Wall | ||
| | | | ||
|- | |- | ||
|0xf | |0xf | ||
|Green | |Green Toggle Floor | ||
| | | | ||
|- | |- | ||
|0x10 | |0x10 | ||
| | |Red Teleport | ||
| | | | ||
|- | |- | ||
|0x11 | |0x11 | ||
| | |Blue Teleport | ||
| | | | ||
|- | |- | ||
|0x12 | |0x12 | ||
| | |Yellow Teleport | ||
| | | | ||
|- | |- | ||
|0x13 | |0x13 | ||
| | |Green Teleport | ||
| | | | ||
|- | |- | ||
|0x14 | |0x14 | ||
| | |Exit | ||
| | | | ||
|- | |- | ||
|0x15 | |0x15 | ||
| | |Slime (the obstacle) | ||
| | | | ||
|- | |- | ||
|0x16 | |0x16 | ||
| | |Chip (the hero) | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x17 | |0x17 | ||
| | |Dirt Block | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x18 | |0x18 | ||
| | |Walker Enemy | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x19 | |0x19 | ||
|Ship Enemy | |||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x1a | |0x1a | ||
| | |Ice Block | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x1b | |0x1b | ||
| | |(Unused) East Panel | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x1c | |0x1c | ||
| | |(Unused) South Panel | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x1d | |0x1d | ||
| | |(Unused) South+East Panel | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x1e | |0x1e | ||
| | |Gravel | ||
| | | | ||
|- | |- | ||
|0x1f | |0x1f | ||
| | |Door Toggle Button | ||
| | | | ||
|- | |- | ||
|0x20 | |0x20 | ||
| | |Blue Tank Button | ||
| | | | ||
|- | |- | ||
|0x21 | |0x21 | ||
| | |Blue Tank | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x22 | |0x22 | ||
| | |Red Door | ||
| | | | ||
|- | |- | ||
|0x23 | |0x23 | ||
| | |Blue Door | ||
| | | | ||
|- | |- | ||
|0x24 | |0x24 | ||
| | |Yellow Door | ||
| | | | ||
|- | |- | ||
|0x25 | |0x25 | ||
| | |Green Door | ||
| | | | ||
|- | |- | ||
|0x26 | |0x26 | ||
| | |Red Key | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x27 | |0x27 | ||
| | |Blue Key | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x28 | |0x28 | ||
| | |Yellow Key | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x29 | |0x29 | ||
| | |Green Key | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x2a | |0x2a | ||
|IC Chip | |||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x2b | |0x2b | ||
|Extra | |Extra IC Chip | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x2c | |0x2c | ||
| | |IC Chip Socket | ||
| | | | ||
|- | |- | ||
|0x2d | |0x2d | ||
| | |Push-up Wall | ||
| | | | ||
|- | |- | ||
|0x2e | |0x2e | ||
| | |Appearing Wall | ||
| | | | ||
|- | |- | ||
|0x2f | |0x2f | ||
| | |Invisible Wall | ||
| | | | ||
|- | |- | ||
|0x30 | |0x30 | ||
|Solid | |Solid Blue Wall | ||
| | | | ||
|- | |- | ||
|0x31 | |0x31 | ||
|False | |False Blue Wall | ||
| | | | ||
|- | |- | ||
|0x32 | |0x32 | ||
| | |Dirt | ||
| | | | ||
|- | |- | ||
|0x33 | |0x33 | ||
|Ant | |||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x34 | |0x34 | ||
|Centipede | |||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x35 | |0x35 | ||
| | |Purple Ball | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x36 | |0x36 | ||
| | |Blob | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x37 | |0x37 | ||
| | |Red Teeth | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x38 | |0x38 | ||
|Fire box | |||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x39 | |0x39 | ||
| | |Clone Button | ||
| | | | ||
|- | |- | ||
|0x3a | |0x3a | ||
| | |Trap Button | ||
| | | | ||
|- | |- | ||
|0x3b | |0x3b | ||
|Cleats | |||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x3c | |0x3c | ||
| | |Magno Shoes | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x3d | |0x3d | ||
| | |Fire Shoes | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x3e | |0x3e | ||
| | |Flippers | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x3f | |0x3f | ||
| | |Red Thief | ||
| | | | ||
|- | |- | ||
|0x40 | |0x40 | ||
| | |Red Bomb | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x41 | |0x41 | ||
| | |(Unused) | ||
| | | | ||
|- | |- | ||
|0x42 | |0x42 | ||
| | |Trap | ||
| | | | ||
|- | |- | ||
|0x43 | |0x43 | ||
| | |(Unused -- Behaves like Clone Machine) | ||
| | | | ||
|- | |- | ||
|0x44 | |0x44 | ||
| | |Clone Machine (Modifier required, see below) | ||
| | | | ||
|- | |- | ||
|0x45 | |0x45 | ||
|Clue Tile | |||
| | | | ||
|- | |- | ||
|0x46 | |0x46 | ||
| | |Force Field, Random | ||
| | | | ||
|- | |- | ||
|0x47 | |0x47 | ||
| | |Area Control Button | ||
| | | | ||
|- | |- | ||
|0x48 | |0x48 | ||
| | |Revolving Door, South West | ||
| | | | ||
|- | |- | ||
|0x49 | |0x49 | ||
| | |Revolving Door, North West | ||
| | | | ||
|- | |- | ||
|0x4a | |0x4a | ||
| | |Revolving Door, North East | ||
| | | | ||
|- | |- | ||
|0x4b | |0x4b | ||
| | |Revolving Door, South East | ||
| | | | ||
|- | |- | ||
|0x4c | |0x4c | ||
| | |Time Bonus | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x4d | |0x4d | ||
| | |Time Toggle | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x4e | |0x4e | ||
| | |Transformer | ||
| | | | ||
|- | |- | ||
|0x4f | |0x4f | ||
| | |Train Tracks Base (Modifier required, see section below) | ||
| | | | ||
|- | |- | ||
|0x50 | |0x50 | ||
| | |Metal Wall | ||
| | | | ||
|- | |- | ||
|0x51 | |0x51 | ||
| | |Time Bomb | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x52 | |0x52 | ||
| | |Helmet | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x53 | |0x53 | ||
| | |(Unused) | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x54 | |0x54 | ||
| | |(Unused) | ||
| | | | ||
|- | |- | ||
|0x55 | |0x55 | ||
| | |(Unused) | ||
| | | | ||
|- | |- | ||
|0x56 | |0x56 | ||
| | |Melinda | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x57 | |0x57 | ||
| | |Blue Teeth | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x58 | |0x58 | ||
| | |(Unused) Explosion Animation | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x59 | |0x59 | ||
| | |Hiking Shoes | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x5a | |0x5a | ||
|Male Only Sign | |||
| | | | ||
|- | |- | ||
|0x5b | |0x5b | ||
|Female Only Sign | |||
| | | | ||
|- | |- | ||
|0x5c | |0x5c | ||
| | |Inverter Gate, North (Modifier allows other gates, see below) | ||
| | | | ||
|- | |- | ||
|0x5d | |0x5d | ||
| | |(Unused) | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x5e | |0x5e | ||
| | |Logic Switch, On | ||
| | | | ||
|- | |- | ||
|0x5f | |0x5f | ||
| | |Flame Jet, Off | ||
| | | | ||
|- | |- | ||
|0x60 | |0x60 | ||
| | |Flame Jet, On | ||
| | | | ||
|- | |- | ||
|0x61 | |0x61 | ||
| | |Flame Jet Button | ||
| | | | ||
|- | |- | ||
|0x62 | |0x62 | ||
| | |Lightning Bolt | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x63 | |0x63 | ||
| | |Yellow Tank | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x64 | |0x64 | ||
| | |Yellow Tank D-Pad | ||
| | | | ||
|- | |- | ||
|0x65 | |0x65 | ||
| | |Mirror Chip (the enemy) | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x66 | |0x66 | ||
| | |Mirror Melinda | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x67 | |0x67 | ||
| | |(Unused) | ||
| | | | ||
|- | |- | ||
|0x68 | |0x68 | ||
| | |Bowling Ball | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x69 | |0x69 | ||
| | |Rover | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x6a | |0x6a | ||
| | |Time Penalty | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x6b | |0x6b | ||
| | |Custom Floor, Brown (Modifier allows other styles, see below) | ||
| | | | ||
|- | |- | ||
|0x6c | |0x6c | ||
|(Unused) | |(Unused) | ||
| | | | ||
|- | |- | ||
|0x6d | |0x6d | ||
| | |Panels/Canopy, see below | ||
|Panel/Canopy bitmask | |Panel/Canopy bitmask, Tile Specification for tile underneath | ||
|- | |- | ||
|0x6e | |0x6e | ||
| | |(Unused) | ||
| | | | ||
|- | |- | ||
|0x6f | |0x6f | ||
| | |Railroad Crossing Sign | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x70 | |0x70 | ||
| | |Custom Wall, Brown (Modifier allows other styles, see below) | ||
| | | | ||
|- | |- | ||
|0x71 | |0x71 | ||
| | |"Sunken" Floor (Modifier required, see below) | ||
| | | | ||
|- | |- | ||
|0x72 | |0x72 | ||
|Purple Toggle Wall | |||
| | | | ||
|- | |- | ||
|0x73 | |0x73 | ||
|Purple Toggle Floor | |||
| | | | ||
|- | |- | ||
|0x74 | |0x74 | ||
| | |(Unused) | ||
| | | | ||
|- | |- | ||
|0x75 | |0x75 | ||
| | |(Unused) | ||
| | | | ||
|- | |- | ||
|0x76 | |0x76 | ||
|8-bit Modifier | |8-bit Modifier (see Modifier section below) | ||
|1 modifier byte, Tile Specification for affected tile | |1 modifier byte, Tile Specification for affected tile | ||
|- | |- | ||
|0x77 | |0x77 | ||
|16-bit Modifier | |16-bit Modifier (see Modifier section below) | ||
|2 modifier bytes, Tile Specification for affected tile | |2 modifier bytes, Tile Specification for affected tile | ||
|- | |- | ||
|0x78 | |0x78 | ||
|32-bit Modifier | |32-bit Modifier (see Modifier section below) | ||
|4 modifier bytes, Tile Specification for affected tile | |4 modifier bytes, Tile Specification for affected tile | ||
|- | |- | ||
|0x79 | |0x79 | ||
| | |(Unused) | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x7a | |0x7a | ||
|10 | |10 Point Flag | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x7b | |0x7b | ||
|100 | |100 Point Flag | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x7c | |0x7c | ||
|1000 | |1000 Point Flag | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x7d | |0x7d | ||
| | |Stay Up Green Wall | ||
| | | | ||
|- | |- | ||
|0x7e | |0x7e | ||
| | |Pop Down Green Wall | ||
| | | | ||
|- | |- | ||
|0x7f | |0x7f | ||
| | |"Forbidden" mark (modifies items/keys) | ||
| | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x80 | |0x80 | ||
|2x | |2x Points Flag | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x81 | |0x81 | ||
| | |Directional Block | ||
|Direction byte, Directional Arrows Bitmask, Tile Specification for | |Direction byte, Directional Arrows Bitmask, Tile Specification for tile underneath | ||
|- | |- | ||
|0x82 | |0x82 | ||
| | |Floor Mimic | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x83 | |0x83 | ||
| | |Green Bomb | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x84 | |0x84 | ||
| | |Green IC Chip | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x85 | |0x85 | ||
| | |(Unused) | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x86 | |0x86 | ||
| | |(Unused) | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x87 | |0x87 | ||
| | |Reverse Logic Button | ||
| | | | ||
|- | |- | ||
|0x88 | |0x88 | ||
| | |Off Switch, Off | ||
| | | | ||
|- | |- | ||
|0x89 | |0x89 | ||
| | |On Switch, On | ||
| | | | ||
|- | |- | ||
|0x8a | |0x8a | ||
| | |Red Thief | ||
| | | | ||
|- | |- | ||
|0x8b | |0x8b | ||
| | |Ghost | ||
|Direction byte, Tile Specification for | |Direction byte, Tile Specification for tile underneath | ||
|- | |- | ||
|0x8c | |0x8c | ||
| | |Steel Foil | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x8d | |0x8d | ||
| | |Turtle | ||
| | | | ||
|- | |- | ||
|0x8e | |0x8e | ||
| | |Eye | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x8f | |0x8f | ||
| | |Bribe | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x90 | |0x90 | ||
| | |Speed Shoes | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|- | |- | ||
|0x91 | |0x91 | ||
| | |(Unused) | ||
| | | | ||
|- | |- | ||
|0x92 | |0x92 | ||
| | |Hook | ||
|Tile Specification for | |Tile Specification for tile underneath | ||
|} | |} | ||
==== Direction | ==== Direction Byte ==== | ||
The direction byte comes after enemy tiles and some others: | The direction byte comes after enemy tiles and some others: | ||
{| class=" | {| class="article-table" | ||
!Value | !Value | ||
!Meaning | !Meaning | ||
Line 928: | Line 781: | ||
|} | |} | ||
==== | ==== Panel/Canopy Bitmask ==== | ||
Any number of these bits can be combined: | Any number of these bits can be combined: | ||
{| class=" | {| class="article-table" | ||
!Bitmask | !Bitmask | ||
!Meaning | !Meaning | ||
|- | |- | ||
|0x1 | |0x1 | ||
| | |Panel, North | ||
|- | |- | ||
|0x2 | |0x2 | ||
| | |Panel, East | ||
|- | |- | ||
|0x4 | |0x4 | ||
| | |Panel, South | ||
|- | |- | ||
|0x8 | |0x8 | ||
| | |Panel, West | ||
|- | |- | ||
|0x10 | |0x10 | ||
| | |Canopy | ||
|} | |} | ||
==== Directional | ==== Directional Arrows Bitmask ==== | ||
Any number of these bits can be combined: | Any number of these bits can be combined: | ||
{| class=" | {| class="article-table" | ||
!Bitmask | !Bitmask | ||
!Meaning | !Meaning | ||
|- | |- | ||
|0x1 | |0x1 | ||
|North | |Arrow, North | ||
|- | |- | ||
|0x2 | |0x2 | ||
|East | |Arrow, East | ||
|- | |- | ||
|0x4 | |0x4 | ||
|South | |Arrow, South | ||
|- | |- | ||
|0x8 | |0x8 | ||
|West | |Arrow, West | ||
|} | |} | ||
==== Tile | ==== Tile Modifiers ==== | ||
The modifier "tiles" (0x76, 0x77, 0x78) affect the tile specification that they carry in their additional data. The meaning of the modifier value depends on the type of tile they affect. | The modifier "tiles" (0x76, 0x77, 0x78) affect the tile specification that they carry in their additional data. The meaning of the modifier value depends on the type of tile they affect. | ||
==== Wire Modifier ==== | |||
This is an 8-bit modifier that affects floors, metal walls, on/off switches, transformers, and blue/red fans (possibly more?). It adds wires to the tile it affects. Any number of these bits can be combined: | |||
==== Wire | {| class="article-table" | ||
This is an 8-bit modifier that affects | |||
{| class=" | |||
!Bitmask | !Bitmask | ||
!Meaning | !Meaning | ||
|- | |- | ||
|0x1 | |0x1 | ||
| | |Wire, North | ||
|- | |- | ||
|0x2 | |0x2 | ||
| | |Wire, East | ||
|- | |- | ||
|0x4 | |0x4 | ||
| | |Wire, South | ||
|- | |- | ||
|0x8 | |0x8 | ||
| | |Wire, West | ||
|- | |- | ||
|0x10 | |0x10 | ||
| | |Wire Tunnel, North | ||
|- | |- | ||
|0x20 | |0x20 | ||
| | |Wire Tunnel, East | ||
|- | |- | ||
|0x40 | |0x40 | ||
| | |Wire Tunnel, South | ||
|- | |- | ||
|0x80 | |0x80 | ||
| | |Wire Tunnel, West | ||
|} | |} | ||
==== | ==== ASCII Modifier ==== | ||
This is an 8-bit modifier that affects | This is an 8-bit modifier that affects "sunken" floors by adding a symbol (usually an ASCII symbol) to them: | ||
{| class=" | {| class="article-table" | ||
!Values | !Values | ||
!Meaning | !Meaning | ||
|- | |- | ||
|0x1c | |0x1c | ||
|Up | |Up Arrow | ||
|- | |- | ||
|0x1d | |0x1d | ||
|Right | |Right Arrow | ||
|- | |- | ||
|0x1e | |0x1e | ||
|Down | |Down Arrow | ||
|- | |- | ||
|0x1f | |0x1f | ||
|Left | |Left Arrow | ||
|- | |- | ||
|0x20 through 0x5f | |0x20 through 0x5f | ||
|Corresponding ASCII | |Corresponding ASCII Characterr (' ' through '_') | ||
|} | |} | ||
==== Clone | ==== Clone Machine Arrow Modifier ==== | ||
This is an 8-bit modifier that affects | This is an 8-bit modifier that affects clone machines by specifying their direction. The values can be combined and will show up on the clone machine appropriately, but the game will only clone in one direction: | ||
{| class=" | {| class="article-table" | ||
!Value | !Value | ||
!Meaning | !Meaning | ||
|- | |- | ||
|0x1 | |0x1 | ||
|Arrow | |Arrow, North | ||
|- | |- | ||
|0x2 | |0x2 | ||
|Arrow | |Arrow, East | ||
|- | |- | ||
|0x4 | |0x4 | ||
|Arrow | |Arrow, South | ||
|- | |- | ||
|0x8 | |0x8 | ||
|Arrow | |Arrow, West | ||
|} | |} | ||
==== Custom | ==== Custom Floor/Wall Modifier ==== | ||
This is an 8-bit modifier that affects custom walls or floors by replaces their style: | This is an 8-bit modifier that affects custom walls or floors by replaces their style: | ||
{| class=" | {| class="article-table" | ||
!Value | !Value | ||
!Meaning | !Meaning | ||
|- | |- | ||
|0x1 | |0x1 | ||
|Pink | |Custom Wall/Floor, Pink | ||
|- | |- | ||
|0x2 | |0x2 | ||
|Yellow | |Custom Wall/Floor, Yellow | ||
|- | |- | ||
|0x3 | |0x3 | ||
|Blue | |Custom Wall/Floor, Blue | ||
|} | |} | ||
==== Logic | ==== Logic Modifier ==== | ||
This is an 8-bit modifier that affects an inverter gate by replacing it with another gate | This is an 8-bit modifier that affects an inverter gate by replacing it with another gate: | ||
{| class="article-table" | |||
{| class=" | |||
!Values | !Values | ||
!Meaning | !Meaning | ||
|- | |- | ||
| | |0x1 through 0x3 | ||
| | |Inverter Gate East/South/West | ||
|- | |- | ||
|0x4 through 0x7 | |0x4 through 0x7 | ||
| | |And Gate North/East/South/West | ||
|- | |- | ||
|0x8 through 0xb | |0x8 through 0xb | ||
| | |Or Gate North/East/South/West | ||
|- | |- | ||
|0xc through 0xf | |0xc through 0xf | ||
| | |Xor Gate North/East/South/West | ||
|- | |- | ||
|0x10 through 0x13 | |0x10 through 0x13 | ||
| | |Latch North/East/South/West, Clockwise Arrow | ||
|- | |- | ||
|0x14 through 0x17 | |0x14 through 0x17 | ||
| | |Nand Gate North/East/South/West | ||
|- | |- | ||
|0x1e through 0x27 | |0x1e through 0x27 | ||
| | |Counter Gate 0 through 9 | ||
|- | |- | ||
|0x40 through 0x43 | |0x40 through 0x43 | ||
| | |Latch North/East/South/West, Counter Clockwise Arrow | ||
|} | |} | ||
==== Track | ==== Track Modifier ==== | ||
This is | This is an 8- or 16-bit modifier that affects the train tracks base tile. The low-order byte specifies which tracks exist; any number of bits can be combined: | ||
{| class=" | {| class="article-table" | ||
!Bitmask | !Bitmask | ||
!Meaning | !Meaning | ||
|- | |- | ||
|0x1 | |0x1 | ||
| | |Track, North East | ||
|- | |- | ||
|0x2 | |0x2 | ||
| | |Track, South East | ||
|- | |- | ||
|0x4 | |0x4 | ||
| | |Track, South West | ||
|- | |- | ||
|0x8 | |0x8 | ||
| | |Track, North West | ||
|- | |- | ||
|0x10 | |0x10 | ||
|Horizontal | |Track, Horizontal | ||
|- | |- | ||
|0x20 | |0x20 | ||
|Vertical | |Track, Vertical | ||
|- | |- | ||
|0x40 | |0x40 | ||
|Track | |Track Switch | ||
|} | |} | ||
The high order byte is optional and specifies which track is the active one. If omitted, the North East track is the active one. For tiles with a track switch, the active track is the only one that can be used (the other are shown red). | |||
The high byte is | {| class="article-table" | ||
{| class=" | |||
!Value | !Value | ||
!Meaning | !Meaning | ||
|- | |- | ||
| | |(Omitted) | ||
| | |North East track is active | ||
|- | |- | ||
|0x100 | |0x100 | ||
| | |South East track is active | ||
|- | |- | ||
|0x200 | |0x200 | ||
| | |South West track is active | ||
|- | |- | ||
|0x300 | |0x300 | ||
| | |North West track is active | ||
|- | |- | ||
|0x400 | |0x400 | ||
Line 1,149: | Line 994: | ||
|Vertical track is active | |Vertical track is active | ||
|} | |} | ||
=== REPL / PRPL section === | === REPL / PRPL section === | ||
This section contains the replay data. If this is a PRPL section, it must be unpacked first (see Section Packing). | This section contains the replay data. If this is a PRPL section, it must be unpacked first (see Section Packing). | ||
The contents of this section are as follows: | The contents of this section are as follows: | ||
{| class=" | {| class="article-table" | ||
!Bytes | !Bytes | ||
!Content | !Content | ||
|- | |- | ||
|1 | |1 | ||
|Usually 0 | |Unknown (Usually 0) | ||
|- | |- | ||
|1 | |1 | ||
|Random force floor initial direction | |||
|- | |- | ||
|1 | |1 | ||
|Randomness seed | |Randomness seed (used by blobs) | ||
|- | |- | ||
|Varies | |Varies | ||
|A sequence of input changes | |A sequence of input changes, optionally terminated by 0xff | ||
|} | |} | ||
==== Input | ==== Input Change ==== | ||
Specifies a change in input: | Specifies a change in input: | ||
{| class=" | {| class="article-table" | ||
!Bytes | !Bytes | ||
!Content | !Content | ||
|- | |- | ||
|1 | |1 | ||
|Number of frames | |Number of frames passed since previous input change. Always <= 0xfc. Larger delays are specified via multiple input changes. | ||
|- | |- | ||
|1 | |1 | ||
Line 1,186: | Line 1,029: | ||
|} | |} | ||
==== Input | ==== Input Bitmask ==== | ||
Specifies which keys are pressed, any number of bits can be combined: | Specifies which keys are pressed, any number of bits can be combined: | ||
{| class=" | {| class="article-table" | ||
!Bitmask | !Bitmask | ||
!Meaning | !Meaning | ||
Line 1,214: | Line 1,057: | ||
|- | |- | ||
|0x80 | |0x80 | ||
|If set, this input is for player 2 in a split-screen game | |If set, this input is for player 2 in a split-screen game. | ||
|} | |} | ||
<references/> | <references /> | ||
[[Category:Terminology]] | [[Category:Terminology]] | ||