![]() |
Routines |
| Prev: C213 | Up: Map | Next: C26F |
|
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 | C24F | PUSH HL | Stash HL and DE on the stack. | |||||||||
| C250 | PUSH DE | |||||||||||
| C251 | LD E,A | Store the object ID in DE. | ||||||||||
| C252 | LD D,$00 | |||||||||||
| C254 | BIT 7,E | Jump to Objects_UseScenicTable if this is a scenic object. | ||||||||||
| C256 | JR NZ,Objects_UseScenicTable | |||||||||||
|
Else check the regular objects.
|
||||||||||||
| C258 | LD HL,$B9C8 | HL=Table_ItemLocations. | ||||||||||
| C25B | JR Objects_CheckLocation | Jump to Objects_CheckLocation. | ||||||||||
|
Prepare object ID for use.
|
||||||||||||
| Objects_UseScenicTable | C25D | RES 7,E | Clear the scenic flag. | |||||||||
| C25F | LD HL,$BA48 | HL=Table_ScenicEventLocations. | ||||||||||
|
Both object types continue from here.
|
||||||||||||
| Objects_CheckLocation | C262 | ADD HL,DE | Add the object ID to the object/ event locations table. | |||||||||
| C263 | LD A,($BA9B) | 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. | ||||||||||
| C266 | CP (HL) | |||||||||||
| C267 | JR Z,Handler_Objects_Return | |||||||||||
|
Check the players inventory, as an object can still be used if it's being held.
|
||||||||||||
| C269 | LD A,$01 | Lastly, set the Z flag if the item is in the players inventory. | ||||||||||
| C26B | CP (HL) | |||||||||||
|
Housekeeping; restore DE and HL to their previous values.
|
||||||||||||
| Handler_Objects_Return | C26C | POP DE | Restore DE and HL from the stack. | |||||||||
| C26D | POP HL | |||||||||||
| C26E | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: C213 | Up: Map | Next: C26F |