Notes on the combination lock in tower 2

28 March 2010

Principle:

- There are four 9-state digit wheels and one 2-state slide-switch, 
  which opens the door, if the wheels are set to the right combination
  and closes it unconditionally. If operated with the wrong combination,
  it slowly returns to closed-standby state.
- The digit wheels are revolved up or down, using two invisible scene
  object buttons each. All responders are attached to to these buttons.

- When the door opens, the wheels automatically turn to a new
  combination, which may, or may not, be of use elsewhere.

SDL variables used:

    VAR BYTE CombinationLock0[1]    DEFAULT=0   # Rightmost digit
    VAR BYTE CombinationLock1[1]    DEFAULT=0
    VAR BYTE CombinationLock2[1]    DEFAULT=0
    VAR BYTE CombinationLock3[1]    DEFAULT=0
    VAR BOOL CombinationLockDoor[1] DEFAULT=0    # 0 = closed, 1 = open

The variables hold only the unmodified combination digits - required
additional information is passed in  their tag strings. This includes turn
direction for the digit wheels and whether the door is already open,
or the player is attempting to open it.

 The correct combination for the door is 2614
 The combination gained upon opening is  8370

 (Note that it is yet to be determined whether the numeral system in the age,
  if indeed a numeral system it is, actually incorporates the concept of the
  number zero - the first digit consists of a single "hockeystick" line and
  the second adds one more line, crossing the first, which seems to imply
  they'd correspond to 1 and 2, rather than 0 and 1.
  Also; the combination digits, that can be found throughout the age,
  are preceeded by an index, that refers the code wheels, enumerated left 
  to right, which may suggest the least significant
  digit goes to the left here...)

Combination parts can be found in the following places:
    0 - In the combination lock room, on the upper floor, unindexed 4
    1 - On the cablecar anchor on tower two, labeled 21
    2 - On debris fallen from the top of tower 3, labeled 16
    3 - At the turning point of the tower 1 corkscrew, labeled 02