![]() |
Routines |
| Prev: 95DA | Up: Map | Next: 9641 |
|
The handler for the A.C.G. door. It walks the three inventory slots four bytes at a time and wants $8C, $8D and $8E in them, in that order -- the three pieces of the A.C.G. key, ACG_KEY_PARTS -- and only then opens the door (OPEN_DOOR) and behaves as one, with a wider doorway than most. Anything less and it is drawn shut (SHUT_DOOR). Through it is room $8E, and reaching that ends the game.
New pickups go into the first slot, so this order means collecting $8E first and $8C last. Measured in the simulator: $8C, $8D, $8E opened it and walking in reached SHOW_END_SCREEN; the opposite order left it shut. The door is in room $00, the starting room, on its east wall.
|
||||
| ACG_DOOR | 961B | LD HL,$5E32 | ||
| 961E | LD DE,$0004 | |||
| 9621 | LD A,(HL) | |||
| 9622 | CP $8C | |||
| 9624 | JR NZ,ACG_DOOR_0 | |||
| 9626 | ADD HL,DE | |||
| 9627 | LD A,(HL) | |||
| 9628 | CP $8D | |||
| 962A | JR NZ,ACG_DOOR_0 | |||
| 962C | ADD HL,DE | |||
| 962D | LD A,(HL) | |||
| 962E | CP $8E | |||
| 9630 | JR NZ,ACG_DOOR_0 | |||
| 9632 | CALL OPEN_DOOR | |||
| 9635 | LD BC,$3020 | |||
| 9638 | JP DOORWAY | |||
| ACG_DOOR_0 | 963B | CALL SHUT_DOOR | ||
| 963E | JP DRAW_DOOR | |||
| Prev: 95DA | Up: Map | Next: 9641 |