Please create an account or Login! Have fun!

C2M: Difference between revisions

Jump to navigation Jump to search
497 bytes added ,  30 November 2020
fix a couple errant bytes, explain modifiers better, fill in upper nybble of upper byte of railroad modifier
(→‎Tile specification: S and E thin walls were backwards)
(fix a couple errant bytes, explain modifiers better, fill in upper nybble of upper byte of railroad modifier)
Line 550: Line 550:
|-
|-
|0x5e
|0x5e
|Logic switch ''(ON)''
|[[Pink button]]
|
|
|-
|-
Line 630: Line 630:
|-
|-
|0x72
|0x72
|[[Switch door|Purple toggle wall]]
|[[Switch door|Purple toggle floor]]
|
|
|-
|-
|0x73
|0x73
|[[Switch door|Purple toggle floor]]
|[[Switch door|Purple toggle wall]]
|
|
|-
|-
Line 824: Line 824:
==== Tile modifiers ====
==== 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.
The size of the modifier is irrelevant, and modifiers default to zero.  That is, if a tile is expecting a 16-bit modifier but the high byte is zero, an 8-bit modifier works as well.  If a tile is expecting an 8-bit modifier which is zero, the modifier may be omitted entirely.


==== Wire modifier ====
==== Wire modifier ====
Line 950: Line 952:


==== Track modifier ====
==== Track modifier ====
This is an 8- or 16-bit modifier that affects the [[railroad track]] tile. The low-order byte specifies which tracks exist; any number of bits can be combined:
This is a 16-bit modifier that affects the [[railroad track]] tile. The low byte specifies which tracks exist; any number of bits can be combined:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Bitmask
!Bitmask
Line 977: Line 979:
|}
|}


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 comprised of two nybbles.  The lower nybble specifies which track is active. For tiles with a track switch, the active track is the only one that can be used; the others are shown in red.
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Value
!Value
!Meaning
!Meaning
|-
|-
|''(Omitted)''
|0x000
|NE track is active
|NE track is active
|-
|-
Line 1,000: Line 1,002:
|Vertical track is active
|Vertical track is active
|}
|}
The upper nybble is the tile's initial "entered" direction.  When an actor starts the level already on top of this tile, it's treated as though it entered by moving in this direction.  (If there are no tracks corresponding to that direction, the actor will be unable to move.)


=== REPL / PRPL section ===
=== REPL / PRPL section ===
trusted-editors
68

edits

Navigation menu