Routines |
Prev: 52849 | Up: Map | Next: 52948 |
Used by the routine at 52849.
|
||||
If an item is not of interest to a warlock (checked in the routine at 52857):
|
||||
52913 | LD C,D | Retrieve the object number (from table at 29551) that Maroc has offered | ||
52914 | LD B,0 | The upcoming CALL performs one of two functions, depending on whether the B or C register contains a non-zero value. By setting the B register to zero, it tells the routine that we want to get the item's data using the object number (in the C register) rather than the room number (B register). |
||
52916 | LD HL,(56051) | Address pointer to the start of the room object data sets at 29551 | ||
52919 | LD A,0 | |||
52921 | LD (60292),A | Set the data set counter to zero for the next CALL | ||
52924 | CALL 56908 | This routine finds an object's data set (in table at 29551), and copies its data into the object data buffer at 60293. | ||
Teleport the rejected item to current-room-number-plus-three
|
||||
52927 | LD A,(60087) | Current room number | ||
52930 | LD C,A | |||
52931 | ADD A,3 | Add 3 to it | ||
52933 | LD HL,(60290) | Get address pointer to the start of the item's data set | ||
52936 | LD (HL),A | The first byte in the set is the item's room number, so stick the updated value (room number plus 3) in here | ||
52937 | INC HL | |||
52938 | LD (HL),26 | Sets the object horizontal position (in half-pixel steps) in the room to a standard 26. This ensures that the object will be within the new room boundaries regardless of source & destination room sizes. The item's final vertical position would've been where the warlock was positioned on the room wall, so the object's vertical position will probably also be on the wall. |
||
52940 | LD A,0 | |||
52942 | LD (60334),A | Set the object-number-held-by-warlock byte to 0, as the offered item has just been teleported to a different room | ||
52945 | JP 53080 | ...Warlock isn't impressed with the item offering...! Jump to the 'set up missile' routine... |
Prev: 52849 | Up: Map | Next: 52948 |