![]() |
Routines |
| Prev: 46358 | Up: Map | Next: 46432 |
|
Used by the routine at ParserProcessItem.
Carry out the "Examine Item" command.
|
||||||||||||
| ActionExamineItem | 46379 | INC BC | Turn the search position into this object's index. | |||||||||
| 46380 | LD A,(44786) | |||||||||||
| 46383 | SUB C | |||||||||||
| 46384 | LD E,A | |||||||||||
| 46385 | PUSH DE | Remember the object index. | ||||||||||
| 46386 | LD IX,(44766) | Point IX at the item groups. | ||||||||||
| 46390 | CALL GetTableEntry | Call GetTableEntry to look up the table entry. | ||||||||||
| 46393 | POP DE | Restore the object index from the stack. | ||||||||||
| 46394 | JR ExamineItem | Check the first item in this group. | ||||||||||
| ExamineItem_Loop | 46396 | INC HL | Step to the next item in this group. | |||||||||
| ExamineItem | 46397 | LD A,(HL) | Jump to Response_ItemNotHere if *HL is equal to 255. | |||||||||
| 46398 | CP 255 | |||||||||||
| 46400 | JR Z,Response_ItemNotHere | |||||||||||
| 46402 | CALL Get_ObjectLocation | Call Get_ObjectLocation to find where the object is. | ||||||||||
| 46405 | JR NZ,ExamineItem_Loop | Jump to ExamineItem_Loop if the item wasn't found. | ||||||||||
| 46407 | RET | Return. | ||||||||||
|
The item being examined isn't in the room or in the players inventory.
|
||||||||||||
| Response_ItemNotHere | 46408 | LD HL,45029 | Print "I can't see ". | |||||||||
| 46411 | CALL PrintString | |||||||||||
|
Print the object name.
|
||||||||||||
| 46414 | LD IX,(44768) | Point IX at the noun for this item. | ||||||||||
| 46418 | CALL GetTableEntry | Call GetTableEntry to look up the table entry. | ||||||||||
| 46421 | CALL PrintString | Call PrintString to print the string. | ||||||||||
| 46424 | LD HL,45042 | Print " here." and start a new line. | ||||||||||
| 46427 | CALL PrintStringAndANewline | |||||||||||
| 46430 | SCF | Set the carry flag to report that the item isn't here, so the command goes no further. | ||||||||||
| 46431 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 46358 | Up: Map | Next: 46432 |