![]() |
Routines |
| Prev: B9A5 | Up: Map | Next: B9D8 |
|
Used by the routine at HandleGuardOrWizard.
Works out the speeds that make a guard follow the wall of the room, using the direction in the two lowest bits of its flags: 00 is west, 01 is north, 02 is east and 03 is south.
|
||||||||||||||
| GetGuardSpeeds | B9CC | LD BC,$B9D8 | Point BC at the table of routines, GuardDirectionTable. | |||||||||||
| B9CF | LD A,(IX+$0D) | Fetch the direction flags of the guard. | ||||||||||||
| B9D2 | AND %00000011 | Keep the direction. | ||||||||||||
| B9D4 | LD L,A | Use it as the number of the routine. | ||||||||||||
| B9D5 | JP RunGame_JumpToHandler | Jump to the routine. | ||||||||||||
| Prev: B9A5 | Up: Map | Next: B9D8 |