| Alien (BUGFIX 1.7) | Routines |
| Prev: 31820 | Up: Map | Next: 31857 |
|
Finds what actor A is carrying: scans ItemLocations for the slot+160 marker (front hand) into HeldItemFront and the slot+128 marker (back hand) into HeldItemBack. The item id is the table position where the marker sits.
|
||||
| 31823 | ADD A,128 | C = slot + 128, E = slot + 160 | ||
| 31825 | LD C,A | |||
| 31826 | ADD A,32 | |||
| 31828 | LD E,A | |||
| 31829 | LD HL,29961 | scan ItemLocations from item 21 down | ||
| 31832 | LD B,22 | |||
| 31834 | LD A,(HL) | |||
| 31835 | CP C | back-hand marker? | ||
| 31836 | JR NZ,31845 | |||
| 31838 | LD A,B | yes: HeldItemBack = item id (B-1) | ||
| 31839 | DEC A | |||
| 31840 | LD (31249),A | |||
| 31843 | JR 31853 | |||
| 31845 | CP E | front-hand marker? | ||
| 31846 | JR NZ,31853 | |||
| 31848 | LD A,B | yes: HeldItemFront = item id | ||
| 31849 | DEC A | |||
| 31850 | LD (31248),A | |||
| 31853 | DEC HL | |||
| 31854 | DJNZ 31834 | |||
| 31856 | RET | |||
|
This entry point is used by the routines at 31915, 35451, 35638, 35814 and 37944.
|
||||
| Prev: 31820 | Up: Map | Next: 31857 |