![]() |
Routines |
| Prev: B52B | Up: Map | Next: B575 |
|
Used by the routines at ActionExamineItem, CheckActiveScenicEvents, Handler_SetCurrentRoom, Handler_ChangeRoom, Handler_ShowNewRoom and Action_Help.
Get Object Location.
|
||||
| Get_ObjectLocation | B560 | PUSH HL | Keep the caller's pointers. | |
| B561 | PUSH DE | |||
| B562 | LD E,A | Look this object up in the item-location table. | ||
| B563 | LD D,$00 | |||
| B565 | LD HL,$AD76 | |||
| B568 | ADD HL,DE | |||
| B569 | LD A,($AECD) | Read the current room into A. | ||
| B56C | CP (HL) | Branch to Get_ObjectLocation_Return when the byte at HL means the values match. | ||
| B56D | JR Z,Get_ObjectLocation_Return | |||
| B56F | LD A,$01 | See whether the object is in the inventory. | ||
| B571 | CP (HL) | |||
| Get_ObjectLocation_Return | B572 | POP DE | Restore the caller's pointers from the stack, keeping the zero flag from the location test. | |
| B573 | POP HL | |||
| B574 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: B52B | Up: Map | Next: B575 |