![]() |
Routines |
| Prev: 42911 | Up: Map | Next: 42984 |
|
Used by the routines at BringActorCloser and LoadOrchid.
Finds the entry in TableOrchidPositions for the layout of the room an actor is in.
|
||||||||||||
| HandlerOrchidPosition | 42964 | PUSH BC | Stash BC on the stack. | |||||||||
|
Fetch the layout of the room.
|
||||||||||||
| 42965 | LD L,(IX+1) | Fetch the room of the actor. | ||||||||||
| 42968 | LD H,0 | Clear H. | ||||||||||
| 42970 | LD BC,24678 | Point BC at the layout table at Layout. | ||||||||||
| 42973 | ADD HL,BC | Add the layout table address to get the address of the layout number for the room. | ||||||||||
|
Fetch the orchid position for the layout.
|
||||||||||||
| 42974 | LD L,(HL) | Fetch the layout number of the room. | ||||||||||
| 42975 | LD H,0 | Clear H. | ||||||||||
| 42977 | ADD HL,HL | Double the layout number, as there are two bytes of position for each layout. | ||||||||||
| 42978 | LD BC,54950 | Point BC at the table of orchid positions at TableOrchidPositions. | ||||||||||
| 42981 | ADD HL,BC | Add the table address to get the address of the position for the layout. | ||||||||||
| 42982 | POP BC | Restore BC from the stack. | ||||||||||
| 42983 | RET | Return. | ||||||||||
| Prev: 42911 | Up: Map | Next: 42984 |