![]() |
Routines |
| Prev: B516 | Up: Map | Next: B560 |
|
Used by the routine at ParserProcessItem.
Carry out the "Examine Item" command.
|
||||||||||||
| ActionExamineItem | B52B | INC BC | Turn the search position into this object's index. | |||||||||
| B52C | LD A,($AEF2) | |||||||||||
| B52F | SUB C | |||||||||||
| B530 | LD E,A | |||||||||||
| B531 | PUSH DE | Remember the object index. | ||||||||||
| B532 | LD IX,($AEDE) | Point IX at the item groups. | ||||||||||
| B536 | CALL GetTableEntry | Call GetTableEntry to look up the table entry. | ||||||||||
| B539 | POP DE | Restore the object index from the stack. | ||||||||||
| B53A | JR ExamineItem | Check the first item in this group. | ||||||||||
| ExamineItem_Loop | B53C | INC HL | Step to the next item in this group. | |||||||||
| ExamineItem | B53D | LD A,(HL) | Jump to Response_ItemNotHere if *HL is equal to FF. | |||||||||
| B53E | CP $FF | |||||||||||
| B540 | JR Z,Response_ItemNotHere | |||||||||||
| B542 | CALL Get_ObjectLocation | Call Get_ObjectLocation to find where the object is. | ||||||||||
| B545 | JR NZ,ExamineItem_Loop | Jump to ExamineItem_Loop if the item wasn't found. | ||||||||||
| B547 | RET | Return. | ||||||||||
|
The item being examined isn't in the room or in the players inventory.
|
||||||||||||
| Response_ItemNotHere | B548 | LD HL,$AFE5 | Print "I can't see ". | |||||||||
| B54B | CALL PrintString | |||||||||||
|
Print the object name.
|
||||||||||||
| B54E | LD IX,($AEE0) | Point IX at the noun for this item. | ||||||||||
| B552 | CALL GetTableEntry | Call GetTableEntry to look up the table entry. | ||||||||||
| B555 | CALL PrintString | Call PrintString to print the string. | ||||||||||
| B558 | LD HL,$AFF2 | Print " here." and start a new line. | ||||||||||
| B55B | CALL PrintStringAndANewline | |||||||||||
| B55E | SCF | Set the carry flag to report that the item isn't here, so the command goes no further. | ||||||||||
| B55F | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: B516 | Up: Map | Next: B560 |