![]() |
Routines |
| Prev: BF79 | Up: Map | Next: C107 |
|
Used by the routine at TAKE_OR_LEAVE.
Only the bucket (graphic 90) and the collectables (144 to 148), and only when he is on or beside it: their boxes overlap in U and V, and in Z with him lowered by 4, so that a thing he stands on counts as touching. The caller has made his box 4 bigger each way. Knight Lore's can_pickup_spec_obj and is_on_or_near_obj together.
|
||||||||||||||
| CAN_PICK_UP | C0D4 | LD A,(IY+$00) | the bucket, or graphic 144 to 148; otherwise no carry | |||||||||||
| C0D7 | CP $5A | |||||||||||||
| C0D9 | JR Z,CAN_PICK_UP_0 | |||||||||||||
| C0DB | SUB $90 | |||||||||||||
| C0DD | CP $05 | |||||||||||||
| C0DF | RET NC | |||||||||||||
| CAN_PICK_UP_0 | C0E0 | PUSH BC | overlapping in U and V, with no offset | |||||||||||
| C0E1 | LD BC,$0000 | |||||||||||||
| C0E4 | LD L,C | |||||||||||||
| C0E5 | LD H,C | |||||||||||||
| C0E6 | CALL DO_OBJS_INTERSECT_ON_U | |||||||||||||
| C0E9 | JR NC,CAN_PICK_UP_1 | |||||||||||||
| C0EB | CALL DO_OBJS_INTERSECT_ON_V | |||||||||||||
| C0EE | JR NC,CAN_PICK_UP_1 | |||||||||||||
| C0F0 | LD A,(IX+$03) | in Z, with him 4 lower, then put back | ||||||||||||
| C0F3 | SUB $04 | |||||||||||||
| C0F5 | LD (IX+$03),A | |||||||||||||
| C0F8 | CALL DO_OBJS_INTERSECT_ON_Z | |||||||||||||
| C0FB | PUSH AF | |||||||||||||
| C0FC | LD A,(IX+$03) | |||||||||||||
| C0FF | ADD A,$04 | |||||||||||||
| C101 | LD (IX+$03),A | |||||||||||||
| C104 | POP AF | |||||||||||||
| CAN_PICK_UP_1 | C105 | POP BC | ||||||||||||
| C106 | RET | |||||||||||||
| Prev: BF79 | Up: Map | Next: C107 |