| Alien (BUGFIX 1.7) | Routines |
| Prev: 35638 | Up: Map | Next: 35787 |
|
Action on the "Leave Item" row (11): drop the back-hand item if there is one, otherwise the front-hand item (undoing its courage bonus); the dropped item's ItemLocations entry becomes the current room.
|
||||
| 35725 | LD (IX+0),0 | |||
| 35729 | LD A,(31249) | back hand loaded? | ||
| 35732 | CP 255 | |||
| 35734 | JR NZ,35782 | yes: drop the back item | ||
| 35736 | LD A,(31248) | no: drop the front item — | ||
| 35739 | LD E,A | |||
| 35740 | LD D,0 | |||
| 35742 | LD HL,29984 | undo its courage bonus | ||
| 35745 | ADD HL,DE | |||
| 35746 | LD A,(IX+5) | |||
| 35749 | SUB (HL) | |||
| 35750 | CP 127 | (clamp underflow to 0) | ||
| 35752 | JR C,35755 | |||
| 35754 | XOR A | |||
| 35755 | LD (IX+5),A | |||
| 35758 | LD A,(IX+6) | |||
| 35761 | SUB (HL) | |||
| 35762 | CP 127 | |||
| 35764 | JR C,35767 | |||
| 35766 | XOR A | |||
| 35767 | LD (IX+6),A | |||
| 35770 | LD HL,29940 | ItemLocations[item] = current room: | ||
| 35773 | ADD HL,DE | the item now lies here | ||
| 35774 | LD A,(31242) | |||
| 35777 | LD (HL),A | |||
| 35778 | CALL 32719 | rebuild the room scene | ||
| 35781 | RET | |||
| 35782 | LD E,A | E = back item id (no bonus to undo) | ||
| 35783 | LD D,0 | |||
| 35785 | JR 35770 | |||
| Prev: 35638 | Up: Map | Next: 35787 |