Wall Switches - HoraceAndTheSpider/Bloodwych-68k GitHub Wiki
When the reference number of a switch has been allocated in the map data (see Map-Location Data - (1) Stone Walls) the "action" of that reference number is defined within a 64 byte block for each tower.
Each definition is 4 bytes long, following the below AA BB CC DD structure.
Switch Functions (AA)
02 - REMOVE 04 - TOGGLE STONE WALL 06 - OPEN VOID-LOCK DOOR 08 - ROTATE BRICK WALL 0A - TOGGLE PILLAR 0C - PLACE PILLAR 0E - ROTATE WOOD WALLS
Switch Parameter (BB) Always unused
Switch Parameter (CC DD)
CC is the X coordinate at which the action is taken. DD is the Y coordinate at which the action is taken.
Because the floor is never specified as a parameter for any of the switch actions, switch functions can be cleverly re-used on multiple floors of a dungeon to increase the variety of of puzzles.
Data Locations: (Amiga - IPF: 102)
[$5860] The Keep [$58A0] Serpent Tower [$58E0] Moon Tower [$5920] Dragon Tower [$5960] Chaos Tower [$59A0] Zendick's Tower
Example Data: The Keep
00000000 - ref 0 - no action 02000108 - ref 1 - remove pillar @ x01 y08 02001101 - ref 2 - remove pillar @ x11 y01 02000607 - ref 3 - remove pillar @ x06 y07 0200020C - ref 4 - remove wall @ x02 y0C 02000109 - ref 5 - remove wall @ x01 y09 04000901 - ref 6 - toggle wall @ x09 y01 00000000 - ref 7 - no action 00000000 - ref 8 - no action 0200151E - ref 9 - remove @ x15 y1E 02000B08 - ref 10 - remove @ x0B y08 02000E02 - ref 11 - remove @ x0E y02 02000C04 - ref 12 - remove @ x0C y04 0200110C - ref 13 - remove @ x11 y0C 02001117 - ref 14 - remove @ x11 y17 00000000 - ref 15 - no action