Difference between revisions of "Voodoo tile"
(Creating article, most of this copied from Tyler)
Revision as of 20:21, 10 September 2019
- Create a new file in the CC2 editor.
- At the top left corner of the level, place a counter-clockwise north-facing latch gate (the one where the arrow points from right to up). It’s recommended that you use the top left corner and place no other tiles in the level because of the compression scheme that CC2 uses.
- Save the level.
- Close the level in the editor, either by temporarily loading another level set, opening another level, or starting a new level.
- Open the level you saved in a hex editor.
- Your hex editor should have a display on the right side that shows the bytes of the level encoded as ASCII. Search for the “PACK” section: this is where the map contents are specified.
After the “PACK” bytes, there will be the bytes 76 40 5C. The “76 40 5C” sequence is what specifies a north latch gate tile, 76 byte is the one-byte modifier indicator, the 40 byte is the latch gate north value of the modifier, and the 5C byte is a generic logic gate. As listed in this article, here are the valid bytes that a logic gate modifier value can have:
- 01 to 17: inverters, AND gates, OR gates, XOR gates, clockwise latches, NAND gates
- 1E to 27: counters
- 40 to 43: counterclockwise latches
In the example above, the 40 byte must be changed to something outside of these ranges, in order to obtain other tiles.
These tiles require values ranging from 44 to FF. Logic gates with modifier values after 43 will act as floor, but graphics for them are still drawn by the game. Take a look at the bottom of the CC2 sprite sheet.
Again, a value of 40 to 43 will draw the latch gates, but going beyond this range will continue through the sprite sheet. For example, a value of 44 will draw the off switch, a value of 58 will draw Chip facing north, 74 to 77 will draw non-animated water, C4 to C7 will draw non-animated fire, 78 to 8F will draw non-functional logic gates, DC, DD, and DE will draw non-functional dirt, Chip-only, and Melinda-only signs. Any value from 44 to E7 can be chosen and the corresponding 32x32 square will be drawn. E8 and beyond does nothing.
These tiles require values ranging from 18 to 1D. The screen will fail to draw anything, instead preserving a memory of what used to be visible on the screen there. This can include blurry images of nearby tiles, or the "paused" message.
These tiles require values ranging from 27 to 3F. These are similar to voodoo tiles, except that a rectangle beyond the normal bounds of counter gates are drawn on top of the counter tile base. These don’t have any deceptive abilities, simply producing a weird-looking tile.