![]() |
Routines |
| Prev: 49683 | Up: Map | Next: 49775 |
|
Used by the routines at Parser_ResolvePhrase, Parser_SkipToken, Events_WoodNymph, Events_Spider, Events_SlimeMonster, Events_Demons, Events_Wizard, Handler_InjuryCheck, Action_Help, Action_Examine, Validate_Take_Rope, Action_Drop, Action_Climb, Action_Give, Action_Kill, Action_Kiss, Action_Open, Action_Close, Action_Enter, Action_Touch, Action_Tie, Action_Swearing and Action_Unlock.
Set the zero flag when this object is in this room or in the scenic list.
|
||||||||||||
| ValidateItemPresent | 49743 | PUSH HL | Stash HL and DE on the stack. | |||||||||
| 49744 | PUSH DE | |||||||||||
| 49745 | LD E,A | Store the object ID in DE. | ||||||||||
| 49746 | LD D,0 | |||||||||||
| 49748 | BIT 7,E | Jump to Objects_UseScenicTable if this is a scenic object. | ||||||||||
| 49750 | JR NZ,Objects_UseScenicTable | |||||||||||
|
Else check the regular objects.
|
||||||||||||
| 49752 | LD HL,47560 | HL=Table_ItemLocations. | ||||||||||
| 49755 | JR Objects_CheckLocation | Jump to Objects_CheckLocation. | ||||||||||
|
Prepare object ID for use.
|
||||||||||||
| Objects_UseScenicTable | 49757 | RES 7,E | Clear the scenic flag. | |||||||||
| 49759 | LD HL,47688 | HL=Table_ScenicEventLocations. | ||||||||||
|
Both object types continue from here.
|
||||||||||||
| Objects_CheckLocation | 49762 | ADD HL,DE | Add the object ID to the object/ event locations table. | |||||||||
| 49763 | LD A,(47771) | Jump to Handler_Objects_Return if the object/ event table states that it's located in *the current room. Note also sets/ unsets the Z flag accordingly. | ||||||||||
| 49766 | CP (HL) | |||||||||||
| 49767 | JR Z,Handler_Objects_Return | |||||||||||
|
Check the players inventory, as an object can still be used if it's being held.
|
||||||||||||
| 49769 | LD A,1 | Lastly, set the Z flag if the item is in the players inventory. | ||||||||||
| 49771 | CP (HL) | |||||||||||
|
Housekeeping; restore DE and HL to their previous values.
|
||||||||||||
| Handler_Objects_Return | 49772 | POP DE | Restore DE and HL from the stack. | |||||||||
| 49773 | POP HL | |||||||||||
| 49774 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 49683 | Up: Map | Next: 49775 |