| Alien (BUGFIX 1.7) | Routines |
| Prev: 35560 | Up: Map | Next: 35638 |
|
Room mode 4: the "Get Item" picker strip is up (see GetItemMenu) and the action key fires on a row. QUIT rebuilds the room scene; otherwise the picked row's entry in RoomItemList is the item id to take: it goes into the front hand (marker 160+slot in ItemLocations, courage/morale raised by ItemCourageBonus) if that hand is free, else into the back hand (128+slot).
|
||||
| 35578 | LD A,(33685) | row value under the cursor | ||
| 35581 | CP 61 | QUIT? | ||
| 35583 | JP Z,32719 | |||
| 35586 | LD A,(33683) | cursor row | ||
| 35589 | LD E,A | |||
| 35590 | LD D,0 | |||
| 35592 | LD HL,29962 | E = RoomItemList[row] = picked item id | ||
| 35595 | ADD HL,DE | |||
| 35596 | LD E,(HL) | |||
| 35597 | LD C,128 | assume back hand (marker = slot+128) | ||
| 35599 | LD A,(31248) | front hand free? | ||
| 35602 | CP 255 | |||
| 35604 | JR NZ,35626 | |||
| 35606 | LD HL,29984 | yes: raise courage and morale | ||
| 35609 | ADD HL,DE | by ItemCourageBonus[item] | ||
| 35610 | LD A,(IX+5) | |||
| 35613 | ADD A,(HL) | |||
| 35614 | LD (IX+5),A | |||
| 35617 | LD A,(IX+6) | |||
| 35620 | ADD A,(HL) | |||
| 35621 | LD (IX+6),A | |||
| 35624 | LD C,160 | and use the front hand (slot+160) | ||
| 35626 | LD A,(31241) | ItemLocations[item] = hand marker: | ||
| 35629 | ADD A,C | the item is now carried | ||
| 35630 | LD HL,29940 | |||
| 35633 | ADD HL,DE | |||
| 35634 | LD (HL),A | |||
| 35635 | JP 32719 | rebuild the room scene | ||
| Prev: 35560 | Up: Map | Next: 35638 |